diff --git a/.fern/metadata.json b/.fern/metadata.json new file mode 100644 index 00000000..c720e2a0 --- /dev/null +++ b/.fern/metadata.json @@ -0,0 +1,13 @@ +{ + "cliVersion": "5.51.2", + "generatorName": "fernapi/fern-python-sdk", + "generatorVersion": "5.3.3", + "generatorConfig": { + "pydantic_config": { + "skip_validation": true + }, + "client_class_name": "Vapi" + }, + "originGitCommit": "5a015aa01196915bea6110904c69d5804f457ff5", + "sdkVersion": "2.0.0" +} \ No newline at end of file diff --git a/.fernignore b/.fernignore index 084a8ebb..cd97554f 100644 --- a/.fernignore +++ b/.fernignore @@ -1 +1,10 @@ # Specify files that shouldn't be modified by Fern + +.github/workflows/sdk-release-pr-notification.yml +README.md +src/vapi/assistants/types/update_assistant_dto_server_messages_item.py +src/vapi/types/assistant_overrides_server_messages_item.py +src/vapi/types/assistant_server_messages_item.py +src/vapi/types/create_assistant_dto_server_messages_item.py + +changelog.md diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fa41c1f2..9ab0a279 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,16 +1,20 @@ name: ci - on: [push] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: false + jobs: compile: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - name: Checkout repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up python uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: "3.10" - name: Bootstrap poetry run: | curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1 @@ -19,14 +23,14 @@ jobs: - name: Compile run: poetry run mypy . test: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - name: Checkout repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up python uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: "3.10" - name: Bootstrap poetry run: | curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1 @@ -34,19 +38,25 @@ jobs: run: poetry install - name: Test - run: poetry run pytest -rP . + run: poetry run pytest -rP -n auto . + + - name: Install aiohttp extra + run: poetry install --extras aiohttp + + - name: Test (aiohttp) + run: poetry run pytest -rP -n auto -m aiohttp . publish: needs: [compile, test] if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - name: Checkout repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up python uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: "3.10" - name: Bootstrap poetry run: | curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1 diff --git a/.github/workflows/sdk-release-pr-notification.yml b/.github/workflows/sdk-release-pr-notification.yml new file mode 100644 index 00000000..98adac5e --- /dev/null +++ b/.github/workflows/sdk-release-pr-notification.yml @@ -0,0 +1,146 @@ +name: SDK Release PR Notification + +on: + pull_request: + types: [opened, reopened, ready_for_review] + +permissions: + contents: read + pull-requests: read + +jobs: + notify: + name: Notify Slack + if: > + (github.event.action == 'ready_for_review' || github.event.pull_request.draft == false) && + ( + github.event.pull_request.user.login == 'fern-api[bot]' || + github.event.pull_request.user.login == 'fern-api' || + contains(github.event.pull_request.head.ref, 'fern') + ) + runs-on: ubuntu-latest + env: + SLACK_WEBHOOK_URL: ${{ secrets.PRODUCTION_RELEASE_OBSERVABILITY_SLACK_WEBHOOK }} + RUNBOOK_URL: https://github.com/VapiAI/docs/blob/main/.github/runbooks/sdk-release-approval.md + steps: + - name: Checkout PR + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + + - name: Detect package metadata + id: package + shell: bash + run: | + set -euo pipefail + + repo="${GITHUB_REPOSITORY#*/}" + package="unknown" + registry="unknown" + + case "$repo" in + server-sdk-typescript) + package="@vapi-ai/server-sdk" + registry="npm" + ;; + server-sdk-python) + package="vapi_server_sdk" + registry="PyPI" + ;; + server-sdk-go) + package="github.com/VapiAI/server-sdk-go" + registry="Go modules" + ;; + server-sdk-ruby) + package="vapi_server_sdk" + registry="RubyGems" + ;; + server-sdk-csharp) + package="Vapi.Net" + registry="NuGet" + ;; + server-sdk-php) + package="vapi/vapi" + registry="Packagist" + ;; + server-sdk-swift) + package="Vapi" + registry="Swift Package Manager" + ;; + esac + + version="$(node <<'NODE' + const fs = require('fs'); + + const readJson = (path) => { + try { + return JSON.parse(fs.readFileSync(path, 'utf8')); + } catch { + return undefined; + } + }; + + const firstMatch = (path, regex) => { + if (!fs.existsSync(path)) return undefined; + return fs.readFileSync(path, 'utf8').match(regex)?.[1]; + }; + + const metadata = readJson('.fern/metadata.json'); + const packageJson = readJson('package.json'); + const composerJson = readJson('composer.json'); + + const version = + metadata?.sdkVersion || + packageJson?.version || + composerJson?.version || + firstMatch('pyproject.toml', /^version = "([^"]+)"/m) || + firstMatch('src/Vapi.Net/Vapi.Net.csproj', /([^<]+)<\/Version>/) || + firstMatch('lib/vapi/version.rb', /VERSION = "([^"]+)"/) || + 'unknown'; + + process.stdout.write(version); + NODE + )" + + { + echo "package=$package" + echo "registry=$registry" + echo "version=$version" + } >> "$GITHUB_OUTPUT" + + - name: Send Slack notification + shell: bash + env: + PR_NUMBER: ${{ github.event.pull_request.number }} + PR_TITLE: ${{ github.event.pull_request.title }} + PR_URL: ${{ github.event.pull_request.html_url }} + PR_AUTHOR: ${{ github.event.pull_request.user.login }} + PACKAGE_NAME: ${{ steps.package.outputs.package }} + PACKAGE_REGISTRY: ${{ steps.package.outputs.registry }} + PACKAGE_VERSION: ${{ steps.package.outputs.version }} + run: | + set -euo pipefail + + if [ -z "${SLACK_WEBHOOK_URL}" ]; then + echo "::warning::PRODUCTION_RELEASE_OBSERVABILITY_SLACK_WEBHOOK is not set; skipping Slack notification." + exit 0 + fi + + text="$(cat < + *Author:* \`${PR_AUTHOR}\` + *Package:* \`${PACKAGE_NAME}\` (${PACKAGE_REGISTRY}) + *Version:* \`${PACKAGE_VERSION}\` + *Next:* Review and merge the PR, then publish the release tag from the SDK repo. + *Runbook:* <${RUNBOOK_URL}|SDK release approval runbook> + EOF + )" + + payload="$(jq -n --arg text "$text" '{text: $text}')" + curl --fail --show-error --silent \ + --request POST \ + --header 'Content-Type: application/json' \ + --data "$payload" \ + "$SLACK_WEBHOOK_URL" diff --git a/.gitignore b/.gitignore index 0da665fe..d2e4ca80 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ -dist/ .mypy_cache/ +.ruff_cache/ __pycache__/ +dist/ poetry.toml -.ruff_cache/ diff --git a/README.md b/README.md index f60a31d7..94b5b876 100644 --- a/README.md +++ b/README.md @@ -1,152 +1,152 @@ -# Vapi Python Library - -[![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2FVapiAI%2Fserver-sdk-python) -[![pypi](https://img.shields.io/pypi/v/vapi_server_sdk)](https://pypi.python.org/pypi/vapi_server_sdk) - -The Vapi Python library provides convenient access to the Vapi API from Python. - -## Installation - -```sh -pip install vapi_server_sdk -``` - -## Reference - -A full reference for this library is available [here](./reference.md). - -## Usage - -Instantiate and use the client with the following: - -```python -from vapi import Vapi - -client = Vapi( - token="YOUR_TOKEN", -) -client.calls.create() -``` - -## Async Client - -The SDK also exports an `async` client so that you can make non-blocking calls to our API. - -```python -import asyncio - -from vapi import AsyncVapi - -client = AsyncVapi( - token="YOUR_TOKEN", -) - - -async def main() -> None: - await client.calls.create() - - -asyncio.run(main()) -``` - -## Exception Handling - -When the API returns a non-success status code (4xx or 5xx response), a subclass of the following error -will be thrown. - -```python -from vapi.core.api_error import ApiError - -try: - client.calls.create(...) -except ApiError as e: - print(e.status_code) - print(e.body) -``` - -## Pagination - -Paginated requests will return a `SyncPager` or `AsyncPager`, which can be used as generators for the underlying object. - -```python -from vapi import Vapi - -client = Vapi( - token="YOUR_TOKEN", -) -response = client.logs.get() -for item in response: - yield item -# alternatively, you can paginate page-by-page -for page in response.iter_pages(): - yield page -``` - -## Advanced - -### Retries - -The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long -as the request is deemed retriable and the number of retry attempts has not grown larger than the configured -retry limit (default: 2). - -A request is deemed retriable when any of the following HTTP status codes is returned: - -- [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout) -- [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests) -- [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors) - -Use the `max_retries` request option to configure this behavior. - -```python -client.calls.create(..., request_options={ - "max_retries": 1 -}) -``` - -### Timeouts - -The SDK defaults to a 60 second timeout. You can configure this with a timeout option at the client or request level. - -```python - -from vapi import Vapi - -client = Vapi( - ..., - timeout=20.0, -) - - -# Override timeout for a specific method -client.calls.create(..., request_options={ - "timeout_in_seconds": 1 -}) -``` - -### Custom Client - -You can override the `httpx` client to customize it for your use-case. Some common use-cases include support for proxies -and transports. -```python -import httpx -from vapi import Vapi - -client = Vapi( - ..., - httpx_client=httpx.Client( - proxies="http://my.test.proxy.example.com", - transport=httpx.HTTPTransport(local_address="0.0.0.0"), - ), -) -``` - -## Contributing - -While we value open-source contributions to this SDK, this library is generated programmatically. -Additions made directly to this library would have to be moved over to our generation code, -otherwise they would be overwritten upon the next generated release. Feel free to open a PR as -a proof of concept, but know that we will not be able to merge it as-is. We suggest opening -an issue first to discuss with us! - -On the other hand, contributions to the README are always very welcome! +# Vapi Python Library + +[![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2FVapiAI%2Fserver-sdk-python) +[![pypi](https://img.shields.io/pypi/v/vapi_server_sdk)](https://pypi.python.org/pypi/vapi_server_sdk) + +The Vapi Python library provides convenient access to the Vapi API from Python. + +## Installation + +```sh +pip install vapi_server_sdk +``` + +## Reference + +A full reference for this library is available [here](./reference.md). + +## Usage + +Instantiate and use the client with the following: + +```python +from vapi import Vapi + +client = Vapi( + token="YOUR_TOKEN", +) +client.calls.create() +``` + +## Async Client + +The SDK also exports an `async` client so that you can make non-blocking calls to our API. + +```python +import asyncio + +from vapi import AsyncVapi + +client = AsyncVapi( + token="YOUR_TOKEN", +) + + +async def main() -> None: + await client.calls.create() + + +asyncio.run(main()) +``` + +## Exception Handling + +When the API returns a non-success status code (4xx or 5xx response), a subclass of the following error +will be thrown. + +```python +from vapi.core.api_error import ApiError + +try: + client.calls.create(...) +except ApiError as e: + print(e.status_code) + print(e.body) +``` + +## Pagination + +Paginated requests will return a `SyncPager` or `AsyncPager`, which can be used as generators for the underlying object. + +```python +from vapi import Vapi + +client = Vapi( + token="YOUR_TOKEN", +) +response = client.logs.get() +for item in response: + yield item +# alternatively, you can paginate page-by-page +for page in response.iter_pages(): + yield page +``` + +## Advanced + +### Retries + +The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long +as the request is deemed retriable and the number of retry attempts has not grown larger than the configured +retry limit (default: 2). + +A request is deemed retriable when any of the following HTTP status codes is returned: + +- [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout) +- [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests) +- [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors) + +Use the `max_retries` request option to configure this behavior. + +```python +client.calls.create(..., request_options={ + "max_retries": 1 +}) +``` + +### Timeouts + +The SDK defaults to a 60 second timeout. You can configure this with a timeout option at the client or request level. + +```python + +from vapi import Vapi + +client = Vapi( + ..., + timeout=20.0, +) + + +# Override timeout for a specific method +client.calls.create(..., request_options={ + "timeout_in_seconds": 1 +}) +``` + +### Custom Client + +You can override the `httpx` client to customize it for your use-case. Some common use-cases include support for proxies +and transports. +```python +import httpx +from vapi import Vapi + +client = Vapi( + ..., + httpx_client=httpx.Client( + proxies="http://my.test.proxy.example.com", + transport=httpx.HTTPTransport(local_address="0.0.0.0"), + ), +) +``` + +## Contributing + +While we value open-source contributions to this SDK, this library is generated programmatically. +Additions made directly to this library would have to be moved over to our generation code, +otherwise they would be overwritten upon the next generated release. Feel free to open a PR as +a proof of concept, but know that we will not be able to merge it as-is. We suggest opening +an issue first to discuss with us! + +On the other hand, contributions to the README are always very welcome! diff --git a/changelog.md b/changelog.md new file mode 100644 index 00000000..cd672f3b --- /dev/null +++ b/changelog.md @@ -0,0 +1,28 @@ +## 2.0.0 - 2026-06-24 +### Breaking Changes +* **`CartesiaExperimentalControlsSpeedZero`** has been removed and replaced by **`CartesiaSpeedControlZero`**. Update any imports or type annotations referencing `CartesiaExperimentalControlsSpeedZero` to use `CartesiaSpeedControlZero` instead. +* **`FallbackAzureVoiceVoiceIdZero`** has been removed and replaced by **`FallbackAzureVoiceIdZero`**. Update any imports or type annotations referencing `FallbackAzureVoiceVoiceIdZero` to use `FallbackAzureVoiceIdZero` instead. + +## 1.11.1 - 2026-05-20 +* chore: remove redundant content-type headers from raw clients +* Remove explicitly set `"content-type": "application/json"` headers from +* multiple raw client request calls across the SDK. These headers are +* already handled by the underlying HTTP client when a JSON body is +* present, making the explicit declarations redundant. +* Key changes: +* Remove hardcoded `content-type: application/json` headers from `RawAssistantsClient` and `AsyncRawAssistantsClient` +* Remove same redundant headers from `RawEvalClient`, `RawInsightClient`, `RawObservabilityScorecardClient`, `RawPhoneNumbersClient`, `RawSquadsClient`, `RawStructuredOutputsClient`, and `RawToolsClient` +* Applies to both sync and async variants of all affected clients +* 🌿 Generated with Fern + +## 1.11.0 - 2026-04-22 +### Added +* **`Call.subscription_limits`** — new optional field that exposes the org's `SubscriptionLimits` (including concurrency limit information) at the time of a call. + +## 1.10.0 - 2026-04-10 +* The SDK now supports `aiohttp` as an optional async HTTP transport backend. Install the new extra (`pip install vapi_server_sdk[aiohttp]`) to have `AsyncVapi` automatically use `httpx-aiohttp` under the hood. Two new convenience classes, `DefaultAioHttpClient` and `DefaultAsyncHttpxClient`, are also now available for users who want to configure the async HTTP client explicitly. + +## 1.9.1 - 2026-04-07 +* SDK regeneration +* Unable to analyze changes with AI, incrementing PATCH version. + diff --git a/poetry.lock b/poetry.lock index d8769c12..ad2cd021 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,172 @@ -# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.5 and should not be changed by hand. + +[[package]] +name = "aiohappyeyeballs" +version = "2.6.2" +description = "Happy Eyeballs for asyncio" +optional = true +python-versions = ">=3.10" +files = [ + {file = "aiohappyeyeballs-2.6.2-py3-none-any.whl", hash = "sha256:4708045e2d7a6c6bdf8aafa8ed39649eaf926a4543b54560659129e3365953c4"}, + {file = "aiohappyeyeballs-2.6.2.tar.gz", hash = "sha256:e202810ee718bd01fc6ef49e8ea53d023d5cb6b581076d7925aa499fa55dbe64"}, +] + +[[package]] +name = "aiohttp" +version = "3.14.1" +description = "Async http client/server framework (asyncio)" +optional = true +python-versions = ">=3.10" +files = [ + {file = "aiohttp-3.14.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:8f6bb621e5863cfe8fe5ff5468002d200ec31f30f1280b259dc505b02595099e"}, + {file = "aiohttp-3.14.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:4f7215cb3933784f79ed20e5f050e15984f390424339b22375d5a53c933a0491"}, + {file = "aiohttp-3.14.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:d9d4e294455b23a68c9b8f042d0e8e377a265bcb15332753695f6e5b6819e0ce"}, + {file = "aiohttp-3.14.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b238af795833d5731d049d82bc84b768ae6f8f97f0495963b3ed9935c5901cc3"}, + {file = "aiohttp-3.14.1-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:e4e5e0ae56914ecdbf446493addefc0159053dd53962cef37d7839f37f73d505"}, + {file = "aiohttp-3.14.1-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:092e4ce3619a7c6dee52a6bdabda973d9b34b66781f840ce93c7e0cec30cf521"}, + {file = "aiohttp-3.14.1-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:bb33777ea21e8b7ecde0e6fc84f598be0a1192eab1a63bc746d75aa75d38e7bd"}, + {file = "aiohttp-3.14.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:23119f8fd4f5d16902ed459b63b100bcd269628075162bddac56cc7b5273b3fb"}, + {file = "aiohttp-3.14.1-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:57fc6745a4b7d0f5a9eb4f40a69718be6c0bc1b8368cc9fe89e90118719f4f42"}, + {file = "aiohttp-3.14.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:6fd35beba67c4183b09375c5fff9accb47524191a244a99f95fd4472f5402c2b"}, + {file = "aiohttp-3.14.1-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:672b9d65f42eb877f5c3f234a4547e4e1a226ca8c2eed879bb34670a0ce51192"}, + {file = "aiohttp-3.14.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:24ba13339fed9251d9b1a1bec8c7ab84c0d1675d79d33501e11f94f8b9a84e05"}, + {file = "aiohttp-3.14.1-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:94da27378da0610e341c4d30de29a191672683cc82b8f9556e8f7c7212a020fe"}, + {file = "aiohttp-3.14.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:52cdac9432d8b4a719f35094a818d95adcae0f0b4fe9b9b921909e0c87de9e7d"}, + {file = "aiohttp-3.14.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:672ac254412a24d0d0cf00a9e6c238877e4be5e5fa2d188832c1244f45f31966"}, + {file = "aiohttp-3.14.1-cp310-cp310-win32.whl", hash = "sha256:2fe3607e71acc6ebb0ec8e492a247bf7a291226192dc0084236dfc12478916f6"}, + {file = "aiohttp-3.14.1-cp310-cp310-win_amd64.whl", hash = "sha256:30099eda75a53c32efb0920e9c33c195314d2cc1c680fbfd30894932ac5f27df"}, + {file = "aiohttp-3.14.1-cp310-cp310-win_arm64.whl", hash = "sha256:5a837f49d901f9e368651b676912bff1104ed8c1a83b280bcd7b29adccef5c9c"}, + {file = "aiohttp-3.14.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:aa00140699487bd435fde4342d85c94cb256b7cd3a5b9c3396c67f19922afda2"}, + {file = "aiohttp-3.14.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1c1af67559445498b502030c35c59db59966f47041ca9de5b4e707f86bd10b5f"}, + {file = "aiohttp-3.14.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d44ec478e713ee7f29b439f7eb8dc2b9d4079e11ae114d2c2ac3d5daf30516c8"}, + {file = "aiohttp-3.14.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d3b1a184a9a8f548a6b73f1e26b96b052193e4b3175ed7342aaf1151a1f00a04"}, + {file = "aiohttp-3.14.1-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:5f2504bc0322437c9a1ff6d3333ca56c7477b727c995f036b976ae17b98372c8"}, + {file = "aiohttp-3.14.1-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:73f05ea02013e02512c3bf42714f1208c57168c779cc6fe23516e4543089d0a6"}, + {file = "aiohttp-3.14.1-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:797457503c2d426bee06eef808d07b31ede30b65e054444e7de64cad0061b7af"}, + {file = "aiohttp-3.14.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b821a1f7dedf7e37450654e620038ac3b2e81e8fa6ea269337e97101978ec730"}, + {file = "aiohttp-3.14.1-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:4cd96b5ba05d67ed0cf00b5b405c8cd99586d8e3481e8ee0a831057591af7621"}, + {file = "aiohttp-3.14.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1d459b98a932296c6f0e94f87511a0b1b90a8a02c30a50e60a297619cd5a58ee"}, + {file = "aiohttp-3.14.1-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:764457a7be60825fb770a644852ff717bcbb5042f189f2bd16df61a81b3f6573"}, + {file = "aiohttp-3.14.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:f7a16ef45b081454ef844502d87a848876c490c4cb5c650c230f6ec79ed2c1e7"}, + {file = "aiohttp-3.14.1-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:2fbc3ed048b3475b9f0cbcb9978e9d2d3511acd91ead203af26ed9f0056004cf"}, + {file = "aiohttp-3.14.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:bedb0cd073cc2dc035e30aeb99444389d3cd2113afe4ef9fcd23d439f5bade85"}, + {file = "aiohttp-3.14.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:b6feea921016eb3d4e04d65fc4e9ca402d1a3801f562aef94989f54694917af3"}, + {file = "aiohttp-3.14.1-cp311-cp311-win32.whl", hash = "sha256:313701e488100074ce99850404ee36e741abf6330179fec908a1944ecf570126"}, + {file = "aiohttp-3.14.1-cp311-cp311-win_amd64.whl", hash = "sha256:03ab4530fdcb3a543a122ba4b65ac9919da9fe9f78a03d328a6e38ff962f7aa5"}, + {file = "aiohttp-3.14.1-cp311-cp311-win_arm64.whl", hash = "sha256:486f7d16ed54c39c2cbd7ca71fd8ba2b8bb7860df65bd7b6ed640bab96a38a8b"}, + {file = "aiohttp-3.14.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:d35143e27778b4bb0fb189562d7f275bff79c62ab8e98459717c0ea617ff2480"}, + {file = "aiohttp-3.14.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:bcfb80a2cc36fba2534e5e5b5264dc7ae6fcd9bf15256da3e53d2f499e6fa29d"}, + {file = "aiohttp-3.14.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:27fd7c91e51729b4f7e1577865fa6d34c9adccbc39aabe9000285b48af9f0ec2"}, + {file = "aiohttp-3.14.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:64c567bf9eaf664280116a8688f63016e6b32db2505908e2bdaca1b6438142f2"}, + {file = "aiohttp-3.14.1-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:f5e6ff2bdbb8f4cd3fbe41f99e25bbcd58e3bf9f13d3dd31a11e7917251cc77a"}, + {file = "aiohttp-3.14.1-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:2f73e01dc37122325caf079982621262f96d74823c179038a82fddfc50359264"}, + {file = "aiohttp-3.14.1-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:bb2c0c80d431c0d03f2c7dbf125150fedd4f0de17366a7ca33f7ccb822391842"}, + {file = "aiohttp-3.14.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3e6fc1a85fa7194a1a7d19f44e8609180f4a8eb5fa4c7ed8b4355f080fad235c"}, + {file = "aiohttp-3.14.1-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:686b6c0d3911ec387b444ddf5dc62fb7f7c0a7d5186a7861626496a5ab4aff95"}, + {file = "aiohttp-3.14.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:c6fa4dc7ad6f8109c70bb1499e589f76b0b792baf39f9b017eb92c8a81d0a199"}, + {file = "aiohttp-3.14.1-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:87a5eea1b2a5e21e1ebdbb33ad4165359189327e63fc4e4894693e7f821ac817"}, + {file = "aiohttp-3.14.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:1c1421eb01d4fd608d88cc8290211d177a58532b55ad94076fb349c5bf467f0a"}, + {file = "aiohttp-3.14.1-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:34b257ec41345c1e8f2df68fa908a7952f5de932723871eb633ecbbff396c9a4"}, + {file = "aiohttp-3.14.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:de538791a80e5d862addbc183f70f0158ac9b9bb872bb147f1fd2a683691e087"}, + {file = "aiohttp-3.14.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:6f71173be42d3241d428f760122febb748de0623f44308a6f120d0dd9ec572e3"}, + {file = "aiohttp-3.14.1-cp312-cp312-win32.whl", hash = "sha256:ec8dc383ee57ea3e883477dcca3f11b65d58199f1080acaf4cd6ad9a99698be4"}, + {file = "aiohttp-3.14.1-cp312-cp312-win_amd64.whl", hash = "sha256:2aa92c87868cd13674989f9ee83e5f9f7ea4237589b728048e1f0c8f6caa3271"}, + {file = "aiohttp-3.14.1-cp312-cp312-win_arm64.whl", hash = "sha256:2c840c90759922cb5e6dda94596e079a30fb5a5ba548e7e0dc00574703940847"}, + {file = "aiohttp-3.14.1-cp313-cp313-android_21_arm64_v8a.whl", hash = "sha256:b3a03285a7f9c7b016324574a6d92a1c895da6b978cb8f1deee3ac72bc6da178"}, + {file = "aiohttp-3.14.1-cp313-cp313-android_21_x86_64.whl", hash = "sha256:2a73f487ab8ef5abbb24b7aa9b73e98eaba9e9e031804ff2416f02eca315ccaf"}, + {file = "aiohttp-3.14.1-cp313-cp313-ios_13_0_arm64_iphoneos.whl", hash = "sha256:915fbb7b41b115192259f8c9ae58f3ddc444d2b5579917270211858e606a4afd"}, + {file = "aiohttp-3.14.1-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:7fb4bdf95b0561a79f259f9d28fbc109728c5ee7f27aff6391f0ca703a329abe"}, + {file = "aiohttp-3.14.1-cp313-cp313-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:1b9748363260121d2927704f5d4fc498150669ca3ae93625986ee89c8f80dcd4"}, + {file = "aiohttp-3.14.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:86a6dab78b0e43e2897a3bbe15745aa60dc5423ca437b7b0b164c069bf91b876"}, + {file = "aiohttp-3.14.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:4dfd6e47d3c44c2279907607f73a4240b88c69eb8b90da7e2441a8045dfd21da"}, + {file = "aiohttp-3.14.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:317acd9f8602858dc7d59679812c376c7f0b97bcbbf16e0d6237f54141d8a8a6"}, + {file = "aiohttp-3.14.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:bd869c427324e5cb15195793de951295710db28be7d818247f3097b4ab5d4b96"}, + {file = "aiohttp-3.14.1-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:93b032b5ec3255473c143627d21a69ac74ae12f7f33974cb587c564d11b1066f"}, + {file = "aiohttp-3.14.1-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f234b4deb12f3ad59127e037bc57c40c21e45b45282df7d3a55a0f409f595296"}, + {file = "aiohttp-3.14.1-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:9af6779bfb46abf124068327abcdf9ce95c9ef8287a3e8da76ccf2d0f16c28fa"}, + {file = "aiohttp-3.14.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:faccab372e66bc76d5731525e7f1143c922271725b9d38c9f97edcc66266b451"}, + {file = "aiohttp-3.14.1-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:f380468b09d2a81633ee863b0ec5648d364bd17bb8ecfb8c2f387f7ac1faf42c"}, + {file = "aiohttp-3.14.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:97e704dcd26271f5bda3fa07c3ce0fb76d6d3f8659f4baa1a24442cc9ba177ca"}, + {file = "aiohttp-3.14.1-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:269b76ac5394092b95bc4a098f4fc6c191c083c3bd12775d1e30e663132f6a09"}, + {file = "aiohttp-3.14.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:5c0b3e614340c889d575451696374c9d17affd54cd607ca0babed8f8c37b9397"}, + {file = "aiohttp-3.14.1-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:5663ee9257cfa1add7253a7da3035a02f31b6600ec48261585e1800a81533080"}, + {file = "aiohttp-3.14.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:603a2c834142172ffddc054067f5ec0ca65d57a0aa98a71bc81952573208e345"}, + {file = "aiohttp-3.14.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:cb21957bb8aca671c1765e32f58164cf0c50e6bf41c0bbbd16da20732ecaf588"}, + {file = "aiohttp-3.14.1-cp313-cp313-win32.whl", hash = "sha256:e509a55f681e6158c20f70f102f9cf61fb20fbc382272bc6d94b7343f2582780"}, + {file = "aiohttp-3.14.1-cp313-cp313-win_amd64.whl", hash = "sha256:1ac8531b638959718e18c2207fbfe297819875da46a740b29dfa29beba64355a"}, + {file = "aiohttp-3.14.1-cp313-cp313-win_arm64.whl", hash = "sha256:250d14af67f6b6a1a4a811049b1afa69d61d617fca6bf33149b3ab1a6dbcf7b8"}, + {file = "aiohttp-3.14.1-cp314-cp314-android_24_arm64_v8a.whl", hash = "sha256:7c106c26852ca1c2047c6b80384f17100b4e439af276f21ef3d4e2f450ae7e15"}, + {file = "aiohttp-3.14.1-cp314-cp314-android_24_x86_64.whl", hash = "sha256:20205f7f5ade7aaec9f4b500549bbc071b046453aed72f9c06dcab87896a83e8"}, + {file = "aiohttp-3.14.1-cp314-cp314-ios_13_0_arm64_iphoneos.whl", hash = "sha256:62a759436b29e677181a9e76bab8b8f689a29cb9c535f45f7c48c9c830d3f8c3"}, + {file = "aiohttp-3.14.1-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:2964cbf553df4d7a57348da44d961d871895fc1ee4e8c322b2a95612c7b17fba"}, + {file = "aiohttp-3.14.1-cp314-cp314-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:237651caadc3a59badd39319c54642b5299e9cc98a3a194310e55d5bb9f5e397"}, + {file = "aiohttp-3.14.1-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:896e12dfdbbab9d8f7e16d2b28c6769a60126fa92095d1ebf9473d02593a2448"}, + {file = "aiohttp-3.14.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:d03f281ed22579314ba00821ce20115a7c0ac430660b4cc05704a3f818b3e004"}, + {file = "aiohttp-3.14.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:07eabb979d236335fed927e137a928c9adfb7df3b9ec7aa31726f133a62be983"}, + {file = "aiohttp-3.14.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4fe1f1087cbadb280b5e1bb054a4f00d1423c74d6626c5e48400d871d34ecefe"}, + {file = "aiohttp-3.14.1-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:367a9314fdc79dab0fac96e216cb41dd73c85bdca85306ce8999118ba7e0f333"}, + {file = "aiohttp-3.14.1-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a24f677ebe83749039e7bdf862ff0bbb16818ae4193d4ef96505e269375bcce0"}, + {file = "aiohttp-3.14.1-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:c83afe0ba876be7e943d2e0ba645809ad441575d2840c895c21ee5de93b9377a"}, + {file = "aiohttp-3.14.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:634e385930fb6d2d479cf3aa66515955863b77a5e3c2b5894ca259a25b308602"}, + {file = "aiohttp-3.14.1-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:eeea07c4397bbc57719c4eed8f9c284874d4f175f9b6d57f7a1546b976d455ca"}, + {file = "aiohttp-3.14.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:335c0cc3e3545ce98dcb9cfcb836f40c3411f43fa03dab757597d80c89af8a35"}, + {file = "aiohttp-3.14.1-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:ae6be797afdef264e8a84864a85b196ca06045586481b3df8a967322fd2fa844"}, + {file = "aiohttp-3.14.1-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:8560b4d712474335d08907db7973f71912d3a9a8f1dee992ec06b5d2fe359496"}, + {file = "aiohttp-3.14.1-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:2b7edd08e0a5deb1e8564a2fcd8f4561014a3f05252334671bbf55ddd47db0e5"}, + {file = "aiohttp-3.14.1-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:b6ff7fcee63287ae57b5df3e4f5957ce032122802509246dec1a5bcc55904c95"}, + {file = "aiohttp-3.14.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:6ffbb2f4ec1ceaff7e07d43922954da26b223d188bf30658e561b98e23089444"}, + {file = "aiohttp-3.14.1-cp314-cp314-win32.whl", hash = "sha256:a9875b46d910cff3ea2f5962f9d266b465459fe634e22556ab9bd6fc1192eea0"}, + {file = "aiohttp-3.14.1-cp314-cp314-win_amd64.whl", hash = "sha256:af8b4b81a960eeaf1234971ac3cd0ba5901f3cd42eae42a46b4d089a8b492719"}, + {file = "aiohttp-3.14.1-cp314-cp314-win_arm64.whl", hash = "sha256:cf4491381b1b57425c315a56a439251b1bdac07b2275f19a8c44bc57744532ec"}, + {file = "aiohttp-3.14.1-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:819c054312f1af92947e6a55883d1b66feefab11531a7fc45e0fb9b63880b5c2"}, + {file = "aiohttp-3.14.1-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:10ee9c1753a8f706345b22496c79fbddb5be0599e0823f3738b1534058e25340"}, + {file = "aiohttp-3.14.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:1601cc37baf5750ccacae618ec2daf020769581695550e3b654a911f859c563d"}, + {file = "aiohttp-3.14.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4d6e0ac9da31c9c04c84e1c0182ad8d6df35965a85cae29cd71d089621b3ae94"}, + {file = "aiohttp-3.14.1-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:9e8f2d660c350b3d0e259c7a7e3d9b7fc8b41210cbcc3d4a7076ff0a5e5c2fdc"}, + {file = "aiohttp-3.14.1-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:4691802dda97be727f79d86818acaad7eb8e9252626a1d6b519fedbb92d5e251"}, + {file = "aiohttp-3.14.1-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:c389c482a7e9b9dc3ee2701ac46c4125297a3818875b9c305ddb603c04828fd1"}, + {file = "aiohttp-3.14.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fc0cacab7ba4e56f0f81c82a98c09bed2f39c940107b03a34b168bdf7597edd3"}, + {file = "aiohttp-3.14.1-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:979ed4717f59b8bb12e3963378fa285d93d367e15bcd66c721311826d3c44a6c"}, + {file = "aiohttp-3.14.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:38e1e7daaea81df51c952e18483f323d878499a1e2bfe564790e0f9701d6f203"}, + {file = "aiohttp-3.14.1-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:4132e72c608fe9fecb8f409113567605915b83e9bdd3ea56538d2f9cd35002f1"}, + {file = "aiohttp-3.14.1-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:eefd9cc9b6d4a2db5f00a26bc3e4f9acf71926a6ec557cd56c9c6f27c290b665"}, + {file = "aiohttp-3.14.1-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:b165790117eea512d7f3fb22f1f6dad3d55a7189571993eb015591c1401276d1"}, + {file = "aiohttp-3.14.1-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:ed09c7eb1c391271c2ed0314a51903e72a3acb653d5ccfc264cdf3ef11f8269d"}, + {file = "aiohttp-3.14.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:99abd37084b82f5830c635fddd0b4993b9742a66eb746dacf433c8590e8f9e3c"}, + {file = "aiohttp-3.14.1-cp314-cp314t-win32.whl", hash = "sha256:47ddf841cdecc810749921d25606dee45857d12d2ad5ddb7b5bd7eab12e4b365"}, + {file = "aiohttp-3.14.1-cp314-cp314t-win_amd64.whl", hash = "sha256:5e78b522b7a6e27e0b25d19b247b75039ac4c94f99823e3c9e53ae1603a9f7e9"}, + {file = "aiohttp-3.14.1-cp314-cp314t-win_arm64.whl", hash = "sha256:90d53f1609c29ccc2193945ef732428382a28f78d0456ae4d3daf0d48b74f0f6"}, + {file = "aiohttp-3.14.1.tar.gz", hash = "sha256:307f2cff90a764d329e77040603fa032db89c5c24fdad50c4c15334cba744035"}, +] + +[package.dependencies] +aiohappyeyeballs = ">=2.5.0" +aiosignal = ">=1.4.0" +async-timeout = {version = ">=4.0,<6.0", markers = "python_version < \"3.11\""} +attrs = ">=17.3.0" +frozenlist = ">=1.1.1" +multidict = ">=4.5,<7.0" +propcache = ">=0.2.0" +typing_extensions = {version = ">=4.4", markers = "python_version < \"3.13\""} +yarl = ">=1.17.0,<2.0" + +[package.extras] +speedups = ["Brotli (>=1.2)", "aiodns (>=3.3.0)", "backports.zstd", "brotlicffi (>=1.2)"] + +[[package]] +name = "aiosignal" +version = "1.4.0" +description = "aiosignal: a list of registered asynchronous callbacks" +optional = true +python-versions = ">=3.9" +files = [ + {file = "aiosignal-1.4.0-py3-none-any.whl", hash = "sha256:053243f8b92b990551949e63930a839ff0cf0b0ebbe0597b0f3fb19e1a0fe82e"}, + {file = "aiosignal-1.4.0.tar.gz", hash = "sha256:f47eecd9468083c2029cc99945502cb7708b082c232f9aca65da147157b251c7"}, +] + +[package.dependencies] +frozenlist = ">=1.1.0" +typing-extensions = {version = ">=4.2", markers = "python_version < \"3.13\""} [[package]] name = "annotated-types" @@ -11,40 +179,67 @@ files = [ {file = "annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89"}, ] -[package.dependencies] -typing-extensions = {version = ">=4.0.0", markers = "python_version < \"3.9\""} - [[package]] name = "anyio" -version = "4.5.2" -description = "High level compatibility layer for multiple asynchronous event loop implementations" +version = "4.14.1" +description = "High-level concurrency and networking framework on top of asyncio or Trio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "anyio-4.5.2-py3-none-any.whl", hash = "sha256:c011ee36bc1e8ba40e5a81cb9df91925c218fe9b778554e0b56a21e1b5d4716f"}, - {file = "anyio-4.5.2.tar.gz", hash = "sha256:23009af4ed04ce05991845451e11ef02fc7c5ed29179ac9a420e5ad0ac7ddc5b"}, + {file = "anyio-4.14.1-py3-none-any.whl", hash = "sha256:4e5533c5b8ff0a24f5d7a176cbe6877129cd183893f66b537f8f227d10527d72"}, + {file = "anyio-4.14.1.tar.gz", hash = "sha256:8d648a3544c1a700e3ff78615cd679e4c5c3f149904287e73687b2596963629e"}, ] [package.dependencies] exceptiongroup = {version = ">=1.0.2", markers = "python_version < \"3.11\""} idna = ">=2.8" -sniffio = ">=1.1" -typing-extensions = {version = ">=4.1", markers = "python_version < \"3.11\""} +typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] -doc = ["Sphinx (>=7.4,<8.0)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme"] -test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "truststore (>=0.9.1)", "uvloop (>=0.21.0b1)"] -trio = ["trio (>=0.26.1)"] +trio = ["trio (>=0.32.0)"] + +[[package]] +name = "async-timeout" +version = "5.0.1" +description = "Timeout context manager for asyncio programs" +optional = true +python-versions = ">=3.8" +files = [ + {file = "async_timeout-5.0.1-py3-none-any.whl", hash = "sha256:39e3809566ff85354557ec2398b55e096c8364bacac9405a7a1fa429e77fe76c"}, + {file = "async_timeout-5.0.1.tar.gz", hash = "sha256:d9321a7a3d5a6a5e187e824d2fa0793ce379a202935782d555d6e9d2735677d3"}, +] + +[[package]] +name = "attrs" +version = "26.1.0" +description = "Classes Without Boilerplate" +optional = true +python-versions = ">=3.9" +files = [ + {file = "attrs-26.1.0-py3-none-any.whl", hash = "sha256:c647aa4a12dfbad9333ca4e71fe62ddc36f4e63b2d260a37a8b83d2f043ac309"}, + {file = "attrs-26.1.0.tar.gz", hash = "sha256:d03ceb89cb322a8fd706d4fb91940737b6642aa36998fe130a9bc96c985eff32"}, +] + +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] [[package]] name = "certifi" -version = "2024.8.30" +version = "2026.6.17" description = "Python package for providing Mozilla's CA Bundle." optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" files = [ - {file = "certifi-2024.8.30-py3-none-any.whl", hash = "sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8"}, - {file = "certifi-2024.8.30.tar.gz", hash = "sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9"}, + {file = "certifi-2026.6.17-py3-none-any.whl", hash = "sha256:2227dcbaafe0d2f59279d1762ddddc37783ed4354594f194ffc31d20f41fc3db"}, + {file = "certifi-2026.6.17.tar.gz", hash = "sha256:024c88eeec92ca068db80f02b8b07c9cef7b9fe261d1d535abfd5abd6f6af432"}, ] [[package]] @@ -60,43 +255,199 @@ files = [ [[package]] name = "exceptiongroup" -version = "1.2.2" +version = "1.3.1" description = "Backport of PEP 654 (exception groups)" optional = false python-versions = ">=3.7" files = [ - {file = "exceptiongroup-1.2.2-py3-none-any.whl", hash = "sha256:3111b9d131c238bec2f8f516e123e14ba243563fb135d3fe885990585aa7795b"}, - {file = "exceptiongroup-1.2.2.tar.gz", hash = "sha256:47c2edf7c6738fafb49fd34290706d1a1a2f4d1c6df275526b62cbb4aa5393cc"}, + {file = "exceptiongroup-1.3.1-py3-none-any.whl", hash = "sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598"}, + {file = "exceptiongroup-1.3.1.tar.gz", hash = "sha256:8b412432c6055b0b7d14c310000ae93352ed6754f70fa8f7c34141f91c4e3219"}, ] +[package.dependencies] +typing-extensions = {version = ">=4.6.0", markers = "python_version < \"3.13\""} + [package.extras] test = ["pytest (>=6)"] +[[package]] +name = "execnet" +version = "2.1.2" +description = "execnet: rapid multi-Python deployment" +optional = false +python-versions = ">=3.8" +files = [ + {file = "execnet-2.1.2-py3-none-any.whl", hash = "sha256:67fba928dd5a544b783f6056f449e5e3931a5c378b128bc18501f7ea79e296ec"}, + {file = "execnet-2.1.2.tar.gz", hash = "sha256:63d83bfdd9a23e35b9c6a3261412324f964c2ec8dcd8d3c6916ee9373e0befcd"}, +] + +[package.extras] +testing = ["hatch", "pre-commit", "pytest", "tox"] + +[[package]] +name = "frozenlist" +version = "1.8.0" +description = "A list-like structure which implements collections.abc.MutableSequence" +optional = true +python-versions = ">=3.9" +files = [ + {file = "frozenlist-1.8.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:b37f6d31b3dcea7deb5e9696e529a6aa4a898adc33db82da12e4c60a7c4d2011"}, + {file = "frozenlist-1.8.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ef2b7b394f208233e471abc541cc6991f907ffd47dc72584acee3147899d6565"}, + {file = "frozenlist-1.8.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a88f062f072d1589b7b46e951698950e7da00442fc1cacbe17e19e025dc327ad"}, + {file = "frozenlist-1.8.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:f57fb59d9f385710aa7060e89410aeb5058b99e62f4d16b08b91986b9a2140c2"}, + {file = "frozenlist-1.8.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:799345ab092bee59f01a915620b5d014698547afd011e691a208637312db9186"}, + {file = "frozenlist-1.8.0-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c23c3ff005322a6e16f71bf8692fcf4d5a304aaafe1e262c98c6d4adc7be863e"}, + {file = "frozenlist-1.8.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:8a76ea0f0b9dfa06f254ee06053d93a600865b3274358ca48a352ce4f0798450"}, + {file = "frozenlist-1.8.0-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:c7366fe1418a6133d5aa824ee53d406550110984de7637d65a178010f759c6ef"}, + {file = "frozenlist-1.8.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:13d23a45c4cebade99340c4165bd90eeb4a56c6d8a9d8aa49568cac19a6d0dc4"}, + {file = "frozenlist-1.8.0-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:e4a3408834f65da56c83528fb52ce7911484f0d1eaf7b761fc66001db1646eff"}, + {file = "frozenlist-1.8.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:42145cd2748ca39f32801dad54aeea10039da6f86e303659db90db1c4b614c8c"}, + {file = "frozenlist-1.8.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:e2de870d16a7a53901e41b64ffdf26f2fbb8917b3e6ebf398098d72c5b20bd7f"}, + {file = "frozenlist-1.8.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:20e63c9493d33ee48536600d1a5c95eefc870cd71e7ab037763d1fbb89cc51e7"}, + {file = "frozenlist-1.8.0-cp310-cp310-win32.whl", hash = "sha256:adbeebaebae3526afc3c96fad434367cafbfd1b25d72369a9e5858453b1bb71a"}, + {file = "frozenlist-1.8.0-cp310-cp310-win_amd64.whl", hash = "sha256:667c3777ca571e5dbeb76f331562ff98b957431df140b54c85fd4d52eea8d8f6"}, + {file = "frozenlist-1.8.0-cp310-cp310-win_arm64.whl", hash = "sha256:80f85f0a7cc86e7a54c46d99c9e1318ff01f4687c172ede30fd52d19d1da1c8e"}, + {file = "frozenlist-1.8.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:09474e9831bc2b2199fad6da3c14c7b0fbdd377cce9d3d77131be28906cb7d84"}, + {file = "frozenlist-1.8.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:17c883ab0ab67200b5f964d2b9ed6b00971917d5d8a92df149dc2c9779208ee9"}, + {file = "frozenlist-1.8.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:fa47e444b8ba08fffd1c18e8cdb9a75db1b6a27f17507522834ad13ed5922b93"}, + {file = "frozenlist-1.8.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:2552f44204b744fba866e573be4c1f9048d6a324dfe14475103fd51613eb1d1f"}, + {file = "frozenlist-1.8.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:957e7c38f250991e48a9a73e6423db1bb9dd14e722a10f6b8bb8e16a0f55f695"}, + {file = "frozenlist-1.8.0-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:8585e3bb2cdea02fc88ffa245069c36555557ad3609e83be0ec71f54fd4abb52"}, + {file = "frozenlist-1.8.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:edee74874ce20a373d62dc28b0b18b93f645633c2943fd90ee9d898550770581"}, + {file = "frozenlist-1.8.0-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:c9a63152fe95756b85f31186bddf42e4c02c6321207fd6601a1c89ebac4fe567"}, + {file = "frozenlist-1.8.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:b6db2185db9be0a04fecf2f241c70b63b1a242e2805be291855078f2b404dd6b"}, + {file = "frozenlist-1.8.0-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:f4be2e3d8bc8aabd566f8d5b8ba7ecc09249d74ba3c9ed52e54dc23a293f0b92"}, + {file = "frozenlist-1.8.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:c8d1634419f39ea6f5c427ea2f90ca85126b54b50837f31497f3bf38266e853d"}, + {file = "frozenlist-1.8.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:1a7fa382a4a223773ed64242dbe1c9c326ec09457e6b8428efb4118c685c3dfd"}, + {file = "frozenlist-1.8.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:11847b53d722050808926e785df837353bd4d75f1d494377e59b23594d834967"}, + {file = "frozenlist-1.8.0-cp311-cp311-win32.whl", hash = "sha256:27c6e8077956cf73eadd514be8fb04d77fc946a7fe9f7fe167648b0b9085cc25"}, + {file = "frozenlist-1.8.0-cp311-cp311-win_amd64.whl", hash = "sha256:ac913f8403b36a2c8610bbfd25b8013488533e71e62b4b4adce9c86c8cea905b"}, + {file = "frozenlist-1.8.0-cp311-cp311-win_arm64.whl", hash = "sha256:d4d3214a0f8394edfa3e303136d0575eece0745ff2b47bd2cb2e66dd92d4351a"}, + {file = "frozenlist-1.8.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:78f7b9e5d6f2fdb88cdde9440dc147259b62b9d3b019924def9f6478be254ac1"}, + {file = "frozenlist-1.8.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:229bf37d2e4acdaf808fd3f06e854a4a7a3661e871b10dc1f8f1896a3b05f18b"}, + {file = "frozenlist-1.8.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f833670942247a14eafbb675458b4e61c82e002a148f49e68257b79296e865c4"}, + {file = "frozenlist-1.8.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:494a5952b1c597ba44e0e78113a7266e656b9794eec897b19ead706bd7074383"}, + {file = "frozenlist-1.8.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:96f423a119f4777a4a056b66ce11527366a8bb92f54e541ade21f2374433f6d4"}, + {file = "frozenlist-1.8.0-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:3462dd9475af2025c31cc61be6652dfa25cbfb56cbbf52f4ccfe029f38decaf8"}, + {file = "frozenlist-1.8.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c4c800524c9cd9bac5166cd6f55285957fcfc907db323e193f2afcd4d9abd69b"}, + {file = "frozenlist-1.8.0-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d6a5df73acd3399d893dafc71663ad22534b5aa4f94e8a2fabfe856c3c1b6a52"}, + {file = "frozenlist-1.8.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:405e8fe955c2280ce66428b3ca55e12b3c4e9c336fb2103a4937e891c69a4a29"}, + {file = "frozenlist-1.8.0-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:908bd3f6439f2fef9e85031b59fd4f1297af54415fb60e4254a95f75b3cab3f3"}, + {file = "frozenlist-1.8.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:294e487f9ec720bd8ffcebc99d575f7eff3568a08a253d1ee1a0378754b74143"}, + {file = "frozenlist-1.8.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:74c51543498289c0c43656701be6b077f4b265868fa7f8a8859c197006efb608"}, + {file = "frozenlist-1.8.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:776f352e8329135506a1d6bf16ac3f87bc25b28e765949282dcc627af36123aa"}, + {file = "frozenlist-1.8.0-cp312-cp312-win32.whl", hash = "sha256:433403ae80709741ce34038da08511d4a77062aa924baf411ef73d1146e74faf"}, + {file = "frozenlist-1.8.0-cp312-cp312-win_amd64.whl", hash = "sha256:34187385b08f866104f0c0617404c8eb08165ab1272e884abc89c112e9c00746"}, + {file = "frozenlist-1.8.0-cp312-cp312-win_arm64.whl", hash = "sha256:fe3c58d2f5db5fbd18c2987cba06d51b0529f52bc3a6cdc33d3f4eab725104bd"}, + {file = "frozenlist-1.8.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:8d92f1a84bb12d9e56f818b3a746f3efba93c1b63c8387a73dde655e1e42282a"}, + {file = "frozenlist-1.8.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:96153e77a591c8adc2ee805756c61f59fef4cf4073a9275ee86fe8cba41241f7"}, + {file = "frozenlist-1.8.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f21f00a91358803399890ab167098c131ec2ddd5f8f5fd5fe9c9f2c6fcd91e40"}, + {file = "frozenlist-1.8.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:fb30f9626572a76dfe4293c7194a09fb1fe93ba94c7d4f720dfae3b646b45027"}, + {file = "frozenlist-1.8.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:eaa352d7047a31d87dafcacbabe89df0aa506abb5b1b85a2fb91bc3faa02d822"}, + {file = "frozenlist-1.8.0-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:03ae967b4e297f58f8c774c7eabcce57fe3c2434817d4385c50661845a058121"}, + {file = "frozenlist-1.8.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f6292f1de555ffcc675941d65fffffb0a5bcd992905015f85d0592201793e0e5"}, + {file = "frozenlist-1.8.0-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:29548f9b5b5e3460ce7378144c3010363d8035cea44bc0bf02d57f5a685e084e"}, + {file = "frozenlist-1.8.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ec3cc8c5d4084591b4237c0a272cc4f50a5b03396a47d9caaf76f5d7b38a4f11"}, + {file = "frozenlist-1.8.0-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:517279f58009d0b1f2e7c1b130b377a349405da3f7621ed6bfae50b10adf20c1"}, + {file = "frozenlist-1.8.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:db1e72ede2d0d7ccb213f218df6a078a9c09a7de257c2fe8fcef16d5925230b1"}, + {file = "frozenlist-1.8.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:b4dec9482a65c54a5044486847b8a66bf10c9cb4926d42927ec4e8fd5db7fed8"}, + {file = "frozenlist-1.8.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:21900c48ae04d13d416f0e1e0c4d81f7931f73a9dfa0b7a8746fb2fe7dd970ed"}, + {file = "frozenlist-1.8.0-cp313-cp313-win32.whl", hash = "sha256:8b7b94a067d1c504ee0b16def57ad5738701e4ba10cec90529f13fa03c833496"}, + {file = "frozenlist-1.8.0-cp313-cp313-win_amd64.whl", hash = "sha256:878be833caa6a3821caf85eb39c5ba92d28e85df26d57afb06b35b2efd937231"}, + {file = "frozenlist-1.8.0-cp313-cp313-win_arm64.whl", hash = "sha256:44389d135b3ff43ba8cc89ff7f51f5a0bb6b63d829c8300f79a2fe4fe61bcc62"}, + {file = "frozenlist-1.8.0-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:e25ac20a2ef37e91c1b39938b591457666a0fa835c7783c3a8f33ea42870db94"}, + {file = "frozenlist-1.8.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:07cdca25a91a4386d2e76ad992916a85038a9b97561bf7a3fd12d5d9ce31870c"}, + {file = "frozenlist-1.8.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:4e0c11f2cc6717e0a741f84a527c52616140741cd812a50422f83dc31749fb52"}, + {file = "frozenlist-1.8.0-cp313-cp313t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:b3210649ee28062ea6099cfda39e147fa1bc039583c8ee4481cb7811e2448c51"}, + {file = "frozenlist-1.8.0-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:581ef5194c48035a7de2aefc72ac6539823bb71508189e5de01d60c9dcd5fa65"}, + {file = "frozenlist-1.8.0-cp313-cp313t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:3ef2d026f16a2b1866e1d86fc4e1291e1ed8a387b2c333809419a2f8b3a77b82"}, + {file = "frozenlist-1.8.0-cp313-cp313t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:5500ef82073f599ac84d888e3a8c1f77ac831183244bfd7f11eaa0289fb30714"}, + {file = "frozenlist-1.8.0-cp313-cp313t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:50066c3997d0091c411a66e710f4e11752251e6d2d73d70d8d5d4c76442a199d"}, + {file = "frozenlist-1.8.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:5c1c8e78426e59b3f8005e9b19f6ff46e5845895adbde20ece9218319eca6506"}, + {file = "frozenlist-1.8.0-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:eefdba20de0d938cec6a89bd4d70f346a03108a19b9df4248d3cf0d88f1b0f51"}, + {file = "frozenlist-1.8.0-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:cf253e0e1c3ceb4aaff6df637ce033ff6535fb8c70a764a8f46aafd3d6ab798e"}, + {file = "frozenlist-1.8.0-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:032efa2674356903cd0261c4317a561a6850f3ac864a63fc1583147fb05a79b0"}, + {file = "frozenlist-1.8.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:6da155091429aeba16851ecb10a9104a108bcd32f6c1642867eadaee401c1c41"}, + {file = "frozenlist-1.8.0-cp313-cp313t-win32.whl", hash = "sha256:0f96534f8bfebc1a394209427d0f8a63d343c9779cda6fc25e8e121b5fd8555b"}, + {file = "frozenlist-1.8.0-cp313-cp313t-win_amd64.whl", hash = "sha256:5d63a068f978fc69421fb0e6eb91a9603187527c86b7cd3f534a5b77a592b888"}, + {file = "frozenlist-1.8.0-cp313-cp313t-win_arm64.whl", hash = "sha256:bf0a7e10b077bf5fb9380ad3ae8ce20ef919a6ad93b4552896419ac7e1d8e042"}, + {file = "frozenlist-1.8.0-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:cee686f1f4cadeb2136007ddedd0aaf928ab95216e7691c63e50a8ec066336d0"}, + {file = "frozenlist-1.8.0-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:119fb2a1bd47307e899c2fac7f28e85b9a543864df47aa7ec9d3c1b4545f096f"}, + {file = "frozenlist-1.8.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:4970ece02dbc8c3a92fcc5228e36a3e933a01a999f7094ff7c23fbd2beeaa67c"}, + {file = "frozenlist-1.8.0-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:cba69cb73723c3f329622e34bdbf5ce1f80c21c290ff04256cff1cd3c2036ed2"}, + {file = "frozenlist-1.8.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:778a11b15673f6f1df23d9586f83c4846c471a8af693a22e066508b77d201ec8"}, + {file = "frozenlist-1.8.0-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:0325024fe97f94c41c08872db482cf8ac4800d80e79222c6b0b7b162d5b13686"}, + {file = "frozenlist-1.8.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:97260ff46b207a82a7567b581ab4190bd4dfa09f4db8a8b49d1a958f6aa4940e"}, + {file = "frozenlist-1.8.0-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:54b2077180eb7f83dd52c40b2750d0a9f175e06a42e3213ce047219de902717a"}, + {file = "frozenlist-1.8.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:2f05983daecab868a31e1da44462873306d3cbfd76d1f0b5b69c473d21dbb128"}, + {file = "frozenlist-1.8.0-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:33f48f51a446114bc5d251fb2954ab0164d5be02ad3382abcbfe07e2531d650f"}, + {file = "frozenlist-1.8.0-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:154e55ec0655291b5dd1b8731c637ecdb50975a2ae70c606d100750a540082f7"}, + {file = "frozenlist-1.8.0-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:4314debad13beb564b708b4a496020e5306c7333fa9a3ab90374169a20ffab30"}, + {file = "frozenlist-1.8.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:073f8bf8becba60aa931eb3bc420b217bb7d5b8f4750e6f8b3be7f3da85d38b7"}, + {file = "frozenlist-1.8.0-cp314-cp314-win32.whl", hash = "sha256:bac9c42ba2ac65ddc115d930c78d24ab8d4f465fd3fc473cdedfccadb9429806"}, + {file = "frozenlist-1.8.0-cp314-cp314-win_amd64.whl", hash = "sha256:3e0761f4d1a44f1d1a47996511752cf3dcec5bbdd9cc2b4fe595caf97754b7a0"}, + {file = "frozenlist-1.8.0-cp314-cp314-win_arm64.whl", hash = "sha256:d1eaff1d00c7751b7c6662e9c5ba6eb2c17a2306ba5e2a37f24ddf3cc953402b"}, + {file = "frozenlist-1.8.0-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:d3bb933317c52d7ea5004a1c442eef86f426886fba134ef8cf4226ea6ee1821d"}, + {file = "frozenlist-1.8.0-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:8009897cdef112072f93a0efdce29cd819e717fd2f649ee3016efd3cd885a7ed"}, + {file = "frozenlist-1.8.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:2c5dcbbc55383e5883246d11fd179782a9d07a986c40f49abe89ddf865913930"}, + {file = "frozenlist-1.8.0-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:39ecbc32f1390387d2aa4f5a995e465e9e2f79ba3adcac92d68e3e0afae6657c"}, + {file = "frozenlist-1.8.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:92db2bf818d5cc8d9c1f1fc56b897662e24ea5adb36ad1f1d82875bd64e03c24"}, + {file = "frozenlist-1.8.0-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:2dc43a022e555de94c3b68a4ef0b11c4f747d12c024a520c7101709a2144fb37"}, + {file = "frozenlist-1.8.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:cb89a7f2de3602cfed448095bab3f178399646ab7c61454315089787df07733a"}, + {file = "frozenlist-1.8.0-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:33139dc858c580ea50e7e60a1b0ea003efa1fd42e6ec7fdbad78fff65fad2fd2"}, + {file = "frozenlist-1.8.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:168c0969a329b416119507ba30b9ea13688fafffac1b7822802537569a1cb0ef"}, + {file = "frozenlist-1.8.0-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:28bd570e8e189d7f7b001966435f9dac6718324b5be2990ac496cf1ea9ddb7fe"}, + {file = "frozenlist-1.8.0-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:b2a095d45c5d46e5e79ba1e5b9cb787f541a8dee0433836cea4b96a2c439dcd8"}, + {file = "frozenlist-1.8.0-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:eab8145831a0d56ec9c4139b6c3e594c7a83c2c8be25d5bcf2d86136a532287a"}, + {file = "frozenlist-1.8.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:974b28cf63cc99dfb2188d8d222bc6843656188164848c4f679e63dae4b0708e"}, + {file = "frozenlist-1.8.0-cp314-cp314t-win32.whl", hash = "sha256:342c97bf697ac5480c0a7ec73cd700ecfa5a8a40ac923bd035484616efecc2df"}, + {file = "frozenlist-1.8.0-cp314-cp314t-win_amd64.whl", hash = "sha256:06be8f67f39c8b1dc671f5d83aaefd3358ae5cdcf8314552c57e7ed3e6475bdd"}, + {file = "frozenlist-1.8.0-cp314-cp314t-win_arm64.whl", hash = "sha256:102e6314ca4da683dca92e3b1355490fed5f313b768500084fbe6371fddfdb79"}, + {file = "frozenlist-1.8.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:d8b7138e5cd0647e4523d6685b0eac5d4be9a184ae9634492f25c6eb38c12a47"}, + {file = "frozenlist-1.8.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:a6483e309ca809f1efd154b4d37dc6d9f61037d6c6a81c2dc7a15cb22c8c5dca"}, + {file = "frozenlist-1.8.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:1b9290cf81e95e93fdf90548ce9d3c1211cf574b8e3f4b3b7cb0537cf2227068"}, + {file = "frozenlist-1.8.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:59a6a5876ca59d1b63af8cd5e7ffffb024c3dc1e9cf9301b21a2e76286505c95"}, + {file = "frozenlist-1.8.0-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6dc4126390929823e2d2d9dc79ab4046ed74680360fc5f38b585c12c66cdf459"}, + {file = "frozenlist-1.8.0-cp39-cp39-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:332db6b2563333c5671fecacd085141b5800cb866be16d5e3eb15a2086476675"}, + {file = "frozenlist-1.8.0-cp39-cp39-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:9ff15928d62a0b80bb875655c39bf517938c7d589554cbd2669be42d97c2cb61"}, + {file = "frozenlist-1.8.0-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:7bf6cdf8e07c8151fba6fe85735441240ec7f619f935a5205953d58009aef8c6"}, + {file = "frozenlist-1.8.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:48e6d3f4ec5c7273dfe83ff27c91083c6c9065af655dc2684d2c200c94308bb5"}, + {file = "frozenlist-1.8.0-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:1a7607e17ad33361677adcd1443edf6f5da0ce5e5377b798fba20fae194825f3"}, + {file = "frozenlist-1.8.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:5a3a935c3a4e89c733303a2d5a7c257ea44af3a56c8202df486b7f5de40f37e1"}, + {file = "frozenlist-1.8.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:940d4a017dbfed9daf46a3b086e1d2167e7012ee297fef9e1c545c4d022f5178"}, + {file = "frozenlist-1.8.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:b9be22a69a014bc47e78072d0ecae716f5eb56c15238acca0f43d6eb8e4a5bda"}, + {file = "frozenlist-1.8.0-cp39-cp39-win32.whl", hash = "sha256:1aa77cb5697069af47472e39612976ed05343ff2e84a3dcf15437b232cbfd087"}, + {file = "frozenlist-1.8.0-cp39-cp39-win_amd64.whl", hash = "sha256:7398c222d1d405e796970320036b1b563892b65809d9e5261487bb2c7f7b5c6a"}, + {file = "frozenlist-1.8.0-cp39-cp39-win_arm64.whl", hash = "sha256:b4f3b365f31c6cd4af24545ca0a244a53688cad8834e32f56831c4923b50a103"}, + {file = "frozenlist-1.8.0-py3-none-any.whl", hash = "sha256:0c18a16eab41e82c295618a77502e17b195883241c563b00f0aa5106fc4eaa0d"}, + {file = "frozenlist-1.8.0.tar.gz", hash = "sha256:3ede829ed8d842f6cd48fc7081d7a41001a56f1f38603f9d49bf3020d59a31ad"}, +] + [[package]] name = "h11" -version = "0.14.0" +version = "0.16.0" description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "h11-0.14.0-py3-none-any.whl", hash = "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761"}, - {file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"}, + {file = "h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86"}, + {file = "h11-0.16.0.tar.gz", hash = "sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1"}, ] [[package]] name = "httpcore" -version = "1.0.6" +version = "1.0.9" description = "A minimal low-level HTTP client." optional = false python-versions = ">=3.8" files = [ - {file = "httpcore-1.0.6-py3-none-any.whl", hash = "sha256:27b59625743b85577a8c0e10e55b50b5368a4f2cfe8cc7bcfa9cf00829c2682f"}, - {file = "httpcore-1.0.6.tar.gz", hash = "sha256:73f6dbd6eb8c21bbf7ef8efad555481853f5f6acdeaff1edb0694289269ee17f"}, + {file = "httpcore-1.0.9-py3-none-any.whl", hash = "sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55"}, + {file = "httpcore-1.0.9.tar.gz", hash = "sha256:6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8"}, ] [package.dependencies] certifi = "*" -h11 = ">=0.13,<0.15" +h11 = ">=0.16" [package.extras] asyncio = ["anyio (>=4.0,<5.0)"] @@ -106,13 +457,13 @@ trio = ["trio (>=0.22.0,<1.0)"] [[package]] name = "httpx" -version = "0.27.2" +version = "0.28.1" description = "The next generation HTTP client." optional = false python-versions = ">=3.8" files = [ - {file = "httpx-0.27.2-py3-none-any.whl", hash = "sha256:7bb2708e112d8fdd7829cd4243970f0c223274051cb35ee80c03301ee29a3df0"}, - {file = "httpx-0.27.2.tar.gz", hash = "sha256:f7c2be1d2f3c3c3160d441802406b206c2b76f5947b11115e6df10c6c65e66c2"}, + {file = "httpx-0.28.1-py3-none-any.whl", hash = "sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad"}, + {file = "httpx-0.28.1.tar.gz", hash = "sha256:75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc"}, ] [package.dependencies] @@ -120,7 +471,6 @@ anyio = "*" certifi = "*" httpcore = "==1.*" idna = "*" -sniffio = "*" [package.extras] brotli = ["brotli", "brotlicffi"] @@ -129,132 +479,440 @@ http2 = ["h2 (>=3,<5)"] socks = ["socksio (==1.*)"] zstd = ["zstandard (>=0.18.0)"] +[[package]] +name = "httpx-aiohttp" +version = "0.1.8" +description = "Aiohttp transport for HTTPX" +optional = true +python-versions = ">=3.8" +files = [ + {file = "httpx_aiohttp-0.1.8-py3-none-any.whl", hash = "sha256:b7bd958d1331f3759a38a0ba22ad29832cb63ca69498c17735228055bf78fa7e"}, + {file = "httpx_aiohttp-0.1.8.tar.gz", hash = "sha256:756c5e74cdb568c3248ba63fe82bfe8bbe64b928728720f7eaac64b3cf46f308"}, +] + +[package.dependencies] +aiohttp = ">=3.10.0,<4" +httpx = ">=0.27.0" + [[package]] name = "idna" -version = "3.10" +version = "3.18" description = "Internationalized Domain Names in Applications (IDNA)" optional = false -python-versions = ">=3.6" +python-versions = ">=3.9" files = [ - {file = "idna-3.10-py3-none-any.whl", hash = "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3"}, - {file = "idna-3.10.tar.gz", hash = "sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9"}, + {file = "idna-3.18-py3-none-any.whl", hash = "sha256:7f952cbe720b688055e3f87de14f5c3e5fdaa8bc3928985c4077ca689de849a2"}, + {file = "idna-3.18.tar.gz", hash = "sha256:ffb385a7e039654cef1ab9ef32c6fafe283c0c0467bba1d9029738ce4a14a848"}, ] [package.extras] -all = ["flake8 (>=7.1.1)", "mypy (>=1.11.2)", "pytest (>=8.3.2)", "ruff (>=0.6.2)"] +all = ["mypy (>=1.11.2)", "pytest (>=8.3.2)", "ruff (>=0.6.2)"] [[package]] name = "iniconfig" -version = "2.0.0" +version = "2.3.0" description = "brain-dead simple config-ini parsing" optional = false -python-versions = ">=3.7" +python-versions = ">=3.10" +files = [ + {file = "iniconfig-2.3.0-py3-none-any.whl", hash = "sha256:f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12"}, + {file = "iniconfig-2.3.0.tar.gz", hash = "sha256:c76315c77db068650d49c5b56314774a7804df16fee4402c1f19d6d15d8c4730"}, +] + +[[package]] +name = "multidict" +version = "6.7.1" +description = "multidict implementation" +optional = true +python-versions = ">=3.9" files = [ - {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, - {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, + {file = "multidict-6.7.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:c93c3db7ea657dd4637d57e74ab73de31bccefe144d3d4ce370052035bc85fb5"}, + {file = "multidict-6.7.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:974e72a2474600827abaeda71af0c53d9ebbc3c2eb7da37b37d7829ae31232d8"}, + {file = "multidict-6.7.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:cdea2e7b2456cfb6694fb113066fd0ec7ea4d67e3a35e1f4cbeea0b448bf5872"}, + {file = "multidict-6.7.1-cp310-cp310-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:17207077e29342fdc2c9a82e4b306f1127bf1ea91f8b71e02d4798a70bb99991"}, + {file = "multidict-6.7.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d4f49cb5661344764e4c7c7973e92a47a59b8fc19b6523649ec9dc4960e58a03"}, + {file = "multidict-6.7.1-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:a9fc4caa29e2e6ae408d1c450ac8bf19892c5fca83ee634ecd88a53332c59981"}, + {file = "multidict-6.7.1-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c5f0c21549ab432b57dcc82130f388d84ad8179824cc3f223d5e7cfbfd4143f6"}, + {file = "multidict-6.7.1-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:7dfb78d966b2c906ae1d28ccf6e6712a3cd04407ee5088cd276fe8cb42186190"}, + {file = "multidict-6.7.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9b0d9b91d1aa44db9c1f1ecd0d9d2ae610b2f4f856448664e01a3b35899f3f92"}, + {file = "multidict-6.7.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:dd96c01a9dcd4889dcfcf9eb5544ca0c77603f239e3ffab0524ec17aea9a93ee"}, + {file = "multidict-6.7.1-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:067343c68cd6612d375710f895337b3a98a033c94f14b9a99eff902f205424e2"}, + {file = "multidict-6.7.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:5884a04f4ff56c6120f6ccf703bdeb8b5079d808ba604d4d53aec0d55dc33568"}, + {file = "multidict-6.7.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:8affcf1c98b82bc901702eb73b6947a1bfa170823c153fe8a47b5f5f02e48e40"}, + {file = "multidict-6.7.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:0d17522c37d03e85c8098ec8431636309b2682cf12e58f4dbc76121fb50e4962"}, + {file = "multidict-6.7.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:24c0cf81544ca5e17cfcb6e482e7a82cd475925242b308b890c9452a074d4505"}, + {file = "multidict-6.7.1-cp310-cp310-win32.whl", hash = "sha256:d82dd730a95e6643802f4454b8fdecdf08667881a9c5670db85bc5a56693f122"}, + {file = "multidict-6.7.1-cp310-cp310-win_amd64.whl", hash = "sha256:cf37cbe5ced48d417ba045aca1b21bafca67489452debcde94778a576666a1df"}, + {file = "multidict-6.7.1-cp310-cp310-win_arm64.whl", hash = "sha256:59bc83d3f66b41dac1e7460aac1d196edc70c9ba3094965c467715a70ecb46db"}, + {file = "multidict-6.7.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:7ff981b266af91d7b4b3793ca3382e53229088d193a85dfad6f5f4c27fc73e5d"}, + {file = "multidict-6.7.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:844c5bca0b5444adb44a623fb0a1310c2f4cd41f402126bb269cd44c9b3f3e1e"}, + {file = "multidict-6.7.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f2a0a924d4c2e9afcd7ec64f9de35fcd96915149b2216e1cb2c10a56df483855"}, + {file = "multidict-6.7.1-cp311-cp311-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:8be1802715a8e892c784c0197c2ace276ea52702a0ede98b6310c8f255a5afb3"}, + {file = "multidict-6.7.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2e2d2ed645ea29f31c4c7ea1552fcfd7cb7ba656e1eafd4134a6620c9f5fdd9e"}, + {file = "multidict-6.7.1-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:95922cee9a778659e91db6497596435777bd25ed116701a4c034f8e46544955a"}, + {file = "multidict-6.7.1-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:6b83cabdc375ffaaa15edd97eb7c0c672ad788e2687004990074d7d6c9b140c8"}, + {file = "multidict-6.7.1-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:38fb49540705369bab8484db0689d86c0a33a0a9f2c1b197f506b71b4b6c19b0"}, + {file = "multidict-6.7.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:439cbebd499f92e9aa6793016a8acaa161dfa749ae86d20960189f5398a19144"}, + {file = "multidict-6.7.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:6d3bc717b6fe763b8be3f2bee2701d3c8eb1b2a8ae9f60910f1b2860c82b6c49"}, + {file = "multidict-6.7.1-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:619e5a1ac57986dbfec9f0b301d865dddf763696435e2962f6d9cf2fdff2bb71"}, + {file = "multidict-6.7.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:0b38ebffd9be37c1170d33bc0f36f4f262e0a09bc1aac1c34c7aa51a7293f0b3"}, + {file = "multidict-6.7.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:10ae39c9cfe6adedcdb764f5e8411d4a92b055e35573a2eaa88d3323289ef93c"}, + {file = "multidict-6.7.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:25167cc263257660290fba06b9318d2026e3c910be240a146e1f66dd114af2b0"}, + {file = "multidict-6.7.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:128441d052254f42989ef98b7b6a6ecb1e6f708aa962c7984235316db59f50fa"}, + {file = "multidict-6.7.1-cp311-cp311-win32.whl", hash = "sha256:d62b7f64ffde3b99d06b707a280db04fb3855b55f5a06df387236051d0668f4a"}, + {file = "multidict-6.7.1-cp311-cp311-win_amd64.whl", hash = "sha256:bdbf9f3b332abd0cdb306e7c2113818ab1e922dc84b8f8fd06ec89ed2a19ab8b"}, + {file = "multidict-6.7.1-cp311-cp311-win_arm64.whl", hash = "sha256:b8c990b037d2fff2f4e33d3f21b9b531c5745b33a49a7d6dbe7a177266af44f6"}, + {file = "multidict-6.7.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:a90f75c956e32891a4eda3639ce6dd86e87105271f43d43442a3aedf3cddf172"}, + {file = "multidict-6.7.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:3fccb473e87eaa1382689053e4a4618e7ba7b9b9b8d6adf2027ee474597128cd"}, + {file = "multidict-6.7.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:b0fa96985700739c4c7853a43c0b3e169360d6855780021bfc6d0f1ce7c123e7"}, + {file = "multidict-6.7.1-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:cb2a55f408c3043e42b40cc8eecd575afa27b7e0b956dfb190de0f8499a57a53"}, + {file = "multidict-6.7.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:eb0ce7b2a32d09892b3dd6cc44877a0d02a33241fafca5f25c8b6b62374f8b75"}, + {file = "multidict-6.7.1-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c3a32d23520ee37bf327d1e1a656fec76a2edd5c038bf43eddfa0572ec49c60b"}, + {file = "multidict-6.7.1-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:9c90fed18bffc0189ba814749fdcc102b536e83a9f738a9003e569acd540a733"}, + {file = "multidict-6.7.1-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:da62917e6076f512daccfbbde27f46fed1c98fee202f0559adec8ee0de67f71a"}, + {file = "multidict-6.7.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bfde23ef6ed9db7eaee6c37dcec08524cb43903c60b285b172b6c094711b3961"}, + {file = "multidict-6.7.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:3758692429e4e32f1ba0df23219cd0b4fc0a52f476726fff9337d1a57676a582"}, + {file = "multidict-6.7.1-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:398c1478926eca669f2fd6a5856b6de9c0acf23a2cb59a14c0ba5844fa38077e"}, + {file = "multidict-6.7.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:c102791b1c4f3ab36ce4101154549105a53dc828f016356b3e3bcae2e3a039d3"}, + {file = "multidict-6.7.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:a088b62bd733e2ad12c50dad01b7d0166c30287c166e137433d3b410add807a6"}, + {file = "multidict-6.7.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:3d51ff4785d58d3f6c91bdbffcb5e1f7ddfda557727043aa20d20ec4f65e324a"}, + {file = "multidict-6.7.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:fc5907494fccf3e7d3f94f95c91d6336b092b5fc83811720fae5e2765890dfba"}, + {file = "multidict-6.7.1-cp312-cp312-win32.whl", hash = "sha256:28ca5ce2fd9716631133d0e9a9b9a745ad7f60bac2bccafb56aa380fc0b6c511"}, + {file = "multidict-6.7.1-cp312-cp312-win_amd64.whl", hash = "sha256:fcee94dfbd638784645b066074b338bc9cc155d4b4bffa4adce1615c5a426c19"}, + {file = "multidict-6.7.1-cp312-cp312-win_arm64.whl", hash = "sha256:ba0a9fb644d0c1a2194cf7ffb043bd852cea63a57f66fbd33959f7dae18517bf"}, + {file = "multidict-6.7.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:2b41f5fed0ed563624f1c17630cb9941cf2309d4df00e494b551b5f3e3d67a23"}, + {file = "multidict-6.7.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:84e61e3af5463c19b67ced91f6c634effb89ef8bfc5ca0267f954451ed4bb6a2"}, + {file = "multidict-6.7.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:935434b9853c7c112eee7ac891bc4cb86455aa631269ae35442cb316790c1445"}, + {file = "multidict-6.7.1-cp313-cp313-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:432feb25a1cb67fe82a9680b4d65fb542e4635cb3166cd9c01560651ad60f177"}, + {file = "multidict-6.7.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e82d14e3c948952a1a85503817e038cba5905a3352de76b9a465075d072fba23"}, + {file = "multidict-6.7.1-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:4cfb48c6ea66c83bcaaf7e4dfa7ec1b6bbcf751b7db85a328902796dfde4c060"}, + {file = "multidict-6.7.1-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:1d540e51b7e8e170174555edecddbd5538105443754539193e3e1061864d444d"}, + {file = "multidict-6.7.1-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:273d23f4b40f3dce4d6c8a821c741a86dec62cded82e1175ba3d99be128147ed"}, + {file = "multidict-6.7.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9d624335fd4fa1c08a53f8b4be7676ebde19cd092b3895c421045ca87895b429"}, + {file = "multidict-6.7.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:12fad252f8b267cc75b66e8fc51b3079604e8d43a75428ffe193cd9e2195dfd6"}, + {file = "multidict-6.7.1-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:03ede2a6ffbe8ef936b92cb4529f27f42be7f56afcdab5ab739cd5f27fb1cbf9"}, + {file = "multidict-6.7.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:90efbcf47dbe33dcf643a1e400d67d59abeac5db07dc3f27d6bdeae497a2198c"}, + {file = "multidict-6.7.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:5c4b9bfc148f5a91be9244d6264c53035c8a0dcd2f51f1c3c6e30e30ebaa1c84"}, + {file = "multidict-6.7.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:401c5a650f3add2472d1d288c26deebc540f99e2fb83e9525007a74cd2116f1d"}, + {file = "multidict-6.7.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:97891f3b1b3ffbded884e2916cacf3c6fc87b66bb0dde46f7357404750559f33"}, + {file = "multidict-6.7.1-cp313-cp313-win32.whl", hash = "sha256:e1c5988359516095535c4301af38d8a8838534158f649c05dd1050222321bcb3"}, + {file = "multidict-6.7.1-cp313-cp313-win_amd64.whl", hash = "sha256:960c83bf01a95b12b08fd54324a4eb1d5b52c88932b5cba5d6e712bb3ed12eb5"}, + {file = "multidict-6.7.1-cp313-cp313-win_arm64.whl", hash = "sha256:563fe25c678aaba333d5399408f5ec3c383ca5b663e7f774dd179a520b8144df"}, + {file = "multidict-6.7.1-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:c76c4bec1538375dad9d452d246ca5368ad6e1c9039dadcf007ae59c70619ea1"}, + {file = "multidict-6.7.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:57b46b24b5d5ebcc978da4ec23a819a9402b4228b8a90d9c656422b4bdd8a963"}, + {file = "multidict-6.7.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:e954b24433c768ce78ab7929e84ccf3422e46deb45a4dc9f93438f8217fa2d34"}, + {file = "multidict-6.7.1-cp313-cp313t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:3bd231490fa7217cc832528e1cd8752a96f0125ddd2b5749390f7c3ec8721b65"}, + {file = "multidict-6.7.1-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:253282d70d67885a15c8a7716f3a73edf2d635793ceda8173b9ecc21f2fb8292"}, + {file = "multidict-6.7.1-cp313-cp313t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:0b4c48648d7649c9335cf1927a8b87fa692de3dcb15faa676c6a6f1f1aabda43"}, + {file = "multidict-6.7.1-cp313-cp313t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:98bc624954ec4d2c7cb074b8eefc2b5d0ce7d482e410df446414355d158fe4ca"}, + {file = "multidict-6.7.1-cp313-cp313t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:1b99af4d9eec0b49927b4402bcbb58dea89d3e0db8806a4086117019939ad3dd"}, + {file = "multidict-6.7.1-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6aac4f16b472d5b7dc6f66a0d49dd57b0e0902090be16594dc9ebfd3d17c47e7"}, + {file = "multidict-6.7.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:21f830fe223215dffd51f538e78c172ed7c7f60c9b96a2bf05c4848ad49921c3"}, + {file = "multidict-6.7.1-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:f5dd81c45b05518b9aa4da4aa74e1c93d715efa234fd3e8a179df611cc85e5f4"}, + {file = "multidict-6.7.1-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:eb304767bca2bb92fb9c5bd33cedc95baee5bb5f6c88e63706533a1c06ad08c8"}, + {file = "multidict-6.7.1-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:c9035dde0f916702850ef66460bc4239d89d08df4d02023a5926e7446724212c"}, + {file = "multidict-6.7.1-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:af959b9beeb66c822380f222f0e0a1889331597e81f1ded7f374f3ecb0fd6c52"}, + {file = "multidict-6.7.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:41f2952231456154ee479651491e94118229844dd7226541788be783be2b5108"}, + {file = "multidict-6.7.1-cp313-cp313t-win32.whl", hash = "sha256:df9f19c28adcb40b6aae30bbaa1478c389efd50c28d541d76760199fc1037c32"}, + {file = "multidict-6.7.1-cp313-cp313t-win_amd64.whl", hash = "sha256:d54ecf9f301853f2c5e802da559604b3e95bb7a3b01a9c295c6ee591b9882de8"}, + {file = "multidict-6.7.1-cp313-cp313t-win_arm64.whl", hash = "sha256:5a37ca18e360377cfda1d62f5f382ff41f2b8c4ccb329ed974cc2e1643440118"}, + {file = "multidict-6.7.1-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:8f333ec9c5eb1b7105e3b84b53141e66ca05a19a605368c55450b6ba208cb9ee"}, + {file = "multidict-6.7.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:a407f13c188f804c759fc6a9f88286a565c242a76b27626594c133b82883b5c2"}, + {file = "multidict-6.7.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:0e161ddf326db5577c3a4cc2d8648f81456e8a20d40415541587a71620d7a7d1"}, + {file = "multidict-6.7.1-cp314-cp314-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:1e3a8bb24342a8201d178c3b4984c26ba81a577c80d4d525727427460a50c22d"}, + {file = "multidict-6.7.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:97231140a50f5d447d3164f994b86a0bed7cd016e2682f8650d6a9158e14fd31"}, + {file = "multidict-6.7.1-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:6b10359683bd8806a200fd2909e7c8ca3a7b24ec1d8132e483d58e791d881048"}, + {file = "multidict-6.7.1-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:283ddac99f7ac25a4acadbf004cb5ae34480bbeb063520f70ce397b281859362"}, + {file = "multidict-6.7.1-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:538cec1e18c067d0e6103aa9a74f9e832904c957adc260e61cd9d8cf0c3b3d37"}, + {file = "multidict-6.7.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7eee46ccb30ff48a1e35bb818cc90846c6be2b68240e42a78599166722cea709"}, + {file = "multidict-6.7.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:fa263a02f4f2dd2d11a7b1bb4362aa7cb1049f84a9235d31adf63f30143469a0"}, + {file = "multidict-6.7.1-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:2e1425e2f99ec5bd36c15a01b690a1a2456209c5deed58f95469ffb46039ccbb"}, + {file = "multidict-6.7.1-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:497394b3239fc6f0e13a78a3e1b61296e72bf1c5f94b4c4eb80b265c37a131cd"}, + {file = "multidict-6.7.1-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:233b398c29d3f1b9676b4b6f75c518a06fcb2ea0b925119fb2c1bc35c05e1601"}, + {file = "multidict-6.7.1-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:93b1818e4a6e0930454f0f2af7dfce69307ca03cdcfb3739bf4d91241967b6c1"}, + {file = "multidict-6.7.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:f33dc2a3abe9249ea5d8360f969ec7f4142e7ac45ee7014d8f8d5acddf178b7b"}, + {file = "multidict-6.7.1-cp314-cp314-win32.whl", hash = "sha256:3ab8b9d8b75aef9df299595d5388b14530839f6422333357af1339443cff777d"}, + {file = "multidict-6.7.1-cp314-cp314-win_amd64.whl", hash = "sha256:5e01429a929600e7dab7b166062d9bb54a5eed752384c7384c968c2afab8f50f"}, + {file = "multidict-6.7.1-cp314-cp314-win_arm64.whl", hash = "sha256:4885cb0e817aef5d00a2e8451d4665c1808378dc27c2705f1bf4ef8505c0d2e5"}, + {file = "multidict-6.7.1-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:0458c978acd8e6ea53c81eefaddbbee9c6c5e591f41b3f5e8e194780fe026581"}, + {file = "multidict-6.7.1-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:c0abd12629b0af3cf590982c0b413b1e7395cd4ec026f30986818ab95bfaa94a"}, + {file = "multidict-6.7.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:14525a5f61d7d0c94b368a42cff4c9a4e7ba2d52e2672a7b23d84dc86fb02b0c"}, + {file = "multidict-6.7.1-cp314-cp314t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:17307b22c217b4cf05033dabefe68255a534d637c6c9b0cc8382718f87be4262"}, + {file = "multidict-6.7.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7a7e590ff876a3eaf1c02a4dfe0724b6e69a9e9de6d8f556816f29c496046e59"}, + {file = "multidict-6.7.1-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:5fa6a95dfee63893d80a34758cd0e0c118a30b8dcb46372bf75106c591b77889"}, + {file = "multidict-6.7.1-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a0543217a6a017692aa6ae5cc39adb75e587af0f3a82288b1492eb73dd6cc2a4"}, + {file = "multidict-6.7.1-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:f99fe611c312b3c1c0ace793f92464d8cd263cc3b26b5721950d977b006b6c4d"}, + {file = "multidict-6.7.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9004d8386d133b7e6135679424c91b0b854d2d164af6ea3f289f8f2761064609"}, + {file = "multidict-6.7.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:e628ef0e6859ffd8273c69412a2465c4be4a9517d07261b33334b5ec6f3c7489"}, + {file = "multidict-6.7.1-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:841189848ba629c3552035a6a7f5bf3b02eb304e9fea7492ca220a8eda6b0e5c"}, + {file = "multidict-6.7.1-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:ce1bbd7d780bb5a0da032e095c951f7014d6b0a205f8318308140f1a6aba159e"}, + {file = "multidict-6.7.1-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:b26684587228afed0d50cf804cc71062cc9c1cdf55051c4c6345d372947b268c"}, + {file = "multidict-6.7.1-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:9f9af11306994335398293f9958071019e3ab95e9a707dc1383a35613f6abcb9"}, + {file = "multidict-6.7.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:b4938326284c4f1224178a560987b6cf8b4d38458b113d9b8c1db1a836e640a2"}, + {file = "multidict-6.7.1-cp314-cp314t-win32.whl", hash = "sha256:98655c737850c064a65e006a3df7c997cd3b220be4ec8fe26215760b9697d4d7"}, + {file = "multidict-6.7.1-cp314-cp314t-win_amd64.whl", hash = "sha256:497bde6223c212ba11d462853cfa4f0ae6ef97465033e7dc9940cdb3ab5b48e5"}, + {file = "multidict-6.7.1-cp314-cp314t-win_arm64.whl", hash = "sha256:2bbd113e0d4af5db41d5ebfe9ccaff89de2120578164f86a5d17d5a576d1e5b2"}, + {file = "multidict-6.7.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:65573858d27cdeaca41893185677dc82395159aa28875a8867af66532d413a8f"}, + {file = "multidict-6.7.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:c524c6fb8fc342793708ab111c4dbc90ff9abd568de220432500e47e990c0358"}, + {file = "multidict-6.7.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:aa23b001d968faef416ff70dc0f1ab045517b9b42a90edd3e9bcdb06479e31d5"}, + {file = "multidict-6.7.1-cp39-cp39-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:6704fa2b7453b2fb121740555fa1ee20cd98c4d011120caf4d2b8d4e7c76eec0"}, + {file = "multidict-6.7.1-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:121a34e5bfa410cdf2c8c49716de160de3b1dbcd86b49656f5681e4543bcd1a8"}, + {file = "multidict-6.7.1-cp39-cp39-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:026d264228bcd637d4e060844e39cdc60f86c479e463d49075dedc21b18fbbe0"}, + {file = "multidict-6.7.1-cp39-cp39-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:0e697826df7eb63418ee190fd06ce9f1803593bb4b9517d08c60d9b9a7f69d8f"}, + {file = "multidict-6.7.1-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:bb08271280173720e9fea9ede98e5231defcbad90f1624bea26f32ec8a956e2f"}, + {file = "multidict-6.7.1-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c6b3228e1d80af737b72925ce5fb4daf5a335e49cd7ab77ed7b9fdfbf58c526e"}, + {file = "multidict-6.7.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:3943debf0fbb57bdde5901695c11094a9a36723e5c03875f87718ee15ca2f4d2"}, + {file = "multidict-6.7.1-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:98c5787b0a0d9a41d9311eae44c3b76e6753def8d8870ab501320efe75a6a5f8"}, + {file = "multidict-6.7.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:08ccb2a6dc72009093ebe7f3f073e5ec5964cba9a706fa94b1a1484039b87941"}, + {file = "multidict-6.7.1-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:eb351f72c26dc9abe338ca7294661aa22969ad8ffe7ef7d5541d19f368dc854a"}, + {file = "multidict-6.7.1-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:ac1c665bad8b5d762f5f85ebe4d94130c26965f11de70c708c75671297c776de"}, + {file = "multidict-6.7.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:1fa6609d0364f4f6f58351b4659a1f3e0e898ba2a8c5cac04cb2c7bc556b0bc5"}, + {file = "multidict-6.7.1-cp39-cp39-win32.whl", hash = "sha256:6f77ce314a29263e67adadc7e7c1bc699fcb3a305059ab973d038f87caa42ed0"}, + {file = "multidict-6.7.1-cp39-cp39-win_amd64.whl", hash = "sha256:f537b55778cd3cbee430abe3131255d3a78202e0f9ea7ffc6ada893a4bcaeea4"}, + {file = "multidict-6.7.1-cp39-cp39-win_arm64.whl", hash = "sha256:749aa54f578f2e5f439538706a475aa844bfa8ef75854b1401e6e528e4937cf9"}, + {file = "multidict-6.7.1-py3-none-any.whl", hash = "sha256:55d97cc6dae627efa6a6e548885712d4864b81110ac76fa4e534c03819fa4a56"}, + {file = "multidict-6.7.1.tar.gz", hash = "sha256:ec6652a1bee61c53a3e5776b6049172c53b6aaba34f18c9ad04f82712bac623d"}, ] +[package.dependencies] +typing-extensions = {version = ">=4.1.0", markers = "python_version < \"3.11\""} + [[package]] name = "mypy" -version = "1.0.1" +version = "1.13.0" description = "Optional static typing for Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "mypy-1.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:71a808334d3f41ef011faa5a5cd8153606df5fc0b56de5b2e89566c8093a0c9a"}, - {file = "mypy-1.0.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:920169f0184215eef19294fa86ea49ffd4635dedfdea2b57e45cb4ee85d5ccaf"}, - {file = "mypy-1.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:27a0f74a298769d9fdc8498fcb4f2beb86f0564bcdb1a37b58cbbe78e55cf8c0"}, - {file = "mypy-1.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:65b122a993d9c81ea0bfde7689b3365318a88bde952e4dfa1b3a8b4ac05d168b"}, - {file = "mypy-1.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:5deb252fd42a77add936b463033a59b8e48eb2eaec2976d76b6878d031933fe4"}, - {file = "mypy-1.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:2013226d17f20468f34feddd6aae4635a55f79626549099354ce641bc7d40262"}, - {file = "mypy-1.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:48525aec92b47baed9b3380371ab8ab6e63a5aab317347dfe9e55e02aaad22e8"}, - {file = "mypy-1.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c96b8a0c019fe29040d520d9257d8c8f122a7343a8307bf8d6d4a43f5c5bfcc8"}, - {file = "mypy-1.0.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:448de661536d270ce04f2d7dddaa49b2fdba6e3bd8a83212164d4174ff43aa65"}, - {file = "mypy-1.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:d42a98e76070a365a1d1c220fcac8aa4ada12ae0db679cb4d910fabefc88b994"}, - {file = "mypy-1.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:e64f48c6176e243ad015e995de05af7f22bbe370dbb5b32bd6988438ec873919"}, - {file = "mypy-1.0.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5fdd63e4f50e3538617887e9aee91855368d9fc1dea30da743837b0df7373bc4"}, - {file = "mypy-1.0.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:dbeb24514c4acbc78d205f85dd0e800f34062efcc1f4a4857c57e4b4b8712bff"}, - {file = "mypy-1.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:a2948c40a7dd46c1c33765718936669dc1f628f134013b02ff5ac6c7ef6942bf"}, - {file = "mypy-1.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:5bc8d6bd3b274dd3846597855d96d38d947aedba18776aa998a8d46fabdaed76"}, - {file = "mypy-1.0.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:17455cda53eeee0a4adb6371a21dd3dbf465897de82843751cf822605d152c8c"}, - {file = "mypy-1.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e831662208055b006eef68392a768ff83596035ffd6d846786578ba1714ba8f6"}, - {file = "mypy-1.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:e60d0b09f62ae97a94605c3f73fd952395286cf3e3b9e7b97f60b01ddfbbda88"}, - {file = "mypy-1.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:0af4f0e20706aadf4e6f8f8dc5ab739089146b83fd53cb4a7e0e850ef3de0bb6"}, - {file = "mypy-1.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:24189f23dc66f83b839bd1cce2dfc356020dfc9a8bae03978477b15be61b062e"}, - {file = "mypy-1.0.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:93a85495fb13dc484251b4c1fd7a5ac370cd0d812bbfc3b39c1bafefe95275d5"}, - {file = "mypy-1.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5f546ac34093c6ce33f6278f7c88f0f147a4849386d3bf3ae193702f4fe31407"}, - {file = "mypy-1.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:c6c2ccb7af7154673c591189c3687b013122c5a891bb5651eca3db8e6c6c55bd"}, - {file = "mypy-1.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:15b5a824b58c7c822c51bc66308e759243c32631896743f030daf449fe3677f3"}, - {file = "mypy-1.0.1-py3-none-any.whl", hash = "sha256:eda5c8b9949ed411ff752b9a01adda31afe7eae1e53e946dbdf9db23865e66c4"}, - {file = "mypy-1.0.1.tar.gz", hash = "sha256:28cea5a6392bb43d266782983b5a4216c25544cd7d80be681a155ddcdafd152d"}, + {file = "mypy-1.13.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:6607e0f1dd1fb7f0aca14d936d13fd19eba5e17e1cd2a14f808fa5f8f6d8f60a"}, + {file = "mypy-1.13.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8a21be69bd26fa81b1f80a61ee7ab05b076c674d9b18fb56239d72e21d9f4c80"}, + {file = "mypy-1.13.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7b2353a44d2179846a096e25691d54d59904559f4232519d420d64da6828a3a7"}, + {file = "mypy-1.13.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0730d1c6a2739d4511dc4253f8274cdd140c55c32dfb0a4cf8b7a43f40abfa6f"}, + {file = "mypy-1.13.0-cp310-cp310-win_amd64.whl", hash = "sha256:c5fc54dbb712ff5e5a0fca797e6e0aa25726c7e72c6a5850cfd2adbc1eb0a372"}, + {file = "mypy-1.13.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:581665e6f3a8a9078f28d5502f4c334c0c8d802ef55ea0e7276a6e409bc0d82d"}, + {file = "mypy-1.13.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3ddb5b9bf82e05cc9a627e84707b528e5c7caaa1c55c69e175abb15a761cec2d"}, + {file = "mypy-1.13.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:20c7ee0bc0d5a9595c46f38beb04201f2620065a93755704e141fcac9f59db2b"}, + {file = "mypy-1.13.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:3790ded76f0b34bc9c8ba4def8f919dd6a46db0f5a6610fb994fe8efdd447f73"}, + {file = "mypy-1.13.0-cp311-cp311-win_amd64.whl", hash = "sha256:51f869f4b6b538229c1d1bcc1dd7d119817206e2bc54e8e374b3dfa202defcca"}, + {file = "mypy-1.13.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:5c7051a3461ae84dfb5dd15eff5094640c61c5f22257c8b766794e6dd85e72d5"}, + {file = "mypy-1.13.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:39bb21c69a5d6342f4ce526e4584bc5c197fd20a60d14a8624d8743fffb9472e"}, + {file = "mypy-1.13.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:164f28cb9d6367439031f4c81e84d3ccaa1e19232d9d05d37cb0bd880d3f93c2"}, + {file = "mypy-1.13.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:a4c1bfcdbce96ff5d96fc9b08e3831acb30dc44ab02671eca5953eadad07d6d0"}, + {file = "mypy-1.13.0-cp312-cp312-win_amd64.whl", hash = "sha256:a0affb3a79a256b4183ba09811e3577c5163ed06685e4d4b46429a271ba174d2"}, + {file = "mypy-1.13.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:a7b44178c9760ce1a43f544e595d35ed61ac2c3de306599fa59b38a6048e1aa7"}, + {file = "mypy-1.13.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:5d5092efb8516d08440e36626f0153b5006d4088c1d663d88bf79625af3d1d62"}, + {file = "mypy-1.13.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:de2904956dac40ced10931ac967ae63c5089bd498542194b436eb097a9f77bc8"}, + {file = "mypy-1.13.0-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:7bfd8836970d33c2105562650656b6846149374dc8ed77d98424b40b09340ba7"}, + {file = "mypy-1.13.0-cp313-cp313-win_amd64.whl", hash = "sha256:9f73dba9ec77acb86457a8fc04b5239822df0c14a082564737833d2963677dbc"}, + {file = "mypy-1.13.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:100fac22ce82925f676a734af0db922ecfea991e1d7ec0ceb1e115ebe501301a"}, + {file = "mypy-1.13.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:7bcb0bb7f42a978bb323a7c88f1081d1b5dee77ca86f4100735a6f541299d8fb"}, + {file = "mypy-1.13.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bde31fc887c213e223bbfc34328070996061b0833b0a4cfec53745ed61f3519b"}, + {file = "mypy-1.13.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:07de989f89786f62b937851295ed62e51774722e5444a27cecca993fc3f9cd74"}, + {file = "mypy-1.13.0-cp38-cp38-win_amd64.whl", hash = "sha256:4bde84334fbe19bad704b3f5b78c4abd35ff1026f8ba72b29de70dda0916beb6"}, + {file = "mypy-1.13.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:0246bcb1b5de7f08f2826451abd947bf656945209b140d16ed317f65a17dc7dc"}, + {file = "mypy-1.13.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:7f5b7deae912cf8b77e990b9280f170381fdfbddf61b4ef80927edd813163732"}, + {file = "mypy-1.13.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7029881ec6ffb8bc233a4fa364736789582c738217b133f1b55967115288a2bc"}, + {file = "mypy-1.13.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:3e38b980e5681f28f033f3be86b099a247b13c491f14bb8b1e1e134d23bb599d"}, + {file = "mypy-1.13.0-cp39-cp39-win_amd64.whl", hash = "sha256:a6789be98a2017c912ae6ccb77ea553bbaf13d27605d2ca20a76dfbced631b24"}, + {file = "mypy-1.13.0-py3-none-any.whl", hash = "sha256:9c250883f9fd81d212e0952c92dbfcc96fc237f4b7c92f56ac81fd48460b3e5a"}, + {file = "mypy-1.13.0.tar.gz", hash = "sha256:0291a61b6fbf3e6673e3405cfcc0e7650bebc7939659fdca2702958038bd835e"}, ] [package.dependencies] -mypy-extensions = ">=0.4.3" +mypy-extensions = ">=1.0.0" tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} -typing-extensions = ">=3.10" +typing-extensions = ">=4.6.0" [package.extras] dmypy = ["psutil (>=4.0)"] +faster-cache = ["orjson"] install-types = ["pip"] -python2 = ["typed-ast (>=1.4.0,<2)"] +mypyc = ["setuptools (>=50)"] reports = ["lxml"] [[package]] name = "mypy-extensions" -version = "1.0.0" +version = "1.1.0" description = "Type system extensions for programs checked with the mypy type checker." optional = false -python-versions = ">=3.5" +python-versions = ">=3.8" files = [ - {file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"}, - {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"}, + {file = "mypy_extensions-1.1.0-py3-none-any.whl", hash = "sha256:1be4cccdb0f2482337c4743e60421de3a356cd97508abadd57d47403e94f5505"}, + {file = "mypy_extensions-1.1.0.tar.gz", hash = "sha256:52e68efc3284861e772bbcd66823fde5ae21fd2fdb51c62a211403730b916558"}, ] [[package]] name = "packaging" -version = "24.1" +version = "26.2" description = "Core utilities for Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "packaging-24.1-py3-none-any.whl", hash = "sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124"}, - {file = "packaging-24.1.tar.gz", hash = "sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002"}, + {file = "packaging-26.2-py3-none-any.whl", hash = "sha256:5fc45236b9446107ff2415ce77c807cee2862cb6fac22b8a73826d0693b0980e"}, + {file = "packaging-26.2.tar.gz", hash = "sha256:ff452ff5a3e828ce110190feff1178bb1f2ea2281fa2075aadb987c2fb221661"}, ] [[package]] name = "pluggy" -version = "1.5.0" +version = "1.6.0" description = "plugin and hook calling mechanisms for python" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669"}, - {file = "pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1"}, + {file = "pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746"}, + {file = "pluggy-1.6.0.tar.gz", hash = "sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3"}, ] [package.extras] dev = ["pre-commit", "tox"] -testing = ["pytest", "pytest-benchmark"] +testing = ["coverage", "pytest", "pytest-benchmark"] + +[[package]] +name = "propcache" +version = "0.5.2" +description = "Accelerated property cache" +optional = true +python-versions = ">=3.10" +files = [ + {file = "propcache-0.5.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d5a81be28596d6559f6131ef33e10200de6e17643b3c74ce03f9eb103be6ae8b"}, + {file = "propcache-0.5.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:29cbaac5ea0212663e6845e04b5e188d5a6ae6dd919810ac835bf1d3b42c3f4c"}, + {file = "propcache-0.5.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6bf3be92233808fcd338eba0fb4d0b59ec5772af4f4ecfcec450d1bfc0f8b5eb"}, + {file = "propcache-0.5.2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2f8ea531c794b9d6274acd4e8d2c2ebcac590a4361d27482edd3010b79f1325e"}, + {file = "propcache-0.5.2-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:decfca4c79dd53ebab484b00cc4b6717d8c369f86e74aa4ca395a64ac651495e"}, + {file = "propcache-0.5.2-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:4621064bbf28fa77ff64dd5d94367c04684c67d3a5bf1dff25f0cd0d98a38f3b"}, + {file = "propcache-0.5.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b96db7141a592cbc968daf1feea83a118e6ab378af4abbc72b248c895414c22d"}, + {file = "propcache-0.5.2-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:1ca071adabaab6e9219924bbe00af821f1ee7de113a9eca1cdc292de3d120f4d"}, + {file = "propcache-0.5.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:e4294d04a94dcab1b3bccd8b66d962dcad411a1d19414b2a41d1445f1de32ad0"}, + {file = "propcache-0.5.2-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:a0e399a2eccb91ed18721f86aa85757727400b6865c89e88934781deb9c8498b"}, + {file = "propcache-0.5.2-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:823581fd5cb08b12a48bfa11fe962a7916766b6170c17b028fbdf762b85eb9bf"}, + {file = "propcache-0.5.2-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:949c91d1a990cf3b2e8188dfcfb25005e0b834a06c63fa4ef9f360878ce21ecf"}, + {file = "propcache-0.5.2-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:cc1177027eda740fdb152706bd215a3f124e3eea15afc39f2cb9fe351b50619e"}, + {file = "propcache-0.5.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b05d643f944a8c3c4bd86d65ffd87bf3264b617f87791940302bc474d2ff5274"}, + {file = "propcache-0.5.2-cp310-cp310-win32.whl", hash = "sha256:8114f28879e0904748e831c3a7774261bd9e75f49be089f389a76f959dcd13fe"}, + {file = "propcache-0.5.2-cp310-cp310-win_amd64.whl", hash = "sha256:5fcb98e7598b1ee0addab320d90f65b530297a867dbfe9de52ea838077e16e3d"}, + {file = "propcache-0.5.2-cp310-cp310-win_arm64.whl", hash = "sha256:04dc2390d9edbbaef7461f33322555976ffddf0b650a038649d026358714e6c5"}, + {file = "propcache-0.5.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:74b70780220e2dd89175ca24b81b68b67c83db499ae611e7f2313cb329801c78"}, + {file = "propcache-0.5.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:a4840ab0ae0216d952f4b53dc6d0b992bfc2bedbfe360bdd9b548bc184c08959"}, + {file = "propcache-0.5.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c6844ba6364fb12f403928a82cfd295ab103a2b315c77c747b2dbe4a41894ea7"}, + {file = "propcache-0.5.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2293949b855ce597f2826452d17c2d545fb5622379c4ea6fdf525e9b8e8a2511"}, + {file = "propcache-0.5.2-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:0fd59b5af35f74da48d905dcbad55449ba13be91823cb05a9bd590bbf5b61660"}, + {file = "propcache-0.5.2-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:29f9309a2e42b0d273be006fdb4be2d6c39a47f6f57d8fb1cf9f81481df81b66"}, + {file = "propcache-0.5.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5aaa2b923c1944ac8febd6609cb373540a5563e7cbcb0fd770f75dace2eb817b"}, + {file = "propcache-0.5.2-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:66ea454f095ddf5b6b14f56c064c0941c4788be11e18d2464cf643bf7203ff67"}, + {file = "propcache-0.5.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:95f1e3f4760d404b13c9976c0229b2b49a3c8e2c62a9ce92efdd2b11ada75e3f"}, + {file = "propcache-0.5.2-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:85341b12b9d55bad0bded24cac341bb34289469e03a11f3f583ea1cc1db0326c"}, + {file = "propcache-0.5.2-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:26a4dca084132874e639895c3135dfad5eb20bae209f62d1aeb31b03e601c3c0"}, + {file = "propcache-0.5.2-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:3b199b9b2b3d6a7edf3183ba8a9a137a22b97f7df525feb5ae1eccf026d2a9c6"}, + {file = "propcache-0.5.2-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:e59bc9e66329185b93dab73f210f1a37f81cb40f321501db8017c9aea15dba27"}, + {file = "propcache-0.5.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:552ffadf6ad409844bc5919c42a0a83d88314cedddaea0e41e80a8b8fffe881f"}, + {file = "propcache-0.5.2-cp311-cp311-win32.whl", hash = "sha256:cd416c1de191973c52ff1a12a57446bfc7642797b282d7caf2162d7d1b8aa9a0"}, + {file = "propcache-0.5.2-cp311-cp311-win_amd64.whl", hash = "sha256:44e488ef40dbb452700b2b1f8188934121f6648f52c295055662d2191959ff82"}, + {file = "propcache-0.5.2-cp311-cp311-win_arm64.whl", hash = "sha256:54adaa85a22078d1e306304a40984dc5be99d599bf3dc0a24dc98f7daeab89ab"}, + {file = "propcache-0.5.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:806719138ecd720339a12410fb9614ac9b2b2d3a5fdf8235d56981c36f4039ba"}, + {file = "propcache-0.5.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:db2b80ea58eab4f86b2beec3cc8b39e8ff9276ac20e96b7cce43c8ae84cd6b5a"}, + {file = "propcache-0.5.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:e5cbfac9f61484f7e9f3597775500cd3ebe8274e9b050c38f9525c77c97520bf"}, + {file = "propcache-0.5.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5dbc581d2814337da56222fab8dc5f161cd798a434e49bac27930aaef798e144"}, + {file = "propcache-0.5.2-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:857187f381f88c8e2fa2fe56ab94879d011b883d5a2ee5a1b60a8cd2a06846d9"}, + {file = "propcache-0.5.2-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:178b4a2cdaac1818e2bf1c5a99b94383fa73ea5382e032a48dec07dc5668dc42"}, + {file = "propcache-0.5.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6f328175a2cde1f0ff2c4ed8ce968b9dcfb55f3a7153f39e2957ed994da13476"}, + {file = "propcache-0.5.2-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:5671d09a36b06d0fd4a3da0fccbcae360e9b1570924171a15e9e0997f0249fba"}, + {file = "propcache-0.5.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:80168e2ebe4d3ec6599d10ad8f520304ae1cad9b6c5a95372aef1b66b7bfb53a"}, + {file = "propcache-0.5.2-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:45f11346f884bc47444f6e6647131055844134c3175b629f84952e2b5cd62b64"}, + {file = "propcache-0.5.2-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:8e778ebd44ef4f66ed60a0416b06b489687db264a9c0b3620362f26489492913"}, + {file = "propcache-0.5.2-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:c0cb9ed24c8964e172768d455a38254c2dd8a552905729ce006cad3d3dda59b1"}, + {file = "propcache-0.5.2-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:1d1ad32d9d4355e2be65574fd0bfd3677e7066b009cd5b9b2dee8aa6a6393b33"}, + {file = "propcache-0.5.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:c80f4ba3e8f00189165999a742ee526ebeccedf6c3f7beb0c7df821e9772435a"}, + {file = "propcache-0.5.2-cp312-cp312-win32.whl", hash = "sha256:8c7972d8f193740d9175f0998ab38717e6cd322d5935c5b0fef8c0d323fd9031"}, + {file = "propcache-0.5.2-cp312-cp312-win_amd64.whl", hash = "sha256:d9ee8826a7d47863a08ac44e1a5f611a462eefc3a194b492da242128bec75b42"}, + {file = "propcache-0.5.2-cp312-cp312-win_arm64.whl", hash = "sha256:2800a4a8ead6b28cccd1ec54b59346f0def7922ee1c7598e8499c733cfbb7c84"}, + {file = "propcache-0.5.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:099aaf4b4d1a02265b92a977edf00b5c4f63b3b17ac6de39b0d637c9cac0188a"}, + {file = "propcache-0.5.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:68ce1c44c7a813a7f71ea04315a8c7b330b63db99d059a797a4651bb6f69f117"}, + {file = "propcache-0.5.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:fc299c129490f55f254cd90be0deca4764e36e9a7c08b4aa588479a3bbed3098"}, + {file = "propcache-0.5.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a6ae2198be502c10f09b2516e7b5d019816924bc3183a43ce792a7bd6625e6f4"}, + {file = "propcache-0.5.2-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:6041d31504dc1779d700e1edcfb08eea334b357620b06681a4eabb57a74e574e"}, + {file = "propcache-0.5.2-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:f7eabc04151c78a9f4d5bbb5f1faf571e4defeb4b585e0fe95b60ff2dbe4d3d7"}, + {file = "propcache-0.5.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4db0ba63d693afd40d249bd93f842b5f144f8fcbb83de05660373bcf30517b1d"}, + {file = "propcache-0.5.2-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:1dbcf7675229b35d31abb6547d8ebc8c27a830ac3f9a794edff6254873ec7c0a"}, + {file = "propcache-0.5.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:d310c013aad2c72f1c3f2f8dd3279d460a858c551f97aeb8c63e4693cca7b4d2"}, + {file = "propcache-0.5.2-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:06187263ddad280d05b4d8a8b3bb7d164cbebd469236544a42e6d9b28ac6a4fa"}, + {file = "propcache-0.5.2-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:3115559b8effafd63b142ea5ed53d63a16ea6469cbc63dce4ee194b42db5d853"}, + {file = "propcache-0.5.2-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:c60462af8e6dc30c35407c7237ea908d777b22862bbee27bc4699c0d8bcdc45a"}, + {file = "propcache-0.5.2-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:40314bca9ac559716fe374094fc81c11dcc34b64fd6c585360f5775690505704"}, + {file = "propcache-0.5.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:cfa21e036ce1e1db2be04ba3b85d2df1bb1702fa01932d984c5464c665228ff4"}, + {file = "propcache-0.5.2-cp313-cp313-win32.whl", hash = "sha256:f156a3529f38063b6dbaf356e15602a7f95f8055b1295a438433a6386f10463d"}, + {file = "propcache-0.5.2-cp313-cp313-win_amd64.whl", hash = "sha256:dfed59d0a5aeb01e242e66ff0300bc4a265a7c05f612d30016f0b60b1017d757"}, + {file = "propcache-0.5.2-cp313-cp313-win_arm64.whl", hash = "sha256:ba338430e87ceb9c8f0cf754de38a9860560261e56c00376debd628698a7364f"}, + {file = "propcache-0.5.2-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:a592f5f3da71c8691c788c13cb6734b6d17663d2e1cb8caddf0673d01ef8847d"}, + {file = "propcache-0.5.2-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:6a997d0489e9668a384fcfd5061b857aa5361de73191cac204d04b889cfbbafa"}, + {file = "propcache-0.5.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:10734b5484ea113152ee25a91dccedf81631791805d2c9ccb054958e51842c94"}, + {file = "propcache-0.5.2-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:cafca7e56c12bb02ae16d283742bef25a61122e9dab2b5b3f2ccbe589ce32164"}, + {file = "propcache-0.5.2-cp313-cp313t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f064f8d2b59177878b7615df1735cd8fe3462ed6be8c7b217d17a276489c2b7f"}, + {file = "propcache-0.5.2-cp313-cp313t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:f78abfa8dfc32376fd1aacf597b2f2fbbe0ea751419aee718af5d4f82537ef8c"}, + {file = "propcache-0.5.2-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f7467da8a9822bf1a55336f877340c5bcbd3c482afc43a99771169f74a26dedc"}, + {file = "propcache-0.5.2-cp313-cp313t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:a6ddc6ac9e25de626c1f129c1b467d7ecd33ce2237d3fd0c4e429feef0a7ee1f"}, + {file = "propcache-0.5.2-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:2f22cbbac9e26a8e864c0985ff1268d5d939d53d9d9411a9824279097e03a2cb"}, + {file = "propcache-0.5.2-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:fc76378c62a0f04d0cd82fbb1a2cd2d7e28fcb40d5873f28a6c44e388aaa2751"}, + {file = "propcache-0.5.2-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:acd2c8edba48e31e58a363b8cf4e5c7db3b04b3f9e371f601df30d9b0d244836"}, + {file = "propcache-0.5.2-cp313-cp313t-musllinux_1_2_riscv64.whl", hash = "sha256:452b5065457eb9991ec5eb38ff41d6cd4c991c9ac7c531c4d5849ae473a9a13f"}, + {file = "propcache-0.5.2-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:3430bb2bfe1331885c427745a751e774ee679fd4344f80b97bf879815fe8fa55"}, + {file = "propcache-0.5.2-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:cef6cea3922890dd6c9654971001fa797b526c16ab5e1e46c05fd6f877be7568"}, + {file = "propcache-0.5.2-cp313-cp313t-win32.whl", hash = "sha256:72d61e16dd78228b58c5d47be830ff3da7e5f139abdf0aef9d86cde1c5cf2191"}, + {file = "propcache-0.5.2-cp313-cp313t-win_amd64.whl", hash = "sha256:0958834041a0166d343b8d2cedcd8bcbaeb4fdbe0cf08320c5379f143c3be6e7"}, + {file = "propcache-0.5.2-cp313-cp313t-win_arm64.whl", hash = "sha256:6de8bd93ddde9b992cf2b2e0d796d501a19026b5b9fd87356d7d0779531a8d96"}, + {file = "propcache-0.5.2-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:46088abff4cba581dea21ae0467a480526cb25aa5f3c269e909f800328bc3999"}, + {file = "propcache-0.5.2-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:fc88b26f08d634f7bc819a7852e5214f5802641ab8d9fd5326892292eee1993e"}, + {file = "propcache-0.5.2-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:97797ebb098e670a2f92dd66f32897e30d7615b14e7f59711de23e30a9072539"}, + {file = "propcache-0.5.2-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ba57fffe4ac99c5d30076161b5866336d97600769bad35cc68f7774b15298a4e"}, + {file = "propcache-0.5.2-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:583c19759d9eec1e5b69e2fbef36a7d9c326041be9746cb822d335c8cedc2979"}, + {file = "propcache-0.5.2-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d0326e2e5e1f3163fa306c834e48e8d490e5fae607a097a40c0648109b47ba80"}, + {file = "propcache-0.5.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e00820e192c8dbebcafb383ebbf99030895f09905e7a0eb2e0340a0bcc2bc825"}, + {file = "propcache-0.5.2-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:c66afea89b1e43725731d2004732a046fe6fe955d51f952c3e95a7314a284a39"}, + {file = "propcache-0.5.2-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:d4dc37dec6c6cdad0b57881a5658fd14fbf53e333b1a86cf86559f190e1d9ec4"}, + {file = "propcache-0.5.2-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:5570dbcc97571c15f68068e529c92715a12f8d54030e272d264b377e22bd17a5"}, + {file = "propcache-0.5.2-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:f814362777a9f841adddb200ecdf8f5cb1e5a3c4b7a86378edbd6ccb26edd702"}, + {file = "propcache-0.5.2-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:196913dea116aeb5a2ba95af4ddcb7ea85559ae07d8eee8751688310d09168c3"}, + {file = "propcache-0.5.2-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:6e7b8719005dd1175be4ab1cd25e9b98659a5e0347331506ec6760d2773a7fb5"}, + {file = "propcache-0.5.2-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:51f96d685ab16e88cab128cd37a52c5da540809c8b879fa047731bfcb4ad35a4"}, + {file = "propcache-0.5.2-cp314-cp314-win32.whl", hash = "sha256:cc6fc3cc62e8501d3ed62894425040d2728ecddb1ed072737a5c70bd537aa9f0"}, + {file = "propcache-0.5.2-cp314-cp314-win_amd64.whl", hash = "sha256:81e3a30b0bb60caa22033dd0f8a3618d1d67356212514f62c57db75cb0ef410c"}, + {file = "propcache-0.5.2-cp314-cp314-win_arm64.whl", hash = "sha256:0d2c9bf8528f135dbb805ce027567e09164f7efa51a2be07458a2c0420f292d0"}, + {file = "propcache-0.5.2-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:4bc8ff1feffc6a61c7002ffe84634c41b822e104990ae009f44a0834430070bb"}, + {file = "propcache-0.5.2-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:79aa3ff0a9b566633b642fa9caf7e21ed1c13d6feca718187873f199e1514078"}, + {file = "propcache-0.5.2-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:1b31822f4474c4036bae62de9402710051d431a606d6a0f907fec79935a071aa"}, + {file = "propcache-0.5.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:13fef48778b5a2a756523fdb781326b028ca75e32858b04f2cdd19f394564917"}, + {file = "propcache-0.5.2-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:8b73ab70f1a3351fbc71f663b3e645af6dd0329100c353081cf69c37433fc6fe"}, + {file = "propcache-0.5.2-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5538d2c13d93e4698af7e092b57bc7298fd35d1d58e656ae18f23ee0d0378e03"}, + {file = "propcache-0.5.2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:cd645f03898405cabe694fb8bc35241e3a9c332ec85627584fe3de201452b335"}, + {file = "propcache-0.5.2-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:a473b3440261e0c60706e732b2ed2f517857344fc21bf48fdfe211e2d98eb285"}, + {file = "propcache-0.5.2-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:7afa37062e6650640e932e4cc9297d81f9f42d9944029cc386b8247dea4da837"}, + {file = "propcache-0.5.2-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:8a90efd5777e996e42d568db9ac740b944d691e565cbfd31b2f7832f9184b2b8"}, + {file = "propcache-0.5.2-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:f19bb891234d72535764d703bfed1153cc34f4214d5bd7150aee1eec9e8f4366"}, + {file = "propcache-0.5.2-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:32775082acd2d807ee3db715c7770d38767b817870acfa08c29e057f3c4d5b56"}, + {file = "propcache-0.5.2-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:9282fb1a3bccd038da9f768b927b24a0c753e466c086b7c4f3c6982851eefb2d"}, + {file = "propcache-0.5.2-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:cc49723e2f60d6b32a0f0b08a3fd6d13203c07f1cd9566cfce0f12a917c967a2"}, + {file = "propcache-0.5.2-cp314-cp314t-win32.whl", hash = "sha256:2d7aa89ebca5acc98cba9d1472d976e394782f587bad6661003602a619fd1821"}, + {file = "propcache-0.5.2-cp314-cp314t-win_amd64.whl", hash = "sha256:d447bb0b3054be5818458fbb171208b1d9ff11eba14e18ca18b90cbb45767370"}, + {file = "propcache-0.5.2-cp314-cp314t-win_arm64.whl", hash = "sha256:fe67a3d11cd9b4efabfa45c3d00ffba2b26811442a73a581a94b67c2b5faccf6"}, + {file = "propcache-0.5.2-py3-none-any.whl", hash = "sha256:be1ddfcbb376e3de5d2e2db1d58d6d67463e6b4f9f040c000de8e300295465fe"}, + {file = "propcache-0.5.2.tar.gz", hash = "sha256:01c4fc7480cd0598bb4b57022df55b9ca296da7fc5a8760bd8451a7e63a7d427"}, +] [[package]] name = "pydantic" -version = "2.9.2" +version = "2.12.5" description = "Data validation using Python type hints" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "pydantic-2.9.2-py3-none-any.whl", hash = "sha256:f048cec7b26778210e28a0459867920654d48e5e62db0958433636cde4254f12"}, - {file = "pydantic-2.9.2.tar.gz", hash = "sha256:d155cef71265d1e9807ed1c32b4c8deec042a44a50a4188b25ac67ecd81a9c0f"}, + {file = "pydantic-2.12.5-py3-none-any.whl", hash = "sha256:e561593fccf61e8a20fc46dfc2dfe075b8be7d0188df33f221ad1f0139180f9d"}, + {file = "pydantic-2.12.5.tar.gz", hash = "sha256:4d351024c75c0f085a9febbb665ce8c0c6ec5d30e903bdb6394b7ede26aebb49"}, ] [package.dependencies] annotated-types = ">=0.6.0" -pydantic-core = "2.23.4" -typing-extensions = [ - {version = ">=4.12.2", markers = "python_version >= \"3.13\""}, - {version = ">=4.6.1", markers = "python_version < \"3.13\""}, -] +pydantic-core = "2.41.5" +typing-extensions = ">=4.14.1" +typing-inspection = ">=0.4.2" [package.extras] email = ["email-validator (>=2.0.0)"] @@ -262,145 +920,214 @@ timezone = ["tzdata"] [[package]] name = "pydantic-core" -version = "2.23.4" +version = "2.41.5" description = "Core functionality for Pydantic validation and serialization" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "pydantic_core-2.23.4-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:b10bd51f823d891193d4717448fab065733958bdb6a6b351967bd349d48d5c9b"}, - {file = "pydantic_core-2.23.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:4fc714bdbfb534f94034efaa6eadd74e5b93c8fa6315565a222f7b6f42ca1166"}, - {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:63e46b3169866bd62849936de036f901a9356e36376079b05efa83caeaa02ceb"}, - {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ed1a53de42fbe34853ba90513cea21673481cd81ed1be739f7f2efb931b24916"}, - {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cfdd16ab5e59fc31b5e906d1a3f666571abc367598e3e02c83403acabc092e07"}, - {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:255a8ef062cbf6674450e668482456abac99a5583bbafb73f9ad469540a3a232"}, - {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4a7cd62e831afe623fbb7aabbb4fe583212115b3ef38a9f6b71869ba644624a2"}, - {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f09e2ff1f17c2b51f2bc76d1cc33da96298f0a036a137f5440ab3ec5360b624f"}, - {file = "pydantic_core-2.23.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:e38e63e6f3d1cec5a27e0afe90a085af8b6806ee208b33030e65b6516353f1a3"}, - {file = "pydantic_core-2.23.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0dbd8dbed2085ed23b5c04afa29d8fd2771674223135dc9bc937f3c09284d071"}, - {file = "pydantic_core-2.23.4-cp310-none-win32.whl", hash = "sha256:6531b7ca5f951d663c339002e91aaebda765ec7d61b7d1e3991051906ddde119"}, - {file = "pydantic_core-2.23.4-cp310-none-win_amd64.whl", hash = "sha256:7c9129eb40958b3d4500fa2467e6a83356b3b61bfff1b414c7361d9220f9ae8f"}, - {file = "pydantic_core-2.23.4-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:77733e3892bb0a7fa797826361ce8a9184d25c8dffaec60b7ffe928153680ba8"}, - {file = "pydantic_core-2.23.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1b84d168f6c48fabd1f2027a3d1bdfe62f92cade1fb273a5d68e621da0e44e6d"}, - {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:df49e7a0861a8c36d089c1ed57d308623d60416dab2647a4a17fe050ba85de0e"}, - {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ff02b6d461a6de369f07ec15e465a88895f3223eb75073ffea56b84d9331f607"}, - {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:996a38a83508c54c78a5f41456b0103c30508fed9abcad0a59b876d7398f25fd"}, - {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d97683ddee4723ae8c95d1eddac7c192e8c552da0c73a925a89fa8649bf13eea"}, - {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:216f9b2d7713eb98cb83c80b9c794de1f6b7e3145eef40400c62e86cee5f4e1e"}, - {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6f783e0ec4803c787bcea93e13e9932edab72068f68ecffdf86a99fd5918878b"}, - {file = "pydantic_core-2.23.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:d0776dea117cf5272382634bd2a5c1b6eb16767c223c6a5317cd3e2a757c61a0"}, - {file = "pydantic_core-2.23.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d5f7a395a8cf1621939692dba2a6b6a830efa6b3cee787d82c7de1ad2930de64"}, - {file = "pydantic_core-2.23.4-cp311-none-win32.whl", hash = "sha256:74b9127ffea03643e998e0c5ad9bd3811d3dac8c676e47db17b0ee7c3c3bf35f"}, - {file = "pydantic_core-2.23.4-cp311-none-win_amd64.whl", hash = "sha256:98d134c954828488b153d88ba1f34e14259284f256180ce659e8d83e9c05eaa3"}, - {file = "pydantic_core-2.23.4-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:f3e0da4ebaef65158d4dfd7d3678aad692f7666877df0002b8a522cdf088f231"}, - {file = "pydantic_core-2.23.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f69a8e0b033b747bb3e36a44e7732f0c99f7edd5cea723d45bc0d6e95377ffee"}, - {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:723314c1d51722ab28bfcd5240d858512ffd3116449c557a1336cbe3919beb87"}, - {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bb2802e667b7051a1bebbfe93684841cc9351004e2badbd6411bf357ab8d5ac8"}, - {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d18ca8148bebe1b0a382a27a8ee60350091a6ddaf475fa05ef50dc35b5df6327"}, - {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:33e3d65a85a2a4a0dc3b092b938a4062b1a05f3a9abde65ea93b233bca0e03f2"}, - {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:128585782e5bfa515c590ccee4b727fb76925dd04a98864182b22e89a4e6ed36"}, - {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:68665f4c17edcceecc112dfed5dbe6f92261fb9d6054b47d01bf6371a6196126"}, - {file = "pydantic_core-2.23.4-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:20152074317d9bed6b7a95ade3b7d6054845d70584216160860425f4fbd5ee9e"}, - {file = "pydantic_core-2.23.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:9261d3ce84fa1d38ed649c3638feefeae23d32ba9182963e465d58d62203bd24"}, - {file = "pydantic_core-2.23.4-cp312-none-win32.whl", hash = "sha256:4ba762ed58e8d68657fc1281e9bb72e1c3e79cc5d464be146e260c541ec12d84"}, - {file = "pydantic_core-2.23.4-cp312-none-win_amd64.whl", hash = "sha256:97df63000f4fea395b2824da80e169731088656d1818a11b95f3b173747b6cd9"}, - {file = "pydantic_core-2.23.4-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:7530e201d10d7d14abce4fb54cfe5b94a0aefc87da539d0346a484ead376c3cc"}, - {file = "pydantic_core-2.23.4-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:df933278128ea1cd77772673c73954e53a1c95a4fdf41eef97c2b779271bd0bd"}, - {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0cb3da3fd1b6a5d0279a01877713dbda118a2a4fc6f0d821a57da2e464793f05"}, - {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:42c6dcb030aefb668a2b7009c85b27f90e51e6a3b4d5c9bc4c57631292015b0d"}, - {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:696dd8d674d6ce621ab9d45b205df149399e4bb9aa34102c970b721554828510"}, - {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2971bb5ffe72cc0f555c13e19b23c85b654dd2a8f7ab493c262071377bfce9f6"}, - {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8394d940e5d400d04cad4f75c0598665cbb81aecefaca82ca85bd28264af7f9b"}, - {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:0dff76e0602ca7d4cdaacc1ac4c005e0ce0dcfe095d5b5259163a80d3a10d327"}, - {file = "pydantic_core-2.23.4-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:7d32706badfe136888bdea71c0def994644e09fff0bfe47441deaed8e96fdbc6"}, - {file = "pydantic_core-2.23.4-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:ed541d70698978a20eb63d8c5d72f2cc6d7079d9d90f6b50bad07826f1320f5f"}, - {file = "pydantic_core-2.23.4-cp313-none-win32.whl", hash = "sha256:3d5639516376dce1940ea36edf408c554475369f5da2abd45d44621cb616f769"}, - {file = "pydantic_core-2.23.4-cp313-none-win_amd64.whl", hash = "sha256:5a1504ad17ba4210df3a045132a7baeeba5a200e930f57512ee02909fc5c4cb5"}, - {file = "pydantic_core-2.23.4-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:d4488a93b071c04dc20f5cecc3631fc78b9789dd72483ba15d423b5b3689b555"}, - {file = "pydantic_core-2.23.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:81965a16b675b35e1d09dd14df53f190f9129c0202356ed44ab2728b1c905658"}, - {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4ffa2ebd4c8530079140dd2d7f794a9d9a73cbb8e9d59ffe24c63436efa8f271"}, - {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:61817945f2fe7d166e75fbfb28004034b48e44878177fc54d81688e7b85a3665"}, - {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:29d2c342c4bc01b88402d60189f3df065fb0dda3654744d5a165a5288a657368"}, - {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5e11661ce0fd30a6790e8bcdf263b9ec5988e95e63cf901972107efc49218b13"}, - {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9d18368b137c6295db49ce7218b1a9ba15c5bc254c96d7c9f9e924a9bc7825ad"}, - {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ec4e55f79b1c4ffb2eecd8a0cfba9955a2588497d96851f4c8f99aa4a1d39b12"}, - {file = "pydantic_core-2.23.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:374a5e5049eda9e0a44c696c7ade3ff355f06b1fe0bb945ea3cac2bc336478a2"}, - {file = "pydantic_core-2.23.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:5c364564d17da23db1106787675fc7af45f2f7b58b4173bfdd105564e132e6fb"}, - {file = "pydantic_core-2.23.4-cp38-none-win32.whl", hash = "sha256:d7a80d21d613eec45e3d41eb22f8f94ddc758a6c4720842dc74c0581f54993d6"}, - {file = "pydantic_core-2.23.4-cp38-none-win_amd64.whl", hash = "sha256:5f5ff8d839f4566a474a969508fe1c5e59c31c80d9e140566f9a37bba7b8d556"}, - {file = "pydantic_core-2.23.4-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:a4fa4fc04dff799089689f4fd502ce7d59de529fc2f40a2c8836886c03e0175a"}, - {file = "pydantic_core-2.23.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:0a7df63886be5e270da67e0966cf4afbae86069501d35c8c1b3b6c168f42cb36"}, - {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dcedcd19a557e182628afa1d553c3895a9f825b936415d0dbd3cd0bbcfd29b4b"}, - {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5f54b118ce5de9ac21c363d9b3caa6c800341e8c47a508787e5868c6b79c9323"}, - {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:86d2f57d3e1379a9525c5ab067b27dbb8a0642fb5d454e17a9ac434f9ce523e3"}, - {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:de6d1d1b9e5101508cb37ab0d972357cac5235f5c6533d1071964c47139257df"}, - {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1278e0d324f6908e872730c9102b0112477a7f7cf88b308e4fc36ce1bdb6d58c"}, - {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:9a6b5099eeec78827553827f4c6b8615978bb4b6a88e5d9b93eddf8bb6790f55"}, - {file = "pydantic_core-2.23.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:e55541f756f9b3ee346b840103f32779c695a19826a4c442b7954550a0972040"}, - {file = "pydantic_core-2.23.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a5c7ba8ffb6d6f8f2ab08743be203654bb1aaa8c9dcb09f82ddd34eadb695605"}, - {file = "pydantic_core-2.23.4-cp39-none-win32.whl", hash = "sha256:37b0fe330e4a58d3c58b24d91d1eb102aeec675a3db4c292ec3928ecd892a9a6"}, - {file = "pydantic_core-2.23.4-cp39-none-win_amd64.whl", hash = "sha256:1498bec4c05c9c787bde9125cfdcc63a41004ff167f495063191b863399b1a29"}, - {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:f455ee30a9d61d3e1a15abd5068827773d6e4dc513e795f380cdd59932c782d5"}, - {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:1e90d2e3bd2c3863d48525d297cd143fe541be8bbf6f579504b9712cb6b643ec"}, - {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2e203fdf807ac7e12ab59ca2bfcabb38c7cf0b33c41efeb00f8e5da1d86af480"}, - {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e08277a400de01bc72436a0ccd02bdf596631411f592ad985dcee21445bd0068"}, - {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f220b0eea5965dec25480b6333c788fb72ce5f9129e8759ef876a1d805d00801"}, - {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:d06b0c8da4f16d1d1e352134427cb194a0a6e19ad5db9161bf32b2113409e728"}, - {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:ba1a0996f6c2773bd83e63f18914c1de3c9dd26d55f4ac302a7efe93fb8e7433"}, - {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:9a5bce9d23aac8f0cf0836ecfc033896aa8443b501c58d0602dbfd5bd5b37753"}, - {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:78ddaaa81421a29574a682b3179d4cf9e6d405a09b99d93ddcf7e5239c742e21"}, - {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:883a91b5dd7d26492ff2f04f40fbb652de40fcc0afe07e8129e8ae779c2110eb"}, - {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:88ad334a15b32a791ea935af224b9de1bf99bcd62fabf745d5f3442199d86d59"}, - {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:233710f069d251feb12a56da21e14cca67994eab08362207785cf8c598e74577"}, - {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:19442362866a753485ba5e4be408964644dd6a09123d9416c54cd49171f50744"}, - {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:624e278a7d29b6445e4e813af92af37820fafb6dcc55c012c834f9e26f9aaaef"}, - {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f5ef8f42bec47f21d07668a043f077d507e5bf4e668d5c6dfe6aaba89de1a5b8"}, - {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:aea443fffa9fbe3af1a9ba721a87f926fe548d32cab71d188a6ede77d0ff244e"}, - {file = "pydantic_core-2.23.4.tar.gz", hash = "sha256:2584f7cf844ac4d970fba483a717dbe10c1c1c96a969bf65d61ffe94df1b2863"}, + {file = "pydantic_core-2.41.5-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:77b63866ca88d804225eaa4af3e664c5faf3568cea95360d21f4725ab6e07146"}, + {file = "pydantic_core-2.41.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:dfa8a0c812ac681395907e71e1274819dec685fec28273a28905df579ef137e2"}, + {file = "pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5921a4d3ca3aee735d9fd163808f5e8dd6c6972101e4adbda9a4667908849b97"}, + {file = "pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e25c479382d26a2a41b7ebea1043564a937db462816ea07afa8a44c0866d52f9"}, + {file = "pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f547144f2966e1e16ae626d8ce72b4cfa0caedc7fa28052001c94fb2fcaa1c52"}, + {file = "pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6f52298fbd394f9ed112d56f3d11aabd0d5bd27beb3084cc3d8ad069483b8941"}, + {file = "pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:100baa204bb412b74fe285fb0f3a385256dad1d1879f0a5cb1499ed2e83d132a"}, + {file = "pydantic_core-2.41.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:05a2c8852530ad2812cb7914dc61a1125dc4e06252ee98e5638a12da6cc6fb6c"}, + {file = "pydantic_core-2.41.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:29452c56df2ed968d18d7e21f4ab0ac55e71dc59524872f6fc57dcf4a3249ed2"}, + {file = "pydantic_core-2.41.5-cp310-cp310-musllinux_1_1_armv7l.whl", hash = "sha256:d5160812ea7a8a2ffbe233d8da666880cad0cbaf5d4de74ae15c313213d62556"}, + {file = "pydantic_core-2.41.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:df3959765b553b9440adfd3c795617c352154e497a4eaf3752555cfb5da8fc49"}, + {file = "pydantic_core-2.41.5-cp310-cp310-win32.whl", hash = "sha256:1f8d33a7f4d5a7889e60dc39856d76d09333d8a6ed0f5f1190635cbec70ec4ba"}, + {file = "pydantic_core-2.41.5-cp310-cp310-win_amd64.whl", hash = "sha256:62de39db01b8d593e45871af2af9e497295db8d73b085f6bfd0b18c83c70a8f9"}, + {file = "pydantic_core-2.41.5-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:a3a52f6156e73e7ccb0f8cced536adccb7042be67cb45f9562e12b319c119da6"}, + {file = "pydantic_core-2.41.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:7f3bf998340c6d4b0c9a2f02d6a400e51f123b59565d74dc60d252ce888c260b"}, + {file = "pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:378bec5c66998815d224c9ca994f1e14c0c21cb95d2f52b6021cc0b2a58f2a5a"}, + {file = "pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e7b576130c69225432866fe2f4a469a85a54ade141d96fd396dffcf607b558f8"}, + {file = "pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6cb58b9c66f7e4179a2d5e0f849c48eff5c1fca560994d6eb6543abf955a149e"}, + {file = "pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:88942d3a3dff3afc8288c21e565e476fc278902ae4d6d134f1eeda118cc830b1"}, + {file = "pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f31d95a179f8d64d90f6831d71fa93290893a33148d890ba15de25642c5d075b"}, + {file = "pydantic_core-2.41.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c1df3d34aced70add6f867a8cf413e299177e0c22660cc767218373d0779487b"}, + {file = "pydantic_core-2.41.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:4009935984bd36bd2c774e13f9a09563ce8de4abaa7226f5108262fa3e637284"}, + {file = "pydantic_core-2.41.5-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:34a64bc3441dc1213096a20fe27e8e128bd3ff89921706e83c0b1ac971276594"}, + {file = "pydantic_core-2.41.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:c9e19dd6e28fdcaa5a1de679aec4141f691023916427ef9bae8584f9c2fb3b0e"}, + {file = "pydantic_core-2.41.5-cp311-cp311-win32.whl", hash = "sha256:2c010c6ded393148374c0f6f0bf89d206bf3217f201faa0635dcd56bd1520f6b"}, + {file = "pydantic_core-2.41.5-cp311-cp311-win_amd64.whl", hash = "sha256:76ee27c6e9c7f16f47db7a94157112a2f3a00e958bc626e2f4ee8bec5c328fbe"}, + {file = "pydantic_core-2.41.5-cp311-cp311-win_arm64.whl", hash = "sha256:4bc36bbc0b7584de96561184ad7f012478987882ebf9f9c389b23f432ea3d90f"}, + {file = "pydantic_core-2.41.5-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:f41a7489d32336dbf2199c8c0a215390a751c5b014c2c1c5366e817202e9cdf7"}, + {file = "pydantic_core-2.41.5-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:070259a8818988b9a84a449a2a7337c7f430a22acc0859c6b110aa7212a6d9c0"}, + {file = "pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e96cea19e34778f8d59fe40775a7a574d95816eb150850a85a7a4c8f4b94ac69"}, + {file = "pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ed2e99c456e3fadd05c991f8f437ef902e00eedf34320ba2b0842bd1c3ca3a75"}, + {file = "pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:65840751b72fbfd82c3c640cff9284545342a4f1eb1586ad0636955b261b0b05"}, + {file = "pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e536c98a7626a98feb2d3eaf75944ef6f3dbee447e1f841eae16f2f0a72d8ddc"}, + {file = "pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eceb81a8d74f9267ef4081e246ffd6d129da5d87e37a77c9bde550cb04870c1c"}, + {file = "pydantic_core-2.41.5-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d38548150c39b74aeeb0ce8ee1d8e82696f4a4e16ddc6de7b1d8823f7de4b9b5"}, + {file = "pydantic_core-2.41.5-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:c23e27686783f60290e36827f9c626e63154b82b116d7fe9adba1fda36da706c"}, + {file = "pydantic_core-2.41.5-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:482c982f814460eabe1d3bb0adfdc583387bd4691ef00b90575ca0d2b6fe2294"}, + {file = "pydantic_core-2.41.5-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:bfea2a5f0b4d8d43adf9d7b8bf019fb46fdd10a2e5cde477fbcb9d1fa08c68e1"}, + {file = "pydantic_core-2.41.5-cp312-cp312-win32.whl", hash = "sha256:b74557b16e390ec12dca509bce9264c3bbd128f8a2c376eaa68003d7f327276d"}, + {file = "pydantic_core-2.41.5-cp312-cp312-win_amd64.whl", hash = "sha256:1962293292865bca8e54702b08a4f26da73adc83dd1fcf26fbc875b35d81c815"}, + {file = "pydantic_core-2.41.5-cp312-cp312-win_arm64.whl", hash = "sha256:1746d4a3d9a794cacae06a5eaaccb4b8643a131d45fbc9af23e353dc0a5ba5c3"}, + {file = "pydantic_core-2.41.5-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:941103c9be18ac8daf7b7adca8228f8ed6bb7a1849020f643b3a14d15b1924d9"}, + {file = "pydantic_core-2.41.5-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:112e305c3314f40c93998e567879e887a3160bb8689ef3d2c04b6cc62c33ac34"}, + {file = "pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0cbaad15cb0c90aa221d43c00e77bb33c93e8d36e0bf74760cd00e732d10a6a0"}, + {file = "pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:03ca43e12fab6023fc79d28ca6b39b05f794ad08ec2feccc59a339b02f2b3d33"}, + {file = "pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:dc799088c08fa04e43144b164feb0c13f9a0bc40503f8df3e9fde58a3c0c101e"}, + {file = "pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:97aeba56665b4c3235a0e52b2c2f5ae9cd071b8a8310ad27bddb3f7fb30e9aa2"}, + {file = "pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:406bf18d345822d6c21366031003612b9c77b3e29ffdb0f612367352aab7d586"}, + {file = "pydantic_core-2.41.5-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b93590ae81f7010dbe380cdeab6f515902ebcbefe0b9327cc4804d74e93ae69d"}, + {file = "pydantic_core-2.41.5-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:01a3d0ab748ee531f4ea6c3e48ad9dac84ddba4b0d82291f87248f2f9de8d740"}, + {file = "pydantic_core-2.41.5-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:6561e94ba9dacc9c61bce40e2d6bdc3bfaa0259d3ff36ace3b1e6901936d2e3e"}, + {file = "pydantic_core-2.41.5-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:915c3d10f81bec3a74fbd4faebe8391013ba61e5a1a8d48c4455b923bdda7858"}, + {file = "pydantic_core-2.41.5-cp313-cp313-win32.whl", hash = "sha256:650ae77860b45cfa6e2cdafc42618ceafab3a2d9a3811fcfbd3bbf8ac3c40d36"}, + {file = "pydantic_core-2.41.5-cp313-cp313-win_amd64.whl", hash = "sha256:79ec52ec461e99e13791ec6508c722742ad745571f234ea6255bed38c6480f11"}, + {file = "pydantic_core-2.41.5-cp313-cp313-win_arm64.whl", hash = "sha256:3f84d5c1b4ab906093bdc1ff10484838aca54ef08de4afa9de0f5f14d69639cd"}, + {file = "pydantic_core-2.41.5-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:3f37a19d7ebcdd20b96485056ba9e8b304e27d9904d233d7b1015db320e51f0a"}, + {file = "pydantic_core-2.41.5-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:1d1d9764366c73f996edd17abb6d9d7649a7eb690006ab6adbda117717099b14"}, + {file = "pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:25e1c2af0fce638d5f1988b686f3b3ea8cd7de5f244ca147c777769e798a9cd1"}, + {file = "pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:506d766a8727beef16b7adaeb8ee6217c64fc813646b424d0804d67c16eddb66"}, + {file = "pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4819fa52133c9aa3c387b3328f25c1facc356491e6135b459f1de698ff64d869"}, + {file = "pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2b761d210c9ea91feda40d25b4efe82a1707da2ef62901466a42492c028553a2"}, + {file = "pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:22f0fb8c1c583a3b6f24df2470833b40207e907b90c928cc8d3594b76f874375"}, + {file = "pydantic_core-2.41.5-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2782c870e99878c634505236d81e5443092fba820f0373997ff75f90f68cd553"}, + {file = "pydantic_core-2.41.5-cp314-cp314-musllinux_1_1_aarch64.whl", hash = "sha256:0177272f88ab8312479336e1d777f6b124537d47f2123f89cb37e0accea97f90"}, + {file = "pydantic_core-2.41.5-cp314-cp314-musllinux_1_1_armv7l.whl", hash = "sha256:63510af5e38f8955b8ee5687740d6ebf7c2a0886d15a6d65c32814613681bc07"}, + {file = "pydantic_core-2.41.5-cp314-cp314-musllinux_1_1_x86_64.whl", hash = "sha256:e56ba91f47764cc14f1daacd723e3e82d1a89d783f0f5afe9c364b8bb491ccdb"}, + {file = "pydantic_core-2.41.5-cp314-cp314-win32.whl", hash = "sha256:aec5cf2fd867b4ff45b9959f8b20ea3993fc93e63c7363fe6851424c8a7e7c23"}, + {file = "pydantic_core-2.41.5-cp314-cp314-win_amd64.whl", hash = "sha256:8e7c86f27c585ef37c35e56a96363ab8de4e549a95512445b85c96d3e2f7c1bf"}, + {file = "pydantic_core-2.41.5-cp314-cp314-win_arm64.whl", hash = "sha256:e672ba74fbc2dc8eea59fb6d4aed6845e6905fc2a8afe93175d94a83ba2a01a0"}, + {file = "pydantic_core-2.41.5-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:8566def80554c3faa0e65ac30ab0932b9e3a5cd7f8323764303d468e5c37595a"}, + {file = "pydantic_core-2.41.5-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:b80aa5095cd3109962a298ce14110ae16b8c1aece8b72f9dafe81cf597ad80b3"}, + {file = "pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3006c3dd9ba34b0c094c544c6006cc79e87d8612999f1a5d43b769b89181f23c"}, + {file = "pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:72f6c8b11857a856bcfa48c86f5368439f74453563f951e473514579d44aa612"}, + {file = "pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5cb1b2f9742240e4bb26b652a5aeb840aa4b417c7748b6f8387927bc6e45e40d"}, + {file = "pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bd3d54f38609ff308209bd43acea66061494157703364ae40c951f83ba99a1a9"}, + {file = "pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2ff4321e56e879ee8d2a879501c8e469414d948f4aba74a2d4593184eb326660"}, + {file = "pydantic_core-2.41.5-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d0d2568a8c11bf8225044aa94409e21da0cb09dcdafe9ecd10250b2baad531a9"}, + {file = "pydantic_core-2.41.5-cp314-cp314t-musllinux_1_1_aarch64.whl", hash = "sha256:a39455728aabd58ceabb03c90e12f71fd30fa69615760a075b9fec596456ccc3"}, + {file = "pydantic_core-2.41.5-cp314-cp314t-musllinux_1_1_armv7l.whl", hash = "sha256:239edca560d05757817c13dc17c50766136d21f7cd0fac50295499ae24f90fdf"}, + {file = "pydantic_core-2.41.5-cp314-cp314t-musllinux_1_1_x86_64.whl", hash = "sha256:2a5e06546e19f24c6a96a129142a75cee553cc018ffee48a460059b1185f4470"}, + {file = "pydantic_core-2.41.5-cp314-cp314t-win32.whl", hash = "sha256:b4ececa40ac28afa90871c2cc2b9ffd2ff0bf749380fbdf57d165fd23da353aa"}, + {file = "pydantic_core-2.41.5-cp314-cp314t-win_amd64.whl", hash = "sha256:80aa89cad80b32a912a65332f64a4450ed00966111b6615ca6816153d3585a8c"}, + {file = "pydantic_core-2.41.5-cp314-cp314t-win_arm64.whl", hash = "sha256:35b44f37a3199f771c3eaa53051bc8a70cd7b54f333531c59e29fd4db5d15008"}, + {file = "pydantic_core-2.41.5-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:8bfeaf8735be79f225f3fefab7f941c712aaca36f1128c9d7e2352ee1aa87bdf"}, + {file = "pydantic_core-2.41.5-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:346285d28e4c8017da95144c7f3acd42740d637ff41946af5ce6e5e420502dd5"}, + {file = "pydantic_core-2.41.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a75dafbf87d6276ddc5b2bf6fae5254e3d0876b626eb24969a574fff9149ee5d"}, + {file = "pydantic_core-2.41.5-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:7b93a4d08587e2b7e7882de461e82b6ed76d9026ce91ca7915e740ecc7855f60"}, + {file = "pydantic_core-2.41.5-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e8465ab91a4bd96d36dde3263f06caa6a8a6019e4113f24dc753d79a8b3a3f82"}, + {file = "pydantic_core-2.41.5-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:299e0a22e7ae2b85c1a57f104538b2656e8ab1873511fd718a1c1c6f149b77b5"}, + {file = "pydantic_core-2.41.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:707625ef0983fcfb461acfaf14de2067c5942c6bb0f3b4c99158bed6fedd3cf3"}, + {file = "pydantic_core-2.41.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f41eb9797986d6ebac5e8edff36d5cef9de40def462311b3eb3eeded1431e425"}, + {file = "pydantic_core-2.41.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0384e2e1021894b1ff5a786dbf94771e2986ebe2869533874d7e43bc79c6f504"}, + {file = "pydantic_core-2.41.5-cp39-cp39-musllinux_1_1_armv7l.whl", hash = "sha256:f0cd744688278965817fd0839c4a4116add48d23890d468bc436f78beb28abf5"}, + {file = "pydantic_core-2.41.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:753e230374206729bf0a807954bcc6c150d3743928a73faffee51ac6557a03c3"}, + {file = "pydantic_core-2.41.5-cp39-cp39-win32.whl", hash = "sha256:873e0d5b4fb9b89ef7c2d2a963ea7d02879d9da0da8d9d4933dee8ee86a8b460"}, + {file = "pydantic_core-2.41.5-cp39-cp39-win_amd64.whl", hash = "sha256:e4f4a984405e91527a0d62649ee21138f8e3d0ef103be488c1dc11a80d7f184b"}, + {file = "pydantic_core-2.41.5-graalpy311-graalpy242_311_native-macosx_10_12_x86_64.whl", hash = "sha256:b96d5f26b05d03cc60f11a7761a5ded1741da411e7fe0909e27a5e6a0cb7b034"}, + {file = "pydantic_core-2.41.5-graalpy311-graalpy242_311_native-macosx_11_0_arm64.whl", hash = "sha256:634e8609e89ceecea15e2d61bc9ac3718caaaa71963717bf3c8f38bfde64242c"}, + {file = "pydantic_core-2.41.5-graalpy311-graalpy242_311_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:93e8740d7503eb008aa2df04d3b9735f845d43ae845e6dcd2be0b55a2da43cd2"}, + {file = "pydantic_core-2.41.5-graalpy311-graalpy242_311_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f15489ba13d61f670dcc96772e733aad1a6f9c429cc27574c6cdaed82d0146ad"}, + {file = "pydantic_core-2.41.5-graalpy312-graalpy250_312_native-macosx_10_12_x86_64.whl", hash = "sha256:7da7087d756b19037bc2c06edc6c170eeef3c3bafcb8f532ff17d64dc427adfd"}, + {file = "pydantic_core-2.41.5-graalpy312-graalpy250_312_native-macosx_11_0_arm64.whl", hash = "sha256:aabf5777b5c8ca26f7824cb4a120a740c9588ed58df9b2d196ce92fba42ff8dc"}, + {file = "pydantic_core-2.41.5-graalpy312-graalpy250_312_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c007fe8a43d43b3969e8469004e9845944f1a80e6acd47c150856bb87f230c56"}, + {file = "pydantic_core-2.41.5-graalpy312-graalpy250_312_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:76d0819de158cd855d1cbb8fcafdf6f5cf1eb8e470abe056d5d161106e38062b"}, + {file = "pydantic_core-2.41.5-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:b5819cd790dbf0c5eb9f82c73c16b39a65dd6dd4d1439dcdea7816ec9adddab8"}, + {file = "pydantic_core-2.41.5-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:5a4e67afbc95fa5c34cf27d9089bca7fcab4e51e57278d710320a70b956d1b9a"}, + {file = "pydantic_core-2.41.5-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ece5c59f0ce7d001e017643d8d24da587ea1f74f6993467d85ae8a5ef9d4f42b"}, + {file = "pydantic_core-2.41.5-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:16f80f7abe3351f8ea6858914ddc8c77e02578544a0ebc15b4c2e1a0e813b0b2"}, + {file = "pydantic_core-2.41.5-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:33cb885e759a705b426baada1fe68cbb0a2e68e34c5d0d0289a364cf01709093"}, + {file = "pydantic_core-2.41.5-pp310-pypy310_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:c8d8b4eb992936023be7dee581270af5c6e0697a8559895f527f5b7105ecd36a"}, + {file = "pydantic_core-2.41.5-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:242a206cd0318f95cd21bdacff3fcc3aab23e79bba5cac3db5a841c9ef9c6963"}, + {file = "pydantic_core-2.41.5-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:d3a978c4f57a597908b7e697229d996d77a6d3c94901e9edee593adada95ce1a"}, + {file = "pydantic_core-2.41.5-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:b2379fa7ed44ddecb5bfe4e48577d752db9fc10be00a6b7446e9663ba143de26"}, + {file = "pydantic_core-2.41.5-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:266fb4cbf5e3cbd0b53669a6d1b039c45e3ce651fd5442eff4d07c2cc8d66808"}, + {file = "pydantic_core-2.41.5-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:58133647260ea01e4d0500089a8c4f07bd7aa6ce109682b1426394988d8aaacc"}, + {file = "pydantic_core-2.41.5-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:287dad91cfb551c363dc62899a80e9e14da1f0e2b6ebde82c806612ca2a13ef1"}, + {file = "pydantic_core-2.41.5-pp311-pypy311_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:03b77d184b9eb40240ae9fd676ca364ce1085f203e1b1256f8ab9984dca80a84"}, + {file = "pydantic_core-2.41.5-pp311-pypy311_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:a668ce24de96165bb239160b3d854943128f4334822900534f2fe947930e5770"}, + {file = "pydantic_core-2.41.5-pp311-pypy311_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f14f8f046c14563f8eb3f45f499cc658ab8d10072961e07225e507adb700e93f"}, + {file = "pydantic_core-2.41.5-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:56121965f7a4dc965bff783d70b907ddf3d57f6eba29b6d2e5dabfaf07799c51"}, + {file = "pydantic_core-2.41.5.tar.gz", hash = "sha256:08daa51ea16ad373ffd5e7606252cc32f07bc72b28284b6bc9c6df804816476e"}, ] [package.dependencies] -typing-extensions = ">=4.6.0,<4.7.0 || >4.7.0" +typing-extensions = ">=4.14.1" + +[[package]] +name = "pygments" +version = "2.20.0" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.9" +files = [ + {file = "pygments-2.20.0-py3-none-any.whl", hash = "sha256:81a9e26dd42fd28a23a2d169d86d7ac03b46e2f8b59ed4698fb4785f946d0176"}, + {file = "pygments-2.20.0.tar.gz", hash = "sha256:6757cd03768053ff99f3039c1a36d6c0aa0b263438fcab17520b30a303a82b5f"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.4.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.4.0-py3-none-any.whl", hash = "sha256:933ca923a23075a87fb7070c0ec272a6848489824d887c85c812670932835aa1"}, + {file = "pytest_asyncio-1.4.0.tar.gz", hash = "sha256:c6c0d2259945122819f171a32ecea2c349ead889ee28176caaf492143424be42"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.4,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)", "sphinx-tabs (>=3.5)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] +[[package]] +name = "pytest-xdist" +version = "3.8.0" +description = "pytest xdist plugin for distributed testing, most importantly across multiple CPUs" +optional = false +python-versions = ">=3.9" +files = [ + {file = "pytest_xdist-3.8.0-py3-none-any.whl", hash = "sha256:202ca578cfeb7370784a8c33d6d05bc6e13b4f25b5053c30a152269fd10f0b88"}, + {file = "pytest_xdist-3.8.0.tar.gz", hash = "sha256:7e578125ec9bc6050861aa93f2d59f1d8d085595d6551c2c90b6f4fad8d3a9f1"}, +] + +[package.dependencies] +execnet = ">=2.1" +pytest = ">=7.0.0" + +[package.extras] +psutil = ["psutil (>=3.0)"] +setproctitle = ["setproctitle"] +testing = ["filelock"] + [[package]] name = "python-dateutil" version = "2.9.0.post0" @@ -417,87 +1144,256 @@ six = ">=1.5" [[package]] name = "ruff" -version = "0.5.7" +version = "0.11.5" description = "An extremely fast Python linter and code formatter, written in Rust." optional = false python-versions = ">=3.7" files = [ - {file = "ruff-0.5.7-py3-none-linux_armv6l.whl", hash = "sha256:548992d342fc404ee2e15a242cdbea4f8e39a52f2e7752d0e4cbe88d2d2f416a"}, - {file = "ruff-0.5.7-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:00cc8872331055ee017c4f1071a8a31ca0809ccc0657da1d154a1d2abac5c0be"}, - {file = "ruff-0.5.7-py3-none-macosx_11_0_arm64.whl", hash = "sha256:eaf3d86a1fdac1aec8a3417a63587d93f906c678bb9ed0b796da7b59c1114a1e"}, - {file = "ruff-0.5.7-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a01c34400097b06cf8a6e61b35d6d456d5bd1ae6961542de18ec81eaf33b4cb8"}, - {file = "ruff-0.5.7-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:fcc8054f1a717e2213500edaddcf1dbb0abad40d98e1bd9d0ad364f75c763eea"}, - {file = "ruff-0.5.7-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7f70284e73f36558ef51602254451e50dd6cc479f8b6f8413a95fcb5db4a55fc"}, - {file = "ruff-0.5.7-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:a78ad870ae3c460394fc95437d43deb5c04b5c29297815a2a1de028903f19692"}, - {file = "ruff-0.5.7-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9ccd078c66a8e419475174bfe60a69adb36ce04f8d4e91b006f1329d5cd44bcf"}, - {file = "ruff-0.5.7-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7e31c9bad4ebf8fdb77b59cae75814440731060a09a0e0077d559a556453acbb"}, - {file = "ruff-0.5.7-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8d796327eed8e168164346b769dd9a27a70e0298d667b4ecee6877ce8095ec8e"}, - {file = "ruff-0.5.7-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:4a09ea2c3f7778cc635e7f6edf57d566a8ee8f485f3c4454db7771efb692c499"}, - {file = "ruff-0.5.7-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:a36d8dcf55b3a3bc353270d544fb170d75d2dff41eba5df57b4e0b67a95bb64e"}, - {file = "ruff-0.5.7-py3-none-musllinux_1_2_i686.whl", hash = "sha256:9369c218f789eefbd1b8d82a8cf25017b523ac47d96b2f531eba73770971c9e5"}, - {file = "ruff-0.5.7-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:b88ca3db7eb377eb24fb7c82840546fb7acef75af4a74bd36e9ceb37a890257e"}, - {file = "ruff-0.5.7-py3-none-win32.whl", hash = "sha256:33d61fc0e902198a3e55719f4be6b375b28f860b09c281e4bdbf783c0566576a"}, - {file = "ruff-0.5.7-py3-none-win_amd64.whl", hash = "sha256:083bbcbe6fadb93cd86709037acc510f86eed5a314203079df174c40bbbca6b3"}, - {file = "ruff-0.5.7-py3-none-win_arm64.whl", hash = "sha256:2dca26154ff9571995107221d0aeaad0e75a77b5a682d6236cf89a58c70b76f4"}, - {file = "ruff-0.5.7.tar.gz", hash = "sha256:8dfc0a458797f5d9fb622dd0efc52d796f23f0a1493a9527f4e49a550ae9a7e5"}, + {file = "ruff-0.11.5-py3-none-linux_armv6l.whl", hash = "sha256:2561294e108eb648e50f210671cc56aee590fb6167b594144401532138c66c7b"}, + {file = "ruff-0.11.5-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:ac12884b9e005c12d0bd121f56ccf8033e1614f736f766c118ad60780882a077"}, + {file = "ruff-0.11.5-py3-none-macosx_11_0_arm64.whl", hash = "sha256:4bfd80a6ec559a5eeb96c33f832418bf0fb96752de0539905cf7b0cc1d31d779"}, + {file = "ruff-0.11.5-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0947c0a1afa75dcb5db4b34b070ec2bccee869d40e6cc8ab25aca11a7d527794"}, + {file = "ruff-0.11.5-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ad871ff74b5ec9caa66cb725b85d4ef89b53f8170f47c3406e32ef040400b038"}, + {file = "ruff-0.11.5-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e6cf918390cfe46d240732d4d72fa6e18e528ca1f60e318a10835cf2fa3dc19f"}, + {file = "ruff-0.11.5-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:56145ee1478582f61c08f21076dc59153310d606ad663acc00ea3ab5b2125f82"}, + {file = "ruff-0.11.5-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e5f66f8f1e8c9fc594cbd66fbc5f246a8d91f916cb9667e80208663ec3728304"}, + {file = "ruff-0.11.5-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:80b4df4d335a80315ab9afc81ed1cff62be112bd165e162b5eed8ac55bfc8470"}, + {file = "ruff-0.11.5-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3068befab73620b8a0cc2431bd46b3cd619bc17d6f7695a3e1bb166b652c382a"}, + {file = "ruff-0.11.5-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:f5da2e710a9641828e09aa98b92c9ebbc60518fdf3921241326ca3e8f8e55b8b"}, + {file = "ruff-0.11.5-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:ef39f19cb8ec98cbc762344921e216f3857a06c47412030374fffd413fb8fd3a"}, + {file = "ruff-0.11.5-py3-none-musllinux_1_2_i686.whl", hash = "sha256:b2a7cedf47244f431fd11aa5a7e2806dda2e0c365873bda7834e8f7d785ae159"}, + {file = "ruff-0.11.5-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:81be52e7519f3d1a0beadcf8e974715b2dfc808ae8ec729ecfc79bddf8dbb783"}, + {file = "ruff-0.11.5-py3-none-win32.whl", hash = "sha256:e268da7b40f56e3eca571508a7e567e794f9bfcc0f412c4b607931d3af9c4afe"}, + {file = "ruff-0.11.5-py3-none-win_amd64.whl", hash = "sha256:6c6dc38af3cfe2863213ea25b6dc616d679205732dc0fb673356c2d69608f800"}, + {file = "ruff-0.11.5-py3-none-win_arm64.whl", hash = "sha256:67e241b4314f4eacf14a601d586026a962f4002a475aa702c69980a38087aa4e"}, + {file = "ruff-0.11.5.tar.gz", hash = "sha256:cae2e2439cb88853e421901ec040a758960b576126dab520fa08e9de431d1bef"}, ] [[package]] name = "six" -version = "1.16.0" +version = "1.17.0" description = "Python 2 and 3 compatibility utilities" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" -files = [ - {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, - {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, -] - -[[package]] -name = "sniffio" -version = "1.3.1" -description = "Sniff out which async library your code is running under" -optional = false -python-versions = ">=3.7" +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" files = [ - {file = "sniffio-1.3.1-py3-none-any.whl", hash = "sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2"}, - {file = "sniffio-1.3.1.tar.gz", hash = "sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc"}, + {file = "six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274"}, + {file = "six-1.17.0.tar.gz", hash = "sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81"}, ] [[package]] name = "tomli" -version = "2.0.2" +version = "2.4.1" description = "A lil' TOML parser" optional = false python-versions = ">=3.8" files = [ - {file = "tomli-2.0.2-py3-none-any.whl", hash = "sha256:2ebe24485c53d303f690b0ec092806a085f07af5a5aa1464f3931eec36caaa38"}, - {file = "tomli-2.0.2.tar.gz", hash = "sha256:d46d457a85337051c36524bc5349dd91b1877838e2979ac5ced3e710ed8a60ed"}, + {file = "tomli-2.4.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f8f0fc26ec2cc2b965b7a3b87cd19c5c6b8c5e5f436b984e85f486d652285c30"}, + {file = "tomli-2.4.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4ab97e64ccda8756376892c53a72bd1f964e519c77236368527f758fbc36a53a"}, + {file = "tomli-2.4.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:96481a5786729fd470164b47cdb3e0e58062a496f455ee41b4403be77cb5a076"}, + {file = "tomli-2.4.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5a881ab208c0baf688221f8cecc5401bd291d67e38a1ac884d6736cbcd8247e9"}, + {file = "tomli-2.4.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:47149d5bd38761ac8be13a84864bf0b7b70bc051806bc3669ab1cbc56216b23c"}, + {file = "tomli-2.4.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:ec9bfaf3ad2df51ace80688143a6a4ebc09a248f6ff781a9945e51937008fcbc"}, + {file = "tomli-2.4.1-cp311-cp311-win32.whl", hash = "sha256:ff2983983d34813c1aeb0fa89091e76c3a22889ee83ab27c5eeb45100560c049"}, + {file = "tomli-2.4.1-cp311-cp311-win_amd64.whl", hash = "sha256:5ee18d9ebdb417e384b58fe414e8d6af9f4e7a0ae761519fb50f721de398dd4e"}, + {file = "tomli-2.4.1-cp311-cp311-win_arm64.whl", hash = "sha256:c2541745709bad0264b7d4705ad453b76ccd191e64aa6f0fc66b69a293a45ece"}, + {file = "tomli-2.4.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:c742f741d58a28940ce01d58f0ab2ea3ced8b12402f162f4d534dfe18ba1cd6a"}, + {file = "tomli-2.4.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:7f86fd587c4ed9dd76f318225e7d9b29cfc5a9d43de44e5754db8d1128487085"}, + {file = "tomli-2.4.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ff18e6a727ee0ab0388507b89d1bc6a22b138d1e2fa56d1ad494586d61d2eae9"}, + {file = "tomli-2.4.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:136443dbd7e1dee43c68ac2694fde36b2849865fa258d39bf822c10e8068eac5"}, + {file = "tomli-2.4.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:5e262d41726bc187e69af7825504c933b6794dc3fbd5945e41a79bb14c31f585"}, + {file = "tomli-2.4.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:5cb41aa38891e073ee49d55fbc7839cfdb2bc0e600add13874d048c94aadddd1"}, + {file = "tomli-2.4.1-cp312-cp312-win32.whl", hash = "sha256:da25dc3563bff5965356133435b757a795a17b17d01dbc0f42fb32447ddfd917"}, + {file = "tomli-2.4.1-cp312-cp312-win_amd64.whl", hash = "sha256:52c8ef851d9a240f11a88c003eacb03c31fc1c9c4ec64a99a0f922b93874fda9"}, + {file = "tomli-2.4.1-cp312-cp312-win_arm64.whl", hash = "sha256:f758f1b9299d059cc3f6546ae2af89670cb1c4d48ea29c3cacc4fe7de3058257"}, + {file = "tomli-2.4.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:36d2bd2ad5fb9eaddba5226aa02c8ec3fa4f192631e347b3ed28186d43be6b54"}, + {file = "tomli-2.4.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:eb0dc4e38e6a1fd579e5d50369aa2e10acfc9cace504579b2faabb478e76941a"}, + {file = "tomli-2.4.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c7f2c7f2b9ca6bdeef8f0fa897f8e05085923eb091721675170254cbc5b02897"}, + {file = "tomli-2.4.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f3c6818a1a86dd6dca7ddcaaf76947d5ba31aecc28cb1b67009a5877c9a64f3f"}, + {file = "tomli-2.4.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:d312ef37c91508b0ab2cee7da26ec0b3ed2f03ce12bd87a588d771ae15dcf82d"}, + {file = "tomli-2.4.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:51529d40e3ca50046d7606fa99ce3956a617f9b36380da3b7f0dd3dd28e68cb5"}, + {file = "tomli-2.4.1-cp313-cp313-win32.whl", hash = "sha256:2190f2e9dd7508d2a90ded5ed369255980a1bcdd58e52f7fe24b8162bf9fedbd"}, + {file = "tomli-2.4.1-cp313-cp313-win_amd64.whl", hash = "sha256:8d65a2fbf9d2f8352685bc1364177ee3923d6baf5e7f43ea4959d7d8bc326a36"}, + {file = "tomli-2.4.1-cp313-cp313-win_arm64.whl", hash = "sha256:4b605484e43cdc43f0954ddae319fb75f04cc10dd80d830540060ee7cd0243cd"}, + {file = "tomli-2.4.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:fd0409a3653af6c147209d267a0e4243f0ae46b011aa978b1080359fddc9b6cf"}, + {file = "tomli-2.4.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:a120733b01c45e9a0c34aeef92bf0cf1d56cfe81ed9d47d562f9ed591a9828ac"}, + {file = "tomli-2.4.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:559db847dc486944896521f68d8190be1c9e719fced785720d2216fe7022b662"}, + {file = "tomli-2.4.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:01f520d4f53ef97964a240a035ec2a869fe1a37dde002b57ebc4417a27ccd853"}, + {file = "tomli-2.4.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:7f94b27a62cfad8496c8d2513e1a222dd446f095fca8987fceef261225538a15"}, + {file = "tomli-2.4.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:ede3e6487c5ef5d28634ba3f31f989030ad6af71edfb0055cbbd14189ff240ba"}, + {file = "tomli-2.4.1-cp314-cp314-win32.whl", hash = "sha256:3d48a93ee1c9b79c04bb38772ee1b64dcf18ff43085896ea460ca8dec96f35f6"}, + {file = "tomli-2.4.1-cp314-cp314-win_amd64.whl", hash = "sha256:88dceee75c2c63af144e456745e10101eb67361050196b0b6af5d717254dddf7"}, + {file = "tomli-2.4.1-cp314-cp314-win_arm64.whl", hash = "sha256:b8c198f8c1805dc42708689ed6864951fd2494f924149d3e4bce7710f8eb5232"}, + {file = "tomli-2.4.1-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:d4d8fe59808a54658fcc0160ecfb1b30f9089906c50b23bcb4c69eddc19ec2b4"}, + {file = "tomli-2.4.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:7008df2e7655c495dd12d2a4ad038ff878d4ca4b81fccaf82b714e07eae4402c"}, + {file = "tomli-2.4.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1d8591993e228b0c930c4bb0db464bdad97b3289fb981255d6c9a41aedc84b2d"}, + {file = "tomli-2.4.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:734e20b57ba95624ecf1841e72b53f6e186355e216e5412de414e3c51e5e3c41"}, + {file = "tomli-2.4.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:8a650c2dbafa08d42e51ba0b62740dae4ecb9338eefa093aa5c78ceb546fcd5c"}, + {file = "tomli-2.4.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:504aa796fe0569bb43171066009ead363de03675276d2d121ac1a4572397870f"}, + {file = "tomli-2.4.1-cp314-cp314t-win32.whl", hash = "sha256:b1d22e6e9387bf4739fbe23bfa80e93f6b0373a7f1b96c6227c32bef95a4d7a8"}, + {file = "tomli-2.4.1-cp314-cp314t-win_amd64.whl", hash = "sha256:2c1c351919aca02858f740c6d33adea0c5deea37f9ecca1cc1ef9e884a619d26"}, + {file = "tomli-2.4.1-cp314-cp314t-win_arm64.whl", hash = "sha256:eab21f45c7f66c13f2a9e0e1535309cee140182a9cdae1e041d02e47291e8396"}, + {file = "tomli-2.4.1-py3-none-any.whl", hash = "sha256:0d85819802132122da43cb86656f8d1f8c6587d54ae7dcaf30e90533028b49fe"}, + {file = "tomli-2.4.1.tar.gz", hash = "sha256:7c7e1a961a0b2f2472c1ac5b69affa0ae1132c39adcb67aba98568702b9cc23f"}, ] [[package]] name = "types-python-dateutil" -version = "2.9.0.20241003" +version = "2.9.0.20260518" description = "Typing stubs for python-dateutil" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "types-python-dateutil-2.9.0.20241003.tar.gz", hash = "sha256:58cb85449b2a56d6684e41aeefb4c4280631246a0da1a719bdbe6f3fb0317446"}, - {file = "types_python_dateutil-2.9.0.20241003-py3-none-any.whl", hash = "sha256:250e1d8e80e7bbc3a6c99b907762711d1a1cdd00e978ad39cb5940f6f0a87f3d"}, + {file = "types_python_dateutil-2.9.0.20260518-py3-none-any.whl", hash = "sha256:d6a9c5bd0de61460c8fdef8ab2b400f956a1a1075cce08d4e2b4434e478c50b8"}, + {file = "types_python_dateutil-2.9.0.20260518.tar.gz", hash = "sha256:51f02dc03b61c7f6a07df45797d4dfe8a1aa47f0b7db9ad89f6fd3a1a70e1b51"}, ] [[package]] name = "typing-extensions" -version = "4.12.2" -description = "Backported and Experimental Type Hints for Python 3.8+" +version = "4.15.0" +description = "Backported and Experimental Type Hints for Python 3.9+" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" +files = [ + {file = "typing_extensions-4.15.0-py3-none-any.whl", hash = "sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548"}, + {file = "typing_extensions-4.15.0.tar.gz", hash = "sha256:0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466"}, +] + +[[package]] +name = "typing-inspection" +version = "0.4.2" +description = "Runtime typing introspection tools" +optional = false +python-versions = ">=3.9" files = [ - {file = "typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"}, - {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"}, + {file = "typing_inspection-0.4.2-py3-none-any.whl", hash = "sha256:4ed1cacbdc298c220f1bd249ed5287caa16f34d44ef4e9c3d0cbad5b521545e7"}, + {file = "typing_inspection-0.4.2.tar.gz", hash = "sha256:ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464"}, ] +[package.dependencies] +typing-extensions = ">=4.12.0" + +[[package]] +name = "yarl" +version = "1.24.2" +description = "Yet another URL library" +optional = true +python-versions = ">=3.10" +files = [ + {file = "yarl-1.24.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:5249a113065c2b7a958bc699759e359cd61cfc81e3069662208f48f191b7ed12"}, + {file = "yarl-1.24.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:7f4425fa244fbf530b006d0c5f79ce920114cfff5b4f5f6056e669f8e160fdc0"}, + {file = "yarl-1.24.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:15c0b5e49d3c44e2a0b93e6a49476c5edad0a7686b92c395765a7ea775572a75"}, + {file = "yarl-1.24.2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:246d32a53a947c8f0189f5d699cbd4c7036de45d9359e13ba238d1239678c727"}, + {file = "yarl-1.24.2-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:64480fb3e4d4ed9ed71c48a91a477384fc342a50ca30071d2f8a88d51d9c9413"}, + {file = "yarl-1.24.2-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:349de4701dc3760b6e876628423a8f147ef4f5599d10aba1e10702075d424ed9"}, + {file = "yarl-1.24.2-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d162677af8d5d3d6ebab8394b021f4d041ac107a4b705873148a77a49dc9e1b2"}, + {file = "yarl-1.24.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f5f5c6ec23a9043f2d139cc072f53dd23168d202a334b9b2fda8de4c3e890d90"}, + {file = "yarl-1.24.2-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:60de6742447fbbf697f16f070b8a443f1b5fe6ca3826fbef9fe70ecd5328e643"}, + {file = "yarl-1.24.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:acf93187c3710e422368eb768aee98db551ec7c85adc250207a95c16548ab7ac"}, + {file = "yarl-1.24.2-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:f4b0352fd41fd34b6651934606268816afd6914d09626f9bcbbf018edb0afb3f"}, + {file = "yarl-1.24.2-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:6b208bb939099b4b297438da4e9b25357f0b1c791888669b963e45b203ea9f36"}, + {file = "yarl-1.24.2-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:4b85b8825e631295ff4bc8943f7471d54c533a9360bbe15ebb38e018b555bb8a"}, + {file = "yarl-1.24.2-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:e26acf20c26cb4fefc631fdb75aca2a6b8fa8b7b5d7f204fb6a8f1e63c706f53"}, + {file = "yarl-1.24.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:819ca24f8eafcfb683c1bd5f44f2f488cea1274eb8944731ffd2e1f10f619342"}, + {file = "yarl-1.24.2-cp310-cp310-win_amd64.whl", hash = "sha256:5cb0f995a901c36be096ccbf4c673591c2faabbe96279598ffaec8c030f85bf4"}, + {file = "yarl-1.24.2-cp310-cp310-win_arm64.whl", hash = "sha256:f408eace7e22a68b467a0562e0d27d322f91fe3eaaa6f466b962c6cfaea9fa39"}, + {file = "yarl-1.24.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:36348bebb147b83818b9d7e673ea4debc75970afc6ffdc7e3975ad05ce5a58c1"}, + {file = "yarl-1.24.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1a97e42c8a2233f2f279ecadd9e4a037bcb5d813b78435e8eedd4db5a9e9708c"}, + {file = "yarl-1.24.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:8d027d56f1035e339d1001ac33eceab5b2ec8e42e449787bb75e289fb9a5cd1d"}, + {file = "yarl-1.24.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0a6377060e7927187a42b7eb202090cbe2b34933a4eeaf90e3bd9e33432e5cae"}, + {file = "yarl-1.24.2-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:17076578bce0049a5ce57d14ad1bded391b68a3b213e9b81b0097b090244999a"}, + {file = "yarl-1.24.2-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:50713f1d4d6be6375bb178bb43d140ee1acb8abe589cd723320b7925a275be1e"}, + {file = "yarl-1.24.2-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:34263e2fa8fb5bb63a0d97706cda38edbad62fddb58c7f12d6acbc092812aa50"}, + {file = "yarl-1.24.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:49016d82f032b1bd1e10b01078a7d29ae71bf468eeae0ea22df8bab691e60003"}, + {file = "yarl-1.24.2-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:3f6d2c216318f8f32038ca3f72501ba08536f0fd18a36e858836b121b2deed9f"}, + {file = "yarl-1.24.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:08d3a33218e0c64393e7610284e770409a9c31c429b078bcb24096ed0a783b8f"}, + {file = "yarl-1.24.2-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:5d699376c4ca3cba49bbfae3a05b5b70ded572937171ce1e0b8d87118e2ba294"}, + {file = "yarl-1.24.2-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:a1cab588b4fa14bea2e55ebea27478adfb05372f47573738e1acc4a36c0b05d2"}, + {file = "yarl-1.24.2-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:ec87ccc31bd21db7ad009d8572c127c1000f268517618a4cc09adba3c2a7f21c"}, + {file = "yarl-1.24.2-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:d1dd47a22843b212baa8d74f37796815d43bd046b42a0f41e9da433386c3136b"}, + {file = "yarl-1.24.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:7b54b9c67c2b06bd7b9a77253d242124b9c95d2c02def5a1144001ee547dd9d5"}, + {file = "yarl-1.24.2-cp311-cp311-win_amd64.whl", hash = "sha256:f8fdbcff8b2c7c9284e60c196f693588598ddcee31e11c18e14949ce44519d45"}, + {file = "yarl-1.24.2-cp311-cp311-win_arm64.whl", hash = "sha256:b32c37a7a337e90822c45797bf3d79d60875cfcccd3ecc80e9f453d87026c122"}, + {file = "yarl-1.24.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:b975866c184564c827e0877380f0dae57dcca7e52782128381b72feff6dfceb8"}, + {file = "yarl-1.24.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:3b075301a2836a0e297b1b658cb6d6135df535d62efefdd60366bd589c2c82f2"}, + {file = "yarl-1.24.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8ae44649b00947634ab0dab2a374a638f52923a6e67083f2c156cd5cbd1a881d"}, + {file = "yarl-1.24.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:507cc19f0b45454e2d6dcd62ff7d062b9f77a2812404e62dbdaec05b50faa035"}, + {file = "yarl-1.24.2-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c4c17bad5a530912d2111825d3f05e89bab2dd376aaa8cbc77e449e6db63e576"}, + {file = "yarl-1.24.2-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f5f0cbb112838a4a293985b6ed73948a547dadcc1ba6d2089938e7abdedceef8"}, + {file = "yarl-1.24.2-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5ec8356b8a6afcf81fc7aeeef13b1ff7a49dec00f313394bbb9e83830d32ccd7"}, + {file = "yarl-1.24.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7e7ebcdef69dec6c6451e616f32b622a6d4a2e92b445c992f7c8e5274a6bbc4c"}, + {file = "yarl-1.24.2-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:47a55d6cf6db2f401017a9e96e5288844e5051911fb4e0c8311a3980f5e59a7d"}, + {file = "yarl-1.24.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:3065657c80a2321225e804048597ad55658a7e76b32d6f5ee4074d04c50401db"}, + {file = "yarl-1.24.2-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:cb84b80d88e19ede158619b80813968713d8d008b0e2497a576e6a0557d50712"}, + {file = "yarl-1.24.2-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:990de4f680b1c217e77ff0d6aa0029f9eb79889c11fb3e9a3942c7eba29c1996"}, + {file = "yarl-1.24.2-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:abb8ec0323b80161e3802da3150ef660b41d0e9be2048b76a363d93eee992c2b"}, + {file = "yarl-1.24.2-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:e7977781f83638a4c73e0f88425563d70173e0dfd90ac006a45c65036293ee3c"}, + {file = "yarl-1.24.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:e30dd55825dc554ec5b66a94953b8eda8745926514c5089dfcacecb9c99b5bd1"}, + {file = "yarl-1.24.2-cp312-cp312-win_amd64.whl", hash = "sha256:7dafe10c12ddd4d120d528c4b5599c953bd7b12845347d507b95451195bb6cad"}, + {file = "yarl-1.24.2-cp312-cp312-win_arm64.whl", hash = "sha256:044a09d8401fcf8681977faef6d286b8ade1e2d2e9dceda175d1cfa5ca496f30"}, + {file = "yarl-1.24.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:491ac9141decf49ee8030199e1ee251cdff0e131f25678817ff6aa5f837a3536"}, + {file = "yarl-1.24.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e89418f65eda18f99030386305bd44d7d504e328a7945db1ead514fbe03a0607"}, + {file = "yarl-1.24.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:cdfcce633b4a4bb8281913c57fcafd4b5933fbc19111a5e3930bbd299d6102f1"}, + {file = "yarl-1.24.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:863297ddede92ee49024e9a9b11ecb59f310ca85b60d8537f56bed9bbb5b1986"}, + {file = "yarl-1.24.2-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:374423f70754a2c96942ede36a29d37dc6b0cb8f92f8d009ddf3ed78d3da5488"}, + {file = "yarl-1.24.2-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:33a29b5d00ccbf3219bb3e351d7875739c19481e030779f48cc46a7a71681a9b"}, + {file = "yarl-1.24.2-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a9532c57211730c515341af11fef6e9b61d157487272a096d0c04da445642592"}, + {file = "yarl-1.24.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:91e72cf093fd833483a97ee648e0c053c7c629f51ff4a0e7edd84f806b0c5617"}, + {file = "yarl-1.24.2-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:b3177bc0a768ef3bacceb4f272632990b7bea352f1b2f1eee9d6d6ff16516f92"}, + {file = "yarl-1.24.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:e196952aacaf3b232e265ff02980b64d483dc0972bd49bcb061171ff22ac203a"}, + {file = "yarl-1.24.2-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:204e7a61ce99919c0de1bf904ab5d7aa188a129ea8f690a8f76cfb6e2844dc44"}, + {file = "yarl-1.24.2-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:4b156914620f0b9d78dc1adb3751141daee561cfec796088abb89ed49d220f1a"}, + {file = "yarl-1.24.2-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:8372a2b976cf70654b2be6619ab6068acabb35f724c0fda7b277fbf53d66a5cf"}, + {file = "yarl-1.24.2-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:f9a1e9b622ca284143aab5d885848686dcd85453bb1ca9abcdb7503e64dc0056"}, + {file = "yarl-1.24.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:810e19b685c8c3c5862f6a38160a1f4e4c0916c9390024ec347b6157a45a0992"}, + {file = "yarl-1.24.2-cp313-cp313-win_amd64.whl", hash = "sha256:7d37fb7c38f2b6edab0f845c4f85148d4c44204f52bc127021bd2bc9fdbf1656"}, + {file = "yarl-1.24.2-cp313-cp313-win_arm64.whl", hash = "sha256:1e831894be7c2954240e49791fa4b50c05a0dc881de2552cfe3ffd8631c7f461"}, + {file = "yarl-1.24.2-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:f9312b3c02d9b3d23840f67952913c9c8721d7f1b7db305289faefa878f364c2"}, + {file = "yarl-1.24.2-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:a4f4d6cd615823bfc7fb7e9b5987c3f41666371d870d51058f77e2680fbe9630"}, + {file = "yarl-1.24.2-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:0c3063e5c0a8e8e62fae6c2596fa01da1561e4cd1da6fec5789f5cf99a8aefd8"}, + {file = "yarl-1.24.2-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:fecd17873a096036c1c87ab3486f1aef7f269ada7f23f7f856f93b1cc7744f14"}, + {file = "yarl-1.24.2-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:a46d1ab4ba4d32e6dc80daf8a28ce0bd83d08df52fbc32f3e288663427734535"}, + {file = "yarl-1.24.2-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:73e68edf6dfd5f73f9ca127d84e2a6f9213c65bdffb736bda19524c0564fcd14"}, + {file = "yarl-1.24.2-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a296ca617f2d25fbceafb962b88750d627e5984e75732c712154d058ae8d79a3"}, + {file = "yarl-1.24.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e51b2cf5ec89a8b8470177641ed62a3ba22d74e1e898e06ad53aa77972487208"}, + {file = "yarl-1.24.2-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:310fc687f7b2044ec54e372c8cbe923bb88f5c37bded0d3079e5791c2fc3cf50"}, + {file = "yarl-1.24.2-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:297a2fe352ecf858b30a98f87948746ec16f001d279f84aebdbd3bd965e2f1bd"}, + {file = "yarl-1.24.2-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:2a263e76b97bc42bdcd7c5f4953dec1f7cd62a1112fa7f869e57255229390d67"}, + {file = "yarl-1.24.2-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:822519b64cf0b474f1a0aaef1dc621438ea46bb77c94df97a5b4d213a7d8a8b1"}, + {file = "yarl-1.24.2-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:b6067060d9dc594899ba83e6db6c48c68d1e494a6dab158156ed86977ca7bcb1"}, + {file = "yarl-1.24.2-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:0063adad533e57171b79db3943b229d40dfafeeee579767f96541f106bac5f1b"}, + {file = "yarl-1.24.2-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:ee8e3fb34513e8dc082b586ef4910c98335d43a6fab688cd44d4851bacfce3e8"}, + {file = "yarl-1.24.2-cp314-cp314-win_amd64.whl", hash = "sha256:afb00d7fd8e0f285ca29a44cc50df2d622ff2f7a6d933fa641577b5f9d5f3db0"}, + {file = "yarl-1.24.2-cp314-cp314-win_arm64.whl", hash = "sha256:68cf6eacd6028ef1142bc4b48376b81566385ca6f9e7dde3b0fa91be08ffcb57"}, + {file = "yarl-1.24.2-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:221ce1dd921ac4f603957f17d7c18c5cc0797fbb52f156941f92e04605d1d67b"}, + {file = "yarl-1.24.2-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:5f3224db28173a00d7afacdee07045cc4673dfab2b15492c7ae10deddbece761"}, + {file = "yarl-1.24.2-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:c557165320d6244ebe3a02431b2a201a20080e02f41f0cfa0ccc47a183765da8"}, + {file = "yarl-1.24.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:904065e6e85b1fa54d0d87438bd58c14c0bad97aad654ad1077fd9d87e8478ed"}, + {file = "yarl-1.24.2-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:8cec2a38d70edc10e0e856ceda886af5327a017ccbde8e1de1bd44d300357543"}, + {file = "yarl-1.24.2-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:e7484b9361ed222ee1ca5b4337aa4cbdcc4618ce5aff57d9ef1582fd95893fc0"}, + {file = "yarl-1.24.2-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:84f9670b89f34db07f81e53aee83e0b938a3412329d51c8f922488be7fcc4024"}, + {file = "yarl-1.24.2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:abb2759733d63a28b4956500a5dd57140f26486c92b2caedfb964ab7d9b79dbf"}, + {file = "yarl-1.24.2-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:081c2bf54efe03774d0311172bc04fedf9ca01e644d4cd8c805688e527209bdc"}, + {file = "yarl-1.24.2-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:86746bef442aa479107fe28132e1277237f9c24c2f00b0b0cf22b3ee0904f2bb"}, + {file = "yarl-1.24.2-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:2d07d21d0bc4b17558e8de0b02fbfdf1e347d3bb3699edd00bb92e7c57925420"}, + {file = "yarl-1.24.2-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:4fb1ac3fc5fecd8ae7453ea237e4d22b49befa70266dfe1629924245c21a0c7f"}, + {file = "yarl-1.24.2-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:4da31a5512ed1729ca8d8aacde3f7faeb8843cde3165d6bcf7f88f74f17bb8aa"}, + {file = "yarl-1.24.2-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:533ded4dceb5f1f3da7906244f4e82cf46cfd40d84c69a1faf5ac506aa65ecbe"}, + {file = "yarl-1.24.2-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:7b3a85525f6e7eeabcfdd372862b21ee1915db1b498a04e8bf0e389b607ff0bd"}, + {file = "yarl-1.24.2-cp314-cp314t-win_amd64.whl", hash = "sha256:a7624b1ca46ca5d7b864ef0d2f8efe3091454085ee1855b4e992314529972215"}, + {file = "yarl-1.24.2-cp314-cp314t-win_arm64.whl", hash = "sha256:e434a45ce2e7a947f951fc5a8944c8cc080b7e59f9c50ae80fd39107cf88126d"}, + {file = "yarl-1.24.2-py3-none-any.whl", hash = "sha256:2783d9226db8797636cd6896e4de81feed252d1db72265686c9558d97a4d94b9"}, + {file = "yarl-1.24.2.tar.gz", hash = "sha256:9ac374123c6fd7abf64d1fec93962b0bd4ee2c19751755a762a72dd96c0378f8"}, +] + +[package.dependencies] +idna = ">=2.0" +multidict = ">=4.0" +propcache = ">=0.2.1" + +[extras] +aiohttp = ["aiohttp", "httpx-aiohttp"] + [metadata] lock-version = "2.0" -python-versions = "^3.8" -content-hash = "6f6c191c1028d17a97fdfa84cedfd3cef94b5d63d98b8c1d333b3398eeea9055" +python-versions = "^3.10" +content-hash = "c22c549ef574a50fc48074038793033112a025836768a63fcc3749869d1bcc8e" diff --git a/pyproject.toml b/pyproject.toml index a02ff705..5c898117 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,10 @@ +[project] +name = "vapi_server_sdk" +dynamic = ["version"] + [tool.poetry] name = "vapi_server_sdk" -version = "0.1.0" +version = "2.0.0" description = "" readme = "README.md" authors = [] @@ -10,11 +14,12 @@ classifiers = [ "Intended Audience :: Developers", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", + "Programming Language :: Python :: 3.15", "Operating System :: OS Independent", "Operating System :: POSIX", "Operating System :: MacOS", @@ -27,27 +32,33 @@ packages = [ { include = "vapi", from = "src"} ] -[project.urls] +[tool.poetry.urls] Repository = 'https://github.com/VapiAI/server-sdk-python' [tool.poetry.dependencies] -python = "^3.8" +python = "^3.10" +aiohttp = { version = ">=3.10.0,<4", optional = true} httpx = ">=0.21.2" +httpx-aiohttp = { version = "0.1.8", optional = true} pydantic = ">= 1.9.2" -pydantic-core = "^2.18.2" +pydantic-core = ">=2.18.2,<2.44.0" typing_extensions = ">= 4.0.0" -[tool.poetry.dev-dependencies] -mypy = "1.0.1" -pytest = "^7.4.0" -pytest-asyncio = "^0.23.5" +[tool.poetry.group.dev.dependencies] +mypy = "==1.13.0" +pytest = "^8.2.0" +pytest-asyncio = "^1.0.0" +pytest-xdist = "^3.6.1" python-dateutil = "^2.9.0" types-python-dateutil = "^2.9.0.20240316" -ruff = "^0.5.6" +ruff = "==0.11.5" [tool.pytest.ini_options] testpaths = [ "tests" ] asyncio_mode = "auto" +markers = [ + "aiohttp: tests that require httpx_aiohttp to be installed", +] [tool.mypy] plugins = ["pydantic.mypy"] @@ -55,7 +66,30 @@ plugins = ["pydantic.mypy"] [tool.ruff] line-length = 120 +[tool.ruff.lint] +select = [ + "E", # pycodestyle errors + "F", # pyflakes + "I", # isort +] +ignore = [ + "E402", # Module level import not at top of file + "E501", # Line too long + "E711", # Comparison to `None` should be `cond is not None` + "E712", # Avoid equality comparisons to `True`; use `if ...:` checks + "E721", # Use `is` and `is not` for type comparisons, or `isinstance()` for insinstance checks + "E722", # Do not use bare `except` + "E731", # Do not assign a `lambda` expression, use a `def` + "F821", # Undefined name + "F841" # Local variable ... is assigned to but never used +] + +[tool.ruff.lint.isort] +section-order = ["future", "standard-library", "third-party", "first-party"] [build-system] requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" + +[tool.poetry.extras] +aiohttp=["aiohttp", "httpx-aiohttp"] diff --git a/reference.md b/reference.md index f2e7f976..7d924d04 100644 --- a/reference.md +++ b/reference.md @@ -1,6 +1,6 @@ # Reference -## Calls -
client.calls.list(...) +## Assistants +
client.assistants.list(...) -> typing.List[Assistant]
@@ -14,11 +14,14 @@ ```python from vapi import Vapi +from vapi.environment import VapiEnvironment client = Vapi( - token="YOUR_TOKEN", + token="", + environment=VapiEnvironment.DEFAULT, ) -client.calls.list() + +client.assistants.list() ```
@@ -34,14 +37,6 @@ client.calls.list()
-**assistant_id:** `typing.Optional[str]` — This will return calls with the specified assistantId. - -
-
- -
-
- **limit:** `typing.Optional[float]` — This is the maximum number of items to return. Defaults to 100.
@@ -50,7 +45,7 @@ client.calls.list()
-**created_at_gt:** `typing.Optional[dt.datetime]` — This will return items where the createdAt is greater than the specified value. +**created_at_gt:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is greater than the specified value.
@@ -58,7 +53,7 @@ client.calls.list()
-**created_at_lt:** `typing.Optional[dt.datetime]` — This will return items where the createdAt is less than the specified value. +**created_at_lt:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is less than the specified value.
@@ -66,7 +61,7 @@ client.calls.list()
-**created_at_ge:** `typing.Optional[dt.datetime]` — This will return items where the createdAt is greater than or equal to the specified value. +**created_at_ge:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is greater than or equal to the specified value.
@@ -74,7 +69,7 @@ client.calls.list()
-**created_at_le:** `typing.Optional[dt.datetime]` — This will return items where the createdAt is less than or equal to the specified value. +**created_at_le:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is less than or equal to the specified value.
@@ -82,7 +77,7 @@ client.calls.list()
-**updated_at_gt:** `typing.Optional[dt.datetime]` — This will return items where the updatedAt is greater than the specified value. +**updated_at_gt:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is greater than the specified value.
@@ -90,7 +85,7 @@ client.calls.list()
-**updated_at_lt:** `typing.Optional[dt.datetime]` — This will return items where the updatedAt is less than the specified value. +**updated_at_lt:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is less than the specified value.
@@ -98,7 +93,7 @@ client.calls.list()
-**updated_at_ge:** `typing.Optional[dt.datetime]` — This will return items where the updatedAt is greater than or equal to the specified value. +**updated_at_ge:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is greater than or equal to the specified value.
@@ -106,7 +101,7 @@ client.calls.list()
-**updated_at_le:** `typing.Optional[dt.datetime]` — This will return items where the updatedAt is less than or equal to the specified value. +**updated_at_le:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is less than or equal to the specified value.
@@ -126,7 +121,7 @@ client.calls.list()
-
client.calls.create(...) +
client.assistants.create(...) -> Assistant
@@ -140,11 +135,14 @@ client.calls.list() ```python from vapi import Vapi +from vapi.environment import VapiEnvironment client = Vapi( - token="YOUR_TOKEN", + token="", + environment=VapiEnvironment.DEFAULT, ) -client.calls.create() + +client.assistants.create() ```
@@ -160,95 +158,7 @@ client.calls.create()
-**name:** `typing.Optional[str]` — This is the name of the call. This is just for your own reference. - -
-
- -
-
- -**assistant_id:** `typing.Optional[str]` — This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead. - -
-
- -
-
- -**assistant:** `typing.Optional[CreateAssistantDto]` — This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. - -
-
- -
-
- -**assistant_overrides:** `typing.Optional[AssistantOverrides]` — These are the overrides for the `assistant` or `assistantId`'s settings and template variables. - -
-
- -
-
- -**squad_id:** `typing.Optional[str]` — This is the squad that will be used for the call. To use a transient squad, use `squad` instead. - -
-
- -
-
- -**squad:** `typing.Optional[CreateSquadDto]` — This is a squad that will be used for the call. To use an existing squad, use `squadId` instead. - -
-
- -
-
- -**phone_number_id:** `typing.Optional[str]` - -This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead. - -Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type. - -
-
- -
-
- -**phone_number:** `typing.Optional[ImportTwilioPhoneNumberDto]` - -This is the phone number that will be used for the call. To use an existing number, use `phoneNumberId` instead. - -Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type. - -
-
- -
-
- -**customer_id:** `typing.Optional[str]` - -This is the customer that will be called. To call a transient customer , use `customer` instead. - -Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type. - -
-
- -
-
- -**customer:** `typing.Optional[CreateCustomerDto]` - -This is the customer that will be called. To call an existing customer, use `customerId` instead. - -Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type. +**request:** `CreateAssistantDto`
@@ -268,7 +178,7 @@ Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
-
client.calls.get(...) +
client.assistants.get(...) -> Assistant
@@ -282,11 +192,14 @@ Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type. ```python from vapi import Vapi +from vapi.environment import VapiEnvironment client = Vapi( - token="YOUR_TOKEN", + token="", + environment=VapiEnvironment.DEFAULT, ) -client.calls.get( + +client.assistants.get( id="id", ) @@ -324,7 +237,7 @@ client.calls.get(
-
client.calls.delete(...) +
client.assistants.delete(...) -> Assistant
@@ -338,11 +251,14 @@ client.calls.get( ```python from vapi import Vapi +from vapi.environment import VapiEnvironment client = Vapi( - token="YOUR_TOKEN", + token="", + environment=VapiEnvironment.DEFAULT, ) -client.calls.delete( + +client.assistants.delete( id="id", ) @@ -380,7 +296,7 @@ client.calls.delete(
-
client.calls.update(...) +
client.assistants.update(...) -> Assistant
@@ -394,11 +310,14 @@ client.calls.delete( ```python from vapi import Vapi +from vapi.environment import VapiEnvironment client = Vapi( - token="YOUR_TOKEN", + token="", + environment=VapiEnvironment.DEFAULT, ) -client.calls.update( + +client.assistants.update( id="id", ) @@ -424,7 +343,7 @@ client.calls.update(
-**name:** `typing.Optional[str]` — This is the name of the call. This is just for your own reference. +**transcriber:** `typing.Optional[UpdateAssistantDtoTranscriber]` — These are the options for the assistant's transcriber.
@@ -432,54 +351,63 @@ client.calls.update(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**model:** `typing.Optional[UpdateAssistantDtoModel]` — These are the options for the assistant's LLM.
-
-
+
+
+**voice:** `typing.Optional[UpdateAssistantDtoVoice]` — These are the options for the assistant's voice. +
-
-## Assistants -
client.assistants.list(...)
-#### 🔌 Usage +**first_message:** `typing.Optional[str]` + +This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.). + +If unspecified, assistant will wait for user to speak and use the model to respond once they speak. + +
+
+**first_message_interruptions_enabled:** `typing.Optional[bool]` + +
+
+
-```python -from vapi import Vapi +**first_message_mode:** `typing.Optional[UpdateAssistantDtoFirstMessageMode]` -client = Vapi( - token="YOUR_TOKEN", -) -client.assistants.list() +This is the mode for the first message. Default is 'assistant-speaks-first'. -``` -
-
+Use: +- 'assistant-speaks-first' to have the assistant speak first. +- 'assistant-waits-for-user' to have the assistant wait for the user to speak first. +- 'assistant-speaks-first-with-model-generated-message' to have the assistant speak first with a message generated by the model based on the conversation state. (`assistant.model.messages` at call start, `call.messages` at squad transfer points). + +@default 'assistant-speaks-first' + -#### ⚙️ Parameters -
-
-
+**voicemail_detection:** `typing.Optional[UpdateAssistantDtoVoicemailDetection]` -**limit:** `typing.Optional[float]` — This is the maximum number of items to return. Defaults to 100. +These are the settings to configure or disable voicemail detection. Alternatively, voicemail detection can be configured using the model.tools=[VoicemailTool]. +By default, voicemail detection is disabled.
@@ -487,7 +415,7 @@ client.assistants.list()
-**created_at_gt:** `typing.Optional[dt.datetime]` — This will return items where the createdAt is greater than the specified value. +**client_messages:** `typing.Optional[typing.List[UpdateAssistantDtoClientMessagesItem]]` — These are the messages that will be sent to your Client SDKs. Default is conversation-update,function-call,hang,model-output,speech-update,status-update,transfer-update,transcript,tool-calls,user-interrupted,voice-input,workflow.node.started,assistant.started. You can check the shape of the messages in ClientMessage schema.
@@ -495,7 +423,7 @@ client.assistants.list()
-**created_at_lt:** `typing.Optional[dt.datetime]` — This will return items where the createdAt is less than the specified value. +**server_messages:** `typing.Optional[typing.List[UpdateAssistantDtoServerMessagesItem]]` — These are the messages that will be sent to your Server URL. Default is conversation-update,end-of-call-report,function-call,hang,speech-update,status-update,tool-calls,transfer-destination-request,handoff-destination-request,user-interrupted,assistant.started. You can check the shape of the messages in ServerMessage schema.
@@ -503,7 +431,11 @@ client.assistants.list()
-**created_at_ge:** `typing.Optional[dt.datetime]` — This will return items where the createdAt is greater than or equal to the specified value. +**max_duration_seconds:** `typing.Optional[float]` + +This is the maximum number of seconds that the call will last. When the call reaches this duration, it will be ended. + +@default 600 (10 minutes)
@@ -511,7 +443,10 @@ client.assistants.list()
-**created_at_le:** `typing.Optional[dt.datetime]` — This will return items where the createdAt is less than or equal to the specified value. +**background_sound:** `typing.Optional[UpdateAssistantDtoBackgroundSound]` + +This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'. +You can also provide a custom sound by providing a URL to an audio file.
@@ -519,7 +454,11 @@ client.assistants.list()
-**updated_at_gt:** `typing.Optional[dt.datetime]` — This will return items where the updatedAt is greater than the specified value. +**model_output_in_messages_enabled:** `typing.Optional[bool]` + +This determines whether the model's output is used in conversation history rather than the transcription of assistant's speech. + +@default false
@@ -527,7 +466,7 @@ client.assistants.list()
-**updated_at_lt:** `typing.Optional[dt.datetime]` — This will return items where the updatedAt is less than the specified value. +**transport_configurations:** `typing.Optional[typing.List[TransportConfigurationTwilio]]` — These are the configurations to be passed to the transport providers of assistant's calls, like Twilio. You can store multiple configurations for different transport providers. For a call, only the configuration matching the call transport provider is used.
@@ -535,7 +474,11 @@ client.assistants.list()
-**updated_at_ge:** `typing.Optional[dt.datetime]` — This will return items where the updatedAt is greater than or equal to the specified value. +**observability_plan:** `typing.Optional[LangfuseObservabilityPlan]` + +This is the plan for observability of assistant's calls. + +Currently, only Langfuse is supported.
@@ -543,7 +486,7 @@ client.assistants.list()
-**updated_at_le:** `typing.Optional[dt.datetime]` — This will return items where the updatedAt is less than or equal to the specified value. +**credentials:** `typing.Optional[typing.List[UpdateAssistantDtoCredentialsItem]]` — These are dynamic credentials that will be used for the assistant calls. By default, all the credentials are available for use in the call but you can supplement an additional credentials using this. Dynamic credentials override existing credentials.
@@ -551,53 +494,51 @@ client.assistants.list()
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**hooks:** `typing.Optional[typing.List[UpdateAssistantDtoHooksItem]]` — This is a set of actions that will be performed on certain events.
-
-
+
+
+ +**name:** `typing.Optional[str]` + +This is the name of the assistant. +This is required when you want to transfer between assistants in a call. +
-
-
client.assistants.create(...)
-#### 🔌 Usage +**voicemail_message:** `typing.Optional[str]` -
-
+This is the message that the assistant will say if the call is forwarded to voicemail. + +If unspecified, it will hang up. + +
+
-```python -from vapi import Vapi +**end_call_message:** `typing.Optional[str]` -client = Vapi( - token="YOUR_TOKEN", -) -client.assistants.create() +This is the message that the assistant will say if it ends the call. -``` -
-
+If unspecified, it will hang up without saying anything. +
-#### ⚙️ Parameters - -
-
-
-**transcriber:** `typing.Optional[CreateAssistantDtoTranscriber]` — These are the options for the assistant's transcriber. +**end_call_phrases:** `typing.Optional[typing.List[str]]` — This list contains phrases that, if spoken by the assistant, will trigger the call to be hung up. Case insensitive.
@@ -605,7 +546,7 @@ client.assistants.create()
-**model:** `typing.Optional[CreateAssistantDtoModel]` — These are the options for the assistant's LLM. +**compliance_plan:** `typing.Optional[CompliancePlan]`
@@ -613,7 +554,7 @@ client.assistants.create()
-**voice:** `typing.Optional[CreateAssistantDtoVoice]` — These are the options for the assistant's voice. +**metadata:** `typing.Optional[typing.Dict[str, typing.Any]]` — This is for metadata you want to store on the assistant.
@@ -621,17 +562,19 @@ client.assistants.create()
-**first_message_mode:** `typing.Optional[CreateAssistantDtoFirstMessageMode]` +**background_speech_denoising_plan:** `typing.Optional[BackgroundSpeechDenoisingPlan]` -This is the mode for the first message. Default is 'assistant-speaks-first'. +This enables filtering of noise and background speech while the user is talking. -Use: +Features: +- Smart denoising using Krisp +- Fourier denoising -- 'assistant-speaks-first' to have the assistant speak first. -- 'assistant-waits-for-user' to have the assistant wait for the user to speak first. -- 'assistant-speaks-first-with-model-generated-message' to have the assistant speak first with a message generated by the model based on the conversation state. (`assistant.model.messages` at call start, `call.messages` at squad transfer points). +Smart denoising can be combined with or used independently of Fourier denoising. -@default 'assistant-speaks-first' +Order of precedence: +- Smart denoising +- Fourier denoising
@@ -639,7 +582,7 @@ Use:
-**hipaa_enabled:** `typing.Optional[bool]` — When this is enabled, no logs, recordings, or transcriptions will be stored. At the end of the call, you will still receive an end-of-call-report message to store on your server. Defaults to false. +**analysis_plan:** `typing.Optional[AnalysisPlan]` — This is the plan for analysis of assistant's calls. Stored in `call.analysis`.
@@ -647,7 +590,7 @@ Use:
-**client_messages:** `typing.Optional[typing.Sequence[CreateAssistantDtoClientMessagesItem]]` — These are the messages that will be sent to your Client SDKs. Default is conversation-update,function-call,hang,model-output,speech-update,status-update,transcript,tool-calls,user-interrupted,voice-input. You can check the shape of the messages in ClientMessage schema. +**artifact_plan:** `typing.Optional[ArtifactPlan]` — This is the plan for artifacts generated during assistant's calls. Stored in `call.artifact`.
@@ -655,7 +598,14 @@ Use:
-**server_messages:** `typing.Optional[typing.Sequence[CreateAssistantDtoServerMessagesItem]]` — These are the messages that will be sent to your Server URL. Default is conversation-update,end-of-call-report,function-call,hang,speech-update,status-update,tool-calls,transfer-destination-request,user-interrupted. You can check the shape of the messages in ServerMessage schema. +**start_speaking_plan:** `typing.Optional[StartSpeakingPlan]` + +This is the plan for when the assistant should start talking. + +You should configure this if you're running into these issues: +- The assistant is too slow to start talking after the customer is done speaking. +- The assistant is too fast to start talking after the customer is done speaking. +- The assistant is so fast that it's actually interrupting the customer.
@@ -663,11 +613,16 @@ Use:
-**silence_timeout_seconds:** `typing.Optional[float]` +**stop_speaking_plan:** `typing.Optional[StopSpeakingPlan]` -How many seconds of silence to wait before ending the call. Defaults to 30. +This is the plan for when assistant should stop talking on customer interruption. -@default 30 +You should configure this if you're running into these issues: +- The assistant is too slow to recognize customer's interruption. +- The assistant is too fast to recognize customer's interruption. +- The assistant is getting interrupted by phrases that are just acknowledgments. +- The assistant is getting interrupted by background noises. +- The assistant is not properly stopping -- it starts talking right after getting interrupted.
@@ -675,11 +630,14 @@ How many seconds of silence to wait before ending the call. Defaults to 30.
-**max_duration_seconds:** `typing.Optional[float]` +**monitor_plan:** `typing.Optional[MonitorPlan]` -This is the maximum number of seconds that the call will last. When the call reaches this duration, it will be ended. +This is the plan for real-time monitoring of the assistant's calls. -@default 600 (10 minutes) +Usage: +- To enable live listening of the assistant's calls, set `monitorPlan.listenEnabled` to `true`. +- To enable live control of the assistant's calls, set `monitorPlan.controlEnabled` to `true`. +- To attach monitors to the assistant, set `monitorPlan.monitorIds` to the set of monitor ids.
@@ -687,7 +645,7 @@ This is the maximum number of seconds that the call will last. When the call rea
-**background_sound:** `typing.Optional[CreateAssistantDtoBackgroundSound]` — This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'. +**credential_ids:** `typing.Optional[typing.List[str]]` — These are the credentials that will be used for the assistant calls. By default, all the credentials are available for use in the call but you can provide a subset using this.
@@ -695,13 +653,15 @@ This is the maximum number of seconds that the call will last. When the call rea
-**backchanneling_enabled:** `typing.Optional[bool]` +**server:** `typing.Optional[Server]` -This determines whether the model says 'mhmm', 'ahem' etc. while user is speaking. +This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema. -Default `false` while in beta. +The order of precedence is: -@default false +1. assistant.server.url +2. phoneNumber.serverUrl +3. org.serverUrl
@@ -709,13 +669,7 @@ Default `false` while in beta.
-**background_denoising_enabled:** `typing.Optional[bool]` - -This enables filtering of noise and background speech while the user is talking. - -Default `false` while in beta. - -@default false +**keypad_input_plan:** `typing.Optional[KeypadInputPlan]`
@@ -723,57 +677,57 @@ Default `false` while in beta.
-**model_output_in_messages_enabled:** `typing.Optional[bool]` - -This determines whether the model's output is used in conversation history rather than the transcription of assistant's speech. - -Default `false` while in beta. - -@default false +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
-
-
-**transport_configurations:** `typing.Optional[typing.Sequence[TransportConfigurationTwilio]]` — These are the configurations to be passed to the transport providers of assistant's calls, like Twilio. You can store multiple configurations for different transport providers. For a call, only the configuration matching the call transport provider is used. -
+
+## Squads +
client.squads.list(...) -> typing.List[Squad]
-**name:** `typing.Optional[str]` - -This is the name of the assistant. +#### 🔌 Usage -This is required when you want to transfer between assistants in a call. - -
-
+
+
-**first_message:** `typing.Optional[str]` +```python +from vapi import Vapi +from vapi.environment import VapiEnvironment -This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.). +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) -If unspecified, assistant will wait for user to speak and use the model to respond once they speak. - +client.squads.list() + +```
+
+
+ +#### ⚙️ Parameters
-**voicemail_detection:** `typing.Optional[TwilioVoicemailDetection]` +
+
-These are the settings to configure or disable voicemail detection. Alternatively, voicemail detection can be configured using the model.tools=[VoicemailTool]. -This uses Twilio's built-in detection while the VoicemailTool relies on the model to detect if a voicemail was reached. -You can use neither of them, one of them, or both of them. By default, Twilio built-in detection is enabled while VoicemailTool is not. +**limit:** `typing.Optional[float]` — This is the maximum number of items to return. Defaults to 100.
@@ -781,11 +735,7 @@ You can use neither of them, one of them, or both of them. By default, Twilio bu
-**voicemail_message:** `typing.Optional[str]` - -This is the message that the assistant will say if the call is forwarded to voicemail. - -If unspecified, it will hang up. +**created_at_gt:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is greater than the specified value.
@@ -793,11 +743,7 @@ If unspecified, it will hang up.
-**end_call_message:** `typing.Optional[str]` - -This is the message that the assistant will say if it ends the call. - -If unspecified, it will hang up without saying anything. +**created_at_lt:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is less than the specified value.
@@ -805,7 +751,7 @@ If unspecified, it will hang up without saying anything.
-**end_call_phrases:** `typing.Optional[typing.Sequence[str]]` — This list contains phrases that, if spoken by the assistant, will trigger the call to be hung up. Case insensitive. +**created_at_ge:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is greater than or equal to the specified value.
@@ -813,7 +759,7 @@ If unspecified, it will hang up without saying anything.
-**metadata:** `typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]` — This is for metadata you want to store on the assistant. +**created_at_le:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is less than or equal to the specified value.
@@ -821,13 +767,7 @@ If unspecified, it will hang up without saying anything.
-**server_url:** `typing.Optional[str]` - -This is the URL Vapi will communicate with via HTTP GET and POST Requests. This is used for retrieving context, function calling, and end-of-call reports. - -All requests will be sent with the call object among other things relevant to that message. You can find more details in the Server URL documentation. - -This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: tool.server.url > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl +**updated_at_gt:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is greater than the specified value.
@@ -835,11 +775,7 @@ This overrides the serverUrl set on the org and the phoneNumber. Order of preced
-**server_url_secret:** `typing.Optional[str]` - -This is the secret you can set that Vapi will send with every request to your server. Will be sent as a header called x-vapi-secret. - -Same precedence logic as serverUrl. +**updated_at_lt:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is less than the specified value.
@@ -847,7 +783,7 @@ Same precedence logic as serverUrl.
-**analysis_plan:** `typing.Optional[AnalysisPlan]` — This is the plan for analysis of assistant's calls. Stored in `call.analysis`. +**updated_at_ge:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is greater than or equal to the specified value.
@@ -855,11 +791,7 @@ Same precedence logic as serverUrl.
-**artifact_plan:** `typing.Optional[ArtifactPlan]` - -This is the plan for artifacts generated during assistant's calls. Stored in `call.artifact`. - -Note: `recordingEnabled` is currently at the root level. It will be moved to `artifactPlan` in the future, but will remain backwards compatible. +**updated_at_le:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is less than or equal to the specified value.
@@ -867,70 +799,119 @@ Note: `recordingEnabled` is currently at the root level. It will be moved to `ar
-**message_plan:** `typing.Optional[MessagePlan]` +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
-This is the plan for static predefined messages that can be spoken by the assistant during the call, like `idleMessages`. -Note: `firstMessage`, `voicemailMessage`, and `endCallMessage` are currently at the root level. They will be moved to `messagePlan` in the future, but will remain backwards compatible. - +
+
client.squads.create(...) -> Squad
-**start_speaking_plan:** `typing.Optional[StartSpeakingPlan]` +#### 🔌 Usage -This is the plan for when the assistant should start talking. +
+
-You should configure this if you're running into these issues: +
+
-- The assistant is too slow to start talking after the customer is done speaking. -- The assistant is too fast to start talking after the customer is done speaking. -- The assistant is so fast that it's actually interrupting the customer. - +```python +from vapi import Vapi, SquadMemberDto +from vapi.environment import VapiEnvironment + +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.squads.create( + members=[ + SquadMemberDto() + ], +) + +```
+
+
+ +#### ⚙️ Parameters
-**stop_speaking_plan:** `typing.Optional[StopSpeakingPlan]` +
+
-This is the plan for when assistant should stop talking on customer interruption. +**request:** `CreateSquadDto` + +
+
-You should configure this if you're running into these issues: +
+
-- The assistant is too slow to recognize customer's interruption. -- The assistant is too fast to recognize customer's interruption. -- The assistant is getting interrupted by phrases that are just acknowledgments. -- The assistant is getting interrupted by background noises. -- The assistant is not properly stopping -- it starts talking right after getting interrupted. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+ + +
+
+
+
client.squads.get(...) -> Squad
-**monitor_plan:** `typing.Optional[MonitorPlan]` +#### 🔌 Usage -This is the plan for real-time monitoring of the assistant's calls. +
+
-Usage: +
+
-- To enable live listening of the assistant's calls, set `monitorPlan.listenEnabled` to `true`. -- To enable live control of the assistant's calls, set `monitorPlan.controlEnabled` to `true`. +```python +from vapi import Vapi +from vapi.environment import VapiEnvironment -Note, `serverMessages`, `clientMessages`, `serverUrl` and `serverUrlSecret` are currently at the root level but will be moved to `monitorPlan` in the future. Will remain backwards compatible - +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.squads.get( + id="id", +) + +```
+
+
+ +#### ⚙️ Parameters
-**credential_ids:** `typing.Optional[typing.Sequence[str]]` — These are the credentials that will be used for the assistant calls. By default, all the credentials are available for use in the call but you can provide a subset using this. +
+
+ +**id:** `str`
@@ -950,7 +931,7 @@ Note, `serverMessages`, `clientMessages`, `serverUrl` and `serverUrlSecret` are
-
client.assistants.get(...) +
client.squads.delete(...) -> Squad
@@ -964,11 +945,14 @@ Note, `serverMessages`, `clientMessages`, `serverUrl` and `serverUrlSecret` are ```python from vapi import Vapi +from vapi.environment import VapiEnvironment client = Vapi( - token="YOUR_TOKEN", + token="", + environment=VapiEnvironment.DEFAULT, ) -client.assistants.get( + +client.squads.delete( id="id", ) @@ -1006,7 +990,7 @@ client.assistants.get(
-
client.assistants.delete(...) +
client.squads.update(...) -> Squad
@@ -1019,13 +1003,19 @@ client.assistants.get(
```python -from vapi import Vapi +from vapi import Vapi, SquadMemberDto +from vapi.environment import VapiEnvironment client = Vapi( - token="YOUR_TOKEN", + token="", + environment=VapiEnvironment.DEFAULT, ) -client.assistants.delete( + +client.squads.update( id="id", + members=[ + SquadMemberDto() + ], ) ``` @@ -1050,6 +1040,38 @@ client.assistants.delete(
+**members:** `typing.List[SquadMemberDto]` + +This is the list of assistants that make up the squad. + +The call will start with the first assistant in the list. + +
+
+ +
+
+ +**name:** `typing.Optional[str]` — This is the name of the squad. + +
+
+ +
+
+ +**members_overrides:** `typing.Optional[AssistantOverrides]` + +This can be used to override all the assistants' settings and provide values for their template variables. + +Both `membersOverrides` and `members[n].assistantOverrides` can be used together. First, `members[n].assistantOverrides` is applied. Then, `membersOverrides` is applied as a global override. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -1062,7 +1084,8 @@ client.assistants.delete(
-
client.assistants.update(...) +## Calls +
client.calls.list(...) -> typing.List[Call]
@@ -1076,14 +1099,15 @@ client.assistants.delete( ```python from vapi import Vapi +from vapi.environment import VapiEnvironment client = Vapi( - token="YOUR_TOKEN", -) -client.assistants.update( - id="id", + token="", + environment=VapiEnvironment.DEFAULT, ) +client.calls.list() + ```
@@ -1098,7 +1122,7 @@ client.assistants.update(
-**id:** `str` +**id:** `typing.Optional[str]` — This is the unique identifier for the call.
@@ -1106,7 +1130,7 @@ client.assistants.update(
-**transcriber:** `typing.Optional[UpdateAssistantDtoTranscriber]` — These are the options for the assistant's transcriber. +**assistant_id:** `typing.Optional[str]` — This will return calls with the specified assistantId.
@@ -1114,7 +1138,11 @@ client.assistants.update(
-**model:** `typing.Optional[UpdateAssistantDtoModel]` — These are the options for the assistant's LLM. +**phone_number_id:** `typing.Optional[str]` + +This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead. + +Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
@@ -1122,7 +1150,39 @@ client.assistants.update(
-**voice:** `typing.Optional[UpdateAssistantDtoVoice]` — These are the options for the assistant's voice. +**limit:** `typing.Optional[float]` — This is the maximum number of items to return. Defaults to 100. + +
+
+ +
+
+ +**created_at_gt:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is greater than the specified value. + +
+
+ +
+
+ +**created_at_lt:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is less than the specified value. + +
+
+ +
+
+ +**created_at_ge:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is greater than or equal to the specified value. + +
+
+ +
+
+ +**created_at_le:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is less than or equal to the specified value.
@@ -1130,16 +1190,3822 @@ client.assistants.update(
-**first_message_mode:** `typing.Optional[UpdateAssistantDtoFirstMessageMode]` - -This is the mode for the first message. Default is 'assistant-speaks-first'. - -Use: -- 'assistant-speaks-first' to have the assistant speak first. -- 'assistant-waits-for-user' to have the assistant wait for the user to speak first. -- 'assistant-speaks-first-with-model-generated-message' to have the assistant speak first with a message generated by the model based on the conversation state. (`assistant.model.messages` at call start, `call.messages` at squad transfer points). +**updated_at_gt:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is greater than the specified value. + +
+
+ +
+
+ +**updated_at_lt:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is less than the specified value. + +
+
+ +
+
+ +**updated_at_ge:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is greater than or equal to the specified value. + +
+
+ +
+
+ +**updated_at_le:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is less than or equal to the specified value. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+ + + + + + +
+ +
client.calls.create(...) -> CreateCallsResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from vapi import Vapi +from vapi.environment import VapiEnvironment + +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.calls.create() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**customers:** `typing.Optional[typing.List[CreateCustomerDto]]` + +This is used to issue batch calls to multiple customers. + +Only relevant for `outboundPhoneCall`. To call a single customer, use `customer` instead. + +
+
+ +
+
+ +**name:** `typing.Optional[str]` — This is the name of the call. This is just for your own reference. + +
+
+ +
+
+ +**schedule_plan:** `typing.Optional[SchedulePlan]` — This is the schedule plan of the call. + +
+
+ +
+
+ +**transport:** `typing.Optional[typing.Dict[str, typing.Any]]` — This is the transport of the call. + +
+
+ +
+
+ +**assistant_id:** `typing.Optional[str]` + +This is the assistant ID that will be used for the call. To use a transient assistant, use `assistant` instead. + +To start a call with: +- Assistant, use `assistantId` or `assistant` +- Squad, use `squadId` or `squad` +- Workflow, use `workflowId` or `workflow` + +
+
+ +
+
+ +**assistant:** `typing.Optional[CreateAssistantDto]` + +This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. + +To start a call with: +- Assistant, use `assistant` +- Squad, use `squad` +- Workflow, use `workflow` + +
+
+ +
+
+ +**assistant_overrides:** `typing.Optional[AssistantOverrides]` — These are the overrides for the `assistant` or `assistantId`'s settings and template variables. + +
+
+ +
+
+ +**squad_id:** `typing.Optional[str]` + +This is the squad that will be used for the call. To use a transient squad, use `squad` instead. + +To start a call with: +- Assistant, use `assistant` or `assistantId` +- Squad, use `squad` or `squadId` +- Workflow, use `workflow` or `workflowId` + +
+
+ +
+
+ +**squad:** `typing.Optional[CreateSquadDto]` + +This is a squad that will be used for the call. To use an existing squad, use `squadId` instead. + +To start a call with: +- Assistant, use `assistant` or `assistantId` +- Squad, use `squad` or `squadId` +- Workflow, use `workflow` or `workflowId` + +
+
+ +
+
+ +**squad_overrides:** `typing.Optional[AssistantOverrides]` + +These are the overrides for the `squad` or `squadId`'s member settings and template variables. +This will apply to all members of the squad. + +
+
+ +
+
+ +**workflow_id:** `typing.Optional[str]` + +This is the workflow that will be used for the call. To use a transient workflow, use `workflow` instead. + +To start a call with: +- Assistant, use `assistant` or `assistantId` +- Squad, use `squad` or `squadId` +- Workflow, use `workflow` or `workflowId` + +
+
+ +
+
+ +**workflow:** `typing.Optional[CreateWorkflowDto]` + +This is a workflow that will be used for the call. To use an existing workflow, use `workflowId` instead. + +To start a call with: +- Assistant, use `assistant` or `assistantId` +- Squad, use `squad` or `squadId` +- Workflow, use `workflow` or `workflowId` + +
+
+ +
+
+ +**workflow_overrides:** `typing.Optional[WorkflowOverrides]` — These are the overrides for the `workflow` or `workflowId`'s settings and template variables. + +
+
+ +
+
+ +**phone_number_id:** `typing.Optional[str]` + +This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead. + +Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type. + +
+
+ +
+
+ +**phone_number:** `typing.Optional[ImportTwilioPhoneNumberDto]` + +This is the phone number that will be used for the call. To use an existing number, use `phoneNumberId` instead. + +Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type. + +
+
+ +
+
+ +**customer_id:** `typing.Optional[str]` + +This is the customer that will be called. To call a transient customer , use `customer` instead. + +Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type. + +
+
+ +
+
+ +**customer:** `typing.Optional[CreateCustomerDto]` + +This is the customer that will be called. To call an existing customer, use `customerId` instead. + +Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.calls.get(...) -> Call +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from vapi import Vapi +from vapi.environment import VapiEnvironment + +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.calls.get( + id="id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.calls.delete(...) -> Call +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from vapi import Vapi +from vapi.environment import VapiEnvironment + +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.calls.delete( + id="id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` + +
+
+ +
+
+ +**ids:** `typing.Optional[typing.List[str]]` + +These are the Call IDs to be bulk deleted. +If provided, the call ID if any in the request query will be ignored +When requesting a bulk delete, updates when a call is deleted will be sent as a webhook to the server URL configured in the Org settings. +It may take up to a few hours to complete the bulk delete, and will be asynchronous. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.calls.update(...) -> Call +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from vapi import Vapi +from vapi.environment import VapiEnvironment + +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.calls.update( + id="id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` + +
+
+ +
+
+ +**name:** `typing.Optional[str]` — This is the name of the call. This is just for your own reference. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Chats +
client.chats.list(...) -> ChatPaginatedResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from vapi import Vapi +from vapi.environment import VapiEnvironment + +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.chats.list( + assistant_id_any="assistant-1,assistant-2,assistant-3", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `typing.Optional[str]` — This is the unique identifier for the chat to filter by. + +
+
+ +
+
+ +**assistant_id:** `typing.Optional[str]` — This is the unique identifier for the assistant that will be used for the chat. + +
+
+ +
+
+ +**assistant_id_any:** `typing.Optional[str]` — Filter by multiple assistant IDs. Provide as comma-separated values. + +
+
+ +
+
+ +**squad_id:** `typing.Optional[str]` — This is the unique identifier for the squad that will be used for the chat. + +
+
+ +
+
+ +**session_id:** `typing.Optional[str]` — This is the unique identifier for the session that will be used for the chat. + +
+
+ +
+
+ +**previous_chat_id:** `typing.Optional[str]` — This is the unique identifier for the previous chat to filter by. + +
+
+ +
+
+ +**page:** `typing.Optional[float]` — This is the page number to return. Defaults to 1. + +
+
+ +
+
+ +**sort_order:** `typing.Optional[ListChatsRequestSortOrder]` — This is the sort order for pagination. Defaults to 'DESC'. + +
+
+ +
+
+ +**limit:** `typing.Optional[float]` — This is the maximum number of items to return. Defaults to 100. + +
+
+ +
+
+ +**created_at_gt:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is greater than the specified value. + +
+
+ +
+
+ +**created_at_lt:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is less than the specified value. + +
+
+ +
+
+ +**created_at_ge:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is greater than or equal to the specified value. + +
+
+ +
+
+ +**created_at_le:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is less than or equal to the specified value. + +
+
+ +
+
+ +**updated_at_gt:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is greater than the specified value. + +
+
+ +
+
+ +**updated_at_lt:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is less than the specified value. + +
+
+ +
+
+ +**updated_at_ge:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is greater than or equal to the specified value. + +
+
+ +
+
+ +**updated_at_le:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is less than or equal to the specified value. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.chats.create(...) -> CreateChatsResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a new chat with optional SMS delivery via transport field. Requires at least one of: assistantId/assistant, sessionId, or previousChatId. Note: sessionId and previousChatId are mutually exclusive. Transport field enables SMS delivery with two modes: (1) New conversation - provide transport.phoneNumberId and transport.customer to create a new session, (2) Existing conversation - provide sessionId to use existing session data. Cannot specify both sessionId and transport fields together. The transport.useLLMGeneratedMessageForOutbound flag controls whether input is processed by LLM (true, default) or forwarded directly as SMS (false). +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from vapi import Vapi +from vapi.environment import VapiEnvironment + +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.chats.create( + input="input", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**input:** `CreateChatDtoInput` + +This is the input text for the chat. +Can be a string or an array of chat messages. +This field is REQUIRED for chat creation. + +
+
+ +
+
+ +**assistant_id:** `typing.Optional[str]` — This is the assistant that will be used for the chat. To use an existing assistant, use `assistantId` instead. + +
+
+ +
+
+ +**assistant:** `typing.Optional[CreateAssistantDto]` — This is the assistant that will be used for the chat. To use an existing assistant, use `assistantId` instead. + +
+
+ +
+
+ +**assistant_overrides:** `typing.Optional[AssistantOverrides]` + +These are the variable values that will be used to replace template variables in the assistant messages. +Only variable substitution is supported in chat contexts - other assistant properties cannot be overridden. + +
+
+ +
+
+ +**squad_id:** `typing.Optional[str]` — This is the squad that will be used for the chat. To use a transient squad, use `squad` instead. + +
+
+ +
+
+ +**squad:** `typing.Optional[CreateSquadDto]` — This is the squad that will be used for the chat. To use an existing squad, use `squadId` instead. + +
+
+ +
+
+ +**name:** `typing.Optional[str]` — This is the name of the chat. This is just for your own reference. + +
+
+ +
+
+ +**session_id:** `typing.Optional[str]` + +This is the ID of the session that will be used for the chat. +Mutually exclusive with previousChatId. + +
+
+ +
+
+ +**stream:** `typing.Optional[bool]` + +This is a flag that determines whether the response should be streamed. +When true, the response will be sent as chunks of text. + +
+
+ +
+
+ +**previous_chat_id:** `typing.Optional[str]` + +This is the ID of the chat that will be used as context for the new chat. +The messages from the previous chat will be used as context. +Mutually exclusive with sessionId. + +
+
+ +
+
+ +**transport:** `typing.Optional[TwilioSmsChatTransport]` + +This is used to send the chat through a transport like SMS. +If transport.phoneNumberId and transport.customer are provided, creates a new session. +If sessionId is provided without transport fields, uses existing session data. +Cannot specify both sessionId and transport fields (phoneNumberId/customer) together. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.chats.get(...) -> Chat +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from vapi import Vapi +from vapi.environment import VapiEnvironment + +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.chats.get( + id="id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.chats.delete(...) -> Chat +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from vapi import Vapi +from vapi.environment import VapiEnvironment + +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.chats.delete( + id="id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.chats.create_response(...) -> CreateResponseChatsResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from vapi import Vapi +from vapi.environment import VapiEnvironment + +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.chats.create_response( + input="input", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**input:** `OpenAiResponsesRequestInput` + +This is the input text for the chat. +Can be a string or an array of chat messages. +This field is REQUIRED for chat creation. + +
+
+ +
+
+ +**assistant_id:** `typing.Optional[str]` — This is the assistant that will be used for the chat. To use an existing assistant, use `assistantId` instead. + +
+
+ +
+
+ +**assistant:** `typing.Optional[CreateAssistantDto]` — This is the assistant that will be used for the chat. To use an existing assistant, use `assistantId` instead. + +
+
+ +
+
+ +**assistant_overrides:** `typing.Optional[AssistantOverrides]` + +These are the variable values that will be used to replace template variables in the assistant messages. +Only variable substitution is supported in chat contexts - other assistant properties cannot be overridden. + +
+
+ +
+
+ +**squad_id:** `typing.Optional[str]` — This is the squad that will be used for the chat. To use a transient squad, use `squad` instead. + +
+
+ +
+
+ +**squad:** `typing.Optional[CreateSquadDto]` — This is the squad that will be used for the chat. To use an existing squad, use `squadId` instead. + +
+
+ +
+
+ +**name:** `typing.Optional[str]` — This is the name of the chat. This is just for your own reference. + +
+
+ +
+
+ +**session_id:** `typing.Optional[str]` + +This is the ID of the session that will be used for the chat. +Mutually exclusive with previousChatId. + +
+
+ +
+
+ +**stream:** `typing.Optional[bool]` — Whether to stream the response or not. + +
+
+ +
+
+ +**previous_chat_id:** `typing.Optional[str]` + +This is the ID of the chat that will be used as context for the new chat. +The messages from the previous chat will be used as context. +Mutually exclusive with sessionId. + +
+
+ +
+
+ +**transport:** `typing.Optional[TwilioSmsChatTransport]` + +This is used to send the chat through a transport like SMS. +If transport.phoneNumberId and transport.customer are provided, creates a new session. +If sessionId is provided without transport fields, uses existing session data. +Cannot specify both sessionId and transport fields (phoneNumberId/customer) together. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Campaigns +
client.campaigns.campaign_controller_find_all(...) -> CampaignPaginatedResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from vapi import Vapi +from vapi.environment import VapiEnvironment + +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.campaigns.campaign_controller_find_all() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `typing.Optional[str]` + +
+
+ +
+
+ +**status:** `typing.Optional[CampaignControllerFindAllRequestStatus]` + +
+
+ +
+
+ +**page:** `typing.Optional[float]` — This is the page number to return. Defaults to 1. + +
+
+ +
+
+ +**sort_order:** `typing.Optional[CampaignControllerFindAllRequestSortOrder]` — This is the sort order for pagination. Defaults to 'DESC'. + +
+
+ +
+
+ +**limit:** `typing.Optional[float]` — This is the maximum number of items to return. Defaults to 100. + +
+
+ +
+
+ +**created_at_gt:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is greater than the specified value. + +
+
+ +
+
+ +**created_at_lt:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is less than the specified value. + +
+
+ +
+
+ +**created_at_ge:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is greater than or equal to the specified value. + +
+
+ +
+
+ +**created_at_le:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is less than or equal to the specified value. + +
+
+ +
+
+ +**updated_at_gt:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is greater than the specified value. + +
+
+ +
+
+ +**updated_at_lt:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is less than the specified value. + +
+
+ +
+
+ +**updated_at_ge:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is greater than or equal to the specified value. + +
+
+ +
+
+ +**updated_at_le:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is less than or equal to the specified value. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.campaigns.campaign_controller_create(...) -> Campaign +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from vapi import Vapi +from vapi.environment import VapiEnvironment + +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.campaigns.campaign_controller_create( + name="Q2 Sales Campaign", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**name:** `str` — This is the name of the campaign. This is just for your own reference. + +
+
+ +
+
+ +**assistant_id:** `typing.Optional[str]` — This is the assistant ID that will be used for the campaign calls. Note: Only one of assistantId, workflowId, or squadId can be used. + +
+
+ +
+
+ +**workflow_id:** `typing.Optional[str]` — This is the workflow ID that will be used for the campaign calls. Note: Only one of assistantId, workflowId, or squadId can be used. + +
+
+ +
+
+ +**squad_id:** `typing.Optional[str]` — This is the squad ID that will be used for the campaign calls. Note: Only one of assistantId, workflowId, or squadId can be used. + +
+
+ +
+
+ +**phone_number_id:** `typing.Optional[str]` — This is the phone number ID that will be used for the campaign calls. Required if dialPlan is not provided. Note: phoneNumberId and dialPlan are mutually exclusive. + +
+
+ +
+
+ +**dial_plan:** `typing.Optional[typing.List[DialPlanEntry]]` — This is a list of dial entries, each specifying a phone number and the customers to call using that number. Use this when you want different phone numbers to call different sets of customers. Note: phoneNumberId and dialPlan are mutually exclusive. + +
+
+ +
+
+ +**schedule_plan:** `typing.Optional[SchedulePlan]` — This is the schedule plan for the campaign. Calls will start at startedAt and continue until your organization’s concurrency limit is reached. Any remaining calls will be retried for up to one hour as capacity becomes available. After that hour or after latestAt, whichever comes first, any calls that couldn’t be placed won’t be retried. + +
+
+ +
+
+ +**customers:** `typing.Optional[typing.List[CreateCustomerDto]]` — These are the customers that will be called in the campaign. Required if dialPlan is not provided. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.campaigns.campaign_controller_find_one(...) -> Campaign +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from vapi import Vapi +from vapi.environment import VapiEnvironment + +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.campaigns.campaign_controller_find_one( + id="id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.campaigns.campaign_controller_remove(...) -> Campaign +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from vapi import Vapi +from vapi.environment import VapiEnvironment + +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.campaigns.campaign_controller_remove( + id="id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.campaigns.campaign_controller_update(...) -> Campaign +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from vapi import Vapi +from vapi.environment import VapiEnvironment + +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.campaigns.campaign_controller_update( + id="id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` + +
+
+ +
+
+ +**name:** `typing.Optional[str]` — This is the name of the campaign. This is just for your own reference. + +
+
+ +
+
+ +**assistant_id:** `typing.Optional[str]` + +This is the assistant ID that will be used for the campaign calls. +Can only be updated if campaign is not in progress or has ended. + +
+
+ +
+
+ +**workflow_id:** `typing.Optional[str]` + +This is the workflow ID that will be used for the campaign calls. +Can only be updated if campaign is not in progress or has ended. + +
+
+ +
+
+ +**squad_id:** `typing.Optional[str]` + +This is the squad ID that will be used for the campaign calls. +Can only be updated if campaign is not in progress or has ended. + +
+
+ +
+
+ +**phone_number_id:** `typing.Optional[str]` + +This is the phone number ID that will be used for the campaign calls. +Can only be updated if campaign is not in progress or has ended. +Note: `phoneNumberId` and `dialPlan` are mutually exclusive. + +
+
+ +
+
+ +**dial_plan:** `typing.Optional[typing.List[DialPlanEntry]]` — This is a list of dial entries, each specifying a phone number and the customers to call using that number. Can only be updated if campaign is not in progress or has ended. Note: phoneNumberId and dialPlan are mutually exclusive. + +
+
+ +
+
+ +**schedule_plan:** `typing.Optional[SchedulePlan]` + +This is the schedule plan for the campaign. +Can only be updated if campaign is not in progress or has ended. + +
+
+ +
+
+ +**status:** `typing.Optional[UpdateCampaignDtoStatus]` + +This is the status of the campaign. +Can only be updated to 'ended' if you want to end the campaign. +When set to 'ended', it will delete all scheduled calls. Calls in progress will be allowed to complete. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Sessions +
client.sessions.list(...) -> SessionPaginatedResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from vapi import Vapi +from vapi.environment import VapiEnvironment + +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.sessions.list( + assistant_id_any="assistant-1,assistant-2,assistant-3", + customer_number_any="+1234567890,+0987654321", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `typing.Optional[str]` — This is the unique identifier for the session to filter by. + +
+
+ +
+
+ +**name:** `typing.Optional[str]` + +This is the name of the customer. This is just for your own reference. + +For SIP inbound calls, this is extracted from the `From` SIP header with format `"Display Name" `. + +
+
+ +
+
+ +**assistant_id:** `typing.Optional[str]` — This is the ID of the assistant to filter sessions by. + +
+
+ +
+
+ +**assistant_id_any:** `typing.Optional[str]` — Filter by multiple assistant IDs. Provide as comma-separated values. + +
+
+ +
+
+ +**squad_id:** `typing.Optional[str]` — This is the ID of the squad to filter sessions by. + +
+
+ +
+
+ +**workflow_id:** `typing.Optional[str]` — This is the ID of the workflow to filter sessions by. + +
+
+ +
+
+ +**number_e_164_check_enabled:** `typing.Optional[bool]` + +This is the flag to toggle the E164 check for the `number` field. This is an advanced property which should be used if you know your use case requires it. + +Use cases: +- `false`: To allow non-E164 numbers like `+001234567890`, `1234`, or `abc`. This is useful for dialing out to non-E164 numbers on your SIP trunks. +- `true` (default): To allow only E164 numbers like `+14155551234`. This is standard for PSTN calls. + +If `false`, the `number` is still required to only contain alphanumeric characters (regex: `/^\+?[a-zA-Z0-9]+$/`). + +@default true (E164 check is enabled) + +
+
+ +
+
+ +**extension:** `typing.Optional[str]` — This is the extension that will be dialed after the call is answered. + +
+
+ +
+
+ +**assistant_overrides:** `typing.Optional[str]` + +These are the overrides for the assistant's settings and template variables specific to this customer. +This allows customization of the assistant's behavior for individual customers in batch calls. + +
+
+ +
+
+ +**number:** `typing.Optional[str]` — This is the number of the customer. + +
+
+ +
+
+ +**sip_uri:** `typing.Optional[str]` — This is the SIP URI of the customer. + +
+
+ +
+
+ +**email:** `typing.Optional[str]` — This is the email of the customer. + +
+
+ +
+
+ +**external_id:** `typing.Optional[str]` — This is the external ID of the customer. + +
+
+ +
+
+ +**customer_number_any:** `typing.Optional[str]` — Filter by any of the specified customer phone numbers (comma-separated). + +
+
+ +
+
+ +**phone_number_id:** `typing.Optional[str]` — This will return sessions with the specified phoneNumberId. + +
+
+ +
+
+ +**phone_number_id_any:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — This will return sessions with any of the specified phoneNumberIds. + +
+
+ +
+
+ +**page:** `typing.Optional[float]` — This is the page number to return. Defaults to 1. + +
+
+ +
+
+ +**sort_order:** `typing.Optional[ListSessionsRequestSortOrder]` — This is the sort order for pagination. Defaults to 'DESC'. + +
+
+ +
+
+ +**limit:** `typing.Optional[float]` — This is the maximum number of items to return. Defaults to 100. + +
+
+ +
+
+ +**created_at_gt:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is greater than the specified value. + +
+
+ +
+
+ +**created_at_lt:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is less than the specified value. + +
+
+ +
+
+ +**created_at_ge:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is greater than or equal to the specified value. + +
+
+ +
+
+ +**created_at_le:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is less than or equal to the specified value. + +
+
+ +
+
+ +**updated_at_gt:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is greater than the specified value. + +
+
+ +
+
+ +**updated_at_lt:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is less than the specified value. + +
+
+ +
+
+ +**updated_at_ge:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is greater than or equal to the specified value. + +
+
+ +
+
+ +**updated_at_le:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is less than or equal to the specified value. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.sessions.create(...) -> Session +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from vapi import Vapi +from vapi.environment import VapiEnvironment + +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.sessions.create() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**name:** `typing.Optional[str]` — This is a user-defined name for the session. Maximum length is 40 characters. + +
+
+ +
+
+ +**status:** `typing.Optional[CreateSessionDtoStatus]` — This is the current status of the session. Can be either 'active' or 'completed'. + +
+
+ +
+
+ +**expiration_seconds:** `typing.Optional[float]` — Session expiration time in seconds. Defaults to 24 hours (86400 seconds) if not set. + +
+
+ +
+
+ +**assistant_id:** `typing.Optional[str]` — This is the ID of the assistant associated with this session. Use this when referencing an existing assistant. + +
+
+ +
+
+ +**assistant:** `typing.Optional[CreateAssistantDto]` + +This is the assistant configuration for this session. Use this when creating a new assistant configuration. +If assistantId is provided, this will be ignored. + +
+
+ +
+
+ +**assistant_overrides:** `typing.Optional[AssistantOverrides]` + +These are the overrides for the assistant configuration. +Use this to provide variable values and other overrides when using assistantId. +Variable substitution will be applied to the assistant's messages and other text-based fields. + +
+
+ +
+
+ +**squad_id:** `typing.Optional[str]` — This is the squad ID associated with this session. Use this when referencing an existing squad. + +
+
+ +
+
+ +**squad:** `typing.Optional[CreateSquadDto]` + +This is the squad configuration for this session. Use this when creating a new squad configuration. +If squadId is provided, this will be ignored. + +
+
+ +
+
+ +**messages:** `typing.Optional[typing.List[CreateSessionDtoMessagesItem]]` — This is an array of chat messages in the session. + +
+
+ +
+
+ +**customer:** `typing.Optional[CreateCustomerDto]` — This is the customer information associated with this session. + +
+
+ +
+
+ +**customer_id:** `typing.Optional[str]` — This is the customerId of the customer associated with this session. + +
+
+ +
+
+ +**phone_number_id:** `typing.Optional[str]` — This is the ID of the phone number associated with this session. + +
+
+ +
+
+ +**phone_number:** `typing.Optional[ImportTwilioPhoneNumberDto]` — This is the phone number configuration for this session. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.sessions.get(...) -> Session +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from vapi import Vapi +from vapi.environment import VapiEnvironment + +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.sessions.get( + id="id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.sessions.delete(...) -> Session +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from vapi import Vapi +from vapi.environment import VapiEnvironment + +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.sessions.delete( + id="id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.sessions.update(...) -> Session +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from vapi import Vapi +from vapi.environment import VapiEnvironment + +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.sessions.update( + id="id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` + +
+
+ +
+
+ +**name:** `typing.Optional[str]` — This is the new name for the session. Maximum length is 40 characters. + +
+
+ +
+
+ +**status:** `typing.Optional[UpdateSessionDtoStatus]` — This is the new status for the session. + +
+
+ +
+
+ +**expiration_seconds:** `typing.Optional[float]` — Session expiration time in seconds. Defaults to 24 hours (86400 seconds) if not set. + +
+
+ +
+
+ +**messages:** `typing.Optional[typing.List[UpdateSessionDtoMessagesItem]]` — This is the updated array of chat messages. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## PhoneNumbers +
client.phone_numbers.list(...) -> typing.List[ListPhoneNumbersResponseItem] +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from vapi import Vapi +from vapi.environment import VapiEnvironment + +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.phone_numbers.list() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**limit:** `typing.Optional[float]` — This is the maximum number of items to return. Defaults to 100. + +
+
+ +
+
+ +**created_at_gt:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is greater than the specified value. + +
+
+ +
+
+ +**created_at_lt:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is less than the specified value. + +
+
+ +
+
+ +**created_at_ge:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is greater than or equal to the specified value. + +
+
+ +
+
+ +**created_at_le:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is less than or equal to the specified value. + +
+
+ +
+
+ +**updated_at_gt:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is greater than the specified value. + +
+
+ +
+
+ +**updated_at_lt:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is less than the specified value. + +
+
+ +
+
+ +**updated_at_ge:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is greater than or equal to the specified value. + +
+
+ +
+
+ +**updated_at_le:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is less than or equal to the specified value. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.phone_numbers.create(...) -> CreatePhoneNumbersResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from vapi import Vapi +from vapi.environment import VapiEnvironment +from vapi.phone_numbers import CreatePhoneNumbersRequest_ByoPhoneNumber + +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.phone_numbers.create( + request=CreatePhoneNumbersRequest_ByoPhoneNumber( + credential_id="credentialId", + ), +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `CreatePhoneNumbersRequest` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.phone_numbers.phone_number_controller_find_all_paginated(...) -> PhoneNumberPaginatedResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from vapi import Vapi +from vapi.environment import VapiEnvironment + +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.phone_numbers.phone_number_controller_find_all_paginated() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**search:** `typing.Optional[str]` — This will search phone numbers by name, number, or SIP URI (partial match, case-insensitive). + +
+
+ +
+
+ +**page:** `typing.Optional[float]` — This is the page number to return. Defaults to 1. + +
+
+ +
+
+ +**sort_order:** `typing.Optional[PhoneNumberControllerFindAllPaginatedRequestSortOrder]` — This is the sort order for pagination. Defaults to 'DESC'. + +
+
+ +
+
+ +**limit:** `typing.Optional[float]` — This is the maximum number of items to return. Defaults to 100. + +
+
+ +
+
+ +**created_at_gt:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is greater than the specified value. + +
+
+ +
+
+ +**created_at_lt:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is less than the specified value. + +
+
+ +
+
+ +**created_at_ge:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is greater than or equal to the specified value. + +
+
+ +
+
+ +**created_at_le:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is less than or equal to the specified value. + +
+
+ +
+
+ +**updated_at_gt:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is greater than the specified value. + +
+
+ +
+
+ +**updated_at_lt:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is less than the specified value. + +
+
+ +
+
+ +**updated_at_ge:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is greater than or equal to the specified value. + +
+
+ +
+
+ +**updated_at_le:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is less than or equal to the specified value. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.phone_numbers.get(...) -> GetPhoneNumbersResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from vapi import Vapi +from vapi.environment import VapiEnvironment + +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.phone_numbers.get( + id="id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.phone_numbers.delete(...) -> DeletePhoneNumbersResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from vapi import Vapi +from vapi.environment import VapiEnvironment + +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.phone_numbers.delete( + id="id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.phone_numbers.update(...) -> UpdatePhoneNumbersResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from vapi import Vapi +from vapi.environment import VapiEnvironment +from vapi.phone_numbers import UpdatePhoneNumbersRequestBody_ByoPhoneNumber + +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.phone_numbers.update( + id="id", + request=UpdatePhoneNumbersRequestBody_ByoPhoneNumber(), +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` + +
+
+ +
+
+ +**request:** `UpdatePhoneNumbersRequestBody` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Tools +
client.tools.list(...) -> typing.List[ListToolsResponseItem] +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from vapi import Vapi +from vapi.environment import VapiEnvironment + +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.tools.list() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**limit:** `typing.Optional[float]` — This is the maximum number of items to return. Defaults to 100. + +
+
+ +
+
+ +**created_at_gt:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is greater than the specified value. + +
+
+ +
+
+ +**created_at_lt:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is less than the specified value. + +
+
+ +
+
+ +**created_at_ge:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is greater than or equal to the specified value. + +
+
+ +
+
+ +**created_at_le:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is less than or equal to the specified value. + +
+
+ +
+
+ +**updated_at_gt:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is greater than the specified value. + +
+
+ +
+
+ +**updated_at_lt:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is less than the specified value. + +
+
+ +
+
+ +**updated_at_ge:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is greater than or equal to the specified value. + +
+
+ +
+
+ +**updated_at_le:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is less than or equal to the specified value. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.tools.create(...) -> CreateToolsResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from vapi import Vapi +from vapi.environment import VapiEnvironment +from vapi.tools import CreateToolsRequest_ApiRequest + +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.tools.create( + request=CreateToolsRequest_ApiRequest( + method="POST", + url="url", + ), +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `CreateToolsRequest` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.tools.get(...) -> GetToolsResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from vapi import Vapi +from vapi.environment import VapiEnvironment + +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.tools.get( + id="id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.tools.delete(...) -> DeleteToolsResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from vapi import Vapi +from vapi.environment import VapiEnvironment + +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.tools.delete( + id="id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.tools.update(...) -> UpdateToolsResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from vapi import Vapi +from vapi.environment import VapiEnvironment +from vapi.tools import UpdateToolsRequestBody_ApiRequest + +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.tools.update( + id="id", + request=UpdateToolsRequestBody_ApiRequest(), +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` + +
+
+ +
+
+ +**request:** `UpdateToolsRequestBody` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Files +
client.files.list() -> typing.List[File] +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from vapi import Vapi +from vapi.environment import VapiEnvironment + +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.files.list() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.files.create(...) -> File +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from vapi import Vapi +from vapi.environment import VapiEnvironment + +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.files.create( + file="example_file", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**file:** `core.File` — This is the File you want to upload for use with the Knowledge Base. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.files.get(...) -> File +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from vapi import Vapi +from vapi.environment import VapiEnvironment + +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.files.get( + id="id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.files.delete(...) -> File +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from vapi import Vapi +from vapi.environment import VapiEnvironment + +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.files.delete( + id="id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.files.update(...) -> File +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from vapi import Vapi +from vapi.environment import VapiEnvironment + +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.files.update( + id="id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` + +
+
+ +
+
+ +**name:** `typing.Optional[str]` — This is the name of the file. This is just for your own reference. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## StructuredOutputs +
client.structured_outputs.structured_output_controller_find_all(...) -> StructuredOutputPaginatedResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from vapi import Vapi +from vapi.environment import VapiEnvironment + +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.structured_outputs.structured_output_controller_find_all() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `typing.Optional[str]` — This will return structured outputs where the id matches the specified value. + +
+
+ +
+
+ +**name:** `typing.Optional[str]` — This will return structured outputs where the name matches the specified value. + +
+
+ +
+
+ +**page:** `typing.Optional[float]` — This is the page number to return. Defaults to 1. + +
+
+ +
+
+ +**sort_order:** `typing.Optional[StructuredOutputControllerFindAllRequestSortOrder]` — This is the sort order for pagination. Defaults to 'DESC'. + +
+
+ +
+
+ +**limit:** `typing.Optional[float]` — This is the maximum number of items to return. Defaults to 100. + +
+
+ +
+
+ +**created_at_gt:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is greater than the specified value. + +
+
+ +
+
+ +**created_at_lt:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is less than the specified value. + +
+
+ +
+
+ +**created_at_ge:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is greater than or equal to the specified value. + +
+
+ +
+
+ +**created_at_le:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is less than or equal to the specified value. + +
+
+ +
+
+ +**updated_at_gt:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is greater than the specified value. + +
+
+ +
+
+ +**updated_at_lt:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is less than the specified value. + +
+
+ +
+
+ +**updated_at_ge:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is greater than or equal to the specified value. + +
+
+ +
+
+ +**updated_at_le:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is less than or equal to the specified value. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.structured_outputs.structured_output_controller_create(...) -> StructuredOutput +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from vapi import Vapi, JsonSchema +from vapi.environment import VapiEnvironment + +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.structured_outputs.structured_output_controller_create( + name="name", + schema=JsonSchema( + type="string", + ), +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `CreateStructuredOutputDto` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.structured_outputs.structured_output_controller_find_one(...) -> StructuredOutput +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from vapi import Vapi +from vapi.environment import VapiEnvironment + +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.structured_outputs.structured_output_controller_find_one( + id="id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.structured_outputs.structured_output_controller_remove(...) -> StructuredOutput +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from vapi import Vapi +from vapi.environment import VapiEnvironment + +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.structured_outputs.structured_output_controller_remove( + id="id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
-@default 'assistant-speaks-first' +**id:** `str`
@@ -1147,47 +5013,59 @@ Use:
-**hipaa_enabled:** `typing.Optional[bool]` — When this is enabled, no logs, recordings, or transcriptions will be stored. At the end of the call, you will still receive an end-of-call-report message to store on your server. Defaults to false. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
-
-
-**client_messages:** `typing.Optional[typing.Sequence[UpdateAssistantDtoClientMessagesItem]]` — These are the messages that will be sent to your Client SDKs. Default is conversation-update,function-call,hang,model-output,speech-update,status-update,transcript,tool-calls,user-interrupted,voice-input. You can check the shape of the messages in ClientMessage schema. -
+
+
client.structured_outputs.structured_output_controller_update(...) -> StructuredOutput
-**server_messages:** `typing.Optional[typing.Sequence[UpdateAssistantDtoServerMessagesItem]]` — These are the messages that will be sent to your Server URL. Default is conversation-update,end-of-call-report,function-call,hang,speech-update,status-update,tool-calls,transfer-destination-request,user-interrupted. You can check the shape of the messages in ServerMessage schema. - -
-
+#### 🔌 Usage
-**silence_timeout_seconds:** `typing.Optional[float]` +
+
-How many seconds of silence to wait before ending the call. Defaults to 30. +```python +from vapi import Vapi +from vapi.environment import VapiEnvironment -@default 30 - +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.structured_outputs.structured_output_controller_update( + id="id", + schema_override="schemaOverride", +) + +``` +
+
+#### ⚙️ Parameters +
-**max_duration_seconds:** `typing.Optional[float]` - -This is the maximum number of seconds that the call will last. When the call reaches this duration, it will be ended. +
+
-@default 600 (10 minutes) +**id:** `str`
@@ -1195,7 +5073,7 @@ This is the maximum number of seconds that the call will last. When the call rea
-**background_sound:** `typing.Optional[UpdateAssistantDtoBackgroundSound]` — This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'. +**schema_override:** `str`
@@ -1203,13 +5081,12 @@ This is the maximum number of seconds that the call will last. When the call rea
-**backchanneling_enabled:** `typing.Optional[bool]` - -This determines whether the model says 'mhmm', 'ahem' etc. while user is speaking. +**type:** `typing.Optional[UpdateStructuredOutputDtoType]` -Default `false` while in beta. +This is the type of structured output. -@default false +- 'ai': Uses an LLM to extract structured data from the conversation (default). +- 'regex': Uses a regex pattern to extract data from the transcript without an LLM.
@@ -1217,13 +5094,18 @@ Default `false` while in beta.
-**background_denoising_enabled:** `typing.Optional[bool]` +**regex:** `typing.Optional[str]` -This enables filtering of noise and background speech while the user is talking. +This is the regex pattern to match against the transcript. -Default `false` while in beta. +Only used when type is 'regex'. Supports both raw patterns (e.g. '\d+') and +regex literal format (e.g. '/\d+/gi'). Uses RE2 syntax for safety. -@default false +The result depends on the schema type: +- boolean: true if the pattern matches, false otherwise +- string: the first match or first capture group +- number/integer: the first match parsed as a number +- array: all matches
@@ -1231,13 +5113,21 @@ Default `false` while in beta.
-**model_output_in_messages_enabled:** `typing.Optional[bool]` +**model:** `typing.Optional[UpdateStructuredOutputDtoModel]` -This determines whether the model's output is used in conversation history rather than the transcription of assistant's speech. +This is the model that will be used to extract the structured output. -Default `false` while in beta. +To provide your own custom system and user prompts for structured output extraction, populate the messages array with your system and user messages. You can specify liquid templating in your system and user messages. +Between the system or user messages, you must reference either 'transcript' or 'messages' with the `{{}}` syntax to access the conversation history. +Between the system or user messages, you must reference a variation of the structured output with the `{{}}` syntax to access the structured output definition. +i.e.: +`{{structuredOutput}}` +`{{structuredOutput.name}}` +`{{structuredOutput.description}}` +`{{structuredOutput.schema}}` -@default false +If model is not specified, GPT-4.1 will be used by default for extraction, utilizing default system and user prompts. +If messages or required fields are not specified, the default system and user prompts will be used.
@@ -1245,7 +5135,7 @@ Default `false` while in beta.
-**transport_configurations:** `typing.Optional[typing.Sequence[TransportConfigurationTwilio]]` — These are the configurations to be passed to the transport providers of assistant's calls, like Twilio. You can store multiple configurations for different transport providers. For a call, only the configuration matching the call transport provider is used. +**compliance_plan:** `typing.Optional[ComplianceOverride]` — Compliance configuration for this output. Only enable overrides if no sensitive data will be stored.
@@ -1253,11 +5143,7 @@ Default `false` while in beta.
-**name:** `typing.Optional[str]` - -This is the name of the assistant. - -This is required when you want to transfer between assistants in a call. +**name:** `typing.Optional[str]` — This is the name of the structured output.
@@ -1265,11 +5151,11 @@ This is required when you want to transfer between assistants in a call.
-**first_message:** `typing.Optional[str]` +**description:** `typing.Optional[str]` -This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.). +This is the description of what the structured output extracts. -If unspecified, assistant will wait for user to speak and use the model to respond once they speak. +Use this to provide context about what data will be extracted and how it will be used.
@@ -1277,11 +5163,11 @@ If unspecified, assistant will wait for user to speak and use the model to respo
-**voicemail_detection:** `typing.Optional[TwilioVoicemailDetection]` +**assistant_ids:** `typing.Optional[typing.List[str]]` -These are the settings to configure or disable voicemail detection. Alternatively, voicemail detection can be configured using the model.tools=[VoicemailTool]. -This uses Twilio's built-in detection while the VoicemailTool relies on the model to detect if a voicemail was reached. -You can use neither of them, one of them, or both of them. By default, Twilio built-in detection is enabled while VoicemailTool is not. +These are the assistant IDs that this structured output is linked to. + +When linked to assistants, this structured output will be available for extraction during those assistant's calls.
@@ -1289,11 +5175,11 @@ You can use neither of them, one of them, or both of them. By default, Twilio bu
-**voicemail_message:** `typing.Optional[str]` +**workflow_ids:** `typing.Optional[typing.List[str]]` -This is the message that the assistant will say if the call is forwarded to voicemail. +These are the workflow IDs that this structured output is linked to. -If unspecified, it will hang up. +When linked to workflows, this structured output will be available for extraction during those workflow's execution.
@@ -1301,11 +5187,17 @@ If unspecified, it will hang up.
-**end_call_message:** `typing.Optional[str]` +**schema:** `typing.Optional[JsonSchema]` -This is the message that the assistant will say if it ends the call. +This is the JSON Schema definition for the structured output. -If unspecified, it will hang up without saying anything. +Defines the structure and validation rules for the data that will be extracted. Supports all JSON Schema features including: +- Objects and nested properties +- Arrays and array validation +- String, number, boolean, and null types +- Enums and const values +- Validation constraints (min/max, patterns, etc.) +- Composition with allOf, anyOf, oneOf
@@ -1313,88 +5205,63 @@ If unspecified, it will hang up without saying anything.
-**end_call_phrases:** `typing.Optional[typing.Sequence[str]]` — This list contains phrases that, if spoken by the assistant, will trigger the call to be hung up. Case insensitive. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
- -
-
- -**metadata:** `typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]` — This is for metadata you want to store on the assistant. -
-
-
- -**server_url:** `typing.Optional[str]` - -This is the URL Vapi will communicate with via HTTP GET and POST Requests. This is used for retrieving context, function calling, and end-of-call reports. -All requests will be sent with the call object among other things relevant to that message. You can find more details in the Server URL documentation. - -This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: tool.server.url > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl -
+
+
client.structured_outputs.structured_output_controller_run(...) -> StructuredOutput
-**server_url_secret:** `typing.Optional[str]` - -This is the secret you can set that Vapi will send with every request to your server. Will be sent as a header called x-vapi-secret. - -Same precedence logic as serverUrl. - -
-
+#### 🔌 Usage
-**analysis_plan:** `typing.Optional[AnalysisPlan]` — This is the plan for analysis of assistant's calls. Stored in `call.analysis`. - -
-
-
-**artifact_plan:** `typing.Optional[ArtifactPlan]` +```python +from vapi import Vapi +from vapi.environment import VapiEnvironment + +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) -This is the plan for artifacts generated during assistant's calls. Stored in `call.artifact`. +client.structured_outputs.structured_output_controller_run( + call_ids=[ + "callIds" + ], +) -Note: `recordingEnabled` is currently at the root level. It will be moved to `artifactPlan` in the future, but will remain backwards compatible. - +```
- -
-
- -**message_plan:** `typing.Optional[MessagePlan]` - -This is the plan for static predefined messages that can be spoken by the assistant during the call, like `idleMessages`. - -Note: `firstMessage`, `voicemailMessage`, and `endCallMessage` are currently at the root level. They will be moved to `messagePlan` in the future, but will remain backwards compatible. -
+#### ⚙️ Parameters +
-**start_speaking_plan:** `typing.Optional[StartSpeakingPlan]` +
+
-This is the plan for when the assistant should start talking. +**call_ids:** `typing.List[str]` -You should configure this if you're running into these issues: -- The assistant is too slow to start talking after the customer is done speaking. -- The assistant is too fast to start talking after the customer is done speaking. -- The assistant is so fast that it's actually interrupting the customer. +This is the array of callIds that will be updated with the new structured output value. If preview is true, this array must be provided and contain exactly 1 callId. +If preview is false, up to 100 callIds may be provided.
@@ -1402,16 +5269,10 @@ You should configure this if you're running into these issues:
-**stop_speaking_plan:** `typing.Optional[StopSpeakingPlan]` - -This is the plan for when assistant should stop talking on customer interruption. +**preview_enabled:** `typing.Optional[bool]` -You should configure this if you're running into these issues: -- The assistant is too slow to recognize customer's interruption. -- The assistant is too fast to recognize customer's interruption. -- The assistant is getting interrupted by phrases that are just acknowledgments. -- The assistant is getting interrupted by background noises. -- The assistant is not properly stopping -- it starts talking right after getting interrupted. +This is the preview flag for the re-run. If true, the re-run will be executed and the response will be returned immediately and the call artifact will NOT be updated. +If false (default), the re-run will be executed and the response will be updated in the call artifact.
@@ -1419,15 +5280,10 @@ You should configure this if you're running into these issues:
-**monitor_plan:** `typing.Optional[MonitorPlan]` - -This is the plan for real-time monitoring of the assistant's calls. - -Usage: -- To enable live listening of the assistant's calls, set `monitorPlan.listenEnabled` to `true`. -- To enable live control of the assistant's calls, set `monitorPlan.controlEnabled` to `true`. +**structured_output_id:** `typing.Optional[str]` -Note, `serverMessages`, `clientMessages`, `serverUrl` and `serverUrlSecret` are currently at the root level but will be moved to `monitorPlan` in the future. Will remain backwards compatible +This is the ID of the structured output that will be run. This must be provided unless a transient structured output is provided. +When the re-run is executed, only the value of this structured output will be replaced with the new value, or added if not present.
@@ -1435,7 +5291,10 @@ Note, `serverMessages`, `clientMessages`, `serverUrl` and `serverUrlSecret` are
-**credential_ids:** `typing.Optional[typing.Sequence[str]]` — These are the credentials that will be used for the assistant calls. By default, all the credentials are available for use in the call but you can provide a subset using this. +**structured_output:** `typing.Optional[CreateStructuredOutputDto]` + +This is the transient structured output that will be run. This must be provided if a structured output ID is not provided. +When the re-run is executed, the structured output value will be added to the existing artifact.
@@ -1455,8 +5314,8 @@ Note, `serverMessages`, `clientMessages`, `serverUrl` and `serverUrlSecret` are
-## PhoneNumbers -
client.phone_numbers.list(...) +## Insight +
client.insight.insight_controller_find_all(...) -> InsightPaginatedResponse
@@ -1470,11 +5329,14 @@ Note, `serverMessages`, `clientMessages`, `serverUrl` and `serverUrlSecret` are ```python from vapi import Vapi +from vapi.environment import VapiEnvironment client = Vapi( - token="YOUR_TOKEN", + token="", + environment=VapiEnvironment.DEFAULT, ) -client.phone_numbers.list() + +client.insight.insight_controller_find_all() ```
@@ -1490,6 +5352,30 @@ client.phone_numbers.list()
+**id:** `typing.Optional[str]` + +
+
+ +
+
+ +**page:** `typing.Optional[float]` — This is the page number to return. Defaults to 1. + +
+
+ +
+
+ +**sort_order:** `typing.Optional[InsightControllerFindAllRequestSortOrder]` — This is the sort order for pagination. Defaults to 'DESC'. + +
+
+ +
+
+ **limit:** `typing.Optional[float]` — This is the maximum number of items to return. Defaults to 100.
@@ -1498,7 +5384,7 @@ client.phone_numbers.list()
-**created_at_gt:** `typing.Optional[dt.datetime]` — This will return items where the createdAt is greater than the specified value. +**created_at_gt:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is greater than the specified value.
@@ -1506,7 +5392,7 @@ client.phone_numbers.list()
-**created_at_lt:** `typing.Optional[dt.datetime]` — This will return items where the createdAt is less than the specified value. +**created_at_lt:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is less than the specified value.
@@ -1514,7 +5400,7 @@ client.phone_numbers.list()
-**created_at_ge:** `typing.Optional[dt.datetime]` — This will return items where the createdAt is greater than or equal to the specified value. +**created_at_ge:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is greater than or equal to the specified value.
@@ -1522,7 +5408,7 @@ client.phone_numbers.list()
-**created_at_le:** `typing.Optional[dt.datetime]` — This will return items where the createdAt is less than or equal to the specified value. +**created_at_le:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is less than or equal to the specified value.
@@ -1530,7 +5416,7 @@ client.phone_numbers.list()
-**updated_at_gt:** `typing.Optional[dt.datetime]` — This will return items where the updatedAt is greater than the specified value. +**updated_at_gt:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is greater than the specified value.
@@ -1538,7 +5424,7 @@ client.phone_numbers.list()
-**updated_at_lt:** `typing.Optional[dt.datetime]` — This will return items where the updatedAt is less than the specified value. +**updated_at_lt:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is less than the specified value.
@@ -1546,7 +5432,7 @@ client.phone_numbers.list()
-**updated_at_ge:** `typing.Optional[dt.datetime]` — This will return items where the updatedAt is greater than or equal to the specified value. +**updated_at_ge:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is greater than or equal to the specified value.
@@ -1554,7 +5440,7 @@ client.phone_numbers.list()
-**updated_at_le:** `typing.Optional[dt.datetime]` — This will return items where the updatedAt is less than or equal to the specified value. +**updated_at_le:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is less than or equal to the specified value.
@@ -1574,7 +5460,7 @@ client.phone_numbers.list()
-
client.phone_numbers.create(...) +
client.insight.insight_controller_create(...) -> InsightControllerCreateResponse
@@ -1587,14 +5473,25 @@ client.phone_numbers.list()
```python -from vapi import CreateByoPhoneNumberDto, Vapi +from vapi import Vapi, JsonQueryOnCallTableWithStringTypeColumn +from vapi.environment import VapiEnvironment +from vapi.insight import InsightControllerCreateRequest_Bar client = Vapi( - token="YOUR_TOKEN", + token="", + environment=VapiEnvironment.DEFAULT, ) -client.phone_numbers.create( - request=CreateByoPhoneNumberDto( - credential_id="credentialId", + +client.insight.insight_controller_create( + request=InsightControllerCreateRequest_Bar( + queries=[ + JsonQueryOnCallTableWithStringTypeColumn( + type="vapiql-json", + table="call", + column="id", + operation="count", + ) + ], ), ) @@ -1612,7 +5509,7 @@ client.phone_numbers.create(
-**request:** `PhoneNumbersCreateRequest` +**request:** `InsightControllerCreateRequest`
@@ -1632,7 +5529,7 @@ client.phone_numbers.create(
-
client.phone_numbers.get(...) +
client.insight.insight_controller_find_one(...) -> InsightControllerFindOneResponse
@@ -1646,11 +5543,14 @@ client.phone_numbers.create( ```python from vapi import Vapi +from vapi.environment import VapiEnvironment client = Vapi( - token="YOUR_TOKEN", + token="", + environment=VapiEnvironment.DEFAULT, ) -client.phone_numbers.get( + +client.insight.insight_controller_find_one( id="id", ) @@ -1688,7 +5588,7 @@ client.phone_numbers.get(
-
client.phone_numbers.delete(...) +
client.insight.insight_controller_remove(...) -> InsightControllerRemoveResponse
@@ -1702,11 +5602,14 @@ client.phone_numbers.get( ```python from vapi import Vapi +from vapi.environment import VapiEnvironment client = Vapi( - token="YOUR_TOKEN", + token="", + environment=VapiEnvironment.DEFAULT, ) -client.phone_numbers.delete( + +client.insight.insight_controller_remove( id="id", ) @@ -1744,7 +5647,7 @@ client.phone_numbers.delete(
-
client.phone_numbers.update(...) +
client.insight.insight_controller_update(...) -> InsightControllerUpdateResponse
@@ -1758,12 +5661,17 @@ client.phone_numbers.delete( ```python from vapi import Vapi +from vapi.environment import VapiEnvironment +from vapi.insight import InsightControllerUpdateRequestBody_Bar client = Vapi( - token="YOUR_TOKEN", + token="", + environment=VapiEnvironment.DEFAULT, ) -client.phone_numbers.update( + +client.insight.insight_controller_update( id="id", + request=InsightControllerUpdateRequestBody_Bar(), ) ``` @@ -1788,14 +5696,7 @@ client.phone_numbers.update(
-**fallback_destination:** `typing.Optional[UpdatePhoneNumberDtoFallbackDestination]` - -This is the fallback destination an inbound call will be transferred to if: -1. `assistantId` is not set -2. `squadId` is not set -3. and, `assistant-request` message to the `serverUrl` fails - -If this is not set and above conditions are met, the inbound call is hung up with an error message. +**request:** `InsightControllerUpdateRequestBody`
@@ -1803,45 +5704,66 @@ If this is not set and above conditions are met, the inbound call is hung up wit
-**name:** `typing.Optional[str]` — This is the name of the phone number. This is just for your own reference. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+ + + + +
+
client.insight.insight_controller_run(...) -> InsightRunResponse
-**assistant_id:** `typing.Optional[str]` - -This is the assistant that will be used for incoming calls to this phone number. +#### 🔌 Usage -If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected. - -
-
+
+
-**squad_id:** `typing.Optional[str]` +```python +from vapi import Vapi +from vapi.environment import VapiEnvironment -This is the squad that will be used for incoming calls to this phone number. +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) -If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected. - +client.insight.insight_controller_run( + id="id", +) + +```
+
+
+ +#### ⚙️ Parameters
-**server_url:** `typing.Optional[str]` +
+
-This is the server URL where messages will be sent for calls on this number. This includes the `assistant-request` message. +**id:** `str` + +
+
-You can see the shape of the messages sent in `ServerMessage`. +
+
-This overrides the `org.serverUrl`. Order of precedence: tool.server.url > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl. +**format_plan:** `typing.Optional[InsightRunFormatPlan]`
@@ -1849,11 +5771,15 @@ This overrides the `org.serverUrl`. Order of precedence: tool.server.url > assis
-**server_url_secret:** `typing.Optional[str]` +**time_range_override:** `typing.Optional[InsightTimeRangeWithStep]` -This is the secret Vapi will send with every message to your server. It's sent as a header called x-vapi-secret. - -Same precedence logic as serverUrl. +This is the optional time range override for the insight. +If provided, overrides every field in the insight's timeRange. +If this is provided with missing fields, defaults will be used, not the insight's timeRange. +start default - "-7d" +end default - "now" +step default - "day" +For Pie and Text Insights, step will be ignored even if provided.
@@ -1873,8 +5799,7 @@ Same precedence logic as serverUrl.
-## Squads -
client.squads.list(...) +
client.insight.insight_controller_preview(...) -> InsightRunResponse
@@ -1887,12 +5812,27 @@ Same precedence logic as serverUrl.
```python -from vapi import Vapi +from vapi import Vapi, JsonQueryOnCallTableWithStringTypeColumn +from vapi.environment import VapiEnvironment +from vapi.insight import InsightControllerPreviewRequest_Bar client = Vapi( - token="YOUR_TOKEN", + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.insight.insight_controller_preview( + request=InsightControllerPreviewRequest_Bar( + queries=[ + JsonQueryOnCallTableWithStringTypeColumn( + type="vapiql-json", + table="call", + column="id", + operation="count", + ) + ], + ), ) -client.squads.list() ```
@@ -1908,23 +5848,65 @@ client.squads.list()
-**limit:** `typing.Optional[float]` — This is the maximum number of items to return. Defaults to 100. - +**request:** `InsightControllerPreviewRequest` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+ +
+ + + + +
+ +## Eval +
client.eval.eval_controller_get_paginated(...) -> EvalPaginatedResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from vapi import Vapi +from vapi.environment import VapiEnvironment + +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.eval.eval_controller_get_paginated() + +``` +
+
+#### ⚙️ Parameters +
-**created_at_gt:** `typing.Optional[dt.datetime]` — This will return items where the createdAt is greater than the specified value. - -
-
-
-**created_at_lt:** `typing.Optional[dt.datetime]` — This will return items where the createdAt is less than the specified value. +**id:** `typing.Optional[str]`
@@ -1932,7 +5914,7 @@ client.squads.list()
-**created_at_ge:** `typing.Optional[dt.datetime]` — This will return items where the createdAt is greater than or equal to the specified value. +**page:** `typing.Optional[float]` — This is the page number to return. Defaults to 1.
@@ -1940,7 +5922,7 @@ client.squads.list()
-**created_at_le:** `typing.Optional[dt.datetime]` — This will return items where the createdAt is less than or equal to the specified value. +**sort_order:** `typing.Optional[EvalControllerGetPaginatedRequestSortOrder]` — This is the sort order for pagination. Defaults to 'DESC'.
@@ -1948,7 +5930,7 @@ client.squads.list()
-**updated_at_gt:** `typing.Optional[dt.datetime]` — This will return items where the updatedAt is greater than the specified value. +**limit:** `typing.Optional[float]` — This is the maximum number of items to return. Defaults to 100.
@@ -1956,7 +5938,7 @@ client.squads.list()
-**updated_at_lt:** `typing.Optional[dt.datetime]` — This will return items where the updatedAt is less than the specified value. +**created_at_gt:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is greater than the specified value.
@@ -1964,7 +5946,7 @@ client.squads.list()
-**updated_at_ge:** `typing.Optional[dt.datetime]` — This will return items where the updatedAt is greater than or equal to the specified value. +**created_at_lt:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is less than the specified value.
@@ -1972,7 +5954,7 @@ client.squads.list()
-**updated_at_le:** `typing.Optional[dt.datetime]` — This will return items where the updatedAt is less than or equal to the specified value. +**created_at_ge:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is greater than or equal to the specified value.
@@ -1980,59 +5962,23 @@ client.squads.list()
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**created_at_le:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is less than or equal to the specified value.
-
-
- - - - -
- -
client.squads.create(...) -
-
- -#### 🔌 Usage - -
-
-```python -from vapi import SquadMemberDto, Vapi - -client = Vapi( - token="YOUR_TOKEN", -) -client.squads.create( - members=[SquadMemberDto()], -) - -``` -
-
+**updated_at_gt:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is greater than the specified value. +
-#### ⚙️ Parameters - -
-
-
-**members:** `typing.Sequence[SquadMemberDto]` - -This is the list of assistants that make up the squad. - -The call will start with the first assistant in the list. +**updated_at_lt:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is less than the specified value.
@@ -2040,7 +5986,7 @@ The call will start with the first assistant in the list.
-**name:** `typing.Optional[str]` — This is the name of the squad. +**updated_at_ge:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is greater than or equal to the specified value.
@@ -2048,11 +5994,7 @@ The call will start with the first assistant in the list.
-**members_overrides:** `typing.Optional[AssistantOverrides]` - -This can be used to override all the assistants' settings and provide values for their template variables. - -Both `membersOverrides` and `members[n].assistantOverrides` can be used together. First, `members[n].assistantOverrides` is applied. Then, `membersOverrides` is applied as a global override. +**updated_at_le:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is less than or equal to the specified value.
@@ -2072,7 +6014,7 @@ Both `membersOverrides` and `members[n].assistantOverrides` can be used together
-
client.squads.get(...) +
client.eval.eval_controller_create(...) -> Eval
@@ -2085,13 +6027,21 @@ Both `membersOverrides` and `members[n].assistantOverrides` can be used together
```python -from vapi import Vapi +from vapi import Vapi, ChatEvalAssistantMessageMock +from vapi.environment import VapiEnvironment client = Vapi( - token="YOUR_TOKEN", + token="", + environment=VapiEnvironment.DEFAULT, ) -client.squads.get( - id="id", + +client.eval.eval_controller_create( + messages=[ + ChatEvalAssistantMessageMock( + role="assistant", + ) + ], + type="chat.mockConversation", ) ``` @@ -2108,7 +6058,7 @@ client.squads.get(
-**id:** `str` +**request:** `CreateEvalDto`
@@ -2128,7 +6078,7 @@ client.squads.get(
-
client.squads.delete(...) +
client.eval.eval_controller_get(...) -> Eval
@@ -2142,11 +6092,14 @@ client.squads.get( ```python from vapi import Vapi +from vapi.environment import VapiEnvironment client = Vapi( - token="YOUR_TOKEN", + token="", + environment=VapiEnvironment.DEFAULT, ) -client.squads.delete( + +client.eval.eval_controller_get( id="id", ) @@ -2184,7 +6137,7 @@ client.squads.delete(
-
client.squads.update(...) +
client.eval.eval_controller_remove(...) -> Eval
@@ -2197,14 +6150,16 @@ client.squads.delete(
```python -from vapi import SquadMemberDto, Vapi +from vapi import Vapi +from vapi.environment import VapiEnvironment client = Vapi( - token="YOUR_TOKEN", + token="", + environment=VapiEnvironment.DEFAULT, ) -client.squads.update( + +client.eval.eval_controller_remove( id="id", - members=[SquadMemberDto()], ) ``` @@ -2229,38 +6184,6 @@ client.squads.update(
-**members:** `typing.Sequence[SquadMemberDto]` - -This is the list of assistants that make up the squad. - -The call will start with the first assistant in the list. - -
-
- -
-
- -**name:** `typing.Optional[str]` — This is the name of the squad. - -
-
- -
-
- -**members_overrides:** `typing.Optional[AssistantOverrides]` - -This can be used to override all the assistants' settings and provide values for their template variables. - -Both `membersOverrides` and `members[n].assistantOverrides` can be used together. First, `members[n].assistantOverrides` is applied. Then, `membersOverrides` is applied as a global override. - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -2273,8 +6196,7 @@ Both `membersOverrides` and `members[n].assistantOverrides` can be used together
-## Blocks -
client.blocks.list(...) +
client.eval.eval_controller_update(...) -> Eval
@@ -2288,11 +6210,16 @@ Both `membersOverrides` and `members[n].assistantOverrides` can be used together ```python from vapi import Vapi +from vapi.environment import VapiEnvironment client = Vapi( - token="YOUR_TOKEN", + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.eval.eval_controller_update( + id="id", ) -client.blocks.list() ```
@@ -2308,7 +6235,7 @@ client.blocks.list()
-**limit:** `typing.Optional[float]` — This is the maximum number of items to return. Defaults to 100. +**id:** `str`
@@ -2316,23 +6243,13 @@ client.blocks.list()
-**created_at_gt:** `typing.Optional[dt.datetime]` — This will return items where the createdAt is greater than the specified value. - -
-
- -
-
+**messages:** `typing.Optional[typing.List[UpdateEvalDtoMessagesItem]]` -**created_at_lt:** `typing.Optional[dt.datetime]` — This will return items where the createdAt is less than the specified value. - -
-
+This is the mock conversation that will be used to evaluate the flow of the conversation. -
-
+Mock Messages are used to simulate the flow of the conversation -**created_at_ge:** `typing.Optional[dt.datetime]` — This will return items where the createdAt is greater than or equal to the specified value. +Evaluation Messages are used as checkpoints in the flow where the model's response to previous conversation needs to be evaluated to check the content and tool calls
@@ -2340,15 +6257,10 @@ client.blocks.list()
-**created_at_le:** `typing.Optional[dt.datetime]` — This will return items where the createdAt is less than or equal to the specified value. - -
-
- -
-
+**name:** `typing.Optional[str]` -**updated_at_gt:** `typing.Optional[dt.datetime]` — This will return items where the updatedAt is greater than the specified value. +This is the name of the eval. +It helps identify what the eval is checking for.
@@ -2356,15 +6268,10 @@ client.blocks.list()
-**updated_at_lt:** `typing.Optional[dt.datetime]` — This will return items where the updatedAt is less than the specified value. - -
-
- -
-
+**description:** `typing.Optional[str]` -**updated_at_ge:** `typing.Optional[dt.datetime]` — This will return items where the updatedAt is greater than or equal to the specified value. +This is the description of the eval. +This helps describe the eval and its purpose in detail. It will not be used to evaluate the flow of the conversation.
@@ -2372,7 +6279,10 @@ client.blocks.list()
-**updated_at_le:** `typing.Optional[dt.datetime]` — This will return items where the updatedAt is less than or equal to the specified value. +**type:** `typing.Optional[UpdateEvalDtoType]` + +This is the type of the eval. +Currently it is fixed to `chat.mockConversation`.
@@ -2392,7 +6302,7 @@ client.blocks.list()
-
client.blocks.create(...) +
client.eval.eval_controller_get_run(...) -> EvalRun
@@ -2405,15 +6315,16 @@ client.blocks.list()
```python -from vapi import CreateConversationBlockDto, Vapi +from vapi import Vapi +from vapi.environment import VapiEnvironment client = Vapi( - token="YOUR_TOKEN", + token="", + environment=VapiEnvironment.DEFAULT, ) -client.blocks.create( - request=CreateConversationBlockDto( - instruction="instruction", - ), + +client.eval.eval_controller_get_run( + id="id", ) ``` @@ -2430,7 +6341,7 @@ client.blocks.create(
-**request:** `BlocksCreateRequest` +**id:** `str`
@@ -2450,7 +6361,7 @@ client.blocks.create(
-
client.blocks.get(...) +
client.eval.eval_controller_remove_run(...) -> EvalRun
@@ -2464,11 +6375,14 @@ client.blocks.create( ```python from vapi import Vapi +from vapi.environment import VapiEnvironment client = Vapi( - token="YOUR_TOKEN", + token="", + environment=VapiEnvironment.DEFAULT, ) -client.blocks.get( + +client.eval.eval_controller_remove_run( id="id", ) @@ -2506,7 +6420,7 @@ client.blocks.get(
-
client.blocks.delete(...) +
client.eval.eval_controller_get_runs_paginated(...) -> EvalRunPaginatedResponse
@@ -2520,14 +6434,15 @@ client.blocks.get( ```python from vapi import Vapi +from vapi.environment import VapiEnvironment client = Vapi( - token="YOUR_TOKEN", -) -client.blocks.delete( - id="id", + token="", + environment=VapiEnvironment.DEFAULT, ) +client.eval.eval_controller_get_runs_paginated() + ```
@@ -2542,7 +6457,7 @@ client.blocks.delete(
-**id:** `str` +**id:** `typing.Optional[str]`
@@ -2550,55 +6465,23 @@ client.blocks.delete(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**page:** `typing.Optional[float]` — This is the page number to return. Defaults to 1.
- - - - - - -
- -
client.blocks.update(...) -
-
- -#### 🔌 Usage - -
-
-```python -from vapi import Vapi - -client = Vapi( - token="YOUR_TOKEN", -) -client.blocks.update( - id="id", -) - -``` -
-
+**sort_order:** `typing.Optional[EvalControllerGetRunsPaginatedRequestSortOrder]` — This is the sort order for pagination. Defaults to 'DESC'. +
-#### ⚙️ Parameters - -
-
-
-**id:** `str` +**limit:** `typing.Optional[float]` — This is the maximum number of items to return. Defaults to 100.
@@ -2606,7 +6489,7 @@ client.blocks.update(
-**messages:** `typing.Optional[typing.Sequence[UpdateBlockDtoMessagesItem]]` — These are the pre-configured messages that will be spoken to the user while the block is running. +**created_at_gt:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is greater than the specified value.
@@ -2614,13 +6497,7 @@ client.blocks.update(
-**input_schema:** `typing.Optional[JsonSchema]` - -This is the input schema for the block. This is the input the block needs to run. It's given to the block as `steps[0].input` - -These are accessible as variables: -- ({{input.propertyName}}) in context of the block execution (step) -- ({{stepName.input.propertyName}}) in context of the workflow +**created_at_lt:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is less than the specified value.
@@ -2628,18 +6505,7 @@ These are accessible as variables:
-**output_schema:** `typing.Optional[JsonSchema]` - -This is the output schema for the block. This is the output the block will return to the workflow (`{{stepName.output}}`). - -These are accessible as variables: -- ({{output.propertyName}}) in context of the block execution (step) -- ({{stepName.output.propertyName}}) in context of the workflow (read caveat #1) -- ({{blockName.output.propertyName}}) in context of the workflow (read caveat #2) - -Caveats: -1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.output.propertyName}} will reference the latest usage of the step. -2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.output.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow with steps. +**created_at_ge:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is greater than or equal to the specified value.
@@ -2647,7 +6513,7 @@ Caveats:
-**tool:** `typing.Optional[UpdateBlockDtoTool]` — This is the tool that the block will call. To use an existing tool, use `toolId`. +**created_at_le:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is less than or equal to the specified value.
@@ -2655,7 +6521,7 @@ Caveats:
-**steps:** `typing.Optional[typing.Sequence[UpdateBlockDtoStepsItem]]` — These are the steps in the workflow. +**updated_at_gt:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is greater than the specified value.
@@ -2663,7 +6529,7 @@ Caveats:
-**name:** `typing.Optional[str]` — This is the name of the block. This is just for your reference. +**updated_at_lt:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is less than the specified value.
@@ -2671,27 +6537,7 @@ Caveats:
-**instruction:** `typing.Optional[str]` - -This is the instruction to the model. - -You can reference any variable in the context of the current block execution (step): -- "{{input.your-property-name}}" for the current step's input -- "{{your-step-name.output.your-property-name}}" for another step's output (in the same workflow; read caveat #1) -- "{{your-step-name.input.your-property-name}}" for another step's input (in the same workflow; read caveat #1) -- "{{your-block-name.output.your-property-name}}" for another block's output (in the same workflow; read caveat #2) -- "{{your-block-name.input.your-property-name}}" for another block's input (in the same workflow; read caveat #2) -- "{{workflow.input.your-property-name}}" for the current workflow's input -- "{{global.your-property-name}}" for the global context - -This can be as simple or as complex as you want it to be. -- "say hello and ask the user about their day!" -- "collect the user's first and last name" -- "user is {{input.firstName}} {{input.lastName}}. their age is {{input.age}}. ask them about their salary and if they might be interested in buying a house. we offer {{input.offer}}" - -Caveats: -1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.output/input.propertyName}} will reference the latest usage of the step. -2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.output/input.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow with steps. +**updated_at_ge:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is greater than or equal to the specified value.
@@ -2699,7 +6545,7 @@ Caveats:
-**tool_id:** `typing.Optional[str]` — This is the id of the tool that the block will call. To use a transient tool, use `tool`. +**updated_at_le:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is less than or equal to the specified value.
@@ -2719,8 +6565,7 @@ Caveats:
-## Tools -
client.tools.list(...) +
client.eval.eval_controller_run(...) -> typing.Dict[str, typing.Any]
@@ -2734,11 +6579,18 @@ Caveats: ```python from vapi import Vapi +from vapi.environment import VapiEnvironment +from vapi.eval import CreateEvalRunDtoTarget_Assistant client = Vapi( - token="YOUR_TOKEN", + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.eval.eval_controller_run( + target=CreateEvalRunDtoTarget_Assistant(), + type="eval", ) -client.tools.list() ```
@@ -2754,7 +6606,7 @@ client.tools.list()
-**limit:** `typing.Optional[float]` — This is the maximum number of items to return. Defaults to 100. +**target:** `CreateEvalRunDtoTarget` — This is the target that will be run against the eval
@@ -2762,7 +6614,10 @@ client.tools.list()
-**created_at_gt:** `typing.Optional[dt.datetime]` — This will return items where the createdAt is greater than the specified value. +**type:** `CreateEvalRunDtoType` + +This is the type of the run. +Currently it is fixed to `eval`.
@@ -2770,7 +6625,7 @@ client.tools.list()
-**created_at_lt:** `typing.Optional[dt.datetime]` — This will return items where the createdAt is less than the specified value. +**eval:** `typing.Optional[CreateEvalDto]` — This is the transient eval that will be run
@@ -2778,7 +6633,7 @@ client.tools.list()
-**created_at_ge:** `typing.Optional[dt.datetime]` — This will return items where the createdAt is greater than or equal to the specified value. +**eval_id:** `typing.Optional[str]` — This is the id of the eval that will be run.
@@ -2786,39 +6641,59 @@ client.tools.list()
-**created_at_le:** `typing.Optional[dt.datetime]` — This will return items where the createdAt is less than or equal to the specified value. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
-
-
-**updated_at_gt:** `typing.Optional[dt.datetime]` — This will return items where the updatedAt is greater than the specified value. -
+
+## ObservabilityScorecard +
client.observability_scorecard.scorecard_controller_get(...) -> Scorecard
-**updated_at_lt:** `typing.Optional[dt.datetime]` — This will return items where the updatedAt is less than the specified value. - -
-
+#### 🔌 Usage
-**updated_at_ge:** `typing.Optional[dt.datetime]` — This will return items where the updatedAt is greater than or equal to the specified value. - +
+
+ +```python +from vapi import Vapi +from vapi.environment import VapiEnvironment + +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.observability_scorecard.scorecard_controller_get( + id="id", +) + +```
+
+
+ +#### ⚙️ Parameters
-**updated_at_le:** `typing.Optional[dt.datetime]` — This will return items where the updatedAt is less than or equal to the specified value. +
+
+ +**id:** `str`
@@ -2838,7 +6713,7 @@ client.tools.list()
-
client.tools.create(...) +
client.observability_scorecard.scorecard_controller_remove(...) -> Scorecard
@@ -2851,13 +6726,16 @@ client.tools.list()
```python -from vapi import CreateDtmfToolDto, Vapi +from vapi import Vapi +from vapi.environment import VapiEnvironment client = Vapi( - token="YOUR_TOKEN", + token="", + environment=VapiEnvironment.DEFAULT, ) -client.tools.create( - request=CreateDtmfToolDto(), + +client.observability_scorecard.scorecard_controller_remove( + id="id", ) ``` @@ -2874,7 +6752,7 @@ client.tools.create(
-**request:** `ToolsCreateRequest` +**id:** `str`
@@ -2894,7 +6772,7 @@ client.tools.create(
-
client.tools.get(...) +
client.observability_scorecard.scorecard_controller_update(...) -> Scorecard
@@ -2908,11 +6786,14 @@ client.tools.create( ```python from vapi import Vapi +from vapi.environment import VapiEnvironment client = Vapi( - token="YOUR_TOKEN", + token="", + environment=VapiEnvironment.DEFAULT, ) -client.tools.get( + +client.observability_scorecard.scorecard_controller_update( id="id", ) @@ -2938,55 +6819,37 @@ client.tools.get(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**name:** `typing.Optional[str]` — This is the name of the scorecard. It is only for user reference and will not be used for any evaluation.
-
-
- - - - -
-
client.tools.delete(...)
-#### 🔌 Usage - -
-
+**description:** `typing.Optional[str]` — This is the description of the scorecard. It is only for user reference and will not be used for any evaluation. + +
+
-```python -from vapi import Vapi - -client = Vapi( - token="YOUR_TOKEN", -) -client.tools.delete( - id="id", -) +**metrics:** `typing.Optional[typing.List[ScorecardMetric]]` -``` -
-
+These are the metrics that will be used to evaluate the scorecard. +Each metric will have a set of conditions and points that will be used to generate the score. +
-#### ⚙️ Parameters -
-
-
+**assistant_ids:** `typing.Optional[typing.List[str]]` -**id:** `str` +These are the assistant IDs that this scorecard is linked to. +When linked to assistants, this scorecard will be available for evaluation during those assistants' calls.
@@ -3006,7 +6869,7 @@ client.tools.delete(
-
client.tools.update(...) +
client.observability_scorecard.scorecard_controller_get_paginated(...) -> ScorecardPaginatedResponse
@@ -3020,14 +6883,15 @@ client.tools.delete( ```python from vapi import Vapi +from vapi.environment import VapiEnvironment client = Vapi( - token="YOUR_TOKEN", -) -client.tools.update( - id="id", + token="", + environment=VapiEnvironment.DEFAULT, ) +client.observability_scorecard.scorecard_controller_get_paginated() + ```
@@ -3042,7 +6906,7 @@ client.tools.update(
-**id:** `str` +**id:** `typing.Optional[str]`
@@ -3050,15 +6914,23 @@ client.tools.update(
-**async_:** `typing.Optional[bool]` +**page:** `typing.Optional[float]` — This is the page number to return. Defaults to 1. + +
+
-This determines if the tool is async. +
+
-If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server. +**sort_order:** `typing.Optional[ScorecardControllerGetPaginatedRequestSortOrder]` — This is the sort order for pagination. Defaults to 'DESC'. + +
+
-If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server. +
+
-Defaults to synchronous (`false`). +**limit:** `typing.Optional[float]` — This is the maximum number of items to return. Defaults to 100.
@@ -3066,11 +6938,15 @@ Defaults to synchronous (`false`).
-**messages:** `typing.Optional[typing.Sequence[UpdateToolDtoMessagesItem]]` +**created_at_gt:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is greater than the specified value. + +
+
-These are the messages that will be spoken to the user as the tool is running. +
+
-For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. +**created_at_lt:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is less than the specified value.
@@ -3078,13 +6954,23 @@ For some tools, this is auto-filled based on special fields like `tool.destinati
-**function:** `typing.Optional[OpenAiFunction]` +**created_at_ge:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is greater than or equal to the specified value. + +
+
+ +
+
-This is the function definition of the tool. +**created_at_le:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is less than or equal to the specified value. + +
+
-For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on tool-specific fields like `tool.destinations`. But, even in those cases, you can provide a custom function definition for advanced use cases. +
+
-An example of an advanced use case is if you want to customize the message that's spoken for `endCall` tool. You can specify a function where it returns an argument "reason". Then, in `messages` array, you can have many "request-complete" messages. One of these messages will be triggered if the `messages[].conditions` matches the "reason" argument. +**updated_at_gt:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is greater than the specified value.
@@ -3092,13 +6978,23 @@ An example of an advanced use case is if you want to customize the message that'
-**server:** `typing.Optional[Server]` +**updated_at_lt:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is less than the specified value. + +
+
+ +
+
-This is the server that will be hit when this tool is requested by the model. +**updated_at_ge:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is greater than or equal to the specified value. + +
+
-All requests will be sent with the call object among other things. You can find more details in the Server URL documentation. +
+
-This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: highest tool.server.url, then assistant.serverUrl, then phoneNumber.serverUrl, then org.serverUrl. +**updated_at_le:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is less than or equal to the specified value.
@@ -3118,8 +7014,7 @@ This overrides the serverUrl set on the org and the phoneNumber. Order of preced
-## Files -
client.files.list() +
client.observability_scorecard.scorecard_controller_create(...) -> Scorecard
@@ -3132,12 +7027,26 @@ This overrides the serverUrl set on the org and the phoneNumber. Order of preced
```python -from vapi import Vapi +from vapi import Vapi, ScorecardMetric +from vapi.environment import VapiEnvironment client = Vapi( - token="YOUR_TOKEN", + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.observability_scorecard.scorecard_controller_create( + metrics=[ + ScorecardMetric( + structured_output_id="structuredOutputId", + conditions=[ + { + "key": "value" + } + ], + ) + ], ) -client.files.list() ```
@@ -3153,6 +7062,14 @@ client.files.list()
+**request:** `CreateScorecardDto` + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -3165,7 +7082,8 @@ client.files.list()
-
client.files.create(...) +## ProviderResources +
client.provider_resources.provider_resource_controller_get_provider_resources_paginated(...) -> ProviderResourcePaginatedResponse
@@ -3179,11 +7097,17 @@ client.files.list() ```python from vapi import Vapi +from vapi.environment import VapiEnvironment client = Vapi( - token="YOUR_TOKEN", + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.provider_resources.provider_resource_controller_get_provider_resources_paginated( + provider="cartesia", + resource_name="pronunciation-dictionary", ) -client.files.create() ```
@@ -3199,9 +7123,7 @@ client.files.create()
-**file:** `from __future__ import annotations - -core.File` — See core.File for more documentation +**provider:** `ProviderResourceControllerGetProviderResourcesPaginatedRequestProvider` — The provider (e.g., 11labs)
@@ -3209,55 +7131,55 @@ core.File` — See core.File for more documentation
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**resource_name:** `ProviderResourceControllerGetProviderResourcesPaginatedRequestResourceName` — The resource name (e.g., pronunciation-dictionary)
- -
+
+
+**id:** `typing.Optional[str]` +
-
-
client.files.get(...)
-#### 🔌 Usage +**resource_id:** `typing.Optional[str]` + +
+
+**page:** `typing.Optional[float]` — This is the page number to return. Defaults to 1. + +
+
+
-```python -from vapi import Vapi - -client = Vapi( - token="YOUR_TOKEN", -) -client.files.get( - id="id", -) - -``` -
-
+**sort_order:** `typing.Optional[ProviderResourceControllerGetProviderResourcesPaginatedRequestSortOrder]` — This is the sort order for pagination. Defaults to 'DESC'. + -#### ⚙️ Parameters -
+**limit:** `typing.Optional[float]` — This is the maximum number of items to return. Defaults to 100. + +
+
+
-**id:** `str` +**created_at_gt:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is greater than the specified value.
@@ -3265,55 +7187,55 @@ client.files.get(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**created_at_lt:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is less than the specified value.
- - +
+
+**created_at_ge:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is greater than or equal to the specified value. +
-
-
client.files.delete(...)
-#### 🔌 Usage +**created_at_le:** `typing.Optional[datetime.datetime]` — This will return items where the createdAt is less than or equal to the specified value. + +
+
+**updated_at_gt:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is greater than the specified value. + +
+
+
-```python -from vapi import Vapi - -client = Vapi( - token="YOUR_TOKEN", -) -client.files.delete( - id="id", -) - -``` -
-
+**updated_at_lt:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is less than the specified value. + -#### ⚙️ Parameters -
+**updated_at_ge:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is greater than or equal to the specified value. + +
+
+
-**id:** `str` +**updated_at_le:** `typing.Optional[datetime.datetime]` — This will return items where the updatedAt is less than or equal to the specified value.
@@ -3333,7 +7255,7 @@ client.files.delete(
-
client.files.update(...) +
client.provider_resources.provider_resource_controller_create_provider_resource(...) -> ProviderResource
@@ -3347,12 +7269,16 @@ client.files.delete( ```python from vapi import Vapi +from vapi.environment import VapiEnvironment client = Vapi( - token="YOUR_TOKEN", + token="", + environment=VapiEnvironment.DEFAULT, ) -client.files.update( - id="id", + +client.provider_resources.provider_resource_controller_create_provider_resource( + provider="cartesia", + resource_name="pronunciation-dictionary", ) ``` @@ -3369,7 +7295,7 @@ client.files.update(
-**id:** `str` +**provider:** `ProviderResourceControllerCreateProviderResourceRequestProvider` — The provider (e.g., 11labs)
@@ -3377,7 +7303,7 @@ client.files.update(
-**name:** `typing.Optional[str]` — This is the name of the file. This is just for your own reference. +**resource_name:** `ProviderResourceControllerCreateProviderResourceRequestResourceName` — The resource name (e.g., pronunciation-dictionary)
@@ -3397,8 +7323,7 @@ client.files.update(
-## Analytics -
client.analytics.get(...) +
client.provider_resources.provider_resource_controller_get_provider_resource(...) -> ProviderResource
@@ -3411,23 +7336,18 @@ client.files.update(
```python -from vapi import AnalyticsOperation, AnalyticsQuery, Vapi +from vapi import Vapi +from vapi.environment import VapiEnvironment client = Vapi( - token="YOUR_TOKEN", + token="", + environment=VapiEnvironment.DEFAULT, ) -client.analytics.get( - queries=[ - AnalyticsQuery( - name="name", - operations=[ - AnalyticsOperation( - operation="sum", - column="id", - ) - ], - ) - ], + +client.provider_resources.provider_resource_controller_get_provider_resource( + provider="cartesia", + resource_name="pronunciation-dictionary", + id="id", ) ``` @@ -3444,7 +7364,23 @@ client.analytics.get(
-**queries:** `typing.Sequence[AnalyticsQuery]` — This is the list of metric queries you want to perform. +**provider:** `ProviderResourceControllerGetProviderResourceRequestProvider` — The provider (e.g., 11labs) + +
+
+ +
+
+ +**resource_name:** `ProviderResourceControllerGetProviderResourceRequestResourceName` — The resource name (e.g., pronunciation-dictionary) + +
+
+ +
+
+ +**id:** `str`
@@ -3464,8 +7400,7 @@ client.analytics.get(
-## Logs -
client.logs.get(...) +
client.provider_resources.provider_resource_controller_delete_provider_resource(...) -> ProviderResource
@@ -3479,16 +7414,18 @@ client.analytics.get( ```python from vapi import Vapi +from vapi.environment import VapiEnvironment client = Vapi( - token="YOUR_TOKEN", + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.provider_resources.provider_resource_controller_delete_provider_resource( + provider="cartesia", + resource_name="pronunciation-dictionary", + id="id", ) -response = client.logs.get() -for item in response: - yield item -# alternatively, you can paginate page-by-page -for page in response.iter_pages(): - yield page ```
@@ -3504,7 +7441,7 @@ for page in response.iter_pages():
-**org_id:** `typing.Optional[str]` — This is the unique identifier for the org that this log belongs to. +**provider:** `ProviderResourceControllerDeleteProviderResourceRequestProvider` — The provider (e.g., 11labs)
@@ -3512,7 +7449,7 @@ for page in response.iter_pages():
-**type:** `typing.Optional[LogsGetRequestType]` — This is the type of the log. +**resource_name:** `ProviderResourceControllerDeleteProviderResourceRequestResourceName` — The resource name (e.g., pronunciation-dictionary)
@@ -3520,7 +7457,7 @@ for page in response.iter_pages():
-**assistant_id:** `typing.Optional[str]` — This is the ID of the assistant. +**id:** `str`
@@ -3528,55 +7465,60 @@ for page in response.iter_pages():
-**phone_number_id:** `typing.Optional[str]` — This is the ID of the phone number. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
-
-
-**customer_id:** `typing.Optional[str]` — This is the ID of the customer. -
+
+
client.provider_resources.provider_resource_controller_update_provider_resource(...) -> ProviderResource
-**squad_id:** `typing.Optional[str]` — This is the ID of the squad. - -
-
+#### 🔌 Usage
-**call_id:** `typing.Optional[str]` — This is the ID of the call. - -
-
-
-**page:** `typing.Optional[int]` — This is the page number to return. Defaults to 1. - +```python +from vapi import Vapi +from vapi.environment import VapiEnvironment + +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.provider_resources.provider_resource_controller_update_provider_resource( + provider="cartesia", + resource_name="pronunciation-dictionary", + id="id", +) + +``` +
+
+#### ⚙️ Parameters +
-**sort_order:** `typing.Optional[LogsGetRequestSortOrder]` — This is the sort order for pagination. Defaults to 'ASC'. - -
-
-
-**limit:** `typing.Optional[float]` — This is the maximum number of items to return. Defaults to 100. +**provider:** `ProviderResourceControllerUpdateProviderResourceRequestProvider` — The provider (e.g., 11labs)
@@ -3584,7 +7526,7 @@ for page in response.iter_pages():
-**created_at_gt:** `typing.Optional[dt.datetime]` — This will return items where the createdAt is greater than the specified value. +**resource_name:** `ProviderResourceControllerUpdateProviderResourceRequestResourceName` — The resource name (e.g., pronunciation-dictionary)
@@ -3592,7 +7534,7 @@ for page in response.iter_pages():
-**created_at_lt:** `typing.Optional[dt.datetime]` — This will return items where the createdAt is less than the specified value. +**id:** `str`
@@ -3600,47 +7542,70 @@ for page in response.iter_pages():
-**created_at_ge:** `typing.Optional[dt.datetime]` — This will return items where the createdAt is greater than or equal to the specified value. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ + -
-
-**created_at_le:** `typing.Optional[dt.datetime]` — This will return items where the createdAt is less than or equal to the specified value. -
+
+## Analytics +
client.analytics.get(...) -> typing.List[AnalyticsQueryResult]
-**updated_at_gt:** `typing.Optional[dt.datetime]` — This will return items where the updatedAt is greater than the specified value. - -
-
+#### 🔌 Usage
-**updated_at_lt:** `typing.Optional[dt.datetime]` — This will return items where the updatedAt is less than the specified value. - -
-
-
-**updated_at_ge:** `typing.Optional[dt.datetime]` — This will return items where the updatedAt is greater than or equal to the specified value. - +```python +from vapi import Vapi, AnalyticsQuery, AnalyticsOperation +from vapi.environment import VapiEnvironment + +client = Vapi( + token="", + environment=VapiEnvironment.DEFAULT, +) + +client.analytics.get( + queries=[ + AnalyticsQuery( + table="call", + name="name", + operations=[ + AnalyticsOperation( + operation="sum", + column="id", + ) + ], + ) + ], +) + +``` +
+
+#### ⚙️ Parameters + +
+
+
-**updated_at_le:** `typing.Optional[dt.datetime]` — This will return items where the updatedAt is less than or equal to the specified value. +**queries:** `typing.List[AnalyticsQuery]` — This is the list of metric queries you want to perform.
diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..0141a1a5 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,4 @@ +httpx>=0.21.2 +pydantic>= 1.9.2 +pydantic-core>=2.18.2,<2.44.0 +typing_extensions>= 4.0.0 diff --git a/src/vapi/__init__.py b/src/vapi/__init__.py index 2c79edac..0da12389 100644 --- a/src/vapi/__init__.py +++ b/src/vapi/__init__.py @@ -1,546 +1,9285 @@ # This file was auto-generated by Fern from our API Definition. -from .types import ( - AddVoiceToProviderDto, - Analysis, - AnalysisCost, - AnalysisCostAnalysisType, - AnalysisCostBreakdown, - AnalysisPlan, - AnalyticsOperation, - AnalyticsOperationColumn, - AnalyticsOperationOperation, - AnalyticsQuery, - AnalyticsQueryGroupByItem, - AnalyticsQueryResult, - AnthropicCredential, - AnthropicModel, - AnthropicModelModel, - AnthropicModelToolsItem, - AnyscaleCredential, - AnyscaleModel, - AnyscaleModelToolsItem, - Artifact, - ArtifactMessagesItem, - ArtifactPlan, - AssignmentMutation, - AssignmentMutationConditionsItem, - Assistant, - AssistantBackgroundSound, - AssistantClientMessagesItem, - AssistantFirstMessageMode, - AssistantModel, - AssistantOverrides, - AssistantOverridesBackgroundSound, - AssistantOverridesClientMessagesItem, - AssistantOverridesFirstMessageMode, - AssistantOverridesModel, - AssistantOverridesServerMessagesItem, - AssistantOverridesTranscriber, - AssistantOverridesVoice, - AssistantServerMessagesItem, - AssistantTranscriber, - AssistantVoice, - AzureOpenAiCredential, - AzureOpenAiCredentialModelsItem, - AzureOpenAiCredentialRegion, - AzureVoice, - AzureVoiceId, - AzureVoiceIdEnum, - BlockCompleteMessage, - BlockCompleteMessageConditionsItem, - BlockStartMessage, - BlockStartMessageConditionsItem, - BotMessage, - BucketPlan, - BuyPhoneNumberDto, - BuyPhoneNumberDtoFallbackDestination, - ByoPhoneNumber, - ByoPhoneNumberFallbackDestination, - ByoSipTrunkCredential, - Call, - CallCostsItem, - CallDestination, - CallEndedReason, - CallMessagesItem, - CallPaginatedResponse, - CallPhoneCallProvider, - CallPhoneCallTransport, - CallStatus, - CallType, - CallbackStep, - CallbackStepBlock, - CartesiaCredential, - CartesiaVoice, - CartesiaVoiceLanguage, - CartesiaVoiceModel, - ChunkPlan, - ClientInboundMessage, - ClientInboundMessageAddMessage, - ClientInboundMessageControl, - ClientInboundMessageControlControl, - ClientInboundMessageMessage, - ClientInboundMessageSay, - ClientMessage, - ClientMessageConversationUpdate, - ClientMessageConversationUpdateMessagesItem, - ClientMessageHang, - ClientMessageLanguageChanged, - ClientMessageMessage, - ClientMessageMetadata, - ClientMessageModelOutput, - ClientMessageSpeechUpdate, - ClientMessageSpeechUpdateRole, - ClientMessageSpeechUpdateStatus, - ClientMessageToolCalls, - ClientMessageToolCallsResult, - ClientMessageToolCallsToolWithToolCallListItem, - ClientMessageTranscript, - ClientMessageTranscriptRole, - ClientMessageTranscriptTranscriptType, - ClientMessageUserInterrupted, - ClientMessageVoiceInput, - CloneVoiceDto, - Condition, - ConditionOperator, - ConversationBlock, - ConversationBlockMessagesItem, - CostBreakdown, - CreateAnthropicCredentialDto, - CreateAnyscaleCredentialDto, - CreateAssistantDto, - CreateAssistantDtoBackgroundSound, - CreateAssistantDtoClientMessagesItem, - CreateAssistantDtoFirstMessageMode, - CreateAssistantDtoModel, - CreateAssistantDtoServerMessagesItem, - CreateAssistantDtoTranscriber, - CreateAssistantDtoVoice, - CreateAzureOpenAiCredentialDto, - CreateAzureOpenAiCredentialDtoModelsItem, - CreateAzureOpenAiCredentialDtoRegion, - CreateByoPhoneNumberDto, - CreateByoPhoneNumberDtoFallbackDestination, - CreateByoSipTrunkCredentialDto, - CreateCartesiaCredentialDto, - CreateConversationBlockDto, - CreateConversationBlockDtoMessagesItem, - CreateCustomLlmCredentialDto, - CreateCustomerDto, - CreateDeepInfraCredentialDto, - CreateDeepgramCredentialDto, - CreateDtmfToolDto, - CreateDtmfToolDtoMessagesItem, - CreateElevenLabsCredentialDto, - CreateEndCallToolDto, - CreateEndCallToolDtoMessagesItem, - CreateFunctionToolDto, - CreateFunctionToolDtoMessagesItem, - CreateGcpCredentialDto, - CreateGhlToolDto, - CreateGhlToolDtoMessagesItem, - CreateGladiaCredentialDto, - CreateGoHighLevelCredentialDto, - CreateGroqCredentialDto, - CreateLmntCredentialDto, - CreateMakeCredentialDto, - CreateMakeToolDto, - CreateMakeToolDtoMessagesItem, - CreateOpenAiCredentialDto, - CreateOpenRouterCredentialDto, - CreateOrgDto, - CreateOutboundCallDto, - CreateOutputToolDto, - CreateOutputToolDtoMessagesItem, - CreatePerplexityAiCredentialDto, - CreatePlayHtCredentialDto, - CreateRimeAiCredentialDto, - CreateRunpodCredentialDto, - CreateS3CredentialDto, - CreateSquadDto, - CreateTogetherAiCredentialDto, - CreateTokenDto, - CreateTokenDtoTag, - CreateToolCallBlockDto, - CreateToolCallBlockDtoMessagesItem, - CreateToolCallBlockDtoTool, - CreateToolTemplateDto, - CreateToolTemplateDtoDetails, - CreateToolTemplateDtoProvider, - CreateToolTemplateDtoProviderDetails, - CreateToolTemplateDtoVisibility, - CreateTransferCallToolDto, - CreateTransferCallToolDtoDestinationsItem, - CreateTransferCallToolDtoMessagesItem, - CreateTwilioCredentialDto, - CreateTwilioPhoneNumberDto, - CreateTwilioPhoneNumberDtoFallbackDestination, - CreateVapiPhoneNumberDto, - CreateVapiPhoneNumberDtoFallbackDestination, - CreateVoicemailToolDto, - CreateVoicemailToolDtoMessagesItem, - CreateVonageCredentialDto, - CreateVonagePhoneNumberDto, - CreateVonagePhoneNumberDtoFallbackDestination, - CreateWebCallDto, - CreateWorkflowBlockDto, - CreateWorkflowBlockDtoMessagesItem, - CreateWorkflowBlockDtoStepsItem, - CustomLlmCredential, - CustomLlmModel, - CustomLlmModelMetadataSendMode, - CustomLlmModelToolsItem, - DeepInfraCredential, - DeepInfraModel, - DeepInfraModelToolsItem, - DeepgramCredential, - DeepgramTranscriber, - DeepgramTranscriberLanguage, - DeepgramTranscriberModel, - DeepgramVoice, - DeepgramVoiceId, - DeepgramVoiceIdEnum, - DtmfTool, - DtmfToolMessagesItem, - ElevenLabsCredential, - ElevenLabsVoice, - ElevenLabsVoiceId, - ElevenLabsVoiceIdEnum, - ElevenLabsVoiceModel, - EndCallTool, - EndCallToolMessagesItem, - Error, - ExactReplacement, - File, - FileStatus, - FormatPlan, - FormatPlanReplacementsItem, - FunctionTool, - FunctionToolMessagesItem, - FunctionToolProviderDetails, - FunctionToolWithToolCall, - FunctionToolWithToolCallMessagesItem, - GcpCredential, - GcpKey, - GhlTool, - GhlToolMessagesItem, - GhlToolMetadata, - GhlToolProviderDetails, - GhlToolWithToolCall, - GhlToolWithToolCallMessagesItem, - GladiaCredential, - GladiaTranscriber, - GladiaTranscriberLanguage, - GladiaTranscriberLanguageBehaviour, - GladiaTranscriberModel, - GoHighLevelCredential, - GroqCredential, - GroqModel, - GroqModelModel, - GroqModelToolsItem, - HandoffStep, - HandoffStepBlock, - ImportTwilioPhoneNumberDto, - ImportTwilioPhoneNumberDtoFallbackDestination, - ImportVonagePhoneNumberDto, - ImportVonagePhoneNumberDtoFallbackDestination, - InviteUserDto, - InviteUserDtoRole, - JsonSchema, - JsonSchemaType, - KnowledgeBase, - LmntCredential, - LmntVoice, - LmntVoiceId, - LmntVoiceIdEnum, - Log, - LogRequestHttpMethod, - LogResource, - LogType, - LogsPaginatedResponse, - MakeCredential, - MakeTool, - MakeToolMessagesItem, - MakeToolMetadata, - MakeToolProviderDetails, - MakeToolWithToolCall, - MakeToolWithToolCallMessagesItem, - MessagePlan, - Metrics, - ModelBasedCondition, - ModelCost, - Monitor, - MonitorPlan, - NeetsVoice, - NeetsVoiceId, - NeetsVoiceIdEnum, - OpenAiCredential, - OpenAiFunction, - OpenAiFunctionParameters, - OpenAiMessage, - OpenAiMessageRole, - OpenAiModel, - OpenAiModelFallbackModelsItem, - OpenAiModelModel, - OpenAiModelToolsItem, - OpenAiVoice, - OpenAiVoiceId, - OpenRouterCredential, - OpenRouterModel, - OpenRouterModelToolsItem, - Org, - OrgPlan, - OutputTool, - OutputToolMessagesItem, - PaginationMeta, - PerplexityAiCredential, - PerplexityAiModel, - PerplexityAiModelToolsItem, - PlayHtCredential, - PlayHtVoice, - PlayHtVoiceEmotion, - PlayHtVoiceId, - PlayHtVoiceIdEnum, - PunctuationBoundary, - RegexOption, - RegexOptionType, - RegexReplacement, - RimeAiCredential, - RimeAiVoice, - RimeAiVoiceId, - RimeAiVoiceIdEnum, - RimeAiVoiceModel, - RuleBasedCondition, - RuleBasedConditionOperator, - RunpodCredential, - S3Credential, - SbcConfiguration, - Server, - ServerMessage, - ServerMessageAssistantRequest, - ServerMessageAssistantRequestPhoneNumber, - ServerMessageConversationUpdate, - ServerMessageConversationUpdateMessagesItem, - ServerMessageConversationUpdatePhoneNumber, - ServerMessageEndOfCallReport, - ServerMessageEndOfCallReportCostsItem, - ServerMessageEndOfCallReportEndedReason, - ServerMessageEndOfCallReportPhoneNumber, - ServerMessageHang, - ServerMessageHangPhoneNumber, - ServerMessageLanguageChanged, - ServerMessageLanguageChangedPhoneNumber, - ServerMessageMessage, - ServerMessageModelOutput, - ServerMessageModelOutputPhoneNumber, - ServerMessagePhoneCallControl, - ServerMessagePhoneCallControlDestination, - ServerMessagePhoneCallControlPhoneNumber, - ServerMessagePhoneCallControlRequest, - ServerMessageResponse, - ServerMessageResponseAssistantRequest, - ServerMessageResponseAssistantRequestDestination, - ServerMessageResponseMessageResponse, - ServerMessageResponseToolCalls, - ServerMessageResponseTransferDestinationRequest, - ServerMessageResponseTransferDestinationRequestDestination, - ServerMessageResponseVoiceRequest, - ServerMessageSpeechUpdate, - ServerMessageSpeechUpdatePhoneNumber, - ServerMessageSpeechUpdateRole, - ServerMessageSpeechUpdateStatus, - ServerMessageStatusUpdate, - ServerMessageStatusUpdateDestination, - ServerMessageStatusUpdateEndedReason, - ServerMessageStatusUpdateMessagesItem, - ServerMessageStatusUpdatePhoneNumber, - ServerMessageStatusUpdateStatus, - ServerMessageToolCalls, - ServerMessageToolCallsPhoneNumber, - ServerMessageToolCallsToolWithToolCallListItem, - ServerMessageTranscript, - ServerMessageTranscriptPhoneNumber, - ServerMessageTranscriptRole, - ServerMessageTranscriptTranscriptType, - ServerMessageTransferDestinationRequest, - ServerMessageTransferDestinationRequestPhoneNumber, - ServerMessageTransferUpdate, - ServerMessageTransferUpdateDestination, - ServerMessageTransferUpdatePhoneNumber, - ServerMessageUserInterrupted, - ServerMessageUserInterruptedPhoneNumber, - ServerMessageVoiceInput, - ServerMessageVoiceInputPhoneNumber, - ServerMessageVoiceRequest, - ServerMessageVoiceRequestPhoneNumber, - SipTrunkGateway, - SipTrunkGatewayOutboundProtocol, - SipTrunkOutboundAuthenticationPlan, - SipTrunkOutboundSipRegisterPlan, - Squad, - SquadMemberDto, - StartSpeakingPlan, - StepDestination, - StepDestinationConditionsItem, - StopSpeakingPlan, - StructuredDataPlan, - SuccessEvaluationPlan, - SuccessEvaluationPlanRubric, - SummaryPlan, - SyncVoiceLibraryDto, - SyncVoiceLibraryDtoProvidersItem, - SystemMessage, - TalkscriberTranscriber, - TalkscriberTranscriberLanguage, - Template, - TemplateDetails, - TemplateProvider, - TemplateProviderDetails, - TemplateVisibility, - TimeRange, - TimeRangeStep, - TogetherAiCredential, - TogetherAiModel, - TogetherAiModelToolsItem, - Token, - TokenRestrictions, - TokenTag, - ToolCall, - ToolCallBlock, - ToolCallBlockMessagesItem, - ToolCallBlockTool, - ToolCallFunction, - ToolCallMessage, - ToolCallResult, - ToolCallResultMessage, - ToolCallResultMessageItem, - ToolMessageComplete, - ToolMessageCompleteRole, - ToolMessageDelayed, - ToolMessageFailed, - ToolMessageStart, - ToolTemplateMetadata, - ToolTemplateSetup, - TranscriberCost, - TranscriptPlan, - TranscriptionEndpointingPlan, - TransferCallTool, - TransferCallToolDestinationsItem, - TransferCallToolMessagesItem, - TransferDestinationAssistant, - TransferDestinationNumber, - TransferDestinationSip, - TransferDestinationStep, - TransferMode, - TransportConfigurationTwilio, - TransportConfigurationTwilioRecordingChannels, - TransportCost, - TwilioCredential, - TwilioPhoneNumber, - TwilioPhoneNumberFallbackDestination, - TwilioVoicemailDetection, - TwilioVoicemailDetectionVoicemailDetectionTypesItem, - UpdateAnthropicCredentialDto, - UpdateAnyscaleCredentialDto, - UpdateAzureOpenAiCredentialDto, - UpdateAzureOpenAiCredentialDtoModelsItem, - UpdateAzureOpenAiCredentialDtoRegion, - UpdateByoSipTrunkCredentialDto, - UpdateCartesiaCredentialDto, - UpdateCustomLlmCredentialDto, - UpdateDeepInfraCredentialDto, - UpdateDeepgramCredentialDto, - UpdateElevenLabsCredentialDto, - UpdateGcpCredentialDto, - UpdateGladiaCredentialDto, - UpdateGoHighLevelCredentialDto, - UpdateGroqCredentialDto, - UpdateLmntCredentialDto, - UpdateMakeCredentialDto, - UpdateOpenAiCredentialDto, - UpdateOpenRouterCredentialDto, - UpdateOrgDto, - UpdatePerplexityAiCredentialDto, - UpdatePlayHtCredentialDto, - UpdateRimeAiCredentialDto, - UpdateRunpodCredentialDto, - UpdateS3CredentialDto, - UpdateTogetherAiCredentialDto, - UpdateToolTemplateDto, - UpdateToolTemplateDtoDetails, - UpdateToolTemplateDtoProvider, - UpdateToolTemplateDtoProviderDetails, - UpdateToolTemplateDtoVisibility, - UpdateTwilioCredentialDto, - UpdateUserRoleDto, - UpdateUserRoleDtoRole, - UpdateVonageCredentialDto, - User, - UserMessage, - VapiCost, - VapiModel, - VapiModelStepsItem, - VapiModelToolsItem, - VapiPhoneNumber, - VapiPhoneNumberFallbackDestination, - VoiceCost, - VoiceLibrary, - VoiceLibraryGender, - VoiceLibraryVoiceResponse, - VonageCredential, - VonagePhoneNumber, - VonagePhoneNumberFallbackDestination, - WorkflowBlock, - WorkflowBlockMessagesItem, - WorkflowBlockStepsItem, -) -from .errors import BadRequestError -from . import analytics, assistants, blocks, calls, files, logs, phone_numbers, squads, tools -from .assistants import ( - UpdateAssistantDtoBackgroundSound, - UpdateAssistantDtoClientMessagesItem, - UpdateAssistantDtoFirstMessageMode, - UpdateAssistantDtoModel, - UpdateAssistantDtoServerMessagesItem, - UpdateAssistantDtoTranscriber, - UpdateAssistantDtoVoice, -) -from .blocks import ( - BlocksCreateRequest, - BlocksCreateResponse, - BlocksDeleteResponse, - BlocksGetResponse, - BlocksListResponseItem, - BlocksUpdateResponse, - UpdateBlockDtoMessagesItem, - UpdateBlockDtoStepsItem, - UpdateBlockDtoTool, -) -from .client import AsyncVapi, Vapi -from .environment import VapiEnvironment -from .logs import LogsGetRequestSortOrder, LogsGetRequestType -from .phone_numbers import ( - PhoneNumbersCreateRequest, - PhoneNumbersCreateResponse, - PhoneNumbersDeleteResponse, - PhoneNumbersGetResponse, - PhoneNumbersListResponseItem, - PhoneNumbersUpdateResponse, - UpdatePhoneNumberDtoFallbackDestination, -) -from .tools import ( - ToolsCreateRequest, - ToolsCreateResponse, - ToolsDeleteResponse, - ToolsGetResponse, - ToolsListResponseItem, - ToolsUpdateResponse, - UpdateToolDtoMessagesItem, -) -from .version import __version__ +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ( + AddVoiceToProviderDto, + AiEdgeCondition, + AiEdgeConditionType, + Analysis, + AnalysisCost, + AnalysisCostAnalysisType, + AnalysisCostBreakdown, + AnalysisPlan, + AnalyticsOperation, + AnalyticsOperationColumn, + AnalyticsOperationOperation, + AnalyticsQuery, + AnalyticsQueryGroupByItem, + AnalyticsQueryResult, + AnalyticsQueryTable, + AnthropicBedrockCredential, + AnthropicBedrockCredentialAuthenticationPlan, + AnthropicBedrockCredentialAuthenticationPlan_AwsIam, + AnthropicBedrockCredentialAuthenticationPlan_AwsSts, + AnthropicBedrockCredentialProvider, + AnthropicBedrockCredentialRegion, + AnthropicBedrockModel, + AnthropicBedrockModelModel, + AnthropicBedrockModelToolsItem, + AnthropicBedrockModelToolsItem_ApiRequest, + AnthropicBedrockModelToolsItem_Bash, + AnthropicBedrockModelToolsItem_Code, + AnthropicBedrockModelToolsItem_Computer, + AnthropicBedrockModelToolsItem_Dtmf, + AnthropicBedrockModelToolsItem_EndCall, + AnthropicBedrockModelToolsItem_Function, + AnthropicBedrockModelToolsItem_GohighlevelCalendarAvailabilityCheck, + AnthropicBedrockModelToolsItem_GohighlevelCalendarEventCreate, + AnthropicBedrockModelToolsItem_GohighlevelContactCreate, + AnthropicBedrockModelToolsItem_GohighlevelContactGet, + AnthropicBedrockModelToolsItem_GoogleCalendarAvailabilityCheck, + AnthropicBedrockModelToolsItem_GoogleCalendarEventCreate, + AnthropicBedrockModelToolsItem_GoogleSheetsRowAppend, + AnthropicBedrockModelToolsItem_Handoff, + AnthropicBedrockModelToolsItem_Mcp, + AnthropicBedrockModelToolsItem_Query, + AnthropicBedrockModelToolsItem_SipRequest, + AnthropicBedrockModelToolsItem_SlackMessageSend, + AnthropicBedrockModelToolsItem_Sms, + AnthropicBedrockModelToolsItem_TextEditor, + AnthropicBedrockModelToolsItem_TransferCall, + AnthropicBedrockModelToolsItem_Voicemail, + AnthropicCredential, + AnthropicCredentialProvider, + AnthropicModel, + AnthropicModelModel, + AnthropicModelToolsItem, + AnthropicModelToolsItem_ApiRequest, + AnthropicModelToolsItem_Bash, + AnthropicModelToolsItem_Code, + AnthropicModelToolsItem_Computer, + AnthropicModelToolsItem_Dtmf, + AnthropicModelToolsItem_EndCall, + AnthropicModelToolsItem_Function, + AnthropicModelToolsItem_GohighlevelCalendarAvailabilityCheck, + AnthropicModelToolsItem_GohighlevelCalendarEventCreate, + AnthropicModelToolsItem_GohighlevelContactCreate, + AnthropicModelToolsItem_GohighlevelContactGet, + AnthropicModelToolsItem_GoogleCalendarAvailabilityCheck, + AnthropicModelToolsItem_GoogleCalendarEventCreate, + AnthropicModelToolsItem_GoogleSheetsRowAppend, + AnthropicModelToolsItem_Handoff, + AnthropicModelToolsItem_Mcp, + AnthropicModelToolsItem_Query, + AnthropicModelToolsItem_SipRequest, + AnthropicModelToolsItem_SlackMessageSend, + AnthropicModelToolsItem_Sms, + AnthropicModelToolsItem_TextEditor, + AnthropicModelToolsItem_TransferCall, + AnthropicModelToolsItem_Voicemail, + AnthropicThinkingConfig, + AnthropicThinkingConfigType, + AnyscaleCredential, + AnyscaleCredentialProvider, + AnyscaleModel, + AnyscaleModelToolsItem, + AnyscaleModelToolsItem_ApiRequest, + AnyscaleModelToolsItem_Bash, + AnyscaleModelToolsItem_Code, + AnyscaleModelToolsItem_Computer, + AnyscaleModelToolsItem_Dtmf, + AnyscaleModelToolsItem_EndCall, + AnyscaleModelToolsItem_Function, + AnyscaleModelToolsItem_GohighlevelCalendarAvailabilityCheck, + AnyscaleModelToolsItem_GohighlevelCalendarEventCreate, + AnyscaleModelToolsItem_GohighlevelContactCreate, + AnyscaleModelToolsItem_GohighlevelContactGet, + AnyscaleModelToolsItem_GoogleCalendarAvailabilityCheck, + AnyscaleModelToolsItem_GoogleCalendarEventCreate, + AnyscaleModelToolsItem_GoogleSheetsRowAppend, + AnyscaleModelToolsItem_Handoff, + AnyscaleModelToolsItem_Mcp, + AnyscaleModelToolsItem_Query, + AnyscaleModelToolsItem_SipRequest, + AnyscaleModelToolsItem_SlackMessageSend, + AnyscaleModelToolsItem_Sms, + AnyscaleModelToolsItem_TextEditor, + AnyscaleModelToolsItem_TransferCall, + AnyscaleModelToolsItem_Voicemail, + ApiRequestTool, + ApiRequestToolMessagesItem, + ApiRequestToolMessagesItem_RequestComplete, + ApiRequestToolMessagesItem_RequestFailed, + ApiRequestToolMessagesItem_RequestResponseDelayed, + ApiRequestToolMessagesItem_RequestStart, + ApiRequestToolMethod, + Artifact, + ArtifactMessagesItem, + ArtifactPlan, + ArtifactPlanRecordingFormat, + AssemblyAiCredential, + AssemblyAiCredentialProvider, + AssemblyAiTranscriber, + AssemblyAiTranscriberLanguage, + AssemblyAiTranscriberSpeechModel, + Assistant, + AssistantActivation, + AssistantBackgroundSound, + AssistantBackgroundSoundZero, + AssistantClientMessagesItem, + AssistantCredentialsItem, + AssistantCredentialsItem_11Labs, + AssistantCredentialsItem_Anthropic, + AssistantCredentialsItem_AnthropicBedrock, + AssistantCredentialsItem_Anyscale, + AssistantCredentialsItem_AssemblyAi, + AssistantCredentialsItem_Azure, + AssistantCredentialsItem_AzureOpenai, + AssistantCredentialsItem_ByoSipTrunk, + AssistantCredentialsItem_Cartesia, + AssistantCredentialsItem_Cerebras, + AssistantCredentialsItem_Cloudflare, + AssistantCredentialsItem_CustomCredential, + AssistantCredentialsItem_CustomLlm, + AssistantCredentialsItem_DeepSeek, + AssistantCredentialsItem_Deepgram, + AssistantCredentialsItem_Deepinfra, + AssistantCredentialsItem_Email, + AssistantCredentialsItem_Gcp, + AssistantCredentialsItem_GhlOauth2Authorization, + AssistantCredentialsItem_Gladia, + AssistantCredentialsItem_Gohighlevel, + AssistantCredentialsItem_Google, + AssistantCredentialsItem_GoogleCalendarOauth2Authorization, + AssistantCredentialsItem_GoogleCalendarOauth2Client, + AssistantCredentialsItem_GoogleSheetsOauth2Authorization, + AssistantCredentialsItem_Groq, + AssistantCredentialsItem_Hume, + AssistantCredentialsItem_InflectionAi, + AssistantCredentialsItem_Inworld, + AssistantCredentialsItem_Langfuse, + AssistantCredentialsItem_Lmnt, + AssistantCredentialsItem_Make, + AssistantCredentialsItem_Minimax, + AssistantCredentialsItem_Mistral, + AssistantCredentialsItem_Neuphonic, + AssistantCredentialsItem_Openai, + AssistantCredentialsItem_Openrouter, + AssistantCredentialsItem_PerplexityAi, + AssistantCredentialsItem_Playht, + AssistantCredentialsItem_RimeAi, + AssistantCredentialsItem_Runpod, + AssistantCredentialsItem_S3, + AssistantCredentialsItem_SlackOauth2Authorization, + AssistantCredentialsItem_SlackWebhook, + AssistantCredentialsItem_SmallestAi, + AssistantCredentialsItem_Soniox, + AssistantCredentialsItem_Speechmatics, + AssistantCredentialsItem_Supabase, + AssistantCredentialsItem_Tavus, + AssistantCredentialsItem_TogetherAi, + AssistantCredentialsItem_Trieve, + AssistantCredentialsItem_Twilio, + AssistantCredentialsItem_Vonage, + AssistantCredentialsItem_Webhook, + AssistantCredentialsItem_Wellsaid, + AssistantCredentialsItem_Xai, + AssistantCustomEndpointingRule, + AssistantFirstMessageMode, + AssistantHookAssistantSpeechInterrupted, + AssistantHookCallEnding, + AssistantHookCustomerSpeechInterrupted, + AssistantHooksItem, + AssistantMessage, + AssistantMessageEvaluationContinuePlan, + AssistantMessageJudgePlanAi, + AssistantMessageJudgePlanAiModel, + AssistantMessageJudgePlanAiModel_Anthropic, + AssistantMessageJudgePlanAiModel_CustomLlm, + AssistantMessageJudgePlanAiModel_Google, + AssistantMessageJudgePlanAiModel_Openai, + AssistantMessageJudgePlanAiType, + AssistantMessageJudgePlanExact, + AssistantMessageJudgePlanRegex, + AssistantMessageRole, + AssistantModel, + AssistantModel_Anthropic, + AssistantModel_AnthropicBedrock, + AssistantModel_Anyscale, + AssistantModel_Cerebras, + AssistantModel_CustomLlm, + AssistantModel_DeepSeek, + AssistantModel_Deepinfra, + AssistantModel_Google, + AssistantModel_Groq, + AssistantModel_InflectionAi, + AssistantModel_Minimax, + AssistantModel_Openai, + AssistantModel_Openrouter, + AssistantModel_PerplexityAi, + AssistantModel_TogetherAi, + AssistantModel_Xai, + AssistantOverrides, + AssistantOverridesBackgroundSound, + AssistantOverridesBackgroundSoundZero, + AssistantOverridesClientMessagesItem, + AssistantOverridesCredentialsItem, + AssistantOverridesCredentialsItem_11Labs, + AssistantOverridesCredentialsItem_Anthropic, + AssistantOverridesCredentialsItem_AnthropicBedrock, + AssistantOverridesCredentialsItem_Anyscale, + AssistantOverridesCredentialsItem_AssemblyAi, + AssistantOverridesCredentialsItem_Azure, + AssistantOverridesCredentialsItem_AzureOpenai, + AssistantOverridesCredentialsItem_ByoSipTrunk, + AssistantOverridesCredentialsItem_Cartesia, + AssistantOverridesCredentialsItem_Cerebras, + AssistantOverridesCredentialsItem_Cloudflare, + AssistantOverridesCredentialsItem_CustomCredential, + AssistantOverridesCredentialsItem_CustomLlm, + AssistantOverridesCredentialsItem_DeepSeek, + AssistantOverridesCredentialsItem_Deepgram, + AssistantOverridesCredentialsItem_Deepinfra, + AssistantOverridesCredentialsItem_Email, + AssistantOverridesCredentialsItem_Gcp, + AssistantOverridesCredentialsItem_GhlOauth2Authorization, + AssistantOverridesCredentialsItem_Gladia, + AssistantOverridesCredentialsItem_Gohighlevel, + AssistantOverridesCredentialsItem_Google, + AssistantOverridesCredentialsItem_GoogleCalendarOauth2Authorization, + AssistantOverridesCredentialsItem_GoogleCalendarOauth2Client, + AssistantOverridesCredentialsItem_GoogleSheetsOauth2Authorization, + AssistantOverridesCredentialsItem_Groq, + AssistantOverridesCredentialsItem_Hume, + AssistantOverridesCredentialsItem_InflectionAi, + AssistantOverridesCredentialsItem_Inworld, + AssistantOverridesCredentialsItem_Langfuse, + AssistantOverridesCredentialsItem_Lmnt, + AssistantOverridesCredentialsItem_Make, + AssistantOverridesCredentialsItem_Minimax, + AssistantOverridesCredentialsItem_Mistral, + AssistantOverridesCredentialsItem_Neuphonic, + AssistantOverridesCredentialsItem_Openai, + AssistantOverridesCredentialsItem_Openrouter, + AssistantOverridesCredentialsItem_PerplexityAi, + AssistantOverridesCredentialsItem_Playht, + AssistantOverridesCredentialsItem_RimeAi, + AssistantOverridesCredentialsItem_Runpod, + AssistantOverridesCredentialsItem_S3, + AssistantOverridesCredentialsItem_SlackOauth2Authorization, + AssistantOverridesCredentialsItem_SlackWebhook, + AssistantOverridesCredentialsItem_SmallestAi, + AssistantOverridesCredentialsItem_Soniox, + AssistantOverridesCredentialsItem_Speechmatics, + AssistantOverridesCredentialsItem_Supabase, + AssistantOverridesCredentialsItem_Tavus, + AssistantOverridesCredentialsItem_TogetherAi, + AssistantOverridesCredentialsItem_Trieve, + AssistantOverridesCredentialsItem_Twilio, + AssistantOverridesCredentialsItem_Vonage, + AssistantOverridesCredentialsItem_Webhook, + AssistantOverridesCredentialsItem_Wellsaid, + AssistantOverridesCredentialsItem_Xai, + AssistantOverridesFirstMessageMode, + AssistantOverridesHooksItem, + AssistantOverridesModel, + AssistantOverridesModel_Anthropic, + AssistantOverridesModel_AnthropicBedrock, + AssistantOverridesModel_Anyscale, + AssistantOverridesModel_Cerebras, + AssistantOverridesModel_CustomLlm, + AssistantOverridesModel_DeepSeek, + AssistantOverridesModel_Deepinfra, + AssistantOverridesModel_Google, + AssistantOverridesModel_Groq, + AssistantOverridesModel_InflectionAi, + AssistantOverridesModel_Minimax, + AssistantOverridesModel_Openai, + AssistantOverridesModel_Openrouter, + AssistantOverridesModel_PerplexityAi, + AssistantOverridesModel_TogetherAi, + AssistantOverridesModel_Xai, + AssistantOverridesServerMessagesItem, + AssistantOverridesToolsAppendItem, + AssistantOverridesToolsAppendItem_ApiRequest, + AssistantOverridesToolsAppendItem_Bash, + AssistantOverridesToolsAppendItem_Code, + AssistantOverridesToolsAppendItem_Computer, + AssistantOverridesToolsAppendItem_Dtmf, + AssistantOverridesToolsAppendItem_EndCall, + AssistantOverridesToolsAppendItem_Function, + AssistantOverridesToolsAppendItem_GohighlevelCalendarAvailabilityCheck, + AssistantOverridesToolsAppendItem_GohighlevelCalendarEventCreate, + AssistantOverridesToolsAppendItem_GohighlevelContactCreate, + AssistantOverridesToolsAppendItem_GohighlevelContactGet, + AssistantOverridesToolsAppendItem_GoogleCalendarAvailabilityCheck, + AssistantOverridesToolsAppendItem_GoogleCalendarEventCreate, + AssistantOverridesToolsAppendItem_GoogleSheetsRowAppend, + AssistantOverridesToolsAppendItem_Handoff, + AssistantOverridesToolsAppendItem_Mcp, + AssistantOverridesToolsAppendItem_Query, + AssistantOverridesToolsAppendItem_SipRequest, + AssistantOverridesToolsAppendItem_SlackMessageSend, + AssistantOverridesToolsAppendItem_Sms, + AssistantOverridesToolsAppendItem_TextEditor, + AssistantOverridesToolsAppendItem_TransferCall, + AssistantOverridesToolsAppendItem_Voicemail, + AssistantOverridesTranscriber, + AssistantOverridesTranscriber_11Labs, + AssistantOverridesTranscriber_AssemblyAi, + AssistantOverridesTranscriber_Azure, + AssistantOverridesTranscriber_Cartesia, + AssistantOverridesTranscriber_CustomTranscriber, + AssistantOverridesTranscriber_Deepgram, + AssistantOverridesTranscriber_Gladia, + AssistantOverridesTranscriber_Google, + AssistantOverridesTranscriber_Openai, + AssistantOverridesTranscriber_Soniox, + AssistantOverridesTranscriber_Speechmatics, + AssistantOverridesTranscriber_Talkscriber, + AssistantOverridesVoice, + AssistantOverridesVoice_11Labs, + AssistantOverridesVoice_Azure, + AssistantOverridesVoice_Cartesia, + AssistantOverridesVoice_CustomVoice, + AssistantOverridesVoice_Deepgram, + AssistantOverridesVoice_Hume, + AssistantOverridesVoice_Inworld, + AssistantOverridesVoice_Lmnt, + AssistantOverridesVoice_Minimax, + AssistantOverridesVoice_Neuphonic, + AssistantOverridesVoice_Openai, + AssistantOverridesVoice_Playht, + AssistantOverridesVoice_RimeAi, + AssistantOverridesVoice_Sesame, + AssistantOverridesVoice_SmallestAi, + AssistantOverridesVoice_Tavus, + AssistantOverridesVoice_Vapi, + AssistantOverridesVoice_Wellsaid, + AssistantOverridesVoicemailDetection, + AssistantOverridesVoicemailDetectionZero, + AssistantPaginatedResponse, + AssistantServerMessagesItem, + AssistantSpeechWordAlignmentTiming, + AssistantSpeechWordProgressTiming, + AssistantSpeechWordTimestamp, + AssistantTranscriber, + AssistantTranscriber_11Labs, + AssistantTranscriber_AssemblyAi, + AssistantTranscriber_Azure, + AssistantTranscriber_Cartesia, + AssistantTranscriber_CustomTranscriber, + AssistantTranscriber_Deepgram, + AssistantTranscriber_Gladia, + AssistantTranscriber_Google, + AssistantTranscriber_Openai, + AssistantTranscriber_Soniox, + AssistantTranscriber_Speechmatics, + AssistantTranscriber_Talkscriber, + AssistantUserEditable, + AssistantVersionPaginatedResponse, + AssistantVoice, + AssistantVoice_11Labs, + AssistantVoice_Azure, + AssistantVoice_Cartesia, + AssistantVoice_CustomVoice, + AssistantVoice_Deepgram, + AssistantVoice_Hume, + AssistantVoice_Inworld, + AssistantVoice_Lmnt, + AssistantVoice_Minimax, + AssistantVoice_Neuphonic, + AssistantVoice_Openai, + AssistantVoice_Playht, + AssistantVoice_RimeAi, + AssistantVoice_Sesame, + AssistantVoice_SmallestAi, + AssistantVoice_Tavus, + AssistantVoice_Vapi, + AssistantVoice_Wellsaid, + AssistantVoicemailDetection, + AssistantVoicemailDetectionZero, + AutoReloadPlan, + AwsStsAssumeRoleUser, + AwsStsAuthenticationArtifact, + AwsStsAuthenticationPlan, + AwsStsAuthenticationSession, + AwsStsCredentials, + AwsiamCredentialsAuthenticationPlan, + AzureBlobStorageBucketPlan, + AzureCredential, + AzureCredentialProvider, + AzureCredentialRegion, + AzureCredentialService, + AzureOpenAiCredential, + AzureOpenAiCredentialModelsItem, + AzureOpenAiCredentialProvider, + AzureOpenAiCredentialRegion, + AzureSpeechTranscriber, + AzureSpeechTranscriberLanguage, + AzureSpeechTranscriberSegmentationStrategy, + AzureVoice, + AzureVoiceId, + AzureVoiceIdEnum, + BackgroundSpeechDenoisingPlan, + BackoffPlan, + BarInsight, + BarInsightFromCallTable, + BarInsightFromCallTableGroupBy, + BarInsightFromCallTableQueriesItem, + BarInsightFromCallTableType, + BarInsightGroupBy, + BarInsightMetadata, + BarInsightQueriesItem, + BashTool, + BashToolMessagesItem, + BashToolMessagesItem_RequestComplete, + BashToolMessagesItem_RequestFailed, + BashToolMessagesItem_RequestResponseDelayed, + BashToolMessagesItem_RequestStart, + BashToolName, + BashToolSubType, + BashToolWithToolCall, + BashToolWithToolCallMessagesItem, + BashToolWithToolCallMessagesItem_RequestComplete, + BashToolWithToolCallMessagesItem_RequestFailed, + BashToolWithToolCallMessagesItem_RequestResponseDelayed, + BashToolWithToolCallMessagesItem_RequestStart, + BashToolWithToolCallName, + BashToolWithToolCallSubType, + BearerAuthenticationPlan, + BotMessage, + BothCustomEndpointingRule, + BucketPlan, + ByoPhoneNumber, + ByoPhoneNumberFallbackDestination, + ByoPhoneNumberFallbackDestination_Number, + ByoPhoneNumberFallbackDestination_Sip, + ByoPhoneNumberHooksItem, + ByoPhoneNumberHooksItem_CallEnding, + ByoPhoneNumberHooksItem_CallRinging, + ByoPhoneNumberStatus, + ByoSipTrunkCredential, + ByoSipTrunkCredentialProvider, + Call, + CallBatchError, + CallBatchResponse, + CallCostsItem, + CallCostsItem_Analysis, + CallCostsItem_KnowledgeBase, + CallCostsItem_Model, + CallCostsItem_Transcriber, + CallCostsItem_Transport, + CallCostsItem_Vapi, + CallCostsItem_Voice, + CallCostsItem_VoicemailDetection, + CallDestination, + CallDestination_Number, + CallDestination_Sip, + CallEndedReason, + CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem, + CallHookAssistantSpeechInterruptedDoItem_MessageAdd, + CallHookAssistantSpeechInterruptedDoItem_Say, + CallHookAssistantSpeechInterruptedDoItem_Tool, + CallHookAssistantSpeechInterruptedOn, + CallHookCallEnding, + CallHookCallEndingDoItem, + CallHookCallEndingDoItem_MessageAdd, + CallHookCallEndingDoItem_Tool, + CallHookCallEndingOn, + CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechInterruptedDoItem_MessageAdd, + CallHookCustomerSpeechInterruptedDoItem_Say, + CallHookCustomerSpeechInterruptedDoItem_Tool, + CallHookCustomerSpeechInterruptedOn, + CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem, + CallHookCustomerSpeechTimeoutDoItem_MessageAdd, + CallHookCustomerSpeechTimeoutDoItem_Say, + CallHookCustomerSpeechTimeoutDoItem_Tool, + CallHookFilter, + CallHookFilterType, + CallHookModelResponseTimeout, + CallHookModelResponseTimeoutDoItem, + CallHookModelResponseTimeoutDoItem_MessageAdd, + CallHookModelResponseTimeoutDoItem_Say, + CallHookModelResponseTimeoutDoItem_Tool, + CallHookModelResponseTimeoutOn, + CallHookTranscriberEndpointedSpeechLowConfidence, + CallHookTranscriberEndpointedSpeechLowConfidenceDoItem, + CallHookTranscriberEndpointedSpeechLowConfidenceDoItem_MessageAdd, + CallHookTranscriberEndpointedSpeechLowConfidenceDoItem_Say, + CallHookTranscriberEndpointedSpeechLowConfidenceDoItem_Tool, + CallMessagesItem, + CallPaginatedResponse, + CallPhoneCallProvider, + CallPhoneCallTransport, + CallStatus, + CallType, + Campaign, + CampaignEndedReason, + CampaignPaginatedResponse, + CampaignStatus, + CartesiaCredential, + CartesiaCredentialProvider, + CartesiaExperimentalControls, + CartesiaExperimentalControlsEmotion, + CartesiaGenerationConfig, + CartesiaGenerationConfigExperimental, + CartesiaPronunciationDictItem, + CartesiaPronunciationDictionary, + CartesiaSpeedControl, + CartesiaSpeedControlZero, + CartesiaTranscriber, + CartesiaTranscriberLanguage, + CartesiaTranscriberModel, + CartesiaVoice, + CartesiaVoiceLanguage, + CartesiaVoiceModel, + CerebrasCredential, + CerebrasCredentialProvider, + CerebrasModel, + CerebrasModelModel, + CerebrasModelToolsItem, + CerebrasModelToolsItem_ApiRequest, + CerebrasModelToolsItem_Bash, + CerebrasModelToolsItem_Code, + CerebrasModelToolsItem_Computer, + CerebrasModelToolsItem_Dtmf, + CerebrasModelToolsItem_EndCall, + CerebrasModelToolsItem_Function, + CerebrasModelToolsItem_GohighlevelCalendarAvailabilityCheck, + CerebrasModelToolsItem_GohighlevelCalendarEventCreate, + CerebrasModelToolsItem_GohighlevelContactCreate, + CerebrasModelToolsItem_GohighlevelContactGet, + CerebrasModelToolsItem_GoogleCalendarAvailabilityCheck, + CerebrasModelToolsItem_GoogleCalendarEventCreate, + CerebrasModelToolsItem_GoogleSheetsRowAppend, + CerebrasModelToolsItem_Handoff, + CerebrasModelToolsItem_Mcp, + CerebrasModelToolsItem_Query, + CerebrasModelToolsItem_SipRequest, + CerebrasModelToolsItem_SlackMessageSend, + CerebrasModelToolsItem_Sms, + CerebrasModelToolsItem_TextEditor, + CerebrasModelToolsItem_TransferCall, + CerebrasModelToolsItem_Voicemail, + Chat, + ChatAssistantOverrides, + ChatCost, + ChatCostsItem, + ChatCostsItem_Chat, + ChatCostsItem_Model, + ChatEvalAssistantMessageEvaluation, + ChatEvalAssistantMessageEvaluationJudgePlan, + ChatEvalAssistantMessageEvaluationJudgePlan_Ai, + ChatEvalAssistantMessageEvaluationJudgePlan_Exact, + ChatEvalAssistantMessageEvaluationJudgePlan_Regex, + ChatEvalAssistantMessageEvaluationRole, + ChatEvalAssistantMessageMock, + ChatEvalAssistantMessageMockRole, + ChatEvalAssistantMessageMockToolCall, + ChatEvalSystemMessageMock, + ChatEvalSystemMessageMockRole, + ChatEvalToolResponseMessageEvaluation, + ChatEvalToolResponseMessageEvaluationRole, + ChatEvalToolResponseMessageMock, + ChatEvalToolResponseMessageMockRole, + ChatEvalUserMessageMock, + ChatEvalUserMessageMockRole, + ChatInput, + ChatInputOneItem, + ChatMessagesItem, + ChatOutputItem, + ChatPaginatedResponse, + ChunkPlan, + ClientInboundMessage, + ClientInboundMessageAddMessage, + ClientInboundMessageControl, + ClientInboundMessageControlControl, + ClientInboundMessageEndCall, + ClientInboundMessageMessage, + ClientInboundMessageMessage_AddMessage, + ClientInboundMessageMessage_Control, + ClientInboundMessageMessage_EndCall, + ClientInboundMessageMessage_Say, + ClientInboundMessageMessage_SendTransportMessage, + ClientInboundMessageMessage_Transfer, + ClientInboundMessageSay, + ClientInboundMessageSendTransportMessage, + ClientInboundMessageSendTransportMessageMessage, + ClientInboundMessageSendTransportMessageMessage_Twilio, + ClientInboundMessageSendTransportMessageMessage_VapiSip, + ClientInboundMessageTransfer, + ClientInboundMessageTransferDestination, + ClientInboundMessageTransferDestination_Number, + ClientInboundMessageTransferDestination_Sip, + ClientMessage, + ClientMessageAssistantSpeech, + ClientMessageAssistantSpeechPhoneNumber, + ClientMessageAssistantSpeechPhoneNumber_ByoPhoneNumber, + ClientMessageAssistantSpeechPhoneNumber_Telnyx, + ClientMessageAssistantSpeechPhoneNumber_Twilio, + ClientMessageAssistantSpeechPhoneNumber_Vapi, + ClientMessageAssistantSpeechPhoneNumber_Vonage, + ClientMessageAssistantSpeechSource, + ClientMessageAssistantSpeechTiming, + ClientMessageAssistantSpeechTiming_WordAlignment, + ClientMessageAssistantSpeechTiming_WordProgress, + ClientMessageAssistantSpeechType, + ClientMessageAssistantStarted, + ClientMessageAssistantStartedPhoneNumber, + ClientMessageAssistantStartedPhoneNumber_ByoPhoneNumber, + ClientMessageAssistantStartedPhoneNumber_Telnyx, + ClientMessageAssistantStartedPhoneNumber_Twilio, + ClientMessageAssistantStartedPhoneNumber_Vapi, + ClientMessageAssistantStartedPhoneNumber_Vonage, + ClientMessageAssistantStartedType, + ClientMessageCallDeleteFailed, + ClientMessageCallDeleteFailedPhoneNumber, + ClientMessageCallDeleteFailedPhoneNumber_ByoPhoneNumber, + ClientMessageCallDeleteFailedPhoneNumber_Telnyx, + ClientMessageCallDeleteFailedPhoneNumber_Twilio, + ClientMessageCallDeleteFailedPhoneNumber_Vapi, + ClientMessageCallDeleteFailedPhoneNumber_Vonage, + ClientMessageCallDeleteFailedType, + ClientMessageCallDeleted, + ClientMessageCallDeletedPhoneNumber, + ClientMessageCallDeletedPhoneNumber_ByoPhoneNumber, + ClientMessageCallDeletedPhoneNumber_Telnyx, + ClientMessageCallDeletedPhoneNumber_Twilio, + ClientMessageCallDeletedPhoneNumber_Vapi, + ClientMessageCallDeletedPhoneNumber_Vonage, + ClientMessageCallDeletedType, + ClientMessageChatCreated, + ClientMessageChatCreatedPhoneNumber, + ClientMessageChatCreatedPhoneNumber_ByoPhoneNumber, + ClientMessageChatCreatedPhoneNumber_Telnyx, + ClientMessageChatCreatedPhoneNumber_Twilio, + ClientMessageChatCreatedPhoneNumber_Vapi, + ClientMessageChatCreatedPhoneNumber_Vonage, + ClientMessageChatCreatedType, + ClientMessageChatDeleted, + ClientMessageChatDeletedPhoneNumber, + ClientMessageChatDeletedPhoneNumber_ByoPhoneNumber, + ClientMessageChatDeletedPhoneNumber_Telnyx, + ClientMessageChatDeletedPhoneNumber_Twilio, + ClientMessageChatDeletedPhoneNumber_Vapi, + ClientMessageChatDeletedPhoneNumber_Vonage, + ClientMessageChatDeletedType, + ClientMessageConversationUpdate, + ClientMessageConversationUpdateMessagesItem, + ClientMessageConversationUpdatePhoneNumber, + ClientMessageConversationUpdatePhoneNumber_ByoPhoneNumber, + ClientMessageConversationUpdatePhoneNumber_Telnyx, + ClientMessageConversationUpdatePhoneNumber_Twilio, + ClientMessageConversationUpdatePhoneNumber_Vapi, + ClientMessageConversationUpdatePhoneNumber_Vonage, + ClientMessageConversationUpdateType, + ClientMessageHang, + ClientMessageHangPhoneNumber, + ClientMessageHangPhoneNumber_ByoPhoneNumber, + ClientMessageHangPhoneNumber_Telnyx, + ClientMessageHangPhoneNumber_Twilio, + ClientMessageHangPhoneNumber_Vapi, + ClientMessageHangPhoneNumber_Vonage, + ClientMessageHangType, + ClientMessageLanguageChangeDetected, + ClientMessageLanguageChangeDetectedPhoneNumber, + ClientMessageLanguageChangeDetectedPhoneNumber_ByoPhoneNumber, + ClientMessageLanguageChangeDetectedPhoneNumber_Telnyx, + ClientMessageLanguageChangeDetectedPhoneNumber_Twilio, + ClientMessageLanguageChangeDetectedPhoneNumber_Vapi, + ClientMessageLanguageChangeDetectedPhoneNumber_Vonage, + ClientMessageLanguageChangeDetectedType, + ClientMessageMessage, + ClientMessageMetadata, + ClientMessageMetadataPhoneNumber, + ClientMessageMetadataPhoneNumber_ByoPhoneNumber, + ClientMessageMetadataPhoneNumber_Telnyx, + ClientMessageMetadataPhoneNumber_Twilio, + ClientMessageMetadataPhoneNumber_Vapi, + ClientMessageMetadataPhoneNumber_Vonage, + ClientMessageMetadataType, + ClientMessageModelOutput, + ClientMessageModelOutputPhoneNumber, + ClientMessageModelOutputPhoneNumber_ByoPhoneNumber, + ClientMessageModelOutputPhoneNumber_Telnyx, + ClientMessageModelOutputPhoneNumber_Twilio, + ClientMessageModelOutputPhoneNumber_Vapi, + ClientMessageModelOutputPhoneNumber_Vonage, + ClientMessageModelOutputType, + ClientMessageSessionCreated, + ClientMessageSessionCreatedPhoneNumber, + ClientMessageSessionCreatedPhoneNumber_ByoPhoneNumber, + ClientMessageSessionCreatedPhoneNumber_Telnyx, + ClientMessageSessionCreatedPhoneNumber_Twilio, + ClientMessageSessionCreatedPhoneNumber_Vapi, + ClientMessageSessionCreatedPhoneNumber_Vonage, + ClientMessageSessionCreatedType, + ClientMessageSessionDeleted, + ClientMessageSessionDeletedPhoneNumber, + ClientMessageSessionDeletedPhoneNumber_ByoPhoneNumber, + ClientMessageSessionDeletedPhoneNumber_Telnyx, + ClientMessageSessionDeletedPhoneNumber_Twilio, + ClientMessageSessionDeletedPhoneNumber_Vapi, + ClientMessageSessionDeletedPhoneNumber_Vonage, + ClientMessageSessionDeletedType, + ClientMessageSessionUpdated, + ClientMessageSessionUpdatedPhoneNumber, + ClientMessageSessionUpdatedPhoneNumber_ByoPhoneNumber, + ClientMessageSessionUpdatedPhoneNumber_Telnyx, + ClientMessageSessionUpdatedPhoneNumber_Twilio, + ClientMessageSessionUpdatedPhoneNumber_Vapi, + ClientMessageSessionUpdatedPhoneNumber_Vonage, + ClientMessageSessionUpdatedType, + ClientMessageSpeechUpdate, + ClientMessageSpeechUpdatePhoneNumber, + ClientMessageSpeechUpdatePhoneNumber_ByoPhoneNumber, + ClientMessageSpeechUpdatePhoneNumber_Telnyx, + ClientMessageSpeechUpdatePhoneNumber_Twilio, + ClientMessageSpeechUpdatePhoneNumber_Vapi, + ClientMessageSpeechUpdatePhoneNumber_Vonage, + ClientMessageSpeechUpdateRole, + ClientMessageSpeechUpdateStatus, + ClientMessageSpeechUpdateType, + ClientMessageToolCalls, + ClientMessageToolCallsPhoneNumber, + ClientMessageToolCallsPhoneNumber_ByoPhoneNumber, + ClientMessageToolCallsPhoneNumber_Telnyx, + ClientMessageToolCallsPhoneNumber_Twilio, + ClientMessageToolCallsPhoneNumber_Vapi, + ClientMessageToolCallsPhoneNumber_Vonage, + ClientMessageToolCallsResult, + ClientMessageToolCallsResultPhoneNumber, + ClientMessageToolCallsResultPhoneNumber_ByoPhoneNumber, + ClientMessageToolCallsResultPhoneNumber_Telnyx, + ClientMessageToolCallsResultPhoneNumber_Twilio, + ClientMessageToolCallsResultPhoneNumber_Vapi, + ClientMessageToolCallsResultPhoneNumber_Vonage, + ClientMessageToolCallsResultType, + ClientMessageToolCallsToolWithToolCallListItem, + ClientMessageToolCallsToolWithToolCallListItem_Bash, + ClientMessageToolCallsToolWithToolCallListItem_Computer, + ClientMessageToolCallsToolWithToolCallListItem_Function, + ClientMessageToolCallsToolWithToolCallListItem_Ghl, + ClientMessageToolCallsToolWithToolCallListItem_GoogleCalendarEventCreate, + ClientMessageToolCallsToolWithToolCallListItem_Make, + ClientMessageToolCallsToolWithToolCallListItem_TextEditor, + ClientMessageToolCallsType, + ClientMessageTranscript, + ClientMessageTranscriptPhoneNumber, + ClientMessageTranscriptPhoneNumber_ByoPhoneNumber, + ClientMessageTranscriptPhoneNumber_Telnyx, + ClientMessageTranscriptPhoneNumber_Twilio, + ClientMessageTranscriptPhoneNumber_Vapi, + ClientMessageTranscriptPhoneNumber_Vonage, + ClientMessageTranscriptRole, + ClientMessageTranscriptTranscriptType, + ClientMessageTranscriptType, + ClientMessageTransferUpdate, + ClientMessageTransferUpdateDestination, + ClientMessageTransferUpdateDestination_Assistant, + ClientMessageTransferUpdateDestination_Number, + ClientMessageTransferUpdateDestination_Sip, + ClientMessageTransferUpdatePhoneNumber, + ClientMessageTransferUpdatePhoneNumber_ByoPhoneNumber, + ClientMessageTransferUpdatePhoneNumber_Telnyx, + ClientMessageTransferUpdatePhoneNumber_Twilio, + ClientMessageTransferUpdatePhoneNumber_Vapi, + ClientMessageTransferUpdatePhoneNumber_Vonage, + ClientMessageTransferUpdateType, + ClientMessageUserInterrupted, + ClientMessageUserInterruptedPhoneNumber, + ClientMessageUserInterruptedPhoneNumber_ByoPhoneNumber, + ClientMessageUserInterruptedPhoneNumber_Telnyx, + ClientMessageUserInterruptedPhoneNumber_Twilio, + ClientMessageUserInterruptedPhoneNumber_Vapi, + ClientMessageUserInterruptedPhoneNumber_Vonage, + ClientMessageUserInterruptedType, + ClientMessageVoiceInput, + ClientMessageVoiceInputPhoneNumber, + ClientMessageVoiceInputPhoneNumber_ByoPhoneNumber, + ClientMessageVoiceInputPhoneNumber_Telnyx, + ClientMessageVoiceInputPhoneNumber_Twilio, + ClientMessageVoiceInputPhoneNumber_Vapi, + ClientMessageVoiceInputPhoneNumber_Vonage, + ClientMessageVoiceInputType, + ClientMessageWorkflowNodeStarted, + ClientMessageWorkflowNodeStartedPhoneNumber, + ClientMessageWorkflowNodeStartedPhoneNumber_ByoPhoneNumber, + ClientMessageWorkflowNodeStartedPhoneNumber_Telnyx, + ClientMessageWorkflowNodeStartedPhoneNumber_Twilio, + ClientMessageWorkflowNodeStartedPhoneNumber_Vapi, + ClientMessageWorkflowNodeStartedPhoneNumber_Vonage, + ClientMessageWorkflowNodeStartedType, + CloneVoiceDto, + CloudflareCredential, + CloudflareCredentialProvider, + CloudflareR2BucketPlan, + CodeTool, + CodeToolEnvironmentVariable, + CodeToolMessagesItem, + CodeToolMessagesItem_RequestComplete, + CodeToolMessagesItem_RequestFailed, + CodeToolMessagesItem_RequestResponseDelayed, + CodeToolMessagesItem_RequestStart, + Compliance, + ComplianceOverride, + CompliancePlan, + CompliancePlanRecordingConsentPlan, + CompliancePlanRecordingConsentPlan_StayOnLine, + CompliancePlanRecordingConsentPlan_Verbal, + ComputerTool, + ComputerToolMessagesItem, + ComputerToolMessagesItem_RequestComplete, + ComputerToolMessagesItem_RequestFailed, + ComputerToolMessagesItem_RequestResponseDelayed, + ComputerToolMessagesItem_RequestStart, + ComputerToolName, + ComputerToolSubType, + ComputerToolWithToolCall, + ComputerToolWithToolCallMessagesItem, + ComputerToolWithToolCallMessagesItem_RequestComplete, + ComputerToolWithToolCallMessagesItem_RequestFailed, + ComputerToolWithToolCallMessagesItem_RequestResponseDelayed, + ComputerToolWithToolCallMessagesItem_RequestStart, + ComputerToolWithToolCallName, + ComputerToolWithToolCallSubType, + Condition, + ConditionOperator, + ContextEngineeringPlanAll, + ContextEngineeringPlanLastNMessages, + ContextEngineeringPlanNone, + ContextEngineeringPlanUserAndAssistantMessages, + ConversationNode, + ConversationNodeModel, + ConversationNodeModel_Anthropic, + ConversationNodeModel_AnthropicBedrock, + ConversationNodeModel_CustomLlm, + ConversationNodeModel_Google, + ConversationNodeModel_Openai, + ConversationNodeToolsItem, + ConversationNodeToolsItem_ApiRequest, + ConversationNodeToolsItem_Bash, + ConversationNodeToolsItem_Code, + ConversationNodeToolsItem_Computer, + ConversationNodeToolsItem_Dtmf, + ConversationNodeToolsItem_EndCall, + ConversationNodeToolsItem_Function, + ConversationNodeToolsItem_GohighlevelCalendarAvailabilityCheck, + ConversationNodeToolsItem_GohighlevelCalendarEventCreate, + ConversationNodeToolsItem_GohighlevelContactCreate, + ConversationNodeToolsItem_GohighlevelContactGet, + ConversationNodeToolsItem_GoogleCalendarAvailabilityCheck, + ConversationNodeToolsItem_GoogleCalendarEventCreate, + ConversationNodeToolsItem_GoogleSheetsRowAppend, + ConversationNodeToolsItem_Handoff, + ConversationNodeToolsItem_Mcp, + ConversationNodeToolsItem_Query, + ConversationNodeToolsItem_SipRequest, + ConversationNodeToolsItem_SlackMessageSend, + ConversationNodeToolsItem_Sms, + ConversationNodeToolsItem_TextEditor, + ConversationNodeToolsItem_TransferCall, + ConversationNodeToolsItem_Voicemail, + ConversationNodeTranscriber, + ConversationNodeTranscriber_11Labs, + ConversationNodeTranscriber_AssemblyAi, + ConversationNodeTranscriber_Azure, + ConversationNodeTranscriber_Cartesia, + ConversationNodeTranscriber_CustomTranscriber, + ConversationNodeTranscriber_Deepgram, + ConversationNodeTranscriber_Gladia, + ConversationNodeTranscriber_Google, + ConversationNodeTranscriber_Openai, + ConversationNodeTranscriber_Soniox, + ConversationNodeTranscriber_Speechmatics, + ConversationNodeTranscriber_Talkscriber, + ConversationNodeVoice, + ConversationNodeVoice_11Labs, + ConversationNodeVoice_Azure, + ConversationNodeVoice_Cartesia, + ConversationNodeVoice_CustomVoice, + ConversationNodeVoice_Deepgram, + ConversationNodeVoice_Hume, + ConversationNodeVoice_Inworld, + ConversationNodeVoice_Lmnt, + ConversationNodeVoice_Minimax, + ConversationNodeVoice_Neuphonic, + ConversationNodeVoice_Openai, + ConversationNodeVoice_Playht, + ConversationNodeVoice_RimeAi, + ConversationNodeVoice_Sesame, + ConversationNodeVoice_SmallestAi, + ConversationNodeVoice_Tavus, + ConversationNodeVoice_Vapi, + ConversationNodeVoice_Wellsaid, + CostBreakdown, + CreateAnthropicBedrockCredentialDto, + CreateAnthropicBedrockCredentialDtoAuthenticationPlan, + CreateAnthropicBedrockCredentialDtoAuthenticationPlan_AwsIam, + CreateAnthropicBedrockCredentialDtoAuthenticationPlan_AwsSts, + CreateAnthropicBedrockCredentialDtoRegion, + CreateAnthropicCredentialDto, + CreateAnyscaleCredentialDto, + CreateApiRequestToolDto, + CreateApiRequestToolDtoMessagesItem, + CreateApiRequestToolDtoMessagesItem_RequestComplete, + CreateApiRequestToolDtoMessagesItem_RequestFailed, + CreateApiRequestToolDtoMessagesItem_RequestResponseDelayed, + CreateApiRequestToolDtoMessagesItem_RequestStart, + CreateApiRequestToolDtoMethod, + CreateAssemblyAiCredentialDto, + CreateAssistantDto, + CreateAssistantDtoBackgroundSound, + CreateAssistantDtoBackgroundSoundZero, + CreateAssistantDtoClientMessagesItem, + CreateAssistantDtoCredentialsItem, + CreateAssistantDtoCredentialsItem_11Labs, + CreateAssistantDtoCredentialsItem_Anthropic, + CreateAssistantDtoCredentialsItem_AnthropicBedrock, + CreateAssistantDtoCredentialsItem_Anyscale, + CreateAssistantDtoCredentialsItem_AssemblyAi, + CreateAssistantDtoCredentialsItem_Azure, + CreateAssistantDtoCredentialsItem_AzureOpenai, + CreateAssistantDtoCredentialsItem_ByoSipTrunk, + CreateAssistantDtoCredentialsItem_Cartesia, + CreateAssistantDtoCredentialsItem_Cerebras, + CreateAssistantDtoCredentialsItem_Cloudflare, + CreateAssistantDtoCredentialsItem_CustomCredential, + CreateAssistantDtoCredentialsItem_CustomLlm, + CreateAssistantDtoCredentialsItem_DeepSeek, + CreateAssistantDtoCredentialsItem_Deepgram, + CreateAssistantDtoCredentialsItem_Deepinfra, + CreateAssistantDtoCredentialsItem_Email, + CreateAssistantDtoCredentialsItem_Gcp, + CreateAssistantDtoCredentialsItem_GhlOauth2Authorization, + CreateAssistantDtoCredentialsItem_Gladia, + CreateAssistantDtoCredentialsItem_Gohighlevel, + CreateAssistantDtoCredentialsItem_Google, + CreateAssistantDtoCredentialsItem_GoogleCalendarOauth2Authorization, + CreateAssistantDtoCredentialsItem_GoogleCalendarOauth2Client, + CreateAssistantDtoCredentialsItem_GoogleSheetsOauth2Authorization, + CreateAssistantDtoCredentialsItem_Groq, + CreateAssistantDtoCredentialsItem_Hume, + CreateAssistantDtoCredentialsItem_InflectionAi, + CreateAssistantDtoCredentialsItem_Inworld, + CreateAssistantDtoCredentialsItem_Langfuse, + CreateAssistantDtoCredentialsItem_Lmnt, + CreateAssistantDtoCredentialsItem_Make, + CreateAssistantDtoCredentialsItem_Minimax, + CreateAssistantDtoCredentialsItem_Mistral, + CreateAssistantDtoCredentialsItem_Neuphonic, + CreateAssistantDtoCredentialsItem_Openai, + CreateAssistantDtoCredentialsItem_Openrouter, + CreateAssistantDtoCredentialsItem_PerplexityAi, + CreateAssistantDtoCredentialsItem_Playht, + CreateAssistantDtoCredentialsItem_RimeAi, + CreateAssistantDtoCredentialsItem_Runpod, + CreateAssistantDtoCredentialsItem_S3, + CreateAssistantDtoCredentialsItem_SlackOauth2Authorization, + CreateAssistantDtoCredentialsItem_SlackWebhook, + CreateAssistantDtoCredentialsItem_SmallestAi, + CreateAssistantDtoCredentialsItem_Soniox, + CreateAssistantDtoCredentialsItem_Speechmatics, + CreateAssistantDtoCredentialsItem_Supabase, + CreateAssistantDtoCredentialsItem_Tavus, + CreateAssistantDtoCredentialsItem_TogetherAi, + CreateAssistantDtoCredentialsItem_Trieve, + CreateAssistantDtoCredentialsItem_Twilio, + CreateAssistantDtoCredentialsItem_Vonage, + CreateAssistantDtoCredentialsItem_Webhook, + CreateAssistantDtoCredentialsItem_Wellsaid, + CreateAssistantDtoCredentialsItem_Xai, + CreateAssistantDtoFirstMessageMode, + CreateAssistantDtoHooksItem, + CreateAssistantDtoModel, + CreateAssistantDtoModel_Anthropic, + CreateAssistantDtoModel_AnthropicBedrock, + CreateAssistantDtoModel_Anyscale, + CreateAssistantDtoModel_Cerebras, + CreateAssistantDtoModel_CustomLlm, + CreateAssistantDtoModel_DeepSeek, + CreateAssistantDtoModel_Deepinfra, + CreateAssistantDtoModel_Google, + CreateAssistantDtoModel_Groq, + CreateAssistantDtoModel_InflectionAi, + CreateAssistantDtoModel_Minimax, + CreateAssistantDtoModel_Openai, + CreateAssistantDtoModel_Openrouter, + CreateAssistantDtoModel_PerplexityAi, + CreateAssistantDtoModel_TogetherAi, + CreateAssistantDtoModel_Xai, + CreateAssistantDtoServerMessagesItem, + CreateAssistantDtoTranscriber, + CreateAssistantDtoTranscriber_11Labs, + CreateAssistantDtoTranscriber_AssemblyAi, + CreateAssistantDtoTranscriber_Azure, + CreateAssistantDtoTranscriber_Cartesia, + CreateAssistantDtoTranscriber_CustomTranscriber, + CreateAssistantDtoTranscriber_Deepgram, + CreateAssistantDtoTranscriber_Gladia, + CreateAssistantDtoTranscriber_Google, + CreateAssistantDtoTranscriber_Openai, + CreateAssistantDtoTranscriber_Soniox, + CreateAssistantDtoTranscriber_Speechmatics, + CreateAssistantDtoTranscriber_Talkscriber, + CreateAssistantDtoVoice, + CreateAssistantDtoVoice_11Labs, + CreateAssistantDtoVoice_Azure, + CreateAssistantDtoVoice_Cartesia, + CreateAssistantDtoVoice_CustomVoice, + CreateAssistantDtoVoice_Deepgram, + CreateAssistantDtoVoice_Hume, + CreateAssistantDtoVoice_Inworld, + CreateAssistantDtoVoice_Lmnt, + CreateAssistantDtoVoice_Minimax, + CreateAssistantDtoVoice_Neuphonic, + CreateAssistantDtoVoice_Openai, + CreateAssistantDtoVoice_Playht, + CreateAssistantDtoVoice_RimeAi, + CreateAssistantDtoVoice_Sesame, + CreateAssistantDtoVoice_SmallestAi, + CreateAssistantDtoVoice_Tavus, + CreateAssistantDtoVoice_Vapi, + CreateAssistantDtoVoice_Wellsaid, + CreateAssistantDtoVoicemailDetection, + CreateAssistantDtoVoicemailDetectionZero, + CreateAzureCredentialDto, + CreateAzureCredentialDtoRegion, + CreateAzureCredentialDtoService, + CreateAzureOpenAiCredentialDto, + CreateAzureOpenAiCredentialDtoModelsItem, + CreateAzureOpenAiCredentialDtoRegion, + CreateBarInsightFromCallTableDto, + CreateBarInsightFromCallTableDtoGroupBy, + CreateBarInsightFromCallTableDtoQueriesItem, + CreateBashToolDto, + CreateBashToolDtoMessagesItem, + CreateBashToolDtoMessagesItem_RequestComplete, + CreateBashToolDtoMessagesItem_RequestFailed, + CreateBashToolDtoMessagesItem_RequestResponseDelayed, + CreateBashToolDtoMessagesItem_RequestStart, + CreateBashToolDtoName, + CreateBashToolDtoSubType, + CreateByoPhoneNumberDto, + CreateByoPhoneNumberDtoFallbackDestination, + CreateByoPhoneNumberDtoFallbackDestination_Number, + CreateByoPhoneNumberDtoFallbackDestination_Sip, + CreateByoPhoneNumberDtoHooksItem, + CreateByoPhoneNumberDtoHooksItem_CallEnding, + CreateByoPhoneNumberDtoHooksItem_CallRinging, + CreateByoSipTrunkCredentialDto, + CreateCartesiaCredentialDto, + CreateCerebrasCredentialDto, + CreateChatStreamResponse, + CreateCloudflareCredentialDto, + CreateCodeToolDto, + CreateCodeToolDtoMessagesItem, + CreateCodeToolDtoMessagesItem_RequestComplete, + CreateCodeToolDtoMessagesItem_RequestFailed, + CreateCodeToolDtoMessagesItem_RequestResponseDelayed, + CreateCodeToolDtoMessagesItem_RequestStart, + CreateComputerToolDto, + CreateComputerToolDtoMessagesItem, + CreateComputerToolDtoMessagesItem_RequestComplete, + CreateComputerToolDtoMessagesItem_RequestFailed, + CreateComputerToolDtoMessagesItem_RequestResponseDelayed, + CreateComputerToolDtoMessagesItem_RequestStart, + CreateComputerToolDtoName, + CreateComputerToolDtoSubType, + CreateCustomCredentialDto, + CreateCustomCredentialDtoAuthenticationPlan, + CreateCustomCredentialDtoAuthenticationPlan_Bearer, + CreateCustomCredentialDtoAuthenticationPlan_Hmac, + CreateCustomCredentialDtoAuthenticationPlan_Oauth2, + CreateCustomCredentialDtoEncryptionPlan, + CreateCustomCredentialDtoEncryptionPlan_PublicKey, + CreateCustomKnowledgeBaseDto, + CreateCustomKnowledgeBaseDtoProvider, + CreateCustomLlmCredentialDto, + CreateCustomerDto, + CreateDeepInfraCredentialDto, + CreateDeepSeekCredentialDto, + CreateDeepgramCredentialDto, + CreateDtmfToolDto, + CreateDtmfToolDtoMessagesItem, + CreateDtmfToolDtoMessagesItem_RequestComplete, + CreateDtmfToolDtoMessagesItem_RequestFailed, + CreateDtmfToolDtoMessagesItem_RequestResponseDelayed, + CreateDtmfToolDtoMessagesItem_RequestStart, + CreateElevenLabsCredentialDto, + CreateEmailCredentialDto, + CreateEndCallToolDto, + CreateEndCallToolDtoMessagesItem, + CreateEndCallToolDtoMessagesItem_RequestComplete, + CreateEndCallToolDtoMessagesItem_RequestFailed, + CreateEndCallToolDtoMessagesItem_RequestResponseDelayed, + CreateEndCallToolDtoMessagesItem_RequestStart, + CreateEvalDto, + CreateEvalDtoMessagesItem, + CreateEvalDtoType, + CreateFunctionToolDto, + CreateFunctionToolDtoMessagesItem, + CreateFunctionToolDtoMessagesItem_RequestComplete, + CreateFunctionToolDtoMessagesItem_RequestFailed, + CreateFunctionToolDtoMessagesItem_RequestResponseDelayed, + CreateFunctionToolDtoMessagesItem_RequestStart, + CreateGcpCredentialDto, + CreateGhlToolDto, + CreateGhlToolDtoMessagesItem, + CreateGhlToolDtoMessagesItem_RequestComplete, + CreateGhlToolDtoMessagesItem_RequestFailed, + CreateGhlToolDtoMessagesItem_RequestResponseDelayed, + CreateGhlToolDtoMessagesItem_RequestStart, + CreateGhlToolDtoType, + CreateGladiaCredentialDto, + CreateGoHighLevelCalendarAvailabilityToolDto, + CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem, + CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestComplete, + CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestFailed, + CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestResponseDelayed, + CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestStart, + CreateGoHighLevelCalendarEventCreateToolDto, + CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem, + CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestComplete, + CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestFailed, + CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestResponseDelayed, + CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestStart, + CreateGoHighLevelContactCreateToolDto, + CreateGoHighLevelContactCreateToolDtoMessagesItem, + CreateGoHighLevelContactCreateToolDtoMessagesItem_RequestComplete, + CreateGoHighLevelContactCreateToolDtoMessagesItem_RequestFailed, + CreateGoHighLevelContactCreateToolDtoMessagesItem_RequestResponseDelayed, + CreateGoHighLevelContactCreateToolDtoMessagesItem_RequestStart, + CreateGoHighLevelContactGetToolDto, + CreateGoHighLevelContactGetToolDtoMessagesItem, + CreateGoHighLevelContactGetToolDtoMessagesItem_RequestComplete, + CreateGoHighLevelContactGetToolDtoMessagesItem_RequestFailed, + CreateGoHighLevelContactGetToolDtoMessagesItem_RequestResponseDelayed, + CreateGoHighLevelContactGetToolDtoMessagesItem_RequestStart, + CreateGoHighLevelCredentialDto, + CreateGoHighLevelMcpCredentialDto, + CreateGoogleCalendarCheckAvailabilityToolDto, + CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem, + CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestComplete, + CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestFailed, + CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestResponseDelayed, + CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestStart, + CreateGoogleCalendarCreateEventToolDto, + CreateGoogleCalendarCreateEventToolDtoMessagesItem, + CreateGoogleCalendarCreateEventToolDtoMessagesItem_RequestComplete, + CreateGoogleCalendarCreateEventToolDtoMessagesItem_RequestFailed, + CreateGoogleCalendarCreateEventToolDtoMessagesItem_RequestResponseDelayed, + CreateGoogleCalendarCreateEventToolDtoMessagesItem_RequestStart, + CreateGoogleCalendarOAuth2AuthorizationCredentialDto, + CreateGoogleCalendarOAuth2ClientCredentialDto, + CreateGoogleCredentialDto, + CreateGoogleSheetsOAuth2AuthorizationCredentialDto, + CreateGoogleSheetsRowAppendToolDto, + CreateGoogleSheetsRowAppendToolDtoMessagesItem, + CreateGoogleSheetsRowAppendToolDtoMessagesItem_RequestComplete, + CreateGoogleSheetsRowAppendToolDtoMessagesItem_RequestFailed, + CreateGoogleSheetsRowAppendToolDtoMessagesItem_RequestResponseDelayed, + CreateGoogleSheetsRowAppendToolDtoMessagesItem_RequestStart, + CreateGroqCredentialDto, + CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem, + CreateHandoffToolDtoDestinationsItem_Assistant, + CreateHandoffToolDtoDestinationsItem_Dynamic, + CreateHandoffToolDtoDestinationsItem_Squad, + CreateHandoffToolDtoMessagesItem, + CreateHandoffToolDtoMessagesItem_RequestComplete, + CreateHandoffToolDtoMessagesItem_RequestFailed, + CreateHandoffToolDtoMessagesItem_RequestResponseDelayed, + CreateHandoffToolDtoMessagesItem_RequestStart, + CreateHumeCredentialDto, + CreateInflectionAiCredentialDto, + CreateInworldCredentialDto, + CreateLangfuseCredentialDto, + CreateLineInsightFromCallTableDto, + CreateLineInsightFromCallTableDtoGroupBy, + CreateLineInsightFromCallTableDtoQueriesItem, + CreateLmntCredentialDto, + CreateMakeCredentialDto, + CreateMakeToolDto, + CreateMakeToolDtoMessagesItem, + CreateMakeToolDtoMessagesItem_RequestComplete, + CreateMakeToolDtoMessagesItem_RequestFailed, + CreateMakeToolDtoMessagesItem_RequestResponseDelayed, + CreateMakeToolDtoMessagesItem_RequestStart, + CreateMakeToolDtoType, + CreateMcpToolDto, + CreateMcpToolDtoMessagesItem, + CreateMcpToolDtoMessagesItem_RequestComplete, + CreateMcpToolDtoMessagesItem_RequestFailed, + CreateMcpToolDtoMessagesItem_RequestResponseDelayed, + CreateMcpToolDtoMessagesItem_RequestStart, + CreateMinimaxCredentialDto, + CreateMistralCredentialDto, + CreateNeuphonicCredentialDto, + CreateOpenAiCredentialDto, + CreateOpenRouterCredentialDto, + CreateOrgDto, + CreateOrgDtoChannel, + CreateOutboundCallDto, + CreateOutputToolDto, + CreateOutputToolDtoMessagesItem, + CreateOutputToolDtoMessagesItem_RequestComplete, + CreateOutputToolDtoMessagesItem_RequestFailed, + CreateOutputToolDtoMessagesItem_RequestResponseDelayed, + CreateOutputToolDtoMessagesItem_RequestStart, + CreateOutputToolDtoType, + CreatePerplexityAiCredentialDto, + CreatePersonalityDto, + CreatePieInsightFromCallTableDto, + CreatePieInsightFromCallTableDtoGroupBy, + CreatePieInsightFromCallTableDtoQueriesItem, + CreatePlayHtCredentialDto, + CreateQueryToolDto, + CreateQueryToolDtoMessagesItem, + CreateQueryToolDtoMessagesItem_RequestComplete, + CreateQueryToolDtoMessagesItem_RequestFailed, + CreateQueryToolDtoMessagesItem_RequestResponseDelayed, + CreateQueryToolDtoMessagesItem_RequestStart, + CreateRimeAiCredentialDto, + CreateRunpodCredentialDto, + CreateS3CredentialDto, + CreateScenarioDto, + CreateScenarioDtoHooksItem, + CreateScenarioDtoHooksItem_SimulationRunEnded, + CreateScenarioDtoHooksItem_SimulationRunStarted, + CreateScorecardDto, + CreateSesameVoiceDto, + CreateSimulationDto, + CreateSimulationRunDto, + CreateSimulationRunDtoSimulationsItem, + CreateSimulationRunDtoSimulationsItem_Simulation, + CreateSimulationRunDtoSimulationsItem_SimulationSuite, + CreateSimulationRunDtoTarget, + CreateSimulationRunDtoTarget_Assistant, + CreateSimulationRunDtoTarget_Squad, + CreateSimulationSuiteDto, + CreateSipRequestToolDto, + CreateSipRequestToolDtoBody, + CreateSipRequestToolDtoMessagesItem, + CreateSipRequestToolDtoMessagesItem_RequestComplete, + CreateSipRequestToolDtoMessagesItem_RequestFailed, + CreateSipRequestToolDtoMessagesItem_RequestResponseDelayed, + CreateSipRequestToolDtoMessagesItem_RequestStart, + CreateSipRequestToolDtoVerb, + CreateSlackOAuth2AuthorizationCredentialDto, + CreateSlackSendMessageToolDto, + CreateSlackSendMessageToolDtoMessagesItem, + CreateSlackSendMessageToolDtoMessagesItem_RequestComplete, + CreateSlackSendMessageToolDtoMessagesItem_RequestFailed, + CreateSlackSendMessageToolDtoMessagesItem_RequestResponseDelayed, + CreateSlackSendMessageToolDtoMessagesItem_RequestStart, + CreateSlackWebhookCredentialDto, + CreateSmallestAiCredentialDto, + CreateSmsToolDto, + CreateSmsToolDtoMessagesItem, + CreateSmsToolDtoMessagesItem_RequestComplete, + CreateSmsToolDtoMessagesItem_RequestFailed, + CreateSmsToolDtoMessagesItem_RequestResponseDelayed, + CreateSmsToolDtoMessagesItem_RequestStart, + CreateSonioxCredentialDto, + CreateSpeechmaticsCredentialDto, + CreateSquadDto, + CreateStructuredOutputDto, + CreateStructuredOutputDtoModel, + CreateStructuredOutputDtoModel_Anthropic, + CreateStructuredOutputDtoModel_AnthropicBedrock, + CreateStructuredOutputDtoModel_CustomLlm, + CreateStructuredOutputDtoModel_Google, + CreateStructuredOutputDtoModel_Openai, + CreateStructuredOutputDtoType, + CreateSupabaseCredentialDto, + CreateTavusCredentialDto, + CreateTelnyxPhoneNumberDto, + CreateTelnyxPhoneNumberDtoFallbackDestination, + CreateTelnyxPhoneNumberDtoFallbackDestination_Number, + CreateTelnyxPhoneNumberDtoFallbackDestination_Sip, + CreateTelnyxPhoneNumberDtoHooksItem, + CreateTelnyxPhoneNumberDtoHooksItem_CallEnding, + CreateTelnyxPhoneNumberDtoHooksItem_CallRinging, + CreateTestSuiteDto, + CreateTestSuiteRunDto, + CreateTestSuiteTestChatDto, + CreateTestSuiteTestChatDtoType, + CreateTestSuiteTestVoiceDto, + CreateTestSuiteTestVoiceDtoType, + CreateTextEditorToolDto, + CreateTextEditorToolDtoMessagesItem, + CreateTextEditorToolDtoMessagesItem_RequestComplete, + CreateTextEditorToolDtoMessagesItem_RequestFailed, + CreateTextEditorToolDtoMessagesItem_RequestResponseDelayed, + CreateTextEditorToolDtoMessagesItem_RequestStart, + CreateTextEditorToolDtoName, + CreateTextEditorToolDtoSubType, + CreateTextInsightFromCallTableDto, + CreateTextInsightFromCallTableDtoQueriesItem, + CreateTogetherAiCredentialDto, + CreateTokenDto, + CreateTokenDtoTag, + CreateToolTemplateDto, + CreateToolTemplateDtoDetails, + CreateToolTemplateDtoDetails_ApiRequest, + CreateToolTemplateDtoDetails_Bash, + CreateToolTemplateDtoDetails_Code, + CreateToolTemplateDtoDetails_Computer, + CreateToolTemplateDtoDetails_Dtmf, + CreateToolTemplateDtoDetails_EndCall, + CreateToolTemplateDtoDetails_Function, + CreateToolTemplateDtoDetails_GohighlevelCalendarAvailabilityCheck, + CreateToolTemplateDtoDetails_GohighlevelCalendarEventCreate, + CreateToolTemplateDtoDetails_GohighlevelContactCreate, + CreateToolTemplateDtoDetails_GohighlevelContactGet, + CreateToolTemplateDtoDetails_GoogleCalendarAvailabilityCheck, + CreateToolTemplateDtoDetails_GoogleCalendarEventCreate, + CreateToolTemplateDtoDetails_GoogleSheetsRowAppend, + CreateToolTemplateDtoDetails_Handoff, + CreateToolTemplateDtoDetails_Mcp, + CreateToolTemplateDtoDetails_Query, + CreateToolTemplateDtoDetails_SipRequest, + CreateToolTemplateDtoDetails_SlackMessageSend, + CreateToolTemplateDtoDetails_Sms, + CreateToolTemplateDtoDetails_TextEditor, + CreateToolTemplateDtoDetails_TransferCall, + CreateToolTemplateDtoDetails_Voicemail, + CreateToolTemplateDtoProvider, + CreateToolTemplateDtoProviderDetails, + CreateToolTemplateDtoProviderDetails_Function, + CreateToolTemplateDtoProviderDetails_Ghl, + CreateToolTemplateDtoProviderDetails_GohighlevelCalendarAvailabilityCheck, + CreateToolTemplateDtoProviderDetails_GohighlevelCalendarEventCreate, + CreateToolTemplateDtoProviderDetails_GohighlevelContactCreate, + CreateToolTemplateDtoProviderDetails_GohighlevelContactGet, + CreateToolTemplateDtoProviderDetails_GoogleCalendarEventCreate, + CreateToolTemplateDtoProviderDetails_GoogleSheetsRowAppend, + CreateToolTemplateDtoProviderDetails_Make, + CreateToolTemplateDtoType, + CreateToolTemplateDtoVisibility, + CreateTransferCallToolDto, + CreateTransferCallToolDtoDestinationsItem, + CreateTransferCallToolDtoDestinationsItem_Assistant, + CreateTransferCallToolDtoDestinationsItem_Number, + CreateTransferCallToolDtoDestinationsItem_Sip, + CreateTransferCallToolDtoMessagesItem, + CreateTransferCallToolDtoMessagesItem_RequestComplete, + CreateTransferCallToolDtoMessagesItem_RequestFailed, + CreateTransferCallToolDtoMessagesItem_RequestResponseDelayed, + CreateTransferCallToolDtoMessagesItem_RequestStart, + CreateTrieveCredentialDto, + CreateTrieveKnowledgeBaseDto, + CreateTrieveKnowledgeBaseDtoProvider, + CreateTwilioCredentialDto, + CreateTwilioPhoneNumberDto, + CreateTwilioPhoneNumberDtoFallbackDestination, + CreateTwilioPhoneNumberDtoFallbackDestination_Number, + CreateTwilioPhoneNumberDtoFallbackDestination_Sip, + CreateTwilioPhoneNumberDtoHooksItem, + CreateTwilioPhoneNumberDtoHooksItem_CallEnding, + CreateTwilioPhoneNumberDtoHooksItem_CallRinging, + CreateVapiPhoneNumberDto, + CreateVapiPhoneNumberDtoFallbackDestination, + CreateVapiPhoneNumberDtoFallbackDestination_Number, + CreateVapiPhoneNumberDtoFallbackDestination_Sip, + CreateVapiPhoneNumberDtoHooksItem, + CreateVapiPhoneNumberDtoHooksItem_CallEnding, + CreateVapiPhoneNumberDtoHooksItem_CallRinging, + CreateVoicemailToolDto, + CreateVoicemailToolDtoMessagesItem, + CreateVoicemailToolDtoMessagesItem_RequestComplete, + CreateVoicemailToolDtoMessagesItem_RequestFailed, + CreateVoicemailToolDtoMessagesItem_RequestResponseDelayed, + CreateVoicemailToolDtoMessagesItem_RequestStart, + CreateVonageCredentialDto, + CreateVonagePhoneNumberDto, + CreateVonagePhoneNumberDtoFallbackDestination, + CreateVonagePhoneNumberDtoFallbackDestination_Number, + CreateVonagePhoneNumberDtoFallbackDestination_Sip, + CreateVonagePhoneNumberDtoHooksItem, + CreateVonagePhoneNumberDtoHooksItem_CallEnding, + CreateVonagePhoneNumberDtoHooksItem_CallRinging, + CreateWebCallDto, + CreateWebChatDto, + CreateWebChatDtoInput, + CreateWebChatDtoInputOneItem, + CreateWebCustomerDto, + CreateWebhookCredentialDto, + CreateWebhookCredentialDtoAuthenticationPlan, + CreateWebhookCredentialDtoAuthenticationPlan_Bearer, + CreateWebhookCredentialDtoAuthenticationPlan_Hmac, + CreateWebhookCredentialDtoAuthenticationPlan_Oauth2, + CreateWellSaidCredentialDto, + CreateWorkflowDto, + CreateWorkflowDtoBackgroundSound, + CreateWorkflowDtoBackgroundSoundZero, + CreateWorkflowDtoCredentialsItem, + CreateWorkflowDtoCredentialsItem_11Labs, + CreateWorkflowDtoCredentialsItem_Anthropic, + CreateWorkflowDtoCredentialsItem_AnthropicBedrock, + CreateWorkflowDtoCredentialsItem_Anyscale, + CreateWorkflowDtoCredentialsItem_AssemblyAi, + CreateWorkflowDtoCredentialsItem_Azure, + CreateWorkflowDtoCredentialsItem_AzureOpenai, + CreateWorkflowDtoCredentialsItem_ByoSipTrunk, + CreateWorkflowDtoCredentialsItem_Cartesia, + CreateWorkflowDtoCredentialsItem_Cerebras, + CreateWorkflowDtoCredentialsItem_Cloudflare, + CreateWorkflowDtoCredentialsItem_CustomCredential, + CreateWorkflowDtoCredentialsItem_CustomLlm, + CreateWorkflowDtoCredentialsItem_DeepSeek, + CreateWorkflowDtoCredentialsItem_Deepgram, + CreateWorkflowDtoCredentialsItem_Deepinfra, + CreateWorkflowDtoCredentialsItem_Email, + CreateWorkflowDtoCredentialsItem_Gcp, + CreateWorkflowDtoCredentialsItem_GhlOauth2Authorization, + CreateWorkflowDtoCredentialsItem_Gladia, + CreateWorkflowDtoCredentialsItem_Gohighlevel, + CreateWorkflowDtoCredentialsItem_Google, + CreateWorkflowDtoCredentialsItem_GoogleCalendarOauth2Authorization, + CreateWorkflowDtoCredentialsItem_GoogleCalendarOauth2Client, + CreateWorkflowDtoCredentialsItem_GoogleSheetsOauth2Authorization, + CreateWorkflowDtoCredentialsItem_Groq, + CreateWorkflowDtoCredentialsItem_Hume, + CreateWorkflowDtoCredentialsItem_InflectionAi, + CreateWorkflowDtoCredentialsItem_Inworld, + CreateWorkflowDtoCredentialsItem_Langfuse, + CreateWorkflowDtoCredentialsItem_Lmnt, + CreateWorkflowDtoCredentialsItem_Make, + CreateWorkflowDtoCredentialsItem_Minimax, + CreateWorkflowDtoCredentialsItem_Mistral, + CreateWorkflowDtoCredentialsItem_Neuphonic, + CreateWorkflowDtoCredentialsItem_Openai, + CreateWorkflowDtoCredentialsItem_Openrouter, + CreateWorkflowDtoCredentialsItem_PerplexityAi, + CreateWorkflowDtoCredentialsItem_Playht, + CreateWorkflowDtoCredentialsItem_RimeAi, + CreateWorkflowDtoCredentialsItem_Runpod, + CreateWorkflowDtoCredentialsItem_S3, + CreateWorkflowDtoCredentialsItem_SlackOauth2Authorization, + CreateWorkflowDtoCredentialsItem_SlackWebhook, + CreateWorkflowDtoCredentialsItem_SmallestAi, + CreateWorkflowDtoCredentialsItem_Soniox, + CreateWorkflowDtoCredentialsItem_Speechmatics, + CreateWorkflowDtoCredentialsItem_Supabase, + CreateWorkflowDtoCredentialsItem_Tavus, + CreateWorkflowDtoCredentialsItem_TogetherAi, + CreateWorkflowDtoCredentialsItem_Trieve, + CreateWorkflowDtoCredentialsItem_Twilio, + CreateWorkflowDtoCredentialsItem_Vonage, + CreateWorkflowDtoCredentialsItem_Webhook, + CreateWorkflowDtoCredentialsItem_Wellsaid, + CreateWorkflowDtoCredentialsItem_Xai, + CreateWorkflowDtoHooksItem, + CreateWorkflowDtoModel, + CreateWorkflowDtoModel_Anthropic, + CreateWorkflowDtoModel_AnthropicBedrock, + CreateWorkflowDtoModel_CustomLlm, + CreateWorkflowDtoModel_Google, + CreateWorkflowDtoModel_Openai, + CreateWorkflowDtoNodesItem, + CreateWorkflowDtoNodesItem_Conversation, + CreateWorkflowDtoNodesItem_Tool, + CreateWorkflowDtoTranscriber, + CreateWorkflowDtoTranscriber_11Labs, + CreateWorkflowDtoTranscriber_AssemblyAi, + CreateWorkflowDtoTranscriber_Azure, + CreateWorkflowDtoTranscriber_Cartesia, + CreateWorkflowDtoTranscriber_CustomTranscriber, + CreateWorkflowDtoTranscriber_Deepgram, + CreateWorkflowDtoTranscriber_Gladia, + CreateWorkflowDtoTranscriber_Google, + CreateWorkflowDtoTranscriber_Openai, + CreateWorkflowDtoTranscriber_Soniox, + CreateWorkflowDtoTranscriber_Speechmatics, + CreateWorkflowDtoTranscriber_Talkscriber, + CreateWorkflowDtoVoice, + CreateWorkflowDtoVoice_11Labs, + CreateWorkflowDtoVoice_Azure, + CreateWorkflowDtoVoice_Cartesia, + CreateWorkflowDtoVoice_CustomVoice, + CreateWorkflowDtoVoice_Deepgram, + CreateWorkflowDtoVoice_Hume, + CreateWorkflowDtoVoice_Inworld, + CreateWorkflowDtoVoice_Lmnt, + CreateWorkflowDtoVoice_Minimax, + CreateWorkflowDtoVoice_Neuphonic, + CreateWorkflowDtoVoice_Openai, + CreateWorkflowDtoVoice_Playht, + CreateWorkflowDtoVoice_RimeAi, + CreateWorkflowDtoVoice_Sesame, + CreateWorkflowDtoVoice_SmallestAi, + CreateWorkflowDtoVoice_Tavus, + CreateWorkflowDtoVoice_Vapi, + CreateWorkflowDtoVoice_Wellsaid, + CreateWorkflowDtoVoicemailDetection, + CreateWorkflowDtoVoicemailDetectionZero, + CreateXAiCredentialDto, + CredentialActionRequest, + CredentialEndUser, + CredentialSessionError, + CredentialSessionResponse, + CredentialWebhookDto, + CredentialWebhookDtoAuthMode, + CredentialWebhookDtoOperation, + CredentialWebhookDtoType, + CustomCredential, + CustomCredentialAuthenticationPlan, + CustomCredentialAuthenticationPlan_Bearer, + CustomCredentialAuthenticationPlan_Hmac, + CustomCredentialAuthenticationPlan_Oauth2, + CustomCredentialEncryptionPlan, + CustomCredentialEncryptionPlan_PublicKey, + CustomCredentialProvider, + CustomEndpointingModelSmartEndpointingPlan, + CustomEndpointingModelSmartEndpointingPlanProvider, + CustomKnowledgeBase, + CustomKnowledgeBaseProvider, + CustomLlmCredential, + CustomLlmCredentialProvider, + CustomLlmModel, + CustomLlmModelMetadataSendMode, + CustomLlmModelToolsItem, + CustomLlmModelToolsItem_ApiRequest, + CustomLlmModelToolsItem_Bash, + CustomLlmModelToolsItem_Code, + CustomLlmModelToolsItem_Computer, + CustomLlmModelToolsItem_Dtmf, + CustomLlmModelToolsItem_EndCall, + CustomLlmModelToolsItem_Function, + CustomLlmModelToolsItem_GohighlevelCalendarAvailabilityCheck, + CustomLlmModelToolsItem_GohighlevelCalendarEventCreate, + CustomLlmModelToolsItem_GohighlevelContactCreate, + CustomLlmModelToolsItem_GohighlevelContactGet, + CustomLlmModelToolsItem_GoogleCalendarAvailabilityCheck, + CustomLlmModelToolsItem_GoogleCalendarEventCreate, + CustomLlmModelToolsItem_GoogleSheetsRowAppend, + CustomLlmModelToolsItem_Handoff, + CustomLlmModelToolsItem_Mcp, + CustomLlmModelToolsItem_Query, + CustomLlmModelToolsItem_SipRequest, + CustomLlmModelToolsItem_SlackMessageSend, + CustomLlmModelToolsItem_Sms, + CustomLlmModelToolsItem_TextEditor, + CustomLlmModelToolsItem_TransferCall, + CustomLlmModelToolsItem_Voicemail, + CustomMessage, + CustomMessageType, + CustomTranscriber, + CustomVoice, + CustomerCustomEndpointingRule, + CustomerSpeechTimeoutOptions, + DeepInfraCredential, + DeepInfraCredentialProvider, + DeepInfraModel, + DeepInfraModelToolsItem, + DeepInfraModelToolsItem_ApiRequest, + DeepInfraModelToolsItem_Bash, + DeepInfraModelToolsItem_Code, + DeepInfraModelToolsItem_Computer, + DeepInfraModelToolsItem_Dtmf, + DeepInfraModelToolsItem_EndCall, + DeepInfraModelToolsItem_Function, + DeepInfraModelToolsItem_GohighlevelCalendarAvailabilityCheck, + DeepInfraModelToolsItem_GohighlevelCalendarEventCreate, + DeepInfraModelToolsItem_GohighlevelContactCreate, + DeepInfraModelToolsItem_GohighlevelContactGet, + DeepInfraModelToolsItem_GoogleCalendarAvailabilityCheck, + DeepInfraModelToolsItem_GoogleCalendarEventCreate, + DeepInfraModelToolsItem_GoogleSheetsRowAppend, + DeepInfraModelToolsItem_Handoff, + DeepInfraModelToolsItem_Mcp, + DeepInfraModelToolsItem_Query, + DeepInfraModelToolsItem_SipRequest, + DeepInfraModelToolsItem_SlackMessageSend, + DeepInfraModelToolsItem_Sms, + DeepInfraModelToolsItem_TextEditor, + DeepInfraModelToolsItem_TransferCall, + DeepInfraModelToolsItem_Voicemail, + DeepSeekCredential, + DeepSeekCredentialProvider, + DeepSeekModel, + DeepSeekModelModel, + DeepSeekModelToolsItem, + DeepSeekModelToolsItem_ApiRequest, + DeepSeekModelToolsItem_Bash, + DeepSeekModelToolsItem_Code, + DeepSeekModelToolsItem_Computer, + DeepSeekModelToolsItem_Dtmf, + DeepSeekModelToolsItem_EndCall, + DeepSeekModelToolsItem_Function, + DeepSeekModelToolsItem_GohighlevelCalendarAvailabilityCheck, + DeepSeekModelToolsItem_GohighlevelCalendarEventCreate, + DeepSeekModelToolsItem_GohighlevelContactCreate, + DeepSeekModelToolsItem_GohighlevelContactGet, + DeepSeekModelToolsItem_GoogleCalendarAvailabilityCheck, + DeepSeekModelToolsItem_GoogleCalendarEventCreate, + DeepSeekModelToolsItem_GoogleSheetsRowAppend, + DeepSeekModelToolsItem_Handoff, + DeepSeekModelToolsItem_Mcp, + DeepSeekModelToolsItem_Query, + DeepSeekModelToolsItem_SipRequest, + DeepSeekModelToolsItem_SlackMessageSend, + DeepSeekModelToolsItem_Sms, + DeepSeekModelToolsItem_TextEditor, + DeepSeekModelToolsItem_TransferCall, + DeepSeekModelToolsItem_Voicemail, + DeepgramCredential, + DeepgramCredentialProvider, + DeepgramTranscriber, + DeepgramTranscriberLanguage, + DeepgramTranscriberModel, + DeepgramVoice, + DeepgramVoiceId, + DeepgramVoiceModel, + DeveloperMessage, + DeveloperMessageRole, + DialPlanEntry, + DtmfTool, + DtmfToolMessagesItem, + DtmfToolMessagesItem_RequestComplete, + DtmfToolMessagesItem_RequestFailed, + DtmfToolMessagesItem_RequestResponseDelayed, + DtmfToolMessagesItem_RequestStart, + Edge, + ElevenLabsCredential, + ElevenLabsPronunciationDictionary, + ElevenLabsPronunciationDictionaryLocator, + ElevenLabsPronunciationDictionaryPermissionOnResource, + ElevenLabsTranscriber, + ElevenLabsTranscriberLanguage, + ElevenLabsTranscriberModel, + ElevenLabsVoice, + ElevenLabsVoiceId, + ElevenLabsVoiceIdEnum, + ElevenLabsVoiceModel, + EmailCredential, + EmailCredentialProvider, + EndCallTool, + EndCallToolMessagesItem, + EndCallToolMessagesItem_RequestComplete, + EndCallToolMessagesItem_RequestFailed, + EndCallToolMessagesItem_RequestResponseDelayed, + EndCallToolMessagesItem_RequestStart, + EndpointedSpeechLowConfidenceOptions, + Eval, + EvalAnthropicModel, + EvalAnthropicModelModel, + EvalCustomModel, + EvalGoogleModel, + EvalGoogleModelModel, + EvalGroqModel, + EvalGroqModelModel, + EvalGroqModelProvider, + EvalMessagesItem, + EvalModelListOptions, + EvalModelListOptionsProvider, + EvalOpenAiModel, + EvalOpenAiModelModel, + EvalPaginatedResponse, + EvalRun, + EvalRunEndedReason, + EvalRunPaginatedResponse, + EvalRunResult, + EvalRunResultMessagesItem, + EvalRunResultMessagesItem_Assistant, + EvalRunResultMessagesItem_System, + EvalRunResultMessagesItem_Tool, + EvalRunResultMessagesItem_User, + EvalRunResultStatus, + EvalRunStatus, + EvalRunTarget, + EvalRunTargetAssistant, + EvalRunTargetSquad, + EvalRunTarget_Assistant, + EvalRunTarget_Squad, + EvalRunType, + EvalType, + EvalUserEditable, + EvalUserEditableMessagesItem, + EvalUserEditableType, + EvaluationPlanItem, + EvaluationPlanItemComparator, + EvaluationPlanItemValue, + EventsTableBooleanCondition, + EventsTableBooleanConditionOperator, + EventsTableNumberCondition, + EventsTableNumberConditionOperator, + EventsTableStringCondition, + EventsTableStringConditionOperator, + ExactReplacement, + ExportChatDto, + ExportChatDtoColumns, + ExportChatDtoFormat, + ExportChatDtoSortOrder, + ExportSessionDto, + ExportSessionDtoColumns, + ExportSessionDtoFormat, + ExportSessionDtoSortOrder, + FailedEdgeCondition, + FallbackAssemblyAiTranscriber, + FallbackAssemblyAiTranscriberLanguage, + FallbackAssemblyAiTranscriberSpeechModel, + FallbackAzureSpeechTranscriber, + FallbackAzureSpeechTranscriberLanguage, + FallbackAzureSpeechTranscriberSegmentationStrategy, + FallbackAzureVoice, + FallbackAzureVoiceId, + FallbackAzureVoiceIdZero, + FallbackCartesiaTranscriber, + FallbackCartesiaTranscriberLanguage, + FallbackCartesiaTranscriberModel, + FallbackCartesiaVoice, + FallbackCartesiaVoiceLanguage, + FallbackCartesiaVoiceModel, + FallbackCustomTranscriber, + FallbackCustomVoice, + FallbackDeepgramTranscriber, + FallbackDeepgramTranscriberLanguage, + FallbackDeepgramTranscriberModel, + FallbackDeepgramVoice, + FallbackDeepgramVoiceId, + FallbackDeepgramVoiceModel, + FallbackElevenLabsTranscriber, + FallbackElevenLabsTranscriberLanguage, + FallbackElevenLabsTranscriberModel, + FallbackElevenLabsVoice, + FallbackElevenLabsVoiceId, + FallbackElevenLabsVoiceIdEnum, + FallbackElevenLabsVoiceModel, + FallbackGladiaTranscriber, + FallbackGladiaTranscriberLanguage, + FallbackGladiaTranscriberLanguageBehaviour, + FallbackGladiaTranscriberLanguages, + FallbackGladiaTranscriberModel, + FallbackGladiaTranscriberRegion, + FallbackGoogleTranscriber, + FallbackGoogleTranscriberLanguage, + FallbackGoogleTranscriberModel, + FallbackHumeVoice, + FallbackHumeVoiceModel, + FallbackInworldVoice, + FallbackInworldVoiceLanguageCode, + FallbackInworldVoiceModel, + FallbackInworldVoiceVoiceId, + FallbackLmntVoice, + FallbackLmntVoiceId, + FallbackLmntVoiceIdEnum, + FallbackLmntVoiceLanguage, + FallbackMinimaxVoice, + FallbackMinimaxVoiceLanguageBoost, + FallbackMinimaxVoiceModel, + FallbackMinimaxVoiceProvider, + FallbackMinimaxVoiceRegion, + FallbackMinimaxVoiceSubtitleType, + FallbackNeetsVoice, + FallbackNeuphonicVoice, + FallbackNeuphonicVoiceModel, + FallbackOpenAiTranscriber, + FallbackOpenAiTranscriberLanguage, + FallbackOpenAiTranscriberModel, + FallbackOpenAiVoice, + FallbackOpenAiVoiceId, + FallbackOpenAiVoiceIdEnum, + FallbackOpenAiVoiceModel, + FallbackPlan, + FallbackPlanVoicesItem, + FallbackPlanVoicesItem_11Labs, + FallbackPlanVoicesItem_Azure, + FallbackPlanVoicesItem_Cartesia, + FallbackPlanVoicesItem_CustomVoice, + FallbackPlanVoicesItem_Deepgram, + FallbackPlanVoicesItem_Hume, + FallbackPlanVoicesItem_Inworld, + FallbackPlanVoicesItem_Lmnt, + FallbackPlanVoicesItem_Neuphonic, + FallbackPlanVoicesItem_Openai, + FallbackPlanVoicesItem_Playht, + FallbackPlanVoicesItem_RimeAi, + FallbackPlanVoicesItem_Sesame, + FallbackPlanVoicesItem_SmallestAi, + FallbackPlanVoicesItem_Tavus, + FallbackPlanVoicesItem_Vapi, + FallbackPlanVoicesItem_Wellsaid, + FallbackPlayHtVoice, + FallbackPlayHtVoiceEmotion, + FallbackPlayHtVoiceId, + FallbackPlayHtVoiceIdEnum, + FallbackPlayHtVoiceLanguage, + FallbackPlayHtVoiceModel, + FallbackRimeAiVoice, + FallbackRimeAiVoiceId, + FallbackRimeAiVoiceIdEnum, + FallbackRimeAiVoiceLanguage, + FallbackRimeAiVoiceModel, + FallbackSesameVoice, + FallbackSesameVoiceModel, + FallbackSmallestAiVoice, + FallbackSmallestAiVoiceId, + FallbackSmallestAiVoiceIdEnum, + FallbackSmallestAiVoiceModel, + FallbackSonioxTranscriber, + FallbackSonioxTranscriberLanguage, + FallbackSonioxTranscriberModel, + FallbackSpeechmaticsTranscriber, + FallbackSpeechmaticsTranscriberLanguage, + FallbackSpeechmaticsTranscriberModel, + FallbackSpeechmaticsTranscriberNumeralStyle, + FallbackSpeechmaticsTranscriberOperatingPoint, + FallbackSpeechmaticsTranscriberRegion, + FallbackTalkscriberTranscriber, + FallbackTalkscriberTranscriberLanguage, + FallbackTalkscriberTranscriberModel, + FallbackTavusVoice, + FallbackTavusVoiceVoiceId, + FallbackTavusVoiceVoiceIdZero, + FallbackTranscriberPlan, + FallbackTranscriberPlanTranscribersItem, + FallbackTranscriberPlanTranscribersItem_11Labs, + FallbackTranscriberPlanTranscribersItem_AssemblyAi, + FallbackTranscriberPlanTranscribersItem_Azure, + FallbackTranscriberPlanTranscribersItem_Cartesia, + FallbackTranscriberPlanTranscribersItem_CustomTranscriber, + FallbackTranscriberPlanTranscribersItem_Deepgram, + FallbackTranscriberPlanTranscribersItem_Gladia, + FallbackTranscriberPlanTranscribersItem_Google, + FallbackTranscriberPlanTranscribersItem_Openai, + FallbackTranscriberPlanTranscribersItem_Soniox, + FallbackTranscriberPlanTranscribersItem_Speechmatics, + FallbackTranscriberPlanTranscribersItem_Talkscriber, + FallbackVapiVoice, + FallbackVapiVoiceVoiceId, + FallbackWellSaidVoice, + FallbackWellSaidVoiceModel, + File, + FileObject, + FileStatus, + FilterDateTypeColumnOnCallTable, + FilterDateTypeColumnOnCallTableColumn, + FilterDateTypeColumnOnCallTableOperator, + FilterNumberArrayTypeColumnOnCallTable, + FilterNumberArrayTypeColumnOnCallTableColumn, + FilterNumberArrayTypeColumnOnCallTableOperator, + FilterNumberTypeColumnOnCallTable, + FilterNumberTypeColumnOnCallTableColumn, + FilterNumberTypeColumnOnCallTableOperator, + FilterStringArrayTypeColumnOnCallTable, + FilterStringArrayTypeColumnOnCallTableColumn, + FilterStringArrayTypeColumnOnCallTableOperator, + FilterStringTypeColumnOnCallTable, + FilterStringTypeColumnOnCallTableColumn, + FilterStringTypeColumnOnCallTableOperator, + FilterStructuredOutputColumnOnCallTable, + FilterStructuredOutputColumnOnCallTableColumn, + FilterStructuredOutputColumnOnCallTableOperator, + FormatPlan, + FormatPlanFormattersEnabledItem, + FormatPlanReplacementsItem, + FormatPlanReplacementsItem_Exact, + FormatPlanReplacementsItem_Regex, + FourierDenoisingPlan, + FunctionCall, + FunctionCallAssistantHookAction, + FunctionCallHookAction, + FunctionCallHookActionMessagesItem, + FunctionCallHookActionMessagesItem_RequestComplete, + FunctionCallHookActionMessagesItem_RequestFailed, + FunctionCallHookActionMessagesItem_RequestResponseDelayed, + FunctionCallHookActionMessagesItem_RequestStart, + FunctionCallHookActionType, + FunctionTool, + FunctionToolMessagesItem, + FunctionToolMessagesItem_RequestComplete, + FunctionToolMessagesItem_RequestFailed, + FunctionToolMessagesItem_RequestResponseDelayed, + FunctionToolMessagesItem_RequestStart, + FunctionToolProviderDetails, + FunctionToolWithToolCall, + FunctionToolWithToolCallMessagesItem, + FunctionToolWithToolCallMessagesItem_RequestComplete, + FunctionToolWithToolCallMessagesItem_RequestFailed, + FunctionToolWithToolCallMessagesItem_RequestResponseDelayed, + FunctionToolWithToolCallMessagesItem_RequestStart, + GcpCredential, + GcpCredentialProvider, + GcpKey, + GeminiMultimodalLivePrebuiltVoiceConfig, + GeminiMultimodalLivePrebuiltVoiceConfigVoiceName, + GeminiMultimodalLiveSpeechConfig, + GeminiMultimodalLiveVoiceConfig, + GenerateScenariosDto, + GenerateScenariosResponse, + GeneratedScenario, + GeneratedScenarioCategory, + GetChatPaginatedDto, + GetChatPaginatedDtoSortOrder, + GetEvalPaginatedDto, + GetEvalPaginatedDtoSortOrder, + GetEvalRunPaginatedDto, + GetEvalRunPaginatedDtoSortOrder, + GetSessionPaginatedDto, + GetSessionPaginatedDtoSortOrder, + GhlTool, + GhlToolMessagesItem, + GhlToolMessagesItem_RequestComplete, + GhlToolMessagesItem_RequestFailed, + GhlToolMessagesItem_RequestResponseDelayed, + GhlToolMessagesItem_RequestStart, + GhlToolMetadata, + GhlToolProviderDetails, + GhlToolType, + GhlToolWithToolCall, + GhlToolWithToolCallMessagesItem, + GhlToolWithToolCallMessagesItem_RequestComplete, + GhlToolWithToolCallMessagesItem_RequestFailed, + GhlToolWithToolCallMessagesItem_RequestResponseDelayed, + GhlToolWithToolCallMessagesItem_RequestStart, + GladiaCredential, + GladiaCredentialProvider, + GladiaCustomVocabularyConfigDto, + GladiaCustomVocabularyConfigDtoVocabularyItem, + GladiaTranscriber, + GladiaTranscriberLanguage, + GladiaTranscriberLanguageBehaviour, + GladiaTranscriberLanguages, + GladiaTranscriberModel, + GladiaTranscriberRegion, + GladiaVocabularyItemDto, + GlobalNodePlan, + GoHighLevelCalendarAvailabilityTool, + GoHighLevelCalendarAvailabilityToolMessagesItem, + GoHighLevelCalendarAvailabilityToolMessagesItem_RequestComplete, + GoHighLevelCalendarAvailabilityToolMessagesItem_RequestFailed, + GoHighLevelCalendarAvailabilityToolMessagesItem_RequestResponseDelayed, + GoHighLevelCalendarAvailabilityToolMessagesItem_RequestStart, + GoHighLevelCalendarAvailabilityToolProviderDetails, + GoHighLevelCalendarAvailabilityToolWithToolCall, + GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem, + GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem_RequestComplete, + GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem_RequestFailed, + GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem_RequestResponseDelayed, + GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem_RequestStart, + GoHighLevelCalendarAvailabilityToolWithToolCallType, + GoHighLevelCalendarEventCreateTool, + GoHighLevelCalendarEventCreateToolMessagesItem, + GoHighLevelCalendarEventCreateToolMessagesItem_RequestComplete, + GoHighLevelCalendarEventCreateToolMessagesItem_RequestFailed, + GoHighLevelCalendarEventCreateToolMessagesItem_RequestResponseDelayed, + GoHighLevelCalendarEventCreateToolMessagesItem_RequestStart, + GoHighLevelCalendarEventCreateToolProviderDetails, + GoHighLevelCalendarEventCreateToolWithToolCall, + GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem, + GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem_RequestComplete, + GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem_RequestFailed, + GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem_RequestResponseDelayed, + GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem_RequestStart, + GoHighLevelCalendarEventCreateToolWithToolCallType, + GoHighLevelContactCreateTool, + GoHighLevelContactCreateToolMessagesItem, + GoHighLevelContactCreateToolMessagesItem_RequestComplete, + GoHighLevelContactCreateToolMessagesItem_RequestFailed, + GoHighLevelContactCreateToolMessagesItem_RequestResponseDelayed, + GoHighLevelContactCreateToolMessagesItem_RequestStart, + GoHighLevelContactCreateToolProviderDetails, + GoHighLevelContactCreateToolWithToolCall, + GoHighLevelContactCreateToolWithToolCallMessagesItem, + GoHighLevelContactCreateToolWithToolCallMessagesItem_RequestComplete, + GoHighLevelContactCreateToolWithToolCallMessagesItem_RequestFailed, + GoHighLevelContactCreateToolWithToolCallMessagesItem_RequestResponseDelayed, + GoHighLevelContactCreateToolWithToolCallMessagesItem_RequestStart, + GoHighLevelContactCreateToolWithToolCallType, + GoHighLevelContactGetTool, + GoHighLevelContactGetToolMessagesItem, + GoHighLevelContactGetToolMessagesItem_RequestComplete, + GoHighLevelContactGetToolMessagesItem_RequestFailed, + GoHighLevelContactGetToolMessagesItem_RequestResponseDelayed, + GoHighLevelContactGetToolMessagesItem_RequestStart, + GoHighLevelContactGetToolProviderDetails, + GoHighLevelContactGetToolWithToolCall, + GoHighLevelContactGetToolWithToolCallMessagesItem, + GoHighLevelContactGetToolWithToolCallMessagesItem_RequestComplete, + GoHighLevelContactGetToolWithToolCallMessagesItem_RequestFailed, + GoHighLevelContactGetToolWithToolCallMessagesItem_RequestResponseDelayed, + GoHighLevelContactGetToolWithToolCallMessagesItem_RequestStart, + GoHighLevelContactGetToolWithToolCallType, + GoHighLevelCredential, + GoHighLevelCredentialProvider, + GoHighLevelMcpCredential, + GoHighLevelMcpCredentialProvider, + GoogleCalendarCheckAvailabilityTool, + GoogleCalendarCheckAvailabilityToolMessagesItem, + GoogleCalendarCheckAvailabilityToolMessagesItem_RequestComplete, + GoogleCalendarCheckAvailabilityToolMessagesItem_RequestFailed, + GoogleCalendarCheckAvailabilityToolMessagesItem_RequestResponseDelayed, + GoogleCalendarCheckAvailabilityToolMessagesItem_RequestStart, + GoogleCalendarCreateEventTool, + GoogleCalendarCreateEventToolMessagesItem, + GoogleCalendarCreateEventToolMessagesItem_RequestComplete, + GoogleCalendarCreateEventToolMessagesItem_RequestFailed, + GoogleCalendarCreateEventToolMessagesItem_RequestResponseDelayed, + GoogleCalendarCreateEventToolMessagesItem_RequestStart, + GoogleCalendarCreateEventToolProviderDetails, + GoogleCalendarCreateEventToolWithToolCall, + GoogleCalendarCreateEventToolWithToolCallMessagesItem, + GoogleCalendarCreateEventToolWithToolCallMessagesItem_RequestComplete, + GoogleCalendarCreateEventToolWithToolCallMessagesItem_RequestFailed, + GoogleCalendarCreateEventToolWithToolCallMessagesItem_RequestResponseDelayed, + GoogleCalendarCreateEventToolWithToolCallMessagesItem_RequestStart, + GoogleCalendarOAuth2AuthorizationCredential, + GoogleCalendarOAuth2AuthorizationCredentialProvider, + GoogleCalendarOAuth2ClientCredential, + GoogleCalendarOAuth2ClientCredentialProvider, + GoogleCredential, + GoogleCredentialProvider, + GoogleModel, + GoogleModelModel, + GoogleModelToolsItem, + GoogleModelToolsItem_ApiRequest, + GoogleModelToolsItem_Bash, + GoogleModelToolsItem_Code, + GoogleModelToolsItem_Computer, + GoogleModelToolsItem_Dtmf, + GoogleModelToolsItem_EndCall, + GoogleModelToolsItem_Function, + GoogleModelToolsItem_GohighlevelCalendarAvailabilityCheck, + GoogleModelToolsItem_GohighlevelCalendarEventCreate, + GoogleModelToolsItem_GohighlevelContactCreate, + GoogleModelToolsItem_GohighlevelContactGet, + GoogleModelToolsItem_GoogleCalendarAvailabilityCheck, + GoogleModelToolsItem_GoogleCalendarEventCreate, + GoogleModelToolsItem_GoogleSheetsRowAppend, + GoogleModelToolsItem_Handoff, + GoogleModelToolsItem_Mcp, + GoogleModelToolsItem_Query, + GoogleModelToolsItem_SipRequest, + GoogleModelToolsItem_SlackMessageSend, + GoogleModelToolsItem_Sms, + GoogleModelToolsItem_TextEditor, + GoogleModelToolsItem_TransferCall, + GoogleModelToolsItem_Voicemail, + GoogleRealtimeConfig, + GoogleSheetsOAuth2AuthorizationCredential, + GoogleSheetsOAuth2AuthorizationCredentialProvider, + GoogleSheetsRowAppendTool, + GoogleSheetsRowAppendToolMessagesItem, + GoogleSheetsRowAppendToolMessagesItem_RequestComplete, + GoogleSheetsRowAppendToolMessagesItem_RequestFailed, + GoogleSheetsRowAppendToolMessagesItem_RequestResponseDelayed, + GoogleSheetsRowAppendToolMessagesItem_RequestStart, + GoogleSheetsRowAppendToolProviderDetails, + GoogleSheetsRowAppendToolWithToolCall, + GoogleSheetsRowAppendToolWithToolCallMessagesItem, + GoogleSheetsRowAppendToolWithToolCallMessagesItem_RequestComplete, + GoogleSheetsRowAppendToolWithToolCallMessagesItem_RequestFailed, + GoogleSheetsRowAppendToolWithToolCallMessagesItem_RequestResponseDelayed, + GoogleSheetsRowAppendToolWithToolCallMessagesItem_RequestStart, + GoogleSheetsRowAppendToolWithToolCallType, + GoogleTranscriber, + GoogleTranscriberLanguage, + GoogleTranscriberModel, + GoogleVoicemailDetectionPlan, + GoogleVoicemailDetectionPlanProvider, + GoogleVoicemailDetectionPlanType, + GroqCredential, + GroqCredentialProvider, + GroqModel, + GroqModelModel, + GroqModelToolsItem, + GroqModelToolsItem_ApiRequest, + GroqModelToolsItem_Bash, + GroqModelToolsItem_Code, + GroqModelToolsItem_Computer, + GroqModelToolsItem_Dtmf, + GroqModelToolsItem_EndCall, + GroqModelToolsItem_Function, + GroqModelToolsItem_GohighlevelCalendarAvailabilityCheck, + GroqModelToolsItem_GohighlevelCalendarEventCreate, + GroqModelToolsItem_GohighlevelContactCreate, + GroqModelToolsItem_GohighlevelContactGet, + GroqModelToolsItem_GoogleCalendarAvailabilityCheck, + GroqModelToolsItem_GoogleCalendarEventCreate, + GroqModelToolsItem_GoogleSheetsRowAppend, + GroqModelToolsItem_Handoff, + GroqModelToolsItem_Mcp, + GroqModelToolsItem_Query, + GroqModelToolsItem_SipRequest, + GroqModelToolsItem_SlackMessageSend, + GroqModelToolsItem_Sms, + GroqModelToolsItem_TextEditor, + GroqModelToolsItem_TransferCall, + GroqModelToolsItem_Voicemail, + GroupCondition, + GroupConditionConditionsItem, + GroupConditionConditionsItem_Group, + GroupConditionConditionsItem_Liquid, + GroupConditionConditionsItem_Regex, + GroupConditionOperator, + HandoffDestinationAssistant, + HandoffDestinationAssistantContextEngineeringPlan, + HandoffDestinationAssistantContextEngineeringPlan_All, + HandoffDestinationAssistantContextEngineeringPlan_LastNMessages, + HandoffDestinationAssistantContextEngineeringPlan_None, + HandoffDestinationAssistantContextEngineeringPlan_UserAndAssistantMessages, + HandoffDestinationAssistantType, + HandoffDestinationDynamic, + HandoffDestinationSquad, + HandoffDestinationSquadContextEngineeringPlan, + HandoffDestinationSquadContextEngineeringPlan_All, + HandoffDestinationSquadContextEngineeringPlan_LastNMessages, + HandoffDestinationSquadContextEngineeringPlan_None, + HandoffDestinationSquadContextEngineeringPlan_UserAndAssistantMessages, + HandoffTool, + HandoffToolDestinationsItem, + HandoffToolDestinationsItem_Assistant, + HandoffToolDestinationsItem_Dynamic, + HandoffToolDestinationsItem_Squad, + HandoffToolMessagesItem, + HandoffToolMessagesItem_RequestComplete, + HandoffToolMessagesItem_RequestFailed, + HandoffToolMessagesItem_RequestResponseDelayed, + HandoffToolMessagesItem_RequestStart, + HangupNode, + HangupNodeType, + HmacAuthenticationPlan, + HmacAuthenticationPlanAlgorithm, + HmacAuthenticationPlanSignatureEncoding, + HumeCredential, + HumeCredentialProvider, + HumeVoice, + HumeVoiceModel, + ImportTwilioPhoneNumberDto, + ImportTwilioPhoneNumberDtoFallbackDestination, + ImportTwilioPhoneNumberDtoFallbackDestination_Number, + ImportTwilioPhoneNumberDtoFallbackDestination_Sip, + ImportTwilioPhoneNumberDtoHooksItem, + ImportTwilioPhoneNumberDtoHooksItem_CallEnding, + ImportTwilioPhoneNumberDtoHooksItem_CallRinging, + ImportVonagePhoneNumberDto, + ImportVonagePhoneNumberDtoFallbackDestination, + ImportVonagePhoneNumberDtoFallbackDestination_Number, + ImportVonagePhoneNumberDtoFallbackDestination_Sip, + ImportVonagePhoneNumberDtoHooksItem, + ImportVonagePhoneNumberDtoHooksItem_CallEnding, + ImportVonagePhoneNumberDtoHooksItem_CallRinging, + InflectionAiCredential, + InflectionAiCredentialProvider, + InflectionAiModel, + InflectionAiModelModel, + InflectionAiModelToolsItem, + InflectionAiModelToolsItem_ApiRequest, + InflectionAiModelToolsItem_Bash, + InflectionAiModelToolsItem_Code, + InflectionAiModelToolsItem_Computer, + InflectionAiModelToolsItem_Dtmf, + InflectionAiModelToolsItem_EndCall, + InflectionAiModelToolsItem_Function, + InflectionAiModelToolsItem_GohighlevelCalendarAvailabilityCheck, + InflectionAiModelToolsItem_GohighlevelCalendarEventCreate, + InflectionAiModelToolsItem_GohighlevelContactCreate, + InflectionAiModelToolsItem_GohighlevelContactGet, + InflectionAiModelToolsItem_GoogleCalendarAvailabilityCheck, + InflectionAiModelToolsItem_GoogleCalendarEventCreate, + InflectionAiModelToolsItem_GoogleSheetsRowAppend, + InflectionAiModelToolsItem_Handoff, + InflectionAiModelToolsItem_Mcp, + InflectionAiModelToolsItem_Query, + InflectionAiModelToolsItem_SipRequest, + InflectionAiModelToolsItem_SlackMessageSend, + InflectionAiModelToolsItem_Sms, + InflectionAiModelToolsItem_TextEditor, + InflectionAiModelToolsItem_TransferCall, + InflectionAiModelToolsItem_Voicemail, + Insight, + InsightFormula, + InsightPaginatedResponse, + InsightRunFormatPlan, + InsightRunFormatPlanFormat, + InsightRunResponse, + InsightTimeRange, + InsightTimeRangeWithStep, + InsightTimeRangeWithStepStep, + InsightType, + InviteUserDto, + InviteUserDtoRole, + InvoicePlan, + InworldCredential, + InworldCredentialProvider, + InworldVoice, + InworldVoiceLanguageCode, + InworldVoiceModel, + InworldVoiceVoiceId, + JsonQueryOnCallTableWithNumberTypeColumn, + JsonQueryOnCallTableWithNumberTypeColumnColumn, + JsonQueryOnCallTableWithNumberTypeColumnFiltersItem, + JsonQueryOnCallTableWithNumberTypeColumnOperation, + JsonQueryOnCallTableWithNumberTypeColumnTable, + JsonQueryOnCallTableWithNumberTypeColumnType, + JsonQueryOnCallTableWithStringTypeColumn, + JsonQueryOnCallTableWithStringTypeColumnColumn, + JsonQueryOnCallTableWithStringTypeColumnFiltersItem, + JsonQueryOnCallTableWithStringTypeColumnOperation, + JsonQueryOnCallTableWithStringTypeColumnTable, + JsonQueryOnCallTableWithStringTypeColumnType, + JsonQueryOnCallTableWithStructuredOutputColumn, + JsonQueryOnCallTableWithStructuredOutputColumnColumn, + JsonQueryOnCallTableWithStructuredOutputColumnFiltersItem, + JsonQueryOnCallTableWithStructuredOutputColumnOperation, + JsonQueryOnCallTableWithStructuredOutputColumnTable, + JsonQueryOnCallTableWithStructuredOutputColumnType, + JsonQueryOnEventsTable, + JsonQueryOnEventsTableFiltersItem, + JsonQueryOnEventsTableOn, + JsonQueryOnEventsTableOperation, + JsonQueryOnEventsTableTable, + JsonQueryOnEventsTableType, + JsonSchema, + JsonSchemaFormat, + JsonSchemaType, + JwtResponse, + KeypadInputPlan, + KeypadInputPlanDelimiters, + KnowledgeBase, + KnowledgeBaseCost, + KnowledgeBaseModel, + KnowledgeBaseProvider, + KnowledgeBaseResponseDocument, + LangfuseCredential, + LangfuseCredentialProvider, + LangfuseObservabilityPlan, + LangfuseObservabilityPlanProvider, + LatencyMetrics, + LineInsight, + LineInsightFromCallTable, + LineInsightFromCallTableGroupBy, + LineInsightFromCallTableQueriesItem, + LineInsightFromCallTableType, + LineInsightGroupBy, + LineInsightMetadata, + LineInsightQueriesItem, + LiquidCondition, + LivekitSmartEndpointingPlan, + LivekitSmartEndpointingPlanProvider, + LmntCredential, + LmntCredentialProvider, + LmntVoice, + LmntVoiceId, + LmntVoiceIdEnum, + LmntVoiceLanguage, + LogicEdgeCondition, + MakeCredential, + MakeCredentialProvider, + MakeTool, + MakeToolMessagesItem, + MakeToolMessagesItem_RequestComplete, + MakeToolMessagesItem_RequestFailed, + MakeToolMessagesItem_RequestResponseDelayed, + MakeToolMessagesItem_RequestStart, + MakeToolMetadata, + MakeToolProviderDetails, + MakeToolType, + MakeToolWithToolCall, + MakeToolWithToolCallMessagesItem, + MakeToolWithToolCallMessagesItem_RequestComplete, + MakeToolWithToolCallMessagesItem_RequestFailed, + MakeToolWithToolCallMessagesItem_RequestResponseDelayed, + MakeToolWithToolCallMessagesItem_RequestStart, + McpTool, + McpToolMessages, + McpToolMessagesItem, + McpToolMessagesItem_RequestComplete, + McpToolMessagesItem_RequestFailed, + McpToolMessagesItem_RequestResponseDelayed, + McpToolMessagesItem_RequestStart, + McpToolMessagesMessagesItem, + McpToolMessagesMessagesItem_RequestComplete, + McpToolMessagesMessagesItem_RequestFailed, + McpToolMessagesMessagesItem_RequestResponseDelayed, + McpToolMessagesMessagesItem_RequestStart, + McpToolMetadata, + McpToolMetadataProtocol, + MessageAddHookAction, + MessageTarget, + MessageTargetRole, + MinimaxLlmModel, + MinimaxLlmModelModel, + MinimaxLlmModelToolsItem, + MinimaxLlmModelToolsItem_ApiRequest, + MinimaxLlmModelToolsItem_Bash, + MinimaxLlmModelToolsItem_Code, + MinimaxLlmModelToolsItem_Computer, + MinimaxLlmModelToolsItem_Dtmf, + MinimaxLlmModelToolsItem_EndCall, + MinimaxLlmModelToolsItem_Function, + MinimaxLlmModelToolsItem_GohighlevelCalendarAvailabilityCheck, + MinimaxLlmModelToolsItem_GohighlevelCalendarEventCreate, + MinimaxLlmModelToolsItem_GohighlevelContactCreate, + MinimaxLlmModelToolsItem_GohighlevelContactGet, + MinimaxLlmModelToolsItem_GoogleCalendarAvailabilityCheck, + MinimaxLlmModelToolsItem_GoogleCalendarEventCreate, + MinimaxLlmModelToolsItem_GoogleSheetsRowAppend, + MinimaxLlmModelToolsItem_Handoff, + MinimaxLlmModelToolsItem_Mcp, + MinimaxLlmModelToolsItem_Query, + MinimaxLlmModelToolsItem_SipRequest, + MinimaxLlmModelToolsItem_SlackMessageSend, + MinimaxLlmModelToolsItem_Sms, + MinimaxLlmModelToolsItem_TextEditor, + MinimaxLlmModelToolsItem_TransferCall, + MinimaxLlmModelToolsItem_Voicemail, + MinimaxVoice, + MinimaxVoiceLanguageBoost, + MinimaxVoiceModel, + MinimaxVoiceRegion, + MinimaxVoiceSubtitleType, + MistralCredential, + MistralCredentialProvider, + ModelCost, + Monitor, + MonitorPlan, + MonitorResult, + Mono, + NeetsVoice, + NeuphonicCredential, + NeuphonicCredentialProvider, + NeuphonicVoice, + NeuphonicVoiceModel, + NodeArtifact, + NodeArtifactMessagesItem, + OAuth2AuthenticationPlan, + OAuth2AuthenticationPlanType, + Oauth2AuthenticationSession, + OpenAiCredential, + OpenAiCredentialProvider, + OpenAiFunction, + OpenAiFunctionParameters, + OpenAiFunctionParametersType, + OpenAiMessage, + OpenAiMessageRole, + OpenAiModel, + OpenAiModelFallbackModelsItem, + OpenAiModelModel, + OpenAiModelPromptCacheRetention, + OpenAiModelToolStrictCompatibilityMode, + OpenAiModelToolsItem, + OpenAiModelToolsItem_ApiRequest, + OpenAiModelToolsItem_Bash, + OpenAiModelToolsItem_Code, + OpenAiModelToolsItem_Computer, + OpenAiModelToolsItem_Dtmf, + OpenAiModelToolsItem_EndCall, + OpenAiModelToolsItem_Function, + OpenAiModelToolsItem_GohighlevelCalendarAvailabilityCheck, + OpenAiModelToolsItem_GohighlevelCalendarEventCreate, + OpenAiModelToolsItem_GohighlevelContactCreate, + OpenAiModelToolsItem_GohighlevelContactGet, + OpenAiModelToolsItem_GoogleCalendarAvailabilityCheck, + OpenAiModelToolsItem_GoogleCalendarEventCreate, + OpenAiModelToolsItem_GoogleSheetsRowAppend, + OpenAiModelToolsItem_Handoff, + OpenAiModelToolsItem_Mcp, + OpenAiModelToolsItem_Query, + OpenAiModelToolsItem_SipRequest, + OpenAiModelToolsItem_SlackMessageSend, + OpenAiModelToolsItem_Sms, + OpenAiModelToolsItem_TextEditor, + OpenAiModelToolsItem_TransferCall, + OpenAiModelToolsItem_Voicemail, + OpenAiTranscriber, + OpenAiTranscriberLanguage, + OpenAiTranscriberModel, + OpenAiVoice, + OpenAiVoiceId, + OpenAiVoiceIdEnum, + OpenAiVoiceModel, + OpenAiVoicemailDetectionPlan, + OpenAiVoicemailDetectionPlanProvider, + OpenAiVoicemailDetectionPlanType, + OpenAiWebChatRequest, + OpenAiWebChatRequestInput, + OpenAiWebChatRequestInputOneItem, + OpenRouterCredential, + OpenRouterCredentialProvider, + OpenRouterModel, + OpenRouterModelToolsItem, + OpenRouterModelToolsItem_ApiRequest, + OpenRouterModelToolsItem_Bash, + OpenRouterModelToolsItem_Code, + OpenRouterModelToolsItem_Computer, + OpenRouterModelToolsItem_Dtmf, + OpenRouterModelToolsItem_EndCall, + OpenRouterModelToolsItem_Function, + OpenRouterModelToolsItem_GohighlevelCalendarAvailabilityCheck, + OpenRouterModelToolsItem_GohighlevelCalendarEventCreate, + OpenRouterModelToolsItem_GohighlevelContactCreate, + OpenRouterModelToolsItem_GohighlevelContactGet, + OpenRouterModelToolsItem_GoogleCalendarAvailabilityCheck, + OpenRouterModelToolsItem_GoogleCalendarEventCreate, + OpenRouterModelToolsItem_GoogleSheetsRowAppend, + OpenRouterModelToolsItem_Handoff, + OpenRouterModelToolsItem_Mcp, + OpenRouterModelToolsItem_Query, + OpenRouterModelToolsItem_SipRequest, + OpenRouterModelToolsItem_SlackMessageSend, + OpenRouterModelToolsItem_Sms, + OpenRouterModelToolsItem_TextEditor, + OpenRouterModelToolsItem_TransferCall, + OpenRouterModelToolsItem_Voicemail, + Org, + OrgChannel, + OutputTool, + OutputToolMessagesItem, + OutputToolMessagesItem_RequestComplete, + OutputToolMessagesItem_RequestFailed, + OutputToolMessagesItem_RequestResponseDelayed, + OutputToolMessagesItem_RequestStart, + OutputToolType, + PaginationMeta, + PerformanceMetrics, + PerplexityAiCredential, + PerplexityAiCredentialProvider, + PerplexityAiModel, + PerplexityAiModelToolsItem, + PerplexityAiModelToolsItem_ApiRequest, + PerplexityAiModelToolsItem_Bash, + PerplexityAiModelToolsItem_Code, + PerplexityAiModelToolsItem_Computer, + PerplexityAiModelToolsItem_Dtmf, + PerplexityAiModelToolsItem_EndCall, + PerplexityAiModelToolsItem_Function, + PerplexityAiModelToolsItem_GohighlevelCalendarAvailabilityCheck, + PerplexityAiModelToolsItem_GohighlevelCalendarEventCreate, + PerplexityAiModelToolsItem_GohighlevelContactCreate, + PerplexityAiModelToolsItem_GohighlevelContactGet, + PerplexityAiModelToolsItem_GoogleCalendarAvailabilityCheck, + PerplexityAiModelToolsItem_GoogleCalendarEventCreate, + PerplexityAiModelToolsItem_GoogleSheetsRowAppend, + PerplexityAiModelToolsItem_Handoff, + PerplexityAiModelToolsItem_Mcp, + PerplexityAiModelToolsItem_Query, + PerplexityAiModelToolsItem_SipRequest, + PerplexityAiModelToolsItem_SlackMessageSend, + PerplexityAiModelToolsItem_Sms, + PerplexityAiModelToolsItem_TextEditor, + PerplexityAiModelToolsItem_TransferCall, + PerplexityAiModelToolsItem_Voicemail, + Personality, + PhoneNumberCallEndingHookFilter, + PhoneNumberCallEndingHookFilterKey, + PhoneNumberCallEndingHookFilterOneOfItem, + PhoneNumberCallEndingHookFilterType, + PhoneNumberCallRingingHookFilter, + PhoneNumberCallRingingHookFilterKey, + PhoneNumberCallRingingHookFilterType, + PhoneNumberHookCallEnding, + PhoneNumberHookCallEndingDo, + PhoneNumberHookCallEndingDo_Say, + PhoneNumberHookCallEndingDo_Transfer, + PhoneNumberHookCallRinging, + PhoneNumberHookCallRingingDoItem, + PhoneNumberHookCallRingingDoItem_Say, + PhoneNumberHookCallRingingDoItem_Transfer, + PhoneNumberPaginatedResponse, + PhoneNumberPaginatedResponseResultsItem, + PhoneNumberPaginatedResponseResultsItem_ByoPhoneNumber, + PhoneNumberPaginatedResponseResultsItem_Telnyx, + PhoneNumberPaginatedResponseResultsItem_Twilio, + PhoneNumberPaginatedResponseResultsItem_Vapi, + PhoneNumberPaginatedResponseResultsItem_Vonage, + PieInsight, + PieInsightFromCallTable, + PieInsightFromCallTableGroupBy, + PieInsightFromCallTableQueriesItem, + PieInsightFromCallTableType, + PieInsightGroupBy, + PieInsightQueriesItem, + PlayHtCredential, + PlayHtCredentialProvider, + PlayHtVoice, + PlayHtVoiceEmotion, + PlayHtVoiceId, + PlayHtVoiceIdEnum, + PlayHtVoiceLanguage, + PlayHtVoiceModel, + PromptInjectionSecurityFilter, + PromptInjectionSecurityFilterType, + ProviderResource, + ProviderResourcePaginatedResponse, + ProviderResourceProvider, + ProviderResourceResourceName, + PublicKeyEncryptionPlan, + PublicKeyEncryptionPlanAlgorithm, + PublicKeyEncryptionPlanPublicKey, + PublicKeyEncryptionPlanPublicKey_SpkiPem, + PunctuationBoundary, + QueryTool, + QueryToolMessagesItem, + QueryToolMessagesItem_RequestComplete, + QueryToolMessagesItem_RequestFailed, + QueryToolMessagesItem_RequestResponseDelayed, + QueryToolMessagesItem_RequestStart, + RceSecurityFilter, + RceSecurityFilterType, + Recording, + RecordingConsent, + RecordingConsentPlanStayOnLine, + RecordingConsentPlanStayOnLineVoice, + RecordingConsentPlanStayOnLineVoice_11Labs, + RecordingConsentPlanStayOnLineVoice_Azure, + RecordingConsentPlanStayOnLineVoice_Cartesia, + RecordingConsentPlanStayOnLineVoice_CustomVoice, + RecordingConsentPlanStayOnLineVoice_Deepgram, + RecordingConsentPlanStayOnLineVoice_Hume, + RecordingConsentPlanStayOnLineVoice_Inworld, + RecordingConsentPlanStayOnLineVoice_Lmnt, + RecordingConsentPlanStayOnLineVoice_Minimax, + RecordingConsentPlanStayOnLineVoice_Neuphonic, + RecordingConsentPlanStayOnLineVoice_Openai, + RecordingConsentPlanStayOnLineVoice_Playht, + RecordingConsentPlanStayOnLineVoice_RimeAi, + RecordingConsentPlanStayOnLineVoice_Sesame, + RecordingConsentPlanStayOnLineVoice_SmallestAi, + RecordingConsentPlanStayOnLineVoice_Tavus, + RecordingConsentPlanStayOnLineVoice_Vapi, + RecordingConsentPlanStayOnLineVoice_Wellsaid, + RecordingConsentPlanVerbal, + RecordingConsentPlanVerbalVoice, + RecordingConsentPlanVerbalVoice_11Labs, + RecordingConsentPlanVerbalVoice_Azure, + RecordingConsentPlanVerbalVoice_Cartesia, + RecordingConsentPlanVerbalVoice_CustomVoice, + RecordingConsentPlanVerbalVoice_Deepgram, + RecordingConsentPlanVerbalVoice_Hume, + RecordingConsentPlanVerbalVoice_Inworld, + RecordingConsentPlanVerbalVoice_Lmnt, + RecordingConsentPlanVerbalVoice_Minimax, + RecordingConsentPlanVerbalVoice_Neuphonic, + RecordingConsentPlanVerbalVoice_Openai, + RecordingConsentPlanVerbalVoice_Playht, + RecordingConsentPlanVerbalVoice_RimeAi, + RecordingConsentPlanVerbalVoice_Sesame, + RecordingConsentPlanVerbalVoice_SmallestAi, + RecordingConsentPlanVerbalVoice_Tavus, + RecordingConsentPlanVerbalVoice_Vapi, + RecordingConsentPlanVerbalVoice_Wellsaid, + RegexCondition, + RegexOption, + RegexOptionType, + RegexReplacement, + RegexSecurityFilter, + RegexSecurityFilterType, + RelayCommandNote, + RelayCommandOptions, + RelayCommandOptionsType, + RelayCommandSay, + RelayRequest, + RelayRequestCommandsItem, + RelayRequestCommandsItem_MessageAdd, + RelayRequestCommandsItem_Say, + RelayRequestTarget, + RelayRequestTarget_Assistant, + RelayRequestTarget_Squad, + RelayResponse, + RelayResponseStatus, + RelayTargetAssistant, + RelayTargetOptions, + RelayTargetOptionsType, + RelayTargetSquad, + ResponseCompletedEvent, + ResponseCompletedEventType, + ResponseErrorEvent, + ResponseErrorEventType, + ResponseObject, + ResponseObjectObject, + ResponseObjectStatus, + ResponseOutputMessage, + ResponseOutputMessageRole, + ResponseOutputMessageStatus, + ResponseOutputMessageType, + ResponseOutputText, + ResponseOutputTextType, + ResponseTextDeltaEvent, + ResponseTextDeltaEventType, + ResponseTextDoneEvent, + ResponseTextDoneEventType, + RimeAiCredential, + RimeAiCredentialProvider, + RimeAiVoice, + RimeAiVoiceId, + RimeAiVoiceIdEnum, + RimeAiVoiceLanguage, + RimeAiVoiceModel, + RunpodCredential, + RunpodCredentialProvider, + S3Credential, + S3CredentialProvider, + SayAssistantHookAction, + SayHookAction, + SayHookActionPrompt, + SayHookActionPromptOneItem, + SayPhoneNumberHookAction, + SbcConfiguration, + Scenario, + ScenarioHooksItem, + ScenarioHooksItem_SimulationRunEnded, + ScenarioHooksItem_SimulationRunStarted, + ScenarioToolMock, + SchedulePlan, + Scorecard, + ScorecardMetric, + ScorecardPaginatedResponse, + SecurityFilterBase, + SecurityFilterPlan, + SecurityFilterPlanMode, + Server, + ServerMessage, + ServerMessageAssistantRequest, + ServerMessageAssistantRequestPhoneNumber, + ServerMessageAssistantRequestPhoneNumber_ByoPhoneNumber, + ServerMessageAssistantRequestPhoneNumber_Telnyx, + ServerMessageAssistantRequestPhoneNumber_Twilio, + ServerMessageAssistantRequestPhoneNumber_Vapi, + ServerMessageAssistantRequestPhoneNumber_Vonage, + ServerMessageAssistantRequestType, + ServerMessageAssistantSpeech, + ServerMessageAssistantSpeechPhoneNumber, + ServerMessageAssistantSpeechPhoneNumber_ByoPhoneNumber, + ServerMessageAssistantSpeechPhoneNumber_Telnyx, + ServerMessageAssistantSpeechPhoneNumber_Twilio, + ServerMessageAssistantSpeechPhoneNumber_Vapi, + ServerMessageAssistantSpeechPhoneNumber_Vonage, + ServerMessageAssistantSpeechSource, + ServerMessageAssistantSpeechTiming, + ServerMessageAssistantSpeechTiming_WordAlignment, + ServerMessageAssistantSpeechTiming_WordProgress, + ServerMessageAssistantSpeechType, + ServerMessageCallDeleteFailed, + ServerMessageCallDeleteFailedPhoneNumber, + ServerMessageCallDeleteFailedPhoneNumber_ByoPhoneNumber, + ServerMessageCallDeleteFailedPhoneNumber_Telnyx, + ServerMessageCallDeleteFailedPhoneNumber_Twilio, + ServerMessageCallDeleteFailedPhoneNumber_Vapi, + ServerMessageCallDeleteFailedPhoneNumber_Vonage, + ServerMessageCallDeleteFailedType, + ServerMessageCallDeleted, + ServerMessageCallDeletedPhoneNumber, + ServerMessageCallDeletedPhoneNumber_ByoPhoneNumber, + ServerMessageCallDeletedPhoneNumber_Telnyx, + ServerMessageCallDeletedPhoneNumber_Twilio, + ServerMessageCallDeletedPhoneNumber_Vapi, + ServerMessageCallDeletedPhoneNumber_Vonage, + ServerMessageCallDeletedType, + ServerMessageCallEndpointingRequest, + ServerMessageCallEndpointingRequestMessagesItem, + ServerMessageCallEndpointingRequestPhoneNumber, + ServerMessageCallEndpointingRequestPhoneNumber_ByoPhoneNumber, + ServerMessageCallEndpointingRequestPhoneNumber_Telnyx, + ServerMessageCallEndpointingRequestPhoneNumber_Twilio, + ServerMessageCallEndpointingRequestPhoneNumber_Vapi, + ServerMessageCallEndpointingRequestPhoneNumber_Vonage, + ServerMessageCallEndpointingRequestType, + ServerMessageChatCreated, + ServerMessageChatCreatedPhoneNumber, + ServerMessageChatCreatedPhoneNumber_ByoPhoneNumber, + ServerMessageChatCreatedPhoneNumber_Telnyx, + ServerMessageChatCreatedPhoneNumber_Twilio, + ServerMessageChatCreatedPhoneNumber_Vapi, + ServerMessageChatCreatedPhoneNumber_Vonage, + ServerMessageChatCreatedType, + ServerMessageChatDeleted, + ServerMessageChatDeletedPhoneNumber, + ServerMessageChatDeletedPhoneNumber_ByoPhoneNumber, + ServerMessageChatDeletedPhoneNumber_Telnyx, + ServerMessageChatDeletedPhoneNumber_Twilio, + ServerMessageChatDeletedPhoneNumber_Vapi, + ServerMessageChatDeletedPhoneNumber_Vonage, + ServerMessageChatDeletedType, + ServerMessageConversationUpdate, + ServerMessageConversationUpdateMessagesItem, + ServerMessageConversationUpdatePhoneNumber, + ServerMessageConversationUpdatePhoneNumber_ByoPhoneNumber, + ServerMessageConversationUpdatePhoneNumber_Telnyx, + ServerMessageConversationUpdatePhoneNumber_Twilio, + ServerMessageConversationUpdatePhoneNumber_Vapi, + ServerMessageConversationUpdatePhoneNumber_Vonage, + ServerMessageConversationUpdateType, + ServerMessageEndOfCallReport, + ServerMessageEndOfCallReportCostsItem, + ServerMessageEndOfCallReportCostsItem_Analysis, + ServerMessageEndOfCallReportCostsItem_KnowledgeBase, + ServerMessageEndOfCallReportCostsItem_Model, + ServerMessageEndOfCallReportCostsItem_Transcriber, + ServerMessageEndOfCallReportCostsItem_Transport, + ServerMessageEndOfCallReportCostsItem_Vapi, + ServerMessageEndOfCallReportCostsItem_Voice, + ServerMessageEndOfCallReportCostsItem_VoicemailDetection, + ServerMessageEndOfCallReportDestination, + ServerMessageEndOfCallReportDestination_Number, + ServerMessageEndOfCallReportDestination_Sip, + ServerMessageEndOfCallReportEndedReason, + ServerMessageEndOfCallReportPhoneNumber, + ServerMessageEndOfCallReportPhoneNumber_ByoPhoneNumber, + ServerMessageEndOfCallReportPhoneNumber_Telnyx, + ServerMessageEndOfCallReportPhoneNumber_Twilio, + ServerMessageEndOfCallReportPhoneNumber_Vapi, + ServerMessageEndOfCallReportPhoneNumber_Vonage, + ServerMessageEndOfCallReportType, + ServerMessageHandoffDestinationRequest, + ServerMessageHandoffDestinationRequestPhoneNumber, + ServerMessageHandoffDestinationRequestPhoneNumber_ByoPhoneNumber, + ServerMessageHandoffDestinationRequestPhoneNumber_Telnyx, + ServerMessageHandoffDestinationRequestPhoneNumber_Twilio, + ServerMessageHandoffDestinationRequestPhoneNumber_Vapi, + ServerMessageHandoffDestinationRequestPhoneNumber_Vonage, + ServerMessageHandoffDestinationRequestType, + ServerMessageHang, + ServerMessageHangPhoneNumber, + ServerMessageHangPhoneNumber_ByoPhoneNumber, + ServerMessageHangPhoneNumber_Telnyx, + ServerMessageHangPhoneNumber_Twilio, + ServerMessageHangPhoneNumber_Vapi, + ServerMessageHangPhoneNumber_Vonage, + ServerMessageHangType, + ServerMessageKnowledgeBaseRequest, + ServerMessageKnowledgeBaseRequestMessagesItem, + ServerMessageKnowledgeBaseRequestPhoneNumber, + ServerMessageKnowledgeBaseRequestPhoneNumber_ByoPhoneNumber, + ServerMessageKnowledgeBaseRequestPhoneNumber_Telnyx, + ServerMessageKnowledgeBaseRequestPhoneNumber_Twilio, + ServerMessageKnowledgeBaseRequestPhoneNumber_Vapi, + ServerMessageKnowledgeBaseRequestPhoneNumber_Vonage, + ServerMessageKnowledgeBaseRequestType, + ServerMessageLanguageChangeDetected, + ServerMessageLanguageChangeDetectedPhoneNumber, + ServerMessageLanguageChangeDetectedPhoneNumber_ByoPhoneNumber, + ServerMessageLanguageChangeDetectedPhoneNumber_Telnyx, + ServerMessageLanguageChangeDetectedPhoneNumber_Twilio, + ServerMessageLanguageChangeDetectedPhoneNumber_Vapi, + ServerMessageLanguageChangeDetectedPhoneNumber_Vonage, + ServerMessageLanguageChangeDetectedType, + ServerMessageMessage, + ServerMessageModelOutput, + ServerMessageModelOutputPhoneNumber, + ServerMessageModelOutputPhoneNumber_ByoPhoneNumber, + ServerMessageModelOutputPhoneNumber_Telnyx, + ServerMessageModelOutputPhoneNumber_Twilio, + ServerMessageModelOutputPhoneNumber_Vapi, + ServerMessageModelOutputPhoneNumber_Vonage, + ServerMessageModelOutputType, + ServerMessagePhoneCallControl, + ServerMessagePhoneCallControlDestination, + ServerMessagePhoneCallControlDestination_Number, + ServerMessagePhoneCallControlDestination_Sip, + ServerMessagePhoneCallControlPhoneNumber, + ServerMessagePhoneCallControlPhoneNumber_ByoPhoneNumber, + ServerMessagePhoneCallControlPhoneNumber_Telnyx, + ServerMessagePhoneCallControlPhoneNumber_Twilio, + ServerMessagePhoneCallControlPhoneNumber_Vapi, + ServerMessagePhoneCallControlPhoneNumber_Vonage, + ServerMessagePhoneCallControlRequest, + ServerMessagePhoneCallControlType, + ServerMessageResponse, + ServerMessageResponseAssistantRequest, + ServerMessageResponseAssistantRequestDestination, + ServerMessageResponseAssistantRequestDestination_Number, + ServerMessageResponseAssistantRequestDestination_Sip, + ServerMessageResponseCallEndpointingRequest, + ServerMessageResponseHandoffDestinationRequest, + ServerMessageResponseKnowledgeBaseRequest, + ServerMessageResponseMessageResponse, + ServerMessageResponseToolCalls, + ServerMessageResponseTransferDestinationRequest, + ServerMessageResponseTransferDestinationRequestDestination, + ServerMessageResponseTransferDestinationRequestDestination_Assistant, + ServerMessageResponseTransferDestinationRequestDestination_Number, + ServerMessageResponseTransferDestinationRequestDestination_Sip, + ServerMessageResponseTransferDestinationRequestMessage, + ServerMessageResponseTransferDestinationRequestMessage_RequestComplete, + ServerMessageResponseTransferDestinationRequestMessage_RequestFailed, + ServerMessageResponseTransferDestinationRequestMessage_RequestResponseDelayed, + ServerMessageResponseTransferDestinationRequestMessage_RequestStart, + ServerMessageResponseVoiceRequest, + ServerMessageSessionCreated, + ServerMessageSessionCreatedPhoneNumber, + ServerMessageSessionCreatedPhoneNumber_ByoPhoneNumber, + ServerMessageSessionCreatedPhoneNumber_Telnyx, + ServerMessageSessionCreatedPhoneNumber_Twilio, + ServerMessageSessionCreatedPhoneNumber_Vapi, + ServerMessageSessionCreatedPhoneNumber_Vonage, + ServerMessageSessionCreatedType, + ServerMessageSessionDeleted, + ServerMessageSessionDeletedPhoneNumber, + ServerMessageSessionDeletedPhoneNumber_ByoPhoneNumber, + ServerMessageSessionDeletedPhoneNumber_Telnyx, + ServerMessageSessionDeletedPhoneNumber_Twilio, + ServerMessageSessionDeletedPhoneNumber_Vapi, + ServerMessageSessionDeletedPhoneNumber_Vonage, + ServerMessageSessionDeletedType, + ServerMessageSessionUpdated, + ServerMessageSessionUpdatedPhoneNumber, + ServerMessageSessionUpdatedPhoneNumber_ByoPhoneNumber, + ServerMessageSessionUpdatedPhoneNumber_Telnyx, + ServerMessageSessionUpdatedPhoneNumber_Twilio, + ServerMessageSessionUpdatedPhoneNumber_Vapi, + ServerMessageSessionUpdatedPhoneNumber_Vonage, + ServerMessageSessionUpdatedType, + ServerMessageSpeechUpdate, + ServerMessageSpeechUpdatePhoneNumber, + ServerMessageSpeechUpdatePhoneNumber_ByoPhoneNumber, + ServerMessageSpeechUpdatePhoneNumber_Telnyx, + ServerMessageSpeechUpdatePhoneNumber_Twilio, + ServerMessageSpeechUpdatePhoneNumber_Vapi, + ServerMessageSpeechUpdatePhoneNumber_Vonage, + ServerMessageSpeechUpdateRole, + ServerMessageSpeechUpdateStatus, + ServerMessageSpeechUpdateType, + ServerMessageStatusUpdate, + ServerMessageStatusUpdateDestination, + ServerMessageStatusUpdateDestination_Number, + ServerMessageStatusUpdateDestination_Sip, + ServerMessageStatusUpdateEndedReason, + ServerMessageStatusUpdateMessagesItem, + ServerMessageStatusUpdatePhoneNumber, + ServerMessageStatusUpdatePhoneNumber_ByoPhoneNumber, + ServerMessageStatusUpdatePhoneNumber_Telnyx, + ServerMessageStatusUpdatePhoneNumber_Twilio, + ServerMessageStatusUpdatePhoneNumber_Vapi, + ServerMessageStatusUpdatePhoneNumber_Vonage, + ServerMessageStatusUpdateStatus, + ServerMessageStatusUpdateType, + ServerMessageToolCalls, + ServerMessageToolCallsPhoneNumber, + ServerMessageToolCallsPhoneNumber_ByoPhoneNumber, + ServerMessageToolCallsPhoneNumber_Telnyx, + ServerMessageToolCallsPhoneNumber_Twilio, + ServerMessageToolCallsPhoneNumber_Vapi, + ServerMessageToolCallsPhoneNumber_Vonage, + ServerMessageToolCallsToolWithToolCallListItem, + ServerMessageToolCallsToolWithToolCallListItem_Bash, + ServerMessageToolCallsToolWithToolCallListItem_Computer, + ServerMessageToolCallsToolWithToolCallListItem_Function, + ServerMessageToolCallsToolWithToolCallListItem_Ghl, + ServerMessageToolCallsToolWithToolCallListItem_GoogleCalendarEventCreate, + ServerMessageToolCallsToolWithToolCallListItem_Make, + ServerMessageToolCallsToolWithToolCallListItem_TextEditor, + ServerMessageToolCallsType, + ServerMessageTranscript, + ServerMessageTranscriptPhoneNumber, + ServerMessageTranscriptPhoneNumber_ByoPhoneNumber, + ServerMessageTranscriptPhoneNumber_Telnyx, + ServerMessageTranscriptPhoneNumber_Twilio, + ServerMessageTranscriptPhoneNumber_Vapi, + ServerMessageTranscriptPhoneNumber_Vonage, + ServerMessageTranscriptRole, + ServerMessageTranscriptTranscriptType, + ServerMessageTranscriptType, + ServerMessageTransferDestinationRequest, + ServerMessageTransferDestinationRequestPhoneNumber, + ServerMessageTransferDestinationRequestPhoneNumber_ByoPhoneNumber, + ServerMessageTransferDestinationRequestPhoneNumber_Telnyx, + ServerMessageTransferDestinationRequestPhoneNumber_Twilio, + ServerMessageTransferDestinationRequestPhoneNumber_Vapi, + ServerMessageTransferDestinationRequestPhoneNumber_Vonage, + ServerMessageTransferDestinationRequestType, + ServerMessageTransferUpdate, + ServerMessageTransferUpdateDestination, + ServerMessageTransferUpdateDestination_Assistant, + ServerMessageTransferUpdateDestination_Number, + ServerMessageTransferUpdateDestination_Sip, + ServerMessageTransferUpdatePhoneNumber, + ServerMessageTransferUpdatePhoneNumber_ByoPhoneNumber, + ServerMessageTransferUpdatePhoneNumber_Telnyx, + ServerMessageTransferUpdatePhoneNumber_Twilio, + ServerMessageTransferUpdatePhoneNumber_Vapi, + ServerMessageTransferUpdatePhoneNumber_Vonage, + ServerMessageTransferUpdateType, + ServerMessageUserInterrupted, + ServerMessageUserInterruptedPhoneNumber, + ServerMessageUserInterruptedPhoneNumber_ByoPhoneNumber, + ServerMessageUserInterruptedPhoneNumber_Telnyx, + ServerMessageUserInterruptedPhoneNumber_Twilio, + ServerMessageUserInterruptedPhoneNumber_Vapi, + ServerMessageUserInterruptedPhoneNumber_Vonage, + ServerMessageUserInterruptedType, + ServerMessageVoiceInput, + ServerMessageVoiceInputPhoneNumber, + ServerMessageVoiceInputPhoneNumber_ByoPhoneNumber, + ServerMessageVoiceInputPhoneNumber_Telnyx, + ServerMessageVoiceInputPhoneNumber_Twilio, + ServerMessageVoiceInputPhoneNumber_Vapi, + ServerMessageVoiceInputPhoneNumber_Vonage, + ServerMessageVoiceInputType, + ServerMessageVoiceRequest, + ServerMessageVoiceRequestPhoneNumber, + ServerMessageVoiceRequestPhoneNumber_ByoPhoneNumber, + ServerMessageVoiceRequestPhoneNumber_Telnyx, + ServerMessageVoiceRequestPhoneNumber_Twilio, + ServerMessageVoiceRequestPhoneNumber_Vapi, + ServerMessageVoiceRequestPhoneNumber_Vonage, + ServerMessageVoiceRequestType, + SesameVoice, + SesameVoiceModel, + Session, + SessionCost, + SessionCostsItem, + SessionCostsItem_Analysis, + SessionCostsItem_Model, + SessionCostsItem_Session, + SessionCreatedHook, + SessionCreatedHookOn, + SessionMessagesItem, + SessionPaginatedResponse, + SessionStatus, + Simulation, + SimulationConcurrencyResponse, + SimulationHookCallEnded, + SimulationHookCallStarted, + SimulationHookInclude, + SimulationHookWebhookAction, + SimulationHookWebhookActionType, + SimulationRun, + SimulationRunConfiguration, + SimulationRunItem, + SimulationRunItemCallMetadata, + SimulationRunItemCallMonitor, + SimulationRunItemCounts, + SimulationRunItemHooksItem, + SimulationRunItemHooksItem_SimulationRunEnded, + SimulationRunItemHooksItem_SimulationRunStarted, + SimulationRunItemImprovementSuggestion, + SimulationRunItemImprovements, + SimulationRunItemMetadata, + SimulationRunItemResults, + SimulationRunItemStatus, + SimulationRunSimulationEntry, + SimulationRunSimulationsItem, + SimulationRunSimulationsItem_Simulation, + SimulationRunSimulationsItem_SimulationSuite, + SimulationRunStatus, + SimulationRunSuiteEntry, + SimulationRunTarget, + SimulationRunTargetAssistant, + SimulationRunTargetSquad, + SimulationRunTarget_Assistant, + SimulationRunTarget_Squad, + SimulationRunTransportConfiguration, + SimulationRunTransportConfigurationProvider, + SimulationSuite, + SipAuthentication, + SipRequestTool, + SipRequestToolBody, + SipRequestToolMessagesItem, + SipRequestToolMessagesItem_RequestComplete, + SipRequestToolMessagesItem_RequestFailed, + SipRequestToolMessagesItem_RequestResponseDelayed, + SipRequestToolMessagesItem_RequestStart, + SipRequestToolVerb, + SipTrunkGateway, + SipTrunkGatewayOutboundProtocol, + SipTrunkOutboundAuthenticationPlan, + SipTrunkOutboundSipRegisterPlan, + SlackOAuth2AuthorizationCredential, + SlackOAuth2AuthorizationCredentialProvider, + SlackSendMessageTool, + SlackSendMessageToolMessagesItem, + SlackSendMessageToolMessagesItem_RequestComplete, + SlackSendMessageToolMessagesItem_RequestFailed, + SlackSendMessageToolMessagesItem_RequestResponseDelayed, + SlackSendMessageToolMessagesItem_RequestStart, + SlackWebhookCredential, + SlackWebhookCredentialProvider, + SmallestAiCredential, + SmallestAiCredentialProvider, + SmallestAiVoice, + SmallestAiVoiceId, + SmallestAiVoiceIdEnum, + SmallestAiVoiceModel, + SmartDenoisingPlan, + SmsTool, + SmsToolMessagesItem, + SmsToolMessagesItem_RequestComplete, + SmsToolMessagesItem_RequestFailed, + SmsToolMessagesItem_RequestResponseDelayed, + SmsToolMessagesItem_RequestStart, + SonioxCredential, + SonioxCredentialProvider, + SonioxTranscriber, + SonioxTranscriberLanguage, + SonioxTranscriberModel, + SpeechmaticsCredential, + SpeechmaticsCredentialProvider, + SpeechmaticsCustomVocabularyItem, + SpeechmaticsTranscriber, + SpeechmaticsTranscriberLanguage, + SpeechmaticsTranscriberModel, + SpeechmaticsTranscriberNumeralStyle, + SpeechmaticsTranscriberOperatingPoint, + SpeechmaticsTranscriberRegion, + SpkiPemPublicKeyConfig, + SqlInjectionSecurityFilter, + SqlInjectionSecurityFilterType, + Squad, + SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem, + SsrfSecurityFilter, + SsrfSecurityFilterType, + StartSpeakingPlan, + StartSpeakingPlanCustomEndpointingRulesItem, + StartSpeakingPlanCustomEndpointingRulesItem_Assistant, + StartSpeakingPlanCustomEndpointingRulesItem_Both, + StartSpeakingPlanCustomEndpointingRulesItem_Customer, + StartSpeakingPlanSmartEndpointingEnabled, + StartSpeakingPlanSmartEndpointingEnabledOne, + StartSpeakingPlanSmartEndpointingPlan, + StopSpeakingPlan, + StructuredDataMultiPlan, + StructuredDataPlan, + StructuredOutput, + StructuredOutputEvaluationResult, + StructuredOutputEvaluationResultComparator, + StructuredOutputEvaluationResultExpectedValue, + StructuredOutputEvaluationResultExtractedValue, + StructuredOutputFilterDto, + StructuredOutputModel, + StructuredOutputModel_Anthropic, + StructuredOutputModel_AnthropicBedrock, + StructuredOutputModel_CustomLlm, + StructuredOutputModel_Google, + StructuredOutputModel_Openai, + StructuredOutputPaginatedResponse, + StructuredOutputType, + Subscription, + SubscriptionLimits, + SubscriptionMinutesIncludedResetFrequency, + SubscriptionStatus, + SubscriptionType, + SuccessEvaluationPlan, + SuccessEvaluationPlanRubric, + SummaryPlan, + SupabaseBucketPlan, + SupabaseBucketPlanRegion, + SupabaseCredential, + SupabaseCredentialProvider, + SyncVoiceLibraryDto, + SyncVoiceLibraryDtoProvidersItem, + SystemMessage, + TalkscriberTranscriber, + TalkscriberTranscriberLanguage, + TalkscriberTranscriberModel, + TargetPlan, + TavusConversationProperties, + TavusCredential, + TavusCredentialProvider, + TavusVoice, + TavusVoiceVoiceId, + TavusVoiceVoiceIdZero, + TelnyxPhoneNumber, + TelnyxPhoneNumberFallbackDestination, + TelnyxPhoneNumberFallbackDestination_Number, + TelnyxPhoneNumberFallbackDestination_Sip, + TelnyxPhoneNumberHooksItem, + TelnyxPhoneNumberHooksItem_CallEnding, + TelnyxPhoneNumberHooksItem_CallRinging, + TelnyxPhoneNumberStatus, + Template, + TemplateDetails, + TemplateDetails_ApiRequest, + TemplateDetails_Bash, + TemplateDetails_Code, + TemplateDetails_Computer, + TemplateDetails_Dtmf, + TemplateDetails_EndCall, + TemplateDetails_Function, + TemplateDetails_GohighlevelCalendarAvailabilityCheck, + TemplateDetails_GohighlevelCalendarEventCreate, + TemplateDetails_GohighlevelContactCreate, + TemplateDetails_GohighlevelContactGet, + TemplateDetails_GoogleCalendarAvailabilityCheck, + TemplateDetails_GoogleCalendarEventCreate, + TemplateDetails_GoogleSheetsRowAppend, + TemplateDetails_Handoff, + TemplateDetails_Mcp, + TemplateDetails_Query, + TemplateDetails_SipRequest, + TemplateDetails_SlackMessageSend, + TemplateDetails_Sms, + TemplateDetails_TextEditor, + TemplateDetails_TransferCall, + TemplateDetails_Voicemail, + TemplateProvider, + TemplateProviderDetails, + TemplateProviderDetails_Function, + TemplateProviderDetails_Ghl, + TemplateProviderDetails_GohighlevelCalendarAvailabilityCheck, + TemplateProviderDetails_GohighlevelCalendarEventCreate, + TemplateProviderDetails_GohighlevelContactCreate, + TemplateProviderDetails_GohighlevelContactGet, + TemplateProviderDetails_GoogleCalendarEventCreate, + TemplateProviderDetails_GoogleSheetsRowAppend, + TemplateProviderDetails_Make, + TemplateType, + TemplateVisibility, + TestSuite, + TestSuitePhoneNumber, + TestSuitePhoneNumberProvider, + TestSuiteRun, + TestSuiteRunScorerAi, + TestSuiteRunScorerAiResult, + TestSuiteRunScorerAiType, + TestSuiteRunStatus, + TestSuiteRunTestAttempt, + TestSuiteRunTestAttemptCall, + TestSuiteRunTestAttemptMetadata, + TestSuiteRunTestResult, + TestSuiteRunsPaginatedResponse, + TestSuiteTestChat, + TestSuiteTestScorerAi, + TestSuiteTestScorerAiType, + TestSuiteTestVoice, + TestSuiteTestVoiceType, + TestSuiteTestsPaginatedResponse, + TestSuiteTestsPaginatedResponseResultsItem, + TestSuiteTestsPaginatedResponseResultsItem_Chat, + TestSuiteTestsPaginatedResponseResultsItem_Voice, + TestSuitesPaginatedResponse, + TesterPlan, + TextContent, + TextContentLanguage, + TextContentType, + TextEditorTool, + TextEditorToolMessagesItem, + TextEditorToolMessagesItem_RequestComplete, + TextEditorToolMessagesItem_RequestFailed, + TextEditorToolMessagesItem_RequestResponseDelayed, + TextEditorToolMessagesItem_RequestStart, + TextEditorToolName, + TextEditorToolSubType, + TextEditorToolWithToolCall, + TextEditorToolWithToolCallMessagesItem, + TextEditorToolWithToolCallMessagesItem_RequestComplete, + TextEditorToolWithToolCallMessagesItem_RequestFailed, + TextEditorToolWithToolCallMessagesItem_RequestResponseDelayed, + TextEditorToolWithToolCallMessagesItem_RequestStart, + TextEditorToolWithToolCallName, + TextEditorToolWithToolCallSubType, + TextInsight, + TextInsightFromCallTable, + TextInsightFromCallTableQueriesItem, + TextInsightFromCallTableType, + TextInsightQueriesItem, + TimeRange, + TimeRangeStep, + TogetherAiCredential, + TogetherAiCredentialProvider, + TogetherAiModel, + TogetherAiModelToolsItem, + TogetherAiModelToolsItem_ApiRequest, + TogetherAiModelToolsItem_Bash, + TogetherAiModelToolsItem_Code, + TogetherAiModelToolsItem_Computer, + TogetherAiModelToolsItem_Dtmf, + TogetherAiModelToolsItem_EndCall, + TogetherAiModelToolsItem_Function, + TogetherAiModelToolsItem_GohighlevelCalendarAvailabilityCheck, + TogetherAiModelToolsItem_GohighlevelCalendarEventCreate, + TogetherAiModelToolsItem_GohighlevelContactCreate, + TogetherAiModelToolsItem_GohighlevelContactGet, + TogetherAiModelToolsItem_GoogleCalendarAvailabilityCheck, + TogetherAiModelToolsItem_GoogleCalendarEventCreate, + TogetherAiModelToolsItem_GoogleSheetsRowAppend, + TogetherAiModelToolsItem_Handoff, + TogetherAiModelToolsItem_Mcp, + TogetherAiModelToolsItem_Query, + TogetherAiModelToolsItem_SipRequest, + TogetherAiModelToolsItem_SlackMessageSend, + TogetherAiModelToolsItem_Sms, + TogetherAiModelToolsItem_TextEditor, + TogetherAiModelToolsItem_TransferCall, + TogetherAiModelToolsItem_Voicemail, + Token, + TokenRestrictions, + TokenTag, + ToolCall, + ToolCallFunction, + ToolCallHookAction, + ToolCallHookActionTool, + ToolCallHookActionTool_ApiRequest, + ToolCallHookActionTool_Bash, + ToolCallHookActionTool_Code, + ToolCallHookActionTool_Computer, + ToolCallHookActionTool_Dtmf, + ToolCallHookActionTool_EndCall, + ToolCallHookActionTool_Function, + ToolCallHookActionTool_GohighlevelCalendarAvailabilityCheck, + ToolCallHookActionTool_GohighlevelCalendarEventCreate, + ToolCallHookActionTool_GohighlevelContactCreate, + ToolCallHookActionTool_GohighlevelContactGet, + ToolCallHookActionTool_GoogleCalendarAvailabilityCheck, + ToolCallHookActionTool_GoogleCalendarEventCreate, + ToolCallHookActionTool_GoogleSheetsRowAppend, + ToolCallHookActionTool_Handoff, + ToolCallHookActionTool_Mcp, + ToolCallHookActionTool_Query, + ToolCallHookActionTool_SipRequest, + ToolCallHookActionTool_SlackMessageSend, + ToolCallHookActionTool_Sms, + ToolCallHookActionTool_TextEditor, + ToolCallHookActionTool_TransferCall, + ToolCallHookActionTool_Voicemail, + ToolCallHookActionType, + ToolCallMessage, + ToolCallResult, + ToolCallResultMessage, + ToolMessage, + ToolMessageComplete, + ToolMessageCompleteRole, + ToolMessageDelayed, + ToolMessageFailed, + ToolMessageRole, + ToolMessageStart, + ToolNode, + ToolNodeTool, + ToolNodeTool_ApiRequest, + ToolNodeTool_Bash, + ToolNodeTool_Code, + ToolNodeTool_Computer, + ToolNodeTool_Dtmf, + ToolNodeTool_EndCall, + ToolNodeTool_Function, + ToolNodeTool_GohighlevelCalendarAvailabilityCheck, + ToolNodeTool_GohighlevelCalendarEventCreate, + ToolNodeTool_GohighlevelContactCreate, + ToolNodeTool_GohighlevelContactGet, + ToolNodeTool_GoogleCalendarAvailabilityCheck, + ToolNodeTool_GoogleCalendarEventCreate, + ToolNodeTool_GoogleSheetsRowAppend, + ToolNodeTool_Handoff, + ToolNodeTool_Mcp, + ToolNodeTool_Query, + ToolNodeTool_SipRequest, + ToolNodeTool_SlackMessageSend, + ToolNodeTool_Sms, + ToolNodeTool_TextEditor, + ToolNodeTool_TransferCall, + ToolNodeTool_Voicemail, + ToolParameter, + ToolParameterValue, + ToolRejectionPlan, + ToolRejectionPlanConditionsItem, + ToolRejectionPlanConditionsItem_Group, + ToolRejectionPlanConditionsItem_Liquid, + ToolRejectionPlanConditionsItem_Regex, + ToolTemplateMetadata, + ToolTemplateSetup, + TranscriberCost, + TranscriptPlan, + TranscriptionEndpointingPlan, + TransferAssistant, + TransferAssistantBackgroundSound, + TransferAssistantBackgroundSoundZero, + TransferAssistantFirstMessageMode, + TransferAssistantHookAction, + TransferAssistantModel, + TransferAssistantModelProvider, + TransferAssistantTranscriber, + TransferAssistantTranscriber_11Labs, + TransferAssistantTranscriber_AssemblyAi, + TransferAssistantTranscriber_Azure, + TransferAssistantTranscriber_Cartesia, + TransferAssistantTranscriber_CustomTranscriber, + TransferAssistantTranscriber_Deepgram, + TransferAssistantTranscriber_Gladia, + TransferAssistantTranscriber_Google, + TransferAssistantTranscriber_Openai, + TransferAssistantTranscriber_Soniox, + TransferAssistantTranscriber_Speechmatics, + TransferAssistantTranscriber_Talkscriber, + TransferAssistantVoice, + TransferAssistantVoice_11Labs, + TransferAssistantVoice_Azure, + TransferAssistantVoice_Cartesia, + TransferAssistantVoice_CustomVoice, + TransferAssistantVoice_Deepgram, + TransferAssistantVoice_Hume, + TransferAssistantVoice_Inworld, + TransferAssistantVoice_Lmnt, + TransferAssistantVoice_Minimax, + TransferAssistantVoice_Neuphonic, + TransferAssistantVoice_Openai, + TransferAssistantVoice_Playht, + TransferAssistantVoice_RimeAi, + TransferAssistantVoice_Sesame, + TransferAssistantVoice_SmallestAi, + TransferAssistantVoice_Tavus, + TransferAssistantVoice_Vapi, + TransferAssistantVoice_Wellsaid, + TransferCallTool, + TransferCallToolDestinationsItem, + TransferCallToolDestinationsItem_Assistant, + TransferCallToolDestinationsItem_Number, + TransferCallToolDestinationsItem_Sip, + TransferCallToolMessagesItem, + TransferCallToolMessagesItem_RequestComplete, + TransferCallToolMessagesItem_RequestFailed, + TransferCallToolMessagesItem_RequestResponseDelayed, + TransferCallToolMessagesItem_RequestStart, + TransferCancelToolUserEditable, + TransferCancelToolUserEditableMessagesItem, + TransferCancelToolUserEditableMessagesItem_RequestComplete, + TransferCancelToolUserEditableMessagesItem_RequestFailed, + TransferCancelToolUserEditableMessagesItem_RequestResponseDelayed, + TransferCancelToolUserEditableMessagesItem_RequestStart, + TransferCancelToolUserEditableType, + TransferDestinationAssistant, + TransferDestinationAssistantMessage, + TransferDestinationAssistantType, + TransferDestinationNumber, + TransferDestinationNumberMessage, + TransferDestinationSip, + TransferDestinationSipMessage, + TransferFallbackPlan, + TransferFallbackPlanMessage, + TransferHookAction, + TransferHookActionDestination, + TransferHookActionDestination_Number, + TransferHookActionDestination_Sip, + TransferHookActionType, + TransferMode, + TransferPhoneNumberHookAction, + TransferPhoneNumberHookActionDestination, + TransferPhoneNumberHookActionDestination_Number, + TransferPhoneNumberHookActionDestination_Sip, + TransferPlan, + TransferPlanContextEngineeringPlan, + TransferPlanContextEngineeringPlan_All, + TransferPlanContextEngineeringPlan_LastNMessages, + TransferPlanContextEngineeringPlan_None, + TransferPlanMessage, + TransferPlanMode, + TransferSuccessfulToolUserEditable, + TransferSuccessfulToolUserEditableMessagesItem, + TransferSuccessfulToolUserEditableMessagesItem_RequestComplete, + TransferSuccessfulToolUserEditableMessagesItem_RequestFailed, + TransferSuccessfulToolUserEditableMessagesItem_RequestResponseDelayed, + TransferSuccessfulToolUserEditableMessagesItem_RequestStart, + TransferSuccessfulToolUserEditableType, + TransportConfigurationTwilio, + TransportConfigurationTwilioProvider, + TransportConfigurationTwilioRecordingChannels, + TransportCost, + TransportCostProvider, + TrieveCredential, + TrieveCredentialProvider, + TrieveKnowledgeBase, + TrieveKnowledgeBaseChunkPlan, + TrieveKnowledgeBaseCreate, + TrieveKnowledgeBaseCreateType, + TrieveKnowledgeBaseImport, + TrieveKnowledgeBaseImportType, + TrieveKnowledgeBaseProvider, + TrieveKnowledgeBaseSearchPlan, + TrieveKnowledgeBaseSearchPlanSearchType, + TurnLatency, + TwilioCredential, + TwilioCredentialProvider, + TwilioPhoneNumber, + TwilioPhoneNumberFallbackDestination, + TwilioPhoneNumberFallbackDestination_Number, + TwilioPhoneNumberFallbackDestination_Sip, + TwilioPhoneNumberHooksItem, + TwilioPhoneNumberHooksItem_CallEnding, + TwilioPhoneNumberHooksItem_CallRinging, + TwilioPhoneNumberStatus, + TwilioSmsChatTransport, + TwilioSmsChatTransportConversationType, + TwilioSmsChatTransportType, + TwilioTransportMessage, + TwilioVoicemailDetectionPlan, + TwilioVoicemailDetectionPlanProvider, + TwilioVoicemailDetectionPlanVoicemailDetectionTypesItem, + UpdateAnthropicBedrockCredentialDto, + UpdateAnthropicBedrockCredentialDtoAuthenticationPlan, + UpdateAnthropicBedrockCredentialDtoAuthenticationPlan_AwsIam, + UpdateAnthropicBedrockCredentialDtoAuthenticationPlan_AwsSts, + UpdateAnthropicBedrockCredentialDtoRegion, + UpdateAnthropicCredentialDto, + UpdateAnyscaleCredentialDto, + UpdateApiRequestToolDto, + UpdateApiRequestToolDtoMessagesItem, + UpdateApiRequestToolDtoMessagesItem_RequestComplete, + UpdateApiRequestToolDtoMessagesItem_RequestFailed, + UpdateApiRequestToolDtoMessagesItem_RequestResponseDelayed, + UpdateApiRequestToolDtoMessagesItem_RequestStart, + UpdateApiRequestToolDtoMethod, + UpdateAssemblyAiCredentialDto, + UpdateAzureCredentialDto, + UpdateAzureCredentialDtoRegion, + UpdateAzureCredentialDtoService, + UpdateAzureOpenAiCredentialDto, + UpdateAzureOpenAiCredentialDtoModelsItem, + UpdateAzureOpenAiCredentialDtoRegion, + UpdateBarInsightFromCallTableDto, + UpdateBarInsightFromCallTableDtoGroupBy, + UpdateBarInsightFromCallTableDtoQueriesItem, + UpdateBashToolDto, + UpdateBashToolDtoMessagesItem, + UpdateBashToolDtoMessagesItem_RequestComplete, + UpdateBashToolDtoMessagesItem_RequestFailed, + UpdateBashToolDtoMessagesItem_RequestResponseDelayed, + UpdateBashToolDtoMessagesItem_RequestStart, + UpdateBashToolDtoName, + UpdateBashToolDtoSubType, + UpdateByoPhoneNumberDto, + UpdateByoPhoneNumberDtoFallbackDestination, + UpdateByoPhoneNumberDtoFallbackDestination_Number, + UpdateByoPhoneNumberDtoFallbackDestination_Sip, + UpdateByoPhoneNumberDtoHooksItem, + UpdateByoPhoneNumberDtoHooksItem_CallEnding, + UpdateByoPhoneNumberDtoHooksItem_CallRinging, + UpdateByoSipTrunkCredentialDto, + UpdateCartesiaCredentialDto, + UpdateCerebrasCredentialDto, + UpdateCloudflareCredentialDto, + UpdateCodeToolDto, + UpdateCodeToolDtoMessagesItem, + UpdateCodeToolDtoMessagesItem_RequestComplete, + UpdateCodeToolDtoMessagesItem_RequestFailed, + UpdateCodeToolDtoMessagesItem_RequestResponseDelayed, + UpdateCodeToolDtoMessagesItem_RequestStart, + UpdateComputerToolDto, + UpdateComputerToolDtoMessagesItem, + UpdateComputerToolDtoMessagesItem_RequestComplete, + UpdateComputerToolDtoMessagesItem_RequestFailed, + UpdateComputerToolDtoMessagesItem_RequestResponseDelayed, + UpdateComputerToolDtoMessagesItem_RequestStart, + UpdateComputerToolDtoName, + UpdateComputerToolDtoSubType, + UpdateCustomCredentialDto, + UpdateCustomCredentialDtoAuthenticationPlan, + UpdateCustomCredentialDtoAuthenticationPlan_Bearer, + UpdateCustomCredentialDtoAuthenticationPlan_Hmac, + UpdateCustomCredentialDtoAuthenticationPlan_Oauth2, + UpdateCustomCredentialDtoEncryptionPlan, + UpdateCustomCredentialDtoEncryptionPlan_PublicKey, + UpdateCustomKnowledgeBaseDto, + UpdateCustomLlmCredentialDto, + UpdateDeepInfraCredentialDto, + UpdateDeepSeekCredentialDto, + UpdateDeepgramCredentialDto, + UpdateDtmfToolDto, + UpdateDtmfToolDtoMessagesItem, + UpdateDtmfToolDtoMessagesItem_RequestComplete, + UpdateDtmfToolDtoMessagesItem_RequestFailed, + UpdateDtmfToolDtoMessagesItem_RequestResponseDelayed, + UpdateDtmfToolDtoMessagesItem_RequestStart, + UpdateElevenLabsCredentialDto, + UpdateEmailCredentialDto, + UpdateEndCallToolDto, + UpdateEndCallToolDtoMessagesItem, + UpdateEndCallToolDtoMessagesItem_RequestComplete, + UpdateEndCallToolDtoMessagesItem_RequestFailed, + UpdateEndCallToolDtoMessagesItem_RequestResponseDelayed, + UpdateEndCallToolDtoMessagesItem_RequestStart, + UpdateFunctionToolDto, + UpdateFunctionToolDtoMessagesItem, + UpdateFunctionToolDtoMessagesItem_RequestComplete, + UpdateFunctionToolDtoMessagesItem_RequestFailed, + UpdateFunctionToolDtoMessagesItem_RequestResponseDelayed, + UpdateFunctionToolDtoMessagesItem_RequestStart, + UpdateGcpCredentialDto, + UpdateGhlToolDto, + UpdateGhlToolDtoMessagesItem, + UpdateGhlToolDtoMessagesItem_RequestComplete, + UpdateGhlToolDtoMessagesItem_RequestFailed, + UpdateGhlToolDtoMessagesItem_RequestResponseDelayed, + UpdateGhlToolDtoMessagesItem_RequestStart, + UpdateGladiaCredentialDto, + UpdateGoHighLevelCalendarAvailabilityToolDto, + UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem, + UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestComplete, + UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestFailed, + UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestResponseDelayed, + UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestStart, + UpdateGoHighLevelCalendarEventCreateToolDto, + UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem, + UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestComplete, + UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestFailed, + UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestResponseDelayed, + UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestStart, + UpdateGoHighLevelContactCreateToolDto, + UpdateGoHighLevelContactCreateToolDtoMessagesItem, + UpdateGoHighLevelContactCreateToolDtoMessagesItem_RequestComplete, + UpdateGoHighLevelContactCreateToolDtoMessagesItem_RequestFailed, + UpdateGoHighLevelContactCreateToolDtoMessagesItem_RequestResponseDelayed, + UpdateGoHighLevelContactCreateToolDtoMessagesItem_RequestStart, + UpdateGoHighLevelContactGetToolDto, + UpdateGoHighLevelContactGetToolDtoMessagesItem, + UpdateGoHighLevelContactGetToolDtoMessagesItem_RequestComplete, + UpdateGoHighLevelContactGetToolDtoMessagesItem_RequestFailed, + UpdateGoHighLevelContactGetToolDtoMessagesItem_RequestResponseDelayed, + UpdateGoHighLevelContactGetToolDtoMessagesItem_RequestStart, + UpdateGoHighLevelCredentialDto, + UpdateGoHighLevelMcpCredentialDto, + UpdateGoogleCalendarCheckAvailabilityToolDto, + UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem, + UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestComplete, + UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestFailed, + UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestResponseDelayed, + UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestStart, + UpdateGoogleCalendarCreateEventToolDto, + UpdateGoogleCalendarCreateEventToolDtoMessagesItem, + UpdateGoogleCalendarCreateEventToolDtoMessagesItem_RequestComplete, + UpdateGoogleCalendarCreateEventToolDtoMessagesItem_RequestFailed, + UpdateGoogleCalendarCreateEventToolDtoMessagesItem_RequestResponseDelayed, + UpdateGoogleCalendarCreateEventToolDtoMessagesItem_RequestStart, + UpdateGoogleCalendarOAuth2AuthorizationCredentialDto, + UpdateGoogleCalendarOAuth2ClientCredentialDto, + UpdateGoogleCredentialDto, + UpdateGoogleSheetsOAuth2AuthorizationCredentialDto, + UpdateGoogleSheetsRowAppendToolDto, + UpdateGoogleSheetsRowAppendToolDtoMessagesItem, + UpdateGoogleSheetsRowAppendToolDtoMessagesItem_RequestComplete, + UpdateGoogleSheetsRowAppendToolDtoMessagesItem_RequestFailed, + UpdateGoogleSheetsRowAppendToolDtoMessagesItem_RequestResponseDelayed, + UpdateGoogleSheetsRowAppendToolDtoMessagesItem_RequestStart, + UpdateGroqCredentialDto, + UpdateHandoffToolDto, + UpdateHandoffToolDtoDestinationsItem, + UpdateHandoffToolDtoDestinationsItem_Assistant, + UpdateHandoffToolDtoDestinationsItem_Dynamic, + UpdateHandoffToolDtoDestinationsItem_Squad, + UpdateHandoffToolDtoMessagesItem, + UpdateHandoffToolDtoMessagesItem_RequestComplete, + UpdateHandoffToolDtoMessagesItem_RequestFailed, + UpdateHandoffToolDtoMessagesItem_RequestResponseDelayed, + UpdateHandoffToolDtoMessagesItem_RequestStart, + UpdateHumeCredentialDto, + UpdateInflectionAiCredentialDto, + UpdateInworldCredentialDto, + UpdateLangfuseCredentialDto, + UpdateLineInsightFromCallTableDto, + UpdateLineInsightFromCallTableDtoGroupBy, + UpdateLineInsightFromCallTableDtoQueriesItem, + UpdateLmntCredentialDto, + UpdateMakeCredentialDto, + UpdateMakeToolDto, + UpdateMakeToolDtoMessagesItem, + UpdateMakeToolDtoMessagesItem_RequestComplete, + UpdateMakeToolDtoMessagesItem_RequestFailed, + UpdateMakeToolDtoMessagesItem_RequestResponseDelayed, + UpdateMakeToolDtoMessagesItem_RequestStart, + UpdateMcpToolDto, + UpdateMcpToolDtoMessagesItem, + UpdateMcpToolDtoMessagesItem_RequestComplete, + UpdateMcpToolDtoMessagesItem_RequestFailed, + UpdateMcpToolDtoMessagesItem_RequestResponseDelayed, + UpdateMcpToolDtoMessagesItem_RequestStart, + UpdateMistralCredentialDto, + UpdateNeuphonicCredentialDto, + UpdateOpenAiCredentialDto, + UpdateOpenRouterCredentialDto, + UpdateOrgDto, + UpdateOrgDtoChannel, + UpdateOutputToolDto, + UpdateOutputToolDtoMessagesItem, + UpdateOutputToolDtoMessagesItem_RequestComplete, + UpdateOutputToolDtoMessagesItem_RequestFailed, + UpdateOutputToolDtoMessagesItem_RequestResponseDelayed, + UpdateOutputToolDtoMessagesItem_RequestStart, + UpdatePerplexityAiCredentialDto, + UpdatePersonalityDto, + UpdatePieInsightFromCallTableDto, + UpdatePieInsightFromCallTableDtoGroupBy, + UpdatePieInsightFromCallTableDtoQueriesItem, + UpdatePlayHtCredentialDto, + UpdateQueryToolDto, + UpdateQueryToolDtoMessagesItem, + UpdateQueryToolDtoMessagesItem_RequestComplete, + UpdateQueryToolDtoMessagesItem_RequestFailed, + UpdateQueryToolDtoMessagesItem_RequestResponseDelayed, + UpdateQueryToolDtoMessagesItem_RequestStart, + UpdateRimeAiCredentialDto, + UpdateRunpodCredentialDto, + UpdateS3CredentialDto, + UpdateScenarioDto, + UpdateScenarioDtoHooksItem, + UpdateScenarioDtoHooksItem_SimulationRunEnded, + UpdateScenarioDtoHooksItem_SimulationRunStarted, + UpdateSimulationDto, + UpdateSimulationSuiteDto, + UpdateSipRequestToolDto, + UpdateSipRequestToolDtoBody, + UpdateSipRequestToolDtoMessagesItem, + UpdateSipRequestToolDtoMessagesItem_RequestComplete, + UpdateSipRequestToolDtoMessagesItem_RequestFailed, + UpdateSipRequestToolDtoMessagesItem_RequestResponseDelayed, + UpdateSipRequestToolDtoMessagesItem_RequestStart, + UpdateSipRequestToolDtoVerb, + UpdateSlackOAuth2AuthorizationCredentialDto, + UpdateSlackSendMessageToolDto, + UpdateSlackSendMessageToolDtoMessagesItem, + UpdateSlackSendMessageToolDtoMessagesItem_RequestComplete, + UpdateSlackSendMessageToolDtoMessagesItem_RequestFailed, + UpdateSlackSendMessageToolDtoMessagesItem_RequestResponseDelayed, + UpdateSlackSendMessageToolDtoMessagesItem_RequestStart, + UpdateSlackWebhookCredentialDto, + UpdateSmsToolDto, + UpdateSmsToolDtoMessagesItem, + UpdateSmsToolDtoMessagesItem_RequestComplete, + UpdateSmsToolDtoMessagesItem_RequestFailed, + UpdateSmsToolDtoMessagesItem_RequestResponseDelayed, + UpdateSmsToolDtoMessagesItem_RequestStart, + UpdateSonioxCredentialDto, + UpdateTelnyxPhoneNumberDto, + UpdateTelnyxPhoneNumberDtoFallbackDestination, + UpdateTelnyxPhoneNumberDtoFallbackDestination_Number, + UpdateTelnyxPhoneNumberDtoFallbackDestination_Sip, + UpdateTelnyxPhoneNumberDtoHooksItem, + UpdateTelnyxPhoneNumberDtoHooksItem_CallEnding, + UpdateTelnyxPhoneNumberDtoHooksItem_CallRinging, + UpdateTestSuiteDto, + UpdateTestSuiteRunDto, + UpdateTestSuiteTestChatDto, + UpdateTestSuiteTestChatDtoType, + UpdateTestSuiteTestVoiceDto, + UpdateTestSuiteTestVoiceDtoType, + UpdateTextEditorToolDto, + UpdateTextEditorToolDtoMessagesItem, + UpdateTextEditorToolDtoMessagesItem_RequestComplete, + UpdateTextEditorToolDtoMessagesItem_RequestFailed, + UpdateTextEditorToolDtoMessagesItem_RequestResponseDelayed, + UpdateTextEditorToolDtoMessagesItem_RequestStart, + UpdateTextEditorToolDtoName, + UpdateTextEditorToolDtoSubType, + UpdateTextInsightFromCallTableDto, + UpdateTextInsightFromCallTableDtoQueriesItem, + UpdateTogetherAiCredentialDto, + UpdateTokenDto, + UpdateTokenDtoTag, + UpdateToolTemplateDto, + UpdateToolTemplateDtoDetails, + UpdateToolTemplateDtoDetails_ApiRequest, + UpdateToolTemplateDtoDetails_Bash, + UpdateToolTemplateDtoDetails_Code, + UpdateToolTemplateDtoDetails_Computer, + UpdateToolTemplateDtoDetails_Dtmf, + UpdateToolTemplateDtoDetails_EndCall, + UpdateToolTemplateDtoDetails_Function, + UpdateToolTemplateDtoDetails_GohighlevelCalendarAvailabilityCheck, + UpdateToolTemplateDtoDetails_GohighlevelCalendarEventCreate, + UpdateToolTemplateDtoDetails_GohighlevelContactCreate, + UpdateToolTemplateDtoDetails_GohighlevelContactGet, + UpdateToolTemplateDtoDetails_GoogleCalendarAvailabilityCheck, + UpdateToolTemplateDtoDetails_GoogleCalendarEventCreate, + UpdateToolTemplateDtoDetails_GoogleSheetsRowAppend, + UpdateToolTemplateDtoDetails_Handoff, + UpdateToolTemplateDtoDetails_Mcp, + UpdateToolTemplateDtoDetails_Query, + UpdateToolTemplateDtoDetails_SipRequest, + UpdateToolTemplateDtoDetails_SlackMessageSend, + UpdateToolTemplateDtoDetails_Sms, + UpdateToolTemplateDtoDetails_TextEditor, + UpdateToolTemplateDtoDetails_TransferCall, + UpdateToolTemplateDtoDetails_Voicemail, + UpdateToolTemplateDtoProvider, + UpdateToolTemplateDtoProviderDetails, + UpdateToolTemplateDtoProviderDetails_Function, + UpdateToolTemplateDtoProviderDetails_Ghl, + UpdateToolTemplateDtoProviderDetails_GohighlevelCalendarAvailabilityCheck, + UpdateToolTemplateDtoProviderDetails_GohighlevelCalendarEventCreate, + UpdateToolTemplateDtoProviderDetails_GohighlevelContactCreate, + UpdateToolTemplateDtoProviderDetails_GohighlevelContactGet, + UpdateToolTemplateDtoProviderDetails_GoogleCalendarEventCreate, + UpdateToolTemplateDtoProviderDetails_GoogleSheetsRowAppend, + UpdateToolTemplateDtoProviderDetails_Make, + UpdateToolTemplateDtoType, + UpdateToolTemplateDtoVisibility, + UpdateTransferCallToolDto, + UpdateTransferCallToolDtoDestinationsItem, + UpdateTransferCallToolDtoDestinationsItem_Assistant, + UpdateTransferCallToolDtoDestinationsItem_Number, + UpdateTransferCallToolDtoDestinationsItem_Sip, + UpdateTransferCallToolDtoMessagesItem, + UpdateTransferCallToolDtoMessagesItem_RequestComplete, + UpdateTransferCallToolDtoMessagesItem_RequestFailed, + UpdateTransferCallToolDtoMessagesItem_RequestResponseDelayed, + UpdateTransferCallToolDtoMessagesItem_RequestStart, + UpdateTrieveCredentialDto, + UpdateTrieveKnowledgeBaseDto, + UpdateTwilioCredentialDto, + UpdateTwilioPhoneNumberDto, + UpdateTwilioPhoneNumberDtoFallbackDestination, + UpdateTwilioPhoneNumberDtoFallbackDestination_Number, + UpdateTwilioPhoneNumberDtoFallbackDestination_Sip, + UpdateTwilioPhoneNumberDtoHooksItem, + UpdateTwilioPhoneNumberDtoHooksItem_CallEnding, + UpdateTwilioPhoneNumberDtoHooksItem_CallRinging, + UpdateUserRoleDto, + UpdateUserRoleDtoRole, + UpdateVapiPhoneNumberDto, + UpdateVapiPhoneNumberDtoFallbackDestination, + UpdateVapiPhoneNumberDtoFallbackDestination_Number, + UpdateVapiPhoneNumberDtoFallbackDestination_Sip, + UpdateVapiPhoneNumberDtoHooksItem, + UpdateVapiPhoneNumberDtoHooksItem_CallEnding, + UpdateVapiPhoneNumberDtoHooksItem_CallRinging, + UpdateVoicemailToolDto, + UpdateVoicemailToolDtoMessagesItem, + UpdateVoicemailToolDtoMessagesItem_RequestComplete, + UpdateVoicemailToolDtoMessagesItem_RequestFailed, + UpdateVoicemailToolDtoMessagesItem_RequestResponseDelayed, + UpdateVoicemailToolDtoMessagesItem_RequestStart, + UpdateVonageCredentialDto, + UpdateVonagePhoneNumberDto, + UpdateVonagePhoneNumberDtoFallbackDestination, + UpdateVonagePhoneNumberDtoFallbackDestination_Number, + UpdateVonagePhoneNumberDtoFallbackDestination_Sip, + UpdateVonagePhoneNumberDtoHooksItem, + UpdateVonagePhoneNumberDtoHooksItem_CallEnding, + UpdateVonagePhoneNumberDtoHooksItem_CallRinging, + UpdateWebhookCredentialDto, + UpdateWebhookCredentialDtoAuthenticationPlan, + UpdateWebhookCredentialDtoAuthenticationPlan_Bearer, + UpdateWebhookCredentialDtoAuthenticationPlan_Hmac, + UpdateWebhookCredentialDtoAuthenticationPlan_Oauth2, + UpdateWellSaidCredentialDto, + UpdateWorkflowDto, + UpdateWorkflowDtoBackgroundSound, + UpdateWorkflowDtoBackgroundSoundZero, + UpdateWorkflowDtoCredentialsItem, + UpdateWorkflowDtoCredentialsItem_11Labs, + UpdateWorkflowDtoCredentialsItem_Anthropic, + UpdateWorkflowDtoCredentialsItem_AnthropicBedrock, + UpdateWorkflowDtoCredentialsItem_Anyscale, + UpdateWorkflowDtoCredentialsItem_AssemblyAi, + UpdateWorkflowDtoCredentialsItem_Azure, + UpdateWorkflowDtoCredentialsItem_AzureOpenai, + UpdateWorkflowDtoCredentialsItem_ByoSipTrunk, + UpdateWorkflowDtoCredentialsItem_Cartesia, + UpdateWorkflowDtoCredentialsItem_Cerebras, + UpdateWorkflowDtoCredentialsItem_Cloudflare, + UpdateWorkflowDtoCredentialsItem_CustomCredential, + UpdateWorkflowDtoCredentialsItem_CustomLlm, + UpdateWorkflowDtoCredentialsItem_DeepSeek, + UpdateWorkflowDtoCredentialsItem_Deepgram, + UpdateWorkflowDtoCredentialsItem_Deepinfra, + UpdateWorkflowDtoCredentialsItem_Email, + UpdateWorkflowDtoCredentialsItem_Gcp, + UpdateWorkflowDtoCredentialsItem_GhlOauth2Authorization, + UpdateWorkflowDtoCredentialsItem_Gladia, + UpdateWorkflowDtoCredentialsItem_Gohighlevel, + UpdateWorkflowDtoCredentialsItem_Google, + UpdateWorkflowDtoCredentialsItem_GoogleCalendarOauth2Authorization, + UpdateWorkflowDtoCredentialsItem_GoogleCalendarOauth2Client, + UpdateWorkflowDtoCredentialsItem_GoogleSheetsOauth2Authorization, + UpdateWorkflowDtoCredentialsItem_Groq, + UpdateWorkflowDtoCredentialsItem_Hume, + UpdateWorkflowDtoCredentialsItem_InflectionAi, + UpdateWorkflowDtoCredentialsItem_Inworld, + UpdateWorkflowDtoCredentialsItem_Langfuse, + UpdateWorkflowDtoCredentialsItem_Lmnt, + UpdateWorkflowDtoCredentialsItem_Make, + UpdateWorkflowDtoCredentialsItem_Minimax, + UpdateWorkflowDtoCredentialsItem_Mistral, + UpdateWorkflowDtoCredentialsItem_Neuphonic, + UpdateWorkflowDtoCredentialsItem_Openai, + UpdateWorkflowDtoCredentialsItem_Openrouter, + UpdateWorkflowDtoCredentialsItem_PerplexityAi, + UpdateWorkflowDtoCredentialsItem_Playht, + UpdateWorkflowDtoCredentialsItem_RimeAi, + UpdateWorkflowDtoCredentialsItem_Runpod, + UpdateWorkflowDtoCredentialsItem_S3, + UpdateWorkflowDtoCredentialsItem_SlackOauth2Authorization, + UpdateWorkflowDtoCredentialsItem_SlackWebhook, + UpdateWorkflowDtoCredentialsItem_SmallestAi, + UpdateWorkflowDtoCredentialsItem_Soniox, + UpdateWorkflowDtoCredentialsItem_Speechmatics, + UpdateWorkflowDtoCredentialsItem_Supabase, + UpdateWorkflowDtoCredentialsItem_Tavus, + UpdateWorkflowDtoCredentialsItem_TogetherAi, + UpdateWorkflowDtoCredentialsItem_Trieve, + UpdateWorkflowDtoCredentialsItem_Twilio, + UpdateWorkflowDtoCredentialsItem_Vonage, + UpdateWorkflowDtoCredentialsItem_Webhook, + UpdateWorkflowDtoCredentialsItem_Wellsaid, + UpdateWorkflowDtoCredentialsItem_Xai, + UpdateWorkflowDtoHooksItem, + UpdateWorkflowDtoModel, + UpdateWorkflowDtoModel_Anthropic, + UpdateWorkflowDtoModel_AnthropicBedrock, + UpdateWorkflowDtoModel_CustomLlm, + UpdateWorkflowDtoModel_Google, + UpdateWorkflowDtoModel_Openai, + UpdateWorkflowDtoNodesItem, + UpdateWorkflowDtoNodesItem_Conversation, + UpdateWorkflowDtoNodesItem_Tool, + UpdateWorkflowDtoTranscriber, + UpdateWorkflowDtoTranscriber_11Labs, + UpdateWorkflowDtoTranscriber_AssemblyAi, + UpdateWorkflowDtoTranscriber_Azure, + UpdateWorkflowDtoTranscriber_Cartesia, + UpdateWorkflowDtoTranscriber_CustomTranscriber, + UpdateWorkflowDtoTranscriber_Deepgram, + UpdateWorkflowDtoTranscriber_Gladia, + UpdateWorkflowDtoTranscriber_Google, + UpdateWorkflowDtoTranscriber_Openai, + UpdateWorkflowDtoTranscriber_Soniox, + UpdateWorkflowDtoTranscriber_Speechmatics, + UpdateWorkflowDtoTranscriber_Talkscriber, + UpdateWorkflowDtoVoice, + UpdateWorkflowDtoVoice_11Labs, + UpdateWorkflowDtoVoice_Azure, + UpdateWorkflowDtoVoice_Cartesia, + UpdateWorkflowDtoVoice_CustomVoice, + UpdateWorkflowDtoVoice_Deepgram, + UpdateWorkflowDtoVoice_Hume, + UpdateWorkflowDtoVoice_Inworld, + UpdateWorkflowDtoVoice_Lmnt, + UpdateWorkflowDtoVoice_Minimax, + UpdateWorkflowDtoVoice_Neuphonic, + UpdateWorkflowDtoVoice_Openai, + UpdateWorkflowDtoVoice_Playht, + UpdateWorkflowDtoVoice_RimeAi, + UpdateWorkflowDtoVoice_Sesame, + UpdateWorkflowDtoVoice_SmallestAi, + UpdateWorkflowDtoVoice_Tavus, + UpdateWorkflowDtoVoice_Vapi, + UpdateWorkflowDtoVoice_Wellsaid, + UpdateWorkflowDtoVoicemailDetection, + UpdateWorkflowDtoVoicemailDetectionZero, + UpdateXAiCredentialDto, + User, + UserMessage, + VapiCost, + VapiCostSubType, + VapiModel, + VapiModelProvider, + VapiModelToolsItem, + VapiModelToolsItem_ApiRequest, + VapiModelToolsItem_Bash, + VapiModelToolsItem_Code, + VapiModelToolsItem_Computer, + VapiModelToolsItem_Dtmf, + VapiModelToolsItem_EndCall, + VapiModelToolsItem_Function, + VapiModelToolsItem_GohighlevelCalendarAvailabilityCheck, + VapiModelToolsItem_GohighlevelCalendarEventCreate, + VapiModelToolsItem_GohighlevelContactCreate, + VapiModelToolsItem_GohighlevelContactGet, + VapiModelToolsItem_GoogleCalendarAvailabilityCheck, + VapiModelToolsItem_GoogleCalendarEventCreate, + VapiModelToolsItem_GoogleSheetsRowAppend, + VapiModelToolsItem_Handoff, + VapiModelToolsItem_Mcp, + VapiModelToolsItem_Query, + VapiModelToolsItem_SipRequest, + VapiModelToolsItem_SlackMessageSend, + VapiModelToolsItem_Sms, + VapiModelToolsItem_TextEditor, + VapiModelToolsItem_TransferCall, + VapiModelToolsItem_Voicemail, + VapiPhoneNumber, + VapiPhoneNumberFallbackDestination, + VapiPhoneNumberFallbackDestination_Number, + VapiPhoneNumberFallbackDestination_Sip, + VapiPhoneNumberHooksItem, + VapiPhoneNumberHooksItem_CallEnding, + VapiPhoneNumberHooksItem_CallRinging, + VapiPhoneNumberStatus, + VapiPronunciationDictionaryLocator, + VapiSipTransportMessage, + VapiSipTransportMessageSipVerb, + VapiSmartEndpointingPlan, + VapiSmartEndpointingPlanProvider, + VapiVoice, + VapiVoiceVoiceId, + VapiVoicemailDetectionPlan, + VapiVoicemailDetectionPlanProvider, + VapiVoicemailDetectionPlanType, + VariableExtractionAlias, + VariableExtractionPlan, + VariableValueGroupBy, + VoiceCost, + VoiceLibrary, + VoiceLibraryGender, + VoiceLibraryVoiceResponse, + VoicemailDetectionBackoffPlan, + VoicemailDetectionCost, + VoicemailDetectionCostProvider, + VoicemailTool, + VoicemailToolMessagesItem, + VoicemailToolMessagesItem_RequestComplete, + VoicemailToolMessagesItem_RequestFailed, + VoicemailToolMessagesItem_RequestResponseDelayed, + VoicemailToolMessagesItem_RequestStart, + VonageCredential, + VonageCredentialProvider, + VonagePhoneNumber, + VonagePhoneNumberFallbackDestination, + VonagePhoneNumberFallbackDestination_Number, + VonagePhoneNumberFallbackDestination_Sip, + VonagePhoneNumberHooksItem, + VonagePhoneNumberHooksItem_CallEnding, + VonagePhoneNumberHooksItem_CallRinging, + VonagePhoneNumberStatus, + WebChat, + WebChatOutputItem, + WebhookCredential, + WebhookCredentialAuthenticationPlan, + WebhookCredentialAuthenticationPlan_Bearer, + WebhookCredentialAuthenticationPlan_Hmac, + WebhookCredentialAuthenticationPlan_Oauth2, + WebhookCredentialProvider, + WellSaidCredential, + WellSaidCredentialProvider, + WellSaidVoice, + WellSaidVoiceModel, + Workflow, + WorkflowAnthropicBedrockModel, + WorkflowAnthropicBedrockModelModel, + WorkflowAnthropicModel, + WorkflowAnthropicModelModel, + WorkflowBackgroundSound, + WorkflowBackgroundSoundZero, + WorkflowCredentialsItem, + WorkflowCredentialsItem_11Labs, + WorkflowCredentialsItem_Anthropic, + WorkflowCredentialsItem_AnthropicBedrock, + WorkflowCredentialsItem_Anyscale, + WorkflowCredentialsItem_AssemblyAi, + WorkflowCredentialsItem_Azure, + WorkflowCredentialsItem_AzureOpenai, + WorkflowCredentialsItem_ByoSipTrunk, + WorkflowCredentialsItem_Cartesia, + WorkflowCredentialsItem_Cerebras, + WorkflowCredentialsItem_Cloudflare, + WorkflowCredentialsItem_CustomCredential, + WorkflowCredentialsItem_CustomLlm, + WorkflowCredentialsItem_DeepSeek, + WorkflowCredentialsItem_Deepgram, + WorkflowCredentialsItem_Deepinfra, + WorkflowCredentialsItem_Email, + WorkflowCredentialsItem_Gcp, + WorkflowCredentialsItem_GhlOauth2Authorization, + WorkflowCredentialsItem_Gladia, + WorkflowCredentialsItem_Gohighlevel, + WorkflowCredentialsItem_Google, + WorkflowCredentialsItem_GoogleCalendarOauth2Authorization, + WorkflowCredentialsItem_GoogleCalendarOauth2Client, + WorkflowCredentialsItem_GoogleSheetsOauth2Authorization, + WorkflowCredentialsItem_Groq, + WorkflowCredentialsItem_Hume, + WorkflowCredentialsItem_InflectionAi, + WorkflowCredentialsItem_Inworld, + WorkflowCredentialsItem_Langfuse, + WorkflowCredentialsItem_Lmnt, + WorkflowCredentialsItem_Make, + WorkflowCredentialsItem_Minimax, + WorkflowCredentialsItem_Mistral, + WorkflowCredentialsItem_Neuphonic, + WorkflowCredentialsItem_Openai, + WorkflowCredentialsItem_Openrouter, + WorkflowCredentialsItem_PerplexityAi, + WorkflowCredentialsItem_Playht, + WorkflowCredentialsItem_RimeAi, + WorkflowCredentialsItem_Runpod, + WorkflowCredentialsItem_S3, + WorkflowCredentialsItem_SlackOauth2Authorization, + WorkflowCredentialsItem_SlackWebhook, + WorkflowCredentialsItem_SmallestAi, + WorkflowCredentialsItem_Soniox, + WorkflowCredentialsItem_Speechmatics, + WorkflowCredentialsItem_Supabase, + WorkflowCredentialsItem_Tavus, + WorkflowCredentialsItem_TogetherAi, + WorkflowCredentialsItem_Trieve, + WorkflowCredentialsItem_Twilio, + WorkflowCredentialsItem_Vonage, + WorkflowCredentialsItem_Webhook, + WorkflowCredentialsItem_Wellsaid, + WorkflowCredentialsItem_Xai, + WorkflowCustomModel, + WorkflowCustomModelMetadataSendMode, + WorkflowGoogleModel, + WorkflowGoogleModelModel, + WorkflowHooksItem, + WorkflowModel, + WorkflowModel_Anthropic, + WorkflowModel_AnthropicBedrock, + WorkflowModel_CustomLlm, + WorkflowModel_Google, + WorkflowModel_Openai, + WorkflowNodesItem, + WorkflowNodesItem_Conversation, + WorkflowNodesItem_Tool, + WorkflowOpenAiModel, + WorkflowOpenAiModelModel, + WorkflowOverrides, + WorkflowTranscriber, + WorkflowTranscriber_11Labs, + WorkflowTranscriber_AssemblyAi, + WorkflowTranscriber_Azure, + WorkflowTranscriber_Cartesia, + WorkflowTranscriber_CustomTranscriber, + WorkflowTranscriber_Deepgram, + WorkflowTranscriber_Gladia, + WorkflowTranscriber_Google, + WorkflowTranscriber_Openai, + WorkflowTranscriber_Soniox, + WorkflowTranscriber_Speechmatics, + WorkflowTranscriber_Talkscriber, + WorkflowUserEditable, + WorkflowUserEditableBackgroundSound, + WorkflowUserEditableBackgroundSoundZero, + WorkflowUserEditableCredentialsItem, + WorkflowUserEditableCredentialsItem_11Labs, + WorkflowUserEditableCredentialsItem_Anthropic, + WorkflowUserEditableCredentialsItem_AnthropicBedrock, + WorkflowUserEditableCredentialsItem_Anyscale, + WorkflowUserEditableCredentialsItem_AssemblyAi, + WorkflowUserEditableCredentialsItem_Azure, + WorkflowUserEditableCredentialsItem_AzureOpenai, + WorkflowUserEditableCredentialsItem_ByoSipTrunk, + WorkflowUserEditableCredentialsItem_Cartesia, + WorkflowUserEditableCredentialsItem_Cerebras, + WorkflowUserEditableCredentialsItem_Cloudflare, + WorkflowUserEditableCredentialsItem_CustomCredential, + WorkflowUserEditableCredentialsItem_CustomLlm, + WorkflowUserEditableCredentialsItem_DeepSeek, + WorkflowUserEditableCredentialsItem_Deepgram, + WorkflowUserEditableCredentialsItem_Deepinfra, + WorkflowUserEditableCredentialsItem_Email, + WorkflowUserEditableCredentialsItem_Gcp, + WorkflowUserEditableCredentialsItem_GhlOauth2Authorization, + WorkflowUserEditableCredentialsItem_Gladia, + WorkflowUserEditableCredentialsItem_Gohighlevel, + WorkflowUserEditableCredentialsItem_Google, + WorkflowUserEditableCredentialsItem_GoogleCalendarOauth2Authorization, + WorkflowUserEditableCredentialsItem_GoogleCalendarOauth2Client, + WorkflowUserEditableCredentialsItem_GoogleSheetsOauth2Authorization, + WorkflowUserEditableCredentialsItem_Groq, + WorkflowUserEditableCredentialsItem_Hume, + WorkflowUserEditableCredentialsItem_InflectionAi, + WorkflowUserEditableCredentialsItem_Inworld, + WorkflowUserEditableCredentialsItem_Langfuse, + WorkflowUserEditableCredentialsItem_Lmnt, + WorkflowUserEditableCredentialsItem_Make, + WorkflowUserEditableCredentialsItem_Minimax, + WorkflowUserEditableCredentialsItem_Mistral, + WorkflowUserEditableCredentialsItem_Neuphonic, + WorkflowUserEditableCredentialsItem_Openai, + WorkflowUserEditableCredentialsItem_Openrouter, + WorkflowUserEditableCredentialsItem_PerplexityAi, + WorkflowUserEditableCredentialsItem_Playht, + WorkflowUserEditableCredentialsItem_RimeAi, + WorkflowUserEditableCredentialsItem_Runpod, + WorkflowUserEditableCredentialsItem_S3, + WorkflowUserEditableCredentialsItem_SlackOauth2Authorization, + WorkflowUserEditableCredentialsItem_SlackWebhook, + WorkflowUserEditableCredentialsItem_SmallestAi, + WorkflowUserEditableCredentialsItem_Soniox, + WorkflowUserEditableCredentialsItem_Speechmatics, + WorkflowUserEditableCredentialsItem_Supabase, + WorkflowUserEditableCredentialsItem_Tavus, + WorkflowUserEditableCredentialsItem_TogetherAi, + WorkflowUserEditableCredentialsItem_Trieve, + WorkflowUserEditableCredentialsItem_Twilio, + WorkflowUserEditableCredentialsItem_Vonage, + WorkflowUserEditableCredentialsItem_Webhook, + WorkflowUserEditableCredentialsItem_Wellsaid, + WorkflowUserEditableCredentialsItem_Xai, + WorkflowUserEditableHooksItem, + WorkflowUserEditableModel, + WorkflowUserEditableModel_Anthropic, + WorkflowUserEditableModel_AnthropicBedrock, + WorkflowUserEditableModel_CustomLlm, + WorkflowUserEditableModel_Google, + WorkflowUserEditableModel_Openai, + WorkflowUserEditableNodesItem, + WorkflowUserEditableNodesItem_Conversation, + WorkflowUserEditableNodesItem_Tool, + WorkflowUserEditableTranscriber, + WorkflowUserEditableTranscriber_11Labs, + WorkflowUserEditableTranscriber_AssemblyAi, + WorkflowUserEditableTranscriber_Azure, + WorkflowUserEditableTranscriber_Cartesia, + WorkflowUserEditableTranscriber_CustomTranscriber, + WorkflowUserEditableTranscriber_Deepgram, + WorkflowUserEditableTranscriber_Gladia, + WorkflowUserEditableTranscriber_Google, + WorkflowUserEditableTranscriber_Openai, + WorkflowUserEditableTranscriber_Soniox, + WorkflowUserEditableTranscriber_Speechmatics, + WorkflowUserEditableTranscriber_Talkscriber, + WorkflowUserEditableVoice, + WorkflowUserEditableVoice_11Labs, + WorkflowUserEditableVoice_Azure, + WorkflowUserEditableVoice_Cartesia, + WorkflowUserEditableVoice_CustomVoice, + WorkflowUserEditableVoice_Deepgram, + WorkflowUserEditableVoice_Hume, + WorkflowUserEditableVoice_Inworld, + WorkflowUserEditableVoice_Lmnt, + WorkflowUserEditableVoice_Minimax, + WorkflowUserEditableVoice_Neuphonic, + WorkflowUserEditableVoice_Openai, + WorkflowUserEditableVoice_Playht, + WorkflowUserEditableVoice_RimeAi, + WorkflowUserEditableVoice_Sesame, + WorkflowUserEditableVoice_SmallestAi, + WorkflowUserEditableVoice_Tavus, + WorkflowUserEditableVoice_Vapi, + WorkflowUserEditableVoice_Wellsaid, + WorkflowUserEditableVoicemailDetection, + WorkflowUserEditableVoicemailDetectionZero, + WorkflowVoice, + WorkflowVoice_11Labs, + WorkflowVoice_Azure, + WorkflowVoice_Cartesia, + WorkflowVoice_CustomVoice, + WorkflowVoice_Deepgram, + WorkflowVoice_Hume, + WorkflowVoice_Inworld, + WorkflowVoice_Lmnt, + WorkflowVoice_Minimax, + WorkflowVoice_Neuphonic, + WorkflowVoice_Openai, + WorkflowVoice_Playht, + WorkflowVoice_RimeAi, + WorkflowVoice_Sesame, + WorkflowVoice_SmallestAi, + WorkflowVoice_Tavus, + WorkflowVoice_Vapi, + WorkflowVoice_Wellsaid, + WorkflowVoicemailDetection, + WorkflowVoicemailDetectionZero, + XAiCredential, + XAiCredentialProvider, + XaiModel, + XaiModelModel, + XaiModelToolsItem, + XaiModelToolsItem_ApiRequest, + XaiModelToolsItem_Bash, + XaiModelToolsItem_Code, + XaiModelToolsItem_Computer, + XaiModelToolsItem_Dtmf, + XaiModelToolsItem_EndCall, + XaiModelToolsItem_Function, + XaiModelToolsItem_GohighlevelCalendarAvailabilityCheck, + XaiModelToolsItem_GohighlevelCalendarEventCreate, + XaiModelToolsItem_GohighlevelContactCreate, + XaiModelToolsItem_GohighlevelContactGet, + XaiModelToolsItem_GoogleCalendarAvailabilityCheck, + XaiModelToolsItem_GoogleCalendarEventCreate, + XaiModelToolsItem_GoogleSheetsRowAppend, + XaiModelToolsItem_Handoff, + XaiModelToolsItem_Mcp, + XaiModelToolsItem_Query, + XaiModelToolsItem_SipRequest, + XaiModelToolsItem_SlackMessageSend, + XaiModelToolsItem_Sms, + XaiModelToolsItem_TextEditor, + XaiModelToolsItem_TransferCall, + XaiModelToolsItem_Voicemail, + XssSecurityFilter, + XssSecurityFilterType, + ) + from .errors import BadRequestError, NotFoundError + from . import ( + analytics, + assistants, + calls, + campaigns, + chats, + eval, + files, + insight, + observability_scorecard, + phone_numbers, + provider_resources, + sessions, + squads, + structured_outputs, + tools, + ) + from ._default_clients import DefaultAioHttpClient, DefaultAsyncHttpxClient + from .assistants import ( + UpdateAssistantDtoBackgroundSound, + UpdateAssistantDtoBackgroundSoundZero, + UpdateAssistantDtoClientMessagesItem, + UpdateAssistantDtoCredentialsItem, + UpdateAssistantDtoCredentialsItem_11Labs, + UpdateAssistantDtoCredentialsItem_Anthropic, + UpdateAssistantDtoCredentialsItem_AnthropicBedrock, + UpdateAssistantDtoCredentialsItem_Anyscale, + UpdateAssistantDtoCredentialsItem_AssemblyAi, + UpdateAssistantDtoCredentialsItem_Azure, + UpdateAssistantDtoCredentialsItem_AzureOpenai, + UpdateAssistantDtoCredentialsItem_ByoSipTrunk, + UpdateAssistantDtoCredentialsItem_Cartesia, + UpdateAssistantDtoCredentialsItem_Cerebras, + UpdateAssistantDtoCredentialsItem_Cloudflare, + UpdateAssistantDtoCredentialsItem_CustomCredential, + UpdateAssistantDtoCredentialsItem_CustomLlm, + UpdateAssistantDtoCredentialsItem_DeepSeek, + UpdateAssistantDtoCredentialsItem_Deepgram, + UpdateAssistantDtoCredentialsItem_Deepinfra, + UpdateAssistantDtoCredentialsItem_Email, + UpdateAssistantDtoCredentialsItem_Gcp, + UpdateAssistantDtoCredentialsItem_GhlOauth2Authorization, + UpdateAssistantDtoCredentialsItem_Gladia, + UpdateAssistantDtoCredentialsItem_Gohighlevel, + UpdateAssistantDtoCredentialsItem_Google, + UpdateAssistantDtoCredentialsItem_GoogleCalendarOauth2Authorization, + UpdateAssistantDtoCredentialsItem_GoogleCalendarOauth2Client, + UpdateAssistantDtoCredentialsItem_GoogleSheetsOauth2Authorization, + UpdateAssistantDtoCredentialsItem_Groq, + UpdateAssistantDtoCredentialsItem_Hume, + UpdateAssistantDtoCredentialsItem_InflectionAi, + UpdateAssistantDtoCredentialsItem_Inworld, + UpdateAssistantDtoCredentialsItem_Langfuse, + UpdateAssistantDtoCredentialsItem_Lmnt, + UpdateAssistantDtoCredentialsItem_Make, + UpdateAssistantDtoCredentialsItem_Minimax, + UpdateAssistantDtoCredentialsItem_Mistral, + UpdateAssistantDtoCredentialsItem_Neuphonic, + UpdateAssistantDtoCredentialsItem_Openai, + UpdateAssistantDtoCredentialsItem_Openrouter, + UpdateAssistantDtoCredentialsItem_PerplexityAi, + UpdateAssistantDtoCredentialsItem_Playht, + UpdateAssistantDtoCredentialsItem_RimeAi, + UpdateAssistantDtoCredentialsItem_Runpod, + UpdateAssistantDtoCredentialsItem_S3, + UpdateAssistantDtoCredentialsItem_SlackOauth2Authorization, + UpdateAssistantDtoCredentialsItem_SlackWebhook, + UpdateAssistantDtoCredentialsItem_SmallestAi, + UpdateAssistantDtoCredentialsItem_Soniox, + UpdateAssistantDtoCredentialsItem_Speechmatics, + UpdateAssistantDtoCredentialsItem_Supabase, + UpdateAssistantDtoCredentialsItem_Tavus, + UpdateAssistantDtoCredentialsItem_TogetherAi, + UpdateAssistantDtoCredentialsItem_Trieve, + UpdateAssistantDtoCredentialsItem_Twilio, + UpdateAssistantDtoCredentialsItem_Vonage, + UpdateAssistantDtoCredentialsItem_Webhook, + UpdateAssistantDtoCredentialsItem_Wellsaid, + UpdateAssistantDtoCredentialsItem_Xai, + UpdateAssistantDtoFirstMessageMode, + UpdateAssistantDtoHooksItem, + UpdateAssistantDtoModel, + UpdateAssistantDtoModel_Anthropic, + UpdateAssistantDtoModel_AnthropicBedrock, + UpdateAssistantDtoModel_Anyscale, + UpdateAssistantDtoModel_Cerebras, + UpdateAssistantDtoModel_CustomLlm, + UpdateAssistantDtoModel_DeepSeek, + UpdateAssistantDtoModel_Deepinfra, + UpdateAssistantDtoModel_Google, + UpdateAssistantDtoModel_Groq, + UpdateAssistantDtoModel_InflectionAi, + UpdateAssistantDtoModel_Minimax, + UpdateAssistantDtoModel_Openai, + UpdateAssistantDtoModel_Openrouter, + UpdateAssistantDtoModel_PerplexityAi, + UpdateAssistantDtoModel_TogetherAi, + UpdateAssistantDtoModel_Xai, + UpdateAssistantDtoServerMessagesItem, + UpdateAssistantDtoTranscriber, + UpdateAssistantDtoTranscriber_11Labs, + UpdateAssistantDtoTranscriber_AssemblyAi, + UpdateAssistantDtoTranscriber_Azure, + UpdateAssistantDtoTranscriber_Cartesia, + UpdateAssistantDtoTranscriber_CustomTranscriber, + UpdateAssistantDtoTranscriber_Deepgram, + UpdateAssistantDtoTranscriber_Gladia, + UpdateAssistantDtoTranscriber_Google, + UpdateAssistantDtoTranscriber_Openai, + UpdateAssistantDtoTranscriber_Soniox, + UpdateAssistantDtoTranscriber_Speechmatics, + UpdateAssistantDtoTranscriber_Talkscriber, + UpdateAssistantDtoVoice, + UpdateAssistantDtoVoice_11Labs, + UpdateAssistantDtoVoice_Azure, + UpdateAssistantDtoVoice_Cartesia, + UpdateAssistantDtoVoice_CustomVoice, + UpdateAssistantDtoVoice_Deepgram, + UpdateAssistantDtoVoice_Hume, + UpdateAssistantDtoVoice_Inworld, + UpdateAssistantDtoVoice_Lmnt, + UpdateAssistantDtoVoice_Minimax, + UpdateAssistantDtoVoice_Neuphonic, + UpdateAssistantDtoVoice_Openai, + UpdateAssistantDtoVoice_Playht, + UpdateAssistantDtoVoice_RimeAi, + UpdateAssistantDtoVoice_Sesame, + UpdateAssistantDtoVoice_SmallestAi, + UpdateAssistantDtoVoice_Tavus, + UpdateAssistantDtoVoice_Vapi, + UpdateAssistantDtoVoice_Wellsaid, + UpdateAssistantDtoVoicemailDetection, + UpdateAssistantDtoVoicemailDetectionZero, + ) + from .calls import CreateCallsResponse + from .campaigns import ( + CampaignControllerFindAllRequestSortOrder, + CampaignControllerFindAllRequestStatus, + UpdateCampaignDtoStatus, + ) + from .chats import ( + CreateChatDtoInput, + CreateChatDtoInputOneItem, + CreateChatsResponse, + CreateResponseChatsResponse, + ListChatsRequestSortOrder, + OpenAiResponsesRequestInput, + OpenAiResponsesRequestInputOneItem, + ) + from .client import AsyncVapi, Vapi + from .environment import VapiEnvironment + from .eval import ( + CreateEvalRunDtoTarget, + CreateEvalRunDtoTarget_Assistant, + CreateEvalRunDtoTarget_Squad, + CreateEvalRunDtoType, + EvalControllerGetPaginatedRequestSortOrder, + EvalControllerGetRunsPaginatedRequestSortOrder, + UpdateEvalDtoMessagesItem, + UpdateEvalDtoType, + ) + from .insight import ( + InsightControllerCreateRequest, + InsightControllerCreateRequest_Bar, + InsightControllerCreateRequest_Line, + InsightControllerCreateRequest_Pie, + InsightControllerCreateRequest_Text, + InsightControllerCreateResponse, + InsightControllerCreateResponse_Bar, + InsightControllerCreateResponse_Line, + InsightControllerCreateResponse_Pie, + InsightControllerCreateResponse_Text, + InsightControllerFindAllRequestSortOrder, + InsightControllerFindOneResponse, + InsightControllerFindOneResponse_Bar, + InsightControllerFindOneResponse_Line, + InsightControllerFindOneResponse_Pie, + InsightControllerFindOneResponse_Text, + InsightControllerPreviewRequest, + InsightControllerPreviewRequest_Bar, + InsightControllerPreviewRequest_Line, + InsightControllerPreviewRequest_Pie, + InsightControllerPreviewRequest_Text, + InsightControllerRemoveResponse, + InsightControllerRemoveResponse_Bar, + InsightControllerRemoveResponse_Line, + InsightControllerRemoveResponse_Pie, + InsightControllerRemoveResponse_Text, + InsightControllerUpdateRequestBody, + InsightControllerUpdateRequestBody_Bar, + InsightControllerUpdateRequestBody_Line, + InsightControllerUpdateRequestBody_Pie, + InsightControllerUpdateRequestBody_Text, + InsightControllerUpdateResponse, + InsightControllerUpdateResponse_Bar, + InsightControllerUpdateResponse_Line, + InsightControllerUpdateResponse_Pie, + InsightControllerUpdateResponse_Text, + ) + from .observability_scorecard import ScorecardControllerGetPaginatedRequestSortOrder + from .phone_numbers import ( + CreatePhoneNumbersRequest, + CreatePhoneNumbersRequest_ByoPhoneNumber, + CreatePhoneNumbersRequest_Telnyx, + CreatePhoneNumbersRequest_Twilio, + CreatePhoneNumbersRequest_Vapi, + CreatePhoneNumbersRequest_Vonage, + CreatePhoneNumbersResponse, + CreatePhoneNumbersResponse_ByoPhoneNumber, + CreatePhoneNumbersResponse_Telnyx, + CreatePhoneNumbersResponse_Twilio, + CreatePhoneNumbersResponse_Vapi, + CreatePhoneNumbersResponse_Vonage, + DeletePhoneNumbersResponse, + DeletePhoneNumbersResponse_ByoPhoneNumber, + DeletePhoneNumbersResponse_Telnyx, + DeletePhoneNumbersResponse_Twilio, + DeletePhoneNumbersResponse_Vapi, + DeletePhoneNumbersResponse_Vonage, + GetPhoneNumbersResponse, + GetPhoneNumbersResponse_ByoPhoneNumber, + GetPhoneNumbersResponse_Telnyx, + GetPhoneNumbersResponse_Twilio, + GetPhoneNumbersResponse_Vapi, + GetPhoneNumbersResponse_Vonage, + ListPhoneNumbersResponseItem, + ListPhoneNumbersResponseItem_ByoPhoneNumber, + ListPhoneNumbersResponseItem_Telnyx, + ListPhoneNumbersResponseItem_Twilio, + ListPhoneNumbersResponseItem_Vapi, + ListPhoneNumbersResponseItem_Vonage, + PhoneNumberControllerFindAllPaginatedRequestSortOrder, + UpdatePhoneNumbersRequestBody, + UpdatePhoneNumbersRequestBody_ByoPhoneNumber, + UpdatePhoneNumbersRequestBody_Telnyx, + UpdatePhoneNumbersRequestBody_Twilio, + UpdatePhoneNumbersRequestBody_Vapi, + UpdatePhoneNumbersRequestBody_Vonage, + UpdatePhoneNumbersResponse, + UpdatePhoneNumbersResponse_ByoPhoneNumber, + UpdatePhoneNumbersResponse_Telnyx, + UpdatePhoneNumbersResponse_Twilio, + UpdatePhoneNumbersResponse_Vapi, + UpdatePhoneNumbersResponse_Vonage, + ) + from .provider_resources import ( + ProviderResourceControllerCreateProviderResourceRequestProvider, + ProviderResourceControllerCreateProviderResourceRequestResourceName, + ProviderResourceControllerDeleteProviderResourceRequestProvider, + ProviderResourceControllerDeleteProviderResourceRequestResourceName, + ProviderResourceControllerGetProviderResourceRequestProvider, + ProviderResourceControllerGetProviderResourceRequestResourceName, + ProviderResourceControllerGetProviderResourcesPaginatedRequestProvider, + ProviderResourceControllerGetProviderResourcesPaginatedRequestResourceName, + ProviderResourceControllerGetProviderResourcesPaginatedRequestSortOrder, + ProviderResourceControllerUpdateProviderResourceRequestProvider, + ProviderResourceControllerUpdateProviderResourceRequestResourceName, + ) + from .sessions import ( + CreateSessionDtoMessagesItem, + CreateSessionDtoStatus, + ListSessionsRequestSortOrder, + UpdateSessionDtoMessagesItem, + UpdateSessionDtoStatus, + ) + from .structured_outputs import ( + StructuredOutputControllerFindAllRequestSortOrder, + UpdateStructuredOutputDtoModel, + UpdateStructuredOutputDtoModel_Anthropic, + UpdateStructuredOutputDtoModel_AnthropicBedrock, + UpdateStructuredOutputDtoModel_CustomLlm, + UpdateStructuredOutputDtoModel_Google, + UpdateStructuredOutputDtoModel_Openai, + UpdateStructuredOutputDtoType, + ) + from .tools import ( + CreateToolsRequest, + CreateToolsRequest_ApiRequest, + CreateToolsRequest_Bash, + CreateToolsRequest_Computer, + CreateToolsRequest_Dtmf, + CreateToolsRequest_EndCall, + CreateToolsRequest_Function, + CreateToolsRequest_GohighlevelCalendarAvailabilityCheck, + CreateToolsRequest_GohighlevelCalendarEventCreate, + CreateToolsRequest_GohighlevelContactCreate, + CreateToolsRequest_GohighlevelContactGet, + CreateToolsRequest_GoogleCalendarAvailabilityCheck, + CreateToolsRequest_GoogleCalendarEventCreate, + CreateToolsRequest_GoogleSheetsRowAppend, + CreateToolsRequest_Handoff, + CreateToolsRequest_Mcp, + CreateToolsRequest_Query, + CreateToolsRequest_SipRequest, + CreateToolsRequest_SlackMessageSend, + CreateToolsRequest_Sms, + CreateToolsRequest_TextEditor, + CreateToolsRequest_TransferCall, + CreateToolsRequest_Voicemail, + CreateToolsResponse, + CreateToolsResponse_ApiRequest, + CreateToolsResponse_Bash, + CreateToolsResponse_Code, + CreateToolsResponse_Computer, + CreateToolsResponse_Dtmf, + CreateToolsResponse_EndCall, + CreateToolsResponse_Function, + CreateToolsResponse_GohighlevelCalendarAvailabilityCheck, + CreateToolsResponse_GohighlevelCalendarEventCreate, + CreateToolsResponse_GohighlevelContactCreate, + CreateToolsResponse_GohighlevelContactGet, + CreateToolsResponse_GoogleCalendarAvailabilityCheck, + CreateToolsResponse_GoogleCalendarEventCreate, + CreateToolsResponse_GoogleSheetsRowAppend, + CreateToolsResponse_Handoff, + CreateToolsResponse_Mcp, + CreateToolsResponse_Query, + CreateToolsResponse_SipRequest, + CreateToolsResponse_SlackMessageSend, + CreateToolsResponse_Sms, + CreateToolsResponse_TextEditor, + CreateToolsResponse_TransferCall, + CreateToolsResponse_Voicemail, + DeleteToolsResponse, + DeleteToolsResponse_ApiRequest, + DeleteToolsResponse_Bash, + DeleteToolsResponse_Code, + DeleteToolsResponse_Computer, + DeleteToolsResponse_Dtmf, + DeleteToolsResponse_EndCall, + DeleteToolsResponse_Function, + DeleteToolsResponse_GohighlevelCalendarAvailabilityCheck, + DeleteToolsResponse_GohighlevelCalendarEventCreate, + DeleteToolsResponse_GohighlevelContactCreate, + DeleteToolsResponse_GohighlevelContactGet, + DeleteToolsResponse_GoogleCalendarAvailabilityCheck, + DeleteToolsResponse_GoogleCalendarEventCreate, + DeleteToolsResponse_GoogleSheetsRowAppend, + DeleteToolsResponse_Handoff, + DeleteToolsResponse_Mcp, + DeleteToolsResponse_Query, + DeleteToolsResponse_SipRequest, + DeleteToolsResponse_SlackMessageSend, + DeleteToolsResponse_Sms, + DeleteToolsResponse_TextEditor, + DeleteToolsResponse_TransferCall, + DeleteToolsResponse_Voicemail, + GetToolsResponse, + GetToolsResponse_ApiRequest, + GetToolsResponse_Bash, + GetToolsResponse_Code, + GetToolsResponse_Computer, + GetToolsResponse_Dtmf, + GetToolsResponse_EndCall, + GetToolsResponse_Function, + GetToolsResponse_GohighlevelCalendarAvailabilityCheck, + GetToolsResponse_GohighlevelCalendarEventCreate, + GetToolsResponse_GohighlevelContactCreate, + GetToolsResponse_GohighlevelContactGet, + GetToolsResponse_GoogleCalendarAvailabilityCheck, + GetToolsResponse_GoogleCalendarEventCreate, + GetToolsResponse_GoogleSheetsRowAppend, + GetToolsResponse_Handoff, + GetToolsResponse_Mcp, + GetToolsResponse_Query, + GetToolsResponse_SipRequest, + GetToolsResponse_SlackMessageSend, + GetToolsResponse_Sms, + GetToolsResponse_TextEditor, + GetToolsResponse_TransferCall, + GetToolsResponse_Voicemail, + ListToolsResponseItem, + ListToolsResponseItem_ApiRequest, + ListToolsResponseItem_Bash, + ListToolsResponseItem_Code, + ListToolsResponseItem_Computer, + ListToolsResponseItem_Dtmf, + ListToolsResponseItem_EndCall, + ListToolsResponseItem_Function, + ListToolsResponseItem_GohighlevelCalendarAvailabilityCheck, + ListToolsResponseItem_GohighlevelCalendarEventCreate, + ListToolsResponseItem_GohighlevelContactCreate, + ListToolsResponseItem_GohighlevelContactGet, + ListToolsResponseItem_GoogleCalendarAvailabilityCheck, + ListToolsResponseItem_GoogleCalendarEventCreate, + ListToolsResponseItem_GoogleSheetsRowAppend, + ListToolsResponseItem_Handoff, + ListToolsResponseItem_Mcp, + ListToolsResponseItem_Query, + ListToolsResponseItem_SipRequest, + ListToolsResponseItem_SlackMessageSend, + ListToolsResponseItem_Sms, + ListToolsResponseItem_TextEditor, + ListToolsResponseItem_TransferCall, + ListToolsResponseItem_Voicemail, + UpdateToolsRequestBody, + UpdateToolsRequestBody_ApiRequest, + UpdateToolsRequestBody_Bash, + UpdateToolsRequestBody_Computer, + UpdateToolsRequestBody_Dtmf, + UpdateToolsRequestBody_EndCall, + UpdateToolsRequestBody_Function, + UpdateToolsRequestBody_GohighlevelCalendarAvailabilityCheck, + UpdateToolsRequestBody_GohighlevelCalendarEventCreate, + UpdateToolsRequestBody_GohighlevelContactCreate, + UpdateToolsRequestBody_GohighlevelContactGet, + UpdateToolsRequestBody_GoogleCalendarAvailabilityCheck, + UpdateToolsRequestBody_GoogleCalendarEventCreate, + UpdateToolsRequestBody_GoogleSheetsRowAppend, + UpdateToolsRequestBody_Handoff, + UpdateToolsRequestBody_Mcp, + UpdateToolsRequestBody_Query, + UpdateToolsRequestBody_SipRequest, + UpdateToolsRequestBody_SlackMessageSend, + UpdateToolsRequestBody_Sms, + UpdateToolsRequestBody_TextEditor, + UpdateToolsRequestBody_TransferCall, + UpdateToolsRequestBody_Voicemail, + UpdateToolsResponse, + UpdateToolsResponse_ApiRequest, + UpdateToolsResponse_Bash, + UpdateToolsResponse_Code, + UpdateToolsResponse_Computer, + UpdateToolsResponse_Dtmf, + UpdateToolsResponse_EndCall, + UpdateToolsResponse_Function, + UpdateToolsResponse_GohighlevelCalendarAvailabilityCheck, + UpdateToolsResponse_GohighlevelCalendarEventCreate, + UpdateToolsResponse_GohighlevelContactCreate, + UpdateToolsResponse_GohighlevelContactGet, + UpdateToolsResponse_GoogleCalendarAvailabilityCheck, + UpdateToolsResponse_GoogleCalendarEventCreate, + UpdateToolsResponse_GoogleSheetsRowAppend, + UpdateToolsResponse_Handoff, + UpdateToolsResponse_Mcp, + UpdateToolsResponse_Query, + UpdateToolsResponse_SipRequest, + UpdateToolsResponse_SlackMessageSend, + UpdateToolsResponse_Sms, + UpdateToolsResponse_TextEditor, + UpdateToolsResponse_TransferCall, + UpdateToolsResponse_Voicemail, + ) + from .version import __version__ +_dynamic_imports: typing.Dict[str, str] = { + "AddVoiceToProviderDto": ".types", + "AiEdgeCondition": ".types", + "AiEdgeConditionType": ".types", + "Analysis": ".types", + "AnalysisCost": ".types", + "AnalysisCostAnalysisType": ".types", + "AnalysisCostBreakdown": ".types", + "AnalysisPlan": ".types", + "AnalyticsOperation": ".types", + "AnalyticsOperationColumn": ".types", + "AnalyticsOperationOperation": ".types", + "AnalyticsQuery": ".types", + "AnalyticsQueryGroupByItem": ".types", + "AnalyticsQueryResult": ".types", + "AnalyticsQueryTable": ".types", + "AnthropicBedrockCredential": ".types", + "AnthropicBedrockCredentialAuthenticationPlan": ".types", + "AnthropicBedrockCredentialAuthenticationPlan_AwsIam": ".types", + "AnthropicBedrockCredentialAuthenticationPlan_AwsSts": ".types", + "AnthropicBedrockCredentialProvider": ".types", + "AnthropicBedrockCredentialRegion": ".types", + "AnthropicBedrockModel": ".types", + "AnthropicBedrockModelModel": ".types", + "AnthropicBedrockModelToolsItem": ".types", + "AnthropicBedrockModelToolsItem_ApiRequest": ".types", + "AnthropicBedrockModelToolsItem_Bash": ".types", + "AnthropicBedrockModelToolsItem_Code": ".types", + "AnthropicBedrockModelToolsItem_Computer": ".types", + "AnthropicBedrockModelToolsItem_Dtmf": ".types", + "AnthropicBedrockModelToolsItem_EndCall": ".types", + "AnthropicBedrockModelToolsItem_Function": ".types", + "AnthropicBedrockModelToolsItem_GohighlevelCalendarAvailabilityCheck": ".types", + "AnthropicBedrockModelToolsItem_GohighlevelCalendarEventCreate": ".types", + "AnthropicBedrockModelToolsItem_GohighlevelContactCreate": ".types", + "AnthropicBedrockModelToolsItem_GohighlevelContactGet": ".types", + "AnthropicBedrockModelToolsItem_GoogleCalendarAvailabilityCheck": ".types", + "AnthropicBedrockModelToolsItem_GoogleCalendarEventCreate": ".types", + "AnthropicBedrockModelToolsItem_GoogleSheetsRowAppend": ".types", + "AnthropicBedrockModelToolsItem_Handoff": ".types", + "AnthropicBedrockModelToolsItem_Mcp": ".types", + "AnthropicBedrockModelToolsItem_Query": ".types", + "AnthropicBedrockModelToolsItem_SipRequest": ".types", + "AnthropicBedrockModelToolsItem_SlackMessageSend": ".types", + "AnthropicBedrockModelToolsItem_Sms": ".types", + "AnthropicBedrockModelToolsItem_TextEditor": ".types", + "AnthropicBedrockModelToolsItem_TransferCall": ".types", + "AnthropicBedrockModelToolsItem_Voicemail": ".types", + "AnthropicCredential": ".types", + "AnthropicCredentialProvider": ".types", + "AnthropicModel": ".types", + "AnthropicModelModel": ".types", + "AnthropicModelToolsItem": ".types", + "AnthropicModelToolsItem_ApiRequest": ".types", + "AnthropicModelToolsItem_Bash": ".types", + "AnthropicModelToolsItem_Code": ".types", + "AnthropicModelToolsItem_Computer": ".types", + "AnthropicModelToolsItem_Dtmf": ".types", + "AnthropicModelToolsItem_EndCall": ".types", + "AnthropicModelToolsItem_Function": ".types", + "AnthropicModelToolsItem_GohighlevelCalendarAvailabilityCheck": ".types", + "AnthropicModelToolsItem_GohighlevelCalendarEventCreate": ".types", + "AnthropicModelToolsItem_GohighlevelContactCreate": ".types", + "AnthropicModelToolsItem_GohighlevelContactGet": ".types", + "AnthropicModelToolsItem_GoogleCalendarAvailabilityCheck": ".types", + "AnthropicModelToolsItem_GoogleCalendarEventCreate": ".types", + "AnthropicModelToolsItem_GoogleSheetsRowAppend": ".types", + "AnthropicModelToolsItem_Handoff": ".types", + "AnthropicModelToolsItem_Mcp": ".types", + "AnthropicModelToolsItem_Query": ".types", + "AnthropicModelToolsItem_SipRequest": ".types", + "AnthropicModelToolsItem_SlackMessageSend": ".types", + "AnthropicModelToolsItem_Sms": ".types", + "AnthropicModelToolsItem_TextEditor": ".types", + "AnthropicModelToolsItem_TransferCall": ".types", + "AnthropicModelToolsItem_Voicemail": ".types", + "AnthropicThinkingConfig": ".types", + "AnthropicThinkingConfigType": ".types", + "AnyscaleCredential": ".types", + "AnyscaleCredentialProvider": ".types", + "AnyscaleModel": ".types", + "AnyscaleModelToolsItem": ".types", + "AnyscaleModelToolsItem_ApiRequest": ".types", + "AnyscaleModelToolsItem_Bash": ".types", + "AnyscaleModelToolsItem_Code": ".types", + "AnyscaleModelToolsItem_Computer": ".types", + "AnyscaleModelToolsItem_Dtmf": ".types", + "AnyscaleModelToolsItem_EndCall": ".types", + "AnyscaleModelToolsItem_Function": ".types", + "AnyscaleModelToolsItem_GohighlevelCalendarAvailabilityCheck": ".types", + "AnyscaleModelToolsItem_GohighlevelCalendarEventCreate": ".types", + "AnyscaleModelToolsItem_GohighlevelContactCreate": ".types", + "AnyscaleModelToolsItem_GohighlevelContactGet": ".types", + "AnyscaleModelToolsItem_GoogleCalendarAvailabilityCheck": ".types", + "AnyscaleModelToolsItem_GoogleCalendarEventCreate": ".types", + "AnyscaleModelToolsItem_GoogleSheetsRowAppend": ".types", + "AnyscaleModelToolsItem_Handoff": ".types", + "AnyscaleModelToolsItem_Mcp": ".types", + "AnyscaleModelToolsItem_Query": ".types", + "AnyscaleModelToolsItem_SipRequest": ".types", + "AnyscaleModelToolsItem_SlackMessageSend": ".types", + "AnyscaleModelToolsItem_Sms": ".types", + "AnyscaleModelToolsItem_TextEditor": ".types", + "AnyscaleModelToolsItem_TransferCall": ".types", + "AnyscaleModelToolsItem_Voicemail": ".types", + "ApiRequestTool": ".types", + "ApiRequestToolMessagesItem": ".types", + "ApiRequestToolMessagesItem_RequestComplete": ".types", + "ApiRequestToolMessagesItem_RequestFailed": ".types", + "ApiRequestToolMessagesItem_RequestResponseDelayed": ".types", + "ApiRequestToolMessagesItem_RequestStart": ".types", + "ApiRequestToolMethod": ".types", + "Artifact": ".types", + "ArtifactMessagesItem": ".types", + "ArtifactPlan": ".types", + "ArtifactPlanRecordingFormat": ".types", + "AssemblyAiCredential": ".types", + "AssemblyAiCredentialProvider": ".types", + "AssemblyAiTranscriber": ".types", + "AssemblyAiTranscriberLanguage": ".types", + "AssemblyAiTranscriberSpeechModel": ".types", + "Assistant": ".types", + "AssistantActivation": ".types", + "AssistantBackgroundSound": ".types", + "AssistantBackgroundSoundZero": ".types", + "AssistantClientMessagesItem": ".types", + "AssistantCredentialsItem": ".types", + "AssistantCredentialsItem_11Labs": ".types", + "AssistantCredentialsItem_Anthropic": ".types", + "AssistantCredentialsItem_AnthropicBedrock": ".types", + "AssistantCredentialsItem_Anyscale": ".types", + "AssistantCredentialsItem_AssemblyAi": ".types", + "AssistantCredentialsItem_Azure": ".types", + "AssistantCredentialsItem_AzureOpenai": ".types", + "AssistantCredentialsItem_ByoSipTrunk": ".types", + "AssistantCredentialsItem_Cartesia": ".types", + "AssistantCredentialsItem_Cerebras": ".types", + "AssistantCredentialsItem_Cloudflare": ".types", + "AssistantCredentialsItem_CustomCredential": ".types", + "AssistantCredentialsItem_CustomLlm": ".types", + "AssistantCredentialsItem_DeepSeek": ".types", + "AssistantCredentialsItem_Deepgram": ".types", + "AssistantCredentialsItem_Deepinfra": ".types", + "AssistantCredentialsItem_Email": ".types", + "AssistantCredentialsItem_Gcp": ".types", + "AssistantCredentialsItem_GhlOauth2Authorization": ".types", + "AssistantCredentialsItem_Gladia": ".types", + "AssistantCredentialsItem_Gohighlevel": ".types", + "AssistantCredentialsItem_Google": ".types", + "AssistantCredentialsItem_GoogleCalendarOauth2Authorization": ".types", + "AssistantCredentialsItem_GoogleCalendarOauth2Client": ".types", + "AssistantCredentialsItem_GoogleSheetsOauth2Authorization": ".types", + "AssistantCredentialsItem_Groq": ".types", + "AssistantCredentialsItem_Hume": ".types", + "AssistantCredentialsItem_InflectionAi": ".types", + "AssistantCredentialsItem_Inworld": ".types", + "AssistantCredentialsItem_Langfuse": ".types", + "AssistantCredentialsItem_Lmnt": ".types", + "AssistantCredentialsItem_Make": ".types", + "AssistantCredentialsItem_Minimax": ".types", + "AssistantCredentialsItem_Mistral": ".types", + "AssistantCredentialsItem_Neuphonic": ".types", + "AssistantCredentialsItem_Openai": ".types", + "AssistantCredentialsItem_Openrouter": ".types", + "AssistantCredentialsItem_PerplexityAi": ".types", + "AssistantCredentialsItem_Playht": ".types", + "AssistantCredentialsItem_RimeAi": ".types", + "AssistantCredentialsItem_Runpod": ".types", + "AssistantCredentialsItem_S3": ".types", + "AssistantCredentialsItem_SlackOauth2Authorization": ".types", + "AssistantCredentialsItem_SlackWebhook": ".types", + "AssistantCredentialsItem_SmallestAi": ".types", + "AssistantCredentialsItem_Soniox": ".types", + "AssistantCredentialsItem_Speechmatics": ".types", + "AssistantCredentialsItem_Supabase": ".types", + "AssistantCredentialsItem_Tavus": ".types", + "AssistantCredentialsItem_TogetherAi": ".types", + "AssistantCredentialsItem_Trieve": ".types", + "AssistantCredentialsItem_Twilio": ".types", + "AssistantCredentialsItem_Vonage": ".types", + "AssistantCredentialsItem_Webhook": ".types", + "AssistantCredentialsItem_Wellsaid": ".types", + "AssistantCredentialsItem_Xai": ".types", + "AssistantCustomEndpointingRule": ".types", + "AssistantFirstMessageMode": ".types", + "AssistantHookAssistantSpeechInterrupted": ".types", + "AssistantHookCallEnding": ".types", + "AssistantHookCustomerSpeechInterrupted": ".types", + "AssistantHooksItem": ".types", + "AssistantMessage": ".types", + "AssistantMessageEvaluationContinuePlan": ".types", + "AssistantMessageJudgePlanAi": ".types", + "AssistantMessageJudgePlanAiModel": ".types", + "AssistantMessageJudgePlanAiModel_Anthropic": ".types", + "AssistantMessageJudgePlanAiModel_CustomLlm": ".types", + "AssistantMessageJudgePlanAiModel_Google": ".types", + "AssistantMessageJudgePlanAiModel_Openai": ".types", + "AssistantMessageJudgePlanAiType": ".types", + "AssistantMessageJudgePlanExact": ".types", + "AssistantMessageJudgePlanRegex": ".types", + "AssistantMessageRole": ".types", + "AssistantModel": ".types", + "AssistantModel_Anthropic": ".types", + "AssistantModel_AnthropicBedrock": ".types", + "AssistantModel_Anyscale": ".types", + "AssistantModel_Cerebras": ".types", + "AssistantModel_CustomLlm": ".types", + "AssistantModel_DeepSeek": ".types", + "AssistantModel_Deepinfra": ".types", + "AssistantModel_Google": ".types", + "AssistantModel_Groq": ".types", + "AssistantModel_InflectionAi": ".types", + "AssistantModel_Minimax": ".types", + "AssistantModel_Openai": ".types", + "AssistantModel_Openrouter": ".types", + "AssistantModel_PerplexityAi": ".types", + "AssistantModel_TogetherAi": ".types", + "AssistantModel_Xai": ".types", + "AssistantOverrides": ".types", + "AssistantOverridesBackgroundSound": ".types", + "AssistantOverridesBackgroundSoundZero": ".types", + "AssistantOverridesClientMessagesItem": ".types", + "AssistantOverridesCredentialsItem": ".types", + "AssistantOverridesCredentialsItem_11Labs": ".types", + "AssistantOverridesCredentialsItem_Anthropic": ".types", + "AssistantOverridesCredentialsItem_AnthropicBedrock": ".types", + "AssistantOverridesCredentialsItem_Anyscale": ".types", + "AssistantOverridesCredentialsItem_AssemblyAi": ".types", + "AssistantOverridesCredentialsItem_Azure": ".types", + "AssistantOverridesCredentialsItem_AzureOpenai": ".types", + "AssistantOverridesCredentialsItem_ByoSipTrunk": ".types", + "AssistantOverridesCredentialsItem_Cartesia": ".types", + "AssistantOverridesCredentialsItem_Cerebras": ".types", + "AssistantOverridesCredentialsItem_Cloudflare": ".types", + "AssistantOverridesCredentialsItem_CustomCredential": ".types", + "AssistantOverridesCredentialsItem_CustomLlm": ".types", + "AssistantOverridesCredentialsItem_DeepSeek": ".types", + "AssistantOverridesCredentialsItem_Deepgram": ".types", + "AssistantOverridesCredentialsItem_Deepinfra": ".types", + "AssistantOverridesCredentialsItem_Email": ".types", + "AssistantOverridesCredentialsItem_Gcp": ".types", + "AssistantOverridesCredentialsItem_GhlOauth2Authorization": ".types", + "AssistantOverridesCredentialsItem_Gladia": ".types", + "AssistantOverridesCredentialsItem_Gohighlevel": ".types", + "AssistantOverridesCredentialsItem_Google": ".types", + "AssistantOverridesCredentialsItem_GoogleCalendarOauth2Authorization": ".types", + "AssistantOverridesCredentialsItem_GoogleCalendarOauth2Client": ".types", + "AssistantOverridesCredentialsItem_GoogleSheetsOauth2Authorization": ".types", + "AssistantOverridesCredentialsItem_Groq": ".types", + "AssistantOverridesCredentialsItem_Hume": ".types", + "AssistantOverridesCredentialsItem_InflectionAi": ".types", + "AssistantOverridesCredentialsItem_Inworld": ".types", + "AssistantOverridesCredentialsItem_Langfuse": ".types", + "AssistantOverridesCredentialsItem_Lmnt": ".types", + "AssistantOverridesCredentialsItem_Make": ".types", + "AssistantOverridesCredentialsItem_Minimax": ".types", + "AssistantOverridesCredentialsItem_Mistral": ".types", + "AssistantOverridesCredentialsItem_Neuphonic": ".types", + "AssistantOverridesCredentialsItem_Openai": ".types", + "AssistantOverridesCredentialsItem_Openrouter": ".types", + "AssistantOverridesCredentialsItem_PerplexityAi": ".types", + "AssistantOverridesCredentialsItem_Playht": ".types", + "AssistantOverridesCredentialsItem_RimeAi": ".types", + "AssistantOverridesCredentialsItem_Runpod": ".types", + "AssistantOverridesCredentialsItem_S3": ".types", + "AssistantOverridesCredentialsItem_SlackOauth2Authorization": ".types", + "AssistantOverridesCredentialsItem_SlackWebhook": ".types", + "AssistantOverridesCredentialsItem_SmallestAi": ".types", + "AssistantOverridesCredentialsItem_Soniox": ".types", + "AssistantOverridesCredentialsItem_Speechmatics": ".types", + "AssistantOverridesCredentialsItem_Supabase": ".types", + "AssistantOverridesCredentialsItem_Tavus": ".types", + "AssistantOverridesCredentialsItem_TogetherAi": ".types", + "AssistantOverridesCredentialsItem_Trieve": ".types", + "AssistantOverridesCredentialsItem_Twilio": ".types", + "AssistantOverridesCredentialsItem_Vonage": ".types", + "AssistantOverridesCredentialsItem_Webhook": ".types", + "AssistantOverridesCredentialsItem_Wellsaid": ".types", + "AssistantOverridesCredentialsItem_Xai": ".types", + "AssistantOverridesFirstMessageMode": ".types", + "AssistantOverridesHooksItem": ".types", + "AssistantOverridesModel": ".types", + "AssistantOverridesModel_Anthropic": ".types", + "AssistantOverridesModel_AnthropicBedrock": ".types", + "AssistantOverridesModel_Anyscale": ".types", + "AssistantOverridesModel_Cerebras": ".types", + "AssistantOverridesModel_CustomLlm": ".types", + "AssistantOverridesModel_DeepSeek": ".types", + "AssistantOverridesModel_Deepinfra": ".types", + "AssistantOverridesModel_Google": ".types", + "AssistantOverridesModel_Groq": ".types", + "AssistantOverridesModel_InflectionAi": ".types", + "AssistantOverridesModel_Minimax": ".types", + "AssistantOverridesModel_Openai": ".types", + "AssistantOverridesModel_Openrouter": ".types", + "AssistantOverridesModel_PerplexityAi": ".types", + "AssistantOverridesModel_TogetherAi": ".types", + "AssistantOverridesModel_Xai": ".types", + "AssistantOverridesServerMessagesItem": ".types", + "AssistantOverridesToolsAppendItem": ".types", + "AssistantOverridesToolsAppendItem_ApiRequest": ".types", + "AssistantOverridesToolsAppendItem_Bash": ".types", + "AssistantOverridesToolsAppendItem_Code": ".types", + "AssistantOverridesToolsAppendItem_Computer": ".types", + "AssistantOverridesToolsAppendItem_Dtmf": ".types", + "AssistantOverridesToolsAppendItem_EndCall": ".types", + "AssistantOverridesToolsAppendItem_Function": ".types", + "AssistantOverridesToolsAppendItem_GohighlevelCalendarAvailabilityCheck": ".types", + "AssistantOverridesToolsAppendItem_GohighlevelCalendarEventCreate": ".types", + "AssistantOverridesToolsAppendItem_GohighlevelContactCreate": ".types", + "AssistantOverridesToolsAppendItem_GohighlevelContactGet": ".types", + "AssistantOverridesToolsAppendItem_GoogleCalendarAvailabilityCheck": ".types", + "AssistantOverridesToolsAppendItem_GoogleCalendarEventCreate": ".types", + "AssistantOverridesToolsAppendItem_GoogleSheetsRowAppend": ".types", + "AssistantOverridesToolsAppendItem_Handoff": ".types", + "AssistantOverridesToolsAppendItem_Mcp": ".types", + "AssistantOverridesToolsAppendItem_Query": ".types", + "AssistantOverridesToolsAppendItem_SipRequest": ".types", + "AssistantOverridesToolsAppendItem_SlackMessageSend": ".types", + "AssistantOverridesToolsAppendItem_Sms": ".types", + "AssistantOverridesToolsAppendItem_TextEditor": ".types", + "AssistantOverridesToolsAppendItem_TransferCall": ".types", + "AssistantOverridesToolsAppendItem_Voicemail": ".types", + "AssistantOverridesTranscriber": ".types", + "AssistantOverridesTranscriber_11Labs": ".types", + "AssistantOverridesTranscriber_AssemblyAi": ".types", + "AssistantOverridesTranscriber_Azure": ".types", + "AssistantOverridesTranscriber_Cartesia": ".types", + "AssistantOverridesTranscriber_CustomTranscriber": ".types", + "AssistantOverridesTranscriber_Deepgram": ".types", + "AssistantOverridesTranscriber_Gladia": ".types", + "AssistantOverridesTranscriber_Google": ".types", + "AssistantOverridesTranscriber_Openai": ".types", + "AssistantOverridesTranscriber_Soniox": ".types", + "AssistantOverridesTranscriber_Speechmatics": ".types", + "AssistantOverridesTranscriber_Talkscriber": ".types", + "AssistantOverridesVoice": ".types", + "AssistantOverridesVoice_11Labs": ".types", + "AssistantOverridesVoice_Azure": ".types", + "AssistantOverridesVoice_Cartesia": ".types", + "AssistantOverridesVoice_CustomVoice": ".types", + "AssistantOverridesVoice_Deepgram": ".types", + "AssistantOverridesVoice_Hume": ".types", + "AssistantOverridesVoice_Inworld": ".types", + "AssistantOverridesVoice_Lmnt": ".types", + "AssistantOverridesVoice_Minimax": ".types", + "AssistantOverridesVoice_Neuphonic": ".types", + "AssistantOverridesVoice_Openai": ".types", + "AssistantOverridesVoice_Playht": ".types", + "AssistantOverridesVoice_RimeAi": ".types", + "AssistantOverridesVoice_Sesame": ".types", + "AssistantOverridesVoice_SmallestAi": ".types", + "AssistantOverridesVoice_Tavus": ".types", + "AssistantOverridesVoice_Vapi": ".types", + "AssistantOverridesVoice_Wellsaid": ".types", + "AssistantOverridesVoicemailDetection": ".types", + "AssistantOverridesVoicemailDetectionZero": ".types", + "AssistantPaginatedResponse": ".types", + "AssistantServerMessagesItem": ".types", + "AssistantSpeechWordAlignmentTiming": ".types", + "AssistantSpeechWordProgressTiming": ".types", + "AssistantSpeechWordTimestamp": ".types", + "AssistantTranscriber": ".types", + "AssistantTranscriber_11Labs": ".types", + "AssistantTranscriber_AssemblyAi": ".types", + "AssistantTranscriber_Azure": ".types", + "AssistantTranscriber_Cartesia": ".types", + "AssistantTranscriber_CustomTranscriber": ".types", + "AssistantTranscriber_Deepgram": ".types", + "AssistantTranscriber_Gladia": ".types", + "AssistantTranscriber_Google": ".types", + "AssistantTranscriber_Openai": ".types", + "AssistantTranscriber_Soniox": ".types", + "AssistantTranscriber_Speechmatics": ".types", + "AssistantTranscriber_Talkscriber": ".types", + "AssistantUserEditable": ".types", + "AssistantVersionPaginatedResponse": ".types", + "AssistantVoice": ".types", + "AssistantVoice_11Labs": ".types", + "AssistantVoice_Azure": ".types", + "AssistantVoice_Cartesia": ".types", + "AssistantVoice_CustomVoice": ".types", + "AssistantVoice_Deepgram": ".types", + "AssistantVoice_Hume": ".types", + "AssistantVoice_Inworld": ".types", + "AssistantVoice_Lmnt": ".types", + "AssistantVoice_Minimax": ".types", + "AssistantVoice_Neuphonic": ".types", + "AssistantVoice_Openai": ".types", + "AssistantVoice_Playht": ".types", + "AssistantVoice_RimeAi": ".types", + "AssistantVoice_Sesame": ".types", + "AssistantVoice_SmallestAi": ".types", + "AssistantVoice_Tavus": ".types", + "AssistantVoice_Vapi": ".types", + "AssistantVoice_Wellsaid": ".types", + "AssistantVoicemailDetection": ".types", + "AssistantVoicemailDetectionZero": ".types", + "AsyncVapi": ".client", + "AutoReloadPlan": ".types", + "AwsStsAssumeRoleUser": ".types", + "AwsStsAuthenticationArtifact": ".types", + "AwsStsAuthenticationPlan": ".types", + "AwsStsAuthenticationSession": ".types", + "AwsStsCredentials": ".types", + "AwsiamCredentialsAuthenticationPlan": ".types", + "AzureBlobStorageBucketPlan": ".types", + "AzureCredential": ".types", + "AzureCredentialProvider": ".types", + "AzureCredentialRegion": ".types", + "AzureCredentialService": ".types", + "AzureOpenAiCredential": ".types", + "AzureOpenAiCredentialModelsItem": ".types", + "AzureOpenAiCredentialProvider": ".types", + "AzureOpenAiCredentialRegion": ".types", + "AzureSpeechTranscriber": ".types", + "AzureSpeechTranscriberLanguage": ".types", + "AzureSpeechTranscriberSegmentationStrategy": ".types", + "AzureVoice": ".types", + "AzureVoiceId": ".types", + "AzureVoiceIdEnum": ".types", + "BackgroundSpeechDenoisingPlan": ".types", + "BackoffPlan": ".types", + "BadRequestError": ".errors", + "BarInsight": ".types", + "BarInsightFromCallTable": ".types", + "BarInsightFromCallTableGroupBy": ".types", + "BarInsightFromCallTableQueriesItem": ".types", + "BarInsightFromCallTableType": ".types", + "BarInsightGroupBy": ".types", + "BarInsightMetadata": ".types", + "BarInsightQueriesItem": ".types", + "BashTool": ".types", + "BashToolMessagesItem": ".types", + "BashToolMessagesItem_RequestComplete": ".types", + "BashToolMessagesItem_RequestFailed": ".types", + "BashToolMessagesItem_RequestResponseDelayed": ".types", + "BashToolMessagesItem_RequestStart": ".types", + "BashToolName": ".types", + "BashToolSubType": ".types", + "BashToolWithToolCall": ".types", + "BashToolWithToolCallMessagesItem": ".types", + "BashToolWithToolCallMessagesItem_RequestComplete": ".types", + "BashToolWithToolCallMessagesItem_RequestFailed": ".types", + "BashToolWithToolCallMessagesItem_RequestResponseDelayed": ".types", + "BashToolWithToolCallMessagesItem_RequestStart": ".types", + "BashToolWithToolCallName": ".types", + "BashToolWithToolCallSubType": ".types", + "BearerAuthenticationPlan": ".types", + "BotMessage": ".types", + "BothCustomEndpointingRule": ".types", + "BucketPlan": ".types", + "ByoPhoneNumber": ".types", + "ByoPhoneNumberFallbackDestination": ".types", + "ByoPhoneNumberFallbackDestination_Number": ".types", + "ByoPhoneNumberFallbackDestination_Sip": ".types", + "ByoPhoneNumberHooksItem": ".types", + "ByoPhoneNumberHooksItem_CallEnding": ".types", + "ByoPhoneNumberHooksItem_CallRinging": ".types", + "ByoPhoneNumberStatus": ".types", + "ByoSipTrunkCredential": ".types", + "ByoSipTrunkCredentialProvider": ".types", + "Call": ".types", + "CallBatchError": ".types", + "CallBatchResponse": ".types", + "CallCostsItem": ".types", + "CallCostsItem_Analysis": ".types", + "CallCostsItem_KnowledgeBase": ".types", + "CallCostsItem_Model": ".types", + "CallCostsItem_Transcriber": ".types", + "CallCostsItem_Transport": ".types", + "CallCostsItem_Vapi": ".types", + "CallCostsItem_Voice": ".types", + "CallCostsItem_VoicemailDetection": ".types", + "CallDestination": ".types", + "CallDestination_Number": ".types", + "CallDestination_Sip": ".types", + "CallEndedReason": ".types", + "CallHookAssistantSpeechInterrupted": ".types", + "CallHookAssistantSpeechInterruptedDoItem": ".types", + "CallHookAssistantSpeechInterruptedDoItem_MessageAdd": ".types", + "CallHookAssistantSpeechInterruptedDoItem_Say": ".types", + "CallHookAssistantSpeechInterruptedDoItem_Tool": ".types", + "CallHookAssistantSpeechInterruptedOn": ".types", + "CallHookCallEnding": ".types", + "CallHookCallEndingDoItem": ".types", + "CallHookCallEndingDoItem_MessageAdd": ".types", + "CallHookCallEndingDoItem_Tool": ".types", + "CallHookCallEndingOn": ".types", + "CallHookCustomerSpeechInterrupted": ".types", + "CallHookCustomerSpeechInterruptedDoItem": ".types", + "CallHookCustomerSpeechInterruptedDoItem_MessageAdd": ".types", + "CallHookCustomerSpeechInterruptedDoItem_Say": ".types", + "CallHookCustomerSpeechInterruptedDoItem_Tool": ".types", + "CallHookCustomerSpeechInterruptedOn": ".types", + "CallHookCustomerSpeechTimeout": ".types", + "CallHookCustomerSpeechTimeoutDoItem": ".types", + "CallHookCustomerSpeechTimeoutDoItem_MessageAdd": ".types", + "CallHookCustomerSpeechTimeoutDoItem_Say": ".types", + "CallHookCustomerSpeechTimeoutDoItem_Tool": ".types", + "CallHookFilter": ".types", + "CallHookFilterType": ".types", + "CallHookModelResponseTimeout": ".types", + "CallHookModelResponseTimeoutDoItem": ".types", + "CallHookModelResponseTimeoutDoItem_MessageAdd": ".types", + "CallHookModelResponseTimeoutDoItem_Say": ".types", + "CallHookModelResponseTimeoutDoItem_Tool": ".types", + "CallHookModelResponseTimeoutOn": ".types", + "CallHookTranscriberEndpointedSpeechLowConfidence": ".types", + "CallHookTranscriberEndpointedSpeechLowConfidenceDoItem": ".types", + "CallHookTranscriberEndpointedSpeechLowConfidenceDoItem_MessageAdd": ".types", + "CallHookTranscriberEndpointedSpeechLowConfidenceDoItem_Say": ".types", + "CallHookTranscriberEndpointedSpeechLowConfidenceDoItem_Tool": ".types", + "CallMessagesItem": ".types", + "CallPaginatedResponse": ".types", + "CallPhoneCallProvider": ".types", + "CallPhoneCallTransport": ".types", + "CallStatus": ".types", + "CallType": ".types", + "Campaign": ".types", + "CampaignControllerFindAllRequestSortOrder": ".campaigns", + "CampaignControllerFindAllRequestStatus": ".campaigns", + "CampaignEndedReason": ".types", + "CampaignPaginatedResponse": ".types", + "CampaignStatus": ".types", + "CartesiaCredential": ".types", + "CartesiaCredentialProvider": ".types", + "CartesiaExperimentalControls": ".types", + "CartesiaExperimentalControlsEmotion": ".types", + "CartesiaGenerationConfig": ".types", + "CartesiaGenerationConfigExperimental": ".types", + "CartesiaPronunciationDictItem": ".types", + "CartesiaPronunciationDictionary": ".types", + "CartesiaSpeedControl": ".types", + "CartesiaSpeedControlZero": ".types", + "CartesiaTranscriber": ".types", + "CartesiaTranscriberLanguage": ".types", + "CartesiaTranscriberModel": ".types", + "CartesiaVoice": ".types", + "CartesiaVoiceLanguage": ".types", + "CartesiaVoiceModel": ".types", + "CerebrasCredential": ".types", + "CerebrasCredentialProvider": ".types", + "CerebrasModel": ".types", + "CerebrasModelModel": ".types", + "CerebrasModelToolsItem": ".types", + "CerebrasModelToolsItem_ApiRequest": ".types", + "CerebrasModelToolsItem_Bash": ".types", + "CerebrasModelToolsItem_Code": ".types", + "CerebrasModelToolsItem_Computer": ".types", + "CerebrasModelToolsItem_Dtmf": ".types", + "CerebrasModelToolsItem_EndCall": ".types", + "CerebrasModelToolsItem_Function": ".types", + "CerebrasModelToolsItem_GohighlevelCalendarAvailabilityCheck": ".types", + "CerebrasModelToolsItem_GohighlevelCalendarEventCreate": ".types", + "CerebrasModelToolsItem_GohighlevelContactCreate": ".types", + "CerebrasModelToolsItem_GohighlevelContactGet": ".types", + "CerebrasModelToolsItem_GoogleCalendarAvailabilityCheck": ".types", + "CerebrasModelToolsItem_GoogleCalendarEventCreate": ".types", + "CerebrasModelToolsItem_GoogleSheetsRowAppend": ".types", + "CerebrasModelToolsItem_Handoff": ".types", + "CerebrasModelToolsItem_Mcp": ".types", + "CerebrasModelToolsItem_Query": ".types", + "CerebrasModelToolsItem_SipRequest": ".types", + "CerebrasModelToolsItem_SlackMessageSend": ".types", + "CerebrasModelToolsItem_Sms": ".types", + "CerebrasModelToolsItem_TextEditor": ".types", + "CerebrasModelToolsItem_TransferCall": ".types", + "CerebrasModelToolsItem_Voicemail": ".types", + "Chat": ".types", + "ChatAssistantOverrides": ".types", + "ChatCost": ".types", + "ChatCostsItem": ".types", + "ChatCostsItem_Chat": ".types", + "ChatCostsItem_Model": ".types", + "ChatEvalAssistantMessageEvaluation": ".types", + "ChatEvalAssistantMessageEvaluationJudgePlan": ".types", + "ChatEvalAssistantMessageEvaluationJudgePlan_Ai": ".types", + "ChatEvalAssistantMessageEvaluationJudgePlan_Exact": ".types", + "ChatEvalAssistantMessageEvaluationJudgePlan_Regex": ".types", + "ChatEvalAssistantMessageEvaluationRole": ".types", + "ChatEvalAssistantMessageMock": ".types", + "ChatEvalAssistantMessageMockRole": ".types", + "ChatEvalAssistantMessageMockToolCall": ".types", + "ChatEvalSystemMessageMock": ".types", + "ChatEvalSystemMessageMockRole": ".types", + "ChatEvalToolResponseMessageEvaluation": ".types", + "ChatEvalToolResponseMessageEvaluationRole": ".types", + "ChatEvalToolResponseMessageMock": ".types", + "ChatEvalToolResponseMessageMockRole": ".types", + "ChatEvalUserMessageMock": ".types", + "ChatEvalUserMessageMockRole": ".types", + "ChatInput": ".types", + "ChatInputOneItem": ".types", + "ChatMessagesItem": ".types", + "ChatOutputItem": ".types", + "ChatPaginatedResponse": ".types", + "ChunkPlan": ".types", + "ClientInboundMessage": ".types", + "ClientInboundMessageAddMessage": ".types", + "ClientInboundMessageControl": ".types", + "ClientInboundMessageControlControl": ".types", + "ClientInboundMessageEndCall": ".types", + "ClientInboundMessageMessage": ".types", + "ClientInboundMessageMessage_AddMessage": ".types", + "ClientInboundMessageMessage_Control": ".types", + "ClientInboundMessageMessage_EndCall": ".types", + "ClientInboundMessageMessage_Say": ".types", + "ClientInboundMessageMessage_SendTransportMessage": ".types", + "ClientInboundMessageMessage_Transfer": ".types", + "ClientInboundMessageSay": ".types", + "ClientInboundMessageSendTransportMessage": ".types", + "ClientInboundMessageSendTransportMessageMessage": ".types", + "ClientInboundMessageSendTransportMessageMessage_Twilio": ".types", + "ClientInboundMessageSendTransportMessageMessage_VapiSip": ".types", + "ClientInboundMessageTransfer": ".types", + "ClientInboundMessageTransferDestination": ".types", + "ClientInboundMessageTransferDestination_Number": ".types", + "ClientInboundMessageTransferDestination_Sip": ".types", + "ClientMessage": ".types", + "ClientMessageAssistantSpeech": ".types", + "ClientMessageAssistantSpeechPhoneNumber": ".types", + "ClientMessageAssistantSpeechPhoneNumber_ByoPhoneNumber": ".types", + "ClientMessageAssistantSpeechPhoneNumber_Telnyx": ".types", + "ClientMessageAssistantSpeechPhoneNumber_Twilio": ".types", + "ClientMessageAssistantSpeechPhoneNumber_Vapi": ".types", + "ClientMessageAssistantSpeechPhoneNumber_Vonage": ".types", + "ClientMessageAssistantSpeechSource": ".types", + "ClientMessageAssistantSpeechTiming": ".types", + "ClientMessageAssistantSpeechTiming_WordAlignment": ".types", + "ClientMessageAssistantSpeechTiming_WordProgress": ".types", + "ClientMessageAssistantSpeechType": ".types", + "ClientMessageAssistantStarted": ".types", + "ClientMessageAssistantStartedPhoneNumber": ".types", + "ClientMessageAssistantStartedPhoneNumber_ByoPhoneNumber": ".types", + "ClientMessageAssistantStartedPhoneNumber_Telnyx": ".types", + "ClientMessageAssistantStartedPhoneNumber_Twilio": ".types", + "ClientMessageAssistantStartedPhoneNumber_Vapi": ".types", + "ClientMessageAssistantStartedPhoneNumber_Vonage": ".types", + "ClientMessageAssistantStartedType": ".types", + "ClientMessageCallDeleteFailed": ".types", + "ClientMessageCallDeleteFailedPhoneNumber": ".types", + "ClientMessageCallDeleteFailedPhoneNumber_ByoPhoneNumber": ".types", + "ClientMessageCallDeleteFailedPhoneNumber_Telnyx": ".types", + "ClientMessageCallDeleteFailedPhoneNumber_Twilio": ".types", + "ClientMessageCallDeleteFailedPhoneNumber_Vapi": ".types", + "ClientMessageCallDeleteFailedPhoneNumber_Vonage": ".types", + "ClientMessageCallDeleteFailedType": ".types", + "ClientMessageCallDeleted": ".types", + "ClientMessageCallDeletedPhoneNumber": ".types", + "ClientMessageCallDeletedPhoneNumber_ByoPhoneNumber": ".types", + "ClientMessageCallDeletedPhoneNumber_Telnyx": ".types", + "ClientMessageCallDeletedPhoneNumber_Twilio": ".types", + "ClientMessageCallDeletedPhoneNumber_Vapi": ".types", + "ClientMessageCallDeletedPhoneNumber_Vonage": ".types", + "ClientMessageCallDeletedType": ".types", + "ClientMessageChatCreated": ".types", + "ClientMessageChatCreatedPhoneNumber": ".types", + "ClientMessageChatCreatedPhoneNumber_ByoPhoneNumber": ".types", + "ClientMessageChatCreatedPhoneNumber_Telnyx": ".types", + "ClientMessageChatCreatedPhoneNumber_Twilio": ".types", + "ClientMessageChatCreatedPhoneNumber_Vapi": ".types", + "ClientMessageChatCreatedPhoneNumber_Vonage": ".types", + "ClientMessageChatCreatedType": ".types", + "ClientMessageChatDeleted": ".types", + "ClientMessageChatDeletedPhoneNumber": ".types", + "ClientMessageChatDeletedPhoneNumber_ByoPhoneNumber": ".types", + "ClientMessageChatDeletedPhoneNumber_Telnyx": ".types", + "ClientMessageChatDeletedPhoneNumber_Twilio": ".types", + "ClientMessageChatDeletedPhoneNumber_Vapi": ".types", + "ClientMessageChatDeletedPhoneNumber_Vonage": ".types", + "ClientMessageChatDeletedType": ".types", + "ClientMessageConversationUpdate": ".types", + "ClientMessageConversationUpdateMessagesItem": ".types", + "ClientMessageConversationUpdatePhoneNumber": ".types", + "ClientMessageConversationUpdatePhoneNumber_ByoPhoneNumber": ".types", + "ClientMessageConversationUpdatePhoneNumber_Telnyx": ".types", + "ClientMessageConversationUpdatePhoneNumber_Twilio": ".types", + "ClientMessageConversationUpdatePhoneNumber_Vapi": ".types", + "ClientMessageConversationUpdatePhoneNumber_Vonage": ".types", + "ClientMessageConversationUpdateType": ".types", + "ClientMessageHang": ".types", + "ClientMessageHangPhoneNumber": ".types", + "ClientMessageHangPhoneNumber_ByoPhoneNumber": ".types", + "ClientMessageHangPhoneNumber_Telnyx": ".types", + "ClientMessageHangPhoneNumber_Twilio": ".types", + "ClientMessageHangPhoneNumber_Vapi": ".types", + "ClientMessageHangPhoneNumber_Vonage": ".types", + "ClientMessageHangType": ".types", + "ClientMessageLanguageChangeDetected": ".types", + "ClientMessageLanguageChangeDetectedPhoneNumber": ".types", + "ClientMessageLanguageChangeDetectedPhoneNumber_ByoPhoneNumber": ".types", + "ClientMessageLanguageChangeDetectedPhoneNumber_Telnyx": ".types", + "ClientMessageLanguageChangeDetectedPhoneNumber_Twilio": ".types", + "ClientMessageLanguageChangeDetectedPhoneNumber_Vapi": ".types", + "ClientMessageLanguageChangeDetectedPhoneNumber_Vonage": ".types", + "ClientMessageLanguageChangeDetectedType": ".types", + "ClientMessageMessage": ".types", + "ClientMessageMetadata": ".types", + "ClientMessageMetadataPhoneNumber": ".types", + "ClientMessageMetadataPhoneNumber_ByoPhoneNumber": ".types", + "ClientMessageMetadataPhoneNumber_Telnyx": ".types", + "ClientMessageMetadataPhoneNumber_Twilio": ".types", + "ClientMessageMetadataPhoneNumber_Vapi": ".types", + "ClientMessageMetadataPhoneNumber_Vonage": ".types", + "ClientMessageMetadataType": ".types", + "ClientMessageModelOutput": ".types", + "ClientMessageModelOutputPhoneNumber": ".types", + "ClientMessageModelOutputPhoneNumber_ByoPhoneNumber": ".types", + "ClientMessageModelOutputPhoneNumber_Telnyx": ".types", + "ClientMessageModelOutputPhoneNumber_Twilio": ".types", + "ClientMessageModelOutputPhoneNumber_Vapi": ".types", + "ClientMessageModelOutputPhoneNumber_Vonage": ".types", + "ClientMessageModelOutputType": ".types", + "ClientMessageSessionCreated": ".types", + "ClientMessageSessionCreatedPhoneNumber": ".types", + "ClientMessageSessionCreatedPhoneNumber_ByoPhoneNumber": ".types", + "ClientMessageSessionCreatedPhoneNumber_Telnyx": ".types", + "ClientMessageSessionCreatedPhoneNumber_Twilio": ".types", + "ClientMessageSessionCreatedPhoneNumber_Vapi": ".types", + "ClientMessageSessionCreatedPhoneNumber_Vonage": ".types", + "ClientMessageSessionCreatedType": ".types", + "ClientMessageSessionDeleted": ".types", + "ClientMessageSessionDeletedPhoneNumber": ".types", + "ClientMessageSessionDeletedPhoneNumber_ByoPhoneNumber": ".types", + "ClientMessageSessionDeletedPhoneNumber_Telnyx": ".types", + "ClientMessageSessionDeletedPhoneNumber_Twilio": ".types", + "ClientMessageSessionDeletedPhoneNumber_Vapi": ".types", + "ClientMessageSessionDeletedPhoneNumber_Vonage": ".types", + "ClientMessageSessionDeletedType": ".types", + "ClientMessageSessionUpdated": ".types", + "ClientMessageSessionUpdatedPhoneNumber": ".types", + "ClientMessageSessionUpdatedPhoneNumber_ByoPhoneNumber": ".types", + "ClientMessageSessionUpdatedPhoneNumber_Telnyx": ".types", + "ClientMessageSessionUpdatedPhoneNumber_Twilio": ".types", + "ClientMessageSessionUpdatedPhoneNumber_Vapi": ".types", + "ClientMessageSessionUpdatedPhoneNumber_Vonage": ".types", + "ClientMessageSessionUpdatedType": ".types", + "ClientMessageSpeechUpdate": ".types", + "ClientMessageSpeechUpdatePhoneNumber": ".types", + "ClientMessageSpeechUpdatePhoneNumber_ByoPhoneNumber": ".types", + "ClientMessageSpeechUpdatePhoneNumber_Telnyx": ".types", + "ClientMessageSpeechUpdatePhoneNumber_Twilio": ".types", + "ClientMessageSpeechUpdatePhoneNumber_Vapi": ".types", + "ClientMessageSpeechUpdatePhoneNumber_Vonage": ".types", + "ClientMessageSpeechUpdateRole": ".types", + "ClientMessageSpeechUpdateStatus": ".types", + "ClientMessageSpeechUpdateType": ".types", + "ClientMessageToolCalls": ".types", + "ClientMessageToolCallsPhoneNumber": ".types", + "ClientMessageToolCallsPhoneNumber_ByoPhoneNumber": ".types", + "ClientMessageToolCallsPhoneNumber_Telnyx": ".types", + "ClientMessageToolCallsPhoneNumber_Twilio": ".types", + "ClientMessageToolCallsPhoneNumber_Vapi": ".types", + "ClientMessageToolCallsPhoneNumber_Vonage": ".types", + "ClientMessageToolCallsResult": ".types", + "ClientMessageToolCallsResultPhoneNumber": ".types", + "ClientMessageToolCallsResultPhoneNumber_ByoPhoneNumber": ".types", + "ClientMessageToolCallsResultPhoneNumber_Telnyx": ".types", + "ClientMessageToolCallsResultPhoneNumber_Twilio": ".types", + "ClientMessageToolCallsResultPhoneNumber_Vapi": ".types", + "ClientMessageToolCallsResultPhoneNumber_Vonage": ".types", + "ClientMessageToolCallsResultType": ".types", + "ClientMessageToolCallsToolWithToolCallListItem": ".types", + "ClientMessageToolCallsToolWithToolCallListItem_Bash": ".types", + "ClientMessageToolCallsToolWithToolCallListItem_Computer": ".types", + "ClientMessageToolCallsToolWithToolCallListItem_Function": ".types", + "ClientMessageToolCallsToolWithToolCallListItem_Ghl": ".types", + "ClientMessageToolCallsToolWithToolCallListItem_GoogleCalendarEventCreate": ".types", + "ClientMessageToolCallsToolWithToolCallListItem_Make": ".types", + "ClientMessageToolCallsToolWithToolCallListItem_TextEditor": ".types", + "ClientMessageToolCallsType": ".types", + "ClientMessageTranscript": ".types", + "ClientMessageTranscriptPhoneNumber": ".types", + "ClientMessageTranscriptPhoneNumber_ByoPhoneNumber": ".types", + "ClientMessageTranscriptPhoneNumber_Telnyx": ".types", + "ClientMessageTranscriptPhoneNumber_Twilio": ".types", + "ClientMessageTranscriptPhoneNumber_Vapi": ".types", + "ClientMessageTranscriptPhoneNumber_Vonage": ".types", + "ClientMessageTranscriptRole": ".types", + "ClientMessageTranscriptTranscriptType": ".types", + "ClientMessageTranscriptType": ".types", + "ClientMessageTransferUpdate": ".types", + "ClientMessageTransferUpdateDestination": ".types", + "ClientMessageTransferUpdateDestination_Assistant": ".types", + "ClientMessageTransferUpdateDestination_Number": ".types", + "ClientMessageTransferUpdateDestination_Sip": ".types", + "ClientMessageTransferUpdatePhoneNumber": ".types", + "ClientMessageTransferUpdatePhoneNumber_ByoPhoneNumber": ".types", + "ClientMessageTransferUpdatePhoneNumber_Telnyx": ".types", + "ClientMessageTransferUpdatePhoneNumber_Twilio": ".types", + "ClientMessageTransferUpdatePhoneNumber_Vapi": ".types", + "ClientMessageTransferUpdatePhoneNumber_Vonage": ".types", + "ClientMessageTransferUpdateType": ".types", + "ClientMessageUserInterrupted": ".types", + "ClientMessageUserInterruptedPhoneNumber": ".types", + "ClientMessageUserInterruptedPhoneNumber_ByoPhoneNumber": ".types", + "ClientMessageUserInterruptedPhoneNumber_Telnyx": ".types", + "ClientMessageUserInterruptedPhoneNumber_Twilio": ".types", + "ClientMessageUserInterruptedPhoneNumber_Vapi": ".types", + "ClientMessageUserInterruptedPhoneNumber_Vonage": ".types", + "ClientMessageUserInterruptedType": ".types", + "ClientMessageVoiceInput": ".types", + "ClientMessageVoiceInputPhoneNumber": ".types", + "ClientMessageVoiceInputPhoneNumber_ByoPhoneNumber": ".types", + "ClientMessageVoiceInputPhoneNumber_Telnyx": ".types", + "ClientMessageVoiceInputPhoneNumber_Twilio": ".types", + "ClientMessageVoiceInputPhoneNumber_Vapi": ".types", + "ClientMessageVoiceInputPhoneNumber_Vonage": ".types", + "ClientMessageVoiceInputType": ".types", + "ClientMessageWorkflowNodeStarted": ".types", + "ClientMessageWorkflowNodeStartedPhoneNumber": ".types", + "ClientMessageWorkflowNodeStartedPhoneNumber_ByoPhoneNumber": ".types", + "ClientMessageWorkflowNodeStartedPhoneNumber_Telnyx": ".types", + "ClientMessageWorkflowNodeStartedPhoneNumber_Twilio": ".types", + "ClientMessageWorkflowNodeStartedPhoneNumber_Vapi": ".types", + "ClientMessageWorkflowNodeStartedPhoneNumber_Vonage": ".types", + "ClientMessageWorkflowNodeStartedType": ".types", + "CloneVoiceDto": ".types", + "CloudflareCredential": ".types", + "CloudflareCredentialProvider": ".types", + "CloudflareR2BucketPlan": ".types", + "CodeTool": ".types", + "CodeToolEnvironmentVariable": ".types", + "CodeToolMessagesItem": ".types", + "CodeToolMessagesItem_RequestComplete": ".types", + "CodeToolMessagesItem_RequestFailed": ".types", + "CodeToolMessagesItem_RequestResponseDelayed": ".types", + "CodeToolMessagesItem_RequestStart": ".types", + "Compliance": ".types", + "ComplianceOverride": ".types", + "CompliancePlan": ".types", + "CompliancePlanRecordingConsentPlan": ".types", + "CompliancePlanRecordingConsentPlan_StayOnLine": ".types", + "CompliancePlanRecordingConsentPlan_Verbal": ".types", + "ComputerTool": ".types", + "ComputerToolMessagesItem": ".types", + "ComputerToolMessagesItem_RequestComplete": ".types", + "ComputerToolMessagesItem_RequestFailed": ".types", + "ComputerToolMessagesItem_RequestResponseDelayed": ".types", + "ComputerToolMessagesItem_RequestStart": ".types", + "ComputerToolName": ".types", + "ComputerToolSubType": ".types", + "ComputerToolWithToolCall": ".types", + "ComputerToolWithToolCallMessagesItem": ".types", + "ComputerToolWithToolCallMessagesItem_RequestComplete": ".types", + "ComputerToolWithToolCallMessagesItem_RequestFailed": ".types", + "ComputerToolWithToolCallMessagesItem_RequestResponseDelayed": ".types", + "ComputerToolWithToolCallMessagesItem_RequestStart": ".types", + "ComputerToolWithToolCallName": ".types", + "ComputerToolWithToolCallSubType": ".types", + "Condition": ".types", + "ConditionOperator": ".types", + "ContextEngineeringPlanAll": ".types", + "ContextEngineeringPlanLastNMessages": ".types", + "ContextEngineeringPlanNone": ".types", + "ContextEngineeringPlanUserAndAssistantMessages": ".types", + "ConversationNode": ".types", + "ConversationNodeModel": ".types", + "ConversationNodeModel_Anthropic": ".types", + "ConversationNodeModel_AnthropicBedrock": ".types", + "ConversationNodeModel_CustomLlm": ".types", + "ConversationNodeModel_Google": ".types", + "ConversationNodeModel_Openai": ".types", + "ConversationNodeToolsItem": ".types", + "ConversationNodeToolsItem_ApiRequest": ".types", + "ConversationNodeToolsItem_Bash": ".types", + "ConversationNodeToolsItem_Code": ".types", + "ConversationNodeToolsItem_Computer": ".types", + "ConversationNodeToolsItem_Dtmf": ".types", + "ConversationNodeToolsItem_EndCall": ".types", + "ConversationNodeToolsItem_Function": ".types", + "ConversationNodeToolsItem_GohighlevelCalendarAvailabilityCheck": ".types", + "ConversationNodeToolsItem_GohighlevelCalendarEventCreate": ".types", + "ConversationNodeToolsItem_GohighlevelContactCreate": ".types", + "ConversationNodeToolsItem_GohighlevelContactGet": ".types", + "ConversationNodeToolsItem_GoogleCalendarAvailabilityCheck": ".types", + "ConversationNodeToolsItem_GoogleCalendarEventCreate": ".types", + "ConversationNodeToolsItem_GoogleSheetsRowAppend": ".types", + "ConversationNodeToolsItem_Handoff": ".types", + "ConversationNodeToolsItem_Mcp": ".types", + "ConversationNodeToolsItem_Query": ".types", + "ConversationNodeToolsItem_SipRequest": ".types", + "ConversationNodeToolsItem_SlackMessageSend": ".types", + "ConversationNodeToolsItem_Sms": ".types", + "ConversationNodeToolsItem_TextEditor": ".types", + "ConversationNodeToolsItem_TransferCall": ".types", + "ConversationNodeToolsItem_Voicemail": ".types", + "ConversationNodeTranscriber": ".types", + "ConversationNodeTranscriber_11Labs": ".types", + "ConversationNodeTranscriber_AssemblyAi": ".types", + "ConversationNodeTranscriber_Azure": ".types", + "ConversationNodeTranscriber_Cartesia": ".types", + "ConversationNodeTranscriber_CustomTranscriber": ".types", + "ConversationNodeTranscriber_Deepgram": ".types", + "ConversationNodeTranscriber_Gladia": ".types", + "ConversationNodeTranscriber_Google": ".types", + "ConversationNodeTranscriber_Openai": ".types", + "ConversationNodeTranscriber_Soniox": ".types", + "ConversationNodeTranscriber_Speechmatics": ".types", + "ConversationNodeTranscriber_Talkscriber": ".types", + "ConversationNodeVoice": ".types", + "ConversationNodeVoice_11Labs": ".types", + "ConversationNodeVoice_Azure": ".types", + "ConversationNodeVoice_Cartesia": ".types", + "ConversationNodeVoice_CustomVoice": ".types", + "ConversationNodeVoice_Deepgram": ".types", + "ConversationNodeVoice_Hume": ".types", + "ConversationNodeVoice_Inworld": ".types", + "ConversationNodeVoice_Lmnt": ".types", + "ConversationNodeVoice_Minimax": ".types", + "ConversationNodeVoice_Neuphonic": ".types", + "ConversationNodeVoice_Openai": ".types", + "ConversationNodeVoice_Playht": ".types", + "ConversationNodeVoice_RimeAi": ".types", + "ConversationNodeVoice_Sesame": ".types", + "ConversationNodeVoice_SmallestAi": ".types", + "ConversationNodeVoice_Tavus": ".types", + "ConversationNodeVoice_Vapi": ".types", + "ConversationNodeVoice_Wellsaid": ".types", + "CostBreakdown": ".types", + "CreateAnthropicBedrockCredentialDto": ".types", + "CreateAnthropicBedrockCredentialDtoAuthenticationPlan": ".types", + "CreateAnthropicBedrockCredentialDtoAuthenticationPlan_AwsIam": ".types", + "CreateAnthropicBedrockCredentialDtoAuthenticationPlan_AwsSts": ".types", + "CreateAnthropicBedrockCredentialDtoRegion": ".types", + "CreateAnthropicCredentialDto": ".types", + "CreateAnyscaleCredentialDto": ".types", + "CreateApiRequestToolDto": ".types", + "CreateApiRequestToolDtoMessagesItem": ".types", + "CreateApiRequestToolDtoMessagesItem_RequestComplete": ".types", + "CreateApiRequestToolDtoMessagesItem_RequestFailed": ".types", + "CreateApiRequestToolDtoMessagesItem_RequestResponseDelayed": ".types", + "CreateApiRequestToolDtoMessagesItem_RequestStart": ".types", + "CreateApiRequestToolDtoMethod": ".types", + "CreateAssemblyAiCredentialDto": ".types", + "CreateAssistantDto": ".types", + "CreateAssistantDtoBackgroundSound": ".types", + "CreateAssistantDtoBackgroundSoundZero": ".types", + "CreateAssistantDtoClientMessagesItem": ".types", + "CreateAssistantDtoCredentialsItem": ".types", + "CreateAssistantDtoCredentialsItem_11Labs": ".types", + "CreateAssistantDtoCredentialsItem_Anthropic": ".types", + "CreateAssistantDtoCredentialsItem_AnthropicBedrock": ".types", + "CreateAssistantDtoCredentialsItem_Anyscale": ".types", + "CreateAssistantDtoCredentialsItem_AssemblyAi": ".types", + "CreateAssistantDtoCredentialsItem_Azure": ".types", + "CreateAssistantDtoCredentialsItem_AzureOpenai": ".types", + "CreateAssistantDtoCredentialsItem_ByoSipTrunk": ".types", + "CreateAssistantDtoCredentialsItem_Cartesia": ".types", + "CreateAssistantDtoCredentialsItem_Cerebras": ".types", + "CreateAssistantDtoCredentialsItem_Cloudflare": ".types", + "CreateAssistantDtoCredentialsItem_CustomCredential": ".types", + "CreateAssistantDtoCredentialsItem_CustomLlm": ".types", + "CreateAssistantDtoCredentialsItem_DeepSeek": ".types", + "CreateAssistantDtoCredentialsItem_Deepgram": ".types", + "CreateAssistantDtoCredentialsItem_Deepinfra": ".types", + "CreateAssistantDtoCredentialsItem_Email": ".types", + "CreateAssistantDtoCredentialsItem_Gcp": ".types", + "CreateAssistantDtoCredentialsItem_GhlOauth2Authorization": ".types", + "CreateAssistantDtoCredentialsItem_Gladia": ".types", + "CreateAssistantDtoCredentialsItem_Gohighlevel": ".types", + "CreateAssistantDtoCredentialsItem_Google": ".types", + "CreateAssistantDtoCredentialsItem_GoogleCalendarOauth2Authorization": ".types", + "CreateAssistantDtoCredentialsItem_GoogleCalendarOauth2Client": ".types", + "CreateAssistantDtoCredentialsItem_GoogleSheetsOauth2Authorization": ".types", + "CreateAssistantDtoCredentialsItem_Groq": ".types", + "CreateAssistantDtoCredentialsItem_Hume": ".types", + "CreateAssistantDtoCredentialsItem_InflectionAi": ".types", + "CreateAssistantDtoCredentialsItem_Inworld": ".types", + "CreateAssistantDtoCredentialsItem_Langfuse": ".types", + "CreateAssistantDtoCredentialsItem_Lmnt": ".types", + "CreateAssistantDtoCredentialsItem_Make": ".types", + "CreateAssistantDtoCredentialsItem_Minimax": ".types", + "CreateAssistantDtoCredentialsItem_Mistral": ".types", + "CreateAssistantDtoCredentialsItem_Neuphonic": ".types", + "CreateAssistantDtoCredentialsItem_Openai": ".types", + "CreateAssistantDtoCredentialsItem_Openrouter": ".types", + "CreateAssistantDtoCredentialsItem_PerplexityAi": ".types", + "CreateAssistantDtoCredentialsItem_Playht": ".types", + "CreateAssistantDtoCredentialsItem_RimeAi": ".types", + "CreateAssistantDtoCredentialsItem_Runpod": ".types", + "CreateAssistantDtoCredentialsItem_S3": ".types", + "CreateAssistantDtoCredentialsItem_SlackOauth2Authorization": ".types", + "CreateAssistantDtoCredentialsItem_SlackWebhook": ".types", + "CreateAssistantDtoCredentialsItem_SmallestAi": ".types", + "CreateAssistantDtoCredentialsItem_Soniox": ".types", + "CreateAssistantDtoCredentialsItem_Speechmatics": ".types", + "CreateAssistantDtoCredentialsItem_Supabase": ".types", + "CreateAssistantDtoCredentialsItem_Tavus": ".types", + "CreateAssistantDtoCredentialsItem_TogetherAi": ".types", + "CreateAssistantDtoCredentialsItem_Trieve": ".types", + "CreateAssistantDtoCredentialsItem_Twilio": ".types", + "CreateAssistantDtoCredentialsItem_Vonage": ".types", + "CreateAssistantDtoCredentialsItem_Webhook": ".types", + "CreateAssistantDtoCredentialsItem_Wellsaid": ".types", + "CreateAssistantDtoCredentialsItem_Xai": ".types", + "CreateAssistantDtoFirstMessageMode": ".types", + "CreateAssistantDtoHooksItem": ".types", + "CreateAssistantDtoModel": ".types", + "CreateAssistantDtoModel_Anthropic": ".types", + "CreateAssistantDtoModel_AnthropicBedrock": ".types", + "CreateAssistantDtoModel_Anyscale": ".types", + "CreateAssistantDtoModel_Cerebras": ".types", + "CreateAssistantDtoModel_CustomLlm": ".types", + "CreateAssistantDtoModel_DeepSeek": ".types", + "CreateAssistantDtoModel_Deepinfra": ".types", + "CreateAssistantDtoModel_Google": ".types", + "CreateAssistantDtoModel_Groq": ".types", + "CreateAssistantDtoModel_InflectionAi": ".types", + "CreateAssistantDtoModel_Minimax": ".types", + "CreateAssistantDtoModel_Openai": ".types", + "CreateAssistantDtoModel_Openrouter": ".types", + "CreateAssistantDtoModel_PerplexityAi": ".types", + "CreateAssistantDtoModel_TogetherAi": ".types", + "CreateAssistantDtoModel_Xai": ".types", + "CreateAssistantDtoServerMessagesItem": ".types", + "CreateAssistantDtoTranscriber": ".types", + "CreateAssistantDtoTranscriber_11Labs": ".types", + "CreateAssistantDtoTranscriber_AssemblyAi": ".types", + "CreateAssistantDtoTranscriber_Azure": ".types", + "CreateAssistantDtoTranscriber_Cartesia": ".types", + "CreateAssistantDtoTranscriber_CustomTranscriber": ".types", + "CreateAssistantDtoTranscriber_Deepgram": ".types", + "CreateAssistantDtoTranscriber_Gladia": ".types", + "CreateAssistantDtoTranscriber_Google": ".types", + "CreateAssistantDtoTranscriber_Openai": ".types", + "CreateAssistantDtoTranscriber_Soniox": ".types", + "CreateAssistantDtoTranscriber_Speechmatics": ".types", + "CreateAssistantDtoTranscriber_Talkscriber": ".types", + "CreateAssistantDtoVoice": ".types", + "CreateAssistantDtoVoice_11Labs": ".types", + "CreateAssistantDtoVoice_Azure": ".types", + "CreateAssistantDtoVoice_Cartesia": ".types", + "CreateAssistantDtoVoice_CustomVoice": ".types", + "CreateAssistantDtoVoice_Deepgram": ".types", + "CreateAssistantDtoVoice_Hume": ".types", + "CreateAssistantDtoVoice_Inworld": ".types", + "CreateAssistantDtoVoice_Lmnt": ".types", + "CreateAssistantDtoVoice_Minimax": ".types", + "CreateAssistantDtoVoice_Neuphonic": ".types", + "CreateAssistantDtoVoice_Openai": ".types", + "CreateAssistantDtoVoice_Playht": ".types", + "CreateAssistantDtoVoice_RimeAi": ".types", + "CreateAssistantDtoVoice_Sesame": ".types", + "CreateAssistantDtoVoice_SmallestAi": ".types", + "CreateAssistantDtoVoice_Tavus": ".types", + "CreateAssistantDtoVoice_Vapi": ".types", + "CreateAssistantDtoVoice_Wellsaid": ".types", + "CreateAssistantDtoVoicemailDetection": ".types", + "CreateAssistantDtoVoicemailDetectionZero": ".types", + "CreateAzureCredentialDto": ".types", + "CreateAzureCredentialDtoRegion": ".types", + "CreateAzureCredentialDtoService": ".types", + "CreateAzureOpenAiCredentialDto": ".types", + "CreateAzureOpenAiCredentialDtoModelsItem": ".types", + "CreateAzureOpenAiCredentialDtoRegion": ".types", + "CreateBarInsightFromCallTableDto": ".types", + "CreateBarInsightFromCallTableDtoGroupBy": ".types", + "CreateBarInsightFromCallTableDtoQueriesItem": ".types", + "CreateBashToolDto": ".types", + "CreateBashToolDtoMessagesItem": ".types", + "CreateBashToolDtoMessagesItem_RequestComplete": ".types", + "CreateBashToolDtoMessagesItem_RequestFailed": ".types", + "CreateBashToolDtoMessagesItem_RequestResponseDelayed": ".types", + "CreateBashToolDtoMessagesItem_RequestStart": ".types", + "CreateBashToolDtoName": ".types", + "CreateBashToolDtoSubType": ".types", + "CreateByoPhoneNumberDto": ".types", + "CreateByoPhoneNumberDtoFallbackDestination": ".types", + "CreateByoPhoneNumberDtoFallbackDestination_Number": ".types", + "CreateByoPhoneNumberDtoFallbackDestination_Sip": ".types", + "CreateByoPhoneNumberDtoHooksItem": ".types", + "CreateByoPhoneNumberDtoHooksItem_CallEnding": ".types", + "CreateByoPhoneNumberDtoHooksItem_CallRinging": ".types", + "CreateByoSipTrunkCredentialDto": ".types", + "CreateCallsResponse": ".calls", + "CreateCartesiaCredentialDto": ".types", + "CreateCerebrasCredentialDto": ".types", + "CreateChatDtoInput": ".chats", + "CreateChatDtoInputOneItem": ".chats", + "CreateChatStreamResponse": ".types", + "CreateChatsResponse": ".chats", + "CreateCloudflareCredentialDto": ".types", + "CreateCodeToolDto": ".types", + "CreateCodeToolDtoMessagesItem": ".types", + "CreateCodeToolDtoMessagesItem_RequestComplete": ".types", + "CreateCodeToolDtoMessagesItem_RequestFailed": ".types", + "CreateCodeToolDtoMessagesItem_RequestResponseDelayed": ".types", + "CreateCodeToolDtoMessagesItem_RequestStart": ".types", + "CreateComputerToolDto": ".types", + "CreateComputerToolDtoMessagesItem": ".types", + "CreateComputerToolDtoMessagesItem_RequestComplete": ".types", + "CreateComputerToolDtoMessagesItem_RequestFailed": ".types", + "CreateComputerToolDtoMessagesItem_RequestResponseDelayed": ".types", + "CreateComputerToolDtoMessagesItem_RequestStart": ".types", + "CreateComputerToolDtoName": ".types", + "CreateComputerToolDtoSubType": ".types", + "CreateCustomCredentialDto": ".types", + "CreateCustomCredentialDtoAuthenticationPlan": ".types", + "CreateCustomCredentialDtoAuthenticationPlan_Bearer": ".types", + "CreateCustomCredentialDtoAuthenticationPlan_Hmac": ".types", + "CreateCustomCredentialDtoAuthenticationPlan_Oauth2": ".types", + "CreateCustomCredentialDtoEncryptionPlan": ".types", + "CreateCustomCredentialDtoEncryptionPlan_PublicKey": ".types", + "CreateCustomKnowledgeBaseDto": ".types", + "CreateCustomKnowledgeBaseDtoProvider": ".types", + "CreateCustomLlmCredentialDto": ".types", + "CreateCustomerDto": ".types", + "CreateDeepInfraCredentialDto": ".types", + "CreateDeepSeekCredentialDto": ".types", + "CreateDeepgramCredentialDto": ".types", + "CreateDtmfToolDto": ".types", + "CreateDtmfToolDtoMessagesItem": ".types", + "CreateDtmfToolDtoMessagesItem_RequestComplete": ".types", + "CreateDtmfToolDtoMessagesItem_RequestFailed": ".types", + "CreateDtmfToolDtoMessagesItem_RequestResponseDelayed": ".types", + "CreateDtmfToolDtoMessagesItem_RequestStart": ".types", + "CreateElevenLabsCredentialDto": ".types", + "CreateEmailCredentialDto": ".types", + "CreateEndCallToolDto": ".types", + "CreateEndCallToolDtoMessagesItem": ".types", + "CreateEndCallToolDtoMessagesItem_RequestComplete": ".types", + "CreateEndCallToolDtoMessagesItem_RequestFailed": ".types", + "CreateEndCallToolDtoMessagesItem_RequestResponseDelayed": ".types", + "CreateEndCallToolDtoMessagesItem_RequestStart": ".types", + "CreateEvalDto": ".types", + "CreateEvalDtoMessagesItem": ".types", + "CreateEvalDtoType": ".types", + "CreateEvalRunDtoTarget": ".eval", + "CreateEvalRunDtoTarget_Assistant": ".eval", + "CreateEvalRunDtoTarget_Squad": ".eval", + "CreateEvalRunDtoType": ".eval", + "CreateFunctionToolDto": ".types", + "CreateFunctionToolDtoMessagesItem": ".types", + "CreateFunctionToolDtoMessagesItem_RequestComplete": ".types", + "CreateFunctionToolDtoMessagesItem_RequestFailed": ".types", + "CreateFunctionToolDtoMessagesItem_RequestResponseDelayed": ".types", + "CreateFunctionToolDtoMessagesItem_RequestStart": ".types", + "CreateGcpCredentialDto": ".types", + "CreateGhlToolDto": ".types", + "CreateGhlToolDtoMessagesItem": ".types", + "CreateGhlToolDtoMessagesItem_RequestComplete": ".types", + "CreateGhlToolDtoMessagesItem_RequestFailed": ".types", + "CreateGhlToolDtoMessagesItem_RequestResponseDelayed": ".types", + "CreateGhlToolDtoMessagesItem_RequestStart": ".types", + "CreateGhlToolDtoType": ".types", + "CreateGladiaCredentialDto": ".types", + "CreateGoHighLevelCalendarAvailabilityToolDto": ".types", + "CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem": ".types", + "CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestComplete": ".types", + "CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestFailed": ".types", + "CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestResponseDelayed": ".types", + "CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestStart": ".types", + "CreateGoHighLevelCalendarEventCreateToolDto": ".types", + "CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem": ".types", + "CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestComplete": ".types", + "CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestFailed": ".types", + "CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestResponseDelayed": ".types", + "CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestStart": ".types", + "CreateGoHighLevelContactCreateToolDto": ".types", + "CreateGoHighLevelContactCreateToolDtoMessagesItem": ".types", + "CreateGoHighLevelContactCreateToolDtoMessagesItem_RequestComplete": ".types", + "CreateGoHighLevelContactCreateToolDtoMessagesItem_RequestFailed": ".types", + "CreateGoHighLevelContactCreateToolDtoMessagesItem_RequestResponseDelayed": ".types", + "CreateGoHighLevelContactCreateToolDtoMessagesItem_RequestStart": ".types", + "CreateGoHighLevelContactGetToolDto": ".types", + "CreateGoHighLevelContactGetToolDtoMessagesItem": ".types", + "CreateGoHighLevelContactGetToolDtoMessagesItem_RequestComplete": ".types", + "CreateGoHighLevelContactGetToolDtoMessagesItem_RequestFailed": ".types", + "CreateGoHighLevelContactGetToolDtoMessagesItem_RequestResponseDelayed": ".types", + "CreateGoHighLevelContactGetToolDtoMessagesItem_RequestStart": ".types", + "CreateGoHighLevelCredentialDto": ".types", + "CreateGoHighLevelMcpCredentialDto": ".types", + "CreateGoogleCalendarCheckAvailabilityToolDto": ".types", + "CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem": ".types", + "CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestComplete": ".types", + "CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestFailed": ".types", + "CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestResponseDelayed": ".types", + "CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestStart": ".types", + "CreateGoogleCalendarCreateEventToolDto": ".types", + "CreateGoogleCalendarCreateEventToolDtoMessagesItem": ".types", + "CreateGoogleCalendarCreateEventToolDtoMessagesItem_RequestComplete": ".types", + "CreateGoogleCalendarCreateEventToolDtoMessagesItem_RequestFailed": ".types", + "CreateGoogleCalendarCreateEventToolDtoMessagesItem_RequestResponseDelayed": ".types", + "CreateGoogleCalendarCreateEventToolDtoMessagesItem_RequestStart": ".types", + "CreateGoogleCalendarOAuth2AuthorizationCredentialDto": ".types", + "CreateGoogleCalendarOAuth2ClientCredentialDto": ".types", + "CreateGoogleCredentialDto": ".types", + "CreateGoogleSheetsOAuth2AuthorizationCredentialDto": ".types", + "CreateGoogleSheetsRowAppendToolDto": ".types", + "CreateGoogleSheetsRowAppendToolDtoMessagesItem": ".types", + "CreateGoogleSheetsRowAppendToolDtoMessagesItem_RequestComplete": ".types", + "CreateGoogleSheetsRowAppendToolDtoMessagesItem_RequestFailed": ".types", + "CreateGoogleSheetsRowAppendToolDtoMessagesItem_RequestResponseDelayed": ".types", + "CreateGoogleSheetsRowAppendToolDtoMessagesItem_RequestStart": ".types", + "CreateGroqCredentialDto": ".types", + "CreateHandoffToolDto": ".types", + "CreateHandoffToolDtoDestinationsItem": ".types", + "CreateHandoffToolDtoDestinationsItem_Assistant": ".types", + "CreateHandoffToolDtoDestinationsItem_Dynamic": ".types", + "CreateHandoffToolDtoDestinationsItem_Squad": ".types", + "CreateHandoffToolDtoMessagesItem": ".types", + "CreateHandoffToolDtoMessagesItem_RequestComplete": ".types", + "CreateHandoffToolDtoMessagesItem_RequestFailed": ".types", + "CreateHandoffToolDtoMessagesItem_RequestResponseDelayed": ".types", + "CreateHandoffToolDtoMessagesItem_RequestStart": ".types", + "CreateHumeCredentialDto": ".types", + "CreateInflectionAiCredentialDto": ".types", + "CreateInworldCredentialDto": ".types", + "CreateLangfuseCredentialDto": ".types", + "CreateLineInsightFromCallTableDto": ".types", + "CreateLineInsightFromCallTableDtoGroupBy": ".types", + "CreateLineInsightFromCallTableDtoQueriesItem": ".types", + "CreateLmntCredentialDto": ".types", + "CreateMakeCredentialDto": ".types", + "CreateMakeToolDto": ".types", + "CreateMakeToolDtoMessagesItem": ".types", + "CreateMakeToolDtoMessagesItem_RequestComplete": ".types", + "CreateMakeToolDtoMessagesItem_RequestFailed": ".types", + "CreateMakeToolDtoMessagesItem_RequestResponseDelayed": ".types", + "CreateMakeToolDtoMessagesItem_RequestStart": ".types", + "CreateMakeToolDtoType": ".types", + "CreateMcpToolDto": ".types", + "CreateMcpToolDtoMessagesItem": ".types", + "CreateMcpToolDtoMessagesItem_RequestComplete": ".types", + "CreateMcpToolDtoMessagesItem_RequestFailed": ".types", + "CreateMcpToolDtoMessagesItem_RequestResponseDelayed": ".types", + "CreateMcpToolDtoMessagesItem_RequestStart": ".types", + "CreateMinimaxCredentialDto": ".types", + "CreateMistralCredentialDto": ".types", + "CreateNeuphonicCredentialDto": ".types", + "CreateOpenAiCredentialDto": ".types", + "CreateOpenRouterCredentialDto": ".types", + "CreateOrgDto": ".types", + "CreateOrgDtoChannel": ".types", + "CreateOutboundCallDto": ".types", + "CreateOutputToolDto": ".types", + "CreateOutputToolDtoMessagesItem": ".types", + "CreateOutputToolDtoMessagesItem_RequestComplete": ".types", + "CreateOutputToolDtoMessagesItem_RequestFailed": ".types", + "CreateOutputToolDtoMessagesItem_RequestResponseDelayed": ".types", + "CreateOutputToolDtoMessagesItem_RequestStart": ".types", + "CreateOutputToolDtoType": ".types", + "CreatePerplexityAiCredentialDto": ".types", + "CreatePersonalityDto": ".types", + "CreatePhoneNumbersRequest": ".phone_numbers", + "CreatePhoneNumbersRequest_ByoPhoneNumber": ".phone_numbers", + "CreatePhoneNumbersRequest_Telnyx": ".phone_numbers", + "CreatePhoneNumbersRequest_Twilio": ".phone_numbers", + "CreatePhoneNumbersRequest_Vapi": ".phone_numbers", + "CreatePhoneNumbersRequest_Vonage": ".phone_numbers", + "CreatePhoneNumbersResponse": ".phone_numbers", + "CreatePhoneNumbersResponse_ByoPhoneNumber": ".phone_numbers", + "CreatePhoneNumbersResponse_Telnyx": ".phone_numbers", + "CreatePhoneNumbersResponse_Twilio": ".phone_numbers", + "CreatePhoneNumbersResponse_Vapi": ".phone_numbers", + "CreatePhoneNumbersResponse_Vonage": ".phone_numbers", + "CreatePieInsightFromCallTableDto": ".types", + "CreatePieInsightFromCallTableDtoGroupBy": ".types", + "CreatePieInsightFromCallTableDtoQueriesItem": ".types", + "CreatePlayHtCredentialDto": ".types", + "CreateQueryToolDto": ".types", + "CreateQueryToolDtoMessagesItem": ".types", + "CreateQueryToolDtoMessagesItem_RequestComplete": ".types", + "CreateQueryToolDtoMessagesItem_RequestFailed": ".types", + "CreateQueryToolDtoMessagesItem_RequestResponseDelayed": ".types", + "CreateQueryToolDtoMessagesItem_RequestStart": ".types", + "CreateResponseChatsResponse": ".chats", + "CreateRimeAiCredentialDto": ".types", + "CreateRunpodCredentialDto": ".types", + "CreateS3CredentialDto": ".types", + "CreateScenarioDto": ".types", + "CreateScenarioDtoHooksItem": ".types", + "CreateScenarioDtoHooksItem_SimulationRunEnded": ".types", + "CreateScenarioDtoHooksItem_SimulationRunStarted": ".types", + "CreateScorecardDto": ".types", + "CreateSesameVoiceDto": ".types", + "CreateSessionDtoMessagesItem": ".sessions", + "CreateSessionDtoStatus": ".sessions", + "CreateSimulationDto": ".types", + "CreateSimulationRunDto": ".types", + "CreateSimulationRunDtoSimulationsItem": ".types", + "CreateSimulationRunDtoSimulationsItem_Simulation": ".types", + "CreateSimulationRunDtoSimulationsItem_SimulationSuite": ".types", + "CreateSimulationRunDtoTarget": ".types", + "CreateSimulationRunDtoTarget_Assistant": ".types", + "CreateSimulationRunDtoTarget_Squad": ".types", + "CreateSimulationSuiteDto": ".types", + "CreateSipRequestToolDto": ".types", + "CreateSipRequestToolDtoBody": ".types", + "CreateSipRequestToolDtoMessagesItem": ".types", + "CreateSipRequestToolDtoMessagesItem_RequestComplete": ".types", + "CreateSipRequestToolDtoMessagesItem_RequestFailed": ".types", + "CreateSipRequestToolDtoMessagesItem_RequestResponseDelayed": ".types", + "CreateSipRequestToolDtoMessagesItem_RequestStart": ".types", + "CreateSipRequestToolDtoVerb": ".types", + "CreateSlackOAuth2AuthorizationCredentialDto": ".types", + "CreateSlackSendMessageToolDto": ".types", + "CreateSlackSendMessageToolDtoMessagesItem": ".types", + "CreateSlackSendMessageToolDtoMessagesItem_RequestComplete": ".types", + "CreateSlackSendMessageToolDtoMessagesItem_RequestFailed": ".types", + "CreateSlackSendMessageToolDtoMessagesItem_RequestResponseDelayed": ".types", + "CreateSlackSendMessageToolDtoMessagesItem_RequestStart": ".types", + "CreateSlackWebhookCredentialDto": ".types", + "CreateSmallestAiCredentialDto": ".types", + "CreateSmsToolDto": ".types", + "CreateSmsToolDtoMessagesItem": ".types", + "CreateSmsToolDtoMessagesItem_RequestComplete": ".types", + "CreateSmsToolDtoMessagesItem_RequestFailed": ".types", + "CreateSmsToolDtoMessagesItem_RequestResponseDelayed": ".types", + "CreateSmsToolDtoMessagesItem_RequestStart": ".types", + "CreateSonioxCredentialDto": ".types", + "CreateSpeechmaticsCredentialDto": ".types", + "CreateSquadDto": ".types", + "CreateStructuredOutputDto": ".types", + "CreateStructuredOutputDtoModel": ".types", + "CreateStructuredOutputDtoModel_Anthropic": ".types", + "CreateStructuredOutputDtoModel_AnthropicBedrock": ".types", + "CreateStructuredOutputDtoModel_CustomLlm": ".types", + "CreateStructuredOutputDtoModel_Google": ".types", + "CreateStructuredOutputDtoModel_Openai": ".types", + "CreateStructuredOutputDtoType": ".types", + "CreateSupabaseCredentialDto": ".types", + "CreateTavusCredentialDto": ".types", + "CreateTelnyxPhoneNumberDto": ".types", + "CreateTelnyxPhoneNumberDtoFallbackDestination": ".types", + "CreateTelnyxPhoneNumberDtoFallbackDestination_Number": ".types", + "CreateTelnyxPhoneNumberDtoFallbackDestination_Sip": ".types", + "CreateTelnyxPhoneNumberDtoHooksItem": ".types", + "CreateTelnyxPhoneNumberDtoHooksItem_CallEnding": ".types", + "CreateTelnyxPhoneNumberDtoHooksItem_CallRinging": ".types", + "CreateTestSuiteDto": ".types", + "CreateTestSuiteRunDto": ".types", + "CreateTestSuiteTestChatDto": ".types", + "CreateTestSuiteTestChatDtoType": ".types", + "CreateTestSuiteTestVoiceDto": ".types", + "CreateTestSuiteTestVoiceDtoType": ".types", + "CreateTextEditorToolDto": ".types", + "CreateTextEditorToolDtoMessagesItem": ".types", + "CreateTextEditorToolDtoMessagesItem_RequestComplete": ".types", + "CreateTextEditorToolDtoMessagesItem_RequestFailed": ".types", + "CreateTextEditorToolDtoMessagesItem_RequestResponseDelayed": ".types", + "CreateTextEditorToolDtoMessagesItem_RequestStart": ".types", + "CreateTextEditorToolDtoName": ".types", + "CreateTextEditorToolDtoSubType": ".types", + "CreateTextInsightFromCallTableDto": ".types", + "CreateTextInsightFromCallTableDtoQueriesItem": ".types", + "CreateTogetherAiCredentialDto": ".types", + "CreateTokenDto": ".types", + "CreateTokenDtoTag": ".types", + "CreateToolTemplateDto": ".types", + "CreateToolTemplateDtoDetails": ".types", + "CreateToolTemplateDtoDetails_ApiRequest": ".types", + "CreateToolTemplateDtoDetails_Bash": ".types", + "CreateToolTemplateDtoDetails_Code": ".types", + "CreateToolTemplateDtoDetails_Computer": ".types", + "CreateToolTemplateDtoDetails_Dtmf": ".types", + "CreateToolTemplateDtoDetails_EndCall": ".types", + "CreateToolTemplateDtoDetails_Function": ".types", + "CreateToolTemplateDtoDetails_GohighlevelCalendarAvailabilityCheck": ".types", + "CreateToolTemplateDtoDetails_GohighlevelCalendarEventCreate": ".types", + "CreateToolTemplateDtoDetails_GohighlevelContactCreate": ".types", + "CreateToolTemplateDtoDetails_GohighlevelContactGet": ".types", + "CreateToolTemplateDtoDetails_GoogleCalendarAvailabilityCheck": ".types", + "CreateToolTemplateDtoDetails_GoogleCalendarEventCreate": ".types", + "CreateToolTemplateDtoDetails_GoogleSheetsRowAppend": ".types", + "CreateToolTemplateDtoDetails_Handoff": ".types", + "CreateToolTemplateDtoDetails_Mcp": ".types", + "CreateToolTemplateDtoDetails_Query": ".types", + "CreateToolTemplateDtoDetails_SipRequest": ".types", + "CreateToolTemplateDtoDetails_SlackMessageSend": ".types", + "CreateToolTemplateDtoDetails_Sms": ".types", + "CreateToolTemplateDtoDetails_TextEditor": ".types", + "CreateToolTemplateDtoDetails_TransferCall": ".types", + "CreateToolTemplateDtoDetails_Voicemail": ".types", + "CreateToolTemplateDtoProvider": ".types", + "CreateToolTemplateDtoProviderDetails": ".types", + "CreateToolTemplateDtoProviderDetails_Function": ".types", + "CreateToolTemplateDtoProviderDetails_Ghl": ".types", + "CreateToolTemplateDtoProviderDetails_GohighlevelCalendarAvailabilityCheck": ".types", + "CreateToolTemplateDtoProviderDetails_GohighlevelCalendarEventCreate": ".types", + "CreateToolTemplateDtoProviderDetails_GohighlevelContactCreate": ".types", + "CreateToolTemplateDtoProviderDetails_GohighlevelContactGet": ".types", + "CreateToolTemplateDtoProviderDetails_GoogleCalendarEventCreate": ".types", + "CreateToolTemplateDtoProviderDetails_GoogleSheetsRowAppend": ".types", + "CreateToolTemplateDtoProviderDetails_Make": ".types", + "CreateToolTemplateDtoType": ".types", + "CreateToolTemplateDtoVisibility": ".types", + "CreateToolsRequest": ".tools", + "CreateToolsRequest_ApiRequest": ".tools", + "CreateToolsRequest_Bash": ".tools", + "CreateToolsRequest_Computer": ".tools", + "CreateToolsRequest_Dtmf": ".tools", + "CreateToolsRequest_EndCall": ".tools", + "CreateToolsRequest_Function": ".tools", + "CreateToolsRequest_GohighlevelCalendarAvailabilityCheck": ".tools", + "CreateToolsRequest_GohighlevelCalendarEventCreate": ".tools", + "CreateToolsRequest_GohighlevelContactCreate": ".tools", + "CreateToolsRequest_GohighlevelContactGet": ".tools", + "CreateToolsRequest_GoogleCalendarAvailabilityCheck": ".tools", + "CreateToolsRequest_GoogleCalendarEventCreate": ".tools", + "CreateToolsRequest_GoogleSheetsRowAppend": ".tools", + "CreateToolsRequest_Handoff": ".tools", + "CreateToolsRequest_Mcp": ".tools", + "CreateToolsRequest_Query": ".tools", + "CreateToolsRequest_SipRequest": ".tools", + "CreateToolsRequest_SlackMessageSend": ".tools", + "CreateToolsRequest_Sms": ".tools", + "CreateToolsRequest_TextEditor": ".tools", + "CreateToolsRequest_TransferCall": ".tools", + "CreateToolsRequest_Voicemail": ".tools", + "CreateToolsResponse": ".tools", + "CreateToolsResponse_ApiRequest": ".tools", + "CreateToolsResponse_Bash": ".tools", + "CreateToolsResponse_Code": ".tools", + "CreateToolsResponse_Computer": ".tools", + "CreateToolsResponse_Dtmf": ".tools", + "CreateToolsResponse_EndCall": ".tools", + "CreateToolsResponse_Function": ".tools", + "CreateToolsResponse_GohighlevelCalendarAvailabilityCheck": ".tools", + "CreateToolsResponse_GohighlevelCalendarEventCreate": ".tools", + "CreateToolsResponse_GohighlevelContactCreate": ".tools", + "CreateToolsResponse_GohighlevelContactGet": ".tools", + "CreateToolsResponse_GoogleCalendarAvailabilityCheck": ".tools", + "CreateToolsResponse_GoogleCalendarEventCreate": ".tools", + "CreateToolsResponse_GoogleSheetsRowAppend": ".tools", + "CreateToolsResponse_Handoff": ".tools", + "CreateToolsResponse_Mcp": ".tools", + "CreateToolsResponse_Query": ".tools", + "CreateToolsResponse_SipRequest": ".tools", + "CreateToolsResponse_SlackMessageSend": ".tools", + "CreateToolsResponse_Sms": ".tools", + "CreateToolsResponse_TextEditor": ".tools", + "CreateToolsResponse_TransferCall": ".tools", + "CreateToolsResponse_Voicemail": ".tools", + "CreateTransferCallToolDto": ".types", + "CreateTransferCallToolDtoDestinationsItem": ".types", + "CreateTransferCallToolDtoDestinationsItem_Assistant": ".types", + "CreateTransferCallToolDtoDestinationsItem_Number": ".types", + "CreateTransferCallToolDtoDestinationsItem_Sip": ".types", + "CreateTransferCallToolDtoMessagesItem": ".types", + "CreateTransferCallToolDtoMessagesItem_RequestComplete": ".types", + "CreateTransferCallToolDtoMessagesItem_RequestFailed": ".types", + "CreateTransferCallToolDtoMessagesItem_RequestResponseDelayed": ".types", + "CreateTransferCallToolDtoMessagesItem_RequestStart": ".types", + "CreateTrieveCredentialDto": ".types", + "CreateTrieveKnowledgeBaseDto": ".types", + "CreateTrieveKnowledgeBaseDtoProvider": ".types", + "CreateTwilioCredentialDto": ".types", + "CreateTwilioPhoneNumberDto": ".types", + "CreateTwilioPhoneNumberDtoFallbackDestination": ".types", + "CreateTwilioPhoneNumberDtoFallbackDestination_Number": ".types", + "CreateTwilioPhoneNumberDtoFallbackDestination_Sip": ".types", + "CreateTwilioPhoneNumberDtoHooksItem": ".types", + "CreateTwilioPhoneNumberDtoHooksItem_CallEnding": ".types", + "CreateTwilioPhoneNumberDtoHooksItem_CallRinging": ".types", + "CreateVapiPhoneNumberDto": ".types", + "CreateVapiPhoneNumberDtoFallbackDestination": ".types", + "CreateVapiPhoneNumberDtoFallbackDestination_Number": ".types", + "CreateVapiPhoneNumberDtoFallbackDestination_Sip": ".types", + "CreateVapiPhoneNumberDtoHooksItem": ".types", + "CreateVapiPhoneNumberDtoHooksItem_CallEnding": ".types", + "CreateVapiPhoneNumberDtoHooksItem_CallRinging": ".types", + "CreateVoicemailToolDto": ".types", + "CreateVoicemailToolDtoMessagesItem": ".types", + "CreateVoicemailToolDtoMessagesItem_RequestComplete": ".types", + "CreateVoicemailToolDtoMessagesItem_RequestFailed": ".types", + "CreateVoicemailToolDtoMessagesItem_RequestResponseDelayed": ".types", + "CreateVoicemailToolDtoMessagesItem_RequestStart": ".types", + "CreateVonageCredentialDto": ".types", + "CreateVonagePhoneNumberDto": ".types", + "CreateVonagePhoneNumberDtoFallbackDestination": ".types", + "CreateVonagePhoneNumberDtoFallbackDestination_Number": ".types", + "CreateVonagePhoneNumberDtoFallbackDestination_Sip": ".types", + "CreateVonagePhoneNumberDtoHooksItem": ".types", + "CreateVonagePhoneNumberDtoHooksItem_CallEnding": ".types", + "CreateVonagePhoneNumberDtoHooksItem_CallRinging": ".types", + "CreateWebCallDto": ".types", + "CreateWebChatDto": ".types", + "CreateWebChatDtoInput": ".types", + "CreateWebChatDtoInputOneItem": ".types", + "CreateWebCustomerDto": ".types", + "CreateWebhookCredentialDto": ".types", + "CreateWebhookCredentialDtoAuthenticationPlan": ".types", + "CreateWebhookCredentialDtoAuthenticationPlan_Bearer": ".types", + "CreateWebhookCredentialDtoAuthenticationPlan_Hmac": ".types", + "CreateWebhookCredentialDtoAuthenticationPlan_Oauth2": ".types", + "CreateWellSaidCredentialDto": ".types", + "CreateWorkflowDto": ".types", + "CreateWorkflowDtoBackgroundSound": ".types", + "CreateWorkflowDtoBackgroundSoundZero": ".types", + "CreateWorkflowDtoCredentialsItem": ".types", + "CreateWorkflowDtoCredentialsItem_11Labs": ".types", + "CreateWorkflowDtoCredentialsItem_Anthropic": ".types", + "CreateWorkflowDtoCredentialsItem_AnthropicBedrock": ".types", + "CreateWorkflowDtoCredentialsItem_Anyscale": ".types", + "CreateWorkflowDtoCredentialsItem_AssemblyAi": ".types", + "CreateWorkflowDtoCredentialsItem_Azure": ".types", + "CreateWorkflowDtoCredentialsItem_AzureOpenai": ".types", + "CreateWorkflowDtoCredentialsItem_ByoSipTrunk": ".types", + "CreateWorkflowDtoCredentialsItem_Cartesia": ".types", + "CreateWorkflowDtoCredentialsItem_Cerebras": ".types", + "CreateWorkflowDtoCredentialsItem_Cloudflare": ".types", + "CreateWorkflowDtoCredentialsItem_CustomCredential": ".types", + "CreateWorkflowDtoCredentialsItem_CustomLlm": ".types", + "CreateWorkflowDtoCredentialsItem_DeepSeek": ".types", + "CreateWorkflowDtoCredentialsItem_Deepgram": ".types", + "CreateWorkflowDtoCredentialsItem_Deepinfra": ".types", + "CreateWorkflowDtoCredentialsItem_Email": ".types", + "CreateWorkflowDtoCredentialsItem_Gcp": ".types", + "CreateWorkflowDtoCredentialsItem_GhlOauth2Authorization": ".types", + "CreateWorkflowDtoCredentialsItem_Gladia": ".types", + "CreateWorkflowDtoCredentialsItem_Gohighlevel": ".types", + "CreateWorkflowDtoCredentialsItem_Google": ".types", + "CreateWorkflowDtoCredentialsItem_GoogleCalendarOauth2Authorization": ".types", + "CreateWorkflowDtoCredentialsItem_GoogleCalendarOauth2Client": ".types", + "CreateWorkflowDtoCredentialsItem_GoogleSheetsOauth2Authorization": ".types", + "CreateWorkflowDtoCredentialsItem_Groq": ".types", + "CreateWorkflowDtoCredentialsItem_Hume": ".types", + "CreateWorkflowDtoCredentialsItem_InflectionAi": ".types", + "CreateWorkflowDtoCredentialsItem_Inworld": ".types", + "CreateWorkflowDtoCredentialsItem_Langfuse": ".types", + "CreateWorkflowDtoCredentialsItem_Lmnt": ".types", + "CreateWorkflowDtoCredentialsItem_Make": ".types", + "CreateWorkflowDtoCredentialsItem_Minimax": ".types", + "CreateWorkflowDtoCredentialsItem_Mistral": ".types", + "CreateWorkflowDtoCredentialsItem_Neuphonic": ".types", + "CreateWorkflowDtoCredentialsItem_Openai": ".types", + "CreateWorkflowDtoCredentialsItem_Openrouter": ".types", + "CreateWorkflowDtoCredentialsItem_PerplexityAi": ".types", + "CreateWorkflowDtoCredentialsItem_Playht": ".types", + "CreateWorkflowDtoCredentialsItem_RimeAi": ".types", + "CreateWorkflowDtoCredentialsItem_Runpod": ".types", + "CreateWorkflowDtoCredentialsItem_S3": ".types", + "CreateWorkflowDtoCredentialsItem_SlackOauth2Authorization": ".types", + "CreateWorkflowDtoCredentialsItem_SlackWebhook": ".types", + "CreateWorkflowDtoCredentialsItem_SmallestAi": ".types", + "CreateWorkflowDtoCredentialsItem_Soniox": ".types", + "CreateWorkflowDtoCredentialsItem_Speechmatics": ".types", + "CreateWorkflowDtoCredentialsItem_Supabase": ".types", + "CreateWorkflowDtoCredentialsItem_Tavus": ".types", + "CreateWorkflowDtoCredentialsItem_TogetherAi": ".types", + "CreateWorkflowDtoCredentialsItem_Trieve": ".types", + "CreateWorkflowDtoCredentialsItem_Twilio": ".types", + "CreateWorkflowDtoCredentialsItem_Vonage": ".types", + "CreateWorkflowDtoCredentialsItem_Webhook": ".types", + "CreateWorkflowDtoCredentialsItem_Wellsaid": ".types", + "CreateWorkflowDtoCredentialsItem_Xai": ".types", + "CreateWorkflowDtoHooksItem": ".types", + "CreateWorkflowDtoModel": ".types", + "CreateWorkflowDtoModel_Anthropic": ".types", + "CreateWorkflowDtoModel_AnthropicBedrock": ".types", + "CreateWorkflowDtoModel_CustomLlm": ".types", + "CreateWorkflowDtoModel_Google": ".types", + "CreateWorkflowDtoModel_Openai": ".types", + "CreateWorkflowDtoNodesItem": ".types", + "CreateWorkflowDtoNodesItem_Conversation": ".types", + "CreateWorkflowDtoNodesItem_Tool": ".types", + "CreateWorkflowDtoTranscriber": ".types", + "CreateWorkflowDtoTranscriber_11Labs": ".types", + "CreateWorkflowDtoTranscriber_AssemblyAi": ".types", + "CreateWorkflowDtoTranscriber_Azure": ".types", + "CreateWorkflowDtoTranscriber_Cartesia": ".types", + "CreateWorkflowDtoTranscriber_CustomTranscriber": ".types", + "CreateWorkflowDtoTranscriber_Deepgram": ".types", + "CreateWorkflowDtoTranscriber_Gladia": ".types", + "CreateWorkflowDtoTranscriber_Google": ".types", + "CreateWorkflowDtoTranscriber_Openai": ".types", + "CreateWorkflowDtoTranscriber_Soniox": ".types", + "CreateWorkflowDtoTranscriber_Speechmatics": ".types", + "CreateWorkflowDtoTranscriber_Talkscriber": ".types", + "CreateWorkflowDtoVoice": ".types", + "CreateWorkflowDtoVoice_11Labs": ".types", + "CreateWorkflowDtoVoice_Azure": ".types", + "CreateWorkflowDtoVoice_Cartesia": ".types", + "CreateWorkflowDtoVoice_CustomVoice": ".types", + "CreateWorkflowDtoVoice_Deepgram": ".types", + "CreateWorkflowDtoVoice_Hume": ".types", + "CreateWorkflowDtoVoice_Inworld": ".types", + "CreateWorkflowDtoVoice_Lmnt": ".types", + "CreateWorkflowDtoVoice_Minimax": ".types", + "CreateWorkflowDtoVoice_Neuphonic": ".types", + "CreateWorkflowDtoVoice_Openai": ".types", + "CreateWorkflowDtoVoice_Playht": ".types", + "CreateWorkflowDtoVoice_RimeAi": ".types", + "CreateWorkflowDtoVoice_Sesame": ".types", + "CreateWorkflowDtoVoice_SmallestAi": ".types", + "CreateWorkflowDtoVoice_Tavus": ".types", + "CreateWorkflowDtoVoice_Vapi": ".types", + "CreateWorkflowDtoVoice_Wellsaid": ".types", + "CreateWorkflowDtoVoicemailDetection": ".types", + "CreateWorkflowDtoVoicemailDetectionZero": ".types", + "CreateXAiCredentialDto": ".types", + "CredentialActionRequest": ".types", + "CredentialEndUser": ".types", + "CredentialSessionError": ".types", + "CredentialSessionResponse": ".types", + "CredentialWebhookDto": ".types", + "CredentialWebhookDtoAuthMode": ".types", + "CredentialWebhookDtoOperation": ".types", + "CredentialWebhookDtoType": ".types", + "CustomCredential": ".types", + "CustomCredentialAuthenticationPlan": ".types", + "CustomCredentialAuthenticationPlan_Bearer": ".types", + "CustomCredentialAuthenticationPlan_Hmac": ".types", + "CustomCredentialAuthenticationPlan_Oauth2": ".types", + "CustomCredentialEncryptionPlan": ".types", + "CustomCredentialEncryptionPlan_PublicKey": ".types", + "CustomCredentialProvider": ".types", + "CustomEndpointingModelSmartEndpointingPlan": ".types", + "CustomEndpointingModelSmartEndpointingPlanProvider": ".types", + "CustomKnowledgeBase": ".types", + "CustomKnowledgeBaseProvider": ".types", + "CustomLlmCredential": ".types", + "CustomLlmCredentialProvider": ".types", + "CustomLlmModel": ".types", + "CustomLlmModelMetadataSendMode": ".types", + "CustomLlmModelToolsItem": ".types", + "CustomLlmModelToolsItem_ApiRequest": ".types", + "CustomLlmModelToolsItem_Bash": ".types", + "CustomLlmModelToolsItem_Code": ".types", + "CustomLlmModelToolsItem_Computer": ".types", + "CustomLlmModelToolsItem_Dtmf": ".types", + "CustomLlmModelToolsItem_EndCall": ".types", + "CustomLlmModelToolsItem_Function": ".types", + "CustomLlmModelToolsItem_GohighlevelCalendarAvailabilityCheck": ".types", + "CustomLlmModelToolsItem_GohighlevelCalendarEventCreate": ".types", + "CustomLlmModelToolsItem_GohighlevelContactCreate": ".types", + "CustomLlmModelToolsItem_GohighlevelContactGet": ".types", + "CustomLlmModelToolsItem_GoogleCalendarAvailabilityCheck": ".types", + "CustomLlmModelToolsItem_GoogleCalendarEventCreate": ".types", + "CustomLlmModelToolsItem_GoogleSheetsRowAppend": ".types", + "CustomLlmModelToolsItem_Handoff": ".types", + "CustomLlmModelToolsItem_Mcp": ".types", + "CustomLlmModelToolsItem_Query": ".types", + "CustomLlmModelToolsItem_SipRequest": ".types", + "CustomLlmModelToolsItem_SlackMessageSend": ".types", + "CustomLlmModelToolsItem_Sms": ".types", + "CustomLlmModelToolsItem_TextEditor": ".types", + "CustomLlmModelToolsItem_TransferCall": ".types", + "CustomLlmModelToolsItem_Voicemail": ".types", + "CustomMessage": ".types", + "CustomMessageType": ".types", + "CustomTranscriber": ".types", + "CustomVoice": ".types", + "CustomerCustomEndpointingRule": ".types", + "CustomerSpeechTimeoutOptions": ".types", + "DeepInfraCredential": ".types", + "DeepInfraCredentialProvider": ".types", + "DeepInfraModel": ".types", + "DeepInfraModelToolsItem": ".types", + "DeepInfraModelToolsItem_ApiRequest": ".types", + "DeepInfraModelToolsItem_Bash": ".types", + "DeepInfraModelToolsItem_Code": ".types", + "DeepInfraModelToolsItem_Computer": ".types", + "DeepInfraModelToolsItem_Dtmf": ".types", + "DeepInfraModelToolsItem_EndCall": ".types", + "DeepInfraModelToolsItem_Function": ".types", + "DeepInfraModelToolsItem_GohighlevelCalendarAvailabilityCheck": ".types", + "DeepInfraModelToolsItem_GohighlevelCalendarEventCreate": ".types", + "DeepInfraModelToolsItem_GohighlevelContactCreate": ".types", + "DeepInfraModelToolsItem_GohighlevelContactGet": ".types", + "DeepInfraModelToolsItem_GoogleCalendarAvailabilityCheck": ".types", + "DeepInfraModelToolsItem_GoogleCalendarEventCreate": ".types", + "DeepInfraModelToolsItem_GoogleSheetsRowAppend": ".types", + "DeepInfraModelToolsItem_Handoff": ".types", + "DeepInfraModelToolsItem_Mcp": ".types", + "DeepInfraModelToolsItem_Query": ".types", + "DeepInfraModelToolsItem_SipRequest": ".types", + "DeepInfraModelToolsItem_SlackMessageSend": ".types", + "DeepInfraModelToolsItem_Sms": ".types", + "DeepInfraModelToolsItem_TextEditor": ".types", + "DeepInfraModelToolsItem_TransferCall": ".types", + "DeepInfraModelToolsItem_Voicemail": ".types", + "DeepSeekCredential": ".types", + "DeepSeekCredentialProvider": ".types", + "DeepSeekModel": ".types", + "DeepSeekModelModel": ".types", + "DeepSeekModelToolsItem": ".types", + "DeepSeekModelToolsItem_ApiRequest": ".types", + "DeepSeekModelToolsItem_Bash": ".types", + "DeepSeekModelToolsItem_Code": ".types", + "DeepSeekModelToolsItem_Computer": ".types", + "DeepSeekModelToolsItem_Dtmf": ".types", + "DeepSeekModelToolsItem_EndCall": ".types", + "DeepSeekModelToolsItem_Function": ".types", + "DeepSeekModelToolsItem_GohighlevelCalendarAvailabilityCheck": ".types", + "DeepSeekModelToolsItem_GohighlevelCalendarEventCreate": ".types", + "DeepSeekModelToolsItem_GohighlevelContactCreate": ".types", + "DeepSeekModelToolsItem_GohighlevelContactGet": ".types", + "DeepSeekModelToolsItem_GoogleCalendarAvailabilityCheck": ".types", + "DeepSeekModelToolsItem_GoogleCalendarEventCreate": ".types", + "DeepSeekModelToolsItem_GoogleSheetsRowAppend": ".types", + "DeepSeekModelToolsItem_Handoff": ".types", + "DeepSeekModelToolsItem_Mcp": ".types", + "DeepSeekModelToolsItem_Query": ".types", + "DeepSeekModelToolsItem_SipRequest": ".types", + "DeepSeekModelToolsItem_SlackMessageSend": ".types", + "DeepSeekModelToolsItem_Sms": ".types", + "DeepSeekModelToolsItem_TextEditor": ".types", + "DeepSeekModelToolsItem_TransferCall": ".types", + "DeepSeekModelToolsItem_Voicemail": ".types", + "DeepgramCredential": ".types", + "DeepgramCredentialProvider": ".types", + "DeepgramTranscriber": ".types", + "DeepgramTranscriberLanguage": ".types", + "DeepgramTranscriberModel": ".types", + "DeepgramVoice": ".types", + "DeepgramVoiceId": ".types", + "DeepgramVoiceModel": ".types", + "DefaultAioHttpClient": "._default_clients", + "DefaultAsyncHttpxClient": "._default_clients", + "DeletePhoneNumbersResponse": ".phone_numbers", + "DeletePhoneNumbersResponse_ByoPhoneNumber": ".phone_numbers", + "DeletePhoneNumbersResponse_Telnyx": ".phone_numbers", + "DeletePhoneNumbersResponse_Twilio": ".phone_numbers", + "DeletePhoneNumbersResponse_Vapi": ".phone_numbers", + "DeletePhoneNumbersResponse_Vonage": ".phone_numbers", + "DeleteToolsResponse": ".tools", + "DeleteToolsResponse_ApiRequest": ".tools", + "DeleteToolsResponse_Bash": ".tools", + "DeleteToolsResponse_Code": ".tools", + "DeleteToolsResponse_Computer": ".tools", + "DeleteToolsResponse_Dtmf": ".tools", + "DeleteToolsResponse_EndCall": ".tools", + "DeleteToolsResponse_Function": ".tools", + "DeleteToolsResponse_GohighlevelCalendarAvailabilityCheck": ".tools", + "DeleteToolsResponse_GohighlevelCalendarEventCreate": ".tools", + "DeleteToolsResponse_GohighlevelContactCreate": ".tools", + "DeleteToolsResponse_GohighlevelContactGet": ".tools", + "DeleteToolsResponse_GoogleCalendarAvailabilityCheck": ".tools", + "DeleteToolsResponse_GoogleCalendarEventCreate": ".tools", + "DeleteToolsResponse_GoogleSheetsRowAppend": ".tools", + "DeleteToolsResponse_Handoff": ".tools", + "DeleteToolsResponse_Mcp": ".tools", + "DeleteToolsResponse_Query": ".tools", + "DeleteToolsResponse_SipRequest": ".tools", + "DeleteToolsResponse_SlackMessageSend": ".tools", + "DeleteToolsResponse_Sms": ".tools", + "DeleteToolsResponse_TextEditor": ".tools", + "DeleteToolsResponse_TransferCall": ".tools", + "DeleteToolsResponse_Voicemail": ".tools", + "DeveloperMessage": ".types", + "DeveloperMessageRole": ".types", + "DialPlanEntry": ".types", + "DtmfTool": ".types", + "DtmfToolMessagesItem": ".types", + "DtmfToolMessagesItem_RequestComplete": ".types", + "DtmfToolMessagesItem_RequestFailed": ".types", + "DtmfToolMessagesItem_RequestResponseDelayed": ".types", + "DtmfToolMessagesItem_RequestStart": ".types", + "Edge": ".types", + "ElevenLabsCredential": ".types", + "ElevenLabsPronunciationDictionary": ".types", + "ElevenLabsPronunciationDictionaryLocator": ".types", + "ElevenLabsPronunciationDictionaryPermissionOnResource": ".types", + "ElevenLabsTranscriber": ".types", + "ElevenLabsTranscriberLanguage": ".types", + "ElevenLabsTranscriberModel": ".types", + "ElevenLabsVoice": ".types", + "ElevenLabsVoiceId": ".types", + "ElevenLabsVoiceIdEnum": ".types", + "ElevenLabsVoiceModel": ".types", + "EmailCredential": ".types", + "EmailCredentialProvider": ".types", + "EndCallTool": ".types", + "EndCallToolMessagesItem": ".types", + "EndCallToolMessagesItem_RequestComplete": ".types", + "EndCallToolMessagesItem_RequestFailed": ".types", + "EndCallToolMessagesItem_RequestResponseDelayed": ".types", + "EndCallToolMessagesItem_RequestStart": ".types", + "EndpointedSpeechLowConfidenceOptions": ".types", + "Eval": ".types", + "EvalAnthropicModel": ".types", + "EvalAnthropicModelModel": ".types", + "EvalControllerGetPaginatedRequestSortOrder": ".eval", + "EvalControllerGetRunsPaginatedRequestSortOrder": ".eval", + "EvalCustomModel": ".types", + "EvalGoogleModel": ".types", + "EvalGoogleModelModel": ".types", + "EvalGroqModel": ".types", + "EvalGroqModelModel": ".types", + "EvalGroqModelProvider": ".types", + "EvalMessagesItem": ".types", + "EvalModelListOptions": ".types", + "EvalModelListOptionsProvider": ".types", + "EvalOpenAiModel": ".types", + "EvalOpenAiModelModel": ".types", + "EvalPaginatedResponse": ".types", + "EvalRun": ".types", + "EvalRunEndedReason": ".types", + "EvalRunPaginatedResponse": ".types", + "EvalRunResult": ".types", + "EvalRunResultMessagesItem": ".types", + "EvalRunResultMessagesItem_Assistant": ".types", + "EvalRunResultMessagesItem_System": ".types", + "EvalRunResultMessagesItem_Tool": ".types", + "EvalRunResultMessagesItem_User": ".types", + "EvalRunResultStatus": ".types", + "EvalRunStatus": ".types", + "EvalRunTarget": ".types", + "EvalRunTargetAssistant": ".types", + "EvalRunTargetSquad": ".types", + "EvalRunTarget_Assistant": ".types", + "EvalRunTarget_Squad": ".types", + "EvalRunType": ".types", + "EvalType": ".types", + "EvalUserEditable": ".types", + "EvalUserEditableMessagesItem": ".types", + "EvalUserEditableType": ".types", + "EvaluationPlanItem": ".types", + "EvaluationPlanItemComparator": ".types", + "EvaluationPlanItemValue": ".types", + "EventsTableBooleanCondition": ".types", + "EventsTableBooleanConditionOperator": ".types", + "EventsTableNumberCondition": ".types", + "EventsTableNumberConditionOperator": ".types", + "EventsTableStringCondition": ".types", + "EventsTableStringConditionOperator": ".types", + "ExactReplacement": ".types", + "ExportChatDto": ".types", + "ExportChatDtoColumns": ".types", + "ExportChatDtoFormat": ".types", + "ExportChatDtoSortOrder": ".types", + "ExportSessionDto": ".types", + "ExportSessionDtoColumns": ".types", + "ExportSessionDtoFormat": ".types", + "ExportSessionDtoSortOrder": ".types", + "FailedEdgeCondition": ".types", + "FallbackAssemblyAiTranscriber": ".types", + "FallbackAssemblyAiTranscriberLanguage": ".types", + "FallbackAssemblyAiTranscriberSpeechModel": ".types", + "FallbackAzureSpeechTranscriber": ".types", + "FallbackAzureSpeechTranscriberLanguage": ".types", + "FallbackAzureSpeechTranscriberSegmentationStrategy": ".types", + "FallbackAzureVoice": ".types", + "FallbackAzureVoiceId": ".types", + "FallbackAzureVoiceIdZero": ".types", + "FallbackCartesiaTranscriber": ".types", + "FallbackCartesiaTranscriberLanguage": ".types", + "FallbackCartesiaTranscriberModel": ".types", + "FallbackCartesiaVoice": ".types", + "FallbackCartesiaVoiceLanguage": ".types", + "FallbackCartesiaVoiceModel": ".types", + "FallbackCustomTranscriber": ".types", + "FallbackCustomVoice": ".types", + "FallbackDeepgramTranscriber": ".types", + "FallbackDeepgramTranscriberLanguage": ".types", + "FallbackDeepgramTranscriberModel": ".types", + "FallbackDeepgramVoice": ".types", + "FallbackDeepgramVoiceId": ".types", + "FallbackDeepgramVoiceModel": ".types", + "FallbackElevenLabsTranscriber": ".types", + "FallbackElevenLabsTranscriberLanguage": ".types", + "FallbackElevenLabsTranscriberModel": ".types", + "FallbackElevenLabsVoice": ".types", + "FallbackElevenLabsVoiceId": ".types", + "FallbackElevenLabsVoiceIdEnum": ".types", + "FallbackElevenLabsVoiceModel": ".types", + "FallbackGladiaTranscriber": ".types", + "FallbackGladiaTranscriberLanguage": ".types", + "FallbackGladiaTranscriberLanguageBehaviour": ".types", + "FallbackGladiaTranscriberLanguages": ".types", + "FallbackGladiaTranscriberModel": ".types", + "FallbackGladiaTranscriberRegion": ".types", + "FallbackGoogleTranscriber": ".types", + "FallbackGoogleTranscriberLanguage": ".types", + "FallbackGoogleTranscriberModel": ".types", + "FallbackHumeVoice": ".types", + "FallbackHumeVoiceModel": ".types", + "FallbackInworldVoice": ".types", + "FallbackInworldVoiceLanguageCode": ".types", + "FallbackInworldVoiceModel": ".types", + "FallbackInworldVoiceVoiceId": ".types", + "FallbackLmntVoice": ".types", + "FallbackLmntVoiceId": ".types", + "FallbackLmntVoiceIdEnum": ".types", + "FallbackLmntVoiceLanguage": ".types", + "FallbackMinimaxVoice": ".types", + "FallbackMinimaxVoiceLanguageBoost": ".types", + "FallbackMinimaxVoiceModel": ".types", + "FallbackMinimaxVoiceProvider": ".types", + "FallbackMinimaxVoiceRegion": ".types", + "FallbackMinimaxVoiceSubtitleType": ".types", + "FallbackNeetsVoice": ".types", + "FallbackNeuphonicVoice": ".types", + "FallbackNeuphonicVoiceModel": ".types", + "FallbackOpenAiTranscriber": ".types", + "FallbackOpenAiTranscriberLanguage": ".types", + "FallbackOpenAiTranscriberModel": ".types", + "FallbackOpenAiVoice": ".types", + "FallbackOpenAiVoiceId": ".types", + "FallbackOpenAiVoiceIdEnum": ".types", + "FallbackOpenAiVoiceModel": ".types", + "FallbackPlan": ".types", + "FallbackPlanVoicesItem": ".types", + "FallbackPlanVoicesItem_11Labs": ".types", + "FallbackPlanVoicesItem_Azure": ".types", + "FallbackPlanVoicesItem_Cartesia": ".types", + "FallbackPlanVoicesItem_CustomVoice": ".types", + "FallbackPlanVoicesItem_Deepgram": ".types", + "FallbackPlanVoicesItem_Hume": ".types", + "FallbackPlanVoicesItem_Inworld": ".types", + "FallbackPlanVoicesItem_Lmnt": ".types", + "FallbackPlanVoicesItem_Neuphonic": ".types", + "FallbackPlanVoicesItem_Openai": ".types", + "FallbackPlanVoicesItem_Playht": ".types", + "FallbackPlanVoicesItem_RimeAi": ".types", + "FallbackPlanVoicesItem_Sesame": ".types", + "FallbackPlanVoicesItem_SmallestAi": ".types", + "FallbackPlanVoicesItem_Tavus": ".types", + "FallbackPlanVoicesItem_Vapi": ".types", + "FallbackPlanVoicesItem_Wellsaid": ".types", + "FallbackPlayHtVoice": ".types", + "FallbackPlayHtVoiceEmotion": ".types", + "FallbackPlayHtVoiceId": ".types", + "FallbackPlayHtVoiceIdEnum": ".types", + "FallbackPlayHtVoiceLanguage": ".types", + "FallbackPlayHtVoiceModel": ".types", + "FallbackRimeAiVoice": ".types", + "FallbackRimeAiVoiceId": ".types", + "FallbackRimeAiVoiceIdEnum": ".types", + "FallbackRimeAiVoiceLanguage": ".types", + "FallbackRimeAiVoiceModel": ".types", + "FallbackSesameVoice": ".types", + "FallbackSesameVoiceModel": ".types", + "FallbackSmallestAiVoice": ".types", + "FallbackSmallestAiVoiceId": ".types", + "FallbackSmallestAiVoiceIdEnum": ".types", + "FallbackSmallestAiVoiceModel": ".types", + "FallbackSonioxTranscriber": ".types", + "FallbackSonioxTranscriberLanguage": ".types", + "FallbackSonioxTranscriberModel": ".types", + "FallbackSpeechmaticsTranscriber": ".types", + "FallbackSpeechmaticsTranscriberLanguage": ".types", + "FallbackSpeechmaticsTranscriberModel": ".types", + "FallbackSpeechmaticsTranscriberNumeralStyle": ".types", + "FallbackSpeechmaticsTranscriberOperatingPoint": ".types", + "FallbackSpeechmaticsTranscriberRegion": ".types", + "FallbackTalkscriberTranscriber": ".types", + "FallbackTalkscriberTranscriberLanguage": ".types", + "FallbackTalkscriberTranscriberModel": ".types", + "FallbackTavusVoice": ".types", + "FallbackTavusVoiceVoiceId": ".types", + "FallbackTavusVoiceVoiceIdZero": ".types", + "FallbackTranscriberPlan": ".types", + "FallbackTranscriberPlanTranscribersItem": ".types", + "FallbackTranscriberPlanTranscribersItem_11Labs": ".types", + "FallbackTranscriberPlanTranscribersItem_AssemblyAi": ".types", + "FallbackTranscriberPlanTranscribersItem_Azure": ".types", + "FallbackTranscriberPlanTranscribersItem_Cartesia": ".types", + "FallbackTranscriberPlanTranscribersItem_CustomTranscriber": ".types", + "FallbackTranscriberPlanTranscribersItem_Deepgram": ".types", + "FallbackTranscriberPlanTranscribersItem_Gladia": ".types", + "FallbackTranscriberPlanTranscribersItem_Google": ".types", + "FallbackTranscriberPlanTranscribersItem_Openai": ".types", + "FallbackTranscriberPlanTranscribersItem_Soniox": ".types", + "FallbackTranscriberPlanTranscribersItem_Speechmatics": ".types", + "FallbackTranscriberPlanTranscribersItem_Talkscriber": ".types", + "FallbackVapiVoice": ".types", + "FallbackVapiVoiceVoiceId": ".types", + "FallbackWellSaidVoice": ".types", + "FallbackWellSaidVoiceModel": ".types", + "File": ".types", + "FileObject": ".types", + "FileStatus": ".types", + "FilterDateTypeColumnOnCallTable": ".types", + "FilterDateTypeColumnOnCallTableColumn": ".types", + "FilterDateTypeColumnOnCallTableOperator": ".types", + "FilterNumberArrayTypeColumnOnCallTable": ".types", + "FilterNumberArrayTypeColumnOnCallTableColumn": ".types", + "FilterNumberArrayTypeColumnOnCallTableOperator": ".types", + "FilterNumberTypeColumnOnCallTable": ".types", + "FilterNumberTypeColumnOnCallTableColumn": ".types", + "FilterNumberTypeColumnOnCallTableOperator": ".types", + "FilterStringArrayTypeColumnOnCallTable": ".types", + "FilterStringArrayTypeColumnOnCallTableColumn": ".types", + "FilterStringArrayTypeColumnOnCallTableOperator": ".types", + "FilterStringTypeColumnOnCallTable": ".types", + "FilterStringTypeColumnOnCallTableColumn": ".types", + "FilterStringTypeColumnOnCallTableOperator": ".types", + "FilterStructuredOutputColumnOnCallTable": ".types", + "FilterStructuredOutputColumnOnCallTableColumn": ".types", + "FilterStructuredOutputColumnOnCallTableOperator": ".types", + "FormatPlan": ".types", + "FormatPlanFormattersEnabledItem": ".types", + "FormatPlanReplacementsItem": ".types", + "FormatPlanReplacementsItem_Exact": ".types", + "FormatPlanReplacementsItem_Regex": ".types", + "FourierDenoisingPlan": ".types", + "FunctionCall": ".types", + "FunctionCallAssistantHookAction": ".types", + "FunctionCallHookAction": ".types", + "FunctionCallHookActionMessagesItem": ".types", + "FunctionCallHookActionMessagesItem_RequestComplete": ".types", + "FunctionCallHookActionMessagesItem_RequestFailed": ".types", + "FunctionCallHookActionMessagesItem_RequestResponseDelayed": ".types", + "FunctionCallHookActionMessagesItem_RequestStart": ".types", + "FunctionCallHookActionType": ".types", + "FunctionTool": ".types", + "FunctionToolMessagesItem": ".types", + "FunctionToolMessagesItem_RequestComplete": ".types", + "FunctionToolMessagesItem_RequestFailed": ".types", + "FunctionToolMessagesItem_RequestResponseDelayed": ".types", + "FunctionToolMessagesItem_RequestStart": ".types", + "FunctionToolProviderDetails": ".types", + "FunctionToolWithToolCall": ".types", + "FunctionToolWithToolCallMessagesItem": ".types", + "FunctionToolWithToolCallMessagesItem_RequestComplete": ".types", + "FunctionToolWithToolCallMessagesItem_RequestFailed": ".types", + "FunctionToolWithToolCallMessagesItem_RequestResponseDelayed": ".types", + "FunctionToolWithToolCallMessagesItem_RequestStart": ".types", + "GcpCredential": ".types", + "GcpCredentialProvider": ".types", + "GcpKey": ".types", + "GeminiMultimodalLivePrebuiltVoiceConfig": ".types", + "GeminiMultimodalLivePrebuiltVoiceConfigVoiceName": ".types", + "GeminiMultimodalLiveSpeechConfig": ".types", + "GeminiMultimodalLiveVoiceConfig": ".types", + "GenerateScenariosDto": ".types", + "GenerateScenariosResponse": ".types", + "GeneratedScenario": ".types", + "GeneratedScenarioCategory": ".types", + "GetChatPaginatedDto": ".types", + "GetChatPaginatedDtoSortOrder": ".types", + "GetEvalPaginatedDto": ".types", + "GetEvalPaginatedDtoSortOrder": ".types", + "GetEvalRunPaginatedDto": ".types", + "GetEvalRunPaginatedDtoSortOrder": ".types", + "GetPhoneNumbersResponse": ".phone_numbers", + "GetPhoneNumbersResponse_ByoPhoneNumber": ".phone_numbers", + "GetPhoneNumbersResponse_Telnyx": ".phone_numbers", + "GetPhoneNumbersResponse_Twilio": ".phone_numbers", + "GetPhoneNumbersResponse_Vapi": ".phone_numbers", + "GetPhoneNumbersResponse_Vonage": ".phone_numbers", + "GetSessionPaginatedDto": ".types", + "GetSessionPaginatedDtoSortOrder": ".types", + "GetToolsResponse": ".tools", + "GetToolsResponse_ApiRequest": ".tools", + "GetToolsResponse_Bash": ".tools", + "GetToolsResponse_Code": ".tools", + "GetToolsResponse_Computer": ".tools", + "GetToolsResponse_Dtmf": ".tools", + "GetToolsResponse_EndCall": ".tools", + "GetToolsResponse_Function": ".tools", + "GetToolsResponse_GohighlevelCalendarAvailabilityCheck": ".tools", + "GetToolsResponse_GohighlevelCalendarEventCreate": ".tools", + "GetToolsResponse_GohighlevelContactCreate": ".tools", + "GetToolsResponse_GohighlevelContactGet": ".tools", + "GetToolsResponse_GoogleCalendarAvailabilityCheck": ".tools", + "GetToolsResponse_GoogleCalendarEventCreate": ".tools", + "GetToolsResponse_GoogleSheetsRowAppend": ".tools", + "GetToolsResponse_Handoff": ".tools", + "GetToolsResponse_Mcp": ".tools", + "GetToolsResponse_Query": ".tools", + "GetToolsResponse_SipRequest": ".tools", + "GetToolsResponse_SlackMessageSend": ".tools", + "GetToolsResponse_Sms": ".tools", + "GetToolsResponse_TextEditor": ".tools", + "GetToolsResponse_TransferCall": ".tools", + "GetToolsResponse_Voicemail": ".tools", + "GhlTool": ".types", + "GhlToolMessagesItem": ".types", + "GhlToolMessagesItem_RequestComplete": ".types", + "GhlToolMessagesItem_RequestFailed": ".types", + "GhlToolMessagesItem_RequestResponseDelayed": ".types", + "GhlToolMessagesItem_RequestStart": ".types", + "GhlToolMetadata": ".types", + "GhlToolProviderDetails": ".types", + "GhlToolType": ".types", + "GhlToolWithToolCall": ".types", + "GhlToolWithToolCallMessagesItem": ".types", + "GhlToolWithToolCallMessagesItem_RequestComplete": ".types", + "GhlToolWithToolCallMessagesItem_RequestFailed": ".types", + "GhlToolWithToolCallMessagesItem_RequestResponseDelayed": ".types", + "GhlToolWithToolCallMessagesItem_RequestStart": ".types", + "GladiaCredential": ".types", + "GladiaCredentialProvider": ".types", + "GladiaCustomVocabularyConfigDto": ".types", + "GladiaCustomVocabularyConfigDtoVocabularyItem": ".types", + "GladiaTranscriber": ".types", + "GladiaTranscriberLanguage": ".types", + "GladiaTranscriberLanguageBehaviour": ".types", + "GladiaTranscriberLanguages": ".types", + "GladiaTranscriberModel": ".types", + "GladiaTranscriberRegion": ".types", + "GladiaVocabularyItemDto": ".types", + "GlobalNodePlan": ".types", + "GoHighLevelCalendarAvailabilityTool": ".types", + "GoHighLevelCalendarAvailabilityToolMessagesItem": ".types", + "GoHighLevelCalendarAvailabilityToolMessagesItem_RequestComplete": ".types", + "GoHighLevelCalendarAvailabilityToolMessagesItem_RequestFailed": ".types", + "GoHighLevelCalendarAvailabilityToolMessagesItem_RequestResponseDelayed": ".types", + "GoHighLevelCalendarAvailabilityToolMessagesItem_RequestStart": ".types", + "GoHighLevelCalendarAvailabilityToolProviderDetails": ".types", + "GoHighLevelCalendarAvailabilityToolWithToolCall": ".types", + "GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem": ".types", + "GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem_RequestComplete": ".types", + "GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem_RequestFailed": ".types", + "GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem_RequestResponseDelayed": ".types", + "GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem_RequestStart": ".types", + "GoHighLevelCalendarAvailabilityToolWithToolCallType": ".types", + "GoHighLevelCalendarEventCreateTool": ".types", + "GoHighLevelCalendarEventCreateToolMessagesItem": ".types", + "GoHighLevelCalendarEventCreateToolMessagesItem_RequestComplete": ".types", + "GoHighLevelCalendarEventCreateToolMessagesItem_RequestFailed": ".types", + "GoHighLevelCalendarEventCreateToolMessagesItem_RequestResponseDelayed": ".types", + "GoHighLevelCalendarEventCreateToolMessagesItem_RequestStart": ".types", + "GoHighLevelCalendarEventCreateToolProviderDetails": ".types", + "GoHighLevelCalendarEventCreateToolWithToolCall": ".types", + "GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem": ".types", + "GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem_RequestComplete": ".types", + "GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem_RequestFailed": ".types", + "GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem_RequestResponseDelayed": ".types", + "GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem_RequestStart": ".types", + "GoHighLevelCalendarEventCreateToolWithToolCallType": ".types", + "GoHighLevelContactCreateTool": ".types", + "GoHighLevelContactCreateToolMessagesItem": ".types", + "GoHighLevelContactCreateToolMessagesItem_RequestComplete": ".types", + "GoHighLevelContactCreateToolMessagesItem_RequestFailed": ".types", + "GoHighLevelContactCreateToolMessagesItem_RequestResponseDelayed": ".types", + "GoHighLevelContactCreateToolMessagesItem_RequestStart": ".types", + "GoHighLevelContactCreateToolProviderDetails": ".types", + "GoHighLevelContactCreateToolWithToolCall": ".types", + "GoHighLevelContactCreateToolWithToolCallMessagesItem": ".types", + "GoHighLevelContactCreateToolWithToolCallMessagesItem_RequestComplete": ".types", + "GoHighLevelContactCreateToolWithToolCallMessagesItem_RequestFailed": ".types", + "GoHighLevelContactCreateToolWithToolCallMessagesItem_RequestResponseDelayed": ".types", + "GoHighLevelContactCreateToolWithToolCallMessagesItem_RequestStart": ".types", + "GoHighLevelContactCreateToolWithToolCallType": ".types", + "GoHighLevelContactGetTool": ".types", + "GoHighLevelContactGetToolMessagesItem": ".types", + "GoHighLevelContactGetToolMessagesItem_RequestComplete": ".types", + "GoHighLevelContactGetToolMessagesItem_RequestFailed": ".types", + "GoHighLevelContactGetToolMessagesItem_RequestResponseDelayed": ".types", + "GoHighLevelContactGetToolMessagesItem_RequestStart": ".types", + "GoHighLevelContactGetToolProviderDetails": ".types", + "GoHighLevelContactGetToolWithToolCall": ".types", + "GoHighLevelContactGetToolWithToolCallMessagesItem": ".types", + "GoHighLevelContactGetToolWithToolCallMessagesItem_RequestComplete": ".types", + "GoHighLevelContactGetToolWithToolCallMessagesItem_RequestFailed": ".types", + "GoHighLevelContactGetToolWithToolCallMessagesItem_RequestResponseDelayed": ".types", + "GoHighLevelContactGetToolWithToolCallMessagesItem_RequestStart": ".types", + "GoHighLevelContactGetToolWithToolCallType": ".types", + "GoHighLevelCredential": ".types", + "GoHighLevelCredentialProvider": ".types", + "GoHighLevelMcpCredential": ".types", + "GoHighLevelMcpCredentialProvider": ".types", + "GoogleCalendarCheckAvailabilityTool": ".types", + "GoogleCalendarCheckAvailabilityToolMessagesItem": ".types", + "GoogleCalendarCheckAvailabilityToolMessagesItem_RequestComplete": ".types", + "GoogleCalendarCheckAvailabilityToolMessagesItem_RequestFailed": ".types", + "GoogleCalendarCheckAvailabilityToolMessagesItem_RequestResponseDelayed": ".types", + "GoogleCalendarCheckAvailabilityToolMessagesItem_RequestStart": ".types", + "GoogleCalendarCreateEventTool": ".types", + "GoogleCalendarCreateEventToolMessagesItem": ".types", + "GoogleCalendarCreateEventToolMessagesItem_RequestComplete": ".types", + "GoogleCalendarCreateEventToolMessagesItem_RequestFailed": ".types", + "GoogleCalendarCreateEventToolMessagesItem_RequestResponseDelayed": ".types", + "GoogleCalendarCreateEventToolMessagesItem_RequestStart": ".types", + "GoogleCalendarCreateEventToolProviderDetails": ".types", + "GoogleCalendarCreateEventToolWithToolCall": ".types", + "GoogleCalendarCreateEventToolWithToolCallMessagesItem": ".types", + "GoogleCalendarCreateEventToolWithToolCallMessagesItem_RequestComplete": ".types", + "GoogleCalendarCreateEventToolWithToolCallMessagesItem_RequestFailed": ".types", + "GoogleCalendarCreateEventToolWithToolCallMessagesItem_RequestResponseDelayed": ".types", + "GoogleCalendarCreateEventToolWithToolCallMessagesItem_RequestStart": ".types", + "GoogleCalendarOAuth2AuthorizationCredential": ".types", + "GoogleCalendarOAuth2AuthorizationCredentialProvider": ".types", + "GoogleCalendarOAuth2ClientCredential": ".types", + "GoogleCalendarOAuth2ClientCredentialProvider": ".types", + "GoogleCredential": ".types", + "GoogleCredentialProvider": ".types", + "GoogleModel": ".types", + "GoogleModelModel": ".types", + "GoogleModelToolsItem": ".types", + "GoogleModelToolsItem_ApiRequest": ".types", + "GoogleModelToolsItem_Bash": ".types", + "GoogleModelToolsItem_Code": ".types", + "GoogleModelToolsItem_Computer": ".types", + "GoogleModelToolsItem_Dtmf": ".types", + "GoogleModelToolsItem_EndCall": ".types", + "GoogleModelToolsItem_Function": ".types", + "GoogleModelToolsItem_GohighlevelCalendarAvailabilityCheck": ".types", + "GoogleModelToolsItem_GohighlevelCalendarEventCreate": ".types", + "GoogleModelToolsItem_GohighlevelContactCreate": ".types", + "GoogleModelToolsItem_GohighlevelContactGet": ".types", + "GoogleModelToolsItem_GoogleCalendarAvailabilityCheck": ".types", + "GoogleModelToolsItem_GoogleCalendarEventCreate": ".types", + "GoogleModelToolsItem_GoogleSheetsRowAppend": ".types", + "GoogleModelToolsItem_Handoff": ".types", + "GoogleModelToolsItem_Mcp": ".types", + "GoogleModelToolsItem_Query": ".types", + "GoogleModelToolsItem_SipRequest": ".types", + "GoogleModelToolsItem_SlackMessageSend": ".types", + "GoogleModelToolsItem_Sms": ".types", + "GoogleModelToolsItem_TextEditor": ".types", + "GoogleModelToolsItem_TransferCall": ".types", + "GoogleModelToolsItem_Voicemail": ".types", + "GoogleRealtimeConfig": ".types", + "GoogleSheetsOAuth2AuthorizationCredential": ".types", + "GoogleSheetsOAuth2AuthorizationCredentialProvider": ".types", + "GoogleSheetsRowAppendTool": ".types", + "GoogleSheetsRowAppendToolMessagesItem": ".types", + "GoogleSheetsRowAppendToolMessagesItem_RequestComplete": ".types", + "GoogleSheetsRowAppendToolMessagesItem_RequestFailed": ".types", + "GoogleSheetsRowAppendToolMessagesItem_RequestResponseDelayed": ".types", + "GoogleSheetsRowAppendToolMessagesItem_RequestStart": ".types", + "GoogleSheetsRowAppendToolProviderDetails": ".types", + "GoogleSheetsRowAppendToolWithToolCall": ".types", + "GoogleSheetsRowAppendToolWithToolCallMessagesItem": ".types", + "GoogleSheetsRowAppendToolWithToolCallMessagesItem_RequestComplete": ".types", + "GoogleSheetsRowAppendToolWithToolCallMessagesItem_RequestFailed": ".types", + "GoogleSheetsRowAppendToolWithToolCallMessagesItem_RequestResponseDelayed": ".types", + "GoogleSheetsRowAppendToolWithToolCallMessagesItem_RequestStart": ".types", + "GoogleSheetsRowAppendToolWithToolCallType": ".types", + "GoogleTranscriber": ".types", + "GoogleTranscriberLanguage": ".types", + "GoogleTranscriberModel": ".types", + "GoogleVoicemailDetectionPlan": ".types", + "GoogleVoicemailDetectionPlanProvider": ".types", + "GoogleVoicemailDetectionPlanType": ".types", + "GroqCredential": ".types", + "GroqCredentialProvider": ".types", + "GroqModel": ".types", + "GroqModelModel": ".types", + "GroqModelToolsItem": ".types", + "GroqModelToolsItem_ApiRequest": ".types", + "GroqModelToolsItem_Bash": ".types", + "GroqModelToolsItem_Code": ".types", + "GroqModelToolsItem_Computer": ".types", + "GroqModelToolsItem_Dtmf": ".types", + "GroqModelToolsItem_EndCall": ".types", + "GroqModelToolsItem_Function": ".types", + "GroqModelToolsItem_GohighlevelCalendarAvailabilityCheck": ".types", + "GroqModelToolsItem_GohighlevelCalendarEventCreate": ".types", + "GroqModelToolsItem_GohighlevelContactCreate": ".types", + "GroqModelToolsItem_GohighlevelContactGet": ".types", + "GroqModelToolsItem_GoogleCalendarAvailabilityCheck": ".types", + "GroqModelToolsItem_GoogleCalendarEventCreate": ".types", + "GroqModelToolsItem_GoogleSheetsRowAppend": ".types", + "GroqModelToolsItem_Handoff": ".types", + "GroqModelToolsItem_Mcp": ".types", + "GroqModelToolsItem_Query": ".types", + "GroqModelToolsItem_SipRequest": ".types", + "GroqModelToolsItem_SlackMessageSend": ".types", + "GroqModelToolsItem_Sms": ".types", + "GroqModelToolsItem_TextEditor": ".types", + "GroqModelToolsItem_TransferCall": ".types", + "GroqModelToolsItem_Voicemail": ".types", + "GroupCondition": ".types", + "GroupConditionConditionsItem": ".types", + "GroupConditionConditionsItem_Group": ".types", + "GroupConditionConditionsItem_Liquid": ".types", + "GroupConditionConditionsItem_Regex": ".types", + "GroupConditionOperator": ".types", + "HandoffDestinationAssistant": ".types", + "HandoffDestinationAssistantContextEngineeringPlan": ".types", + "HandoffDestinationAssistantContextEngineeringPlan_All": ".types", + "HandoffDestinationAssistantContextEngineeringPlan_LastNMessages": ".types", + "HandoffDestinationAssistantContextEngineeringPlan_None": ".types", + "HandoffDestinationAssistantContextEngineeringPlan_UserAndAssistantMessages": ".types", + "HandoffDestinationAssistantType": ".types", + "HandoffDestinationDynamic": ".types", + "HandoffDestinationSquad": ".types", + "HandoffDestinationSquadContextEngineeringPlan": ".types", + "HandoffDestinationSquadContextEngineeringPlan_All": ".types", + "HandoffDestinationSquadContextEngineeringPlan_LastNMessages": ".types", + "HandoffDestinationSquadContextEngineeringPlan_None": ".types", + "HandoffDestinationSquadContextEngineeringPlan_UserAndAssistantMessages": ".types", + "HandoffTool": ".types", + "HandoffToolDestinationsItem": ".types", + "HandoffToolDestinationsItem_Assistant": ".types", + "HandoffToolDestinationsItem_Dynamic": ".types", + "HandoffToolDestinationsItem_Squad": ".types", + "HandoffToolMessagesItem": ".types", + "HandoffToolMessagesItem_RequestComplete": ".types", + "HandoffToolMessagesItem_RequestFailed": ".types", + "HandoffToolMessagesItem_RequestResponseDelayed": ".types", + "HandoffToolMessagesItem_RequestStart": ".types", + "HangupNode": ".types", + "HangupNodeType": ".types", + "HmacAuthenticationPlan": ".types", + "HmacAuthenticationPlanAlgorithm": ".types", + "HmacAuthenticationPlanSignatureEncoding": ".types", + "HumeCredential": ".types", + "HumeCredentialProvider": ".types", + "HumeVoice": ".types", + "HumeVoiceModel": ".types", + "ImportTwilioPhoneNumberDto": ".types", + "ImportTwilioPhoneNumberDtoFallbackDestination": ".types", + "ImportTwilioPhoneNumberDtoFallbackDestination_Number": ".types", + "ImportTwilioPhoneNumberDtoFallbackDestination_Sip": ".types", + "ImportTwilioPhoneNumberDtoHooksItem": ".types", + "ImportTwilioPhoneNumberDtoHooksItem_CallEnding": ".types", + "ImportTwilioPhoneNumberDtoHooksItem_CallRinging": ".types", + "ImportVonagePhoneNumberDto": ".types", + "ImportVonagePhoneNumberDtoFallbackDestination": ".types", + "ImportVonagePhoneNumberDtoFallbackDestination_Number": ".types", + "ImportVonagePhoneNumberDtoFallbackDestination_Sip": ".types", + "ImportVonagePhoneNumberDtoHooksItem": ".types", + "ImportVonagePhoneNumberDtoHooksItem_CallEnding": ".types", + "ImportVonagePhoneNumberDtoHooksItem_CallRinging": ".types", + "InflectionAiCredential": ".types", + "InflectionAiCredentialProvider": ".types", + "InflectionAiModel": ".types", + "InflectionAiModelModel": ".types", + "InflectionAiModelToolsItem": ".types", + "InflectionAiModelToolsItem_ApiRequest": ".types", + "InflectionAiModelToolsItem_Bash": ".types", + "InflectionAiModelToolsItem_Code": ".types", + "InflectionAiModelToolsItem_Computer": ".types", + "InflectionAiModelToolsItem_Dtmf": ".types", + "InflectionAiModelToolsItem_EndCall": ".types", + "InflectionAiModelToolsItem_Function": ".types", + "InflectionAiModelToolsItem_GohighlevelCalendarAvailabilityCheck": ".types", + "InflectionAiModelToolsItem_GohighlevelCalendarEventCreate": ".types", + "InflectionAiModelToolsItem_GohighlevelContactCreate": ".types", + "InflectionAiModelToolsItem_GohighlevelContactGet": ".types", + "InflectionAiModelToolsItem_GoogleCalendarAvailabilityCheck": ".types", + "InflectionAiModelToolsItem_GoogleCalendarEventCreate": ".types", + "InflectionAiModelToolsItem_GoogleSheetsRowAppend": ".types", + "InflectionAiModelToolsItem_Handoff": ".types", + "InflectionAiModelToolsItem_Mcp": ".types", + "InflectionAiModelToolsItem_Query": ".types", + "InflectionAiModelToolsItem_SipRequest": ".types", + "InflectionAiModelToolsItem_SlackMessageSend": ".types", + "InflectionAiModelToolsItem_Sms": ".types", + "InflectionAiModelToolsItem_TextEditor": ".types", + "InflectionAiModelToolsItem_TransferCall": ".types", + "InflectionAiModelToolsItem_Voicemail": ".types", + "Insight": ".types", + "InsightControllerCreateRequest": ".insight", + "InsightControllerCreateRequest_Bar": ".insight", + "InsightControllerCreateRequest_Line": ".insight", + "InsightControllerCreateRequest_Pie": ".insight", + "InsightControllerCreateRequest_Text": ".insight", + "InsightControllerCreateResponse": ".insight", + "InsightControllerCreateResponse_Bar": ".insight", + "InsightControllerCreateResponse_Line": ".insight", + "InsightControllerCreateResponse_Pie": ".insight", + "InsightControllerCreateResponse_Text": ".insight", + "InsightControllerFindAllRequestSortOrder": ".insight", + "InsightControllerFindOneResponse": ".insight", + "InsightControllerFindOneResponse_Bar": ".insight", + "InsightControllerFindOneResponse_Line": ".insight", + "InsightControllerFindOneResponse_Pie": ".insight", + "InsightControllerFindOneResponse_Text": ".insight", + "InsightControllerPreviewRequest": ".insight", + "InsightControllerPreviewRequest_Bar": ".insight", + "InsightControllerPreviewRequest_Line": ".insight", + "InsightControllerPreviewRequest_Pie": ".insight", + "InsightControllerPreviewRequest_Text": ".insight", + "InsightControllerRemoveResponse": ".insight", + "InsightControllerRemoveResponse_Bar": ".insight", + "InsightControllerRemoveResponse_Line": ".insight", + "InsightControllerRemoveResponse_Pie": ".insight", + "InsightControllerRemoveResponse_Text": ".insight", + "InsightControllerUpdateRequestBody": ".insight", + "InsightControllerUpdateRequestBody_Bar": ".insight", + "InsightControllerUpdateRequestBody_Line": ".insight", + "InsightControllerUpdateRequestBody_Pie": ".insight", + "InsightControllerUpdateRequestBody_Text": ".insight", + "InsightControllerUpdateResponse": ".insight", + "InsightControllerUpdateResponse_Bar": ".insight", + "InsightControllerUpdateResponse_Line": ".insight", + "InsightControllerUpdateResponse_Pie": ".insight", + "InsightControllerUpdateResponse_Text": ".insight", + "InsightFormula": ".types", + "InsightPaginatedResponse": ".types", + "InsightRunFormatPlan": ".types", + "InsightRunFormatPlanFormat": ".types", + "InsightRunResponse": ".types", + "InsightTimeRange": ".types", + "InsightTimeRangeWithStep": ".types", + "InsightTimeRangeWithStepStep": ".types", + "InsightType": ".types", + "InviteUserDto": ".types", + "InviteUserDtoRole": ".types", + "InvoicePlan": ".types", + "InworldCredential": ".types", + "InworldCredentialProvider": ".types", + "InworldVoice": ".types", + "InworldVoiceLanguageCode": ".types", + "InworldVoiceModel": ".types", + "InworldVoiceVoiceId": ".types", + "JsonQueryOnCallTableWithNumberTypeColumn": ".types", + "JsonQueryOnCallTableWithNumberTypeColumnColumn": ".types", + "JsonQueryOnCallTableWithNumberTypeColumnFiltersItem": ".types", + "JsonQueryOnCallTableWithNumberTypeColumnOperation": ".types", + "JsonQueryOnCallTableWithNumberTypeColumnTable": ".types", + "JsonQueryOnCallTableWithNumberTypeColumnType": ".types", + "JsonQueryOnCallTableWithStringTypeColumn": ".types", + "JsonQueryOnCallTableWithStringTypeColumnColumn": ".types", + "JsonQueryOnCallTableWithStringTypeColumnFiltersItem": ".types", + "JsonQueryOnCallTableWithStringTypeColumnOperation": ".types", + "JsonQueryOnCallTableWithStringTypeColumnTable": ".types", + "JsonQueryOnCallTableWithStringTypeColumnType": ".types", + "JsonQueryOnCallTableWithStructuredOutputColumn": ".types", + "JsonQueryOnCallTableWithStructuredOutputColumnColumn": ".types", + "JsonQueryOnCallTableWithStructuredOutputColumnFiltersItem": ".types", + "JsonQueryOnCallTableWithStructuredOutputColumnOperation": ".types", + "JsonQueryOnCallTableWithStructuredOutputColumnTable": ".types", + "JsonQueryOnCallTableWithStructuredOutputColumnType": ".types", + "JsonQueryOnEventsTable": ".types", + "JsonQueryOnEventsTableFiltersItem": ".types", + "JsonQueryOnEventsTableOn": ".types", + "JsonQueryOnEventsTableOperation": ".types", + "JsonQueryOnEventsTableTable": ".types", + "JsonQueryOnEventsTableType": ".types", + "JsonSchema": ".types", + "JsonSchemaFormat": ".types", + "JsonSchemaType": ".types", + "JwtResponse": ".types", + "KeypadInputPlan": ".types", + "KeypadInputPlanDelimiters": ".types", + "KnowledgeBase": ".types", + "KnowledgeBaseCost": ".types", + "KnowledgeBaseModel": ".types", + "KnowledgeBaseProvider": ".types", + "KnowledgeBaseResponseDocument": ".types", + "LangfuseCredential": ".types", + "LangfuseCredentialProvider": ".types", + "LangfuseObservabilityPlan": ".types", + "LangfuseObservabilityPlanProvider": ".types", + "LatencyMetrics": ".types", + "LineInsight": ".types", + "LineInsightFromCallTable": ".types", + "LineInsightFromCallTableGroupBy": ".types", + "LineInsightFromCallTableQueriesItem": ".types", + "LineInsightFromCallTableType": ".types", + "LineInsightGroupBy": ".types", + "LineInsightMetadata": ".types", + "LineInsightQueriesItem": ".types", + "LiquidCondition": ".types", + "ListChatsRequestSortOrder": ".chats", + "ListPhoneNumbersResponseItem": ".phone_numbers", + "ListPhoneNumbersResponseItem_ByoPhoneNumber": ".phone_numbers", + "ListPhoneNumbersResponseItem_Telnyx": ".phone_numbers", + "ListPhoneNumbersResponseItem_Twilio": ".phone_numbers", + "ListPhoneNumbersResponseItem_Vapi": ".phone_numbers", + "ListPhoneNumbersResponseItem_Vonage": ".phone_numbers", + "ListSessionsRequestSortOrder": ".sessions", + "ListToolsResponseItem": ".tools", + "ListToolsResponseItem_ApiRequest": ".tools", + "ListToolsResponseItem_Bash": ".tools", + "ListToolsResponseItem_Code": ".tools", + "ListToolsResponseItem_Computer": ".tools", + "ListToolsResponseItem_Dtmf": ".tools", + "ListToolsResponseItem_EndCall": ".tools", + "ListToolsResponseItem_Function": ".tools", + "ListToolsResponseItem_GohighlevelCalendarAvailabilityCheck": ".tools", + "ListToolsResponseItem_GohighlevelCalendarEventCreate": ".tools", + "ListToolsResponseItem_GohighlevelContactCreate": ".tools", + "ListToolsResponseItem_GohighlevelContactGet": ".tools", + "ListToolsResponseItem_GoogleCalendarAvailabilityCheck": ".tools", + "ListToolsResponseItem_GoogleCalendarEventCreate": ".tools", + "ListToolsResponseItem_GoogleSheetsRowAppend": ".tools", + "ListToolsResponseItem_Handoff": ".tools", + "ListToolsResponseItem_Mcp": ".tools", + "ListToolsResponseItem_Query": ".tools", + "ListToolsResponseItem_SipRequest": ".tools", + "ListToolsResponseItem_SlackMessageSend": ".tools", + "ListToolsResponseItem_Sms": ".tools", + "ListToolsResponseItem_TextEditor": ".tools", + "ListToolsResponseItem_TransferCall": ".tools", + "ListToolsResponseItem_Voicemail": ".tools", + "LivekitSmartEndpointingPlan": ".types", + "LivekitSmartEndpointingPlanProvider": ".types", + "LmntCredential": ".types", + "LmntCredentialProvider": ".types", + "LmntVoice": ".types", + "LmntVoiceId": ".types", + "LmntVoiceIdEnum": ".types", + "LmntVoiceLanguage": ".types", + "LogicEdgeCondition": ".types", + "MakeCredential": ".types", + "MakeCredentialProvider": ".types", + "MakeTool": ".types", + "MakeToolMessagesItem": ".types", + "MakeToolMessagesItem_RequestComplete": ".types", + "MakeToolMessagesItem_RequestFailed": ".types", + "MakeToolMessagesItem_RequestResponseDelayed": ".types", + "MakeToolMessagesItem_RequestStart": ".types", + "MakeToolMetadata": ".types", + "MakeToolProviderDetails": ".types", + "MakeToolType": ".types", + "MakeToolWithToolCall": ".types", + "MakeToolWithToolCallMessagesItem": ".types", + "MakeToolWithToolCallMessagesItem_RequestComplete": ".types", + "MakeToolWithToolCallMessagesItem_RequestFailed": ".types", + "MakeToolWithToolCallMessagesItem_RequestResponseDelayed": ".types", + "MakeToolWithToolCallMessagesItem_RequestStart": ".types", + "McpTool": ".types", + "McpToolMessages": ".types", + "McpToolMessagesItem": ".types", + "McpToolMessagesItem_RequestComplete": ".types", + "McpToolMessagesItem_RequestFailed": ".types", + "McpToolMessagesItem_RequestResponseDelayed": ".types", + "McpToolMessagesItem_RequestStart": ".types", + "McpToolMessagesMessagesItem": ".types", + "McpToolMessagesMessagesItem_RequestComplete": ".types", + "McpToolMessagesMessagesItem_RequestFailed": ".types", + "McpToolMessagesMessagesItem_RequestResponseDelayed": ".types", + "McpToolMessagesMessagesItem_RequestStart": ".types", + "McpToolMetadata": ".types", + "McpToolMetadataProtocol": ".types", + "MessageAddHookAction": ".types", + "MessageTarget": ".types", + "MessageTargetRole": ".types", + "MinimaxLlmModel": ".types", + "MinimaxLlmModelModel": ".types", + "MinimaxLlmModelToolsItem": ".types", + "MinimaxLlmModelToolsItem_ApiRequest": ".types", + "MinimaxLlmModelToolsItem_Bash": ".types", + "MinimaxLlmModelToolsItem_Code": ".types", + "MinimaxLlmModelToolsItem_Computer": ".types", + "MinimaxLlmModelToolsItem_Dtmf": ".types", + "MinimaxLlmModelToolsItem_EndCall": ".types", + "MinimaxLlmModelToolsItem_Function": ".types", + "MinimaxLlmModelToolsItem_GohighlevelCalendarAvailabilityCheck": ".types", + "MinimaxLlmModelToolsItem_GohighlevelCalendarEventCreate": ".types", + "MinimaxLlmModelToolsItem_GohighlevelContactCreate": ".types", + "MinimaxLlmModelToolsItem_GohighlevelContactGet": ".types", + "MinimaxLlmModelToolsItem_GoogleCalendarAvailabilityCheck": ".types", + "MinimaxLlmModelToolsItem_GoogleCalendarEventCreate": ".types", + "MinimaxLlmModelToolsItem_GoogleSheetsRowAppend": ".types", + "MinimaxLlmModelToolsItem_Handoff": ".types", + "MinimaxLlmModelToolsItem_Mcp": ".types", + "MinimaxLlmModelToolsItem_Query": ".types", + "MinimaxLlmModelToolsItem_SipRequest": ".types", + "MinimaxLlmModelToolsItem_SlackMessageSend": ".types", + "MinimaxLlmModelToolsItem_Sms": ".types", + "MinimaxLlmModelToolsItem_TextEditor": ".types", + "MinimaxLlmModelToolsItem_TransferCall": ".types", + "MinimaxLlmModelToolsItem_Voicemail": ".types", + "MinimaxVoice": ".types", + "MinimaxVoiceLanguageBoost": ".types", + "MinimaxVoiceModel": ".types", + "MinimaxVoiceRegion": ".types", + "MinimaxVoiceSubtitleType": ".types", + "MistralCredential": ".types", + "MistralCredentialProvider": ".types", + "ModelCost": ".types", + "Monitor": ".types", + "MonitorPlan": ".types", + "MonitorResult": ".types", + "Mono": ".types", + "NeetsVoice": ".types", + "NeuphonicCredential": ".types", + "NeuphonicCredentialProvider": ".types", + "NeuphonicVoice": ".types", + "NeuphonicVoiceModel": ".types", + "NodeArtifact": ".types", + "NodeArtifactMessagesItem": ".types", + "NotFoundError": ".errors", + "OAuth2AuthenticationPlan": ".types", + "OAuth2AuthenticationPlanType": ".types", + "Oauth2AuthenticationSession": ".types", + "OpenAiCredential": ".types", + "OpenAiCredentialProvider": ".types", + "OpenAiFunction": ".types", + "OpenAiFunctionParameters": ".types", + "OpenAiFunctionParametersType": ".types", + "OpenAiMessage": ".types", + "OpenAiMessageRole": ".types", + "OpenAiModel": ".types", + "OpenAiModelFallbackModelsItem": ".types", + "OpenAiModelModel": ".types", + "OpenAiModelPromptCacheRetention": ".types", + "OpenAiModelToolStrictCompatibilityMode": ".types", + "OpenAiModelToolsItem": ".types", + "OpenAiModelToolsItem_ApiRequest": ".types", + "OpenAiModelToolsItem_Bash": ".types", + "OpenAiModelToolsItem_Code": ".types", + "OpenAiModelToolsItem_Computer": ".types", + "OpenAiModelToolsItem_Dtmf": ".types", + "OpenAiModelToolsItem_EndCall": ".types", + "OpenAiModelToolsItem_Function": ".types", + "OpenAiModelToolsItem_GohighlevelCalendarAvailabilityCheck": ".types", + "OpenAiModelToolsItem_GohighlevelCalendarEventCreate": ".types", + "OpenAiModelToolsItem_GohighlevelContactCreate": ".types", + "OpenAiModelToolsItem_GohighlevelContactGet": ".types", + "OpenAiModelToolsItem_GoogleCalendarAvailabilityCheck": ".types", + "OpenAiModelToolsItem_GoogleCalendarEventCreate": ".types", + "OpenAiModelToolsItem_GoogleSheetsRowAppend": ".types", + "OpenAiModelToolsItem_Handoff": ".types", + "OpenAiModelToolsItem_Mcp": ".types", + "OpenAiModelToolsItem_Query": ".types", + "OpenAiModelToolsItem_SipRequest": ".types", + "OpenAiModelToolsItem_SlackMessageSend": ".types", + "OpenAiModelToolsItem_Sms": ".types", + "OpenAiModelToolsItem_TextEditor": ".types", + "OpenAiModelToolsItem_TransferCall": ".types", + "OpenAiModelToolsItem_Voicemail": ".types", + "OpenAiResponsesRequestInput": ".chats", + "OpenAiResponsesRequestInputOneItem": ".chats", + "OpenAiTranscriber": ".types", + "OpenAiTranscriberLanguage": ".types", + "OpenAiTranscriberModel": ".types", + "OpenAiVoice": ".types", + "OpenAiVoiceId": ".types", + "OpenAiVoiceIdEnum": ".types", + "OpenAiVoiceModel": ".types", + "OpenAiVoicemailDetectionPlan": ".types", + "OpenAiVoicemailDetectionPlanProvider": ".types", + "OpenAiVoicemailDetectionPlanType": ".types", + "OpenAiWebChatRequest": ".types", + "OpenAiWebChatRequestInput": ".types", + "OpenAiWebChatRequestInputOneItem": ".types", + "OpenRouterCredential": ".types", + "OpenRouterCredentialProvider": ".types", + "OpenRouterModel": ".types", + "OpenRouterModelToolsItem": ".types", + "OpenRouterModelToolsItem_ApiRequest": ".types", + "OpenRouterModelToolsItem_Bash": ".types", + "OpenRouterModelToolsItem_Code": ".types", + "OpenRouterModelToolsItem_Computer": ".types", + "OpenRouterModelToolsItem_Dtmf": ".types", + "OpenRouterModelToolsItem_EndCall": ".types", + "OpenRouterModelToolsItem_Function": ".types", + "OpenRouterModelToolsItem_GohighlevelCalendarAvailabilityCheck": ".types", + "OpenRouterModelToolsItem_GohighlevelCalendarEventCreate": ".types", + "OpenRouterModelToolsItem_GohighlevelContactCreate": ".types", + "OpenRouterModelToolsItem_GohighlevelContactGet": ".types", + "OpenRouterModelToolsItem_GoogleCalendarAvailabilityCheck": ".types", + "OpenRouterModelToolsItem_GoogleCalendarEventCreate": ".types", + "OpenRouterModelToolsItem_GoogleSheetsRowAppend": ".types", + "OpenRouterModelToolsItem_Handoff": ".types", + "OpenRouterModelToolsItem_Mcp": ".types", + "OpenRouterModelToolsItem_Query": ".types", + "OpenRouterModelToolsItem_SipRequest": ".types", + "OpenRouterModelToolsItem_SlackMessageSend": ".types", + "OpenRouterModelToolsItem_Sms": ".types", + "OpenRouterModelToolsItem_TextEditor": ".types", + "OpenRouterModelToolsItem_TransferCall": ".types", + "OpenRouterModelToolsItem_Voicemail": ".types", + "Org": ".types", + "OrgChannel": ".types", + "OutputTool": ".types", + "OutputToolMessagesItem": ".types", + "OutputToolMessagesItem_RequestComplete": ".types", + "OutputToolMessagesItem_RequestFailed": ".types", + "OutputToolMessagesItem_RequestResponseDelayed": ".types", + "OutputToolMessagesItem_RequestStart": ".types", + "OutputToolType": ".types", + "PaginationMeta": ".types", + "PerformanceMetrics": ".types", + "PerplexityAiCredential": ".types", + "PerplexityAiCredentialProvider": ".types", + "PerplexityAiModel": ".types", + "PerplexityAiModelToolsItem": ".types", + "PerplexityAiModelToolsItem_ApiRequest": ".types", + "PerplexityAiModelToolsItem_Bash": ".types", + "PerplexityAiModelToolsItem_Code": ".types", + "PerplexityAiModelToolsItem_Computer": ".types", + "PerplexityAiModelToolsItem_Dtmf": ".types", + "PerplexityAiModelToolsItem_EndCall": ".types", + "PerplexityAiModelToolsItem_Function": ".types", + "PerplexityAiModelToolsItem_GohighlevelCalendarAvailabilityCheck": ".types", + "PerplexityAiModelToolsItem_GohighlevelCalendarEventCreate": ".types", + "PerplexityAiModelToolsItem_GohighlevelContactCreate": ".types", + "PerplexityAiModelToolsItem_GohighlevelContactGet": ".types", + "PerplexityAiModelToolsItem_GoogleCalendarAvailabilityCheck": ".types", + "PerplexityAiModelToolsItem_GoogleCalendarEventCreate": ".types", + "PerplexityAiModelToolsItem_GoogleSheetsRowAppend": ".types", + "PerplexityAiModelToolsItem_Handoff": ".types", + "PerplexityAiModelToolsItem_Mcp": ".types", + "PerplexityAiModelToolsItem_Query": ".types", + "PerplexityAiModelToolsItem_SipRequest": ".types", + "PerplexityAiModelToolsItem_SlackMessageSend": ".types", + "PerplexityAiModelToolsItem_Sms": ".types", + "PerplexityAiModelToolsItem_TextEditor": ".types", + "PerplexityAiModelToolsItem_TransferCall": ".types", + "PerplexityAiModelToolsItem_Voicemail": ".types", + "Personality": ".types", + "PhoneNumberCallEndingHookFilter": ".types", + "PhoneNumberCallEndingHookFilterKey": ".types", + "PhoneNumberCallEndingHookFilterOneOfItem": ".types", + "PhoneNumberCallEndingHookFilterType": ".types", + "PhoneNumberCallRingingHookFilter": ".types", + "PhoneNumberCallRingingHookFilterKey": ".types", + "PhoneNumberCallRingingHookFilterType": ".types", + "PhoneNumberControllerFindAllPaginatedRequestSortOrder": ".phone_numbers", + "PhoneNumberHookCallEnding": ".types", + "PhoneNumberHookCallEndingDo": ".types", + "PhoneNumberHookCallEndingDo_Say": ".types", + "PhoneNumberHookCallEndingDo_Transfer": ".types", + "PhoneNumberHookCallRinging": ".types", + "PhoneNumberHookCallRingingDoItem": ".types", + "PhoneNumberHookCallRingingDoItem_Say": ".types", + "PhoneNumberHookCallRingingDoItem_Transfer": ".types", + "PhoneNumberPaginatedResponse": ".types", + "PhoneNumberPaginatedResponseResultsItem": ".types", + "PhoneNumberPaginatedResponseResultsItem_ByoPhoneNumber": ".types", + "PhoneNumberPaginatedResponseResultsItem_Telnyx": ".types", + "PhoneNumberPaginatedResponseResultsItem_Twilio": ".types", + "PhoneNumberPaginatedResponseResultsItem_Vapi": ".types", + "PhoneNumberPaginatedResponseResultsItem_Vonage": ".types", + "PieInsight": ".types", + "PieInsightFromCallTable": ".types", + "PieInsightFromCallTableGroupBy": ".types", + "PieInsightFromCallTableQueriesItem": ".types", + "PieInsightFromCallTableType": ".types", + "PieInsightGroupBy": ".types", + "PieInsightQueriesItem": ".types", + "PlayHtCredential": ".types", + "PlayHtCredentialProvider": ".types", + "PlayHtVoice": ".types", + "PlayHtVoiceEmotion": ".types", + "PlayHtVoiceId": ".types", + "PlayHtVoiceIdEnum": ".types", + "PlayHtVoiceLanguage": ".types", + "PlayHtVoiceModel": ".types", + "PromptInjectionSecurityFilter": ".types", + "PromptInjectionSecurityFilterType": ".types", + "ProviderResource": ".types", + "ProviderResourceControllerCreateProviderResourceRequestProvider": ".provider_resources", + "ProviderResourceControllerCreateProviderResourceRequestResourceName": ".provider_resources", + "ProviderResourceControllerDeleteProviderResourceRequestProvider": ".provider_resources", + "ProviderResourceControllerDeleteProviderResourceRequestResourceName": ".provider_resources", + "ProviderResourceControllerGetProviderResourceRequestProvider": ".provider_resources", + "ProviderResourceControllerGetProviderResourceRequestResourceName": ".provider_resources", + "ProviderResourceControllerGetProviderResourcesPaginatedRequestProvider": ".provider_resources", + "ProviderResourceControllerGetProviderResourcesPaginatedRequestResourceName": ".provider_resources", + "ProviderResourceControllerGetProviderResourcesPaginatedRequestSortOrder": ".provider_resources", + "ProviderResourceControllerUpdateProviderResourceRequestProvider": ".provider_resources", + "ProviderResourceControllerUpdateProviderResourceRequestResourceName": ".provider_resources", + "ProviderResourcePaginatedResponse": ".types", + "ProviderResourceProvider": ".types", + "ProviderResourceResourceName": ".types", + "PublicKeyEncryptionPlan": ".types", + "PublicKeyEncryptionPlanAlgorithm": ".types", + "PublicKeyEncryptionPlanPublicKey": ".types", + "PublicKeyEncryptionPlanPublicKey_SpkiPem": ".types", + "PunctuationBoundary": ".types", + "QueryTool": ".types", + "QueryToolMessagesItem": ".types", + "QueryToolMessagesItem_RequestComplete": ".types", + "QueryToolMessagesItem_RequestFailed": ".types", + "QueryToolMessagesItem_RequestResponseDelayed": ".types", + "QueryToolMessagesItem_RequestStart": ".types", + "RceSecurityFilter": ".types", + "RceSecurityFilterType": ".types", + "Recording": ".types", + "RecordingConsent": ".types", + "RecordingConsentPlanStayOnLine": ".types", + "RecordingConsentPlanStayOnLineVoice": ".types", + "RecordingConsentPlanStayOnLineVoice_11Labs": ".types", + "RecordingConsentPlanStayOnLineVoice_Azure": ".types", + "RecordingConsentPlanStayOnLineVoice_Cartesia": ".types", + "RecordingConsentPlanStayOnLineVoice_CustomVoice": ".types", + "RecordingConsentPlanStayOnLineVoice_Deepgram": ".types", + "RecordingConsentPlanStayOnLineVoice_Hume": ".types", + "RecordingConsentPlanStayOnLineVoice_Inworld": ".types", + "RecordingConsentPlanStayOnLineVoice_Lmnt": ".types", + "RecordingConsentPlanStayOnLineVoice_Minimax": ".types", + "RecordingConsentPlanStayOnLineVoice_Neuphonic": ".types", + "RecordingConsentPlanStayOnLineVoice_Openai": ".types", + "RecordingConsentPlanStayOnLineVoice_Playht": ".types", + "RecordingConsentPlanStayOnLineVoice_RimeAi": ".types", + "RecordingConsentPlanStayOnLineVoice_Sesame": ".types", + "RecordingConsentPlanStayOnLineVoice_SmallestAi": ".types", + "RecordingConsentPlanStayOnLineVoice_Tavus": ".types", + "RecordingConsentPlanStayOnLineVoice_Vapi": ".types", + "RecordingConsentPlanStayOnLineVoice_Wellsaid": ".types", + "RecordingConsentPlanVerbal": ".types", + "RecordingConsentPlanVerbalVoice": ".types", + "RecordingConsentPlanVerbalVoice_11Labs": ".types", + "RecordingConsentPlanVerbalVoice_Azure": ".types", + "RecordingConsentPlanVerbalVoice_Cartesia": ".types", + "RecordingConsentPlanVerbalVoice_CustomVoice": ".types", + "RecordingConsentPlanVerbalVoice_Deepgram": ".types", + "RecordingConsentPlanVerbalVoice_Hume": ".types", + "RecordingConsentPlanVerbalVoice_Inworld": ".types", + "RecordingConsentPlanVerbalVoice_Lmnt": ".types", + "RecordingConsentPlanVerbalVoice_Minimax": ".types", + "RecordingConsentPlanVerbalVoice_Neuphonic": ".types", + "RecordingConsentPlanVerbalVoice_Openai": ".types", + "RecordingConsentPlanVerbalVoice_Playht": ".types", + "RecordingConsentPlanVerbalVoice_RimeAi": ".types", + "RecordingConsentPlanVerbalVoice_Sesame": ".types", + "RecordingConsentPlanVerbalVoice_SmallestAi": ".types", + "RecordingConsentPlanVerbalVoice_Tavus": ".types", + "RecordingConsentPlanVerbalVoice_Vapi": ".types", + "RecordingConsentPlanVerbalVoice_Wellsaid": ".types", + "RegexCondition": ".types", + "RegexOption": ".types", + "RegexOptionType": ".types", + "RegexReplacement": ".types", + "RegexSecurityFilter": ".types", + "RegexSecurityFilterType": ".types", + "RelayCommandNote": ".types", + "RelayCommandOptions": ".types", + "RelayCommandOptionsType": ".types", + "RelayCommandSay": ".types", + "RelayRequest": ".types", + "RelayRequestCommandsItem": ".types", + "RelayRequestCommandsItem_MessageAdd": ".types", + "RelayRequestCommandsItem_Say": ".types", + "RelayRequestTarget": ".types", + "RelayRequestTarget_Assistant": ".types", + "RelayRequestTarget_Squad": ".types", + "RelayResponse": ".types", + "RelayResponseStatus": ".types", + "RelayTargetAssistant": ".types", + "RelayTargetOptions": ".types", + "RelayTargetOptionsType": ".types", + "RelayTargetSquad": ".types", + "ResponseCompletedEvent": ".types", + "ResponseCompletedEventType": ".types", + "ResponseErrorEvent": ".types", + "ResponseErrorEventType": ".types", + "ResponseObject": ".types", + "ResponseObjectObject": ".types", + "ResponseObjectStatus": ".types", + "ResponseOutputMessage": ".types", + "ResponseOutputMessageRole": ".types", + "ResponseOutputMessageStatus": ".types", + "ResponseOutputMessageType": ".types", + "ResponseOutputText": ".types", + "ResponseOutputTextType": ".types", + "ResponseTextDeltaEvent": ".types", + "ResponseTextDeltaEventType": ".types", + "ResponseTextDoneEvent": ".types", + "ResponseTextDoneEventType": ".types", + "RimeAiCredential": ".types", + "RimeAiCredentialProvider": ".types", + "RimeAiVoice": ".types", + "RimeAiVoiceId": ".types", + "RimeAiVoiceIdEnum": ".types", + "RimeAiVoiceLanguage": ".types", + "RimeAiVoiceModel": ".types", + "RunpodCredential": ".types", + "RunpodCredentialProvider": ".types", + "S3Credential": ".types", + "S3CredentialProvider": ".types", + "SayAssistantHookAction": ".types", + "SayHookAction": ".types", + "SayHookActionPrompt": ".types", + "SayHookActionPromptOneItem": ".types", + "SayPhoneNumberHookAction": ".types", + "SbcConfiguration": ".types", + "Scenario": ".types", + "ScenarioHooksItem": ".types", + "ScenarioHooksItem_SimulationRunEnded": ".types", + "ScenarioHooksItem_SimulationRunStarted": ".types", + "ScenarioToolMock": ".types", + "SchedulePlan": ".types", + "Scorecard": ".types", + "ScorecardControllerGetPaginatedRequestSortOrder": ".observability_scorecard", + "ScorecardMetric": ".types", + "ScorecardPaginatedResponse": ".types", + "SecurityFilterBase": ".types", + "SecurityFilterPlan": ".types", + "SecurityFilterPlanMode": ".types", + "Server": ".types", + "ServerMessage": ".types", + "ServerMessageAssistantRequest": ".types", + "ServerMessageAssistantRequestPhoneNumber": ".types", + "ServerMessageAssistantRequestPhoneNumber_ByoPhoneNumber": ".types", + "ServerMessageAssistantRequestPhoneNumber_Telnyx": ".types", + "ServerMessageAssistantRequestPhoneNumber_Twilio": ".types", + "ServerMessageAssistantRequestPhoneNumber_Vapi": ".types", + "ServerMessageAssistantRequestPhoneNumber_Vonage": ".types", + "ServerMessageAssistantRequestType": ".types", + "ServerMessageAssistantSpeech": ".types", + "ServerMessageAssistantSpeechPhoneNumber": ".types", + "ServerMessageAssistantSpeechPhoneNumber_ByoPhoneNumber": ".types", + "ServerMessageAssistantSpeechPhoneNumber_Telnyx": ".types", + "ServerMessageAssistantSpeechPhoneNumber_Twilio": ".types", + "ServerMessageAssistantSpeechPhoneNumber_Vapi": ".types", + "ServerMessageAssistantSpeechPhoneNumber_Vonage": ".types", + "ServerMessageAssistantSpeechSource": ".types", + "ServerMessageAssistantSpeechTiming": ".types", + "ServerMessageAssistantSpeechTiming_WordAlignment": ".types", + "ServerMessageAssistantSpeechTiming_WordProgress": ".types", + "ServerMessageAssistantSpeechType": ".types", + "ServerMessageCallDeleteFailed": ".types", + "ServerMessageCallDeleteFailedPhoneNumber": ".types", + "ServerMessageCallDeleteFailedPhoneNumber_ByoPhoneNumber": ".types", + "ServerMessageCallDeleteFailedPhoneNumber_Telnyx": ".types", + "ServerMessageCallDeleteFailedPhoneNumber_Twilio": ".types", + "ServerMessageCallDeleteFailedPhoneNumber_Vapi": ".types", + "ServerMessageCallDeleteFailedPhoneNumber_Vonage": ".types", + "ServerMessageCallDeleteFailedType": ".types", + "ServerMessageCallDeleted": ".types", + "ServerMessageCallDeletedPhoneNumber": ".types", + "ServerMessageCallDeletedPhoneNumber_ByoPhoneNumber": ".types", + "ServerMessageCallDeletedPhoneNumber_Telnyx": ".types", + "ServerMessageCallDeletedPhoneNumber_Twilio": ".types", + "ServerMessageCallDeletedPhoneNumber_Vapi": ".types", + "ServerMessageCallDeletedPhoneNumber_Vonage": ".types", + "ServerMessageCallDeletedType": ".types", + "ServerMessageCallEndpointingRequest": ".types", + "ServerMessageCallEndpointingRequestMessagesItem": ".types", + "ServerMessageCallEndpointingRequestPhoneNumber": ".types", + "ServerMessageCallEndpointingRequestPhoneNumber_ByoPhoneNumber": ".types", + "ServerMessageCallEndpointingRequestPhoneNumber_Telnyx": ".types", + "ServerMessageCallEndpointingRequestPhoneNumber_Twilio": ".types", + "ServerMessageCallEndpointingRequestPhoneNumber_Vapi": ".types", + "ServerMessageCallEndpointingRequestPhoneNumber_Vonage": ".types", + "ServerMessageCallEndpointingRequestType": ".types", + "ServerMessageChatCreated": ".types", + "ServerMessageChatCreatedPhoneNumber": ".types", + "ServerMessageChatCreatedPhoneNumber_ByoPhoneNumber": ".types", + "ServerMessageChatCreatedPhoneNumber_Telnyx": ".types", + "ServerMessageChatCreatedPhoneNumber_Twilio": ".types", + "ServerMessageChatCreatedPhoneNumber_Vapi": ".types", + "ServerMessageChatCreatedPhoneNumber_Vonage": ".types", + "ServerMessageChatCreatedType": ".types", + "ServerMessageChatDeleted": ".types", + "ServerMessageChatDeletedPhoneNumber": ".types", + "ServerMessageChatDeletedPhoneNumber_ByoPhoneNumber": ".types", + "ServerMessageChatDeletedPhoneNumber_Telnyx": ".types", + "ServerMessageChatDeletedPhoneNumber_Twilio": ".types", + "ServerMessageChatDeletedPhoneNumber_Vapi": ".types", + "ServerMessageChatDeletedPhoneNumber_Vonage": ".types", + "ServerMessageChatDeletedType": ".types", + "ServerMessageConversationUpdate": ".types", + "ServerMessageConversationUpdateMessagesItem": ".types", + "ServerMessageConversationUpdatePhoneNumber": ".types", + "ServerMessageConversationUpdatePhoneNumber_ByoPhoneNumber": ".types", + "ServerMessageConversationUpdatePhoneNumber_Telnyx": ".types", + "ServerMessageConversationUpdatePhoneNumber_Twilio": ".types", + "ServerMessageConversationUpdatePhoneNumber_Vapi": ".types", + "ServerMessageConversationUpdatePhoneNumber_Vonage": ".types", + "ServerMessageConversationUpdateType": ".types", + "ServerMessageEndOfCallReport": ".types", + "ServerMessageEndOfCallReportCostsItem": ".types", + "ServerMessageEndOfCallReportCostsItem_Analysis": ".types", + "ServerMessageEndOfCallReportCostsItem_KnowledgeBase": ".types", + "ServerMessageEndOfCallReportCostsItem_Model": ".types", + "ServerMessageEndOfCallReportCostsItem_Transcriber": ".types", + "ServerMessageEndOfCallReportCostsItem_Transport": ".types", + "ServerMessageEndOfCallReportCostsItem_Vapi": ".types", + "ServerMessageEndOfCallReportCostsItem_Voice": ".types", + "ServerMessageEndOfCallReportCostsItem_VoicemailDetection": ".types", + "ServerMessageEndOfCallReportDestination": ".types", + "ServerMessageEndOfCallReportDestination_Number": ".types", + "ServerMessageEndOfCallReportDestination_Sip": ".types", + "ServerMessageEndOfCallReportEndedReason": ".types", + "ServerMessageEndOfCallReportPhoneNumber": ".types", + "ServerMessageEndOfCallReportPhoneNumber_ByoPhoneNumber": ".types", + "ServerMessageEndOfCallReportPhoneNumber_Telnyx": ".types", + "ServerMessageEndOfCallReportPhoneNumber_Twilio": ".types", + "ServerMessageEndOfCallReportPhoneNumber_Vapi": ".types", + "ServerMessageEndOfCallReportPhoneNumber_Vonage": ".types", + "ServerMessageEndOfCallReportType": ".types", + "ServerMessageHandoffDestinationRequest": ".types", + "ServerMessageHandoffDestinationRequestPhoneNumber": ".types", + "ServerMessageHandoffDestinationRequestPhoneNumber_ByoPhoneNumber": ".types", + "ServerMessageHandoffDestinationRequestPhoneNumber_Telnyx": ".types", + "ServerMessageHandoffDestinationRequestPhoneNumber_Twilio": ".types", + "ServerMessageHandoffDestinationRequestPhoneNumber_Vapi": ".types", + "ServerMessageHandoffDestinationRequestPhoneNumber_Vonage": ".types", + "ServerMessageHandoffDestinationRequestType": ".types", + "ServerMessageHang": ".types", + "ServerMessageHangPhoneNumber": ".types", + "ServerMessageHangPhoneNumber_ByoPhoneNumber": ".types", + "ServerMessageHangPhoneNumber_Telnyx": ".types", + "ServerMessageHangPhoneNumber_Twilio": ".types", + "ServerMessageHangPhoneNumber_Vapi": ".types", + "ServerMessageHangPhoneNumber_Vonage": ".types", + "ServerMessageHangType": ".types", + "ServerMessageKnowledgeBaseRequest": ".types", + "ServerMessageKnowledgeBaseRequestMessagesItem": ".types", + "ServerMessageKnowledgeBaseRequestPhoneNumber": ".types", + "ServerMessageKnowledgeBaseRequestPhoneNumber_ByoPhoneNumber": ".types", + "ServerMessageKnowledgeBaseRequestPhoneNumber_Telnyx": ".types", + "ServerMessageKnowledgeBaseRequestPhoneNumber_Twilio": ".types", + "ServerMessageKnowledgeBaseRequestPhoneNumber_Vapi": ".types", + "ServerMessageKnowledgeBaseRequestPhoneNumber_Vonage": ".types", + "ServerMessageKnowledgeBaseRequestType": ".types", + "ServerMessageLanguageChangeDetected": ".types", + "ServerMessageLanguageChangeDetectedPhoneNumber": ".types", + "ServerMessageLanguageChangeDetectedPhoneNumber_ByoPhoneNumber": ".types", + "ServerMessageLanguageChangeDetectedPhoneNumber_Telnyx": ".types", + "ServerMessageLanguageChangeDetectedPhoneNumber_Twilio": ".types", + "ServerMessageLanguageChangeDetectedPhoneNumber_Vapi": ".types", + "ServerMessageLanguageChangeDetectedPhoneNumber_Vonage": ".types", + "ServerMessageLanguageChangeDetectedType": ".types", + "ServerMessageMessage": ".types", + "ServerMessageModelOutput": ".types", + "ServerMessageModelOutputPhoneNumber": ".types", + "ServerMessageModelOutputPhoneNumber_ByoPhoneNumber": ".types", + "ServerMessageModelOutputPhoneNumber_Telnyx": ".types", + "ServerMessageModelOutputPhoneNumber_Twilio": ".types", + "ServerMessageModelOutputPhoneNumber_Vapi": ".types", + "ServerMessageModelOutputPhoneNumber_Vonage": ".types", + "ServerMessageModelOutputType": ".types", + "ServerMessagePhoneCallControl": ".types", + "ServerMessagePhoneCallControlDestination": ".types", + "ServerMessagePhoneCallControlDestination_Number": ".types", + "ServerMessagePhoneCallControlDestination_Sip": ".types", + "ServerMessagePhoneCallControlPhoneNumber": ".types", + "ServerMessagePhoneCallControlPhoneNumber_ByoPhoneNumber": ".types", + "ServerMessagePhoneCallControlPhoneNumber_Telnyx": ".types", + "ServerMessagePhoneCallControlPhoneNumber_Twilio": ".types", + "ServerMessagePhoneCallControlPhoneNumber_Vapi": ".types", + "ServerMessagePhoneCallControlPhoneNumber_Vonage": ".types", + "ServerMessagePhoneCallControlRequest": ".types", + "ServerMessagePhoneCallControlType": ".types", + "ServerMessageResponse": ".types", + "ServerMessageResponseAssistantRequest": ".types", + "ServerMessageResponseAssistantRequestDestination": ".types", + "ServerMessageResponseAssistantRequestDestination_Number": ".types", + "ServerMessageResponseAssistantRequestDestination_Sip": ".types", + "ServerMessageResponseCallEndpointingRequest": ".types", + "ServerMessageResponseHandoffDestinationRequest": ".types", + "ServerMessageResponseKnowledgeBaseRequest": ".types", + "ServerMessageResponseMessageResponse": ".types", + "ServerMessageResponseToolCalls": ".types", + "ServerMessageResponseTransferDestinationRequest": ".types", + "ServerMessageResponseTransferDestinationRequestDestination": ".types", + "ServerMessageResponseTransferDestinationRequestDestination_Assistant": ".types", + "ServerMessageResponseTransferDestinationRequestDestination_Number": ".types", + "ServerMessageResponseTransferDestinationRequestDestination_Sip": ".types", + "ServerMessageResponseTransferDestinationRequestMessage": ".types", + "ServerMessageResponseTransferDestinationRequestMessage_RequestComplete": ".types", + "ServerMessageResponseTransferDestinationRequestMessage_RequestFailed": ".types", + "ServerMessageResponseTransferDestinationRequestMessage_RequestResponseDelayed": ".types", + "ServerMessageResponseTransferDestinationRequestMessage_RequestStart": ".types", + "ServerMessageResponseVoiceRequest": ".types", + "ServerMessageSessionCreated": ".types", + "ServerMessageSessionCreatedPhoneNumber": ".types", + "ServerMessageSessionCreatedPhoneNumber_ByoPhoneNumber": ".types", + "ServerMessageSessionCreatedPhoneNumber_Telnyx": ".types", + "ServerMessageSessionCreatedPhoneNumber_Twilio": ".types", + "ServerMessageSessionCreatedPhoneNumber_Vapi": ".types", + "ServerMessageSessionCreatedPhoneNumber_Vonage": ".types", + "ServerMessageSessionCreatedType": ".types", + "ServerMessageSessionDeleted": ".types", + "ServerMessageSessionDeletedPhoneNumber": ".types", + "ServerMessageSessionDeletedPhoneNumber_ByoPhoneNumber": ".types", + "ServerMessageSessionDeletedPhoneNumber_Telnyx": ".types", + "ServerMessageSessionDeletedPhoneNumber_Twilio": ".types", + "ServerMessageSessionDeletedPhoneNumber_Vapi": ".types", + "ServerMessageSessionDeletedPhoneNumber_Vonage": ".types", + "ServerMessageSessionDeletedType": ".types", + "ServerMessageSessionUpdated": ".types", + "ServerMessageSessionUpdatedPhoneNumber": ".types", + "ServerMessageSessionUpdatedPhoneNumber_ByoPhoneNumber": ".types", + "ServerMessageSessionUpdatedPhoneNumber_Telnyx": ".types", + "ServerMessageSessionUpdatedPhoneNumber_Twilio": ".types", + "ServerMessageSessionUpdatedPhoneNumber_Vapi": ".types", + "ServerMessageSessionUpdatedPhoneNumber_Vonage": ".types", + "ServerMessageSessionUpdatedType": ".types", + "ServerMessageSpeechUpdate": ".types", + "ServerMessageSpeechUpdatePhoneNumber": ".types", + "ServerMessageSpeechUpdatePhoneNumber_ByoPhoneNumber": ".types", + "ServerMessageSpeechUpdatePhoneNumber_Telnyx": ".types", + "ServerMessageSpeechUpdatePhoneNumber_Twilio": ".types", + "ServerMessageSpeechUpdatePhoneNumber_Vapi": ".types", + "ServerMessageSpeechUpdatePhoneNumber_Vonage": ".types", + "ServerMessageSpeechUpdateRole": ".types", + "ServerMessageSpeechUpdateStatus": ".types", + "ServerMessageSpeechUpdateType": ".types", + "ServerMessageStatusUpdate": ".types", + "ServerMessageStatusUpdateDestination": ".types", + "ServerMessageStatusUpdateDestination_Number": ".types", + "ServerMessageStatusUpdateDestination_Sip": ".types", + "ServerMessageStatusUpdateEndedReason": ".types", + "ServerMessageStatusUpdateMessagesItem": ".types", + "ServerMessageStatusUpdatePhoneNumber": ".types", + "ServerMessageStatusUpdatePhoneNumber_ByoPhoneNumber": ".types", + "ServerMessageStatusUpdatePhoneNumber_Telnyx": ".types", + "ServerMessageStatusUpdatePhoneNumber_Twilio": ".types", + "ServerMessageStatusUpdatePhoneNumber_Vapi": ".types", + "ServerMessageStatusUpdatePhoneNumber_Vonage": ".types", + "ServerMessageStatusUpdateStatus": ".types", + "ServerMessageStatusUpdateType": ".types", + "ServerMessageToolCalls": ".types", + "ServerMessageToolCallsPhoneNumber": ".types", + "ServerMessageToolCallsPhoneNumber_ByoPhoneNumber": ".types", + "ServerMessageToolCallsPhoneNumber_Telnyx": ".types", + "ServerMessageToolCallsPhoneNumber_Twilio": ".types", + "ServerMessageToolCallsPhoneNumber_Vapi": ".types", + "ServerMessageToolCallsPhoneNumber_Vonage": ".types", + "ServerMessageToolCallsToolWithToolCallListItem": ".types", + "ServerMessageToolCallsToolWithToolCallListItem_Bash": ".types", + "ServerMessageToolCallsToolWithToolCallListItem_Computer": ".types", + "ServerMessageToolCallsToolWithToolCallListItem_Function": ".types", + "ServerMessageToolCallsToolWithToolCallListItem_Ghl": ".types", + "ServerMessageToolCallsToolWithToolCallListItem_GoogleCalendarEventCreate": ".types", + "ServerMessageToolCallsToolWithToolCallListItem_Make": ".types", + "ServerMessageToolCallsToolWithToolCallListItem_TextEditor": ".types", + "ServerMessageToolCallsType": ".types", + "ServerMessageTranscript": ".types", + "ServerMessageTranscriptPhoneNumber": ".types", + "ServerMessageTranscriptPhoneNumber_ByoPhoneNumber": ".types", + "ServerMessageTranscriptPhoneNumber_Telnyx": ".types", + "ServerMessageTranscriptPhoneNumber_Twilio": ".types", + "ServerMessageTranscriptPhoneNumber_Vapi": ".types", + "ServerMessageTranscriptPhoneNumber_Vonage": ".types", + "ServerMessageTranscriptRole": ".types", + "ServerMessageTranscriptTranscriptType": ".types", + "ServerMessageTranscriptType": ".types", + "ServerMessageTransferDestinationRequest": ".types", + "ServerMessageTransferDestinationRequestPhoneNumber": ".types", + "ServerMessageTransferDestinationRequestPhoneNumber_ByoPhoneNumber": ".types", + "ServerMessageTransferDestinationRequestPhoneNumber_Telnyx": ".types", + "ServerMessageTransferDestinationRequestPhoneNumber_Twilio": ".types", + "ServerMessageTransferDestinationRequestPhoneNumber_Vapi": ".types", + "ServerMessageTransferDestinationRequestPhoneNumber_Vonage": ".types", + "ServerMessageTransferDestinationRequestType": ".types", + "ServerMessageTransferUpdate": ".types", + "ServerMessageTransferUpdateDestination": ".types", + "ServerMessageTransferUpdateDestination_Assistant": ".types", + "ServerMessageTransferUpdateDestination_Number": ".types", + "ServerMessageTransferUpdateDestination_Sip": ".types", + "ServerMessageTransferUpdatePhoneNumber": ".types", + "ServerMessageTransferUpdatePhoneNumber_ByoPhoneNumber": ".types", + "ServerMessageTransferUpdatePhoneNumber_Telnyx": ".types", + "ServerMessageTransferUpdatePhoneNumber_Twilio": ".types", + "ServerMessageTransferUpdatePhoneNumber_Vapi": ".types", + "ServerMessageTransferUpdatePhoneNumber_Vonage": ".types", + "ServerMessageTransferUpdateType": ".types", + "ServerMessageUserInterrupted": ".types", + "ServerMessageUserInterruptedPhoneNumber": ".types", + "ServerMessageUserInterruptedPhoneNumber_ByoPhoneNumber": ".types", + "ServerMessageUserInterruptedPhoneNumber_Telnyx": ".types", + "ServerMessageUserInterruptedPhoneNumber_Twilio": ".types", + "ServerMessageUserInterruptedPhoneNumber_Vapi": ".types", + "ServerMessageUserInterruptedPhoneNumber_Vonage": ".types", + "ServerMessageUserInterruptedType": ".types", + "ServerMessageVoiceInput": ".types", + "ServerMessageVoiceInputPhoneNumber": ".types", + "ServerMessageVoiceInputPhoneNumber_ByoPhoneNumber": ".types", + "ServerMessageVoiceInputPhoneNumber_Telnyx": ".types", + "ServerMessageVoiceInputPhoneNumber_Twilio": ".types", + "ServerMessageVoiceInputPhoneNumber_Vapi": ".types", + "ServerMessageVoiceInputPhoneNumber_Vonage": ".types", + "ServerMessageVoiceInputType": ".types", + "ServerMessageVoiceRequest": ".types", + "ServerMessageVoiceRequestPhoneNumber": ".types", + "ServerMessageVoiceRequestPhoneNumber_ByoPhoneNumber": ".types", + "ServerMessageVoiceRequestPhoneNumber_Telnyx": ".types", + "ServerMessageVoiceRequestPhoneNumber_Twilio": ".types", + "ServerMessageVoiceRequestPhoneNumber_Vapi": ".types", + "ServerMessageVoiceRequestPhoneNumber_Vonage": ".types", + "ServerMessageVoiceRequestType": ".types", + "SesameVoice": ".types", + "SesameVoiceModel": ".types", + "Session": ".types", + "SessionCost": ".types", + "SessionCostsItem": ".types", + "SessionCostsItem_Analysis": ".types", + "SessionCostsItem_Model": ".types", + "SessionCostsItem_Session": ".types", + "SessionCreatedHook": ".types", + "SessionCreatedHookOn": ".types", + "SessionMessagesItem": ".types", + "SessionPaginatedResponse": ".types", + "SessionStatus": ".types", + "Simulation": ".types", + "SimulationConcurrencyResponse": ".types", + "SimulationHookCallEnded": ".types", + "SimulationHookCallStarted": ".types", + "SimulationHookInclude": ".types", + "SimulationHookWebhookAction": ".types", + "SimulationHookWebhookActionType": ".types", + "SimulationRun": ".types", + "SimulationRunConfiguration": ".types", + "SimulationRunItem": ".types", + "SimulationRunItemCallMetadata": ".types", + "SimulationRunItemCallMonitor": ".types", + "SimulationRunItemCounts": ".types", + "SimulationRunItemHooksItem": ".types", + "SimulationRunItemHooksItem_SimulationRunEnded": ".types", + "SimulationRunItemHooksItem_SimulationRunStarted": ".types", + "SimulationRunItemImprovementSuggestion": ".types", + "SimulationRunItemImprovements": ".types", + "SimulationRunItemMetadata": ".types", + "SimulationRunItemResults": ".types", + "SimulationRunItemStatus": ".types", + "SimulationRunSimulationEntry": ".types", + "SimulationRunSimulationsItem": ".types", + "SimulationRunSimulationsItem_Simulation": ".types", + "SimulationRunSimulationsItem_SimulationSuite": ".types", + "SimulationRunStatus": ".types", + "SimulationRunSuiteEntry": ".types", + "SimulationRunTarget": ".types", + "SimulationRunTargetAssistant": ".types", + "SimulationRunTargetSquad": ".types", + "SimulationRunTarget_Assistant": ".types", + "SimulationRunTarget_Squad": ".types", + "SimulationRunTransportConfiguration": ".types", + "SimulationRunTransportConfigurationProvider": ".types", + "SimulationSuite": ".types", + "SipAuthentication": ".types", + "SipRequestTool": ".types", + "SipRequestToolBody": ".types", + "SipRequestToolMessagesItem": ".types", + "SipRequestToolMessagesItem_RequestComplete": ".types", + "SipRequestToolMessagesItem_RequestFailed": ".types", + "SipRequestToolMessagesItem_RequestResponseDelayed": ".types", + "SipRequestToolMessagesItem_RequestStart": ".types", + "SipRequestToolVerb": ".types", + "SipTrunkGateway": ".types", + "SipTrunkGatewayOutboundProtocol": ".types", + "SipTrunkOutboundAuthenticationPlan": ".types", + "SipTrunkOutboundSipRegisterPlan": ".types", + "SlackOAuth2AuthorizationCredential": ".types", + "SlackOAuth2AuthorizationCredentialProvider": ".types", + "SlackSendMessageTool": ".types", + "SlackSendMessageToolMessagesItem": ".types", + "SlackSendMessageToolMessagesItem_RequestComplete": ".types", + "SlackSendMessageToolMessagesItem_RequestFailed": ".types", + "SlackSendMessageToolMessagesItem_RequestResponseDelayed": ".types", + "SlackSendMessageToolMessagesItem_RequestStart": ".types", + "SlackWebhookCredential": ".types", + "SlackWebhookCredentialProvider": ".types", + "SmallestAiCredential": ".types", + "SmallestAiCredentialProvider": ".types", + "SmallestAiVoice": ".types", + "SmallestAiVoiceId": ".types", + "SmallestAiVoiceIdEnum": ".types", + "SmallestAiVoiceModel": ".types", + "SmartDenoisingPlan": ".types", + "SmsTool": ".types", + "SmsToolMessagesItem": ".types", + "SmsToolMessagesItem_RequestComplete": ".types", + "SmsToolMessagesItem_RequestFailed": ".types", + "SmsToolMessagesItem_RequestResponseDelayed": ".types", + "SmsToolMessagesItem_RequestStart": ".types", + "SonioxCredential": ".types", + "SonioxCredentialProvider": ".types", + "SonioxTranscriber": ".types", + "SonioxTranscriberLanguage": ".types", + "SonioxTranscriberModel": ".types", + "SpeechmaticsCredential": ".types", + "SpeechmaticsCredentialProvider": ".types", + "SpeechmaticsCustomVocabularyItem": ".types", + "SpeechmaticsTranscriber": ".types", + "SpeechmaticsTranscriberLanguage": ".types", + "SpeechmaticsTranscriberModel": ".types", + "SpeechmaticsTranscriberNumeralStyle": ".types", + "SpeechmaticsTranscriberOperatingPoint": ".types", + "SpeechmaticsTranscriberRegion": ".types", + "SpkiPemPublicKeyConfig": ".types", + "SqlInjectionSecurityFilter": ".types", + "SqlInjectionSecurityFilterType": ".types", + "Squad": ".types", + "SquadMemberDto": ".types", + "SquadMemberDtoAssistantDestinationsItem": ".types", + "SsrfSecurityFilter": ".types", + "SsrfSecurityFilterType": ".types", + "StartSpeakingPlan": ".types", + "StartSpeakingPlanCustomEndpointingRulesItem": ".types", + "StartSpeakingPlanCustomEndpointingRulesItem_Assistant": ".types", + "StartSpeakingPlanCustomEndpointingRulesItem_Both": ".types", + "StartSpeakingPlanCustomEndpointingRulesItem_Customer": ".types", + "StartSpeakingPlanSmartEndpointingEnabled": ".types", + "StartSpeakingPlanSmartEndpointingEnabledOne": ".types", + "StartSpeakingPlanSmartEndpointingPlan": ".types", + "StopSpeakingPlan": ".types", + "StructuredDataMultiPlan": ".types", + "StructuredDataPlan": ".types", + "StructuredOutput": ".types", + "StructuredOutputControllerFindAllRequestSortOrder": ".structured_outputs", + "StructuredOutputEvaluationResult": ".types", + "StructuredOutputEvaluationResultComparator": ".types", + "StructuredOutputEvaluationResultExpectedValue": ".types", + "StructuredOutputEvaluationResultExtractedValue": ".types", + "StructuredOutputFilterDto": ".types", + "StructuredOutputModel": ".types", + "StructuredOutputModel_Anthropic": ".types", + "StructuredOutputModel_AnthropicBedrock": ".types", + "StructuredOutputModel_CustomLlm": ".types", + "StructuredOutputModel_Google": ".types", + "StructuredOutputModel_Openai": ".types", + "StructuredOutputPaginatedResponse": ".types", + "StructuredOutputType": ".types", + "Subscription": ".types", + "SubscriptionLimits": ".types", + "SubscriptionMinutesIncludedResetFrequency": ".types", + "SubscriptionStatus": ".types", + "SubscriptionType": ".types", + "SuccessEvaluationPlan": ".types", + "SuccessEvaluationPlanRubric": ".types", + "SummaryPlan": ".types", + "SupabaseBucketPlan": ".types", + "SupabaseBucketPlanRegion": ".types", + "SupabaseCredential": ".types", + "SupabaseCredentialProvider": ".types", + "SyncVoiceLibraryDto": ".types", + "SyncVoiceLibraryDtoProvidersItem": ".types", + "SystemMessage": ".types", + "TalkscriberTranscriber": ".types", + "TalkscriberTranscriberLanguage": ".types", + "TalkscriberTranscriberModel": ".types", + "TargetPlan": ".types", + "TavusConversationProperties": ".types", + "TavusCredential": ".types", + "TavusCredentialProvider": ".types", + "TavusVoice": ".types", + "TavusVoiceVoiceId": ".types", + "TavusVoiceVoiceIdZero": ".types", + "TelnyxPhoneNumber": ".types", + "TelnyxPhoneNumberFallbackDestination": ".types", + "TelnyxPhoneNumberFallbackDestination_Number": ".types", + "TelnyxPhoneNumberFallbackDestination_Sip": ".types", + "TelnyxPhoneNumberHooksItem": ".types", + "TelnyxPhoneNumberHooksItem_CallEnding": ".types", + "TelnyxPhoneNumberHooksItem_CallRinging": ".types", + "TelnyxPhoneNumberStatus": ".types", + "Template": ".types", + "TemplateDetails": ".types", + "TemplateDetails_ApiRequest": ".types", + "TemplateDetails_Bash": ".types", + "TemplateDetails_Code": ".types", + "TemplateDetails_Computer": ".types", + "TemplateDetails_Dtmf": ".types", + "TemplateDetails_EndCall": ".types", + "TemplateDetails_Function": ".types", + "TemplateDetails_GohighlevelCalendarAvailabilityCheck": ".types", + "TemplateDetails_GohighlevelCalendarEventCreate": ".types", + "TemplateDetails_GohighlevelContactCreate": ".types", + "TemplateDetails_GohighlevelContactGet": ".types", + "TemplateDetails_GoogleCalendarAvailabilityCheck": ".types", + "TemplateDetails_GoogleCalendarEventCreate": ".types", + "TemplateDetails_GoogleSheetsRowAppend": ".types", + "TemplateDetails_Handoff": ".types", + "TemplateDetails_Mcp": ".types", + "TemplateDetails_Query": ".types", + "TemplateDetails_SipRequest": ".types", + "TemplateDetails_SlackMessageSend": ".types", + "TemplateDetails_Sms": ".types", + "TemplateDetails_TextEditor": ".types", + "TemplateDetails_TransferCall": ".types", + "TemplateDetails_Voicemail": ".types", + "TemplateProvider": ".types", + "TemplateProviderDetails": ".types", + "TemplateProviderDetails_Function": ".types", + "TemplateProviderDetails_Ghl": ".types", + "TemplateProviderDetails_GohighlevelCalendarAvailabilityCheck": ".types", + "TemplateProviderDetails_GohighlevelCalendarEventCreate": ".types", + "TemplateProviderDetails_GohighlevelContactCreate": ".types", + "TemplateProviderDetails_GohighlevelContactGet": ".types", + "TemplateProviderDetails_GoogleCalendarEventCreate": ".types", + "TemplateProviderDetails_GoogleSheetsRowAppend": ".types", + "TemplateProviderDetails_Make": ".types", + "TemplateType": ".types", + "TemplateVisibility": ".types", + "TestSuite": ".types", + "TestSuitePhoneNumber": ".types", + "TestSuitePhoneNumberProvider": ".types", + "TestSuiteRun": ".types", + "TestSuiteRunScorerAi": ".types", + "TestSuiteRunScorerAiResult": ".types", + "TestSuiteRunScorerAiType": ".types", + "TestSuiteRunStatus": ".types", + "TestSuiteRunTestAttempt": ".types", + "TestSuiteRunTestAttemptCall": ".types", + "TestSuiteRunTestAttemptMetadata": ".types", + "TestSuiteRunTestResult": ".types", + "TestSuiteRunsPaginatedResponse": ".types", + "TestSuiteTestChat": ".types", + "TestSuiteTestScorerAi": ".types", + "TestSuiteTestScorerAiType": ".types", + "TestSuiteTestVoice": ".types", + "TestSuiteTestVoiceType": ".types", + "TestSuiteTestsPaginatedResponse": ".types", + "TestSuiteTestsPaginatedResponseResultsItem": ".types", + "TestSuiteTestsPaginatedResponseResultsItem_Chat": ".types", + "TestSuiteTestsPaginatedResponseResultsItem_Voice": ".types", + "TestSuitesPaginatedResponse": ".types", + "TesterPlan": ".types", + "TextContent": ".types", + "TextContentLanguage": ".types", + "TextContentType": ".types", + "TextEditorTool": ".types", + "TextEditorToolMessagesItem": ".types", + "TextEditorToolMessagesItem_RequestComplete": ".types", + "TextEditorToolMessagesItem_RequestFailed": ".types", + "TextEditorToolMessagesItem_RequestResponseDelayed": ".types", + "TextEditorToolMessagesItem_RequestStart": ".types", + "TextEditorToolName": ".types", + "TextEditorToolSubType": ".types", + "TextEditorToolWithToolCall": ".types", + "TextEditorToolWithToolCallMessagesItem": ".types", + "TextEditorToolWithToolCallMessagesItem_RequestComplete": ".types", + "TextEditorToolWithToolCallMessagesItem_RequestFailed": ".types", + "TextEditorToolWithToolCallMessagesItem_RequestResponseDelayed": ".types", + "TextEditorToolWithToolCallMessagesItem_RequestStart": ".types", + "TextEditorToolWithToolCallName": ".types", + "TextEditorToolWithToolCallSubType": ".types", + "TextInsight": ".types", + "TextInsightFromCallTable": ".types", + "TextInsightFromCallTableQueriesItem": ".types", + "TextInsightFromCallTableType": ".types", + "TextInsightQueriesItem": ".types", + "TimeRange": ".types", + "TimeRangeStep": ".types", + "TogetherAiCredential": ".types", + "TogetherAiCredentialProvider": ".types", + "TogetherAiModel": ".types", + "TogetherAiModelToolsItem": ".types", + "TogetherAiModelToolsItem_ApiRequest": ".types", + "TogetherAiModelToolsItem_Bash": ".types", + "TogetherAiModelToolsItem_Code": ".types", + "TogetherAiModelToolsItem_Computer": ".types", + "TogetherAiModelToolsItem_Dtmf": ".types", + "TogetherAiModelToolsItem_EndCall": ".types", + "TogetherAiModelToolsItem_Function": ".types", + "TogetherAiModelToolsItem_GohighlevelCalendarAvailabilityCheck": ".types", + "TogetherAiModelToolsItem_GohighlevelCalendarEventCreate": ".types", + "TogetherAiModelToolsItem_GohighlevelContactCreate": ".types", + "TogetherAiModelToolsItem_GohighlevelContactGet": ".types", + "TogetherAiModelToolsItem_GoogleCalendarAvailabilityCheck": ".types", + "TogetherAiModelToolsItem_GoogleCalendarEventCreate": ".types", + "TogetherAiModelToolsItem_GoogleSheetsRowAppend": ".types", + "TogetherAiModelToolsItem_Handoff": ".types", + "TogetherAiModelToolsItem_Mcp": ".types", + "TogetherAiModelToolsItem_Query": ".types", + "TogetherAiModelToolsItem_SipRequest": ".types", + "TogetherAiModelToolsItem_SlackMessageSend": ".types", + "TogetherAiModelToolsItem_Sms": ".types", + "TogetherAiModelToolsItem_TextEditor": ".types", + "TogetherAiModelToolsItem_TransferCall": ".types", + "TogetherAiModelToolsItem_Voicemail": ".types", + "Token": ".types", + "TokenRestrictions": ".types", + "TokenTag": ".types", + "ToolCall": ".types", + "ToolCallFunction": ".types", + "ToolCallHookAction": ".types", + "ToolCallHookActionTool": ".types", + "ToolCallHookActionTool_ApiRequest": ".types", + "ToolCallHookActionTool_Bash": ".types", + "ToolCallHookActionTool_Code": ".types", + "ToolCallHookActionTool_Computer": ".types", + "ToolCallHookActionTool_Dtmf": ".types", + "ToolCallHookActionTool_EndCall": ".types", + "ToolCallHookActionTool_Function": ".types", + "ToolCallHookActionTool_GohighlevelCalendarAvailabilityCheck": ".types", + "ToolCallHookActionTool_GohighlevelCalendarEventCreate": ".types", + "ToolCallHookActionTool_GohighlevelContactCreate": ".types", + "ToolCallHookActionTool_GohighlevelContactGet": ".types", + "ToolCallHookActionTool_GoogleCalendarAvailabilityCheck": ".types", + "ToolCallHookActionTool_GoogleCalendarEventCreate": ".types", + "ToolCallHookActionTool_GoogleSheetsRowAppend": ".types", + "ToolCallHookActionTool_Handoff": ".types", + "ToolCallHookActionTool_Mcp": ".types", + "ToolCallHookActionTool_Query": ".types", + "ToolCallHookActionTool_SipRequest": ".types", + "ToolCallHookActionTool_SlackMessageSend": ".types", + "ToolCallHookActionTool_Sms": ".types", + "ToolCallHookActionTool_TextEditor": ".types", + "ToolCallHookActionTool_TransferCall": ".types", + "ToolCallHookActionTool_Voicemail": ".types", + "ToolCallHookActionType": ".types", + "ToolCallMessage": ".types", + "ToolCallResult": ".types", + "ToolCallResultMessage": ".types", + "ToolMessage": ".types", + "ToolMessageComplete": ".types", + "ToolMessageCompleteRole": ".types", + "ToolMessageDelayed": ".types", + "ToolMessageFailed": ".types", + "ToolMessageRole": ".types", + "ToolMessageStart": ".types", + "ToolNode": ".types", + "ToolNodeTool": ".types", + "ToolNodeTool_ApiRequest": ".types", + "ToolNodeTool_Bash": ".types", + "ToolNodeTool_Code": ".types", + "ToolNodeTool_Computer": ".types", + "ToolNodeTool_Dtmf": ".types", + "ToolNodeTool_EndCall": ".types", + "ToolNodeTool_Function": ".types", + "ToolNodeTool_GohighlevelCalendarAvailabilityCheck": ".types", + "ToolNodeTool_GohighlevelCalendarEventCreate": ".types", + "ToolNodeTool_GohighlevelContactCreate": ".types", + "ToolNodeTool_GohighlevelContactGet": ".types", + "ToolNodeTool_GoogleCalendarAvailabilityCheck": ".types", + "ToolNodeTool_GoogleCalendarEventCreate": ".types", + "ToolNodeTool_GoogleSheetsRowAppend": ".types", + "ToolNodeTool_Handoff": ".types", + "ToolNodeTool_Mcp": ".types", + "ToolNodeTool_Query": ".types", + "ToolNodeTool_SipRequest": ".types", + "ToolNodeTool_SlackMessageSend": ".types", + "ToolNodeTool_Sms": ".types", + "ToolNodeTool_TextEditor": ".types", + "ToolNodeTool_TransferCall": ".types", + "ToolNodeTool_Voicemail": ".types", + "ToolParameter": ".types", + "ToolParameterValue": ".types", + "ToolRejectionPlan": ".types", + "ToolRejectionPlanConditionsItem": ".types", + "ToolRejectionPlanConditionsItem_Group": ".types", + "ToolRejectionPlanConditionsItem_Liquid": ".types", + "ToolRejectionPlanConditionsItem_Regex": ".types", + "ToolTemplateMetadata": ".types", + "ToolTemplateSetup": ".types", + "TranscriberCost": ".types", + "TranscriptPlan": ".types", + "TranscriptionEndpointingPlan": ".types", + "TransferAssistant": ".types", + "TransferAssistantBackgroundSound": ".types", + "TransferAssistantBackgroundSoundZero": ".types", + "TransferAssistantFirstMessageMode": ".types", + "TransferAssistantHookAction": ".types", + "TransferAssistantModel": ".types", + "TransferAssistantModelProvider": ".types", + "TransferAssistantTranscriber": ".types", + "TransferAssistantTranscriber_11Labs": ".types", + "TransferAssistantTranscriber_AssemblyAi": ".types", + "TransferAssistantTranscriber_Azure": ".types", + "TransferAssistantTranscriber_Cartesia": ".types", + "TransferAssistantTranscriber_CustomTranscriber": ".types", + "TransferAssistantTranscriber_Deepgram": ".types", + "TransferAssistantTranscriber_Gladia": ".types", + "TransferAssistantTranscriber_Google": ".types", + "TransferAssistantTranscriber_Openai": ".types", + "TransferAssistantTranscriber_Soniox": ".types", + "TransferAssistantTranscriber_Speechmatics": ".types", + "TransferAssistantTranscriber_Talkscriber": ".types", + "TransferAssistantVoice": ".types", + "TransferAssistantVoice_11Labs": ".types", + "TransferAssistantVoice_Azure": ".types", + "TransferAssistantVoice_Cartesia": ".types", + "TransferAssistantVoice_CustomVoice": ".types", + "TransferAssistantVoice_Deepgram": ".types", + "TransferAssistantVoice_Hume": ".types", + "TransferAssistantVoice_Inworld": ".types", + "TransferAssistantVoice_Lmnt": ".types", + "TransferAssistantVoice_Minimax": ".types", + "TransferAssistantVoice_Neuphonic": ".types", + "TransferAssistantVoice_Openai": ".types", + "TransferAssistantVoice_Playht": ".types", + "TransferAssistantVoice_RimeAi": ".types", + "TransferAssistantVoice_Sesame": ".types", + "TransferAssistantVoice_SmallestAi": ".types", + "TransferAssistantVoice_Tavus": ".types", + "TransferAssistantVoice_Vapi": ".types", + "TransferAssistantVoice_Wellsaid": ".types", + "TransferCallTool": ".types", + "TransferCallToolDestinationsItem": ".types", + "TransferCallToolDestinationsItem_Assistant": ".types", + "TransferCallToolDestinationsItem_Number": ".types", + "TransferCallToolDestinationsItem_Sip": ".types", + "TransferCallToolMessagesItem": ".types", + "TransferCallToolMessagesItem_RequestComplete": ".types", + "TransferCallToolMessagesItem_RequestFailed": ".types", + "TransferCallToolMessagesItem_RequestResponseDelayed": ".types", + "TransferCallToolMessagesItem_RequestStart": ".types", + "TransferCancelToolUserEditable": ".types", + "TransferCancelToolUserEditableMessagesItem": ".types", + "TransferCancelToolUserEditableMessagesItem_RequestComplete": ".types", + "TransferCancelToolUserEditableMessagesItem_RequestFailed": ".types", + "TransferCancelToolUserEditableMessagesItem_RequestResponseDelayed": ".types", + "TransferCancelToolUserEditableMessagesItem_RequestStart": ".types", + "TransferCancelToolUserEditableType": ".types", + "TransferDestinationAssistant": ".types", + "TransferDestinationAssistantMessage": ".types", + "TransferDestinationAssistantType": ".types", + "TransferDestinationNumber": ".types", + "TransferDestinationNumberMessage": ".types", + "TransferDestinationSip": ".types", + "TransferDestinationSipMessage": ".types", + "TransferFallbackPlan": ".types", + "TransferFallbackPlanMessage": ".types", + "TransferHookAction": ".types", + "TransferHookActionDestination": ".types", + "TransferHookActionDestination_Number": ".types", + "TransferHookActionDestination_Sip": ".types", + "TransferHookActionType": ".types", + "TransferMode": ".types", + "TransferPhoneNumberHookAction": ".types", + "TransferPhoneNumberHookActionDestination": ".types", + "TransferPhoneNumberHookActionDestination_Number": ".types", + "TransferPhoneNumberHookActionDestination_Sip": ".types", + "TransferPlan": ".types", + "TransferPlanContextEngineeringPlan": ".types", + "TransferPlanContextEngineeringPlan_All": ".types", + "TransferPlanContextEngineeringPlan_LastNMessages": ".types", + "TransferPlanContextEngineeringPlan_None": ".types", + "TransferPlanMessage": ".types", + "TransferPlanMode": ".types", + "TransferSuccessfulToolUserEditable": ".types", + "TransferSuccessfulToolUserEditableMessagesItem": ".types", + "TransferSuccessfulToolUserEditableMessagesItem_RequestComplete": ".types", + "TransferSuccessfulToolUserEditableMessagesItem_RequestFailed": ".types", + "TransferSuccessfulToolUserEditableMessagesItem_RequestResponseDelayed": ".types", + "TransferSuccessfulToolUserEditableMessagesItem_RequestStart": ".types", + "TransferSuccessfulToolUserEditableType": ".types", + "TransportConfigurationTwilio": ".types", + "TransportConfigurationTwilioProvider": ".types", + "TransportConfigurationTwilioRecordingChannels": ".types", + "TransportCost": ".types", + "TransportCostProvider": ".types", + "TrieveCredential": ".types", + "TrieveCredentialProvider": ".types", + "TrieveKnowledgeBase": ".types", + "TrieveKnowledgeBaseChunkPlan": ".types", + "TrieveKnowledgeBaseCreate": ".types", + "TrieveKnowledgeBaseCreateType": ".types", + "TrieveKnowledgeBaseImport": ".types", + "TrieveKnowledgeBaseImportType": ".types", + "TrieveKnowledgeBaseProvider": ".types", + "TrieveKnowledgeBaseSearchPlan": ".types", + "TrieveKnowledgeBaseSearchPlanSearchType": ".types", + "TurnLatency": ".types", + "TwilioCredential": ".types", + "TwilioCredentialProvider": ".types", + "TwilioPhoneNumber": ".types", + "TwilioPhoneNumberFallbackDestination": ".types", + "TwilioPhoneNumberFallbackDestination_Number": ".types", + "TwilioPhoneNumberFallbackDestination_Sip": ".types", + "TwilioPhoneNumberHooksItem": ".types", + "TwilioPhoneNumberHooksItem_CallEnding": ".types", + "TwilioPhoneNumberHooksItem_CallRinging": ".types", + "TwilioPhoneNumberStatus": ".types", + "TwilioSmsChatTransport": ".types", + "TwilioSmsChatTransportConversationType": ".types", + "TwilioSmsChatTransportType": ".types", + "TwilioTransportMessage": ".types", + "TwilioVoicemailDetectionPlan": ".types", + "TwilioVoicemailDetectionPlanProvider": ".types", + "TwilioVoicemailDetectionPlanVoicemailDetectionTypesItem": ".types", + "UpdateAnthropicBedrockCredentialDto": ".types", + "UpdateAnthropicBedrockCredentialDtoAuthenticationPlan": ".types", + "UpdateAnthropicBedrockCredentialDtoAuthenticationPlan_AwsIam": ".types", + "UpdateAnthropicBedrockCredentialDtoAuthenticationPlan_AwsSts": ".types", + "UpdateAnthropicBedrockCredentialDtoRegion": ".types", + "UpdateAnthropicCredentialDto": ".types", + "UpdateAnyscaleCredentialDto": ".types", + "UpdateApiRequestToolDto": ".types", + "UpdateApiRequestToolDtoMessagesItem": ".types", + "UpdateApiRequestToolDtoMessagesItem_RequestComplete": ".types", + "UpdateApiRequestToolDtoMessagesItem_RequestFailed": ".types", + "UpdateApiRequestToolDtoMessagesItem_RequestResponseDelayed": ".types", + "UpdateApiRequestToolDtoMessagesItem_RequestStart": ".types", + "UpdateApiRequestToolDtoMethod": ".types", + "UpdateAssemblyAiCredentialDto": ".types", + "UpdateAssistantDtoBackgroundSound": ".assistants", + "UpdateAssistantDtoBackgroundSoundZero": ".assistants", + "UpdateAssistantDtoClientMessagesItem": ".assistants", + "UpdateAssistantDtoCredentialsItem": ".assistants", + "UpdateAssistantDtoCredentialsItem_11Labs": ".assistants", + "UpdateAssistantDtoCredentialsItem_Anthropic": ".assistants", + "UpdateAssistantDtoCredentialsItem_AnthropicBedrock": ".assistants", + "UpdateAssistantDtoCredentialsItem_Anyscale": ".assistants", + "UpdateAssistantDtoCredentialsItem_AssemblyAi": ".assistants", + "UpdateAssistantDtoCredentialsItem_Azure": ".assistants", + "UpdateAssistantDtoCredentialsItem_AzureOpenai": ".assistants", + "UpdateAssistantDtoCredentialsItem_ByoSipTrunk": ".assistants", + "UpdateAssistantDtoCredentialsItem_Cartesia": ".assistants", + "UpdateAssistantDtoCredentialsItem_Cerebras": ".assistants", + "UpdateAssistantDtoCredentialsItem_Cloudflare": ".assistants", + "UpdateAssistantDtoCredentialsItem_CustomCredential": ".assistants", + "UpdateAssistantDtoCredentialsItem_CustomLlm": ".assistants", + "UpdateAssistantDtoCredentialsItem_DeepSeek": ".assistants", + "UpdateAssistantDtoCredentialsItem_Deepgram": ".assistants", + "UpdateAssistantDtoCredentialsItem_Deepinfra": ".assistants", + "UpdateAssistantDtoCredentialsItem_Email": ".assistants", + "UpdateAssistantDtoCredentialsItem_Gcp": ".assistants", + "UpdateAssistantDtoCredentialsItem_GhlOauth2Authorization": ".assistants", + "UpdateAssistantDtoCredentialsItem_Gladia": ".assistants", + "UpdateAssistantDtoCredentialsItem_Gohighlevel": ".assistants", + "UpdateAssistantDtoCredentialsItem_Google": ".assistants", + "UpdateAssistantDtoCredentialsItem_GoogleCalendarOauth2Authorization": ".assistants", + "UpdateAssistantDtoCredentialsItem_GoogleCalendarOauth2Client": ".assistants", + "UpdateAssistantDtoCredentialsItem_GoogleSheetsOauth2Authorization": ".assistants", + "UpdateAssistantDtoCredentialsItem_Groq": ".assistants", + "UpdateAssistantDtoCredentialsItem_Hume": ".assistants", + "UpdateAssistantDtoCredentialsItem_InflectionAi": ".assistants", + "UpdateAssistantDtoCredentialsItem_Inworld": ".assistants", + "UpdateAssistantDtoCredentialsItem_Langfuse": ".assistants", + "UpdateAssistantDtoCredentialsItem_Lmnt": ".assistants", + "UpdateAssistantDtoCredentialsItem_Make": ".assistants", + "UpdateAssistantDtoCredentialsItem_Minimax": ".assistants", + "UpdateAssistantDtoCredentialsItem_Mistral": ".assistants", + "UpdateAssistantDtoCredentialsItem_Neuphonic": ".assistants", + "UpdateAssistantDtoCredentialsItem_Openai": ".assistants", + "UpdateAssistantDtoCredentialsItem_Openrouter": ".assistants", + "UpdateAssistantDtoCredentialsItem_PerplexityAi": ".assistants", + "UpdateAssistantDtoCredentialsItem_Playht": ".assistants", + "UpdateAssistantDtoCredentialsItem_RimeAi": ".assistants", + "UpdateAssistantDtoCredentialsItem_Runpod": ".assistants", + "UpdateAssistantDtoCredentialsItem_S3": ".assistants", + "UpdateAssistantDtoCredentialsItem_SlackOauth2Authorization": ".assistants", + "UpdateAssistantDtoCredentialsItem_SlackWebhook": ".assistants", + "UpdateAssistantDtoCredentialsItem_SmallestAi": ".assistants", + "UpdateAssistantDtoCredentialsItem_Soniox": ".assistants", + "UpdateAssistantDtoCredentialsItem_Speechmatics": ".assistants", + "UpdateAssistantDtoCredentialsItem_Supabase": ".assistants", + "UpdateAssistantDtoCredentialsItem_Tavus": ".assistants", + "UpdateAssistantDtoCredentialsItem_TogetherAi": ".assistants", + "UpdateAssistantDtoCredentialsItem_Trieve": ".assistants", + "UpdateAssistantDtoCredentialsItem_Twilio": ".assistants", + "UpdateAssistantDtoCredentialsItem_Vonage": ".assistants", + "UpdateAssistantDtoCredentialsItem_Webhook": ".assistants", + "UpdateAssistantDtoCredentialsItem_Wellsaid": ".assistants", + "UpdateAssistantDtoCredentialsItem_Xai": ".assistants", + "UpdateAssistantDtoFirstMessageMode": ".assistants", + "UpdateAssistantDtoHooksItem": ".assistants", + "UpdateAssistantDtoModel": ".assistants", + "UpdateAssistantDtoModel_Anthropic": ".assistants", + "UpdateAssistantDtoModel_AnthropicBedrock": ".assistants", + "UpdateAssistantDtoModel_Anyscale": ".assistants", + "UpdateAssistantDtoModel_Cerebras": ".assistants", + "UpdateAssistantDtoModel_CustomLlm": ".assistants", + "UpdateAssistantDtoModel_DeepSeek": ".assistants", + "UpdateAssistantDtoModel_Deepinfra": ".assistants", + "UpdateAssistantDtoModel_Google": ".assistants", + "UpdateAssistantDtoModel_Groq": ".assistants", + "UpdateAssistantDtoModel_InflectionAi": ".assistants", + "UpdateAssistantDtoModel_Minimax": ".assistants", + "UpdateAssistantDtoModel_Openai": ".assistants", + "UpdateAssistantDtoModel_Openrouter": ".assistants", + "UpdateAssistantDtoModel_PerplexityAi": ".assistants", + "UpdateAssistantDtoModel_TogetherAi": ".assistants", + "UpdateAssistantDtoModel_Xai": ".assistants", + "UpdateAssistantDtoServerMessagesItem": ".assistants", + "UpdateAssistantDtoTranscriber": ".assistants", + "UpdateAssistantDtoTranscriber_11Labs": ".assistants", + "UpdateAssistantDtoTranscriber_AssemblyAi": ".assistants", + "UpdateAssistantDtoTranscriber_Azure": ".assistants", + "UpdateAssistantDtoTranscriber_Cartesia": ".assistants", + "UpdateAssistantDtoTranscriber_CustomTranscriber": ".assistants", + "UpdateAssistantDtoTranscriber_Deepgram": ".assistants", + "UpdateAssistantDtoTranscriber_Gladia": ".assistants", + "UpdateAssistantDtoTranscriber_Google": ".assistants", + "UpdateAssistantDtoTranscriber_Openai": ".assistants", + "UpdateAssistantDtoTranscriber_Soniox": ".assistants", + "UpdateAssistantDtoTranscriber_Speechmatics": ".assistants", + "UpdateAssistantDtoTranscriber_Talkscriber": ".assistants", + "UpdateAssistantDtoVoice": ".assistants", + "UpdateAssistantDtoVoice_11Labs": ".assistants", + "UpdateAssistantDtoVoice_Azure": ".assistants", + "UpdateAssistantDtoVoice_Cartesia": ".assistants", + "UpdateAssistantDtoVoice_CustomVoice": ".assistants", + "UpdateAssistantDtoVoice_Deepgram": ".assistants", + "UpdateAssistantDtoVoice_Hume": ".assistants", + "UpdateAssistantDtoVoice_Inworld": ".assistants", + "UpdateAssistantDtoVoice_Lmnt": ".assistants", + "UpdateAssistantDtoVoice_Minimax": ".assistants", + "UpdateAssistantDtoVoice_Neuphonic": ".assistants", + "UpdateAssistantDtoVoice_Openai": ".assistants", + "UpdateAssistantDtoVoice_Playht": ".assistants", + "UpdateAssistantDtoVoice_RimeAi": ".assistants", + "UpdateAssistantDtoVoice_Sesame": ".assistants", + "UpdateAssistantDtoVoice_SmallestAi": ".assistants", + "UpdateAssistantDtoVoice_Tavus": ".assistants", + "UpdateAssistantDtoVoice_Vapi": ".assistants", + "UpdateAssistantDtoVoice_Wellsaid": ".assistants", + "UpdateAssistantDtoVoicemailDetection": ".assistants", + "UpdateAssistantDtoVoicemailDetectionZero": ".assistants", + "UpdateAzureCredentialDto": ".types", + "UpdateAzureCredentialDtoRegion": ".types", + "UpdateAzureCredentialDtoService": ".types", + "UpdateAzureOpenAiCredentialDto": ".types", + "UpdateAzureOpenAiCredentialDtoModelsItem": ".types", + "UpdateAzureOpenAiCredentialDtoRegion": ".types", + "UpdateBarInsightFromCallTableDto": ".types", + "UpdateBarInsightFromCallTableDtoGroupBy": ".types", + "UpdateBarInsightFromCallTableDtoQueriesItem": ".types", + "UpdateBashToolDto": ".types", + "UpdateBashToolDtoMessagesItem": ".types", + "UpdateBashToolDtoMessagesItem_RequestComplete": ".types", + "UpdateBashToolDtoMessagesItem_RequestFailed": ".types", + "UpdateBashToolDtoMessagesItem_RequestResponseDelayed": ".types", + "UpdateBashToolDtoMessagesItem_RequestStart": ".types", + "UpdateBashToolDtoName": ".types", + "UpdateBashToolDtoSubType": ".types", + "UpdateByoPhoneNumberDto": ".types", + "UpdateByoPhoneNumberDtoFallbackDestination": ".types", + "UpdateByoPhoneNumberDtoFallbackDestination_Number": ".types", + "UpdateByoPhoneNumberDtoFallbackDestination_Sip": ".types", + "UpdateByoPhoneNumberDtoHooksItem": ".types", + "UpdateByoPhoneNumberDtoHooksItem_CallEnding": ".types", + "UpdateByoPhoneNumberDtoHooksItem_CallRinging": ".types", + "UpdateByoSipTrunkCredentialDto": ".types", + "UpdateCampaignDtoStatus": ".campaigns", + "UpdateCartesiaCredentialDto": ".types", + "UpdateCerebrasCredentialDto": ".types", + "UpdateCloudflareCredentialDto": ".types", + "UpdateCodeToolDto": ".types", + "UpdateCodeToolDtoMessagesItem": ".types", + "UpdateCodeToolDtoMessagesItem_RequestComplete": ".types", + "UpdateCodeToolDtoMessagesItem_RequestFailed": ".types", + "UpdateCodeToolDtoMessagesItem_RequestResponseDelayed": ".types", + "UpdateCodeToolDtoMessagesItem_RequestStart": ".types", + "UpdateComputerToolDto": ".types", + "UpdateComputerToolDtoMessagesItem": ".types", + "UpdateComputerToolDtoMessagesItem_RequestComplete": ".types", + "UpdateComputerToolDtoMessagesItem_RequestFailed": ".types", + "UpdateComputerToolDtoMessagesItem_RequestResponseDelayed": ".types", + "UpdateComputerToolDtoMessagesItem_RequestStart": ".types", + "UpdateComputerToolDtoName": ".types", + "UpdateComputerToolDtoSubType": ".types", + "UpdateCustomCredentialDto": ".types", + "UpdateCustomCredentialDtoAuthenticationPlan": ".types", + "UpdateCustomCredentialDtoAuthenticationPlan_Bearer": ".types", + "UpdateCustomCredentialDtoAuthenticationPlan_Hmac": ".types", + "UpdateCustomCredentialDtoAuthenticationPlan_Oauth2": ".types", + "UpdateCustomCredentialDtoEncryptionPlan": ".types", + "UpdateCustomCredentialDtoEncryptionPlan_PublicKey": ".types", + "UpdateCustomKnowledgeBaseDto": ".types", + "UpdateCustomLlmCredentialDto": ".types", + "UpdateDeepInfraCredentialDto": ".types", + "UpdateDeepSeekCredentialDto": ".types", + "UpdateDeepgramCredentialDto": ".types", + "UpdateDtmfToolDto": ".types", + "UpdateDtmfToolDtoMessagesItem": ".types", + "UpdateDtmfToolDtoMessagesItem_RequestComplete": ".types", + "UpdateDtmfToolDtoMessagesItem_RequestFailed": ".types", + "UpdateDtmfToolDtoMessagesItem_RequestResponseDelayed": ".types", + "UpdateDtmfToolDtoMessagesItem_RequestStart": ".types", + "UpdateElevenLabsCredentialDto": ".types", + "UpdateEmailCredentialDto": ".types", + "UpdateEndCallToolDto": ".types", + "UpdateEndCallToolDtoMessagesItem": ".types", + "UpdateEndCallToolDtoMessagesItem_RequestComplete": ".types", + "UpdateEndCallToolDtoMessagesItem_RequestFailed": ".types", + "UpdateEndCallToolDtoMessagesItem_RequestResponseDelayed": ".types", + "UpdateEndCallToolDtoMessagesItem_RequestStart": ".types", + "UpdateEvalDtoMessagesItem": ".eval", + "UpdateEvalDtoType": ".eval", + "UpdateFunctionToolDto": ".types", + "UpdateFunctionToolDtoMessagesItem": ".types", + "UpdateFunctionToolDtoMessagesItem_RequestComplete": ".types", + "UpdateFunctionToolDtoMessagesItem_RequestFailed": ".types", + "UpdateFunctionToolDtoMessagesItem_RequestResponseDelayed": ".types", + "UpdateFunctionToolDtoMessagesItem_RequestStart": ".types", + "UpdateGcpCredentialDto": ".types", + "UpdateGhlToolDto": ".types", + "UpdateGhlToolDtoMessagesItem": ".types", + "UpdateGhlToolDtoMessagesItem_RequestComplete": ".types", + "UpdateGhlToolDtoMessagesItem_RequestFailed": ".types", + "UpdateGhlToolDtoMessagesItem_RequestResponseDelayed": ".types", + "UpdateGhlToolDtoMessagesItem_RequestStart": ".types", + "UpdateGladiaCredentialDto": ".types", + "UpdateGoHighLevelCalendarAvailabilityToolDto": ".types", + "UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem": ".types", + "UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestComplete": ".types", + "UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestFailed": ".types", + "UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestResponseDelayed": ".types", + "UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestStart": ".types", + "UpdateGoHighLevelCalendarEventCreateToolDto": ".types", + "UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem": ".types", + "UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestComplete": ".types", + "UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestFailed": ".types", + "UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestResponseDelayed": ".types", + "UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestStart": ".types", + "UpdateGoHighLevelContactCreateToolDto": ".types", + "UpdateGoHighLevelContactCreateToolDtoMessagesItem": ".types", + "UpdateGoHighLevelContactCreateToolDtoMessagesItem_RequestComplete": ".types", + "UpdateGoHighLevelContactCreateToolDtoMessagesItem_RequestFailed": ".types", + "UpdateGoHighLevelContactCreateToolDtoMessagesItem_RequestResponseDelayed": ".types", + "UpdateGoHighLevelContactCreateToolDtoMessagesItem_RequestStart": ".types", + "UpdateGoHighLevelContactGetToolDto": ".types", + "UpdateGoHighLevelContactGetToolDtoMessagesItem": ".types", + "UpdateGoHighLevelContactGetToolDtoMessagesItem_RequestComplete": ".types", + "UpdateGoHighLevelContactGetToolDtoMessagesItem_RequestFailed": ".types", + "UpdateGoHighLevelContactGetToolDtoMessagesItem_RequestResponseDelayed": ".types", + "UpdateGoHighLevelContactGetToolDtoMessagesItem_RequestStart": ".types", + "UpdateGoHighLevelCredentialDto": ".types", + "UpdateGoHighLevelMcpCredentialDto": ".types", + "UpdateGoogleCalendarCheckAvailabilityToolDto": ".types", + "UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem": ".types", + "UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestComplete": ".types", + "UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestFailed": ".types", + "UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestResponseDelayed": ".types", + "UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestStart": ".types", + "UpdateGoogleCalendarCreateEventToolDto": ".types", + "UpdateGoogleCalendarCreateEventToolDtoMessagesItem": ".types", + "UpdateGoogleCalendarCreateEventToolDtoMessagesItem_RequestComplete": ".types", + "UpdateGoogleCalendarCreateEventToolDtoMessagesItem_RequestFailed": ".types", + "UpdateGoogleCalendarCreateEventToolDtoMessagesItem_RequestResponseDelayed": ".types", + "UpdateGoogleCalendarCreateEventToolDtoMessagesItem_RequestStart": ".types", + "UpdateGoogleCalendarOAuth2AuthorizationCredentialDto": ".types", + "UpdateGoogleCalendarOAuth2ClientCredentialDto": ".types", + "UpdateGoogleCredentialDto": ".types", + "UpdateGoogleSheetsOAuth2AuthorizationCredentialDto": ".types", + "UpdateGoogleSheetsRowAppendToolDto": ".types", + "UpdateGoogleSheetsRowAppendToolDtoMessagesItem": ".types", + "UpdateGoogleSheetsRowAppendToolDtoMessagesItem_RequestComplete": ".types", + "UpdateGoogleSheetsRowAppendToolDtoMessagesItem_RequestFailed": ".types", + "UpdateGoogleSheetsRowAppendToolDtoMessagesItem_RequestResponseDelayed": ".types", + "UpdateGoogleSheetsRowAppendToolDtoMessagesItem_RequestStart": ".types", + "UpdateGroqCredentialDto": ".types", + "UpdateHandoffToolDto": ".types", + "UpdateHandoffToolDtoDestinationsItem": ".types", + "UpdateHandoffToolDtoDestinationsItem_Assistant": ".types", + "UpdateHandoffToolDtoDestinationsItem_Dynamic": ".types", + "UpdateHandoffToolDtoDestinationsItem_Squad": ".types", + "UpdateHandoffToolDtoMessagesItem": ".types", + "UpdateHandoffToolDtoMessagesItem_RequestComplete": ".types", + "UpdateHandoffToolDtoMessagesItem_RequestFailed": ".types", + "UpdateHandoffToolDtoMessagesItem_RequestResponseDelayed": ".types", + "UpdateHandoffToolDtoMessagesItem_RequestStart": ".types", + "UpdateHumeCredentialDto": ".types", + "UpdateInflectionAiCredentialDto": ".types", + "UpdateInworldCredentialDto": ".types", + "UpdateLangfuseCredentialDto": ".types", + "UpdateLineInsightFromCallTableDto": ".types", + "UpdateLineInsightFromCallTableDtoGroupBy": ".types", + "UpdateLineInsightFromCallTableDtoQueriesItem": ".types", + "UpdateLmntCredentialDto": ".types", + "UpdateMakeCredentialDto": ".types", + "UpdateMakeToolDto": ".types", + "UpdateMakeToolDtoMessagesItem": ".types", + "UpdateMakeToolDtoMessagesItem_RequestComplete": ".types", + "UpdateMakeToolDtoMessagesItem_RequestFailed": ".types", + "UpdateMakeToolDtoMessagesItem_RequestResponseDelayed": ".types", + "UpdateMakeToolDtoMessagesItem_RequestStart": ".types", + "UpdateMcpToolDto": ".types", + "UpdateMcpToolDtoMessagesItem": ".types", + "UpdateMcpToolDtoMessagesItem_RequestComplete": ".types", + "UpdateMcpToolDtoMessagesItem_RequestFailed": ".types", + "UpdateMcpToolDtoMessagesItem_RequestResponseDelayed": ".types", + "UpdateMcpToolDtoMessagesItem_RequestStart": ".types", + "UpdateMistralCredentialDto": ".types", + "UpdateNeuphonicCredentialDto": ".types", + "UpdateOpenAiCredentialDto": ".types", + "UpdateOpenRouterCredentialDto": ".types", + "UpdateOrgDto": ".types", + "UpdateOrgDtoChannel": ".types", + "UpdateOutputToolDto": ".types", + "UpdateOutputToolDtoMessagesItem": ".types", + "UpdateOutputToolDtoMessagesItem_RequestComplete": ".types", + "UpdateOutputToolDtoMessagesItem_RequestFailed": ".types", + "UpdateOutputToolDtoMessagesItem_RequestResponseDelayed": ".types", + "UpdateOutputToolDtoMessagesItem_RequestStart": ".types", + "UpdatePerplexityAiCredentialDto": ".types", + "UpdatePersonalityDto": ".types", + "UpdatePhoneNumbersRequestBody": ".phone_numbers", + "UpdatePhoneNumbersRequestBody_ByoPhoneNumber": ".phone_numbers", + "UpdatePhoneNumbersRequestBody_Telnyx": ".phone_numbers", + "UpdatePhoneNumbersRequestBody_Twilio": ".phone_numbers", + "UpdatePhoneNumbersRequestBody_Vapi": ".phone_numbers", + "UpdatePhoneNumbersRequestBody_Vonage": ".phone_numbers", + "UpdatePhoneNumbersResponse": ".phone_numbers", + "UpdatePhoneNumbersResponse_ByoPhoneNumber": ".phone_numbers", + "UpdatePhoneNumbersResponse_Telnyx": ".phone_numbers", + "UpdatePhoneNumbersResponse_Twilio": ".phone_numbers", + "UpdatePhoneNumbersResponse_Vapi": ".phone_numbers", + "UpdatePhoneNumbersResponse_Vonage": ".phone_numbers", + "UpdatePieInsightFromCallTableDto": ".types", + "UpdatePieInsightFromCallTableDtoGroupBy": ".types", + "UpdatePieInsightFromCallTableDtoQueriesItem": ".types", + "UpdatePlayHtCredentialDto": ".types", + "UpdateQueryToolDto": ".types", + "UpdateQueryToolDtoMessagesItem": ".types", + "UpdateQueryToolDtoMessagesItem_RequestComplete": ".types", + "UpdateQueryToolDtoMessagesItem_RequestFailed": ".types", + "UpdateQueryToolDtoMessagesItem_RequestResponseDelayed": ".types", + "UpdateQueryToolDtoMessagesItem_RequestStart": ".types", + "UpdateRimeAiCredentialDto": ".types", + "UpdateRunpodCredentialDto": ".types", + "UpdateS3CredentialDto": ".types", + "UpdateScenarioDto": ".types", + "UpdateScenarioDtoHooksItem": ".types", + "UpdateScenarioDtoHooksItem_SimulationRunEnded": ".types", + "UpdateScenarioDtoHooksItem_SimulationRunStarted": ".types", + "UpdateSessionDtoMessagesItem": ".sessions", + "UpdateSessionDtoStatus": ".sessions", + "UpdateSimulationDto": ".types", + "UpdateSimulationSuiteDto": ".types", + "UpdateSipRequestToolDto": ".types", + "UpdateSipRequestToolDtoBody": ".types", + "UpdateSipRequestToolDtoMessagesItem": ".types", + "UpdateSipRequestToolDtoMessagesItem_RequestComplete": ".types", + "UpdateSipRequestToolDtoMessagesItem_RequestFailed": ".types", + "UpdateSipRequestToolDtoMessagesItem_RequestResponseDelayed": ".types", + "UpdateSipRequestToolDtoMessagesItem_RequestStart": ".types", + "UpdateSipRequestToolDtoVerb": ".types", + "UpdateSlackOAuth2AuthorizationCredentialDto": ".types", + "UpdateSlackSendMessageToolDto": ".types", + "UpdateSlackSendMessageToolDtoMessagesItem": ".types", + "UpdateSlackSendMessageToolDtoMessagesItem_RequestComplete": ".types", + "UpdateSlackSendMessageToolDtoMessagesItem_RequestFailed": ".types", + "UpdateSlackSendMessageToolDtoMessagesItem_RequestResponseDelayed": ".types", + "UpdateSlackSendMessageToolDtoMessagesItem_RequestStart": ".types", + "UpdateSlackWebhookCredentialDto": ".types", + "UpdateSmsToolDto": ".types", + "UpdateSmsToolDtoMessagesItem": ".types", + "UpdateSmsToolDtoMessagesItem_RequestComplete": ".types", + "UpdateSmsToolDtoMessagesItem_RequestFailed": ".types", + "UpdateSmsToolDtoMessagesItem_RequestResponseDelayed": ".types", + "UpdateSmsToolDtoMessagesItem_RequestStart": ".types", + "UpdateSonioxCredentialDto": ".types", + "UpdateStructuredOutputDtoModel": ".structured_outputs", + "UpdateStructuredOutputDtoModel_Anthropic": ".structured_outputs", + "UpdateStructuredOutputDtoModel_AnthropicBedrock": ".structured_outputs", + "UpdateStructuredOutputDtoModel_CustomLlm": ".structured_outputs", + "UpdateStructuredOutputDtoModel_Google": ".structured_outputs", + "UpdateStructuredOutputDtoModel_Openai": ".structured_outputs", + "UpdateStructuredOutputDtoType": ".structured_outputs", + "UpdateTelnyxPhoneNumberDto": ".types", + "UpdateTelnyxPhoneNumberDtoFallbackDestination": ".types", + "UpdateTelnyxPhoneNumberDtoFallbackDestination_Number": ".types", + "UpdateTelnyxPhoneNumberDtoFallbackDestination_Sip": ".types", + "UpdateTelnyxPhoneNumberDtoHooksItem": ".types", + "UpdateTelnyxPhoneNumberDtoHooksItem_CallEnding": ".types", + "UpdateTelnyxPhoneNumberDtoHooksItem_CallRinging": ".types", + "UpdateTestSuiteDto": ".types", + "UpdateTestSuiteRunDto": ".types", + "UpdateTestSuiteTestChatDto": ".types", + "UpdateTestSuiteTestChatDtoType": ".types", + "UpdateTestSuiteTestVoiceDto": ".types", + "UpdateTestSuiteTestVoiceDtoType": ".types", + "UpdateTextEditorToolDto": ".types", + "UpdateTextEditorToolDtoMessagesItem": ".types", + "UpdateTextEditorToolDtoMessagesItem_RequestComplete": ".types", + "UpdateTextEditorToolDtoMessagesItem_RequestFailed": ".types", + "UpdateTextEditorToolDtoMessagesItem_RequestResponseDelayed": ".types", + "UpdateTextEditorToolDtoMessagesItem_RequestStart": ".types", + "UpdateTextEditorToolDtoName": ".types", + "UpdateTextEditorToolDtoSubType": ".types", + "UpdateTextInsightFromCallTableDto": ".types", + "UpdateTextInsightFromCallTableDtoQueriesItem": ".types", + "UpdateTogetherAiCredentialDto": ".types", + "UpdateTokenDto": ".types", + "UpdateTokenDtoTag": ".types", + "UpdateToolTemplateDto": ".types", + "UpdateToolTemplateDtoDetails": ".types", + "UpdateToolTemplateDtoDetails_ApiRequest": ".types", + "UpdateToolTemplateDtoDetails_Bash": ".types", + "UpdateToolTemplateDtoDetails_Code": ".types", + "UpdateToolTemplateDtoDetails_Computer": ".types", + "UpdateToolTemplateDtoDetails_Dtmf": ".types", + "UpdateToolTemplateDtoDetails_EndCall": ".types", + "UpdateToolTemplateDtoDetails_Function": ".types", + "UpdateToolTemplateDtoDetails_GohighlevelCalendarAvailabilityCheck": ".types", + "UpdateToolTemplateDtoDetails_GohighlevelCalendarEventCreate": ".types", + "UpdateToolTemplateDtoDetails_GohighlevelContactCreate": ".types", + "UpdateToolTemplateDtoDetails_GohighlevelContactGet": ".types", + "UpdateToolTemplateDtoDetails_GoogleCalendarAvailabilityCheck": ".types", + "UpdateToolTemplateDtoDetails_GoogleCalendarEventCreate": ".types", + "UpdateToolTemplateDtoDetails_GoogleSheetsRowAppend": ".types", + "UpdateToolTemplateDtoDetails_Handoff": ".types", + "UpdateToolTemplateDtoDetails_Mcp": ".types", + "UpdateToolTemplateDtoDetails_Query": ".types", + "UpdateToolTemplateDtoDetails_SipRequest": ".types", + "UpdateToolTemplateDtoDetails_SlackMessageSend": ".types", + "UpdateToolTemplateDtoDetails_Sms": ".types", + "UpdateToolTemplateDtoDetails_TextEditor": ".types", + "UpdateToolTemplateDtoDetails_TransferCall": ".types", + "UpdateToolTemplateDtoDetails_Voicemail": ".types", + "UpdateToolTemplateDtoProvider": ".types", + "UpdateToolTemplateDtoProviderDetails": ".types", + "UpdateToolTemplateDtoProviderDetails_Function": ".types", + "UpdateToolTemplateDtoProviderDetails_Ghl": ".types", + "UpdateToolTemplateDtoProviderDetails_GohighlevelCalendarAvailabilityCheck": ".types", + "UpdateToolTemplateDtoProviderDetails_GohighlevelCalendarEventCreate": ".types", + "UpdateToolTemplateDtoProviderDetails_GohighlevelContactCreate": ".types", + "UpdateToolTemplateDtoProviderDetails_GohighlevelContactGet": ".types", + "UpdateToolTemplateDtoProviderDetails_GoogleCalendarEventCreate": ".types", + "UpdateToolTemplateDtoProviderDetails_GoogleSheetsRowAppend": ".types", + "UpdateToolTemplateDtoProviderDetails_Make": ".types", + "UpdateToolTemplateDtoType": ".types", + "UpdateToolTemplateDtoVisibility": ".types", + "UpdateToolsRequestBody": ".tools", + "UpdateToolsRequestBody_ApiRequest": ".tools", + "UpdateToolsRequestBody_Bash": ".tools", + "UpdateToolsRequestBody_Computer": ".tools", + "UpdateToolsRequestBody_Dtmf": ".tools", + "UpdateToolsRequestBody_EndCall": ".tools", + "UpdateToolsRequestBody_Function": ".tools", + "UpdateToolsRequestBody_GohighlevelCalendarAvailabilityCheck": ".tools", + "UpdateToolsRequestBody_GohighlevelCalendarEventCreate": ".tools", + "UpdateToolsRequestBody_GohighlevelContactCreate": ".tools", + "UpdateToolsRequestBody_GohighlevelContactGet": ".tools", + "UpdateToolsRequestBody_GoogleCalendarAvailabilityCheck": ".tools", + "UpdateToolsRequestBody_GoogleCalendarEventCreate": ".tools", + "UpdateToolsRequestBody_GoogleSheetsRowAppend": ".tools", + "UpdateToolsRequestBody_Handoff": ".tools", + "UpdateToolsRequestBody_Mcp": ".tools", + "UpdateToolsRequestBody_Query": ".tools", + "UpdateToolsRequestBody_SipRequest": ".tools", + "UpdateToolsRequestBody_SlackMessageSend": ".tools", + "UpdateToolsRequestBody_Sms": ".tools", + "UpdateToolsRequestBody_TextEditor": ".tools", + "UpdateToolsRequestBody_TransferCall": ".tools", + "UpdateToolsRequestBody_Voicemail": ".tools", + "UpdateToolsResponse": ".tools", + "UpdateToolsResponse_ApiRequest": ".tools", + "UpdateToolsResponse_Bash": ".tools", + "UpdateToolsResponse_Code": ".tools", + "UpdateToolsResponse_Computer": ".tools", + "UpdateToolsResponse_Dtmf": ".tools", + "UpdateToolsResponse_EndCall": ".tools", + "UpdateToolsResponse_Function": ".tools", + "UpdateToolsResponse_GohighlevelCalendarAvailabilityCheck": ".tools", + "UpdateToolsResponse_GohighlevelCalendarEventCreate": ".tools", + "UpdateToolsResponse_GohighlevelContactCreate": ".tools", + "UpdateToolsResponse_GohighlevelContactGet": ".tools", + "UpdateToolsResponse_GoogleCalendarAvailabilityCheck": ".tools", + "UpdateToolsResponse_GoogleCalendarEventCreate": ".tools", + "UpdateToolsResponse_GoogleSheetsRowAppend": ".tools", + "UpdateToolsResponse_Handoff": ".tools", + "UpdateToolsResponse_Mcp": ".tools", + "UpdateToolsResponse_Query": ".tools", + "UpdateToolsResponse_SipRequest": ".tools", + "UpdateToolsResponse_SlackMessageSend": ".tools", + "UpdateToolsResponse_Sms": ".tools", + "UpdateToolsResponse_TextEditor": ".tools", + "UpdateToolsResponse_TransferCall": ".tools", + "UpdateToolsResponse_Voicemail": ".tools", + "UpdateTransferCallToolDto": ".types", + "UpdateTransferCallToolDtoDestinationsItem": ".types", + "UpdateTransferCallToolDtoDestinationsItem_Assistant": ".types", + "UpdateTransferCallToolDtoDestinationsItem_Number": ".types", + "UpdateTransferCallToolDtoDestinationsItem_Sip": ".types", + "UpdateTransferCallToolDtoMessagesItem": ".types", + "UpdateTransferCallToolDtoMessagesItem_RequestComplete": ".types", + "UpdateTransferCallToolDtoMessagesItem_RequestFailed": ".types", + "UpdateTransferCallToolDtoMessagesItem_RequestResponseDelayed": ".types", + "UpdateTransferCallToolDtoMessagesItem_RequestStart": ".types", + "UpdateTrieveCredentialDto": ".types", + "UpdateTrieveKnowledgeBaseDto": ".types", + "UpdateTwilioCredentialDto": ".types", + "UpdateTwilioPhoneNumberDto": ".types", + "UpdateTwilioPhoneNumberDtoFallbackDestination": ".types", + "UpdateTwilioPhoneNumberDtoFallbackDestination_Number": ".types", + "UpdateTwilioPhoneNumberDtoFallbackDestination_Sip": ".types", + "UpdateTwilioPhoneNumberDtoHooksItem": ".types", + "UpdateTwilioPhoneNumberDtoHooksItem_CallEnding": ".types", + "UpdateTwilioPhoneNumberDtoHooksItem_CallRinging": ".types", + "UpdateUserRoleDto": ".types", + "UpdateUserRoleDtoRole": ".types", + "UpdateVapiPhoneNumberDto": ".types", + "UpdateVapiPhoneNumberDtoFallbackDestination": ".types", + "UpdateVapiPhoneNumberDtoFallbackDestination_Number": ".types", + "UpdateVapiPhoneNumberDtoFallbackDestination_Sip": ".types", + "UpdateVapiPhoneNumberDtoHooksItem": ".types", + "UpdateVapiPhoneNumberDtoHooksItem_CallEnding": ".types", + "UpdateVapiPhoneNumberDtoHooksItem_CallRinging": ".types", + "UpdateVoicemailToolDto": ".types", + "UpdateVoicemailToolDtoMessagesItem": ".types", + "UpdateVoicemailToolDtoMessagesItem_RequestComplete": ".types", + "UpdateVoicemailToolDtoMessagesItem_RequestFailed": ".types", + "UpdateVoicemailToolDtoMessagesItem_RequestResponseDelayed": ".types", + "UpdateVoicemailToolDtoMessagesItem_RequestStart": ".types", + "UpdateVonageCredentialDto": ".types", + "UpdateVonagePhoneNumberDto": ".types", + "UpdateVonagePhoneNumberDtoFallbackDestination": ".types", + "UpdateVonagePhoneNumberDtoFallbackDestination_Number": ".types", + "UpdateVonagePhoneNumberDtoFallbackDestination_Sip": ".types", + "UpdateVonagePhoneNumberDtoHooksItem": ".types", + "UpdateVonagePhoneNumberDtoHooksItem_CallEnding": ".types", + "UpdateVonagePhoneNumberDtoHooksItem_CallRinging": ".types", + "UpdateWebhookCredentialDto": ".types", + "UpdateWebhookCredentialDtoAuthenticationPlan": ".types", + "UpdateWebhookCredentialDtoAuthenticationPlan_Bearer": ".types", + "UpdateWebhookCredentialDtoAuthenticationPlan_Hmac": ".types", + "UpdateWebhookCredentialDtoAuthenticationPlan_Oauth2": ".types", + "UpdateWellSaidCredentialDto": ".types", + "UpdateWorkflowDto": ".types", + "UpdateWorkflowDtoBackgroundSound": ".types", + "UpdateWorkflowDtoBackgroundSoundZero": ".types", + "UpdateWorkflowDtoCredentialsItem": ".types", + "UpdateWorkflowDtoCredentialsItem_11Labs": ".types", + "UpdateWorkflowDtoCredentialsItem_Anthropic": ".types", + "UpdateWorkflowDtoCredentialsItem_AnthropicBedrock": ".types", + "UpdateWorkflowDtoCredentialsItem_Anyscale": ".types", + "UpdateWorkflowDtoCredentialsItem_AssemblyAi": ".types", + "UpdateWorkflowDtoCredentialsItem_Azure": ".types", + "UpdateWorkflowDtoCredentialsItem_AzureOpenai": ".types", + "UpdateWorkflowDtoCredentialsItem_ByoSipTrunk": ".types", + "UpdateWorkflowDtoCredentialsItem_Cartesia": ".types", + "UpdateWorkflowDtoCredentialsItem_Cerebras": ".types", + "UpdateWorkflowDtoCredentialsItem_Cloudflare": ".types", + "UpdateWorkflowDtoCredentialsItem_CustomCredential": ".types", + "UpdateWorkflowDtoCredentialsItem_CustomLlm": ".types", + "UpdateWorkflowDtoCredentialsItem_DeepSeek": ".types", + "UpdateWorkflowDtoCredentialsItem_Deepgram": ".types", + "UpdateWorkflowDtoCredentialsItem_Deepinfra": ".types", + "UpdateWorkflowDtoCredentialsItem_Email": ".types", + "UpdateWorkflowDtoCredentialsItem_Gcp": ".types", + "UpdateWorkflowDtoCredentialsItem_GhlOauth2Authorization": ".types", + "UpdateWorkflowDtoCredentialsItem_Gladia": ".types", + "UpdateWorkflowDtoCredentialsItem_Gohighlevel": ".types", + "UpdateWorkflowDtoCredentialsItem_Google": ".types", + "UpdateWorkflowDtoCredentialsItem_GoogleCalendarOauth2Authorization": ".types", + "UpdateWorkflowDtoCredentialsItem_GoogleCalendarOauth2Client": ".types", + "UpdateWorkflowDtoCredentialsItem_GoogleSheetsOauth2Authorization": ".types", + "UpdateWorkflowDtoCredentialsItem_Groq": ".types", + "UpdateWorkflowDtoCredentialsItem_Hume": ".types", + "UpdateWorkflowDtoCredentialsItem_InflectionAi": ".types", + "UpdateWorkflowDtoCredentialsItem_Inworld": ".types", + "UpdateWorkflowDtoCredentialsItem_Langfuse": ".types", + "UpdateWorkflowDtoCredentialsItem_Lmnt": ".types", + "UpdateWorkflowDtoCredentialsItem_Make": ".types", + "UpdateWorkflowDtoCredentialsItem_Minimax": ".types", + "UpdateWorkflowDtoCredentialsItem_Mistral": ".types", + "UpdateWorkflowDtoCredentialsItem_Neuphonic": ".types", + "UpdateWorkflowDtoCredentialsItem_Openai": ".types", + "UpdateWorkflowDtoCredentialsItem_Openrouter": ".types", + "UpdateWorkflowDtoCredentialsItem_PerplexityAi": ".types", + "UpdateWorkflowDtoCredentialsItem_Playht": ".types", + "UpdateWorkflowDtoCredentialsItem_RimeAi": ".types", + "UpdateWorkflowDtoCredentialsItem_Runpod": ".types", + "UpdateWorkflowDtoCredentialsItem_S3": ".types", + "UpdateWorkflowDtoCredentialsItem_SlackOauth2Authorization": ".types", + "UpdateWorkflowDtoCredentialsItem_SlackWebhook": ".types", + "UpdateWorkflowDtoCredentialsItem_SmallestAi": ".types", + "UpdateWorkflowDtoCredentialsItem_Soniox": ".types", + "UpdateWorkflowDtoCredentialsItem_Speechmatics": ".types", + "UpdateWorkflowDtoCredentialsItem_Supabase": ".types", + "UpdateWorkflowDtoCredentialsItem_Tavus": ".types", + "UpdateWorkflowDtoCredentialsItem_TogetherAi": ".types", + "UpdateWorkflowDtoCredentialsItem_Trieve": ".types", + "UpdateWorkflowDtoCredentialsItem_Twilio": ".types", + "UpdateWorkflowDtoCredentialsItem_Vonage": ".types", + "UpdateWorkflowDtoCredentialsItem_Webhook": ".types", + "UpdateWorkflowDtoCredentialsItem_Wellsaid": ".types", + "UpdateWorkflowDtoCredentialsItem_Xai": ".types", + "UpdateWorkflowDtoHooksItem": ".types", + "UpdateWorkflowDtoModel": ".types", + "UpdateWorkflowDtoModel_Anthropic": ".types", + "UpdateWorkflowDtoModel_AnthropicBedrock": ".types", + "UpdateWorkflowDtoModel_CustomLlm": ".types", + "UpdateWorkflowDtoModel_Google": ".types", + "UpdateWorkflowDtoModel_Openai": ".types", + "UpdateWorkflowDtoNodesItem": ".types", + "UpdateWorkflowDtoNodesItem_Conversation": ".types", + "UpdateWorkflowDtoNodesItem_Tool": ".types", + "UpdateWorkflowDtoTranscriber": ".types", + "UpdateWorkflowDtoTranscriber_11Labs": ".types", + "UpdateWorkflowDtoTranscriber_AssemblyAi": ".types", + "UpdateWorkflowDtoTranscriber_Azure": ".types", + "UpdateWorkflowDtoTranscriber_Cartesia": ".types", + "UpdateWorkflowDtoTranscriber_CustomTranscriber": ".types", + "UpdateWorkflowDtoTranscriber_Deepgram": ".types", + "UpdateWorkflowDtoTranscriber_Gladia": ".types", + "UpdateWorkflowDtoTranscriber_Google": ".types", + "UpdateWorkflowDtoTranscriber_Openai": ".types", + "UpdateWorkflowDtoTranscriber_Soniox": ".types", + "UpdateWorkflowDtoTranscriber_Speechmatics": ".types", + "UpdateWorkflowDtoTranscriber_Talkscriber": ".types", + "UpdateWorkflowDtoVoice": ".types", + "UpdateWorkflowDtoVoice_11Labs": ".types", + "UpdateWorkflowDtoVoice_Azure": ".types", + "UpdateWorkflowDtoVoice_Cartesia": ".types", + "UpdateWorkflowDtoVoice_CustomVoice": ".types", + "UpdateWorkflowDtoVoice_Deepgram": ".types", + "UpdateWorkflowDtoVoice_Hume": ".types", + "UpdateWorkflowDtoVoice_Inworld": ".types", + "UpdateWorkflowDtoVoice_Lmnt": ".types", + "UpdateWorkflowDtoVoice_Minimax": ".types", + "UpdateWorkflowDtoVoice_Neuphonic": ".types", + "UpdateWorkflowDtoVoice_Openai": ".types", + "UpdateWorkflowDtoVoice_Playht": ".types", + "UpdateWorkflowDtoVoice_RimeAi": ".types", + "UpdateWorkflowDtoVoice_Sesame": ".types", + "UpdateWorkflowDtoVoice_SmallestAi": ".types", + "UpdateWorkflowDtoVoice_Tavus": ".types", + "UpdateWorkflowDtoVoice_Vapi": ".types", + "UpdateWorkflowDtoVoice_Wellsaid": ".types", + "UpdateWorkflowDtoVoicemailDetection": ".types", + "UpdateWorkflowDtoVoicemailDetectionZero": ".types", + "UpdateXAiCredentialDto": ".types", + "User": ".types", + "UserMessage": ".types", + "Vapi": ".client", + "VapiCost": ".types", + "VapiCostSubType": ".types", + "VapiEnvironment": ".environment", + "VapiModel": ".types", + "VapiModelProvider": ".types", + "VapiModelToolsItem": ".types", + "VapiModelToolsItem_ApiRequest": ".types", + "VapiModelToolsItem_Bash": ".types", + "VapiModelToolsItem_Code": ".types", + "VapiModelToolsItem_Computer": ".types", + "VapiModelToolsItem_Dtmf": ".types", + "VapiModelToolsItem_EndCall": ".types", + "VapiModelToolsItem_Function": ".types", + "VapiModelToolsItem_GohighlevelCalendarAvailabilityCheck": ".types", + "VapiModelToolsItem_GohighlevelCalendarEventCreate": ".types", + "VapiModelToolsItem_GohighlevelContactCreate": ".types", + "VapiModelToolsItem_GohighlevelContactGet": ".types", + "VapiModelToolsItem_GoogleCalendarAvailabilityCheck": ".types", + "VapiModelToolsItem_GoogleCalendarEventCreate": ".types", + "VapiModelToolsItem_GoogleSheetsRowAppend": ".types", + "VapiModelToolsItem_Handoff": ".types", + "VapiModelToolsItem_Mcp": ".types", + "VapiModelToolsItem_Query": ".types", + "VapiModelToolsItem_SipRequest": ".types", + "VapiModelToolsItem_SlackMessageSend": ".types", + "VapiModelToolsItem_Sms": ".types", + "VapiModelToolsItem_TextEditor": ".types", + "VapiModelToolsItem_TransferCall": ".types", + "VapiModelToolsItem_Voicemail": ".types", + "VapiPhoneNumber": ".types", + "VapiPhoneNumberFallbackDestination": ".types", + "VapiPhoneNumberFallbackDestination_Number": ".types", + "VapiPhoneNumberFallbackDestination_Sip": ".types", + "VapiPhoneNumberHooksItem": ".types", + "VapiPhoneNumberHooksItem_CallEnding": ".types", + "VapiPhoneNumberHooksItem_CallRinging": ".types", + "VapiPhoneNumberStatus": ".types", + "VapiPronunciationDictionaryLocator": ".types", + "VapiSipTransportMessage": ".types", + "VapiSipTransportMessageSipVerb": ".types", + "VapiSmartEndpointingPlan": ".types", + "VapiSmartEndpointingPlanProvider": ".types", + "VapiVoice": ".types", + "VapiVoiceVoiceId": ".types", + "VapiVoicemailDetectionPlan": ".types", + "VapiVoicemailDetectionPlanProvider": ".types", + "VapiVoicemailDetectionPlanType": ".types", + "VariableExtractionAlias": ".types", + "VariableExtractionPlan": ".types", + "VariableValueGroupBy": ".types", + "VoiceCost": ".types", + "VoiceLibrary": ".types", + "VoiceLibraryGender": ".types", + "VoiceLibraryVoiceResponse": ".types", + "VoicemailDetectionBackoffPlan": ".types", + "VoicemailDetectionCost": ".types", + "VoicemailDetectionCostProvider": ".types", + "VoicemailTool": ".types", + "VoicemailToolMessagesItem": ".types", + "VoicemailToolMessagesItem_RequestComplete": ".types", + "VoicemailToolMessagesItem_RequestFailed": ".types", + "VoicemailToolMessagesItem_RequestResponseDelayed": ".types", + "VoicemailToolMessagesItem_RequestStart": ".types", + "VonageCredential": ".types", + "VonageCredentialProvider": ".types", + "VonagePhoneNumber": ".types", + "VonagePhoneNumberFallbackDestination": ".types", + "VonagePhoneNumberFallbackDestination_Number": ".types", + "VonagePhoneNumberFallbackDestination_Sip": ".types", + "VonagePhoneNumberHooksItem": ".types", + "VonagePhoneNumberHooksItem_CallEnding": ".types", + "VonagePhoneNumberHooksItem_CallRinging": ".types", + "VonagePhoneNumberStatus": ".types", + "WebChat": ".types", + "WebChatOutputItem": ".types", + "WebhookCredential": ".types", + "WebhookCredentialAuthenticationPlan": ".types", + "WebhookCredentialAuthenticationPlan_Bearer": ".types", + "WebhookCredentialAuthenticationPlan_Hmac": ".types", + "WebhookCredentialAuthenticationPlan_Oauth2": ".types", + "WebhookCredentialProvider": ".types", + "WellSaidCredential": ".types", + "WellSaidCredentialProvider": ".types", + "WellSaidVoice": ".types", + "WellSaidVoiceModel": ".types", + "Workflow": ".types", + "WorkflowAnthropicBedrockModel": ".types", + "WorkflowAnthropicBedrockModelModel": ".types", + "WorkflowAnthropicModel": ".types", + "WorkflowAnthropicModelModel": ".types", + "WorkflowBackgroundSound": ".types", + "WorkflowBackgroundSoundZero": ".types", + "WorkflowCredentialsItem": ".types", + "WorkflowCredentialsItem_11Labs": ".types", + "WorkflowCredentialsItem_Anthropic": ".types", + "WorkflowCredentialsItem_AnthropicBedrock": ".types", + "WorkflowCredentialsItem_Anyscale": ".types", + "WorkflowCredentialsItem_AssemblyAi": ".types", + "WorkflowCredentialsItem_Azure": ".types", + "WorkflowCredentialsItem_AzureOpenai": ".types", + "WorkflowCredentialsItem_ByoSipTrunk": ".types", + "WorkflowCredentialsItem_Cartesia": ".types", + "WorkflowCredentialsItem_Cerebras": ".types", + "WorkflowCredentialsItem_Cloudflare": ".types", + "WorkflowCredentialsItem_CustomCredential": ".types", + "WorkflowCredentialsItem_CustomLlm": ".types", + "WorkflowCredentialsItem_DeepSeek": ".types", + "WorkflowCredentialsItem_Deepgram": ".types", + "WorkflowCredentialsItem_Deepinfra": ".types", + "WorkflowCredentialsItem_Email": ".types", + "WorkflowCredentialsItem_Gcp": ".types", + "WorkflowCredentialsItem_GhlOauth2Authorization": ".types", + "WorkflowCredentialsItem_Gladia": ".types", + "WorkflowCredentialsItem_Gohighlevel": ".types", + "WorkflowCredentialsItem_Google": ".types", + "WorkflowCredentialsItem_GoogleCalendarOauth2Authorization": ".types", + "WorkflowCredentialsItem_GoogleCalendarOauth2Client": ".types", + "WorkflowCredentialsItem_GoogleSheetsOauth2Authorization": ".types", + "WorkflowCredentialsItem_Groq": ".types", + "WorkflowCredentialsItem_Hume": ".types", + "WorkflowCredentialsItem_InflectionAi": ".types", + "WorkflowCredentialsItem_Inworld": ".types", + "WorkflowCredentialsItem_Langfuse": ".types", + "WorkflowCredentialsItem_Lmnt": ".types", + "WorkflowCredentialsItem_Make": ".types", + "WorkflowCredentialsItem_Minimax": ".types", + "WorkflowCredentialsItem_Mistral": ".types", + "WorkflowCredentialsItem_Neuphonic": ".types", + "WorkflowCredentialsItem_Openai": ".types", + "WorkflowCredentialsItem_Openrouter": ".types", + "WorkflowCredentialsItem_PerplexityAi": ".types", + "WorkflowCredentialsItem_Playht": ".types", + "WorkflowCredentialsItem_RimeAi": ".types", + "WorkflowCredentialsItem_Runpod": ".types", + "WorkflowCredentialsItem_S3": ".types", + "WorkflowCredentialsItem_SlackOauth2Authorization": ".types", + "WorkflowCredentialsItem_SlackWebhook": ".types", + "WorkflowCredentialsItem_SmallestAi": ".types", + "WorkflowCredentialsItem_Soniox": ".types", + "WorkflowCredentialsItem_Speechmatics": ".types", + "WorkflowCredentialsItem_Supabase": ".types", + "WorkflowCredentialsItem_Tavus": ".types", + "WorkflowCredentialsItem_TogetherAi": ".types", + "WorkflowCredentialsItem_Trieve": ".types", + "WorkflowCredentialsItem_Twilio": ".types", + "WorkflowCredentialsItem_Vonage": ".types", + "WorkflowCredentialsItem_Webhook": ".types", + "WorkflowCredentialsItem_Wellsaid": ".types", + "WorkflowCredentialsItem_Xai": ".types", + "WorkflowCustomModel": ".types", + "WorkflowCustomModelMetadataSendMode": ".types", + "WorkflowGoogleModel": ".types", + "WorkflowGoogleModelModel": ".types", + "WorkflowHooksItem": ".types", + "WorkflowModel": ".types", + "WorkflowModel_Anthropic": ".types", + "WorkflowModel_AnthropicBedrock": ".types", + "WorkflowModel_CustomLlm": ".types", + "WorkflowModel_Google": ".types", + "WorkflowModel_Openai": ".types", + "WorkflowNodesItem": ".types", + "WorkflowNodesItem_Conversation": ".types", + "WorkflowNodesItem_Tool": ".types", + "WorkflowOpenAiModel": ".types", + "WorkflowOpenAiModelModel": ".types", + "WorkflowOverrides": ".types", + "WorkflowTranscriber": ".types", + "WorkflowTranscriber_11Labs": ".types", + "WorkflowTranscriber_AssemblyAi": ".types", + "WorkflowTranscriber_Azure": ".types", + "WorkflowTranscriber_Cartesia": ".types", + "WorkflowTranscriber_CustomTranscriber": ".types", + "WorkflowTranscriber_Deepgram": ".types", + "WorkflowTranscriber_Gladia": ".types", + "WorkflowTranscriber_Google": ".types", + "WorkflowTranscriber_Openai": ".types", + "WorkflowTranscriber_Soniox": ".types", + "WorkflowTranscriber_Speechmatics": ".types", + "WorkflowTranscriber_Talkscriber": ".types", + "WorkflowUserEditable": ".types", + "WorkflowUserEditableBackgroundSound": ".types", + "WorkflowUserEditableBackgroundSoundZero": ".types", + "WorkflowUserEditableCredentialsItem": ".types", + "WorkflowUserEditableCredentialsItem_11Labs": ".types", + "WorkflowUserEditableCredentialsItem_Anthropic": ".types", + "WorkflowUserEditableCredentialsItem_AnthropicBedrock": ".types", + "WorkflowUserEditableCredentialsItem_Anyscale": ".types", + "WorkflowUserEditableCredentialsItem_AssemblyAi": ".types", + "WorkflowUserEditableCredentialsItem_Azure": ".types", + "WorkflowUserEditableCredentialsItem_AzureOpenai": ".types", + "WorkflowUserEditableCredentialsItem_ByoSipTrunk": ".types", + "WorkflowUserEditableCredentialsItem_Cartesia": ".types", + "WorkflowUserEditableCredentialsItem_Cerebras": ".types", + "WorkflowUserEditableCredentialsItem_Cloudflare": ".types", + "WorkflowUserEditableCredentialsItem_CustomCredential": ".types", + "WorkflowUserEditableCredentialsItem_CustomLlm": ".types", + "WorkflowUserEditableCredentialsItem_DeepSeek": ".types", + "WorkflowUserEditableCredentialsItem_Deepgram": ".types", + "WorkflowUserEditableCredentialsItem_Deepinfra": ".types", + "WorkflowUserEditableCredentialsItem_Email": ".types", + "WorkflowUserEditableCredentialsItem_Gcp": ".types", + "WorkflowUserEditableCredentialsItem_GhlOauth2Authorization": ".types", + "WorkflowUserEditableCredentialsItem_Gladia": ".types", + "WorkflowUserEditableCredentialsItem_Gohighlevel": ".types", + "WorkflowUserEditableCredentialsItem_Google": ".types", + "WorkflowUserEditableCredentialsItem_GoogleCalendarOauth2Authorization": ".types", + "WorkflowUserEditableCredentialsItem_GoogleCalendarOauth2Client": ".types", + "WorkflowUserEditableCredentialsItem_GoogleSheetsOauth2Authorization": ".types", + "WorkflowUserEditableCredentialsItem_Groq": ".types", + "WorkflowUserEditableCredentialsItem_Hume": ".types", + "WorkflowUserEditableCredentialsItem_InflectionAi": ".types", + "WorkflowUserEditableCredentialsItem_Inworld": ".types", + "WorkflowUserEditableCredentialsItem_Langfuse": ".types", + "WorkflowUserEditableCredentialsItem_Lmnt": ".types", + "WorkflowUserEditableCredentialsItem_Make": ".types", + "WorkflowUserEditableCredentialsItem_Minimax": ".types", + "WorkflowUserEditableCredentialsItem_Mistral": ".types", + "WorkflowUserEditableCredentialsItem_Neuphonic": ".types", + "WorkflowUserEditableCredentialsItem_Openai": ".types", + "WorkflowUserEditableCredentialsItem_Openrouter": ".types", + "WorkflowUserEditableCredentialsItem_PerplexityAi": ".types", + "WorkflowUserEditableCredentialsItem_Playht": ".types", + "WorkflowUserEditableCredentialsItem_RimeAi": ".types", + "WorkflowUserEditableCredentialsItem_Runpod": ".types", + "WorkflowUserEditableCredentialsItem_S3": ".types", + "WorkflowUserEditableCredentialsItem_SlackOauth2Authorization": ".types", + "WorkflowUserEditableCredentialsItem_SlackWebhook": ".types", + "WorkflowUserEditableCredentialsItem_SmallestAi": ".types", + "WorkflowUserEditableCredentialsItem_Soniox": ".types", + "WorkflowUserEditableCredentialsItem_Speechmatics": ".types", + "WorkflowUserEditableCredentialsItem_Supabase": ".types", + "WorkflowUserEditableCredentialsItem_Tavus": ".types", + "WorkflowUserEditableCredentialsItem_TogetherAi": ".types", + "WorkflowUserEditableCredentialsItem_Trieve": ".types", + "WorkflowUserEditableCredentialsItem_Twilio": ".types", + "WorkflowUserEditableCredentialsItem_Vonage": ".types", + "WorkflowUserEditableCredentialsItem_Webhook": ".types", + "WorkflowUserEditableCredentialsItem_Wellsaid": ".types", + "WorkflowUserEditableCredentialsItem_Xai": ".types", + "WorkflowUserEditableHooksItem": ".types", + "WorkflowUserEditableModel": ".types", + "WorkflowUserEditableModel_Anthropic": ".types", + "WorkflowUserEditableModel_AnthropicBedrock": ".types", + "WorkflowUserEditableModel_CustomLlm": ".types", + "WorkflowUserEditableModel_Google": ".types", + "WorkflowUserEditableModel_Openai": ".types", + "WorkflowUserEditableNodesItem": ".types", + "WorkflowUserEditableNodesItem_Conversation": ".types", + "WorkflowUserEditableNodesItem_Tool": ".types", + "WorkflowUserEditableTranscriber": ".types", + "WorkflowUserEditableTranscriber_11Labs": ".types", + "WorkflowUserEditableTranscriber_AssemblyAi": ".types", + "WorkflowUserEditableTranscriber_Azure": ".types", + "WorkflowUserEditableTranscriber_Cartesia": ".types", + "WorkflowUserEditableTranscriber_CustomTranscriber": ".types", + "WorkflowUserEditableTranscriber_Deepgram": ".types", + "WorkflowUserEditableTranscriber_Gladia": ".types", + "WorkflowUserEditableTranscriber_Google": ".types", + "WorkflowUserEditableTranscriber_Openai": ".types", + "WorkflowUserEditableTranscriber_Soniox": ".types", + "WorkflowUserEditableTranscriber_Speechmatics": ".types", + "WorkflowUserEditableTranscriber_Talkscriber": ".types", + "WorkflowUserEditableVoice": ".types", + "WorkflowUserEditableVoice_11Labs": ".types", + "WorkflowUserEditableVoice_Azure": ".types", + "WorkflowUserEditableVoice_Cartesia": ".types", + "WorkflowUserEditableVoice_CustomVoice": ".types", + "WorkflowUserEditableVoice_Deepgram": ".types", + "WorkflowUserEditableVoice_Hume": ".types", + "WorkflowUserEditableVoice_Inworld": ".types", + "WorkflowUserEditableVoice_Lmnt": ".types", + "WorkflowUserEditableVoice_Minimax": ".types", + "WorkflowUserEditableVoice_Neuphonic": ".types", + "WorkflowUserEditableVoice_Openai": ".types", + "WorkflowUserEditableVoice_Playht": ".types", + "WorkflowUserEditableVoice_RimeAi": ".types", + "WorkflowUserEditableVoice_Sesame": ".types", + "WorkflowUserEditableVoice_SmallestAi": ".types", + "WorkflowUserEditableVoice_Tavus": ".types", + "WorkflowUserEditableVoice_Vapi": ".types", + "WorkflowUserEditableVoice_Wellsaid": ".types", + "WorkflowUserEditableVoicemailDetection": ".types", + "WorkflowUserEditableVoicemailDetectionZero": ".types", + "WorkflowVoice": ".types", + "WorkflowVoice_11Labs": ".types", + "WorkflowVoice_Azure": ".types", + "WorkflowVoice_Cartesia": ".types", + "WorkflowVoice_CustomVoice": ".types", + "WorkflowVoice_Deepgram": ".types", + "WorkflowVoice_Hume": ".types", + "WorkflowVoice_Inworld": ".types", + "WorkflowVoice_Lmnt": ".types", + "WorkflowVoice_Minimax": ".types", + "WorkflowVoice_Neuphonic": ".types", + "WorkflowVoice_Openai": ".types", + "WorkflowVoice_Playht": ".types", + "WorkflowVoice_RimeAi": ".types", + "WorkflowVoice_Sesame": ".types", + "WorkflowVoice_SmallestAi": ".types", + "WorkflowVoice_Tavus": ".types", + "WorkflowVoice_Vapi": ".types", + "WorkflowVoice_Wellsaid": ".types", + "WorkflowVoicemailDetection": ".types", + "WorkflowVoicemailDetectionZero": ".types", + "XAiCredential": ".types", + "XAiCredentialProvider": ".types", + "XaiModel": ".types", + "XaiModelModel": ".types", + "XaiModelToolsItem": ".types", + "XaiModelToolsItem_ApiRequest": ".types", + "XaiModelToolsItem_Bash": ".types", + "XaiModelToolsItem_Code": ".types", + "XaiModelToolsItem_Computer": ".types", + "XaiModelToolsItem_Dtmf": ".types", + "XaiModelToolsItem_EndCall": ".types", + "XaiModelToolsItem_Function": ".types", + "XaiModelToolsItem_GohighlevelCalendarAvailabilityCheck": ".types", + "XaiModelToolsItem_GohighlevelCalendarEventCreate": ".types", + "XaiModelToolsItem_GohighlevelContactCreate": ".types", + "XaiModelToolsItem_GohighlevelContactGet": ".types", + "XaiModelToolsItem_GoogleCalendarAvailabilityCheck": ".types", + "XaiModelToolsItem_GoogleCalendarEventCreate": ".types", + "XaiModelToolsItem_GoogleSheetsRowAppend": ".types", + "XaiModelToolsItem_Handoff": ".types", + "XaiModelToolsItem_Mcp": ".types", + "XaiModelToolsItem_Query": ".types", + "XaiModelToolsItem_SipRequest": ".types", + "XaiModelToolsItem_SlackMessageSend": ".types", + "XaiModelToolsItem_Sms": ".types", + "XaiModelToolsItem_TextEditor": ".types", + "XaiModelToolsItem_TransferCall": ".types", + "XaiModelToolsItem_Voicemail": ".types", + "XssSecurityFilter": ".types", + "XssSecurityFilterType": ".types", + "__version__": ".version", + "analytics": ".analytics", + "assistants": ".assistants", + "calls": ".calls", + "campaigns": ".campaigns", + "chats": ".chats", + "eval": ".eval", + "files": ".files", + "insight": ".insight", + "observability_scorecard": ".observability_scorecard", + "phone_numbers": ".phone_numbers", + "provider_resources": ".provider_resources", + "sessions": ".sessions", + "squads": ".squads", + "structured_outputs": ".structured_outputs", + "tools": ".tools", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "AddVoiceToProviderDto", + "AiEdgeCondition", + "AiEdgeConditionType", "Analysis", "AnalysisCost", "AnalysisCostAnalysisType", @@ -552,530 +9291,4602 @@ "AnalyticsQuery", "AnalyticsQueryGroupByItem", "AnalyticsQueryResult", + "AnalyticsQueryTable", + "AnthropicBedrockCredential", + "AnthropicBedrockCredentialAuthenticationPlan", + "AnthropicBedrockCredentialAuthenticationPlan_AwsIam", + "AnthropicBedrockCredentialAuthenticationPlan_AwsSts", + "AnthropicBedrockCredentialProvider", + "AnthropicBedrockCredentialRegion", + "AnthropicBedrockModel", + "AnthropicBedrockModelModel", + "AnthropicBedrockModelToolsItem", + "AnthropicBedrockModelToolsItem_ApiRequest", + "AnthropicBedrockModelToolsItem_Bash", + "AnthropicBedrockModelToolsItem_Code", + "AnthropicBedrockModelToolsItem_Computer", + "AnthropicBedrockModelToolsItem_Dtmf", + "AnthropicBedrockModelToolsItem_EndCall", + "AnthropicBedrockModelToolsItem_Function", + "AnthropicBedrockModelToolsItem_GohighlevelCalendarAvailabilityCheck", + "AnthropicBedrockModelToolsItem_GohighlevelCalendarEventCreate", + "AnthropicBedrockModelToolsItem_GohighlevelContactCreate", + "AnthropicBedrockModelToolsItem_GohighlevelContactGet", + "AnthropicBedrockModelToolsItem_GoogleCalendarAvailabilityCheck", + "AnthropicBedrockModelToolsItem_GoogleCalendarEventCreate", + "AnthropicBedrockModelToolsItem_GoogleSheetsRowAppend", + "AnthropicBedrockModelToolsItem_Handoff", + "AnthropicBedrockModelToolsItem_Mcp", + "AnthropicBedrockModelToolsItem_Query", + "AnthropicBedrockModelToolsItem_SipRequest", + "AnthropicBedrockModelToolsItem_SlackMessageSend", + "AnthropicBedrockModelToolsItem_Sms", + "AnthropicBedrockModelToolsItem_TextEditor", + "AnthropicBedrockModelToolsItem_TransferCall", + "AnthropicBedrockModelToolsItem_Voicemail", "AnthropicCredential", + "AnthropicCredentialProvider", "AnthropicModel", "AnthropicModelModel", "AnthropicModelToolsItem", + "AnthropicModelToolsItem_ApiRequest", + "AnthropicModelToolsItem_Bash", + "AnthropicModelToolsItem_Code", + "AnthropicModelToolsItem_Computer", + "AnthropicModelToolsItem_Dtmf", + "AnthropicModelToolsItem_EndCall", + "AnthropicModelToolsItem_Function", + "AnthropicModelToolsItem_GohighlevelCalendarAvailabilityCheck", + "AnthropicModelToolsItem_GohighlevelCalendarEventCreate", + "AnthropicModelToolsItem_GohighlevelContactCreate", + "AnthropicModelToolsItem_GohighlevelContactGet", + "AnthropicModelToolsItem_GoogleCalendarAvailabilityCheck", + "AnthropicModelToolsItem_GoogleCalendarEventCreate", + "AnthropicModelToolsItem_GoogleSheetsRowAppend", + "AnthropicModelToolsItem_Handoff", + "AnthropicModelToolsItem_Mcp", + "AnthropicModelToolsItem_Query", + "AnthropicModelToolsItem_SipRequest", + "AnthropicModelToolsItem_SlackMessageSend", + "AnthropicModelToolsItem_Sms", + "AnthropicModelToolsItem_TextEditor", + "AnthropicModelToolsItem_TransferCall", + "AnthropicModelToolsItem_Voicemail", + "AnthropicThinkingConfig", + "AnthropicThinkingConfigType", "AnyscaleCredential", + "AnyscaleCredentialProvider", "AnyscaleModel", "AnyscaleModelToolsItem", + "AnyscaleModelToolsItem_ApiRequest", + "AnyscaleModelToolsItem_Bash", + "AnyscaleModelToolsItem_Code", + "AnyscaleModelToolsItem_Computer", + "AnyscaleModelToolsItem_Dtmf", + "AnyscaleModelToolsItem_EndCall", + "AnyscaleModelToolsItem_Function", + "AnyscaleModelToolsItem_GohighlevelCalendarAvailabilityCheck", + "AnyscaleModelToolsItem_GohighlevelCalendarEventCreate", + "AnyscaleModelToolsItem_GohighlevelContactCreate", + "AnyscaleModelToolsItem_GohighlevelContactGet", + "AnyscaleModelToolsItem_GoogleCalendarAvailabilityCheck", + "AnyscaleModelToolsItem_GoogleCalendarEventCreate", + "AnyscaleModelToolsItem_GoogleSheetsRowAppend", + "AnyscaleModelToolsItem_Handoff", + "AnyscaleModelToolsItem_Mcp", + "AnyscaleModelToolsItem_Query", + "AnyscaleModelToolsItem_SipRequest", + "AnyscaleModelToolsItem_SlackMessageSend", + "AnyscaleModelToolsItem_Sms", + "AnyscaleModelToolsItem_TextEditor", + "AnyscaleModelToolsItem_TransferCall", + "AnyscaleModelToolsItem_Voicemail", + "ApiRequestTool", + "ApiRequestToolMessagesItem", + "ApiRequestToolMessagesItem_RequestComplete", + "ApiRequestToolMessagesItem_RequestFailed", + "ApiRequestToolMessagesItem_RequestResponseDelayed", + "ApiRequestToolMessagesItem_RequestStart", + "ApiRequestToolMethod", "Artifact", "ArtifactMessagesItem", "ArtifactPlan", - "AssignmentMutation", - "AssignmentMutationConditionsItem", + "ArtifactPlanRecordingFormat", + "AssemblyAiCredential", + "AssemblyAiCredentialProvider", + "AssemblyAiTranscriber", + "AssemblyAiTranscriberLanguage", + "AssemblyAiTranscriberSpeechModel", "Assistant", + "AssistantActivation", "AssistantBackgroundSound", + "AssistantBackgroundSoundZero", "AssistantClientMessagesItem", + "AssistantCredentialsItem", + "AssistantCredentialsItem_11Labs", + "AssistantCredentialsItem_Anthropic", + "AssistantCredentialsItem_AnthropicBedrock", + "AssistantCredentialsItem_Anyscale", + "AssistantCredentialsItem_AssemblyAi", + "AssistantCredentialsItem_Azure", + "AssistantCredentialsItem_AzureOpenai", + "AssistantCredentialsItem_ByoSipTrunk", + "AssistantCredentialsItem_Cartesia", + "AssistantCredentialsItem_Cerebras", + "AssistantCredentialsItem_Cloudflare", + "AssistantCredentialsItem_CustomCredential", + "AssistantCredentialsItem_CustomLlm", + "AssistantCredentialsItem_DeepSeek", + "AssistantCredentialsItem_Deepgram", + "AssistantCredentialsItem_Deepinfra", + "AssistantCredentialsItem_Email", + "AssistantCredentialsItem_Gcp", + "AssistantCredentialsItem_GhlOauth2Authorization", + "AssistantCredentialsItem_Gladia", + "AssistantCredentialsItem_Gohighlevel", + "AssistantCredentialsItem_Google", + "AssistantCredentialsItem_GoogleCalendarOauth2Authorization", + "AssistantCredentialsItem_GoogleCalendarOauth2Client", + "AssistantCredentialsItem_GoogleSheetsOauth2Authorization", + "AssistantCredentialsItem_Groq", + "AssistantCredentialsItem_Hume", + "AssistantCredentialsItem_InflectionAi", + "AssistantCredentialsItem_Inworld", + "AssistantCredentialsItem_Langfuse", + "AssistantCredentialsItem_Lmnt", + "AssistantCredentialsItem_Make", + "AssistantCredentialsItem_Minimax", + "AssistantCredentialsItem_Mistral", + "AssistantCredentialsItem_Neuphonic", + "AssistantCredentialsItem_Openai", + "AssistantCredentialsItem_Openrouter", + "AssistantCredentialsItem_PerplexityAi", + "AssistantCredentialsItem_Playht", + "AssistantCredentialsItem_RimeAi", + "AssistantCredentialsItem_Runpod", + "AssistantCredentialsItem_S3", + "AssistantCredentialsItem_SlackOauth2Authorization", + "AssistantCredentialsItem_SlackWebhook", + "AssistantCredentialsItem_SmallestAi", + "AssistantCredentialsItem_Soniox", + "AssistantCredentialsItem_Speechmatics", + "AssistantCredentialsItem_Supabase", + "AssistantCredentialsItem_Tavus", + "AssistantCredentialsItem_TogetherAi", + "AssistantCredentialsItem_Trieve", + "AssistantCredentialsItem_Twilio", + "AssistantCredentialsItem_Vonage", + "AssistantCredentialsItem_Webhook", + "AssistantCredentialsItem_Wellsaid", + "AssistantCredentialsItem_Xai", + "AssistantCustomEndpointingRule", "AssistantFirstMessageMode", + "AssistantHookAssistantSpeechInterrupted", + "AssistantHookCallEnding", + "AssistantHookCustomerSpeechInterrupted", + "AssistantHooksItem", + "AssistantMessage", + "AssistantMessageEvaluationContinuePlan", + "AssistantMessageJudgePlanAi", + "AssistantMessageJudgePlanAiModel", + "AssistantMessageJudgePlanAiModel_Anthropic", + "AssistantMessageJudgePlanAiModel_CustomLlm", + "AssistantMessageJudgePlanAiModel_Google", + "AssistantMessageJudgePlanAiModel_Openai", + "AssistantMessageJudgePlanAiType", + "AssistantMessageJudgePlanExact", + "AssistantMessageJudgePlanRegex", + "AssistantMessageRole", "AssistantModel", + "AssistantModel_Anthropic", + "AssistantModel_AnthropicBedrock", + "AssistantModel_Anyscale", + "AssistantModel_Cerebras", + "AssistantModel_CustomLlm", + "AssistantModel_DeepSeek", + "AssistantModel_Deepinfra", + "AssistantModel_Google", + "AssistantModel_Groq", + "AssistantModel_InflectionAi", + "AssistantModel_Minimax", + "AssistantModel_Openai", + "AssistantModel_Openrouter", + "AssistantModel_PerplexityAi", + "AssistantModel_TogetherAi", + "AssistantModel_Xai", "AssistantOverrides", "AssistantOverridesBackgroundSound", + "AssistantOverridesBackgroundSoundZero", "AssistantOverridesClientMessagesItem", + "AssistantOverridesCredentialsItem", + "AssistantOverridesCredentialsItem_11Labs", + "AssistantOverridesCredentialsItem_Anthropic", + "AssistantOverridesCredentialsItem_AnthropicBedrock", + "AssistantOverridesCredentialsItem_Anyscale", + "AssistantOverridesCredentialsItem_AssemblyAi", + "AssistantOverridesCredentialsItem_Azure", + "AssistantOverridesCredentialsItem_AzureOpenai", + "AssistantOverridesCredentialsItem_ByoSipTrunk", + "AssistantOverridesCredentialsItem_Cartesia", + "AssistantOverridesCredentialsItem_Cerebras", + "AssistantOverridesCredentialsItem_Cloudflare", + "AssistantOverridesCredentialsItem_CustomCredential", + "AssistantOverridesCredentialsItem_CustomLlm", + "AssistantOverridesCredentialsItem_DeepSeek", + "AssistantOverridesCredentialsItem_Deepgram", + "AssistantOverridesCredentialsItem_Deepinfra", + "AssistantOverridesCredentialsItem_Email", + "AssistantOverridesCredentialsItem_Gcp", + "AssistantOverridesCredentialsItem_GhlOauth2Authorization", + "AssistantOverridesCredentialsItem_Gladia", + "AssistantOverridesCredentialsItem_Gohighlevel", + "AssistantOverridesCredentialsItem_Google", + "AssistantOverridesCredentialsItem_GoogleCalendarOauth2Authorization", + "AssistantOverridesCredentialsItem_GoogleCalendarOauth2Client", + "AssistantOverridesCredentialsItem_GoogleSheetsOauth2Authorization", + "AssistantOverridesCredentialsItem_Groq", + "AssistantOverridesCredentialsItem_Hume", + "AssistantOverridesCredentialsItem_InflectionAi", + "AssistantOverridesCredentialsItem_Inworld", + "AssistantOverridesCredentialsItem_Langfuse", + "AssistantOverridesCredentialsItem_Lmnt", + "AssistantOverridesCredentialsItem_Make", + "AssistantOverridesCredentialsItem_Minimax", + "AssistantOverridesCredentialsItem_Mistral", + "AssistantOverridesCredentialsItem_Neuphonic", + "AssistantOverridesCredentialsItem_Openai", + "AssistantOverridesCredentialsItem_Openrouter", + "AssistantOverridesCredentialsItem_PerplexityAi", + "AssistantOverridesCredentialsItem_Playht", + "AssistantOverridesCredentialsItem_RimeAi", + "AssistantOverridesCredentialsItem_Runpod", + "AssistantOverridesCredentialsItem_S3", + "AssistantOverridesCredentialsItem_SlackOauth2Authorization", + "AssistantOverridesCredentialsItem_SlackWebhook", + "AssistantOverridesCredentialsItem_SmallestAi", + "AssistantOverridesCredentialsItem_Soniox", + "AssistantOverridesCredentialsItem_Speechmatics", + "AssistantOverridesCredentialsItem_Supabase", + "AssistantOverridesCredentialsItem_Tavus", + "AssistantOverridesCredentialsItem_TogetherAi", + "AssistantOverridesCredentialsItem_Trieve", + "AssistantOverridesCredentialsItem_Twilio", + "AssistantOverridesCredentialsItem_Vonage", + "AssistantOverridesCredentialsItem_Webhook", + "AssistantOverridesCredentialsItem_Wellsaid", + "AssistantOverridesCredentialsItem_Xai", "AssistantOverridesFirstMessageMode", + "AssistantOverridesHooksItem", "AssistantOverridesModel", + "AssistantOverridesModel_Anthropic", + "AssistantOverridesModel_AnthropicBedrock", + "AssistantOverridesModel_Anyscale", + "AssistantOverridesModel_Cerebras", + "AssistantOverridesModel_CustomLlm", + "AssistantOverridesModel_DeepSeek", + "AssistantOverridesModel_Deepinfra", + "AssistantOverridesModel_Google", + "AssistantOverridesModel_Groq", + "AssistantOverridesModel_InflectionAi", + "AssistantOverridesModel_Minimax", + "AssistantOverridesModel_Openai", + "AssistantOverridesModel_Openrouter", + "AssistantOverridesModel_PerplexityAi", + "AssistantOverridesModel_TogetherAi", + "AssistantOverridesModel_Xai", "AssistantOverridesServerMessagesItem", + "AssistantOverridesToolsAppendItem", + "AssistantOverridesToolsAppendItem_ApiRequest", + "AssistantOverridesToolsAppendItem_Bash", + "AssistantOverridesToolsAppendItem_Code", + "AssistantOverridesToolsAppendItem_Computer", + "AssistantOverridesToolsAppendItem_Dtmf", + "AssistantOverridesToolsAppendItem_EndCall", + "AssistantOverridesToolsAppendItem_Function", + "AssistantOverridesToolsAppendItem_GohighlevelCalendarAvailabilityCheck", + "AssistantOverridesToolsAppendItem_GohighlevelCalendarEventCreate", + "AssistantOverridesToolsAppendItem_GohighlevelContactCreate", + "AssistantOverridesToolsAppendItem_GohighlevelContactGet", + "AssistantOverridesToolsAppendItem_GoogleCalendarAvailabilityCheck", + "AssistantOverridesToolsAppendItem_GoogleCalendarEventCreate", + "AssistantOverridesToolsAppendItem_GoogleSheetsRowAppend", + "AssistantOverridesToolsAppendItem_Handoff", + "AssistantOverridesToolsAppendItem_Mcp", + "AssistantOverridesToolsAppendItem_Query", + "AssistantOverridesToolsAppendItem_SipRequest", + "AssistantOverridesToolsAppendItem_SlackMessageSend", + "AssistantOverridesToolsAppendItem_Sms", + "AssistantOverridesToolsAppendItem_TextEditor", + "AssistantOverridesToolsAppendItem_TransferCall", + "AssistantOverridesToolsAppendItem_Voicemail", "AssistantOverridesTranscriber", + "AssistantOverridesTranscriber_11Labs", + "AssistantOverridesTranscriber_AssemblyAi", + "AssistantOverridesTranscriber_Azure", + "AssistantOverridesTranscriber_Cartesia", + "AssistantOverridesTranscriber_CustomTranscriber", + "AssistantOverridesTranscriber_Deepgram", + "AssistantOverridesTranscriber_Gladia", + "AssistantOverridesTranscriber_Google", + "AssistantOverridesTranscriber_Openai", + "AssistantOverridesTranscriber_Soniox", + "AssistantOverridesTranscriber_Speechmatics", + "AssistantOverridesTranscriber_Talkscriber", "AssistantOverridesVoice", + "AssistantOverridesVoice_11Labs", + "AssistantOverridesVoice_Azure", + "AssistantOverridesVoice_Cartesia", + "AssistantOverridesVoice_CustomVoice", + "AssistantOverridesVoice_Deepgram", + "AssistantOverridesVoice_Hume", + "AssistantOverridesVoice_Inworld", + "AssistantOverridesVoice_Lmnt", + "AssistantOverridesVoice_Minimax", + "AssistantOverridesVoice_Neuphonic", + "AssistantOverridesVoice_Openai", + "AssistantOverridesVoice_Playht", + "AssistantOverridesVoice_RimeAi", + "AssistantOverridesVoice_Sesame", + "AssistantOverridesVoice_SmallestAi", + "AssistantOverridesVoice_Tavus", + "AssistantOverridesVoice_Vapi", + "AssistantOverridesVoice_Wellsaid", + "AssistantOverridesVoicemailDetection", + "AssistantOverridesVoicemailDetectionZero", + "AssistantPaginatedResponse", "AssistantServerMessagesItem", + "AssistantSpeechWordAlignmentTiming", + "AssistantSpeechWordProgressTiming", + "AssistantSpeechWordTimestamp", "AssistantTranscriber", + "AssistantTranscriber_11Labs", + "AssistantTranscriber_AssemblyAi", + "AssistantTranscriber_Azure", + "AssistantTranscriber_Cartesia", + "AssistantTranscriber_CustomTranscriber", + "AssistantTranscriber_Deepgram", + "AssistantTranscriber_Gladia", + "AssistantTranscriber_Google", + "AssistantTranscriber_Openai", + "AssistantTranscriber_Soniox", + "AssistantTranscriber_Speechmatics", + "AssistantTranscriber_Talkscriber", + "AssistantUserEditable", + "AssistantVersionPaginatedResponse", "AssistantVoice", + "AssistantVoice_11Labs", + "AssistantVoice_Azure", + "AssistantVoice_Cartesia", + "AssistantVoice_CustomVoice", + "AssistantVoice_Deepgram", + "AssistantVoice_Hume", + "AssistantVoice_Inworld", + "AssistantVoice_Lmnt", + "AssistantVoice_Minimax", + "AssistantVoice_Neuphonic", + "AssistantVoice_Openai", + "AssistantVoice_Playht", + "AssistantVoice_RimeAi", + "AssistantVoice_Sesame", + "AssistantVoice_SmallestAi", + "AssistantVoice_Tavus", + "AssistantVoice_Vapi", + "AssistantVoice_Wellsaid", + "AssistantVoicemailDetection", + "AssistantVoicemailDetectionZero", "AsyncVapi", + "AutoReloadPlan", + "AwsStsAssumeRoleUser", + "AwsStsAuthenticationArtifact", + "AwsStsAuthenticationPlan", + "AwsStsAuthenticationSession", + "AwsStsCredentials", + "AwsiamCredentialsAuthenticationPlan", + "AzureBlobStorageBucketPlan", + "AzureCredential", + "AzureCredentialProvider", + "AzureCredentialRegion", + "AzureCredentialService", "AzureOpenAiCredential", "AzureOpenAiCredentialModelsItem", + "AzureOpenAiCredentialProvider", "AzureOpenAiCredentialRegion", + "AzureSpeechTranscriber", + "AzureSpeechTranscriberLanguage", + "AzureSpeechTranscriberSegmentationStrategy", "AzureVoice", "AzureVoiceId", "AzureVoiceIdEnum", + "BackgroundSpeechDenoisingPlan", + "BackoffPlan", "BadRequestError", - "BlockCompleteMessage", - "BlockCompleteMessageConditionsItem", - "BlockStartMessage", - "BlockStartMessageConditionsItem", - "BlocksCreateRequest", - "BlocksCreateResponse", - "BlocksDeleteResponse", - "BlocksGetResponse", - "BlocksListResponseItem", - "BlocksUpdateResponse", + "BarInsight", + "BarInsightFromCallTable", + "BarInsightFromCallTableGroupBy", + "BarInsightFromCallTableQueriesItem", + "BarInsightFromCallTableType", + "BarInsightGroupBy", + "BarInsightMetadata", + "BarInsightQueriesItem", + "BashTool", + "BashToolMessagesItem", + "BashToolMessagesItem_RequestComplete", + "BashToolMessagesItem_RequestFailed", + "BashToolMessagesItem_RequestResponseDelayed", + "BashToolMessagesItem_RequestStart", + "BashToolName", + "BashToolSubType", + "BashToolWithToolCall", + "BashToolWithToolCallMessagesItem", + "BashToolWithToolCallMessagesItem_RequestComplete", + "BashToolWithToolCallMessagesItem_RequestFailed", + "BashToolWithToolCallMessagesItem_RequestResponseDelayed", + "BashToolWithToolCallMessagesItem_RequestStart", + "BashToolWithToolCallName", + "BashToolWithToolCallSubType", + "BearerAuthenticationPlan", "BotMessage", + "BothCustomEndpointingRule", "BucketPlan", - "BuyPhoneNumberDto", - "BuyPhoneNumberDtoFallbackDestination", "ByoPhoneNumber", "ByoPhoneNumberFallbackDestination", + "ByoPhoneNumberFallbackDestination_Number", + "ByoPhoneNumberFallbackDestination_Sip", + "ByoPhoneNumberHooksItem", + "ByoPhoneNumberHooksItem_CallEnding", + "ByoPhoneNumberHooksItem_CallRinging", + "ByoPhoneNumberStatus", "ByoSipTrunkCredential", + "ByoSipTrunkCredentialProvider", "Call", + "CallBatchError", + "CallBatchResponse", "CallCostsItem", + "CallCostsItem_Analysis", + "CallCostsItem_KnowledgeBase", + "CallCostsItem_Model", + "CallCostsItem_Transcriber", + "CallCostsItem_Transport", + "CallCostsItem_Vapi", + "CallCostsItem_Voice", + "CallCostsItem_VoicemailDetection", "CallDestination", + "CallDestination_Number", + "CallDestination_Sip", "CallEndedReason", + "CallHookAssistantSpeechInterrupted", + "CallHookAssistantSpeechInterruptedDoItem", + "CallHookAssistantSpeechInterruptedDoItem_MessageAdd", + "CallHookAssistantSpeechInterruptedDoItem_Say", + "CallHookAssistantSpeechInterruptedDoItem_Tool", + "CallHookAssistantSpeechInterruptedOn", + "CallHookCallEnding", + "CallHookCallEndingDoItem", + "CallHookCallEndingDoItem_MessageAdd", + "CallHookCallEndingDoItem_Tool", + "CallHookCallEndingOn", + "CallHookCustomerSpeechInterrupted", + "CallHookCustomerSpeechInterruptedDoItem", + "CallHookCustomerSpeechInterruptedDoItem_MessageAdd", + "CallHookCustomerSpeechInterruptedDoItem_Say", + "CallHookCustomerSpeechInterruptedDoItem_Tool", + "CallHookCustomerSpeechInterruptedOn", + "CallHookCustomerSpeechTimeout", + "CallHookCustomerSpeechTimeoutDoItem", + "CallHookCustomerSpeechTimeoutDoItem_MessageAdd", + "CallHookCustomerSpeechTimeoutDoItem_Say", + "CallHookCustomerSpeechTimeoutDoItem_Tool", + "CallHookFilter", + "CallHookFilterType", + "CallHookModelResponseTimeout", + "CallHookModelResponseTimeoutDoItem", + "CallHookModelResponseTimeoutDoItem_MessageAdd", + "CallHookModelResponseTimeoutDoItem_Say", + "CallHookModelResponseTimeoutDoItem_Tool", + "CallHookModelResponseTimeoutOn", + "CallHookTranscriberEndpointedSpeechLowConfidence", + "CallHookTranscriberEndpointedSpeechLowConfidenceDoItem", + "CallHookTranscriberEndpointedSpeechLowConfidenceDoItem_MessageAdd", + "CallHookTranscriberEndpointedSpeechLowConfidenceDoItem_Say", + "CallHookTranscriberEndpointedSpeechLowConfidenceDoItem_Tool", "CallMessagesItem", "CallPaginatedResponse", "CallPhoneCallProvider", "CallPhoneCallTransport", "CallStatus", "CallType", - "CallbackStep", - "CallbackStepBlock", + "Campaign", + "CampaignControllerFindAllRequestSortOrder", + "CampaignControllerFindAllRequestStatus", + "CampaignEndedReason", + "CampaignPaginatedResponse", + "CampaignStatus", "CartesiaCredential", + "CartesiaCredentialProvider", + "CartesiaExperimentalControls", + "CartesiaExperimentalControlsEmotion", + "CartesiaGenerationConfig", + "CartesiaGenerationConfigExperimental", + "CartesiaPronunciationDictItem", + "CartesiaPronunciationDictionary", + "CartesiaSpeedControl", + "CartesiaSpeedControlZero", + "CartesiaTranscriber", + "CartesiaTranscriberLanguage", + "CartesiaTranscriberModel", "CartesiaVoice", "CartesiaVoiceLanguage", "CartesiaVoiceModel", + "CerebrasCredential", + "CerebrasCredentialProvider", + "CerebrasModel", + "CerebrasModelModel", + "CerebrasModelToolsItem", + "CerebrasModelToolsItem_ApiRequest", + "CerebrasModelToolsItem_Bash", + "CerebrasModelToolsItem_Code", + "CerebrasModelToolsItem_Computer", + "CerebrasModelToolsItem_Dtmf", + "CerebrasModelToolsItem_EndCall", + "CerebrasModelToolsItem_Function", + "CerebrasModelToolsItem_GohighlevelCalendarAvailabilityCheck", + "CerebrasModelToolsItem_GohighlevelCalendarEventCreate", + "CerebrasModelToolsItem_GohighlevelContactCreate", + "CerebrasModelToolsItem_GohighlevelContactGet", + "CerebrasModelToolsItem_GoogleCalendarAvailabilityCheck", + "CerebrasModelToolsItem_GoogleCalendarEventCreate", + "CerebrasModelToolsItem_GoogleSheetsRowAppend", + "CerebrasModelToolsItem_Handoff", + "CerebrasModelToolsItem_Mcp", + "CerebrasModelToolsItem_Query", + "CerebrasModelToolsItem_SipRequest", + "CerebrasModelToolsItem_SlackMessageSend", + "CerebrasModelToolsItem_Sms", + "CerebrasModelToolsItem_TextEditor", + "CerebrasModelToolsItem_TransferCall", + "CerebrasModelToolsItem_Voicemail", + "Chat", + "ChatAssistantOverrides", + "ChatCost", + "ChatCostsItem", + "ChatCostsItem_Chat", + "ChatCostsItem_Model", + "ChatEvalAssistantMessageEvaluation", + "ChatEvalAssistantMessageEvaluationJudgePlan", + "ChatEvalAssistantMessageEvaluationJudgePlan_Ai", + "ChatEvalAssistantMessageEvaluationJudgePlan_Exact", + "ChatEvalAssistantMessageEvaluationJudgePlan_Regex", + "ChatEvalAssistantMessageEvaluationRole", + "ChatEvalAssistantMessageMock", + "ChatEvalAssistantMessageMockRole", + "ChatEvalAssistantMessageMockToolCall", + "ChatEvalSystemMessageMock", + "ChatEvalSystemMessageMockRole", + "ChatEvalToolResponseMessageEvaluation", + "ChatEvalToolResponseMessageEvaluationRole", + "ChatEvalToolResponseMessageMock", + "ChatEvalToolResponseMessageMockRole", + "ChatEvalUserMessageMock", + "ChatEvalUserMessageMockRole", + "ChatInput", + "ChatInputOneItem", + "ChatMessagesItem", + "ChatOutputItem", + "ChatPaginatedResponse", "ChunkPlan", "ClientInboundMessage", "ClientInboundMessageAddMessage", "ClientInboundMessageControl", "ClientInboundMessageControlControl", + "ClientInboundMessageEndCall", "ClientInboundMessageMessage", + "ClientInboundMessageMessage_AddMessage", + "ClientInboundMessageMessage_Control", + "ClientInboundMessageMessage_EndCall", + "ClientInboundMessageMessage_Say", + "ClientInboundMessageMessage_SendTransportMessage", + "ClientInboundMessageMessage_Transfer", "ClientInboundMessageSay", + "ClientInboundMessageSendTransportMessage", + "ClientInboundMessageSendTransportMessageMessage", + "ClientInboundMessageSendTransportMessageMessage_Twilio", + "ClientInboundMessageSendTransportMessageMessage_VapiSip", + "ClientInboundMessageTransfer", + "ClientInboundMessageTransferDestination", + "ClientInboundMessageTransferDestination_Number", + "ClientInboundMessageTransferDestination_Sip", "ClientMessage", + "ClientMessageAssistantSpeech", + "ClientMessageAssistantSpeechPhoneNumber", + "ClientMessageAssistantSpeechPhoneNumber_ByoPhoneNumber", + "ClientMessageAssistantSpeechPhoneNumber_Telnyx", + "ClientMessageAssistantSpeechPhoneNumber_Twilio", + "ClientMessageAssistantSpeechPhoneNumber_Vapi", + "ClientMessageAssistantSpeechPhoneNumber_Vonage", + "ClientMessageAssistantSpeechSource", + "ClientMessageAssistantSpeechTiming", + "ClientMessageAssistantSpeechTiming_WordAlignment", + "ClientMessageAssistantSpeechTiming_WordProgress", + "ClientMessageAssistantSpeechType", + "ClientMessageAssistantStarted", + "ClientMessageAssistantStartedPhoneNumber", + "ClientMessageAssistantStartedPhoneNumber_ByoPhoneNumber", + "ClientMessageAssistantStartedPhoneNumber_Telnyx", + "ClientMessageAssistantStartedPhoneNumber_Twilio", + "ClientMessageAssistantStartedPhoneNumber_Vapi", + "ClientMessageAssistantStartedPhoneNumber_Vonage", + "ClientMessageAssistantStartedType", + "ClientMessageCallDeleteFailed", + "ClientMessageCallDeleteFailedPhoneNumber", + "ClientMessageCallDeleteFailedPhoneNumber_ByoPhoneNumber", + "ClientMessageCallDeleteFailedPhoneNumber_Telnyx", + "ClientMessageCallDeleteFailedPhoneNumber_Twilio", + "ClientMessageCallDeleteFailedPhoneNumber_Vapi", + "ClientMessageCallDeleteFailedPhoneNumber_Vonage", + "ClientMessageCallDeleteFailedType", + "ClientMessageCallDeleted", + "ClientMessageCallDeletedPhoneNumber", + "ClientMessageCallDeletedPhoneNumber_ByoPhoneNumber", + "ClientMessageCallDeletedPhoneNumber_Telnyx", + "ClientMessageCallDeletedPhoneNumber_Twilio", + "ClientMessageCallDeletedPhoneNumber_Vapi", + "ClientMessageCallDeletedPhoneNumber_Vonage", + "ClientMessageCallDeletedType", + "ClientMessageChatCreated", + "ClientMessageChatCreatedPhoneNumber", + "ClientMessageChatCreatedPhoneNumber_ByoPhoneNumber", + "ClientMessageChatCreatedPhoneNumber_Telnyx", + "ClientMessageChatCreatedPhoneNumber_Twilio", + "ClientMessageChatCreatedPhoneNumber_Vapi", + "ClientMessageChatCreatedPhoneNumber_Vonage", + "ClientMessageChatCreatedType", + "ClientMessageChatDeleted", + "ClientMessageChatDeletedPhoneNumber", + "ClientMessageChatDeletedPhoneNumber_ByoPhoneNumber", + "ClientMessageChatDeletedPhoneNumber_Telnyx", + "ClientMessageChatDeletedPhoneNumber_Twilio", + "ClientMessageChatDeletedPhoneNumber_Vapi", + "ClientMessageChatDeletedPhoneNumber_Vonage", + "ClientMessageChatDeletedType", "ClientMessageConversationUpdate", "ClientMessageConversationUpdateMessagesItem", + "ClientMessageConversationUpdatePhoneNumber", + "ClientMessageConversationUpdatePhoneNumber_ByoPhoneNumber", + "ClientMessageConversationUpdatePhoneNumber_Telnyx", + "ClientMessageConversationUpdatePhoneNumber_Twilio", + "ClientMessageConversationUpdatePhoneNumber_Vapi", + "ClientMessageConversationUpdatePhoneNumber_Vonage", + "ClientMessageConversationUpdateType", "ClientMessageHang", - "ClientMessageLanguageChanged", + "ClientMessageHangPhoneNumber", + "ClientMessageHangPhoneNumber_ByoPhoneNumber", + "ClientMessageHangPhoneNumber_Telnyx", + "ClientMessageHangPhoneNumber_Twilio", + "ClientMessageHangPhoneNumber_Vapi", + "ClientMessageHangPhoneNumber_Vonage", + "ClientMessageHangType", + "ClientMessageLanguageChangeDetected", + "ClientMessageLanguageChangeDetectedPhoneNumber", + "ClientMessageLanguageChangeDetectedPhoneNumber_ByoPhoneNumber", + "ClientMessageLanguageChangeDetectedPhoneNumber_Telnyx", + "ClientMessageLanguageChangeDetectedPhoneNumber_Twilio", + "ClientMessageLanguageChangeDetectedPhoneNumber_Vapi", + "ClientMessageLanguageChangeDetectedPhoneNumber_Vonage", + "ClientMessageLanguageChangeDetectedType", "ClientMessageMessage", "ClientMessageMetadata", + "ClientMessageMetadataPhoneNumber", + "ClientMessageMetadataPhoneNumber_ByoPhoneNumber", + "ClientMessageMetadataPhoneNumber_Telnyx", + "ClientMessageMetadataPhoneNumber_Twilio", + "ClientMessageMetadataPhoneNumber_Vapi", + "ClientMessageMetadataPhoneNumber_Vonage", + "ClientMessageMetadataType", "ClientMessageModelOutput", + "ClientMessageModelOutputPhoneNumber", + "ClientMessageModelOutputPhoneNumber_ByoPhoneNumber", + "ClientMessageModelOutputPhoneNumber_Telnyx", + "ClientMessageModelOutputPhoneNumber_Twilio", + "ClientMessageModelOutputPhoneNumber_Vapi", + "ClientMessageModelOutputPhoneNumber_Vonage", + "ClientMessageModelOutputType", + "ClientMessageSessionCreated", + "ClientMessageSessionCreatedPhoneNumber", + "ClientMessageSessionCreatedPhoneNumber_ByoPhoneNumber", + "ClientMessageSessionCreatedPhoneNumber_Telnyx", + "ClientMessageSessionCreatedPhoneNumber_Twilio", + "ClientMessageSessionCreatedPhoneNumber_Vapi", + "ClientMessageSessionCreatedPhoneNumber_Vonage", + "ClientMessageSessionCreatedType", + "ClientMessageSessionDeleted", + "ClientMessageSessionDeletedPhoneNumber", + "ClientMessageSessionDeletedPhoneNumber_ByoPhoneNumber", + "ClientMessageSessionDeletedPhoneNumber_Telnyx", + "ClientMessageSessionDeletedPhoneNumber_Twilio", + "ClientMessageSessionDeletedPhoneNumber_Vapi", + "ClientMessageSessionDeletedPhoneNumber_Vonage", + "ClientMessageSessionDeletedType", + "ClientMessageSessionUpdated", + "ClientMessageSessionUpdatedPhoneNumber", + "ClientMessageSessionUpdatedPhoneNumber_ByoPhoneNumber", + "ClientMessageSessionUpdatedPhoneNumber_Telnyx", + "ClientMessageSessionUpdatedPhoneNumber_Twilio", + "ClientMessageSessionUpdatedPhoneNumber_Vapi", + "ClientMessageSessionUpdatedPhoneNumber_Vonage", + "ClientMessageSessionUpdatedType", "ClientMessageSpeechUpdate", + "ClientMessageSpeechUpdatePhoneNumber", + "ClientMessageSpeechUpdatePhoneNumber_ByoPhoneNumber", + "ClientMessageSpeechUpdatePhoneNumber_Telnyx", + "ClientMessageSpeechUpdatePhoneNumber_Twilio", + "ClientMessageSpeechUpdatePhoneNumber_Vapi", + "ClientMessageSpeechUpdatePhoneNumber_Vonage", "ClientMessageSpeechUpdateRole", "ClientMessageSpeechUpdateStatus", + "ClientMessageSpeechUpdateType", "ClientMessageToolCalls", + "ClientMessageToolCallsPhoneNumber", + "ClientMessageToolCallsPhoneNumber_ByoPhoneNumber", + "ClientMessageToolCallsPhoneNumber_Telnyx", + "ClientMessageToolCallsPhoneNumber_Twilio", + "ClientMessageToolCallsPhoneNumber_Vapi", + "ClientMessageToolCallsPhoneNumber_Vonage", "ClientMessageToolCallsResult", + "ClientMessageToolCallsResultPhoneNumber", + "ClientMessageToolCallsResultPhoneNumber_ByoPhoneNumber", + "ClientMessageToolCallsResultPhoneNumber_Telnyx", + "ClientMessageToolCallsResultPhoneNumber_Twilio", + "ClientMessageToolCallsResultPhoneNumber_Vapi", + "ClientMessageToolCallsResultPhoneNumber_Vonage", + "ClientMessageToolCallsResultType", "ClientMessageToolCallsToolWithToolCallListItem", + "ClientMessageToolCallsToolWithToolCallListItem_Bash", + "ClientMessageToolCallsToolWithToolCallListItem_Computer", + "ClientMessageToolCallsToolWithToolCallListItem_Function", + "ClientMessageToolCallsToolWithToolCallListItem_Ghl", + "ClientMessageToolCallsToolWithToolCallListItem_GoogleCalendarEventCreate", + "ClientMessageToolCallsToolWithToolCallListItem_Make", + "ClientMessageToolCallsToolWithToolCallListItem_TextEditor", + "ClientMessageToolCallsType", "ClientMessageTranscript", + "ClientMessageTranscriptPhoneNumber", + "ClientMessageTranscriptPhoneNumber_ByoPhoneNumber", + "ClientMessageTranscriptPhoneNumber_Telnyx", + "ClientMessageTranscriptPhoneNumber_Twilio", + "ClientMessageTranscriptPhoneNumber_Vapi", + "ClientMessageTranscriptPhoneNumber_Vonage", "ClientMessageTranscriptRole", "ClientMessageTranscriptTranscriptType", + "ClientMessageTranscriptType", + "ClientMessageTransferUpdate", + "ClientMessageTransferUpdateDestination", + "ClientMessageTransferUpdateDestination_Assistant", + "ClientMessageTransferUpdateDestination_Number", + "ClientMessageTransferUpdateDestination_Sip", + "ClientMessageTransferUpdatePhoneNumber", + "ClientMessageTransferUpdatePhoneNumber_ByoPhoneNumber", + "ClientMessageTransferUpdatePhoneNumber_Telnyx", + "ClientMessageTransferUpdatePhoneNumber_Twilio", + "ClientMessageTransferUpdatePhoneNumber_Vapi", + "ClientMessageTransferUpdatePhoneNumber_Vonage", + "ClientMessageTransferUpdateType", "ClientMessageUserInterrupted", + "ClientMessageUserInterruptedPhoneNumber", + "ClientMessageUserInterruptedPhoneNumber_ByoPhoneNumber", + "ClientMessageUserInterruptedPhoneNumber_Telnyx", + "ClientMessageUserInterruptedPhoneNumber_Twilio", + "ClientMessageUserInterruptedPhoneNumber_Vapi", + "ClientMessageUserInterruptedPhoneNumber_Vonage", + "ClientMessageUserInterruptedType", "ClientMessageVoiceInput", + "ClientMessageVoiceInputPhoneNumber", + "ClientMessageVoiceInputPhoneNumber_ByoPhoneNumber", + "ClientMessageVoiceInputPhoneNumber_Telnyx", + "ClientMessageVoiceInputPhoneNumber_Twilio", + "ClientMessageVoiceInputPhoneNumber_Vapi", + "ClientMessageVoiceInputPhoneNumber_Vonage", + "ClientMessageVoiceInputType", + "ClientMessageWorkflowNodeStarted", + "ClientMessageWorkflowNodeStartedPhoneNumber", + "ClientMessageWorkflowNodeStartedPhoneNumber_ByoPhoneNumber", + "ClientMessageWorkflowNodeStartedPhoneNumber_Telnyx", + "ClientMessageWorkflowNodeStartedPhoneNumber_Twilio", + "ClientMessageWorkflowNodeStartedPhoneNumber_Vapi", + "ClientMessageWorkflowNodeStartedPhoneNumber_Vonage", + "ClientMessageWorkflowNodeStartedType", "CloneVoiceDto", + "CloudflareCredential", + "CloudflareCredentialProvider", + "CloudflareR2BucketPlan", + "CodeTool", + "CodeToolEnvironmentVariable", + "CodeToolMessagesItem", + "CodeToolMessagesItem_RequestComplete", + "CodeToolMessagesItem_RequestFailed", + "CodeToolMessagesItem_RequestResponseDelayed", + "CodeToolMessagesItem_RequestStart", + "Compliance", + "ComplianceOverride", + "CompliancePlan", + "CompliancePlanRecordingConsentPlan", + "CompliancePlanRecordingConsentPlan_StayOnLine", + "CompliancePlanRecordingConsentPlan_Verbal", + "ComputerTool", + "ComputerToolMessagesItem", + "ComputerToolMessagesItem_RequestComplete", + "ComputerToolMessagesItem_RequestFailed", + "ComputerToolMessagesItem_RequestResponseDelayed", + "ComputerToolMessagesItem_RequestStart", + "ComputerToolName", + "ComputerToolSubType", + "ComputerToolWithToolCall", + "ComputerToolWithToolCallMessagesItem", + "ComputerToolWithToolCallMessagesItem_RequestComplete", + "ComputerToolWithToolCallMessagesItem_RequestFailed", + "ComputerToolWithToolCallMessagesItem_RequestResponseDelayed", + "ComputerToolWithToolCallMessagesItem_RequestStart", + "ComputerToolWithToolCallName", + "ComputerToolWithToolCallSubType", "Condition", "ConditionOperator", - "ConversationBlock", - "ConversationBlockMessagesItem", + "ContextEngineeringPlanAll", + "ContextEngineeringPlanLastNMessages", + "ContextEngineeringPlanNone", + "ContextEngineeringPlanUserAndAssistantMessages", + "ConversationNode", + "ConversationNodeModel", + "ConversationNodeModel_Anthropic", + "ConversationNodeModel_AnthropicBedrock", + "ConversationNodeModel_CustomLlm", + "ConversationNodeModel_Google", + "ConversationNodeModel_Openai", + "ConversationNodeToolsItem", + "ConversationNodeToolsItem_ApiRequest", + "ConversationNodeToolsItem_Bash", + "ConversationNodeToolsItem_Code", + "ConversationNodeToolsItem_Computer", + "ConversationNodeToolsItem_Dtmf", + "ConversationNodeToolsItem_EndCall", + "ConversationNodeToolsItem_Function", + "ConversationNodeToolsItem_GohighlevelCalendarAvailabilityCheck", + "ConversationNodeToolsItem_GohighlevelCalendarEventCreate", + "ConversationNodeToolsItem_GohighlevelContactCreate", + "ConversationNodeToolsItem_GohighlevelContactGet", + "ConversationNodeToolsItem_GoogleCalendarAvailabilityCheck", + "ConversationNodeToolsItem_GoogleCalendarEventCreate", + "ConversationNodeToolsItem_GoogleSheetsRowAppend", + "ConversationNodeToolsItem_Handoff", + "ConversationNodeToolsItem_Mcp", + "ConversationNodeToolsItem_Query", + "ConversationNodeToolsItem_SipRequest", + "ConversationNodeToolsItem_SlackMessageSend", + "ConversationNodeToolsItem_Sms", + "ConversationNodeToolsItem_TextEditor", + "ConversationNodeToolsItem_TransferCall", + "ConversationNodeToolsItem_Voicemail", + "ConversationNodeTranscriber", + "ConversationNodeTranscriber_11Labs", + "ConversationNodeTranscriber_AssemblyAi", + "ConversationNodeTranscriber_Azure", + "ConversationNodeTranscriber_Cartesia", + "ConversationNodeTranscriber_CustomTranscriber", + "ConversationNodeTranscriber_Deepgram", + "ConversationNodeTranscriber_Gladia", + "ConversationNodeTranscriber_Google", + "ConversationNodeTranscriber_Openai", + "ConversationNodeTranscriber_Soniox", + "ConversationNodeTranscriber_Speechmatics", + "ConversationNodeTranscriber_Talkscriber", + "ConversationNodeVoice", + "ConversationNodeVoice_11Labs", + "ConversationNodeVoice_Azure", + "ConversationNodeVoice_Cartesia", + "ConversationNodeVoice_CustomVoice", + "ConversationNodeVoice_Deepgram", + "ConversationNodeVoice_Hume", + "ConversationNodeVoice_Inworld", + "ConversationNodeVoice_Lmnt", + "ConversationNodeVoice_Minimax", + "ConversationNodeVoice_Neuphonic", + "ConversationNodeVoice_Openai", + "ConversationNodeVoice_Playht", + "ConversationNodeVoice_RimeAi", + "ConversationNodeVoice_Sesame", + "ConversationNodeVoice_SmallestAi", + "ConversationNodeVoice_Tavus", + "ConversationNodeVoice_Vapi", + "ConversationNodeVoice_Wellsaid", "CostBreakdown", + "CreateAnthropicBedrockCredentialDto", + "CreateAnthropicBedrockCredentialDtoAuthenticationPlan", + "CreateAnthropicBedrockCredentialDtoAuthenticationPlan_AwsIam", + "CreateAnthropicBedrockCredentialDtoAuthenticationPlan_AwsSts", + "CreateAnthropicBedrockCredentialDtoRegion", "CreateAnthropicCredentialDto", "CreateAnyscaleCredentialDto", + "CreateApiRequestToolDto", + "CreateApiRequestToolDtoMessagesItem", + "CreateApiRequestToolDtoMessagesItem_RequestComplete", + "CreateApiRequestToolDtoMessagesItem_RequestFailed", + "CreateApiRequestToolDtoMessagesItem_RequestResponseDelayed", + "CreateApiRequestToolDtoMessagesItem_RequestStart", + "CreateApiRequestToolDtoMethod", + "CreateAssemblyAiCredentialDto", "CreateAssistantDto", "CreateAssistantDtoBackgroundSound", + "CreateAssistantDtoBackgroundSoundZero", "CreateAssistantDtoClientMessagesItem", + "CreateAssistantDtoCredentialsItem", + "CreateAssistantDtoCredentialsItem_11Labs", + "CreateAssistantDtoCredentialsItem_Anthropic", + "CreateAssistantDtoCredentialsItem_AnthropicBedrock", + "CreateAssistantDtoCredentialsItem_Anyscale", + "CreateAssistantDtoCredentialsItem_AssemblyAi", + "CreateAssistantDtoCredentialsItem_Azure", + "CreateAssistantDtoCredentialsItem_AzureOpenai", + "CreateAssistantDtoCredentialsItem_ByoSipTrunk", + "CreateAssistantDtoCredentialsItem_Cartesia", + "CreateAssistantDtoCredentialsItem_Cerebras", + "CreateAssistantDtoCredentialsItem_Cloudflare", + "CreateAssistantDtoCredentialsItem_CustomCredential", + "CreateAssistantDtoCredentialsItem_CustomLlm", + "CreateAssistantDtoCredentialsItem_DeepSeek", + "CreateAssistantDtoCredentialsItem_Deepgram", + "CreateAssistantDtoCredentialsItem_Deepinfra", + "CreateAssistantDtoCredentialsItem_Email", + "CreateAssistantDtoCredentialsItem_Gcp", + "CreateAssistantDtoCredentialsItem_GhlOauth2Authorization", + "CreateAssistantDtoCredentialsItem_Gladia", + "CreateAssistantDtoCredentialsItem_Gohighlevel", + "CreateAssistantDtoCredentialsItem_Google", + "CreateAssistantDtoCredentialsItem_GoogleCalendarOauth2Authorization", + "CreateAssistantDtoCredentialsItem_GoogleCalendarOauth2Client", + "CreateAssistantDtoCredentialsItem_GoogleSheetsOauth2Authorization", + "CreateAssistantDtoCredentialsItem_Groq", + "CreateAssistantDtoCredentialsItem_Hume", + "CreateAssistantDtoCredentialsItem_InflectionAi", + "CreateAssistantDtoCredentialsItem_Inworld", + "CreateAssistantDtoCredentialsItem_Langfuse", + "CreateAssistantDtoCredentialsItem_Lmnt", + "CreateAssistantDtoCredentialsItem_Make", + "CreateAssistantDtoCredentialsItem_Minimax", + "CreateAssistantDtoCredentialsItem_Mistral", + "CreateAssistantDtoCredentialsItem_Neuphonic", + "CreateAssistantDtoCredentialsItem_Openai", + "CreateAssistantDtoCredentialsItem_Openrouter", + "CreateAssistantDtoCredentialsItem_PerplexityAi", + "CreateAssistantDtoCredentialsItem_Playht", + "CreateAssistantDtoCredentialsItem_RimeAi", + "CreateAssistantDtoCredentialsItem_Runpod", + "CreateAssistantDtoCredentialsItem_S3", + "CreateAssistantDtoCredentialsItem_SlackOauth2Authorization", + "CreateAssistantDtoCredentialsItem_SlackWebhook", + "CreateAssistantDtoCredentialsItem_SmallestAi", + "CreateAssistantDtoCredentialsItem_Soniox", + "CreateAssistantDtoCredentialsItem_Speechmatics", + "CreateAssistantDtoCredentialsItem_Supabase", + "CreateAssistantDtoCredentialsItem_Tavus", + "CreateAssistantDtoCredentialsItem_TogetherAi", + "CreateAssistantDtoCredentialsItem_Trieve", + "CreateAssistantDtoCredentialsItem_Twilio", + "CreateAssistantDtoCredentialsItem_Vonage", + "CreateAssistantDtoCredentialsItem_Webhook", + "CreateAssistantDtoCredentialsItem_Wellsaid", + "CreateAssistantDtoCredentialsItem_Xai", "CreateAssistantDtoFirstMessageMode", + "CreateAssistantDtoHooksItem", "CreateAssistantDtoModel", + "CreateAssistantDtoModel_Anthropic", + "CreateAssistantDtoModel_AnthropicBedrock", + "CreateAssistantDtoModel_Anyscale", + "CreateAssistantDtoModel_Cerebras", + "CreateAssistantDtoModel_CustomLlm", + "CreateAssistantDtoModel_DeepSeek", + "CreateAssistantDtoModel_Deepinfra", + "CreateAssistantDtoModel_Google", + "CreateAssistantDtoModel_Groq", + "CreateAssistantDtoModel_InflectionAi", + "CreateAssistantDtoModel_Minimax", + "CreateAssistantDtoModel_Openai", + "CreateAssistantDtoModel_Openrouter", + "CreateAssistantDtoModel_PerplexityAi", + "CreateAssistantDtoModel_TogetherAi", + "CreateAssistantDtoModel_Xai", "CreateAssistantDtoServerMessagesItem", "CreateAssistantDtoTranscriber", + "CreateAssistantDtoTranscriber_11Labs", + "CreateAssistantDtoTranscriber_AssemblyAi", + "CreateAssistantDtoTranscriber_Azure", + "CreateAssistantDtoTranscriber_Cartesia", + "CreateAssistantDtoTranscriber_CustomTranscriber", + "CreateAssistantDtoTranscriber_Deepgram", + "CreateAssistantDtoTranscriber_Gladia", + "CreateAssistantDtoTranscriber_Google", + "CreateAssistantDtoTranscriber_Openai", + "CreateAssistantDtoTranscriber_Soniox", + "CreateAssistantDtoTranscriber_Speechmatics", + "CreateAssistantDtoTranscriber_Talkscriber", "CreateAssistantDtoVoice", + "CreateAssistantDtoVoice_11Labs", + "CreateAssistantDtoVoice_Azure", + "CreateAssistantDtoVoice_Cartesia", + "CreateAssistantDtoVoice_CustomVoice", + "CreateAssistantDtoVoice_Deepgram", + "CreateAssistantDtoVoice_Hume", + "CreateAssistantDtoVoice_Inworld", + "CreateAssistantDtoVoice_Lmnt", + "CreateAssistantDtoVoice_Minimax", + "CreateAssistantDtoVoice_Neuphonic", + "CreateAssistantDtoVoice_Openai", + "CreateAssistantDtoVoice_Playht", + "CreateAssistantDtoVoice_RimeAi", + "CreateAssistantDtoVoice_Sesame", + "CreateAssistantDtoVoice_SmallestAi", + "CreateAssistantDtoVoice_Tavus", + "CreateAssistantDtoVoice_Vapi", + "CreateAssistantDtoVoice_Wellsaid", + "CreateAssistantDtoVoicemailDetection", + "CreateAssistantDtoVoicemailDetectionZero", + "CreateAzureCredentialDto", + "CreateAzureCredentialDtoRegion", + "CreateAzureCredentialDtoService", "CreateAzureOpenAiCredentialDto", "CreateAzureOpenAiCredentialDtoModelsItem", "CreateAzureOpenAiCredentialDtoRegion", + "CreateBarInsightFromCallTableDto", + "CreateBarInsightFromCallTableDtoGroupBy", + "CreateBarInsightFromCallTableDtoQueriesItem", + "CreateBashToolDto", + "CreateBashToolDtoMessagesItem", + "CreateBashToolDtoMessagesItem_RequestComplete", + "CreateBashToolDtoMessagesItem_RequestFailed", + "CreateBashToolDtoMessagesItem_RequestResponseDelayed", + "CreateBashToolDtoMessagesItem_RequestStart", + "CreateBashToolDtoName", + "CreateBashToolDtoSubType", "CreateByoPhoneNumberDto", "CreateByoPhoneNumberDtoFallbackDestination", + "CreateByoPhoneNumberDtoFallbackDestination_Number", + "CreateByoPhoneNumberDtoFallbackDestination_Sip", + "CreateByoPhoneNumberDtoHooksItem", + "CreateByoPhoneNumberDtoHooksItem_CallEnding", + "CreateByoPhoneNumberDtoHooksItem_CallRinging", "CreateByoSipTrunkCredentialDto", + "CreateCallsResponse", "CreateCartesiaCredentialDto", - "CreateConversationBlockDto", - "CreateConversationBlockDtoMessagesItem", + "CreateCerebrasCredentialDto", + "CreateChatDtoInput", + "CreateChatDtoInputOneItem", + "CreateChatStreamResponse", + "CreateChatsResponse", + "CreateCloudflareCredentialDto", + "CreateCodeToolDto", + "CreateCodeToolDtoMessagesItem", + "CreateCodeToolDtoMessagesItem_RequestComplete", + "CreateCodeToolDtoMessagesItem_RequestFailed", + "CreateCodeToolDtoMessagesItem_RequestResponseDelayed", + "CreateCodeToolDtoMessagesItem_RequestStart", + "CreateComputerToolDto", + "CreateComputerToolDtoMessagesItem", + "CreateComputerToolDtoMessagesItem_RequestComplete", + "CreateComputerToolDtoMessagesItem_RequestFailed", + "CreateComputerToolDtoMessagesItem_RequestResponseDelayed", + "CreateComputerToolDtoMessagesItem_RequestStart", + "CreateComputerToolDtoName", + "CreateComputerToolDtoSubType", + "CreateCustomCredentialDto", + "CreateCustomCredentialDtoAuthenticationPlan", + "CreateCustomCredentialDtoAuthenticationPlan_Bearer", + "CreateCustomCredentialDtoAuthenticationPlan_Hmac", + "CreateCustomCredentialDtoAuthenticationPlan_Oauth2", + "CreateCustomCredentialDtoEncryptionPlan", + "CreateCustomCredentialDtoEncryptionPlan_PublicKey", + "CreateCustomKnowledgeBaseDto", + "CreateCustomKnowledgeBaseDtoProvider", "CreateCustomLlmCredentialDto", "CreateCustomerDto", "CreateDeepInfraCredentialDto", + "CreateDeepSeekCredentialDto", "CreateDeepgramCredentialDto", "CreateDtmfToolDto", "CreateDtmfToolDtoMessagesItem", + "CreateDtmfToolDtoMessagesItem_RequestComplete", + "CreateDtmfToolDtoMessagesItem_RequestFailed", + "CreateDtmfToolDtoMessagesItem_RequestResponseDelayed", + "CreateDtmfToolDtoMessagesItem_RequestStart", "CreateElevenLabsCredentialDto", + "CreateEmailCredentialDto", "CreateEndCallToolDto", "CreateEndCallToolDtoMessagesItem", + "CreateEndCallToolDtoMessagesItem_RequestComplete", + "CreateEndCallToolDtoMessagesItem_RequestFailed", + "CreateEndCallToolDtoMessagesItem_RequestResponseDelayed", + "CreateEndCallToolDtoMessagesItem_RequestStart", + "CreateEvalDto", + "CreateEvalDtoMessagesItem", + "CreateEvalDtoType", + "CreateEvalRunDtoTarget", + "CreateEvalRunDtoTarget_Assistant", + "CreateEvalRunDtoTarget_Squad", + "CreateEvalRunDtoType", "CreateFunctionToolDto", "CreateFunctionToolDtoMessagesItem", + "CreateFunctionToolDtoMessagesItem_RequestComplete", + "CreateFunctionToolDtoMessagesItem_RequestFailed", + "CreateFunctionToolDtoMessagesItem_RequestResponseDelayed", + "CreateFunctionToolDtoMessagesItem_RequestStart", "CreateGcpCredentialDto", "CreateGhlToolDto", "CreateGhlToolDtoMessagesItem", + "CreateGhlToolDtoMessagesItem_RequestComplete", + "CreateGhlToolDtoMessagesItem_RequestFailed", + "CreateGhlToolDtoMessagesItem_RequestResponseDelayed", + "CreateGhlToolDtoMessagesItem_RequestStart", + "CreateGhlToolDtoType", "CreateGladiaCredentialDto", + "CreateGoHighLevelCalendarAvailabilityToolDto", + "CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem", + "CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestComplete", + "CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestFailed", + "CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestResponseDelayed", + "CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestStart", + "CreateGoHighLevelCalendarEventCreateToolDto", + "CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem", + "CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestComplete", + "CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestFailed", + "CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestResponseDelayed", + "CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestStart", + "CreateGoHighLevelContactCreateToolDto", + "CreateGoHighLevelContactCreateToolDtoMessagesItem", + "CreateGoHighLevelContactCreateToolDtoMessagesItem_RequestComplete", + "CreateGoHighLevelContactCreateToolDtoMessagesItem_RequestFailed", + "CreateGoHighLevelContactCreateToolDtoMessagesItem_RequestResponseDelayed", + "CreateGoHighLevelContactCreateToolDtoMessagesItem_RequestStart", + "CreateGoHighLevelContactGetToolDto", + "CreateGoHighLevelContactGetToolDtoMessagesItem", + "CreateGoHighLevelContactGetToolDtoMessagesItem_RequestComplete", + "CreateGoHighLevelContactGetToolDtoMessagesItem_RequestFailed", + "CreateGoHighLevelContactGetToolDtoMessagesItem_RequestResponseDelayed", + "CreateGoHighLevelContactGetToolDtoMessagesItem_RequestStart", "CreateGoHighLevelCredentialDto", + "CreateGoHighLevelMcpCredentialDto", + "CreateGoogleCalendarCheckAvailabilityToolDto", + "CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem", + "CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestComplete", + "CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestFailed", + "CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestResponseDelayed", + "CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestStart", + "CreateGoogleCalendarCreateEventToolDto", + "CreateGoogleCalendarCreateEventToolDtoMessagesItem", + "CreateGoogleCalendarCreateEventToolDtoMessagesItem_RequestComplete", + "CreateGoogleCalendarCreateEventToolDtoMessagesItem_RequestFailed", + "CreateGoogleCalendarCreateEventToolDtoMessagesItem_RequestResponseDelayed", + "CreateGoogleCalendarCreateEventToolDtoMessagesItem_RequestStart", + "CreateGoogleCalendarOAuth2AuthorizationCredentialDto", + "CreateGoogleCalendarOAuth2ClientCredentialDto", + "CreateGoogleCredentialDto", + "CreateGoogleSheetsOAuth2AuthorizationCredentialDto", + "CreateGoogleSheetsRowAppendToolDto", + "CreateGoogleSheetsRowAppendToolDtoMessagesItem", + "CreateGoogleSheetsRowAppendToolDtoMessagesItem_RequestComplete", + "CreateGoogleSheetsRowAppendToolDtoMessagesItem_RequestFailed", + "CreateGoogleSheetsRowAppendToolDtoMessagesItem_RequestResponseDelayed", + "CreateGoogleSheetsRowAppendToolDtoMessagesItem_RequestStart", "CreateGroqCredentialDto", + "CreateHandoffToolDto", + "CreateHandoffToolDtoDestinationsItem", + "CreateHandoffToolDtoDestinationsItem_Assistant", + "CreateHandoffToolDtoDestinationsItem_Dynamic", + "CreateHandoffToolDtoDestinationsItem_Squad", + "CreateHandoffToolDtoMessagesItem", + "CreateHandoffToolDtoMessagesItem_RequestComplete", + "CreateHandoffToolDtoMessagesItem_RequestFailed", + "CreateHandoffToolDtoMessagesItem_RequestResponseDelayed", + "CreateHandoffToolDtoMessagesItem_RequestStart", + "CreateHumeCredentialDto", + "CreateInflectionAiCredentialDto", + "CreateInworldCredentialDto", + "CreateLangfuseCredentialDto", + "CreateLineInsightFromCallTableDto", + "CreateLineInsightFromCallTableDtoGroupBy", + "CreateLineInsightFromCallTableDtoQueriesItem", "CreateLmntCredentialDto", "CreateMakeCredentialDto", "CreateMakeToolDto", "CreateMakeToolDtoMessagesItem", + "CreateMakeToolDtoMessagesItem_RequestComplete", + "CreateMakeToolDtoMessagesItem_RequestFailed", + "CreateMakeToolDtoMessagesItem_RequestResponseDelayed", + "CreateMakeToolDtoMessagesItem_RequestStart", + "CreateMakeToolDtoType", + "CreateMcpToolDto", + "CreateMcpToolDtoMessagesItem", + "CreateMcpToolDtoMessagesItem_RequestComplete", + "CreateMcpToolDtoMessagesItem_RequestFailed", + "CreateMcpToolDtoMessagesItem_RequestResponseDelayed", + "CreateMcpToolDtoMessagesItem_RequestStart", + "CreateMinimaxCredentialDto", + "CreateMistralCredentialDto", + "CreateNeuphonicCredentialDto", "CreateOpenAiCredentialDto", "CreateOpenRouterCredentialDto", "CreateOrgDto", + "CreateOrgDtoChannel", "CreateOutboundCallDto", "CreateOutputToolDto", "CreateOutputToolDtoMessagesItem", + "CreateOutputToolDtoMessagesItem_RequestComplete", + "CreateOutputToolDtoMessagesItem_RequestFailed", + "CreateOutputToolDtoMessagesItem_RequestResponseDelayed", + "CreateOutputToolDtoMessagesItem_RequestStart", + "CreateOutputToolDtoType", "CreatePerplexityAiCredentialDto", + "CreatePersonalityDto", + "CreatePhoneNumbersRequest", + "CreatePhoneNumbersRequest_ByoPhoneNumber", + "CreatePhoneNumbersRequest_Telnyx", + "CreatePhoneNumbersRequest_Twilio", + "CreatePhoneNumbersRequest_Vapi", + "CreatePhoneNumbersRequest_Vonage", + "CreatePhoneNumbersResponse", + "CreatePhoneNumbersResponse_ByoPhoneNumber", + "CreatePhoneNumbersResponse_Telnyx", + "CreatePhoneNumbersResponse_Twilio", + "CreatePhoneNumbersResponse_Vapi", + "CreatePhoneNumbersResponse_Vonage", + "CreatePieInsightFromCallTableDto", + "CreatePieInsightFromCallTableDtoGroupBy", + "CreatePieInsightFromCallTableDtoQueriesItem", "CreatePlayHtCredentialDto", + "CreateQueryToolDto", + "CreateQueryToolDtoMessagesItem", + "CreateQueryToolDtoMessagesItem_RequestComplete", + "CreateQueryToolDtoMessagesItem_RequestFailed", + "CreateQueryToolDtoMessagesItem_RequestResponseDelayed", + "CreateQueryToolDtoMessagesItem_RequestStart", + "CreateResponseChatsResponse", "CreateRimeAiCredentialDto", "CreateRunpodCredentialDto", "CreateS3CredentialDto", + "CreateScenarioDto", + "CreateScenarioDtoHooksItem", + "CreateScenarioDtoHooksItem_SimulationRunEnded", + "CreateScenarioDtoHooksItem_SimulationRunStarted", + "CreateScorecardDto", + "CreateSesameVoiceDto", + "CreateSessionDtoMessagesItem", + "CreateSessionDtoStatus", + "CreateSimulationDto", + "CreateSimulationRunDto", + "CreateSimulationRunDtoSimulationsItem", + "CreateSimulationRunDtoSimulationsItem_Simulation", + "CreateSimulationRunDtoSimulationsItem_SimulationSuite", + "CreateSimulationRunDtoTarget", + "CreateSimulationRunDtoTarget_Assistant", + "CreateSimulationRunDtoTarget_Squad", + "CreateSimulationSuiteDto", + "CreateSipRequestToolDto", + "CreateSipRequestToolDtoBody", + "CreateSipRequestToolDtoMessagesItem", + "CreateSipRequestToolDtoMessagesItem_RequestComplete", + "CreateSipRequestToolDtoMessagesItem_RequestFailed", + "CreateSipRequestToolDtoMessagesItem_RequestResponseDelayed", + "CreateSipRequestToolDtoMessagesItem_RequestStart", + "CreateSipRequestToolDtoVerb", + "CreateSlackOAuth2AuthorizationCredentialDto", + "CreateSlackSendMessageToolDto", + "CreateSlackSendMessageToolDtoMessagesItem", + "CreateSlackSendMessageToolDtoMessagesItem_RequestComplete", + "CreateSlackSendMessageToolDtoMessagesItem_RequestFailed", + "CreateSlackSendMessageToolDtoMessagesItem_RequestResponseDelayed", + "CreateSlackSendMessageToolDtoMessagesItem_RequestStart", + "CreateSlackWebhookCredentialDto", + "CreateSmallestAiCredentialDto", + "CreateSmsToolDto", + "CreateSmsToolDtoMessagesItem", + "CreateSmsToolDtoMessagesItem_RequestComplete", + "CreateSmsToolDtoMessagesItem_RequestFailed", + "CreateSmsToolDtoMessagesItem_RequestResponseDelayed", + "CreateSmsToolDtoMessagesItem_RequestStart", + "CreateSonioxCredentialDto", + "CreateSpeechmaticsCredentialDto", "CreateSquadDto", + "CreateStructuredOutputDto", + "CreateStructuredOutputDtoModel", + "CreateStructuredOutputDtoModel_Anthropic", + "CreateStructuredOutputDtoModel_AnthropicBedrock", + "CreateStructuredOutputDtoModel_CustomLlm", + "CreateStructuredOutputDtoModel_Google", + "CreateStructuredOutputDtoModel_Openai", + "CreateStructuredOutputDtoType", + "CreateSupabaseCredentialDto", + "CreateTavusCredentialDto", + "CreateTelnyxPhoneNumberDto", + "CreateTelnyxPhoneNumberDtoFallbackDestination", + "CreateTelnyxPhoneNumberDtoFallbackDestination_Number", + "CreateTelnyxPhoneNumberDtoFallbackDestination_Sip", + "CreateTelnyxPhoneNumberDtoHooksItem", + "CreateTelnyxPhoneNumberDtoHooksItem_CallEnding", + "CreateTelnyxPhoneNumberDtoHooksItem_CallRinging", + "CreateTestSuiteDto", + "CreateTestSuiteRunDto", + "CreateTestSuiteTestChatDto", + "CreateTestSuiteTestChatDtoType", + "CreateTestSuiteTestVoiceDto", + "CreateTestSuiteTestVoiceDtoType", + "CreateTextEditorToolDto", + "CreateTextEditorToolDtoMessagesItem", + "CreateTextEditorToolDtoMessagesItem_RequestComplete", + "CreateTextEditorToolDtoMessagesItem_RequestFailed", + "CreateTextEditorToolDtoMessagesItem_RequestResponseDelayed", + "CreateTextEditorToolDtoMessagesItem_RequestStart", + "CreateTextEditorToolDtoName", + "CreateTextEditorToolDtoSubType", + "CreateTextInsightFromCallTableDto", + "CreateTextInsightFromCallTableDtoQueriesItem", "CreateTogetherAiCredentialDto", "CreateTokenDto", "CreateTokenDtoTag", - "CreateToolCallBlockDto", - "CreateToolCallBlockDtoMessagesItem", - "CreateToolCallBlockDtoTool", "CreateToolTemplateDto", "CreateToolTemplateDtoDetails", + "CreateToolTemplateDtoDetails_ApiRequest", + "CreateToolTemplateDtoDetails_Bash", + "CreateToolTemplateDtoDetails_Code", + "CreateToolTemplateDtoDetails_Computer", + "CreateToolTemplateDtoDetails_Dtmf", + "CreateToolTemplateDtoDetails_EndCall", + "CreateToolTemplateDtoDetails_Function", + "CreateToolTemplateDtoDetails_GohighlevelCalendarAvailabilityCheck", + "CreateToolTemplateDtoDetails_GohighlevelCalendarEventCreate", + "CreateToolTemplateDtoDetails_GohighlevelContactCreate", + "CreateToolTemplateDtoDetails_GohighlevelContactGet", + "CreateToolTemplateDtoDetails_GoogleCalendarAvailabilityCheck", + "CreateToolTemplateDtoDetails_GoogleCalendarEventCreate", + "CreateToolTemplateDtoDetails_GoogleSheetsRowAppend", + "CreateToolTemplateDtoDetails_Handoff", + "CreateToolTemplateDtoDetails_Mcp", + "CreateToolTemplateDtoDetails_Query", + "CreateToolTemplateDtoDetails_SipRequest", + "CreateToolTemplateDtoDetails_SlackMessageSend", + "CreateToolTemplateDtoDetails_Sms", + "CreateToolTemplateDtoDetails_TextEditor", + "CreateToolTemplateDtoDetails_TransferCall", + "CreateToolTemplateDtoDetails_Voicemail", "CreateToolTemplateDtoProvider", "CreateToolTemplateDtoProviderDetails", + "CreateToolTemplateDtoProviderDetails_Function", + "CreateToolTemplateDtoProviderDetails_Ghl", + "CreateToolTemplateDtoProviderDetails_GohighlevelCalendarAvailabilityCheck", + "CreateToolTemplateDtoProviderDetails_GohighlevelCalendarEventCreate", + "CreateToolTemplateDtoProviderDetails_GohighlevelContactCreate", + "CreateToolTemplateDtoProviderDetails_GohighlevelContactGet", + "CreateToolTemplateDtoProviderDetails_GoogleCalendarEventCreate", + "CreateToolTemplateDtoProviderDetails_GoogleSheetsRowAppend", + "CreateToolTemplateDtoProviderDetails_Make", + "CreateToolTemplateDtoType", "CreateToolTemplateDtoVisibility", + "CreateToolsRequest", + "CreateToolsRequest_ApiRequest", + "CreateToolsRequest_Bash", + "CreateToolsRequest_Computer", + "CreateToolsRequest_Dtmf", + "CreateToolsRequest_EndCall", + "CreateToolsRequest_Function", + "CreateToolsRequest_GohighlevelCalendarAvailabilityCheck", + "CreateToolsRequest_GohighlevelCalendarEventCreate", + "CreateToolsRequest_GohighlevelContactCreate", + "CreateToolsRequest_GohighlevelContactGet", + "CreateToolsRequest_GoogleCalendarAvailabilityCheck", + "CreateToolsRequest_GoogleCalendarEventCreate", + "CreateToolsRequest_GoogleSheetsRowAppend", + "CreateToolsRequest_Handoff", + "CreateToolsRequest_Mcp", + "CreateToolsRequest_Query", + "CreateToolsRequest_SipRequest", + "CreateToolsRequest_SlackMessageSend", + "CreateToolsRequest_Sms", + "CreateToolsRequest_TextEditor", + "CreateToolsRequest_TransferCall", + "CreateToolsRequest_Voicemail", + "CreateToolsResponse", + "CreateToolsResponse_ApiRequest", + "CreateToolsResponse_Bash", + "CreateToolsResponse_Code", + "CreateToolsResponse_Computer", + "CreateToolsResponse_Dtmf", + "CreateToolsResponse_EndCall", + "CreateToolsResponse_Function", + "CreateToolsResponse_GohighlevelCalendarAvailabilityCheck", + "CreateToolsResponse_GohighlevelCalendarEventCreate", + "CreateToolsResponse_GohighlevelContactCreate", + "CreateToolsResponse_GohighlevelContactGet", + "CreateToolsResponse_GoogleCalendarAvailabilityCheck", + "CreateToolsResponse_GoogleCalendarEventCreate", + "CreateToolsResponse_GoogleSheetsRowAppend", + "CreateToolsResponse_Handoff", + "CreateToolsResponse_Mcp", + "CreateToolsResponse_Query", + "CreateToolsResponse_SipRequest", + "CreateToolsResponse_SlackMessageSend", + "CreateToolsResponse_Sms", + "CreateToolsResponse_TextEditor", + "CreateToolsResponse_TransferCall", + "CreateToolsResponse_Voicemail", "CreateTransferCallToolDto", "CreateTransferCallToolDtoDestinationsItem", + "CreateTransferCallToolDtoDestinationsItem_Assistant", + "CreateTransferCallToolDtoDestinationsItem_Number", + "CreateTransferCallToolDtoDestinationsItem_Sip", "CreateTransferCallToolDtoMessagesItem", + "CreateTransferCallToolDtoMessagesItem_RequestComplete", + "CreateTransferCallToolDtoMessagesItem_RequestFailed", + "CreateTransferCallToolDtoMessagesItem_RequestResponseDelayed", + "CreateTransferCallToolDtoMessagesItem_RequestStart", + "CreateTrieveCredentialDto", + "CreateTrieveKnowledgeBaseDto", + "CreateTrieveKnowledgeBaseDtoProvider", "CreateTwilioCredentialDto", "CreateTwilioPhoneNumberDto", "CreateTwilioPhoneNumberDtoFallbackDestination", + "CreateTwilioPhoneNumberDtoFallbackDestination_Number", + "CreateTwilioPhoneNumberDtoFallbackDestination_Sip", + "CreateTwilioPhoneNumberDtoHooksItem", + "CreateTwilioPhoneNumberDtoHooksItem_CallEnding", + "CreateTwilioPhoneNumberDtoHooksItem_CallRinging", "CreateVapiPhoneNumberDto", "CreateVapiPhoneNumberDtoFallbackDestination", + "CreateVapiPhoneNumberDtoFallbackDestination_Number", + "CreateVapiPhoneNumberDtoFallbackDestination_Sip", + "CreateVapiPhoneNumberDtoHooksItem", + "CreateVapiPhoneNumberDtoHooksItem_CallEnding", + "CreateVapiPhoneNumberDtoHooksItem_CallRinging", "CreateVoicemailToolDto", "CreateVoicemailToolDtoMessagesItem", + "CreateVoicemailToolDtoMessagesItem_RequestComplete", + "CreateVoicemailToolDtoMessagesItem_RequestFailed", + "CreateVoicemailToolDtoMessagesItem_RequestResponseDelayed", + "CreateVoicemailToolDtoMessagesItem_RequestStart", "CreateVonageCredentialDto", "CreateVonagePhoneNumberDto", "CreateVonagePhoneNumberDtoFallbackDestination", + "CreateVonagePhoneNumberDtoFallbackDestination_Number", + "CreateVonagePhoneNumberDtoFallbackDestination_Sip", + "CreateVonagePhoneNumberDtoHooksItem", + "CreateVonagePhoneNumberDtoHooksItem_CallEnding", + "CreateVonagePhoneNumberDtoHooksItem_CallRinging", "CreateWebCallDto", - "CreateWorkflowBlockDto", - "CreateWorkflowBlockDtoMessagesItem", - "CreateWorkflowBlockDtoStepsItem", + "CreateWebChatDto", + "CreateWebChatDtoInput", + "CreateWebChatDtoInputOneItem", + "CreateWebCustomerDto", + "CreateWebhookCredentialDto", + "CreateWebhookCredentialDtoAuthenticationPlan", + "CreateWebhookCredentialDtoAuthenticationPlan_Bearer", + "CreateWebhookCredentialDtoAuthenticationPlan_Hmac", + "CreateWebhookCredentialDtoAuthenticationPlan_Oauth2", + "CreateWellSaidCredentialDto", + "CreateWorkflowDto", + "CreateWorkflowDtoBackgroundSound", + "CreateWorkflowDtoBackgroundSoundZero", + "CreateWorkflowDtoCredentialsItem", + "CreateWorkflowDtoCredentialsItem_11Labs", + "CreateWorkflowDtoCredentialsItem_Anthropic", + "CreateWorkflowDtoCredentialsItem_AnthropicBedrock", + "CreateWorkflowDtoCredentialsItem_Anyscale", + "CreateWorkflowDtoCredentialsItem_AssemblyAi", + "CreateWorkflowDtoCredentialsItem_Azure", + "CreateWorkflowDtoCredentialsItem_AzureOpenai", + "CreateWorkflowDtoCredentialsItem_ByoSipTrunk", + "CreateWorkflowDtoCredentialsItem_Cartesia", + "CreateWorkflowDtoCredentialsItem_Cerebras", + "CreateWorkflowDtoCredentialsItem_Cloudflare", + "CreateWorkflowDtoCredentialsItem_CustomCredential", + "CreateWorkflowDtoCredentialsItem_CustomLlm", + "CreateWorkflowDtoCredentialsItem_DeepSeek", + "CreateWorkflowDtoCredentialsItem_Deepgram", + "CreateWorkflowDtoCredentialsItem_Deepinfra", + "CreateWorkflowDtoCredentialsItem_Email", + "CreateWorkflowDtoCredentialsItem_Gcp", + "CreateWorkflowDtoCredentialsItem_GhlOauth2Authorization", + "CreateWorkflowDtoCredentialsItem_Gladia", + "CreateWorkflowDtoCredentialsItem_Gohighlevel", + "CreateWorkflowDtoCredentialsItem_Google", + "CreateWorkflowDtoCredentialsItem_GoogleCalendarOauth2Authorization", + "CreateWorkflowDtoCredentialsItem_GoogleCalendarOauth2Client", + "CreateWorkflowDtoCredentialsItem_GoogleSheetsOauth2Authorization", + "CreateWorkflowDtoCredentialsItem_Groq", + "CreateWorkflowDtoCredentialsItem_Hume", + "CreateWorkflowDtoCredentialsItem_InflectionAi", + "CreateWorkflowDtoCredentialsItem_Inworld", + "CreateWorkflowDtoCredentialsItem_Langfuse", + "CreateWorkflowDtoCredentialsItem_Lmnt", + "CreateWorkflowDtoCredentialsItem_Make", + "CreateWorkflowDtoCredentialsItem_Minimax", + "CreateWorkflowDtoCredentialsItem_Mistral", + "CreateWorkflowDtoCredentialsItem_Neuphonic", + "CreateWorkflowDtoCredentialsItem_Openai", + "CreateWorkflowDtoCredentialsItem_Openrouter", + "CreateWorkflowDtoCredentialsItem_PerplexityAi", + "CreateWorkflowDtoCredentialsItem_Playht", + "CreateWorkflowDtoCredentialsItem_RimeAi", + "CreateWorkflowDtoCredentialsItem_Runpod", + "CreateWorkflowDtoCredentialsItem_S3", + "CreateWorkflowDtoCredentialsItem_SlackOauth2Authorization", + "CreateWorkflowDtoCredentialsItem_SlackWebhook", + "CreateWorkflowDtoCredentialsItem_SmallestAi", + "CreateWorkflowDtoCredentialsItem_Soniox", + "CreateWorkflowDtoCredentialsItem_Speechmatics", + "CreateWorkflowDtoCredentialsItem_Supabase", + "CreateWorkflowDtoCredentialsItem_Tavus", + "CreateWorkflowDtoCredentialsItem_TogetherAi", + "CreateWorkflowDtoCredentialsItem_Trieve", + "CreateWorkflowDtoCredentialsItem_Twilio", + "CreateWorkflowDtoCredentialsItem_Vonage", + "CreateWorkflowDtoCredentialsItem_Webhook", + "CreateWorkflowDtoCredentialsItem_Wellsaid", + "CreateWorkflowDtoCredentialsItem_Xai", + "CreateWorkflowDtoHooksItem", + "CreateWorkflowDtoModel", + "CreateWorkflowDtoModel_Anthropic", + "CreateWorkflowDtoModel_AnthropicBedrock", + "CreateWorkflowDtoModel_CustomLlm", + "CreateWorkflowDtoModel_Google", + "CreateWorkflowDtoModel_Openai", + "CreateWorkflowDtoNodesItem", + "CreateWorkflowDtoNodesItem_Conversation", + "CreateWorkflowDtoNodesItem_Tool", + "CreateWorkflowDtoTranscriber", + "CreateWorkflowDtoTranscriber_11Labs", + "CreateWorkflowDtoTranscriber_AssemblyAi", + "CreateWorkflowDtoTranscriber_Azure", + "CreateWorkflowDtoTranscriber_Cartesia", + "CreateWorkflowDtoTranscriber_CustomTranscriber", + "CreateWorkflowDtoTranscriber_Deepgram", + "CreateWorkflowDtoTranscriber_Gladia", + "CreateWorkflowDtoTranscriber_Google", + "CreateWorkflowDtoTranscriber_Openai", + "CreateWorkflowDtoTranscriber_Soniox", + "CreateWorkflowDtoTranscriber_Speechmatics", + "CreateWorkflowDtoTranscriber_Talkscriber", + "CreateWorkflowDtoVoice", + "CreateWorkflowDtoVoice_11Labs", + "CreateWorkflowDtoVoice_Azure", + "CreateWorkflowDtoVoice_Cartesia", + "CreateWorkflowDtoVoice_CustomVoice", + "CreateWorkflowDtoVoice_Deepgram", + "CreateWorkflowDtoVoice_Hume", + "CreateWorkflowDtoVoice_Inworld", + "CreateWorkflowDtoVoice_Lmnt", + "CreateWorkflowDtoVoice_Minimax", + "CreateWorkflowDtoVoice_Neuphonic", + "CreateWorkflowDtoVoice_Openai", + "CreateWorkflowDtoVoice_Playht", + "CreateWorkflowDtoVoice_RimeAi", + "CreateWorkflowDtoVoice_Sesame", + "CreateWorkflowDtoVoice_SmallestAi", + "CreateWorkflowDtoVoice_Tavus", + "CreateWorkflowDtoVoice_Vapi", + "CreateWorkflowDtoVoice_Wellsaid", + "CreateWorkflowDtoVoicemailDetection", + "CreateWorkflowDtoVoicemailDetectionZero", + "CreateXAiCredentialDto", + "CredentialActionRequest", + "CredentialEndUser", + "CredentialSessionError", + "CredentialSessionResponse", + "CredentialWebhookDto", + "CredentialWebhookDtoAuthMode", + "CredentialWebhookDtoOperation", + "CredentialWebhookDtoType", + "CustomCredential", + "CustomCredentialAuthenticationPlan", + "CustomCredentialAuthenticationPlan_Bearer", + "CustomCredentialAuthenticationPlan_Hmac", + "CustomCredentialAuthenticationPlan_Oauth2", + "CustomCredentialEncryptionPlan", + "CustomCredentialEncryptionPlan_PublicKey", + "CustomCredentialProvider", + "CustomEndpointingModelSmartEndpointingPlan", + "CustomEndpointingModelSmartEndpointingPlanProvider", + "CustomKnowledgeBase", + "CustomKnowledgeBaseProvider", "CustomLlmCredential", + "CustomLlmCredentialProvider", "CustomLlmModel", "CustomLlmModelMetadataSendMode", "CustomLlmModelToolsItem", + "CustomLlmModelToolsItem_ApiRequest", + "CustomLlmModelToolsItem_Bash", + "CustomLlmModelToolsItem_Code", + "CustomLlmModelToolsItem_Computer", + "CustomLlmModelToolsItem_Dtmf", + "CustomLlmModelToolsItem_EndCall", + "CustomLlmModelToolsItem_Function", + "CustomLlmModelToolsItem_GohighlevelCalendarAvailabilityCheck", + "CustomLlmModelToolsItem_GohighlevelCalendarEventCreate", + "CustomLlmModelToolsItem_GohighlevelContactCreate", + "CustomLlmModelToolsItem_GohighlevelContactGet", + "CustomLlmModelToolsItem_GoogleCalendarAvailabilityCheck", + "CustomLlmModelToolsItem_GoogleCalendarEventCreate", + "CustomLlmModelToolsItem_GoogleSheetsRowAppend", + "CustomLlmModelToolsItem_Handoff", + "CustomLlmModelToolsItem_Mcp", + "CustomLlmModelToolsItem_Query", + "CustomLlmModelToolsItem_SipRequest", + "CustomLlmModelToolsItem_SlackMessageSend", + "CustomLlmModelToolsItem_Sms", + "CustomLlmModelToolsItem_TextEditor", + "CustomLlmModelToolsItem_TransferCall", + "CustomLlmModelToolsItem_Voicemail", + "CustomMessage", + "CustomMessageType", + "CustomTranscriber", + "CustomVoice", + "CustomerCustomEndpointingRule", + "CustomerSpeechTimeoutOptions", "DeepInfraCredential", + "DeepInfraCredentialProvider", "DeepInfraModel", "DeepInfraModelToolsItem", + "DeepInfraModelToolsItem_ApiRequest", + "DeepInfraModelToolsItem_Bash", + "DeepInfraModelToolsItem_Code", + "DeepInfraModelToolsItem_Computer", + "DeepInfraModelToolsItem_Dtmf", + "DeepInfraModelToolsItem_EndCall", + "DeepInfraModelToolsItem_Function", + "DeepInfraModelToolsItem_GohighlevelCalendarAvailabilityCheck", + "DeepInfraModelToolsItem_GohighlevelCalendarEventCreate", + "DeepInfraModelToolsItem_GohighlevelContactCreate", + "DeepInfraModelToolsItem_GohighlevelContactGet", + "DeepInfraModelToolsItem_GoogleCalendarAvailabilityCheck", + "DeepInfraModelToolsItem_GoogleCalendarEventCreate", + "DeepInfraModelToolsItem_GoogleSheetsRowAppend", + "DeepInfraModelToolsItem_Handoff", + "DeepInfraModelToolsItem_Mcp", + "DeepInfraModelToolsItem_Query", + "DeepInfraModelToolsItem_SipRequest", + "DeepInfraModelToolsItem_SlackMessageSend", + "DeepInfraModelToolsItem_Sms", + "DeepInfraModelToolsItem_TextEditor", + "DeepInfraModelToolsItem_TransferCall", + "DeepInfraModelToolsItem_Voicemail", + "DeepSeekCredential", + "DeepSeekCredentialProvider", + "DeepSeekModel", + "DeepSeekModelModel", + "DeepSeekModelToolsItem", + "DeepSeekModelToolsItem_ApiRequest", + "DeepSeekModelToolsItem_Bash", + "DeepSeekModelToolsItem_Code", + "DeepSeekModelToolsItem_Computer", + "DeepSeekModelToolsItem_Dtmf", + "DeepSeekModelToolsItem_EndCall", + "DeepSeekModelToolsItem_Function", + "DeepSeekModelToolsItem_GohighlevelCalendarAvailabilityCheck", + "DeepSeekModelToolsItem_GohighlevelCalendarEventCreate", + "DeepSeekModelToolsItem_GohighlevelContactCreate", + "DeepSeekModelToolsItem_GohighlevelContactGet", + "DeepSeekModelToolsItem_GoogleCalendarAvailabilityCheck", + "DeepSeekModelToolsItem_GoogleCalendarEventCreate", + "DeepSeekModelToolsItem_GoogleSheetsRowAppend", + "DeepSeekModelToolsItem_Handoff", + "DeepSeekModelToolsItem_Mcp", + "DeepSeekModelToolsItem_Query", + "DeepSeekModelToolsItem_SipRequest", + "DeepSeekModelToolsItem_SlackMessageSend", + "DeepSeekModelToolsItem_Sms", + "DeepSeekModelToolsItem_TextEditor", + "DeepSeekModelToolsItem_TransferCall", + "DeepSeekModelToolsItem_Voicemail", "DeepgramCredential", + "DeepgramCredentialProvider", "DeepgramTranscriber", "DeepgramTranscriberLanguage", "DeepgramTranscriberModel", "DeepgramVoice", "DeepgramVoiceId", - "DeepgramVoiceIdEnum", + "DeepgramVoiceModel", + "DefaultAioHttpClient", + "DefaultAsyncHttpxClient", + "DeletePhoneNumbersResponse", + "DeletePhoneNumbersResponse_ByoPhoneNumber", + "DeletePhoneNumbersResponse_Telnyx", + "DeletePhoneNumbersResponse_Twilio", + "DeletePhoneNumbersResponse_Vapi", + "DeletePhoneNumbersResponse_Vonage", + "DeleteToolsResponse", + "DeleteToolsResponse_ApiRequest", + "DeleteToolsResponse_Bash", + "DeleteToolsResponse_Code", + "DeleteToolsResponse_Computer", + "DeleteToolsResponse_Dtmf", + "DeleteToolsResponse_EndCall", + "DeleteToolsResponse_Function", + "DeleteToolsResponse_GohighlevelCalendarAvailabilityCheck", + "DeleteToolsResponse_GohighlevelCalendarEventCreate", + "DeleteToolsResponse_GohighlevelContactCreate", + "DeleteToolsResponse_GohighlevelContactGet", + "DeleteToolsResponse_GoogleCalendarAvailabilityCheck", + "DeleteToolsResponse_GoogleCalendarEventCreate", + "DeleteToolsResponse_GoogleSheetsRowAppend", + "DeleteToolsResponse_Handoff", + "DeleteToolsResponse_Mcp", + "DeleteToolsResponse_Query", + "DeleteToolsResponse_SipRequest", + "DeleteToolsResponse_SlackMessageSend", + "DeleteToolsResponse_Sms", + "DeleteToolsResponse_TextEditor", + "DeleteToolsResponse_TransferCall", + "DeleteToolsResponse_Voicemail", + "DeveloperMessage", + "DeveloperMessageRole", + "DialPlanEntry", "DtmfTool", "DtmfToolMessagesItem", + "DtmfToolMessagesItem_RequestComplete", + "DtmfToolMessagesItem_RequestFailed", + "DtmfToolMessagesItem_RequestResponseDelayed", + "DtmfToolMessagesItem_RequestStart", + "Edge", "ElevenLabsCredential", + "ElevenLabsPronunciationDictionary", + "ElevenLabsPronunciationDictionaryLocator", + "ElevenLabsPronunciationDictionaryPermissionOnResource", + "ElevenLabsTranscriber", + "ElevenLabsTranscriberLanguage", + "ElevenLabsTranscriberModel", "ElevenLabsVoice", "ElevenLabsVoiceId", "ElevenLabsVoiceIdEnum", "ElevenLabsVoiceModel", + "EmailCredential", + "EmailCredentialProvider", "EndCallTool", "EndCallToolMessagesItem", - "Error", + "EndCallToolMessagesItem_RequestComplete", + "EndCallToolMessagesItem_RequestFailed", + "EndCallToolMessagesItem_RequestResponseDelayed", + "EndCallToolMessagesItem_RequestStart", + "EndpointedSpeechLowConfidenceOptions", + "Eval", + "EvalAnthropicModel", + "EvalAnthropicModelModel", + "EvalControllerGetPaginatedRequestSortOrder", + "EvalControllerGetRunsPaginatedRequestSortOrder", + "EvalCustomModel", + "EvalGoogleModel", + "EvalGoogleModelModel", + "EvalGroqModel", + "EvalGroqModelModel", + "EvalGroqModelProvider", + "EvalMessagesItem", + "EvalModelListOptions", + "EvalModelListOptionsProvider", + "EvalOpenAiModel", + "EvalOpenAiModelModel", + "EvalPaginatedResponse", + "EvalRun", + "EvalRunEndedReason", + "EvalRunPaginatedResponse", + "EvalRunResult", + "EvalRunResultMessagesItem", + "EvalRunResultMessagesItem_Assistant", + "EvalRunResultMessagesItem_System", + "EvalRunResultMessagesItem_Tool", + "EvalRunResultMessagesItem_User", + "EvalRunResultStatus", + "EvalRunStatus", + "EvalRunTarget", + "EvalRunTargetAssistant", + "EvalRunTargetSquad", + "EvalRunTarget_Assistant", + "EvalRunTarget_Squad", + "EvalRunType", + "EvalType", + "EvalUserEditable", + "EvalUserEditableMessagesItem", + "EvalUserEditableType", + "EvaluationPlanItem", + "EvaluationPlanItemComparator", + "EvaluationPlanItemValue", + "EventsTableBooleanCondition", + "EventsTableBooleanConditionOperator", + "EventsTableNumberCondition", + "EventsTableNumberConditionOperator", + "EventsTableStringCondition", + "EventsTableStringConditionOperator", "ExactReplacement", + "ExportChatDto", + "ExportChatDtoColumns", + "ExportChatDtoFormat", + "ExportChatDtoSortOrder", + "ExportSessionDto", + "ExportSessionDtoColumns", + "ExportSessionDtoFormat", + "ExportSessionDtoSortOrder", + "FailedEdgeCondition", + "FallbackAssemblyAiTranscriber", + "FallbackAssemblyAiTranscriberLanguage", + "FallbackAssemblyAiTranscriberSpeechModel", + "FallbackAzureSpeechTranscriber", + "FallbackAzureSpeechTranscriberLanguage", + "FallbackAzureSpeechTranscriberSegmentationStrategy", + "FallbackAzureVoice", + "FallbackAzureVoiceId", + "FallbackAzureVoiceIdZero", + "FallbackCartesiaTranscriber", + "FallbackCartesiaTranscriberLanguage", + "FallbackCartesiaTranscriberModel", + "FallbackCartesiaVoice", + "FallbackCartesiaVoiceLanguage", + "FallbackCartesiaVoiceModel", + "FallbackCustomTranscriber", + "FallbackCustomVoice", + "FallbackDeepgramTranscriber", + "FallbackDeepgramTranscriberLanguage", + "FallbackDeepgramTranscriberModel", + "FallbackDeepgramVoice", + "FallbackDeepgramVoiceId", + "FallbackDeepgramVoiceModel", + "FallbackElevenLabsTranscriber", + "FallbackElevenLabsTranscriberLanguage", + "FallbackElevenLabsTranscriberModel", + "FallbackElevenLabsVoice", + "FallbackElevenLabsVoiceId", + "FallbackElevenLabsVoiceIdEnum", + "FallbackElevenLabsVoiceModel", + "FallbackGladiaTranscriber", + "FallbackGladiaTranscriberLanguage", + "FallbackGladiaTranscriberLanguageBehaviour", + "FallbackGladiaTranscriberLanguages", + "FallbackGladiaTranscriberModel", + "FallbackGladiaTranscriberRegion", + "FallbackGoogleTranscriber", + "FallbackGoogleTranscriberLanguage", + "FallbackGoogleTranscriberModel", + "FallbackHumeVoice", + "FallbackHumeVoiceModel", + "FallbackInworldVoice", + "FallbackInworldVoiceLanguageCode", + "FallbackInworldVoiceModel", + "FallbackInworldVoiceVoiceId", + "FallbackLmntVoice", + "FallbackLmntVoiceId", + "FallbackLmntVoiceIdEnum", + "FallbackLmntVoiceLanguage", + "FallbackMinimaxVoice", + "FallbackMinimaxVoiceLanguageBoost", + "FallbackMinimaxVoiceModel", + "FallbackMinimaxVoiceProvider", + "FallbackMinimaxVoiceRegion", + "FallbackMinimaxVoiceSubtitleType", + "FallbackNeetsVoice", + "FallbackNeuphonicVoice", + "FallbackNeuphonicVoiceModel", + "FallbackOpenAiTranscriber", + "FallbackOpenAiTranscriberLanguage", + "FallbackOpenAiTranscriberModel", + "FallbackOpenAiVoice", + "FallbackOpenAiVoiceId", + "FallbackOpenAiVoiceIdEnum", + "FallbackOpenAiVoiceModel", + "FallbackPlan", + "FallbackPlanVoicesItem", + "FallbackPlanVoicesItem_11Labs", + "FallbackPlanVoicesItem_Azure", + "FallbackPlanVoicesItem_Cartesia", + "FallbackPlanVoicesItem_CustomVoice", + "FallbackPlanVoicesItem_Deepgram", + "FallbackPlanVoicesItem_Hume", + "FallbackPlanVoicesItem_Inworld", + "FallbackPlanVoicesItem_Lmnt", + "FallbackPlanVoicesItem_Neuphonic", + "FallbackPlanVoicesItem_Openai", + "FallbackPlanVoicesItem_Playht", + "FallbackPlanVoicesItem_RimeAi", + "FallbackPlanVoicesItem_Sesame", + "FallbackPlanVoicesItem_SmallestAi", + "FallbackPlanVoicesItem_Tavus", + "FallbackPlanVoicesItem_Vapi", + "FallbackPlanVoicesItem_Wellsaid", + "FallbackPlayHtVoice", + "FallbackPlayHtVoiceEmotion", + "FallbackPlayHtVoiceId", + "FallbackPlayHtVoiceIdEnum", + "FallbackPlayHtVoiceLanguage", + "FallbackPlayHtVoiceModel", + "FallbackRimeAiVoice", + "FallbackRimeAiVoiceId", + "FallbackRimeAiVoiceIdEnum", + "FallbackRimeAiVoiceLanguage", + "FallbackRimeAiVoiceModel", + "FallbackSesameVoice", + "FallbackSesameVoiceModel", + "FallbackSmallestAiVoice", + "FallbackSmallestAiVoiceId", + "FallbackSmallestAiVoiceIdEnum", + "FallbackSmallestAiVoiceModel", + "FallbackSonioxTranscriber", + "FallbackSonioxTranscriberLanguage", + "FallbackSonioxTranscriberModel", + "FallbackSpeechmaticsTranscriber", + "FallbackSpeechmaticsTranscriberLanguage", + "FallbackSpeechmaticsTranscriberModel", + "FallbackSpeechmaticsTranscriberNumeralStyle", + "FallbackSpeechmaticsTranscriberOperatingPoint", + "FallbackSpeechmaticsTranscriberRegion", + "FallbackTalkscriberTranscriber", + "FallbackTalkscriberTranscriberLanguage", + "FallbackTalkscriberTranscriberModel", + "FallbackTavusVoice", + "FallbackTavusVoiceVoiceId", + "FallbackTavusVoiceVoiceIdZero", + "FallbackTranscriberPlan", + "FallbackTranscriberPlanTranscribersItem", + "FallbackTranscriberPlanTranscribersItem_11Labs", + "FallbackTranscriberPlanTranscribersItem_AssemblyAi", + "FallbackTranscriberPlanTranscribersItem_Azure", + "FallbackTranscriberPlanTranscribersItem_Cartesia", + "FallbackTranscriberPlanTranscribersItem_CustomTranscriber", + "FallbackTranscriberPlanTranscribersItem_Deepgram", + "FallbackTranscriberPlanTranscribersItem_Gladia", + "FallbackTranscriberPlanTranscribersItem_Google", + "FallbackTranscriberPlanTranscribersItem_Openai", + "FallbackTranscriberPlanTranscribersItem_Soniox", + "FallbackTranscriberPlanTranscribersItem_Speechmatics", + "FallbackTranscriberPlanTranscribersItem_Talkscriber", + "FallbackVapiVoice", + "FallbackVapiVoiceVoiceId", + "FallbackWellSaidVoice", + "FallbackWellSaidVoiceModel", "File", + "FileObject", "FileStatus", + "FilterDateTypeColumnOnCallTable", + "FilterDateTypeColumnOnCallTableColumn", + "FilterDateTypeColumnOnCallTableOperator", + "FilterNumberArrayTypeColumnOnCallTable", + "FilterNumberArrayTypeColumnOnCallTableColumn", + "FilterNumberArrayTypeColumnOnCallTableOperator", + "FilterNumberTypeColumnOnCallTable", + "FilterNumberTypeColumnOnCallTableColumn", + "FilterNumberTypeColumnOnCallTableOperator", + "FilterStringArrayTypeColumnOnCallTable", + "FilterStringArrayTypeColumnOnCallTableColumn", + "FilterStringArrayTypeColumnOnCallTableOperator", + "FilterStringTypeColumnOnCallTable", + "FilterStringTypeColumnOnCallTableColumn", + "FilterStringTypeColumnOnCallTableOperator", + "FilterStructuredOutputColumnOnCallTable", + "FilterStructuredOutputColumnOnCallTableColumn", + "FilterStructuredOutputColumnOnCallTableOperator", "FormatPlan", + "FormatPlanFormattersEnabledItem", "FormatPlanReplacementsItem", + "FormatPlanReplacementsItem_Exact", + "FormatPlanReplacementsItem_Regex", + "FourierDenoisingPlan", + "FunctionCall", + "FunctionCallAssistantHookAction", + "FunctionCallHookAction", + "FunctionCallHookActionMessagesItem", + "FunctionCallHookActionMessagesItem_RequestComplete", + "FunctionCallHookActionMessagesItem_RequestFailed", + "FunctionCallHookActionMessagesItem_RequestResponseDelayed", + "FunctionCallHookActionMessagesItem_RequestStart", + "FunctionCallHookActionType", "FunctionTool", "FunctionToolMessagesItem", + "FunctionToolMessagesItem_RequestComplete", + "FunctionToolMessagesItem_RequestFailed", + "FunctionToolMessagesItem_RequestResponseDelayed", + "FunctionToolMessagesItem_RequestStart", "FunctionToolProviderDetails", "FunctionToolWithToolCall", "FunctionToolWithToolCallMessagesItem", + "FunctionToolWithToolCallMessagesItem_RequestComplete", + "FunctionToolWithToolCallMessagesItem_RequestFailed", + "FunctionToolWithToolCallMessagesItem_RequestResponseDelayed", + "FunctionToolWithToolCallMessagesItem_RequestStart", "GcpCredential", + "GcpCredentialProvider", "GcpKey", + "GeminiMultimodalLivePrebuiltVoiceConfig", + "GeminiMultimodalLivePrebuiltVoiceConfigVoiceName", + "GeminiMultimodalLiveSpeechConfig", + "GeminiMultimodalLiveVoiceConfig", + "GenerateScenariosDto", + "GenerateScenariosResponse", + "GeneratedScenario", + "GeneratedScenarioCategory", + "GetChatPaginatedDto", + "GetChatPaginatedDtoSortOrder", + "GetEvalPaginatedDto", + "GetEvalPaginatedDtoSortOrder", + "GetEvalRunPaginatedDto", + "GetEvalRunPaginatedDtoSortOrder", + "GetPhoneNumbersResponse", + "GetPhoneNumbersResponse_ByoPhoneNumber", + "GetPhoneNumbersResponse_Telnyx", + "GetPhoneNumbersResponse_Twilio", + "GetPhoneNumbersResponse_Vapi", + "GetPhoneNumbersResponse_Vonage", + "GetSessionPaginatedDto", + "GetSessionPaginatedDtoSortOrder", + "GetToolsResponse", + "GetToolsResponse_ApiRequest", + "GetToolsResponse_Bash", + "GetToolsResponse_Code", + "GetToolsResponse_Computer", + "GetToolsResponse_Dtmf", + "GetToolsResponse_EndCall", + "GetToolsResponse_Function", + "GetToolsResponse_GohighlevelCalendarAvailabilityCheck", + "GetToolsResponse_GohighlevelCalendarEventCreate", + "GetToolsResponse_GohighlevelContactCreate", + "GetToolsResponse_GohighlevelContactGet", + "GetToolsResponse_GoogleCalendarAvailabilityCheck", + "GetToolsResponse_GoogleCalendarEventCreate", + "GetToolsResponse_GoogleSheetsRowAppend", + "GetToolsResponse_Handoff", + "GetToolsResponse_Mcp", + "GetToolsResponse_Query", + "GetToolsResponse_SipRequest", + "GetToolsResponse_SlackMessageSend", + "GetToolsResponse_Sms", + "GetToolsResponse_TextEditor", + "GetToolsResponse_TransferCall", + "GetToolsResponse_Voicemail", "GhlTool", "GhlToolMessagesItem", + "GhlToolMessagesItem_RequestComplete", + "GhlToolMessagesItem_RequestFailed", + "GhlToolMessagesItem_RequestResponseDelayed", + "GhlToolMessagesItem_RequestStart", "GhlToolMetadata", "GhlToolProviderDetails", + "GhlToolType", "GhlToolWithToolCall", "GhlToolWithToolCallMessagesItem", + "GhlToolWithToolCallMessagesItem_RequestComplete", + "GhlToolWithToolCallMessagesItem_RequestFailed", + "GhlToolWithToolCallMessagesItem_RequestResponseDelayed", + "GhlToolWithToolCallMessagesItem_RequestStart", "GladiaCredential", + "GladiaCredentialProvider", + "GladiaCustomVocabularyConfigDto", + "GladiaCustomVocabularyConfigDtoVocabularyItem", "GladiaTranscriber", "GladiaTranscriberLanguage", "GladiaTranscriberLanguageBehaviour", + "GladiaTranscriberLanguages", "GladiaTranscriberModel", + "GladiaTranscriberRegion", + "GladiaVocabularyItemDto", + "GlobalNodePlan", + "GoHighLevelCalendarAvailabilityTool", + "GoHighLevelCalendarAvailabilityToolMessagesItem", + "GoHighLevelCalendarAvailabilityToolMessagesItem_RequestComplete", + "GoHighLevelCalendarAvailabilityToolMessagesItem_RequestFailed", + "GoHighLevelCalendarAvailabilityToolMessagesItem_RequestResponseDelayed", + "GoHighLevelCalendarAvailabilityToolMessagesItem_RequestStart", + "GoHighLevelCalendarAvailabilityToolProviderDetails", + "GoHighLevelCalendarAvailabilityToolWithToolCall", + "GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem", + "GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem_RequestComplete", + "GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem_RequestFailed", + "GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem_RequestResponseDelayed", + "GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem_RequestStart", + "GoHighLevelCalendarAvailabilityToolWithToolCallType", + "GoHighLevelCalendarEventCreateTool", + "GoHighLevelCalendarEventCreateToolMessagesItem", + "GoHighLevelCalendarEventCreateToolMessagesItem_RequestComplete", + "GoHighLevelCalendarEventCreateToolMessagesItem_RequestFailed", + "GoHighLevelCalendarEventCreateToolMessagesItem_RequestResponseDelayed", + "GoHighLevelCalendarEventCreateToolMessagesItem_RequestStart", + "GoHighLevelCalendarEventCreateToolProviderDetails", + "GoHighLevelCalendarEventCreateToolWithToolCall", + "GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem", + "GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem_RequestComplete", + "GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem_RequestFailed", + "GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem_RequestResponseDelayed", + "GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem_RequestStart", + "GoHighLevelCalendarEventCreateToolWithToolCallType", + "GoHighLevelContactCreateTool", + "GoHighLevelContactCreateToolMessagesItem", + "GoHighLevelContactCreateToolMessagesItem_RequestComplete", + "GoHighLevelContactCreateToolMessagesItem_RequestFailed", + "GoHighLevelContactCreateToolMessagesItem_RequestResponseDelayed", + "GoHighLevelContactCreateToolMessagesItem_RequestStart", + "GoHighLevelContactCreateToolProviderDetails", + "GoHighLevelContactCreateToolWithToolCall", + "GoHighLevelContactCreateToolWithToolCallMessagesItem", + "GoHighLevelContactCreateToolWithToolCallMessagesItem_RequestComplete", + "GoHighLevelContactCreateToolWithToolCallMessagesItem_RequestFailed", + "GoHighLevelContactCreateToolWithToolCallMessagesItem_RequestResponseDelayed", + "GoHighLevelContactCreateToolWithToolCallMessagesItem_RequestStart", + "GoHighLevelContactCreateToolWithToolCallType", + "GoHighLevelContactGetTool", + "GoHighLevelContactGetToolMessagesItem", + "GoHighLevelContactGetToolMessagesItem_RequestComplete", + "GoHighLevelContactGetToolMessagesItem_RequestFailed", + "GoHighLevelContactGetToolMessagesItem_RequestResponseDelayed", + "GoHighLevelContactGetToolMessagesItem_RequestStart", + "GoHighLevelContactGetToolProviderDetails", + "GoHighLevelContactGetToolWithToolCall", + "GoHighLevelContactGetToolWithToolCallMessagesItem", + "GoHighLevelContactGetToolWithToolCallMessagesItem_RequestComplete", + "GoHighLevelContactGetToolWithToolCallMessagesItem_RequestFailed", + "GoHighLevelContactGetToolWithToolCallMessagesItem_RequestResponseDelayed", + "GoHighLevelContactGetToolWithToolCallMessagesItem_RequestStart", + "GoHighLevelContactGetToolWithToolCallType", "GoHighLevelCredential", + "GoHighLevelCredentialProvider", + "GoHighLevelMcpCredential", + "GoHighLevelMcpCredentialProvider", + "GoogleCalendarCheckAvailabilityTool", + "GoogleCalendarCheckAvailabilityToolMessagesItem", + "GoogleCalendarCheckAvailabilityToolMessagesItem_RequestComplete", + "GoogleCalendarCheckAvailabilityToolMessagesItem_RequestFailed", + "GoogleCalendarCheckAvailabilityToolMessagesItem_RequestResponseDelayed", + "GoogleCalendarCheckAvailabilityToolMessagesItem_RequestStart", + "GoogleCalendarCreateEventTool", + "GoogleCalendarCreateEventToolMessagesItem", + "GoogleCalendarCreateEventToolMessagesItem_RequestComplete", + "GoogleCalendarCreateEventToolMessagesItem_RequestFailed", + "GoogleCalendarCreateEventToolMessagesItem_RequestResponseDelayed", + "GoogleCalendarCreateEventToolMessagesItem_RequestStart", + "GoogleCalendarCreateEventToolProviderDetails", + "GoogleCalendarCreateEventToolWithToolCall", + "GoogleCalendarCreateEventToolWithToolCallMessagesItem", + "GoogleCalendarCreateEventToolWithToolCallMessagesItem_RequestComplete", + "GoogleCalendarCreateEventToolWithToolCallMessagesItem_RequestFailed", + "GoogleCalendarCreateEventToolWithToolCallMessagesItem_RequestResponseDelayed", + "GoogleCalendarCreateEventToolWithToolCallMessagesItem_RequestStart", + "GoogleCalendarOAuth2AuthorizationCredential", + "GoogleCalendarOAuth2AuthorizationCredentialProvider", + "GoogleCalendarOAuth2ClientCredential", + "GoogleCalendarOAuth2ClientCredentialProvider", + "GoogleCredential", + "GoogleCredentialProvider", + "GoogleModel", + "GoogleModelModel", + "GoogleModelToolsItem", + "GoogleModelToolsItem_ApiRequest", + "GoogleModelToolsItem_Bash", + "GoogleModelToolsItem_Code", + "GoogleModelToolsItem_Computer", + "GoogleModelToolsItem_Dtmf", + "GoogleModelToolsItem_EndCall", + "GoogleModelToolsItem_Function", + "GoogleModelToolsItem_GohighlevelCalendarAvailabilityCheck", + "GoogleModelToolsItem_GohighlevelCalendarEventCreate", + "GoogleModelToolsItem_GohighlevelContactCreate", + "GoogleModelToolsItem_GohighlevelContactGet", + "GoogleModelToolsItem_GoogleCalendarAvailabilityCheck", + "GoogleModelToolsItem_GoogleCalendarEventCreate", + "GoogleModelToolsItem_GoogleSheetsRowAppend", + "GoogleModelToolsItem_Handoff", + "GoogleModelToolsItem_Mcp", + "GoogleModelToolsItem_Query", + "GoogleModelToolsItem_SipRequest", + "GoogleModelToolsItem_SlackMessageSend", + "GoogleModelToolsItem_Sms", + "GoogleModelToolsItem_TextEditor", + "GoogleModelToolsItem_TransferCall", + "GoogleModelToolsItem_Voicemail", + "GoogleRealtimeConfig", + "GoogleSheetsOAuth2AuthorizationCredential", + "GoogleSheetsOAuth2AuthorizationCredentialProvider", + "GoogleSheetsRowAppendTool", + "GoogleSheetsRowAppendToolMessagesItem", + "GoogleSheetsRowAppendToolMessagesItem_RequestComplete", + "GoogleSheetsRowAppendToolMessagesItem_RequestFailed", + "GoogleSheetsRowAppendToolMessagesItem_RequestResponseDelayed", + "GoogleSheetsRowAppendToolMessagesItem_RequestStart", + "GoogleSheetsRowAppendToolProviderDetails", + "GoogleSheetsRowAppendToolWithToolCall", + "GoogleSheetsRowAppendToolWithToolCallMessagesItem", + "GoogleSheetsRowAppendToolWithToolCallMessagesItem_RequestComplete", + "GoogleSheetsRowAppendToolWithToolCallMessagesItem_RequestFailed", + "GoogleSheetsRowAppendToolWithToolCallMessagesItem_RequestResponseDelayed", + "GoogleSheetsRowAppendToolWithToolCallMessagesItem_RequestStart", + "GoogleSheetsRowAppendToolWithToolCallType", + "GoogleTranscriber", + "GoogleTranscriberLanguage", + "GoogleTranscriberModel", + "GoogleVoicemailDetectionPlan", + "GoogleVoicemailDetectionPlanProvider", + "GoogleVoicemailDetectionPlanType", "GroqCredential", + "GroqCredentialProvider", "GroqModel", "GroqModelModel", "GroqModelToolsItem", - "HandoffStep", - "HandoffStepBlock", + "GroqModelToolsItem_ApiRequest", + "GroqModelToolsItem_Bash", + "GroqModelToolsItem_Code", + "GroqModelToolsItem_Computer", + "GroqModelToolsItem_Dtmf", + "GroqModelToolsItem_EndCall", + "GroqModelToolsItem_Function", + "GroqModelToolsItem_GohighlevelCalendarAvailabilityCheck", + "GroqModelToolsItem_GohighlevelCalendarEventCreate", + "GroqModelToolsItem_GohighlevelContactCreate", + "GroqModelToolsItem_GohighlevelContactGet", + "GroqModelToolsItem_GoogleCalendarAvailabilityCheck", + "GroqModelToolsItem_GoogleCalendarEventCreate", + "GroqModelToolsItem_GoogleSheetsRowAppend", + "GroqModelToolsItem_Handoff", + "GroqModelToolsItem_Mcp", + "GroqModelToolsItem_Query", + "GroqModelToolsItem_SipRequest", + "GroqModelToolsItem_SlackMessageSend", + "GroqModelToolsItem_Sms", + "GroqModelToolsItem_TextEditor", + "GroqModelToolsItem_TransferCall", + "GroqModelToolsItem_Voicemail", + "GroupCondition", + "GroupConditionConditionsItem", + "GroupConditionConditionsItem_Group", + "GroupConditionConditionsItem_Liquid", + "GroupConditionConditionsItem_Regex", + "GroupConditionOperator", + "HandoffDestinationAssistant", + "HandoffDestinationAssistantContextEngineeringPlan", + "HandoffDestinationAssistantContextEngineeringPlan_All", + "HandoffDestinationAssistantContextEngineeringPlan_LastNMessages", + "HandoffDestinationAssistantContextEngineeringPlan_None", + "HandoffDestinationAssistantContextEngineeringPlan_UserAndAssistantMessages", + "HandoffDestinationAssistantType", + "HandoffDestinationDynamic", + "HandoffDestinationSquad", + "HandoffDestinationSquadContextEngineeringPlan", + "HandoffDestinationSquadContextEngineeringPlan_All", + "HandoffDestinationSquadContextEngineeringPlan_LastNMessages", + "HandoffDestinationSquadContextEngineeringPlan_None", + "HandoffDestinationSquadContextEngineeringPlan_UserAndAssistantMessages", + "HandoffTool", + "HandoffToolDestinationsItem", + "HandoffToolDestinationsItem_Assistant", + "HandoffToolDestinationsItem_Dynamic", + "HandoffToolDestinationsItem_Squad", + "HandoffToolMessagesItem", + "HandoffToolMessagesItem_RequestComplete", + "HandoffToolMessagesItem_RequestFailed", + "HandoffToolMessagesItem_RequestResponseDelayed", + "HandoffToolMessagesItem_RequestStart", + "HangupNode", + "HangupNodeType", + "HmacAuthenticationPlan", + "HmacAuthenticationPlanAlgorithm", + "HmacAuthenticationPlanSignatureEncoding", + "HumeCredential", + "HumeCredentialProvider", + "HumeVoice", + "HumeVoiceModel", "ImportTwilioPhoneNumberDto", "ImportTwilioPhoneNumberDtoFallbackDestination", + "ImportTwilioPhoneNumberDtoFallbackDestination_Number", + "ImportTwilioPhoneNumberDtoFallbackDestination_Sip", + "ImportTwilioPhoneNumberDtoHooksItem", + "ImportTwilioPhoneNumberDtoHooksItem_CallEnding", + "ImportTwilioPhoneNumberDtoHooksItem_CallRinging", "ImportVonagePhoneNumberDto", "ImportVonagePhoneNumberDtoFallbackDestination", + "ImportVonagePhoneNumberDtoFallbackDestination_Number", + "ImportVonagePhoneNumberDtoFallbackDestination_Sip", + "ImportVonagePhoneNumberDtoHooksItem", + "ImportVonagePhoneNumberDtoHooksItem_CallEnding", + "ImportVonagePhoneNumberDtoHooksItem_CallRinging", + "InflectionAiCredential", + "InflectionAiCredentialProvider", + "InflectionAiModel", + "InflectionAiModelModel", + "InflectionAiModelToolsItem", + "InflectionAiModelToolsItem_ApiRequest", + "InflectionAiModelToolsItem_Bash", + "InflectionAiModelToolsItem_Code", + "InflectionAiModelToolsItem_Computer", + "InflectionAiModelToolsItem_Dtmf", + "InflectionAiModelToolsItem_EndCall", + "InflectionAiModelToolsItem_Function", + "InflectionAiModelToolsItem_GohighlevelCalendarAvailabilityCheck", + "InflectionAiModelToolsItem_GohighlevelCalendarEventCreate", + "InflectionAiModelToolsItem_GohighlevelContactCreate", + "InflectionAiModelToolsItem_GohighlevelContactGet", + "InflectionAiModelToolsItem_GoogleCalendarAvailabilityCheck", + "InflectionAiModelToolsItem_GoogleCalendarEventCreate", + "InflectionAiModelToolsItem_GoogleSheetsRowAppend", + "InflectionAiModelToolsItem_Handoff", + "InflectionAiModelToolsItem_Mcp", + "InflectionAiModelToolsItem_Query", + "InflectionAiModelToolsItem_SipRequest", + "InflectionAiModelToolsItem_SlackMessageSend", + "InflectionAiModelToolsItem_Sms", + "InflectionAiModelToolsItem_TextEditor", + "InflectionAiModelToolsItem_TransferCall", + "InflectionAiModelToolsItem_Voicemail", + "Insight", + "InsightControllerCreateRequest", + "InsightControllerCreateRequest_Bar", + "InsightControllerCreateRequest_Line", + "InsightControllerCreateRequest_Pie", + "InsightControllerCreateRequest_Text", + "InsightControllerCreateResponse", + "InsightControllerCreateResponse_Bar", + "InsightControllerCreateResponse_Line", + "InsightControllerCreateResponse_Pie", + "InsightControllerCreateResponse_Text", + "InsightControllerFindAllRequestSortOrder", + "InsightControllerFindOneResponse", + "InsightControllerFindOneResponse_Bar", + "InsightControllerFindOneResponse_Line", + "InsightControllerFindOneResponse_Pie", + "InsightControllerFindOneResponse_Text", + "InsightControllerPreviewRequest", + "InsightControllerPreviewRequest_Bar", + "InsightControllerPreviewRequest_Line", + "InsightControllerPreviewRequest_Pie", + "InsightControllerPreviewRequest_Text", + "InsightControllerRemoveResponse", + "InsightControllerRemoveResponse_Bar", + "InsightControllerRemoveResponse_Line", + "InsightControllerRemoveResponse_Pie", + "InsightControllerRemoveResponse_Text", + "InsightControllerUpdateRequestBody", + "InsightControllerUpdateRequestBody_Bar", + "InsightControllerUpdateRequestBody_Line", + "InsightControllerUpdateRequestBody_Pie", + "InsightControllerUpdateRequestBody_Text", + "InsightControllerUpdateResponse", + "InsightControllerUpdateResponse_Bar", + "InsightControllerUpdateResponse_Line", + "InsightControllerUpdateResponse_Pie", + "InsightControllerUpdateResponse_Text", + "InsightFormula", + "InsightPaginatedResponse", + "InsightRunFormatPlan", + "InsightRunFormatPlanFormat", + "InsightRunResponse", + "InsightTimeRange", + "InsightTimeRangeWithStep", + "InsightTimeRangeWithStepStep", + "InsightType", "InviteUserDto", "InviteUserDtoRole", + "InvoicePlan", + "InworldCredential", + "InworldCredentialProvider", + "InworldVoice", + "InworldVoiceLanguageCode", + "InworldVoiceModel", + "InworldVoiceVoiceId", + "JsonQueryOnCallTableWithNumberTypeColumn", + "JsonQueryOnCallTableWithNumberTypeColumnColumn", + "JsonQueryOnCallTableWithNumberTypeColumnFiltersItem", + "JsonQueryOnCallTableWithNumberTypeColumnOperation", + "JsonQueryOnCallTableWithNumberTypeColumnTable", + "JsonQueryOnCallTableWithNumberTypeColumnType", + "JsonQueryOnCallTableWithStringTypeColumn", + "JsonQueryOnCallTableWithStringTypeColumnColumn", + "JsonQueryOnCallTableWithStringTypeColumnFiltersItem", + "JsonQueryOnCallTableWithStringTypeColumnOperation", + "JsonQueryOnCallTableWithStringTypeColumnTable", + "JsonQueryOnCallTableWithStringTypeColumnType", + "JsonQueryOnCallTableWithStructuredOutputColumn", + "JsonQueryOnCallTableWithStructuredOutputColumnColumn", + "JsonQueryOnCallTableWithStructuredOutputColumnFiltersItem", + "JsonQueryOnCallTableWithStructuredOutputColumnOperation", + "JsonQueryOnCallTableWithStructuredOutputColumnTable", + "JsonQueryOnCallTableWithStructuredOutputColumnType", + "JsonQueryOnEventsTable", + "JsonQueryOnEventsTableFiltersItem", + "JsonQueryOnEventsTableOn", + "JsonQueryOnEventsTableOperation", + "JsonQueryOnEventsTableTable", + "JsonQueryOnEventsTableType", "JsonSchema", + "JsonSchemaFormat", "JsonSchemaType", + "JwtResponse", + "KeypadInputPlan", + "KeypadInputPlanDelimiters", "KnowledgeBase", + "KnowledgeBaseCost", + "KnowledgeBaseModel", + "KnowledgeBaseProvider", + "KnowledgeBaseResponseDocument", + "LangfuseCredential", + "LangfuseCredentialProvider", + "LangfuseObservabilityPlan", + "LangfuseObservabilityPlanProvider", + "LatencyMetrics", + "LineInsight", + "LineInsightFromCallTable", + "LineInsightFromCallTableGroupBy", + "LineInsightFromCallTableQueriesItem", + "LineInsightFromCallTableType", + "LineInsightGroupBy", + "LineInsightMetadata", + "LineInsightQueriesItem", + "LiquidCondition", + "ListChatsRequestSortOrder", + "ListPhoneNumbersResponseItem", + "ListPhoneNumbersResponseItem_ByoPhoneNumber", + "ListPhoneNumbersResponseItem_Telnyx", + "ListPhoneNumbersResponseItem_Twilio", + "ListPhoneNumbersResponseItem_Vapi", + "ListPhoneNumbersResponseItem_Vonage", + "ListSessionsRequestSortOrder", + "ListToolsResponseItem", + "ListToolsResponseItem_ApiRequest", + "ListToolsResponseItem_Bash", + "ListToolsResponseItem_Code", + "ListToolsResponseItem_Computer", + "ListToolsResponseItem_Dtmf", + "ListToolsResponseItem_EndCall", + "ListToolsResponseItem_Function", + "ListToolsResponseItem_GohighlevelCalendarAvailabilityCheck", + "ListToolsResponseItem_GohighlevelCalendarEventCreate", + "ListToolsResponseItem_GohighlevelContactCreate", + "ListToolsResponseItem_GohighlevelContactGet", + "ListToolsResponseItem_GoogleCalendarAvailabilityCheck", + "ListToolsResponseItem_GoogleCalendarEventCreate", + "ListToolsResponseItem_GoogleSheetsRowAppend", + "ListToolsResponseItem_Handoff", + "ListToolsResponseItem_Mcp", + "ListToolsResponseItem_Query", + "ListToolsResponseItem_SipRequest", + "ListToolsResponseItem_SlackMessageSend", + "ListToolsResponseItem_Sms", + "ListToolsResponseItem_TextEditor", + "ListToolsResponseItem_TransferCall", + "ListToolsResponseItem_Voicemail", + "LivekitSmartEndpointingPlan", + "LivekitSmartEndpointingPlanProvider", "LmntCredential", + "LmntCredentialProvider", "LmntVoice", "LmntVoiceId", "LmntVoiceIdEnum", - "Log", - "LogRequestHttpMethod", - "LogResource", - "LogType", - "LogsGetRequestSortOrder", - "LogsGetRequestType", - "LogsPaginatedResponse", + "LmntVoiceLanguage", + "LogicEdgeCondition", "MakeCredential", + "MakeCredentialProvider", "MakeTool", "MakeToolMessagesItem", + "MakeToolMessagesItem_RequestComplete", + "MakeToolMessagesItem_RequestFailed", + "MakeToolMessagesItem_RequestResponseDelayed", + "MakeToolMessagesItem_RequestStart", "MakeToolMetadata", "MakeToolProviderDetails", + "MakeToolType", "MakeToolWithToolCall", "MakeToolWithToolCallMessagesItem", - "MessagePlan", - "Metrics", - "ModelBasedCondition", + "MakeToolWithToolCallMessagesItem_RequestComplete", + "MakeToolWithToolCallMessagesItem_RequestFailed", + "MakeToolWithToolCallMessagesItem_RequestResponseDelayed", + "MakeToolWithToolCallMessagesItem_RequestStart", + "McpTool", + "McpToolMessages", + "McpToolMessagesItem", + "McpToolMessagesItem_RequestComplete", + "McpToolMessagesItem_RequestFailed", + "McpToolMessagesItem_RequestResponseDelayed", + "McpToolMessagesItem_RequestStart", + "McpToolMessagesMessagesItem", + "McpToolMessagesMessagesItem_RequestComplete", + "McpToolMessagesMessagesItem_RequestFailed", + "McpToolMessagesMessagesItem_RequestResponseDelayed", + "McpToolMessagesMessagesItem_RequestStart", + "McpToolMetadata", + "McpToolMetadataProtocol", + "MessageAddHookAction", + "MessageTarget", + "MessageTargetRole", + "MinimaxLlmModel", + "MinimaxLlmModelModel", + "MinimaxLlmModelToolsItem", + "MinimaxLlmModelToolsItem_ApiRequest", + "MinimaxLlmModelToolsItem_Bash", + "MinimaxLlmModelToolsItem_Code", + "MinimaxLlmModelToolsItem_Computer", + "MinimaxLlmModelToolsItem_Dtmf", + "MinimaxLlmModelToolsItem_EndCall", + "MinimaxLlmModelToolsItem_Function", + "MinimaxLlmModelToolsItem_GohighlevelCalendarAvailabilityCheck", + "MinimaxLlmModelToolsItem_GohighlevelCalendarEventCreate", + "MinimaxLlmModelToolsItem_GohighlevelContactCreate", + "MinimaxLlmModelToolsItem_GohighlevelContactGet", + "MinimaxLlmModelToolsItem_GoogleCalendarAvailabilityCheck", + "MinimaxLlmModelToolsItem_GoogleCalendarEventCreate", + "MinimaxLlmModelToolsItem_GoogleSheetsRowAppend", + "MinimaxLlmModelToolsItem_Handoff", + "MinimaxLlmModelToolsItem_Mcp", + "MinimaxLlmModelToolsItem_Query", + "MinimaxLlmModelToolsItem_SipRequest", + "MinimaxLlmModelToolsItem_SlackMessageSend", + "MinimaxLlmModelToolsItem_Sms", + "MinimaxLlmModelToolsItem_TextEditor", + "MinimaxLlmModelToolsItem_TransferCall", + "MinimaxLlmModelToolsItem_Voicemail", + "MinimaxVoice", + "MinimaxVoiceLanguageBoost", + "MinimaxVoiceModel", + "MinimaxVoiceRegion", + "MinimaxVoiceSubtitleType", + "MistralCredential", + "MistralCredentialProvider", "ModelCost", "Monitor", "MonitorPlan", + "MonitorResult", + "Mono", "NeetsVoice", - "NeetsVoiceId", - "NeetsVoiceIdEnum", + "NeuphonicCredential", + "NeuphonicCredentialProvider", + "NeuphonicVoice", + "NeuphonicVoiceModel", + "NodeArtifact", + "NodeArtifactMessagesItem", + "NotFoundError", + "OAuth2AuthenticationPlan", + "OAuth2AuthenticationPlanType", + "Oauth2AuthenticationSession", "OpenAiCredential", + "OpenAiCredentialProvider", "OpenAiFunction", "OpenAiFunctionParameters", + "OpenAiFunctionParametersType", "OpenAiMessage", "OpenAiMessageRole", "OpenAiModel", "OpenAiModelFallbackModelsItem", "OpenAiModelModel", + "OpenAiModelPromptCacheRetention", + "OpenAiModelToolStrictCompatibilityMode", "OpenAiModelToolsItem", + "OpenAiModelToolsItem_ApiRequest", + "OpenAiModelToolsItem_Bash", + "OpenAiModelToolsItem_Code", + "OpenAiModelToolsItem_Computer", + "OpenAiModelToolsItem_Dtmf", + "OpenAiModelToolsItem_EndCall", + "OpenAiModelToolsItem_Function", + "OpenAiModelToolsItem_GohighlevelCalendarAvailabilityCheck", + "OpenAiModelToolsItem_GohighlevelCalendarEventCreate", + "OpenAiModelToolsItem_GohighlevelContactCreate", + "OpenAiModelToolsItem_GohighlevelContactGet", + "OpenAiModelToolsItem_GoogleCalendarAvailabilityCheck", + "OpenAiModelToolsItem_GoogleCalendarEventCreate", + "OpenAiModelToolsItem_GoogleSheetsRowAppend", + "OpenAiModelToolsItem_Handoff", + "OpenAiModelToolsItem_Mcp", + "OpenAiModelToolsItem_Query", + "OpenAiModelToolsItem_SipRequest", + "OpenAiModelToolsItem_SlackMessageSend", + "OpenAiModelToolsItem_Sms", + "OpenAiModelToolsItem_TextEditor", + "OpenAiModelToolsItem_TransferCall", + "OpenAiModelToolsItem_Voicemail", + "OpenAiResponsesRequestInput", + "OpenAiResponsesRequestInputOneItem", + "OpenAiTranscriber", + "OpenAiTranscriberLanguage", + "OpenAiTranscriberModel", "OpenAiVoice", "OpenAiVoiceId", + "OpenAiVoiceIdEnum", + "OpenAiVoiceModel", + "OpenAiVoicemailDetectionPlan", + "OpenAiVoicemailDetectionPlanProvider", + "OpenAiVoicemailDetectionPlanType", + "OpenAiWebChatRequest", + "OpenAiWebChatRequestInput", + "OpenAiWebChatRequestInputOneItem", "OpenRouterCredential", + "OpenRouterCredentialProvider", "OpenRouterModel", "OpenRouterModelToolsItem", + "OpenRouterModelToolsItem_ApiRequest", + "OpenRouterModelToolsItem_Bash", + "OpenRouterModelToolsItem_Code", + "OpenRouterModelToolsItem_Computer", + "OpenRouterModelToolsItem_Dtmf", + "OpenRouterModelToolsItem_EndCall", + "OpenRouterModelToolsItem_Function", + "OpenRouterModelToolsItem_GohighlevelCalendarAvailabilityCheck", + "OpenRouterModelToolsItem_GohighlevelCalendarEventCreate", + "OpenRouterModelToolsItem_GohighlevelContactCreate", + "OpenRouterModelToolsItem_GohighlevelContactGet", + "OpenRouterModelToolsItem_GoogleCalendarAvailabilityCheck", + "OpenRouterModelToolsItem_GoogleCalendarEventCreate", + "OpenRouterModelToolsItem_GoogleSheetsRowAppend", + "OpenRouterModelToolsItem_Handoff", + "OpenRouterModelToolsItem_Mcp", + "OpenRouterModelToolsItem_Query", + "OpenRouterModelToolsItem_SipRequest", + "OpenRouterModelToolsItem_SlackMessageSend", + "OpenRouterModelToolsItem_Sms", + "OpenRouterModelToolsItem_TextEditor", + "OpenRouterModelToolsItem_TransferCall", + "OpenRouterModelToolsItem_Voicemail", "Org", - "OrgPlan", + "OrgChannel", "OutputTool", "OutputToolMessagesItem", + "OutputToolMessagesItem_RequestComplete", + "OutputToolMessagesItem_RequestFailed", + "OutputToolMessagesItem_RequestResponseDelayed", + "OutputToolMessagesItem_RequestStart", + "OutputToolType", "PaginationMeta", + "PerformanceMetrics", "PerplexityAiCredential", + "PerplexityAiCredentialProvider", "PerplexityAiModel", "PerplexityAiModelToolsItem", - "PhoneNumbersCreateRequest", - "PhoneNumbersCreateResponse", - "PhoneNumbersDeleteResponse", - "PhoneNumbersGetResponse", - "PhoneNumbersListResponseItem", - "PhoneNumbersUpdateResponse", + "PerplexityAiModelToolsItem_ApiRequest", + "PerplexityAiModelToolsItem_Bash", + "PerplexityAiModelToolsItem_Code", + "PerplexityAiModelToolsItem_Computer", + "PerplexityAiModelToolsItem_Dtmf", + "PerplexityAiModelToolsItem_EndCall", + "PerplexityAiModelToolsItem_Function", + "PerplexityAiModelToolsItem_GohighlevelCalendarAvailabilityCheck", + "PerplexityAiModelToolsItem_GohighlevelCalendarEventCreate", + "PerplexityAiModelToolsItem_GohighlevelContactCreate", + "PerplexityAiModelToolsItem_GohighlevelContactGet", + "PerplexityAiModelToolsItem_GoogleCalendarAvailabilityCheck", + "PerplexityAiModelToolsItem_GoogleCalendarEventCreate", + "PerplexityAiModelToolsItem_GoogleSheetsRowAppend", + "PerplexityAiModelToolsItem_Handoff", + "PerplexityAiModelToolsItem_Mcp", + "PerplexityAiModelToolsItem_Query", + "PerplexityAiModelToolsItem_SipRequest", + "PerplexityAiModelToolsItem_SlackMessageSend", + "PerplexityAiModelToolsItem_Sms", + "PerplexityAiModelToolsItem_TextEditor", + "PerplexityAiModelToolsItem_TransferCall", + "PerplexityAiModelToolsItem_Voicemail", + "Personality", + "PhoneNumberCallEndingHookFilter", + "PhoneNumberCallEndingHookFilterKey", + "PhoneNumberCallEndingHookFilterOneOfItem", + "PhoneNumberCallEndingHookFilterType", + "PhoneNumberCallRingingHookFilter", + "PhoneNumberCallRingingHookFilterKey", + "PhoneNumberCallRingingHookFilterType", + "PhoneNumberControllerFindAllPaginatedRequestSortOrder", + "PhoneNumberHookCallEnding", + "PhoneNumberHookCallEndingDo", + "PhoneNumberHookCallEndingDo_Say", + "PhoneNumberHookCallEndingDo_Transfer", + "PhoneNumberHookCallRinging", + "PhoneNumberHookCallRingingDoItem", + "PhoneNumberHookCallRingingDoItem_Say", + "PhoneNumberHookCallRingingDoItem_Transfer", + "PhoneNumberPaginatedResponse", + "PhoneNumberPaginatedResponseResultsItem", + "PhoneNumberPaginatedResponseResultsItem_ByoPhoneNumber", + "PhoneNumberPaginatedResponseResultsItem_Telnyx", + "PhoneNumberPaginatedResponseResultsItem_Twilio", + "PhoneNumberPaginatedResponseResultsItem_Vapi", + "PhoneNumberPaginatedResponseResultsItem_Vonage", + "PieInsight", + "PieInsightFromCallTable", + "PieInsightFromCallTableGroupBy", + "PieInsightFromCallTableQueriesItem", + "PieInsightFromCallTableType", + "PieInsightGroupBy", + "PieInsightQueriesItem", "PlayHtCredential", + "PlayHtCredentialProvider", "PlayHtVoice", "PlayHtVoiceEmotion", "PlayHtVoiceId", "PlayHtVoiceIdEnum", + "PlayHtVoiceLanguage", + "PlayHtVoiceModel", + "PromptInjectionSecurityFilter", + "PromptInjectionSecurityFilterType", + "ProviderResource", + "ProviderResourceControllerCreateProviderResourceRequestProvider", + "ProviderResourceControllerCreateProviderResourceRequestResourceName", + "ProviderResourceControllerDeleteProviderResourceRequestProvider", + "ProviderResourceControllerDeleteProviderResourceRequestResourceName", + "ProviderResourceControllerGetProviderResourceRequestProvider", + "ProviderResourceControllerGetProviderResourceRequestResourceName", + "ProviderResourceControllerGetProviderResourcesPaginatedRequestProvider", + "ProviderResourceControllerGetProviderResourcesPaginatedRequestResourceName", + "ProviderResourceControllerGetProviderResourcesPaginatedRequestSortOrder", + "ProviderResourceControllerUpdateProviderResourceRequestProvider", + "ProviderResourceControllerUpdateProviderResourceRequestResourceName", + "ProviderResourcePaginatedResponse", + "ProviderResourceProvider", + "ProviderResourceResourceName", + "PublicKeyEncryptionPlan", + "PublicKeyEncryptionPlanAlgorithm", + "PublicKeyEncryptionPlanPublicKey", + "PublicKeyEncryptionPlanPublicKey_SpkiPem", "PunctuationBoundary", + "QueryTool", + "QueryToolMessagesItem", + "QueryToolMessagesItem_RequestComplete", + "QueryToolMessagesItem_RequestFailed", + "QueryToolMessagesItem_RequestResponseDelayed", + "QueryToolMessagesItem_RequestStart", + "RceSecurityFilter", + "RceSecurityFilterType", + "Recording", + "RecordingConsent", + "RecordingConsentPlanStayOnLine", + "RecordingConsentPlanStayOnLineVoice", + "RecordingConsentPlanStayOnLineVoice_11Labs", + "RecordingConsentPlanStayOnLineVoice_Azure", + "RecordingConsentPlanStayOnLineVoice_Cartesia", + "RecordingConsentPlanStayOnLineVoice_CustomVoice", + "RecordingConsentPlanStayOnLineVoice_Deepgram", + "RecordingConsentPlanStayOnLineVoice_Hume", + "RecordingConsentPlanStayOnLineVoice_Inworld", + "RecordingConsentPlanStayOnLineVoice_Lmnt", + "RecordingConsentPlanStayOnLineVoice_Minimax", + "RecordingConsentPlanStayOnLineVoice_Neuphonic", + "RecordingConsentPlanStayOnLineVoice_Openai", + "RecordingConsentPlanStayOnLineVoice_Playht", + "RecordingConsentPlanStayOnLineVoice_RimeAi", + "RecordingConsentPlanStayOnLineVoice_Sesame", + "RecordingConsentPlanStayOnLineVoice_SmallestAi", + "RecordingConsentPlanStayOnLineVoice_Tavus", + "RecordingConsentPlanStayOnLineVoice_Vapi", + "RecordingConsentPlanStayOnLineVoice_Wellsaid", + "RecordingConsentPlanVerbal", + "RecordingConsentPlanVerbalVoice", + "RecordingConsentPlanVerbalVoice_11Labs", + "RecordingConsentPlanVerbalVoice_Azure", + "RecordingConsentPlanVerbalVoice_Cartesia", + "RecordingConsentPlanVerbalVoice_CustomVoice", + "RecordingConsentPlanVerbalVoice_Deepgram", + "RecordingConsentPlanVerbalVoice_Hume", + "RecordingConsentPlanVerbalVoice_Inworld", + "RecordingConsentPlanVerbalVoice_Lmnt", + "RecordingConsentPlanVerbalVoice_Minimax", + "RecordingConsentPlanVerbalVoice_Neuphonic", + "RecordingConsentPlanVerbalVoice_Openai", + "RecordingConsentPlanVerbalVoice_Playht", + "RecordingConsentPlanVerbalVoice_RimeAi", + "RecordingConsentPlanVerbalVoice_Sesame", + "RecordingConsentPlanVerbalVoice_SmallestAi", + "RecordingConsentPlanVerbalVoice_Tavus", + "RecordingConsentPlanVerbalVoice_Vapi", + "RecordingConsentPlanVerbalVoice_Wellsaid", + "RegexCondition", "RegexOption", "RegexOptionType", "RegexReplacement", + "RegexSecurityFilter", + "RegexSecurityFilterType", + "RelayCommandNote", + "RelayCommandOptions", + "RelayCommandOptionsType", + "RelayCommandSay", + "RelayRequest", + "RelayRequestCommandsItem", + "RelayRequestCommandsItem_MessageAdd", + "RelayRequestCommandsItem_Say", + "RelayRequestTarget", + "RelayRequestTarget_Assistant", + "RelayRequestTarget_Squad", + "RelayResponse", + "RelayResponseStatus", + "RelayTargetAssistant", + "RelayTargetOptions", + "RelayTargetOptionsType", + "RelayTargetSquad", + "ResponseCompletedEvent", + "ResponseCompletedEventType", + "ResponseErrorEvent", + "ResponseErrorEventType", + "ResponseObject", + "ResponseObjectObject", + "ResponseObjectStatus", + "ResponseOutputMessage", + "ResponseOutputMessageRole", + "ResponseOutputMessageStatus", + "ResponseOutputMessageType", + "ResponseOutputText", + "ResponseOutputTextType", + "ResponseTextDeltaEvent", + "ResponseTextDeltaEventType", + "ResponseTextDoneEvent", + "ResponseTextDoneEventType", "RimeAiCredential", + "RimeAiCredentialProvider", "RimeAiVoice", "RimeAiVoiceId", "RimeAiVoiceIdEnum", + "RimeAiVoiceLanguage", "RimeAiVoiceModel", - "RuleBasedCondition", - "RuleBasedConditionOperator", "RunpodCredential", + "RunpodCredentialProvider", "S3Credential", + "S3CredentialProvider", + "SayAssistantHookAction", + "SayHookAction", + "SayHookActionPrompt", + "SayHookActionPromptOneItem", + "SayPhoneNumberHookAction", "SbcConfiguration", + "Scenario", + "ScenarioHooksItem", + "ScenarioHooksItem_SimulationRunEnded", + "ScenarioHooksItem_SimulationRunStarted", + "ScenarioToolMock", + "SchedulePlan", + "Scorecard", + "ScorecardControllerGetPaginatedRequestSortOrder", + "ScorecardMetric", + "ScorecardPaginatedResponse", + "SecurityFilterBase", + "SecurityFilterPlan", + "SecurityFilterPlanMode", "Server", "ServerMessage", "ServerMessageAssistantRequest", "ServerMessageAssistantRequestPhoneNumber", + "ServerMessageAssistantRequestPhoneNumber_ByoPhoneNumber", + "ServerMessageAssistantRequestPhoneNumber_Telnyx", + "ServerMessageAssistantRequestPhoneNumber_Twilio", + "ServerMessageAssistantRequestPhoneNumber_Vapi", + "ServerMessageAssistantRequestPhoneNumber_Vonage", + "ServerMessageAssistantRequestType", + "ServerMessageAssistantSpeech", + "ServerMessageAssistantSpeechPhoneNumber", + "ServerMessageAssistantSpeechPhoneNumber_ByoPhoneNumber", + "ServerMessageAssistantSpeechPhoneNumber_Telnyx", + "ServerMessageAssistantSpeechPhoneNumber_Twilio", + "ServerMessageAssistantSpeechPhoneNumber_Vapi", + "ServerMessageAssistantSpeechPhoneNumber_Vonage", + "ServerMessageAssistantSpeechSource", + "ServerMessageAssistantSpeechTiming", + "ServerMessageAssistantSpeechTiming_WordAlignment", + "ServerMessageAssistantSpeechTiming_WordProgress", + "ServerMessageAssistantSpeechType", + "ServerMessageCallDeleteFailed", + "ServerMessageCallDeleteFailedPhoneNumber", + "ServerMessageCallDeleteFailedPhoneNumber_ByoPhoneNumber", + "ServerMessageCallDeleteFailedPhoneNumber_Telnyx", + "ServerMessageCallDeleteFailedPhoneNumber_Twilio", + "ServerMessageCallDeleteFailedPhoneNumber_Vapi", + "ServerMessageCallDeleteFailedPhoneNumber_Vonage", + "ServerMessageCallDeleteFailedType", + "ServerMessageCallDeleted", + "ServerMessageCallDeletedPhoneNumber", + "ServerMessageCallDeletedPhoneNumber_ByoPhoneNumber", + "ServerMessageCallDeletedPhoneNumber_Telnyx", + "ServerMessageCallDeletedPhoneNumber_Twilio", + "ServerMessageCallDeletedPhoneNumber_Vapi", + "ServerMessageCallDeletedPhoneNumber_Vonage", + "ServerMessageCallDeletedType", + "ServerMessageCallEndpointingRequest", + "ServerMessageCallEndpointingRequestMessagesItem", + "ServerMessageCallEndpointingRequestPhoneNumber", + "ServerMessageCallEndpointingRequestPhoneNumber_ByoPhoneNumber", + "ServerMessageCallEndpointingRequestPhoneNumber_Telnyx", + "ServerMessageCallEndpointingRequestPhoneNumber_Twilio", + "ServerMessageCallEndpointingRequestPhoneNumber_Vapi", + "ServerMessageCallEndpointingRequestPhoneNumber_Vonage", + "ServerMessageCallEndpointingRequestType", + "ServerMessageChatCreated", + "ServerMessageChatCreatedPhoneNumber", + "ServerMessageChatCreatedPhoneNumber_ByoPhoneNumber", + "ServerMessageChatCreatedPhoneNumber_Telnyx", + "ServerMessageChatCreatedPhoneNumber_Twilio", + "ServerMessageChatCreatedPhoneNumber_Vapi", + "ServerMessageChatCreatedPhoneNumber_Vonage", + "ServerMessageChatCreatedType", + "ServerMessageChatDeleted", + "ServerMessageChatDeletedPhoneNumber", + "ServerMessageChatDeletedPhoneNumber_ByoPhoneNumber", + "ServerMessageChatDeletedPhoneNumber_Telnyx", + "ServerMessageChatDeletedPhoneNumber_Twilio", + "ServerMessageChatDeletedPhoneNumber_Vapi", + "ServerMessageChatDeletedPhoneNumber_Vonage", + "ServerMessageChatDeletedType", "ServerMessageConversationUpdate", "ServerMessageConversationUpdateMessagesItem", "ServerMessageConversationUpdatePhoneNumber", + "ServerMessageConversationUpdatePhoneNumber_ByoPhoneNumber", + "ServerMessageConversationUpdatePhoneNumber_Telnyx", + "ServerMessageConversationUpdatePhoneNumber_Twilio", + "ServerMessageConversationUpdatePhoneNumber_Vapi", + "ServerMessageConversationUpdatePhoneNumber_Vonage", + "ServerMessageConversationUpdateType", "ServerMessageEndOfCallReport", "ServerMessageEndOfCallReportCostsItem", + "ServerMessageEndOfCallReportCostsItem_Analysis", + "ServerMessageEndOfCallReportCostsItem_KnowledgeBase", + "ServerMessageEndOfCallReportCostsItem_Model", + "ServerMessageEndOfCallReportCostsItem_Transcriber", + "ServerMessageEndOfCallReportCostsItem_Transport", + "ServerMessageEndOfCallReportCostsItem_Vapi", + "ServerMessageEndOfCallReportCostsItem_Voice", + "ServerMessageEndOfCallReportCostsItem_VoicemailDetection", + "ServerMessageEndOfCallReportDestination", + "ServerMessageEndOfCallReportDestination_Number", + "ServerMessageEndOfCallReportDestination_Sip", "ServerMessageEndOfCallReportEndedReason", "ServerMessageEndOfCallReportPhoneNumber", + "ServerMessageEndOfCallReportPhoneNumber_ByoPhoneNumber", + "ServerMessageEndOfCallReportPhoneNumber_Telnyx", + "ServerMessageEndOfCallReportPhoneNumber_Twilio", + "ServerMessageEndOfCallReportPhoneNumber_Vapi", + "ServerMessageEndOfCallReportPhoneNumber_Vonage", + "ServerMessageEndOfCallReportType", + "ServerMessageHandoffDestinationRequest", + "ServerMessageHandoffDestinationRequestPhoneNumber", + "ServerMessageHandoffDestinationRequestPhoneNumber_ByoPhoneNumber", + "ServerMessageHandoffDestinationRequestPhoneNumber_Telnyx", + "ServerMessageHandoffDestinationRequestPhoneNumber_Twilio", + "ServerMessageHandoffDestinationRequestPhoneNumber_Vapi", + "ServerMessageHandoffDestinationRequestPhoneNumber_Vonage", + "ServerMessageHandoffDestinationRequestType", "ServerMessageHang", "ServerMessageHangPhoneNumber", - "ServerMessageLanguageChanged", - "ServerMessageLanguageChangedPhoneNumber", + "ServerMessageHangPhoneNumber_ByoPhoneNumber", + "ServerMessageHangPhoneNumber_Telnyx", + "ServerMessageHangPhoneNumber_Twilio", + "ServerMessageHangPhoneNumber_Vapi", + "ServerMessageHangPhoneNumber_Vonage", + "ServerMessageHangType", + "ServerMessageKnowledgeBaseRequest", + "ServerMessageKnowledgeBaseRequestMessagesItem", + "ServerMessageKnowledgeBaseRequestPhoneNumber", + "ServerMessageKnowledgeBaseRequestPhoneNumber_ByoPhoneNumber", + "ServerMessageKnowledgeBaseRequestPhoneNumber_Telnyx", + "ServerMessageKnowledgeBaseRequestPhoneNumber_Twilio", + "ServerMessageKnowledgeBaseRequestPhoneNumber_Vapi", + "ServerMessageKnowledgeBaseRequestPhoneNumber_Vonage", + "ServerMessageKnowledgeBaseRequestType", + "ServerMessageLanguageChangeDetected", + "ServerMessageLanguageChangeDetectedPhoneNumber", + "ServerMessageLanguageChangeDetectedPhoneNumber_ByoPhoneNumber", + "ServerMessageLanguageChangeDetectedPhoneNumber_Telnyx", + "ServerMessageLanguageChangeDetectedPhoneNumber_Twilio", + "ServerMessageLanguageChangeDetectedPhoneNumber_Vapi", + "ServerMessageLanguageChangeDetectedPhoneNumber_Vonage", + "ServerMessageLanguageChangeDetectedType", "ServerMessageMessage", "ServerMessageModelOutput", "ServerMessageModelOutputPhoneNumber", + "ServerMessageModelOutputPhoneNumber_ByoPhoneNumber", + "ServerMessageModelOutputPhoneNumber_Telnyx", + "ServerMessageModelOutputPhoneNumber_Twilio", + "ServerMessageModelOutputPhoneNumber_Vapi", + "ServerMessageModelOutputPhoneNumber_Vonage", + "ServerMessageModelOutputType", "ServerMessagePhoneCallControl", "ServerMessagePhoneCallControlDestination", + "ServerMessagePhoneCallControlDestination_Number", + "ServerMessagePhoneCallControlDestination_Sip", "ServerMessagePhoneCallControlPhoneNumber", + "ServerMessagePhoneCallControlPhoneNumber_ByoPhoneNumber", + "ServerMessagePhoneCallControlPhoneNumber_Telnyx", + "ServerMessagePhoneCallControlPhoneNumber_Twilio", + "ServerMessagePhoneCallControlPhoneNumber_Vapi", + "ServerMessagePhoneCallControlPhoneNumber_Vonage", "ServerMessagePhoneCallControlRequest", + "ServerMessagePhoneCallControlType", "ServerMessageResponse", "ServerMessageResponseAssistantRequest", "ServerMessageResponseAssistantRequestDestination", + "ServerMessageResponseAssistantRequestDestination_Number", + "ServerMessageResponseAssistantRequestDestination_Sip", + "ServerMessageResponseCallEndpointingRequest", + "ServerMessageResponseHandoffDestinationRequest", + "ServerMessageResponseKnowledgeBaseRequest", "ServerMessageResponseMessageResponse", "ServerMessageResponseToolCalls", "ServerMessageResponseTransferDestinationRequest", "ServerMessageResponseTransferDestinationRequestDestination", + "ServerMessageResponseTransferDestinationRequestDestination_Assistant", + "ServerMessageResponseTransferDestinationRequestDestination_Number", + "ServerMessageResponseTransferDestinationRequestDestination_Sip", + "ServerMessageResponseTransferDestinationRequestMessage", + "ServerMessageResponseTransferDestinationRequestMessage_RequestComplete", + "ServerMessageResponseTransferDestinationRequestMessage_RequestFailed", + "ServerMessageResponseTransferDestinationRequestMessage_RequestResponseDelayed", + "ServerMessageResponseTransferDestinationRequestMessage_RequestStart", "ServerMessageResponseVoiceRequest", + "ServerMessageSessionCreated", + "ServerMessageSessionCreatedPhoneNumber", + "ServerMessageSessionCreatedPhoneNumber_ByoPhoneNumber", + "ServerMessageSessionCreatedPhoneNumber_Telnyx", + "ServerMessageSessionCreatedPhoneNumber_Twilio", + "ServerMessageSessionCreatedPhoneNumber_Vapi", + "ServerMessageSessionCreatedPhoneNumber_Vonage", + "ServerMessageSessionCreatedType", + "ServerMessageSessionDeleted", + "ServerMessageSessionDeletedPhoneNumber", + "ServerMessageSessionDeletedPhoneNumber_ByoPhoneNumber", + "ServerMessageSessionDeletedPhoneNumber_Telnyx", + "ServerMessageSessionDeletedPhoneNumber_Twilio", + "ServerMessageSessionDeletedPhoneNumber_Vapi", + "ServerMessageSessionDeletedPhoneNumber_Vonage", + "ServerMessageSessionDeletedType", + "ServerMessageSessionUpdated", + "ServerMessageSessionUpdatedPhoneNumber", + "ServerMessageSessionUpdatedPhoneNumber_ByoPhoneNumber", + "ServerMessageSessionUpdatedPhoneNumber_Telnyx", + "ServerMessageSessionUpdatedPhoneNumber_Twilio", + "ServerMessageSessionUpdatedPhoneNumber_Vapi", + "ServerMessageSessionUpdatedPhoneNumber_Vonage", + "ServerMessageSessionUpdatedType", "ServerMessageSpeechUpdate", "ServerMessageSpeechUpdatePhoneNumber", + "ServerMessageSpeechUpdatePhoneNumber_ByoPhoneNumber", + "ServerMessageSpeechUpdatePhoneNumber_Telnyx", + "ServerMessageSpeechUpdatePhoneNumber_Twilio", + "ServerMessageSpeechUpdatePhoneNumber_Vapi", + "ServerMessageSpeechUpdatePhoneNumber_Vonage", "ServerMessageSpeechUpdateRole", "ServerMessageSpeechUpdateStatus", + "ServerMessageSpeechUpdateType", "ServerMessageStatusUpdate", "ServerMessageStatusUpdateDestination", + "ServerMessageStatusUpdateDestination_Number", + "ServerMessageStatusUpdateDestination_Sip", "ServerMessageStatusUpdateEndedReason", "ServerMessageStatusUpdateMessagesItem", "ServerMessageStatusUpdatePhoneNumber", + "ServerMessageStatusUpdatePhoneNumber_ByoPhoneNumber", + "ServerMessageStatusUpdatePhoneNumber_Telnyx", + "ServerMessageStatusUpdatePhoneNumber_Twilio", + "ServerMessageStatusUpdatePhoneNumber_Vapi", + "ServerMessageStatusUpdatePhoneNumber_Vonage", "ServerMessageStatusUpdateStatus", + "ServerMessageStatusUpdateType", "ServerMessageToolCalls", "ServerMessageToolCallsPhoneNumber", + "ServerMessageToolCallsPhoneNumber_ByoPhoneNumber", + "ServerMessageToolCallsPhoneNumber_Telnyx", + "ServerMessageToolCallsPhoneNumber_Twilio", + "ServerMessageToolCallsPhoneNumber_Vapi", + "ServerMessageToolCallsPhoneNumber_Vonage", "ServerMessageToolCallsToolWithToolCallListItem", + "ServerMessageToolCallsToolWithToolCallListItem_Bash", + "ServerMessageToolCallsToolWithToolCallListItem_Computer", + "ServerMessageToolCallsToolWithToolCallListItem_Function", + "ServerMessageToolCallsToolWithToolCallListItem_Ghl", + "ServerMessageToolCallsToolWithToolCallListItem_GoogleCalendarEventCreate", + "ServerMessageToolCallsToolWithToolCallListItem_Make", + "ServerMessageToolCallsToolWithToolCallListItem_TextEditor", + "ServerMessageToolCallsType", "ServerMessageTranscript", "ServerMessageTranscriptPhoneNumber", + "ServerMessageTranscriptPhoneNumber_ByoPhoneNumber", + "ServerMessageTranscriptPhoneNumber_Telnyx", + "ServerMessageTranscriptPhoneNumber_Twilio", + "ServerMessageTranscriptPhoneNumber_Vapi", + "ServerMessageTranscriptPhoneNumber_Vonage", "ServerMessageTranscriptRole", "ServerMessageTranscriptTranscriptType", + "ServerMessageTranscriptType", "ServerMessageTransferDestinationRequest", "ServerMessageTransferDestinationRequestPhoneNumber", + "ServerMessageTransferDestinationRequestPhoneNumber_ByoPhoneNumber", + "ServerMessageTransferDestinationRequestPhoneNumber_Telnyx", + "ServerMessageTransferDestinationRequestPhoneNumber_Twilio", + "ServerMessageTransferDestinationRequestPhoneNumber_Vapi", + "ServerMessageTransferDestinationRequestPhoneNumber_Vonage", + "ServerMessageTransferDestinationRequestType", "ServerMessageTransferUpdate", "ServerMessageTransferUpdateDestination", + "ServerMessageTransferUpdateDestination_Assistant", + "ServerMessageTransferUpdateDestination_Number", + "ServerMessageTransferUpdateDestination_Sip", "ServerMessageTransferUpdatePhoneNumber", + "ServerMessageTransferUpdatePhoneNumber_ByoPhoneNumber", + "ServerMessageTransferUpdatePhoneNumber_Telnyx", + "ServerMessageTransferUpdatePhoneNumber_Twilio", + "ServerMessageTransferUpdatePhoneNumber_Vapi", + "ServerMessageTransferUpdatePhoneNumber_Vonage", + "ServerMessageTransferUpdateType", "ServerMessageUserInterrupted", "ServerMessageUserInterruptedPhoneNumber", + "ServerMessageUserInterruptedPhoneNumber_ByoPhoneNumber", + "ServerMessageUserInterruptedPhoneNumber_Telnyx", + "ServerMessageUserInterruptedPhoneNumber_Twilio", + "ServerMessageUserInterruptedPhoneNumber_Vapi", + "ServerMessageUserInterruptedPhoneNumber_Vonage", + "ServerMessageUserInterruptedType", "ServerMessageVoiceInput", "ServerMessageVoiceInputPhoneNumber", + "ServerMessageVoiceInputPhoneNumber_ByoPhoneNumber", + "ServerMessageVoiceInputPhoneNumber_Telnyx", + "ServerMessageVoiceInputPhoneNumber_Twilio", + "ServerMessageVoiceInputPhoneNumber_Vapi", + "ServerMessageVoiceInputPhoneNumber_Vonage", + "ServerMessageVoiceInputType", "ServerMessageVoiceRequest", "ServerMessageVoiceRequestPhoneNumber", + "ServerMessageVoiceRequestPhoneNumber_ByoPhoneNumber", + "ServerMessageVoiceRequestPhoneNumber_Telnyx", + "ServerMessageVoiceRequestPhoneNumber_Twilio", + "ServerMessageVoiceRequestPhoneNumber_Vapi", + "ServerMessageVoiceRequestPhoneNumber_Vonage", + "ServerMessageVoiceRequestType", + "SesameVoice", + "SesameVoiceModel", + "Session", + "SessionCost", + "SessionCostsItem", + "SessionCostsItem_Analysis", + "SessionCostsItem_Model", + "SessionCostsItem_Session", + "SessionCreatedHook", + "SessionCreatedHookOn", + "SessionMessagesItem", + "SessionPaginatedResponse", + "SessionStatus", + "Simulation", + "SimulationConcurrencyResponse", + "SimulationHookCallEnded", + "SimulationHookCallStarted", + "SimulationHookInclude", + "SimulationHookWebhookAction", + "SimulationHookWebhookActionType", + "SimulationRun", + "SimulationRunConfiguration", + "SimulationRunItem", + "SimulationRunItemCallMetadata", + "SimulationRunItemCallMonitor", + "SimulationRunItemCounts", + "SimulationRunItemHooksItem", + "SimulationRunItemHooksItem_SimulationRunEnded", + "SimulationRunItemHooksItem_SimulationRunStarted", + "SimulationRunItemImprovementSuggestion", + "SimulationRunItemImprovements", + "SimulationRunItemMetadata", + "SimulationRunItemResults", + "SimulationRunItemStatus", + "SimulationRunSimulationEntry", + "SimulationRunSimulationsItem", + "SimulationRunSimulationsItem_Simulation", + "SimulationRunSimulationsItem_SimulationSuite", + "SimulationRunStatus", + "SimulationRunSuiteEntry", + "SimulationRunTarget", + "SimulationRunTargetAssistant", + "SimulationRunTargetSquad", + "SimulationRunTarget_Assistant", + "SimulationRunTarget_Squad", + "SimulationRunTransportConfiguration", + "SimulationRunTransportConfigurationProvider", + "SimulationSuite", + "SipAuthentication", + "SipRequestTool", + "SipRequestToolBody", + "SipRequestToolMessagesItem", + "SipRequestToolMessagesItem_RequestComplete", + "SipRequestToolMessagesItem_RequestFailed", + "SipRequestToolMessagesItem_RequestResponseDelayed", + "SipRequestToolMessagesItem_RequestStart", + "SipRequestToolVerb", "SipTrunkGateway", "SipTrunkGatewayOutboundProtocol", "SipTrunkOutboundAuthenticationPlan", "SipTrunkOutboundSipRegisterPlan", + "SlackOAuth2AuthorizationCredential", + "SlackOAuth2AuthorizationCredentialProvider", + "SlackSendMessageTool", + "SlackSendMessageToolMessagesItem", + "SlackSendMessageToolMessagesItem_RequestComplete", + "SlackSendMessageToolMessagesItem_RequestFailed", + "SlackSendMessageToolMessagesItem_RequestResponseDelayed", + "SlackSendMessageToolMessagesItem_RequestStart", + "SlackWebhookCredential", + "SlackWebhookCredentialProvider", + "SmallestAiCredential", + "SmallestAiCredentialProvider", + "SmallestAiVoice", + "SmallestAiVoiceId", + "SmallestAiVoiceIdEnum", + "SmallestAiVoiceModel", + "SmartDenoisingPlan", + "SmsTool", + "SmsToolMessagesItem", + "SmsToolMessagesItem_RequestComplete", + "SmsToolMessagesItem_RequestFailed", + "SmsToolMessagesItem_RequestResponseDelayed", + "SmsToolMessagesItem_RequestStart", + "SonioxCredential", + "SonioxCredentialProvider", + "SonioxTranscriber", + "SonioxTranscriberLanguage", + "SonioxTranscriberModel", + "SpeechmaticsCredential", + "SpeechmaticsCredentialProvider", + "SpeechmaticsCustomVocabularyItem", + "SpeechmaticsTranscriber", + "SpeechmaticsTranscriberLanguage", + "SpeechmaticsTranscriberModel", + "SpeechmaticsTranscriberNumeralStyle", + "SpeechmaticsTranscriberOperatingPoint", + "SpeechmaticsTranscriberRegion", + "SpkiPemPublicKeyConfig", + "SqlInjectionSecurityFilter", + "SqlInjectionSecurityFilterType", "Squad", "SquadMemberDto", + "SquadMemberDtoAssistantDestinationsItem", + "SsrfSecurityFilter", + "SsrfSecurityFilterType", "StartSpeakingPlan", - "StepDestination", - "StepDestinationConditionsItem", + "StartSpeakingPlanCustomEndpointingRulesItem", + "StartSpeakingPlanCustomEndpointingRulesItem_Assistant", + "StartSpeakingPlanCustomEndpointingRulesItem_Both", + "StartSpeakingPlanCustomEndpointingRulesItem_Customer", + "StartSpeakingPlanSmartEndpointingEnabled", + "StartSpeakingPlanSmartEndpointingEnabledOne", + "StartSpeakingPlanSmartEndpointingPlan", "StopSpeakingPlan", + "StructuredDataMultiPlan", "StructuredDataPlan", + "StructuredOutput", + "StructuredOutputControllerFindAllRequestSortOrder", + "StructuredOutputEvaluationResult", + "StructuredOutputEvaluationResultComparator", + "StructuredOutputEvaluationResultExpectedValue", + "StructuredOutputEvaluationResultExtractedValue", + "StructuredOutputFilterDto", + "StructuredOutputModel", + "StructuredOutputModel_Anthropic", + "StructuredOutputModel_AnthropicBedrock", + "StructuredOutputModel_CustomLlm", + "StructuredOutputModel_Google", + "StructuredOutputModel_Openai", + "StructuredOutputPaginatedResponse", + "StructuredOutputType", + "Subscription", + "SubscriptionLimits", + "SubscriptionMinutesIncludedResetFrequency", + "SubscriptionStatus", + "SubscriptionType", "SuccessEvaluationPlan", "SuccessEvaluationPlanRubric", "SummaryPlan", + "SupabaseBucketPlan", + "SupabaseBucketPlanRegion", + "SupabaseCredential", + "SupabaseCredentialProvider", "SyncVoiceLibraryDto", "SyncVoiceLibraryDtoProvidersItem", "SystemMessage", "TalkscriberTranscriber", "TalkscriberTranscriberLanguage", + "TalkscriberTranscriberModel", + "TargetPlan", + "TavusConversationProperties", + "TavusCredential", + "TavusCredentialProvider", + "TavusVoice", + "TavusVoiceVoiceId", + "TavusVoiceVoiceIdZero", + "TelnyxPhoneNumber", + "TelnyxPhoneNumberFallbackDestination", + "TelnyxPhoneNumberFallbackDestination_Number", + "TelnyxPhoneNumberFallbackDestination_Sip", + "TelnyxPhoneNumberHooksItem", + "TelnyxPhoneNumberHooksItem_CallEnding", + "TelnyxPhoneNumberHooksItem_CallRinging", + "TelnyxPhoneNumberStatus", "Template", "TemplateDetails", + "TemplateDetails_ApiRequest", + "TemplateDetails_Bash", + "TemplateDetails_Code", + "TemplateDetails_Computer", + "TemplateDetails_Dtmf", + "TemplateDetails_EndCall", + "TemplateDetails_Function", + "TemplateDetails_GohighlevelCalendarAvailabilityCheck", + "TemplateDetails_GohighlevelCalendarEventCreate", + "TemplateDetails_GohighlevelContactCreate", + "TemplateDetails_GohighlevelContactGet", + "TemplateDetails_GoogleCalendarAvailabilityCheck", + "TemplateDetails_GoogleCalendarEventCreate", + "TemplateDetails_GoogleSheetsRowAppend", + "TemplateDetails_Handoff", + "TemplateDetails_Mcp", + "TemplateDetails_Query", + "TemplateDetails_SipRequest", + "TemplateDetails_SlackMessageSend", + "TemplateDetails_Sms", + "TemplateDetails_TextEditor", + "TemplateDetails_TransferCall", + "TemplateDetails_Voicemail", "TemplateProvider", "TemplateProviderDetails", + "TemplateProviderDetails_Function", + "TemplateProviderDetails_Ghl", + "TemplateProviderDetails_GohighlevelCalendarAvailabilityCheck", + "TemplateProviderDetails_GohighlevelCalendarEventCreate", + "TemplateProviderDetails_GohighlevelContactCreate", + "TemplateProviderDetails_GohighlevelContactGet", + "TemplateProviderDetails_GoogleCalendarEventCreate", + "TemplateProviderDetails_GoogleSheetsRowAppend", + "TemplateProviderDetails_Make", + "TemplateType", "TemplateVisibility", + "TestSuite", + "TestSuitePhoneNumber", + "TestSuitePhoneNumberProvider", + "TestSuiteRun", + "TestSuiteRunScorerAi", + "TestSuiteRunScorerAiResult", + "TestSuiteRunScorerAiType", + "TestSuiteRunStatus", + "TestSuiteRunTestAttempt", + "TestSuiteRunTestAttemptCall", + "TestSuiteRunTestAttemptMetadata", + "TestSuiteRunTestResult", + "TestSuiteRunsPaginatedResponse", + "TestSuiteTestChat", + "TestSuiteTestScorerAi", + "TestSuiteTestScorerAiType", + "TestSuiteTestVoice", + "TestSuiteTestVoiceType", + "TestSuiteTestsPaginatedResponse", + "TestSuiteTestsPaginatedResponseResultsItem", + "TestSuiteTestsPaginatedResponseResultsItem_Chat", + "TestSuiteTestsPaginatedResponseResultsItem_Voice", + "TestSuitesPaginatedResponse", + "TesterPlan", + "TextContent", + "TextContentLanguage", + "TextContentType", + "TextEditorTool", + "TextEditorToolMessagesItem", + "TextEditorToolMessagesItem_RequestComplete", + "TextEditorToolMessagesItem_RequestFailed", + "TextEditorToolMessagesItem_RequestResponseDelayed", + "TextEditorToolMessagesItem_RequestStart", + "TextEditorToolName", + "TextEditorToolSubType", + "TextEditorToolWithToolCall", + "TextEditorToolWithToolCallMessagesItem", + "TextEditorToolWithToolCallMessagesItem_RequestComplete", + "TextEditorToolWithToolCallMessagesItem_RequestFailed", + "TextEditorToolWithToolCallMessagesItem_RequestResponseDelayed", + "TextEditorToolWithToolCallMessagesItem_RequestStart", + "TextEditorToolWithToolCallName", + "TextEditorToolWithToolCallSubType", + "TextInsight", + "TextInsightFromCallTable", + "TextInsightFromCallTableQueriesItem", + "TextInsightFromCallTableType", + "TextInsightQueriesItem", "TimeRange", "TimeRangeStep", "TogetherAiCredential", + "TogetherAiCredentialProvider", "TogetherAiModel", "TogetherAiModelToolsItem", + "TogetherAiModelToolsItem_ApiRequest", + "TogetherAiModelToolsItem_Bash", + "TogetherAiModelToolsItem_Code", + "TogetherAiModelToolsItem_Computer", + "TogetherAiModelToolsItem_Dtmf", + "TogetherAiModelToolsItem_EndCall", + "TogetherAiModelToolsItem_Function", + "TogetherAiModelToolsItem_GohighlevelCalendarAvailabilityCheck", + "TogetherAiModelToolsItem_GohighlevelCalendarEventCreate", + "TogetherAiModelToolsItem_GohighlevelContactCreate", + "TogetherAiModelToolsItem_GohighlevelContactGet", + "TogetherAiModelToolsItem_GoogleCalendarAvailabilityCheck", + "TogetherAiModelToolsItem_GoogleCalendarEventCreate", + "TogetherAiModelToolsItem_GoogleSheetsRowAppend", + "TogetherAiModelToolsItem_Handoff", + "TogetherAiModelToolsItem_Mcp", + "TogetherAiModelToolsItem_Query", + "TogetherAiModelToolsItem_SipRequest", + "TogetherAiModelToolsItem_SlackMessageSend", + "TogetherAiModelToolsItem_Sms", + "TogetherAiModelToolsItem_TextEditor", + "TogetherAiModelToolsItem_TransferCall", + "TogetherAiModelToolsItem_Voicemail", "Token", "TokenRestrictions", "TokenTag", "ToolCall", - "ToolCallBlock", - "ToolCallBlockMessagesItem", - "ToolCallBlockTool", "ToolCallFunction", + "ToolCallHookAction", + "ToolCallHookActionTool", + "ToolCallHookActionTool_ApiRequest", + "ToolCallHookActionTool_Bash", + "ToolCallHookActionTool_Code", + "ToolCallHookActionTool_Computer", + "ToolCallHookActionTool_Dtmf", + "ToolCallHookActionTool_EndCall", + "ToolCallHookActionTool_Function", + "ToolCallHookActionTool_GohighlevelCalendarAvailabilityCheck", + "ToolCallHookActionTool_GohighlevelCalendarEventCreate", + "ToolCallHookActionTool_GohighlevelContactCreate", + "ToolCallHookActionTool_GohighlevelContactGet", + "ToolCallHookActionTool_GoogleCalendarAvailabilityCheck", + "ToolCallHookActionTool_GoogleCalendarEventCreate", + "ToolCallHookActionTool_GoogleSheetsRowAppend", + "ToolCallHookActionTool_Handoff", + "ToolCallHookActionTool_Mcp", + "ToolCallHookActionTool_Query", + "ToolCallHookActionTool_SipRequest", + "ToolCallHookActionTool_SlackMessageSend", + "ToolCallHookActionTool_Sms", + "ToolCallHookActionTool_TextEditor", + "ToolCallHookActionTool_TransferCall", + "ToolCallHookActionTool_Voicemail", + "ToolCallHookActionType", "ToolCallMessage", "ToolCallResult", "ToolCallResultMessage", - "ToolCallResultMessageItem", + "ToolMessage", "ToolMessageComplete", "ToolMessageCompleteRole", "ToolMessageDelayed", "ToolMessageFailed", + "ToolMessageRole", "ToolMessageStart", + "ToolNode", + "ToolNodeTool", + "ToolNodeTool_ApiRequest", + "ToolNodeTool_Bash", + "ToolNodeTool_Code", + "ToolNodeTool_Computer", + "ToolNodeTool_Dtmf", + "ToolNodeTool_EndCall", + "ToolNodeTool_Function", + "ToolNodeTool_GohighlevelCalendarAvailabilityCheck", + "ToolNodeTool_GohighlevelCalendarEventCreate", + "ToolNodeTool_GohighlevelContactCreate", + "ToolNodeTool_GohighlevelContactGet", + "ToolNodeTool_GoogleCalendarAvailabilityCheck", + "ToolNodeTool_GoogleCalendarEventCreate", + "ToolNodeTool_GoogleSheetsRowAppend", + "ToolNodeTool_Handoff", + "ToolNodeTool_Mcp", + "ToolNodeTool_Query", + "ToolNodeTool_SipRequest", + "ToolNodeTool_SlackMessageSend", + "ToolNodeTool_Sms", + "ToolNodeTool_TextEditor", + "ToolNodeTool_TransferCall", + "ToolNodeTool_Voicemail", + "ToolParameter", + "ToolParameterValue", + "ToolRejectionPlan", + "ToolRejectionPlanConditionsItem", + "ToolRejectionPlanConditionsItem_Group", + "ToolRejectionPlanConditionsItem_Liquid", + "ToolRejectionPlanConditionsItem_Regex", "ToolTemplateMetadata", "ToolTemplateSetup", - "ToolsCreateRequest", - "ToolsCreateResponse", - "ToolsDeleteResponse", - "ToolsGetResponse", - "ToolsListResponseItem", - "ToolsUpdateResponse", "TranscriberCost", "TranscriptPlan", "TranscriptionEndpointingPlan", + "TransferAssistant", + "TransferAssistantBackgroundSound", + "TransferAssistantBackgroundSoundZero", + "TransferAssistantFirstMessageMode", + "TransferAssistantHookAction", + "TransferAssistantModel", + "TransferAssistantModelProvider", + "TransferAssistantTranscriber", + "TransferAssistantTranscriber_11Labs", + "TransferAssistantTranscriber_AssemblyAi", + "TransferAssistantTranscriber_Azure", + "TransferAssistantTranscriber_Cartesia", + "TransferAssistantTranscriber_CustomTranscriber", + "TransferAssistantTranscriber_Deepgram", + "TransferAssistantTranscriber_Gladia", + "TransferAssistantTranscriber_Google", + "TransferAssistantTranscriber_Openai", + "TransferAssistantTranscriber_Soniox", + "TransferAssistantTranscriber_Speechmatics", + "TransferAssistantTranscriber_Talkscriber", + "TransferAssistantVoice", + "TransferAssistantVoice_11Labs", + "TransferAssistantVoice_Azure", + "TransferAssistantVoice_Cartesia", + "TransferAssistantVoice_CustomVoice", + "TransferAssistantVoice_Deepgram", + "TransferAssistantVoice_Hume", + "TransferAssistantVoice_Inworld", + "TransferAssistantVoice_Lmnt", + "TransferAssistantVoice_Minimax", + "TransferAssistantVoice_Neuphonic", + "TransferAssistantVoice_Openai", + "TransferAssistantVoice_Playht", + "TransferAssistantVoice_RimeAi", + "TransferAssistantVoice_Sesame", + "TransferAssistantVoice_SmallestAi", + "TransferAssistantVoice_Tavus", + "TransferAssistantVoice_Vapi", + "TransferAssistantVoice_Wellsaid", "TransferCallTool", "TransferCallToolDestinationsItem", + "TransferCallToolDestinationsItem_Assistant", + "TransferCallToolDestinationsItem_Number", + "TransferCallToolDestinationsItem_Sip", "TransferCallToolMessagesItem", + "TransferCallToolMessagesItem_RequestComplete", + "TransferCallToolMessagesItem_RequestFailed", + "TransferCallToolMessagesItem_RequestResponseDelayed", + "TransferCallToolMessagesItem_RequestStart", + "TransferCancelToolUserEditable", + "TransferCancelToolUserEditableMessagesItem", + "TransferCancelToolUserEditableMessagesItem_RequestComplete", + "TransferCancelToolUserEditableMessagesItem_RequestFailed", + "TransferCancelToolUserEditableMessagesItem_RequestResponseDelayed", + "TransferCancelToolUserEditableMessagesItem_RequestStart", + "TransferCancelToolUserEditableType", "TransferDestinationAssistant", + "TransferDestinationAssistantMessage", + "TransferDestinationAssistantType", "TransferDestinationNumber", + "TransferDestinationNumberMessage", "TransferDestinationSip", - "TransferDestinationStep", + "TransferDestinationSipMessage", + "TransferFallbackPlan", + "TransferFallbackPlanMessage", + "TransferHookAction", + "TransferHookActionDestination", + "TransferHookActionDestination_Number", + "TransferHookActionDestination_Sip", + "TransferHookActionType", "TransferMode", + "TransferPhoneNumberHookAction", + "TransferPhoneNumberHookActionDestination", + "TransferPhoneNumberHookActionDestination_Number", + "TransferPhoneNumberHookActionDestination_Sip", + "TransferPlan", + "TransferPlanContextEngineeringPlan", + "TransferPlanContextEngineeringPlan_All", + "TransferPlanContextEngineeringPlan_LastNMessages", + "TransferPlanContextEngineeringPlan_None", + "TransferPlanMessage", + "TransferPlanMode", + "TransferSuccessfulToolUserEditable", + "TransferSuccessfulToolUserEditableMessagesItem", + "TransferSuccessfulToolUserEditableMessagesItem_RequestComplete", + "TransferSuccessfulToolUserEditableMessagesItem_RequestFailed", + "TransferSuccessfulToolUserEditableMessagesItem_RequestResponseDelayed", + "TransferSuccessfulToolUserEditableMessagesItem_RequestStart", + "TransferSuccessfulToolUserEditableType", "TransportConfigurationTwilio", + "TransportConfigurationTwilioProvider", "TransportConfigurationTwilioRecordingChannels", "TransportCost", + "TransportCostProvider", + "TrieveCredential", + "TrieveCredentialProvider", + "TrieveKnowledgeBase", + "TrieveKnowledgeBaseChunkPlan", + "TrieveKnowledgeBaseCreate", + "TrieveKnowledgeBaseCreateType", + "TrieveKnowledgeBaseImport", + "TrieveKnowledgeBaseImportType", + "TrieveKnowledgeBaseProvider", + "TrieveKnowledgeBaseSearchPlan", + "TrieveKnowledgeBaseSearchPlanSearchType", + "TurnLatency", "TwilioCredential", + "TwilioCredentialProvider", "TwilioPhoneNumber", "TwilioPhoneNumberFallbackDestination", - "TwilioVoicemailDetection", - "TwilioVoicemailDetectionVoicemailDetectionTypesItem", + "TwilioPhoneNumberFallbackDestination_Number", + "TwilioPhoneNumberFallbackDestination_Sip", + "TwilioPhoneNumberHooksItem", + "TwilioPhoneNumberHooksItem_CallEnding", + "TwilioPhoneNumberHooksItem_CallRinging", + "TwilioPhoneNumberStatus", + "TwilioSmsChatTransport", + "TwilioSmsChatTransportConversationType", + "TwilioSmsChatTransportType", + "TwilioTransportMessage", + "TwilioVoicemailDetectionPlan", + "TwilioVoicemailDetectionPlanProvider", + "TwilioVoicemailDetectionPlanVoicemailDetectionTypesItem", + "UpdateAnthropicBedrockCredentialDto", + "UpdateAnthropicBedrockCredentialDtoAuthenticationPlan", + "UpdateAnthropicBedrockCredentialDtoAuthenticationPlan_AwsIam", + "UpdateAnthropicBedrockCredentialDtoAuthenticationPlan_AwsSts", + "UpdateAnthropicBedrockCredentialDtoRegion", "UpdateAnthropicCredentialDto", "UpdateAnyscaleCredentialDto", + "UpdateApiRequestToolDto", + "UpdateApiRequestToolDtoMessagesItem", + "UpdateApiRequestToolDtoMessagesItem_RequestComplete", + "UpdateApiRequestToolDtoMessagesItem_RequestFailed", + "UpdateApiRequestToolDtoMessagesItem_RequestResponseDelayed", + "UpdateApiRequestToolDtoMessagesItem_RequestStart", + "UpdateApiRequestToolDtoMethod", + "UpdateAssemblyAiCredentialDto", "UpdateAssistantDtoBackgroundSound", + "UpdateAssistantDtoBackgroundSoundZero", "UpdateAssistantDtoClientMessagesItem", + "UpdateAssistantDtoCredentialsItem", + "UpdateAssistantDtoCredentialsItem_11Labs", + "UpdateAssistantDtoCredentialsItem_Anthropic", + "UpdateAssistantDtoCredentialsItem_AnthropicBedrock", + "UpdateAssistantDtoCredentialsItem_Anyscale", + "UpdateAssistantDtoCredentialsItem_AssemblyAi", + "UpdateAssistantDtoCredentialsItem_Azure", + "UpdateAssistantDtoCredentialsItem_AzureOpenai", + "UpdateAssistantDtoCredentialsItem_ByoSipTrunk", + "UpdateAssistantDtoCredentialsItem_Cartesia", + "UpdateAssistantDtoCredentialsItem_Cerebras", + "UpdateAssistantDtoCredentialsItem_Cloudflare", + "UpdateAssistantDtoCredentialsItem_CustomCredential", + "UpdateAssistantDtoCredentialsItem_CustomLlm", + "UpdateAssistantDtoCredentialsItem_DeepSeek", + "UpdateAssistantDtoCredentialsItem_Deepgram", + "UpdateAssistantDtoCredentialsItem_Deepinfra", + "UpdateAssistantDtoCredentialsItem_Email", + "UpdateAssistantDtoCredentialsItem_Gcp", + "UpdateAssistantDtoCredentialsItem_GhlOauth2Authorization", + "UpdateAssistantDtoCredentialsItem_Gladia", + "UpdateAssistantDtoCredentialsItem_Gohighlevel", + "UpdateAssistantDtoCredentialsItem_Google", + "UpdateAssistantDtoCredentialsItem_GoogleCalendarOauth2Authorization", + "UpdateAssistantDtoCredentialsItem_GoogleCalendarOauth2Client", + "UpdateAssistantDtoCredentialsItem_GoogleSheetsOauth2Authorization", + "UpdateAssistantDtoCredentialsItem_Groq", + "UpdateAssistantDtoCredentialsItem_Hume", + "UpdateAssistantDtoCredentialsItem_InflectionAi", + "UpdateAssistantDtoCredentialsItem_Inworld", + "UpdateAssistantDtoCredentialsItem_Langfuse", + "UpdateAssistantDtoCredentialsItem_Lmnt", + "UpdateAssistantDtoCredentialsItem_Make", + "UpdateAssistantDtoCredentialsItem_Minimax", + "UpdateAssistantDtoCredentialsItem_Mistral", + "UpdateAssistantDtoCredentialsItem_Neuphonic", + "UpdateAssistantDtoCredentialsItem_Openai", + "UpdateAssistantDtoCredentialsItem_Openrouter", + "UpdateAssistantDtoCredentialsItem_PerplexityAi", + "UpdateAssistantDtoCredentialsItem_Playht", + "UpdateAssistantDtoCredentialsItem_RimeAi", + "UpdateAssistantDtoCredentialsItem_Runpod", + "UpdateAssistantDtoCredentialsItem_S3", + "UpdateAssistantDtoCredentialsItem_SlackOauth2Authorization", + "UpdateAssistantDtoCredentialsItem_SlackWebhook", + "UpdateAssistantDtoCredentialsItem_SmallestAi", + "UpdateAssistantDtoCredentialsItem_Soniox", + "UpdateAssistantDtoCredentialsItem_Speechmatics", + "UpdateAssistantDtoCredentialsItem_Supabase", + "UpdateAssistantDtoCredentialsItem_Tavus", + "UpdateAssistantDtoCredentialsItem_TogetherAi", + "UpdateAssistantDtoCredentialsItem_Trieve", + "UpdateAssistantDtoCredentialsItem_Twilio", + "UpdateAssistantDtoCredentialsItem_Vonage", + "UpdateAssistantDtoCredentialsItem_Webhook", + "UpdateAssistantDtoCredentialsItem_Wellsaid", + "UpdateAssistantDtoCredentialsItem_Xai", "UpdateAssistantDtoFirstMessageMode", + "UpdateAssistantDtoHooksItem", "UpdateAssistantDtoModel", + "UpdateAssistantDtoModel_Anthropic", + "UpdateAssistantDtoModel_AnthropicBedrock", + "UpdateAssistantDtoModel_Anyscale", + "UpdateAssistantDtoModel_Cerebras", + "UpdateAssistantDtoModel_CustomLlm", + "UpdateAssistantDtoModel_DeepSeek", + "UpdateAssistantDtoModel_Deepinfra", + "UpdateAssistantDtoModel_Google", + "UpdateAssistantDtoModel_Groq", + "UpdateAssistantDtoModel_InflectionAi", + "UpdateAssistantDtoModel_Minimax", + "UpdateAssistantDtoModel_Openai", + "UpdateAssistantDtoModel_Openrouter", + "UpdateAssistantDtoModel_PerplexityAi", + "UpdateAssistantDtoModel_TogetherAi", + "UpdateAssistantDtoModel_Xai", "UpdateAssistantDtoServerMessagesItem", "UpdateAssistantDtoTranscriber", + "UpdateAssistantDtoTranscriber_11Labs", + "UpdateAssistantDtoTranscriber_AssemblyAi", + "UpdateAssistantDtoTranscriber_Azure", + "UpdateAssistantDtoTranscriber_Cartesia", + "UpdateAssistantDtoTranscriber_CustomTranscriber", + "UpdateAssistantDtoTranscriber_Deepgram", + "UpdateAssistantDtoTranscriber_Gladia", + "UpdateAssistantDtoTranscriber_Google", + "UpdateAssistantDtoTranscriber_Openai", + "UpdateAssistantDtoTranscriber_Soniox", + "UpdateAssistantDtoTranscriber_Speechmatics", + "UpdateAssistantDtoTranscriber_Talkscriber", "UpdateAssistantDtoVoice", + "UpdateAssistantDtoVoice_11Labs", + "UpdateAssistantDtoVoice_Azure", + "UpdateAssistantDtoVoice_Cartesia", + "UpdateAssistantDtoVoice_CustomVoice", + "UpdateAssistantDtoVoice_Deepgram", + "UpdateAssistantDtoVoice_Hume", + "UpdateAssistantDtoVoice_Inworld", + "UpdateAssistantDtoVoice_Lmnt", + "UpdateAssistantDtoVoice_Minimax", + "UpdateAssistantDtoVoice_Neuphonic", + "UpdateAssistantDtoVoice_Openai", + "UpdateAssistantDtoVoice_Playht", + "UpdateAssistantDtoVoice_RimeAi", + "UpdateAssistantDtoVoice_Sesame", + "UpdateAssistantDtoVoice_SmallestAi", + "UpdateAssistantDtoVoice_Tavus", + "UpdateAssistantDtoVoice_Vapi", + "UpdateAssistantDtoVoice_Wellsaid", + "UpdateAssistantDtoVoicemailDetection", + "UpdateAssistantDtoVoicemailDetectionZero", + "UpdateAzureCredentialDto", + "UpdateAzureCredentialDtoRegion", + "UpdateAzureCredentialDtoService", "UpdateAzureOpenAiCredentialDto", "UpdateAzureOpenAiCredentialDtoModelsItem", "UpdateAzureOpenAiCredentialDtoRegion", - "UpdateBlockDtoMessagesItem", - "UpdateBlockDtoStepsItem", - "UpdateBlockDtoTool", + "UpdateBarInsightFromCallTableDto", + "UpdateBarInsightFromCallTableDtoGroupBy", + "UpdateBarInsightFromCallTableDtoQueriesItem", + "UpdateBashToolDto", + "UpdateBashToolDtoMessagesItem", + "UpdateBashToolDtoMessagesItem_RequestComplete", + "UpdateBashToolDtoMessagesItem_RequestFailed", + "UpdateBashToolDtoMessagesItem_RequestResponseDelayed", + "UpdateBashToolDtoMessagesItem_RequestStart", + "UpdateBashToolDtoName", + "UpdateBashToolDtoSubType", + "UpdateByoPhoneNumberDto", + "UpdateByoPhoneNumberDtoFallbackDestination", + "UpdateByoPhoneNumberDtoFallbackDestination_Number", + "UpdateByoPhoneNumberDtoFallbackDestination_Sip", + "UpdateByoPhoneNumberDtoHooksItem", + "UpdateByoPhoneNumberDtoHooksItem_CallEnding", + "UpdateByoPhoneNumberDtoHooksItem_CallRinging", "UpdateByoSipTrunkCredentialDto", + "UpdateCampaignDtoStatus", "UpdateCartesiaCredentialDto", + "UpdateCerebrasCredentialDto", + "UpdateCloudflareCredentialDto", + "UpdateCodeToolDto", + "UpdateCodeToolDtoMessagesItem", + "UpdateCodeToolDtoMessagesItem_RequestComplete", + "UpdateCodeToolDtoMessagesItem_RequestFailed", + "UpdateCodeToolDtoMessagesItem_RequestResponseDelayed", + "UpdateCodeToolDtoMessagesItem_RequestStart", + "UpdateComputerToolDto", + "UpdateComputerToolDtoMessagesItem", + "UpdateComputerToolDtoMessagesItem_RequestComplete", + "UpdateComputerToolDtoMessagesItem_RequestFailed", + "UpdateComputerToolDtoMessagesItem_RequestResponseDelayed", + "UpdateComputerToolDtoMessagesItem_RequestStart", + "UpdateComputerToolDtoName", + "UpdateComputerToolDtoSubType", + "UpdateCustomCredentialDto", + "UpdateCustomCredentialDtoAuthenticationPlan", + "UpdateCustomCredentialDtoAuthenticationPlan_Bearer", + "UpdateCustomCredentialDtoAuthenticationPlan_Hmac", + "UpdateCustomCredentialDtoAuthenticationPlan_Oauth2", + "UpdateCustomCredentialDtoEncryptionPlan", + "UpdateCustomCredentialDtoEncryptionPlan_PublicKey", + "UpdateCustomKnowledgeBaseDto", "UpdateCustomLlmCredentialDto", "UpdateDeepInfraCredentialDto", + "UpdateDeepSeekCredentialDto", "UpdateDeepgramCredentialDto", + "UpdateDtmfToolDto", + "UpdateDtmfToolDtoMessagesItem", + "UpdateDtmfToolDtoMessagesItem_RequestComplete", + "UpdateDtmfToolDtoMessagesItem_RequestFailed", + "UpdateDtmfToolDtoMessagesItem_RequestResponseDelayed", + "UpdateDtmfToolDtoMessagesItem_RequestStart", "UpdateElevenLabsCredentialDto", + "UpdateEmailCredentialDto", + "UpdateEndCallToolDto", + "UpdateEndCallToolDtoMessagesItem", + "UpdateEndCallToolDtoMessagesItem_RequestComplete", + "UpdateEndCallToolDtoMessagesItem_RequestFailed", + "UpdateEndCallToolDtoMessagesItem_RequestResponseDelayed", + "UpdateEndCallToolDtoMessagesItem_RequestStart", + "UpdateEvalDtoMessagesItem", + "UpdateEvalDtoType", + "UpdateFunctionToolDto", + "UpdateFunctionToolDtoMessagesItem", + "UpdateFunctionToolDtoMessagesItem_RequestComplete", + "UpdateFunctionToolDtoMessagesItem_RequestFailed", + "UpdateFunctionToolDtoMessagesItem_RequestResponseDelayed", + "UpdateFunctionToolDtoMessagesItem_RequestStart", "UpdateGcpCredentialDto", + "UpdateGhlToolDto", + "UpdateGhlToolDtoMessagesItem", + "UpdateGhlToolDtoMessagesItem_RequestComplete", + "UpdateGhlToolDtoMessagesItem_RequestFailed", + "UpdateGhlToolDtoMessagesItem_RequestResponseDelayed", + "UpdateGhlToolDtoMessagesItem_RequestStart", "UpdateGladiaCredentialDto", + "UpdateGoHighLevelCalendarAvailabilityToolDto", + "UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem", + "UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestComplete", + "UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestFailed", + "UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestResponseDelayed", + "UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestStart", + "UpdateGoHighLevelCalendarEventCreateToolDto", + "UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem", + "UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestComplete", + "UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestFailed", + "UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestResponseDelayed", + "UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestStart", + "UpdateGoHighLevelContactCreateToolDto", + "UpdateGoHighLevelContactCreateToolDtoMessagesItem", + "UpdateGoHighLevelContactCreateToolDtoMessagesItem_RequestComplete", + "UpdateGoHighLevelContactCreateToolDtoMessagesItem_RequestFailed", + "UpdateGoHighLevelContactCreateToolDtoMessagesItem_RequestResponseDelayed", + "UpdateGoHighLevelContactCreateToolDtoMessagesItem_RequestStart", + "UpdateGoHighLevelContactGetToolDto", + "UpdateGoHighLevelContactGetToolDtoMessagesItem", + "UpdateGoHighLevelContactGetToolDtoMessagesItem_RequestComplete", + "UpdateGoHighLevelContactGetToolDtoMessagesItem_RequestFailed", + "UpdateGoHighLevelContactGetToolDtoMessagesItem_RequestResponseDelayed", + "UpdateGoHighLevelContactGetToolDtoMessagesItem_RequestStart", "UpdateGoHighLevelCredentialDto", + "UpdateGoHighLevelMcpCredentialDto", + "UpdateGoogleCalendarCheckAvailabilityToolDto", + "UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem", + "UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestComplete", + "UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestFailed", + "UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestResponseDelayed", + "UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestStart", + "UpdateGoogleCalendarCreateEventToolDto", + "UpdateGoogleCalendarCreateEventToolDtoMessagesItem", + "UpdateGoogleCalendarCreateEventToolDtoMessagesItem_RequestComplete", + "UpdateGoogleCalendarCreateEventToolDtoMessagesItem_RequestFailed", + "UpdateGoogleCalendarCreateEventToolDtoMessagesItem_RequestResponseDelayed", + "UpdateGoogleCalendarCreateEventToolDtoMessagesItem_RequestStart", + "UpdateGoogleCalendarOAuth2AuthorizationCredentialDto", + "UpdateGoogleCalendarOAuth2ClientCredentialDto", + "UpdateGoogleCredentialDto", + "UpdateGoogleSheetsOAuth2AuthorizationCredentialDto", + "UpdateGoogleSheetsRowAppendToolDto", + "UpdateGoogleSheetsRowAppendToolDtoMessagesItem", + "UpdateGoogleSheetsRowAppendToolDtoMessagesItem_RequestComplete", + "UpdateGoogleSheetsRowAppendToolDtoMessagesItem_RequestFailed", + "UpdateGoogleSheetsRowAppendToolDtoMessagesItem_RequestResponseDelayed", + "UpdateGoogleSheetsRowAppendToolDtoMessagesItem_RequestStart", "UpdateGroqCredentialDto", + "UpdateHandoffToolDto", + "UpdateHandoffToolDtoDestinationsItem", + "UpdateHandoffToolDtoDestinationsItem_Assistant", + "UpdateHandoffToolDtoDestinationsItem_Dynamic", + "UpdateHandoffToolDtoDestinationsItem_Squad", + "UpdateHandoffToolDtoMessagesItem", + "UpdateHandoffToolDtoMessagesItem_RequestComplete", + "UpdateHandoffToolDtoMessagesItem_RequestFailed", + "UpdateHandoffToolDtoMessagesItem_RequestResponseDelayed", + "UpdateHandoffToolDtoMessagesItem_RequestStart", + "UpdateHumeCredentialDto", + "UpdateInflectionAiCredentialDto", + "UpdateInworldCredentialDto", + "UpdateLangfuseCredentialDto", + "UpdateLineInsightFromCallTableDto", + "UpdateLineInsightFromCallTableDtoGroupBy", + "UpdateLineInsightFromCallTableDtoQueriesItem", "UpdateLmntCredentialDto", "UpdateMakeCredentialDto", + "UpdateMakeToolDto", + "UpdateMakeToolDtoMessagesItem", + "UpdateMakeToolDtoMessagesItem_RequestComplete", + "UpdateMakeToolDtoMessagesItem_RequestFailed", + "UpdateMakeToolDtoMessagesItem_RequestResponseDelayed", + "UpdateMakeToolDtoMessagesItem_RequestStart", + "UpdateMcpToolDto", + "UpdateMcpToolDtoMessagesItem", + "UpdateMcpToolDtoMessagesItem_RequestComplete", + "UpdateMcpToolDtoMessagesItem_RequestFailed", + "UpdateMcpToolDtoMessagesItem_RequestResponseDelayed", + "UpdateMcpToolDtoMessagesItem_RequestStart", + "UpdateMistralCredentialDto", + "UpdateNeuphonicCredentialDto", "UpdateOpenAiCredentialDto", "UpdateOpenRouterCredentialDto", "UpdateOrgDto", + "UpdateOrgDtoChannel", + "UpdateOutputToolDto", + "UpdateOutputToolDtoMessagesItem", + "UpdateOutputToolDtoMessagesItem_RequestComplete", + "UpdateOutputToolDtoMessagesItem_RequestFailed", + "UpdateOutputToolDtoMessagesItem_RequestResponseDelayed", + "UpdateOutputToolDtoMessagesItem_RequestStart", "UpdatePerplexityAiCredentialDto", - "UpdatePhoneNumberDtoFallbackDestination", + "UpdatePersonalityDto", + "UpdatePhoneNumbersRequestBody", + "UpdatePhoneNumbersRequestBody_ByoPhoneNumber", + "UpdatePhoneNumbersRequestBody_Telnyx", + "UpdatePhoneNumbersRequestBody_Twilio", + "UpdatePhoneNumbersRequestBody_Vapi", + "UpdatePhoneNumbersRequestBody_Vonage", + "UpdatePhoneNumbersResponse", + "UpdatePhoneNumbersResponse_ByoPhoneNumber", + "UpdatePhoneNumbersResponse_Telnyx", + "UpdatePhoneNumbersResponse_Twilio", + "UpdatePhoneNumbersResponse_Vapi", + "UpdatePhoneNumbersResponse_Vonage", + "UpdatePieInsightFromCallTableDto", + "UpdatePieInsightFromCallTableDtoGroupBy", + "UpdatePieInsightFromCallTableDtoQueriesItem", "UpdatePlayHtCredentialDto", + "UpdateQueryToolDto", + "UpdateQueryToolDtoMessagesItem", + "UpdateQueryToolDtoMessagesItem_RequestComplete", + "UpdateQueryToolDtoMessagesItem_RequestFailed", + "UpdateQueryToolDtoMessagesItem_RequestResponseDelayed", + "UpdateQueryToolDtoMessagesItem_RequestStart", "UpdateRimeAiCredentialDto", "UpdateRunpodCredentialDto", "UpdateS3CredentialDto", + "UpdateScenarioDto", + "UpdateScenarioDtoHooksItem", + "UpdateScenarioDtoHooksItem_SimulationRunEnded", + "UpdateScenarioDtoHooksItem_SimulationRunStarted", + "UpdateSessionDtoMessagesItem", + "UpdateSessionDtoStatus", + "UpdateSimulationDto", + "UpdateSimulationSuiteDto", + "UpdateSipRequestToolDto", + "UpdateSipRequestToolDtoBody", + "UpdateSipRequestToolDtoMessagesItem", + "UpdateSipRequestToolDtoMessagesItem_RequestComplete", + "UpdateSipRequestToolDtoMessagesItem_RequestFailed", + "UpdateSipRequestToolDtoMessagesItem_RequestResponseDelayed", + "UpdateSipRequestToolDtoMessagesItem_RequestStart", + "UpdateSipRequestToolDtoVerb", + "UpdateSlackOAuth2AuthorizationCredentialDto", + "UpdateSlackSendMessageToolDto", + "UpdateSlackSendMessageToolDtoMessagesItem", + "UpdateSlackSendMessageToolDtoMessagesItem_RequestComplete", + "UpdateSlackSendMessageToolDtoMessagesItem_RequestFailed", + "UpdateSlackSendMessageToolDtoMessagesItem_RequestResponseDelayed", + "UpdateSlackSendMessageToolDtoMessagesItem_RequestStart", + "UpdateSlackWebhookCredentialDto", + "UpdateSmsToolDto", + "UpdateSmsToolDtoMessagesItem", + "UpdateSmsToolDtoMessagesItem_RequestComplete", + "UpdateSmsToolDtoMessagesItem_RequestFailed", + "UpdateSmsToolDtoMessagesItem_RequestResponseDelayed", + "UpdateSmsToolDtoMessagesItem_RequestStart", + "UpdateSonioxCredentialDto", + "UpdateStructuredOutputDtoModel", + "UpdateStructuredOutputDtoModel_Anthropic", + "UpdateStructuredOutputDtoModel_AnthropicBedrock", + "UpdateStructuredOutputDtoModel_CustomLlm", + "UpdateStructuredOutputDtoModel_Google", + "UpdateStructuredOutputDtoModel_Openai", + "UpdateStructuredOutputDtoType", + "UpdateTelnyxPhoneNumberDto", + "UpdateTelnyxPhoneNumberDtoFallbackDestination", + "UpdateTelnyxPhoneNumberDtoFallbackDestination_Number", + "UpdateTelnyxPhoneNumberDtoFallbackDestination_Sip", + "UpdateTelnyxPhoneNumberDtoHooksItem", + "UpdateTelnyxPhoneNumberDtoHooksItem_CallEnding", + "UpdateTelnyxPhoneNumberDtoHooksItem_CallRinging", + "UpdateTestSuiteDto", + "UpdateTestSuiteRunDto", + "UpdateTestSuiteTestChatDto", + "UpdateTestSuiteTestChatDtoType", + "UpdateTestSuiteTestVoiceDto", + "UpdateTestSuiteTestVoiceDtoType", + "UpdateTextEditorToolDto", + "UpdateTextEditorToolDtoMessagesItem", + "UpdateTextEditorToolDtoMessagesItem_RequestComplete", + "UpdateTextEditorToolDtoMessagesItem_RequestFailed", + "UpdateTextEditorToolDtoMessagesItem_RequestResponseDelayed", + "UpdateTextEditorToolDtoMessagesItem_RequestStart", + "UpdateTextEditorToolDtoName", + "UpdateTextEditorToolDtoSubType", + "UpdateTextInsightFromCallTableDto", + "UpdateTextInsightFromCallTableDtoQueriesItem", "UpdateTogetherAiCredentialDto", - "UpdateToolDtoMessagesItem", + "UpdateTokenDto", + "UpdateTokenDtoTag", "UpdateToolTemplateDto", "UpdateToolTemplateDtoDetails", + "UpdateToolTemplateDtoDetails_ApiRequest", + "UpdateToolTemplateDtoDetails_Bash", + "UpdateToolTemplateDtoDetails_Code", + "UpdateToolTemplateDtoDetails_Computer", + "UpdateToolTemplateDtoDetails_Dtmf", + "UpdateToolTemplateDtoDetails_EndCall", + "UpdateToolTemplateDtoDetails_Function", + "UpdateToolTemplateDtoDetails_GohighlevelCalendarAvailabilityCheck", + "UpdateToolTemplateDtoDetails_GohighlevelCalendarEventCreate", + "UpdateToolTemplateDtoDetails_GohighlevelContactCreate", + "UpdateToolTemplateDtoDetails_GohighlevelContactGet", + "UpdateToolTemplateDtoDetails_GoogleCalendarAvailabilityCheck", + "UpdateToolTemplateDtoDetails_GoogleCalendarEventCreate", + "UpdateToolTemplateDtoDetails_GoogleSheetsRowAppend", + "UpdateToolTemplateDtoDetails_Handoff", + "UpdateToolTemplateDtoDetails_Mcp", + "UpdateToolTemplateDtoDetails_Query", + "UpdateToolTemplateDtoDetails_SipRequest", + "UpdateToolTemplateDtoDetails_SlackMessageSend", + "UpdateToolTemplateDtoDetails_Sms", + "UpdateToolTemplateDtoDetails_TextEditor", + "UpdateToolTemplateDtoDetails_TransferCall", + "UpdateToolTemplateDtoDetails_Voicemail", "UpdateToolTemplateDtoProvider", "UpdateToolTemplateDtoProviderDetails", + "UpdateToolTemplateDtoProviderDetails_Function", + "UpdateToolTemplateDtoProviderDetails_Ghl", + "UpdateToolTemplateDtoProviderDetails_GohighlevelCalendarAvailabilityCheck", + "UpdateToolTemplateDtoProviderDetails_GohighlevelCalendarEventCreate", + "UpdateToolTemplateDtoProviderDetails_GohighlevelContactCreate", + "UpdateToolTemplateDtoProviderDetails_GohighlevelContactGet", + "UpdateToolTemplateDtoProviderDetails_GoogleCalendarEventCreate", + "UpdateToolTemplateDtoProviderDetails_GoogleSheetsRowAppend", + "UpdateToolTemplateDtoProviderDetails_Make", + "UpdateToolTemplateDtoType", "UpdateToolTemplateDtoVisibility", + "UpdateToolsRequestBody", + "UpdateToolsRequestBody_ApiRequest", + "UpdateToolsRequestBody_Bash", + "UpdateToolsRequestBody_Computer", + "UpdateToolsRequestBody_Dtmf", + "UpdateToolsRequestBody_EndCall", + "UpdateToolsRequestBody_Function", + "UpdateToolsRequestBody_GohighlevelCalendarAvailabilityCheck", + "UpdateToolsRequestBody_GohighlevelCalendarEventCreate", + "UpdateToolsRequestBody_GohighlevelContactCreate", + "UpdateToolsRequestBody_GohighlevelContactGet", + "UpdateToolsRequestBody_GoogleCalendarAvailabilityCheck", + "UpdateToolsRequestBody_GoogleCalendarEventCreate", + "UpdateToolsRequestBody_GoogleSheetsRowAppend", + "UpdateToolsRequestBody_Handoff", + "UpdateToolsRequestBody_Mcp", + "UpdateToolsRequestBody_Query", + "UpdateToolsRequestBody_SipRequest", + "UpdateToolsRequestBody_SlackMessageSend", + "UpdateToolsRequestBody_Sms", + "UpdateToolsRequestBody_TextEditor", + "UpdateToolsRequestBody_TransferCall", + "UpdateToolsRequestBody_Voicemail", + "UpdateToolsResponse", + "UpdateToolsResponse_ApiRequest", + "UpdateToolsResponse_Bash", + "UpdateToolsResponse_Code", + "UpdateToolsResponse_Computer", + "UpdateToolsResponse_Dtmf", + "UpdateToolsResponse_EndCall", + "UpdateToolsResponse_Function", + "UpdateToolsResponse_GohighlevelCalendarAvailabilityCheck", + "UpdateToolsResponse_GohighlevelCalendarEventCreate", + "UpdateToolsResponse_GohighlevelContactCreate", + "UpdateToolsResponse_GohighlevelContactGet", + "UpdateToolsResponse_GoogleCalendarAvailabilityCheck", + "UpdateToolsResponse_GoogleCalendarEventCreate", + "UpdateToolsResponse_GoogleSheetsRowAppend", + "UpdateToolsResponse_Handoff", + "UpdateToolsResponse_Mcp", + "UpdateToolsResponse_Query", + "UpdateToolsResponse_SipRequest", + "UpdateToolsResponse_SlackMessageSend", + "UpdateToolsResponse_Sms", + "UpdateToolsResponse_TextEditor", + "UpdateToolsResponse_TransferCall", + "UpdateToolsResponse_Voicemail", + "UpdateTransferCallToolDto", + "UpdateTransferCallToolDtoDestinationsItem", + "UpdateTransferCallToolDtoDestinationsItem_Assistant", + "UpdateTransferCallToolDtoDestinationsItem_Number", + "UpdateTransferCallToolDtoDestinationsItem_Sip", + "UpdateTransferCallToolDtoMessagesItem", + "UpdateTransferCallToolDtoMessagesItem_RequestComplete", + "UpdateTransferCallToolDtoMessagesItem_RequestFailed", + "UpdateTransferCallToolDtoMessagesItem_RequestResponseDelayed", + "UpdateTransferCallToolDtoMessagesItem_RequestStart", + "UpdateTrieveCredentialDto", + "UpdateTrieveKnowledgeBaseDto", "UpdateTwilioCredentialDto", + "UpdateTwilioPhoneNumberDto", + "UpdateTwilioPhoneNumberDtoFallbackDestination", + "UpdateTwilioPhoneNumberDtoFallbackDestination_Number", + "UpdateTwilioPhoneNumberDtoFallbackDestination_Sip", + "UpdateTwilioPhoneNumberDtoHooksItem", + "UpdateTwilioPhoneNumberDtoHooksItem_CallEnding", + "UpdateTwilioPhoneNumberDtoHooksItem_CallRinging", "UpdateUserRoleDto", "UpdateUserRoleDtoRole", + "UpdateVapiPhoneNumberDto", + "UpdateVapiPhoneNumberDtoFallbackDestination", + "UpdateVapiPhoneNumberDtoFallbackDestination_Number", + "UpdateVapiPhoneNumberDtoFallbackDestination_Sip", + "UpdateVapiPhoneNumberDtoHooksItem", + "UpdateVapiPhoneNumberDtoHooksItem_CallEnding", + "UpdateVapiPhoneNumberDtoHooksItem_CallRinging", + "UpdateVoicemailToolDto", + "UpdateVoicemailToolDtoMessagesItem", + "UpdateVoicemailToolDtoMessagesItem_RequestComplete", + "UpdateVoicemailToolDtoMessagesItem_RequestFailed", + "UpdateVoicemailToolDtoMessagesItem_RequestResponseDelayed", + "UpdateVoicemailToolDtoMessagesItem_RequestStart", "UpdateVonageCredentialDto", + "UpdateVonagePhoneNumberDto", + "UpdateVonagePhoneNumberDtoFallbackDestination", + "UpdateVonagePhoneNumberDtoFallbackDestination_Number", + "UpdateVonagePhoneNumberDtoFallbackDestination_Sip", + "UpdateVonagePhoneNumberDtoHooksItem", + "UpdateVonagePhoneNumberDtoHooksItem_CallEnding", + "UpdateVonagePhoneNumberDtoHooksItem_CallRinging", + "UpdateWebhookCredentialDto", + "UpdateWebhookCredentialDtoAuthenticationPlan", + "UpdateWebhookCredentialDtoAuthenticationPlan_Bearer", + "UpdateWebhookCredentialDtoAuthenticationPlan_Hmac", + "UpdateWebhookCredentialDtoAuthenticationPlan_Oauth2", + "UpdateWellSaidCredentialDto", + "UpdateWorkflowDto", + "UpdateWorkflowDtoBackgroundSound", + "UpdateWorkflowDtoBackgroundSoundZero", + "UpdateWorkflowDtoCredentialsItem", + "UpdateWorkflowDtoCredentialsItem_11Labs", + "UpdateWorkflowDtoCredentialsItem_Anthropic", + "UpdateWorkflowDtoCredentialsItem_AnthropicBedrock", + "UpdateWorkflowDtoCredentialsItem_Anyscale", + "UpdateWorkflowDtoCredentialsItem_AssemblyAi", + "UpdateWorkflowDtoCredentialsItem_Azure", + "UpdateWorkflowDtoCredentialsItem_AzureOpenai", + "UpdateWorkflowDtoCredentialsItem_ByoSipTrunk", + "UpdateWorkflowDtoCredentialsItem_Cartesia", + "UpdateWorkflowDtoCredentialsItem_Cerebras", + "UpdateWorkflowDtoCredentialsItem_Cloudflare", + "UpdateWorkflowDtoCredentialsItem_CustomCredential", + "UpdateWorkflowDtoCredentialsItem_CustomLlm", + "UpdateWorkflowDtoCredentialsItem_DeepSeek", + "UpdateWorkflowDtoCredentialsItem_Deepgram", + "UpdateWorkflowDtoCredentialsItem_Deepinfra", + "UpdateWorkflowDtoCredentialsItem_Email", + "UpdateWorkflowDtoCredentialsItem_Gcp", + "UpdateWorkflowDtoCredentialsItem_GhlOauth2Authorization", + "UpdateWorkflowDtoCredentialsItem_Gladia", + "UpdateWorkflowDtoCredentialsItem_Gohighlevel", + "UpdateWorkflowDtoCredentialsItem_Google", + "UpdateWorkflowDtoCredentialsItem_GoogleCalendarOauth2Authorization", + "UpdateWorkflowDtoCredentialsItem_GoogleCalendarOauth2Client", + "UpdateWorkflowDtoCredentialsItem_GoogleSheetsOauth2Authorization", + "UpdateWorkflowDtoCredentialsItem_Groq", + "UpdateWorkflowDtoCredentialsItem_Hume", + "UpdateWorkflowDtoCredentialsItem_InflectionAi", + "UpdateWorkflowDtoCredentialsItem_Inworld", + "UpdateWorkflowDtoCredentialsItem_Langfuse", + "UpdateWorkflowDtoCredentialsItem_Lmnt", + "UpdateWorkflowDtoCredentialsItem_Make", + "UpdateWorkflowDtoCredentialsItem_Minimax", + "UpdateWorkflowDtoCredentialsItem_Mistral", + "UpdateWorkflowDtoCredentialsItem_Neuphonic", + "UpdateWorkflowDtoCredentialsItem_Openai", + "UpdateWorkflowDtoCredentialsItem_Openrouter", + "UpdateWorkflowDtoCredentialsItem_PerplexityAi", + "UpdateWorkflowDtoCredentialsItem_Playht", + "UpdateWorkflowDtoCredentialsItem_RimeAi", + "UpdateWorkflowDtoCredentialsItem_Runpod", + "UpdateWorkflowDtoCredentialsItem_S3", + "UpdateWorkflowDtoCredentialsItem_SlackOauth2Authorization", + "UpdateWorkflowDtoCredentialsItem_SlackWebhook", + "UpdateWorkflowDtoCredentialsItem_SmallestAi", + "UpdateWorkflowDtoCredentialsItem_Soniox", + "UpdateWorkflowDtoCredentialsItem_Speechmatics", + "UpdateWorkflowDtoCredentialsItem_Supabase", + "UpdateWorkflowDtoCredentialsItem_Tavus", + "UpdateWorkflowDtoCredentialsItem_TogetherAi", + "UpdateWorkflowDtoCredentialsItem_Trieve", + "UpdateWorkflowDtoCredentialsItem_Twilio", + "UpdateWorkflowDtoCredentialsItem_Vonage", + "UpdateWorkflowDtoCredentialsItem_Webhook", + "UpdateWorkflowDtoCredentialsItem_Wellsaid", + "UpdateWorkflowDtoCredentialsItem_Xai", + "UpdateWorkflowDtoHooksItem", + "UpdateWorkflowDtoModel", + "UpdateWorkflowDtoModel_Anthropic", + "UpdateWorkflowDtoModel_AnthropicBedrock", + "UpdateWorkflowDtoModel_CustomLlm", + "UpdateWorkflowDtoModel_Google", + "UpdateWorkflowDtoModel_Openai", + "UpdateWorkflowDtoNodesItem", + "UpdateWorkflowDtoNodesItem_Conversation", + "UpdateWorkflowDtoNodesItem_Tool", + "UpdateWorkflowDtoTranscriber", + "UpdateWorkflowDtoTranscriber_11Labs", + "UpdateWorkflowDtoTranscriber_AssemblyAi", + "UpdateWorkflowDtoTranscriber_Azure", + "UpdateWorkflowDtoTranscriber_Cartesia", + "UpdateWorkflowDtoTranscriber_CustomTranscriber", + "UpdateWorkflowDtoTranscriber_Deepgram", + "UpdateWorkflowDtoTranscriber_Gladia", + "UpdateWorkflowDtoTranscriber_Google", + "UpdateWorkflowDtoTranscriber_Openai", + "UpdateWorkflowDtoTranscriber_Soniox", + "UpdateWorkflowDtoTranscriber_Speechmatics", + "UpdateWorkflowDtoTranscriber_Talkscriber", + "UpdateWorkflowDtoVoice", + "UpdateWorkflowDtoVoice_11Labs", + "UpdateWorkflowDtoVoice_Azure", + "UpdateWorkflowDtoVoice_Cartesia", + "UpdateWorkflowDtoVoice_CustomVoice", + "UpdateWorkflowDtoVoice_Deepgram", + "UpdateWorkflowDtoVoice_Hume", + "UpdateWorkflowDtoVoice_Inworld", + "UpdateWorkflowDtoVoice_Lmnt", + "UpdateWorkflowDtoVoice_Minimax", + "UpdateWorkflowDtoVoice_Neuphonic", + "UpdateWorkflowDtoVoice_Openai", + "UpdateWorkflowDtoVoice_Playht", + "UpdateWorkflowDtoVoice_RimeAi", + "UpdateWorkflowDtoVoice_Sesame", + "UpdateWorkflowDtoVoice_SmallestAi", + "UpdateWorkflowDtoVoice_Tavus", + "UpdateWorkflowDtoVoice_Vapi", + "UpdateWorkflowDtoVoice_Wellsaid", + "UpdateWorkflowDtoVoicemailDetection", + "UpdateWorkflowDtoVoicemailDetectionZero", + "UpdateXAiCredentialDto", "User", "UserMessage", "Vapi", "VapiCost", + "VapiCostSubType", "VapiEnvironment", "VapiModel", - "VapiModelStepsItem", + "VapiModelProvider", "VapiModelToolsItem", + "VapiModelToolsItem_ApiRequest", + "VapiModelToolsItem_Bash", + "VapiModelToolsItem_Code", + "VapiModelToolsItem_Computer", + "VapiModelToolsItem_Dtmf", + "VapiModelToolsItem_EndCall", + "VapiModelToolsItem_Function", + "VapiModelToolsItem_GohighlevelCalendarAvailabilityCheck", + "VapiModelToolsItem_GohighlevelCalendarEventCreate", + "VapiModelToolsItem_GohighlevelContactCreate", + "VapiModelToolsItem_GohighlevelContactGet", + "VapiModelToolsItem_GoogleCalendarAvailabilityCheck", + "VapiModelToolsItem_GoogleCalendarEventCreate", + "VapiModelToolsItem_GoogleSheetsRowAppend", + "VapiModelToolsItem_Handoff", + "VapiModelToolsItem_Mcp", + "VapiModelToolsItem_Query", + "VapiModelToolsItem_SipRequest", + "VapiModelToolsItem_SlackMessageSend", + "VapiModelToolsItem_Sms", + "VapiModelToolsItem_TextEditor", + "VapiModelToolsItem_TransferCall", + "VapiModelToolsItem_Voicemail", "VapiPhoneNumber", "VapiPhoneNumberFallbackDestination", + "VapiPhoneNumberFallbackDestination_Number", + "VapiPhoneNumberFallbackDestination_Sip", + "VapiPhoneNumberHooksItem", + "VapiPhoneNumberHooksItem_CallEnding", + "VapiPhoneNumberHooksItem_CallRinging", + "VapiPhoneNumberStatus", + "VapiPronunciationDictionaryLocator", + "VapiSipTransportMessage", + "VapiSipTransportMessageSipVerb", + "VapiSmartEndpointingPlan", + "VapiSmartEndpointingPlanProvider", + "VapiVoice", + "VapiVoiceVoiceId", + "VapiVoicemailDetectionPlan", + "VapiVoicemailDetectionPlanProvider", + "VapiVoicemailDetectionPlanType", + "VariableExtractionAlias", + "VariableExtractionPlan", + "VariableValueGroupBy", "VoiceCost", "VoiceLibrary", "VoiceLibraryGender", "VoiceLibraryVoiceResponse", + "VoicemailDetectionBackoffPlan", + "VoicemailDetectionCost", + "VoicemailDetectionCostProvider", + "VoicemailTool", + "VoicemailToolMessagesItem", + "VoicemailToolMessagesItem_RequestComplete", + "VoicemailToolMessagesItem_RequestFailed", + "VoicemailToolMessagesItem_RequestResponseDelayed", + "VoicemailToolMessagesItem_RequestStart", "VonageCredential", + "VonageCredentialProvider", "VonagePhoneNumber", "VonagePhoneNumberFallbackDestination", - "WorkflowBlock", - "WorkflowBlockMessagesItem", - "WorkflowBlockStepsItem", + "VonagePhoneNumberFallbackDestination_Number", + "VonagePhoneNumberFallbackDestination_Sip", + "VonagePhoneNumberHooksItem", + "VonagePhoneNumberHooksItem_CallEnding", + "VonagePhoneNumberHooksItem_CallRinging", + "VonagePhoneNumberStatus", + "WebChat", + "WebChatOutputItem", + "WebhookCredential", + "WebhookCredentialAuthenticationPlan", + "WebhookCredentialAuthenticationPlan_Bearer", + "WebhookCredentialAuthenticationPlan_Hmac", + "WebhookCredentialAuthenticationPlan_Oauth2", + "WebhookCredentialProvider", + "WellSaidCredential", + "WellSaidCredentialProvider", + "WellSaidVoice", + "WellSaidVoiceModel", + "Workflow", + "WorkflowAnthropicBedrockModel", + "WorkflowAnthropicBedrockModelModel", + "WorkflowAnthropicModel", + "WorkflowAnthropicModelModel", + "WorkflowBackgroundSound", + "WorkflowBackgroundSoundZero", + "WorkflowCredentialsItem", + "WorkflowCredentialsItem_11Labs", + "WorkflowCredentialsItem_Anthropic", + "WorkflowCredentialsItem_AnthropicBedrock", + "WorkflowCredentialsItem_Anyscale", + "WorkflowCredentialsItem_AssemblyAi", + "WorkflowCredentialsItem_Azure", + "WorkflowCredentialsItem_AzureOpenai", + "WorkflowCredentialsItem_ByoSipTrunk", + "WorkflowCredentialsItem_Cartesia", + "WorkflowCredentialsItem_Cerebras", + "WorkflowCredentialsItem_Cloudflare", + "WorkflowCredentialsItem_CustomCredential", + "WorkflowCredentialsItem_CustomLlm", + "WorkflowCredentialsItem_DeepSeek", + "WorkflowCredentialsItem_Deepgram", + "WorkflowCredentialsItem_Deepinfra", + "WorkflowCredentialsItem_Email", + "WorkflowCredentialsItem_Gcp", + "WorkflowCredentialsItem_GhlOauth2Authorization", + "WorkflowCredentialsItem_Gladia", + "WorkflowCredentialsItem_Gohighlevel", + "WorkflowCredentialsItem_Google", + "WorkflowCredentialsItem_GoogleCalendarOauth2Authorization", + "WorkflowCredentialsItem_GoogleCalendarOauth2Client", + "WorkflowCredentialsItem_GoogleSheetsOauth2Authorization", + "WorkflowCredentialsItem_Groq", + "WorkflowCredentialsItem_Hume", + "WorkflowCredentialsItem_InflectionAi", + "WorkflowCredentialsItem_Inworld", + "WorkflowCredentialsItem_Langfuse", + "WorkflowCredentialsItem_Lmnt", + "WorkflowCredentialsItem_Make", + "WorkflowCredentialsItem_Minimax", + "WorkflowCredentialsItem_Mistral", + "WorkflowCredentialsItem_Neuphonic", + "WorkflowCredentialsItem_Openai", + "WorkflowCredentialsItem_Openrouter", + "WorkflowCredentialsItem_PerplexityAi", + "WorkflowCredentialsItem_Playht", + "WorkflowCredentialsItem_RimeAi", + "WorkflowCredentialsItem_Runpod", + "WorkflowCredentialsItem_S3", + "WorkflowCredentialsItem_SlackOauth2Authorization", + "WorkflowCredentialsItem_SlackWebhook", + "WorkflowCredentialsItem_SmallestAi", + "WorkflowCredentialsItem_Soniox", + "WorkflowCredentialsItem_Speechmatics", + "WorkflowCredentialsItem_Supabase", + "WorkflowCredentialsItem_Tavus", + "WorkflowCredentialsItem_TogetherAi", + "WorkflowCredentialsItem_Trieve", + "WorkflowCredentialsItem_Twilio", + "WorkflowCredentialsItem_Vonage", + "WorkflowCredentialsItem_Webhook", + "WorkflowCredentialsItem_Wellsaid", + "WorkflowCredentialsItem_Xai", + "WorkflowCustomModel", + "WorkflowCustomModelMetadataSendMode", + "WorkflowGoogleModel", + "WorkflowGoogleModelModel", + "WorkflowHooksItem", + "WorkflowModel", + "WorkflowModel_Anthropic", + "WorkflowModel_AnthropicBedrock", + "WorkflowModel_CustomLlm", + "WorkflowModel_Google", + "WorkflowModel_Openai", + "WorkflowNodesItem", + "WorkflowNodesItem_Conversation", + "WorkflowNodesItem_Tool", + "WorkflowOpenAiModel", + "WorkflowOpenAiModelModel", + "WorkflowOverrides", + "WorkflowTranscriber", + "WorkflowTranscriber_11Labs", + "WorkflowTranscriber_AssemblyAi", + "WorkflowTranscriber_Azure", + "WorkflowTranscriber_Cartesia", + "WorkflowTranscriber_CustomTranscriber", + "WorkflowTranscriber_Deepgram", + "WorkflowTranscriber_Gladia", + "WorkflowTranscriber_Google", + "WorkflowTranscriber_Openai", + "WorkflowTranscriber_Soniox", + "WorkflowTranscriber_Speechmatics", + "WorkflowTranscriber_Talkscriber", + "WorkflowUserEditable", + "WorkflowUserEditableBackgroundSound", + "WorkflowUserEditableBackgroundSoundZero", + "WorkflowUserEditableCredentialsItem", + "WorkflowUserEditableCredentialsItem_11Labs", + "WorkflowUserEditableCredentialsItem_Anthropic", + "WorkflowUserEditableCredentialsItem_AnthropicBedrock", + "WorkflowUserEditableCredentialsItem_Anyscale", + "WorkflowUserEditableCredentialsItem_AssemblyAi", + "WorkflowUserEditableCredentialsItem_Azure", + "WorkflowUserEditableCredentialsItem_AzureOpenai", + "WorkflowUserEditableCredentialsItem_ByoSipTrunk", + "WorkflowUserEditableCredentialsItem_Cartesia", + "WorkflowUserEditableCredentialsItem_Cerebras", + "WorkflowUserEditableCredentialsItem_Cloudflare", + "WorkflowUserEditableCredentialsItem_CustomCredential", + "WorkflowUserEditableCredentialsItem_CustomLlm", + "WorkflowUserEditableCredentialsItem_DeepSeek", + "WorkflowUserEditableCredentialsItem_Deepgram", + "WorkflowUserEditableCredentialsItem_Deepinfra", + "WorkflowUserEditableCredentialsItem_Email", + "WorkflowUserEditableCredentialsItem_Gcp", + "WorkflowUserEditableCredentialsItem_GhlOauth2Authorization", + "WorkflowUserEditableCredentialsItem_Gladia", + "WorkflowUserEditableCredentialsItem_Gohighlevel", + "WorkflowUserEditableCredentialsItem_Google", + "WorkflowUserEditableCredentialsItem_GoogleCalendarOauth2Authorization", + "WorkflowUserEditableCredentialsItem_GoogleCalendarOauth2Client", + "WorkflowUserEditableCredentialsItem_GoogleSheetsOauth2Authorization", + "WorkflowUserEditableCredentialsItem_Groq", + "WorkflowUserEditableCredentialsItem_Hume", + "WorkflowUserEditableCredentialsItem_InflectionAi", + "WorkflowUserEditableCredentialsItem_Inworld", + "WorkflowUserEditableCredentialsItem_Langfuse", + "WorkflowUserEditableCredentialsItem_Lmnt", + "WorkflowUserEditableCredentialsItem_Make", + "WorkflowUserEditableCredentialsItem_Minimax", + "WorkflowUserEditableCredentialsItem_Mistral", + "WorkflowUserEditableCredentialsItem_Neuphonic", + "WorkflowUserEditableCredentialsItem_Openai", + "WorkflowUserEditableCredentialsItem_Openrouter", + "WorkflowUserEditableCredentialsItem_PerplexityAi", + "WorkflowUserEditableCredentialsItem_Playht", + "WorkflowUserEditableCredentialsItem_RimeAi", + "WorkflowUserEditableCredentialsItem_Runpod", + "WorkflowUserEditableCredentialsItem_S3", + "WorkflowUserEditableCredentialsItem_SlackOauth2Authorization", + "WorkflowUserEditableCredentialsItem_SlackWebhook", + "WorkflowUserEditableCredentialsItem_SmallestAi", + "WorkflowUserEditableCredentialsItem_Soniox", + "WorkflowUserEditableCredentialsItem_Speechmatics", + "WorkflowUserEditableCredentialsItem_Supabase", + "WorkflowUserEditableCredentialsItem_Tavus", + "WorkflowUserEditableCredentialsItem_TogetherAi", + "WorkflowUserEditableCredentialsItem_Trieve", + "WorkflowUserEditableCredentialsItem_Twilio", + "WorkflowUserEditableCredentialsItem_Vonage", + "WorkflowUserEditableCredentialsItem_Webhook", + "WorkflowUserEditableCredentialsItem_Wellsaid", + "WorkflowUserEditableCredentialsItem_Xai", + "WorkflowUserEditableHooksItem", + "WorkflowUserEditableModel", + "WorkflowUserEditableModel_Anthropic", + "WorkflowUserEditableModel_AnthropicBedrock", + "WorkflowUserEditableModel_CustomLlm", + "WorkflowUserEditableModel_Google", + "WorkflowUserEditableModel_Openai", + "WorkflowUserEditableNodesItem", + "WorkflowUserEditableNodesItem_Conversation", + "WorkflowUserEditableNodesItem_Tool", + "WorkflowUserEditableTranscriber", + "WorkflowUserEditableTranscriber_11Labs", + "WorkflowUserEditableTranscriber_AssemblyAi", + "WorkflowUserEditableTranscriber_Azure", + "WorkflowUserEditableTranscriber_Cartesia", + "WorkflowUserEditableTranscriber_CustomTranscriber", + "WorkflowUserEditableTranscriber_Deepgram", + "WorkflowUserEditableTranscriber_Gladia", + "WorkflowUserEditableTranscriber_Google", + "WorkflowUserEditableTranscriber_Openai", + "WorkflowUserEditableTranscriber_Soniox", + "WorkflowUserEditableTranscriber_Speechmatics", + "WorkflowUserEditableTranscriber_Talkscriber", + "WorkflowUserEditableVoice", + "WorkflowUserEditableVoice_11Labs", + "WorkflowUserEditableVoice_Azure", + "WorkflowUserEditableVoice_Cartesia", + "WorkflowUserEditableVoice_CustomVoice", + "WorkflowUserEditableVoice_Deepgram", + "WorkflowUserEditableVoice_Hume", + "WorkflowUserEditableVoice_Inworld", + "WorkflowUserEditableVoice_Lmnt", + "WorkflowUserEditableVoice_Minimax", + "WorkflowUserEditableVoice_Neuphonic", + "WorkflowUserEditableVoice_Openai", + "WorkflowUserEditableVoice_Playht", + "WorkflowUserEditableVoice_RimeAi", + "WorkflowUserEditableVoice_Sesame", + "WorkflowUserEditableVoice_SmallestAi", + "WorkflowUserEditableVoice_Tavus", + "WorkflowUserEditableVoice_Vapi", + "WorkflowUserEditableVoice_Wellsaid", + "WorkflowUserEditableVoicemailDetection", + "WorkflowUserEditableVoicemailDetectionZero", + "WorkflowVoice", + "WorkflowVoice_11Labs", + "WorkflowVoice_Azure", + "WorkflowVoice_Cartesia", + "WorkflowVoice_CustomVoice", + "WorkflowVoice_Deepgram", + "WorkflowVoice_Hume", + "WorkflowVoice_Inworld", + "WorkflowVoice_Lmnt", + "WorkflowVoice_Minimax", + "WorkflowVoice_Neuphonic", + "WorkflowVoice_Openai", + "WorkflowVoice_Playht", + "WorkflowVoice_RimeAi", + "WorkflowVoice_Sesame", + "WorkflowVoice_SmallestAi", + "WorkflowVoice_Tavus", + "WorkflowVoice_Vapi", + "WorkflowVoice_Wellsaid", + "WorkflowVoicemailDetection", + "WorkflowVoicemailDetectionZero", + "XAiCredential", + "XAiCredentialProvider", + "XaiModel", + "XaiModelModel", + "XaiModelToolsItem", + "XaiModelToolsItem_ApiRequest", + "XaiModelToolsItem_Bash", + "XaiModelToolsItem_Code", + "XaiModelToolsItem_Computer", + "XaiModelToolsItem_Dtmf", + "XaiModelToolsItem_EndCall", + "XaiModelToolsItem_Function", + "XaiModelToolsItem_GohighlevelCalendarAvailabilityCheck", + "XaiModelToolsItem_GohighlevelCalendarEventCreate", + "XaiModelToolsItem_GohighlevelContactCreate", + "XaiModelToolsItem_GohighlevelContactGet", + "XaiModelToolsItem_GoogleCalendarAvailabilityCheck", + "XaiModelToolsItem_GoogleCalendarEventCreate", + "XaiModelToolsItem_GoogleSheetsRowAppend", + "XaiModelToolsItem_Handoff", + "XaiModelToolsItem_Mcp", + "XaiModelToolsItem_Query", + "XaiModelToolsItem_SipRequest", + "XaiModelToolsItem_SlackMessageSend", + "XaiModelToolsItem_Sms", + "XaiModelToolsItem_TextEditor", + "XaiModelToolsItem_TransferCall", + "XaiModelToolsItem_Voicemail", + "XssSecurityFilter", + "XssSecurityFilterType", "__version__", "analytics", "assistants", - "blocks", "calls", + "campaigns", + "chats", + "eval", "files", - "logs", + "insight", + "observability_scorecard", "phone_numbers", + "provider_resources", + "sessions", "squads", + "structured_outputs", "tools", ] diff --git a/src/vapi/_default_clients.py b/src/vapi/_default_clients.py new file mode 100644 index 00000000..7ccc0db3 --- /dev/null +++ b/src/vapi/_default_clients.py @@ -0,0 +1,32 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import httpx + +SDK_DEFAULT_TIMEOUT = 60 + +try: + import httpx_aiohttp # type: ignore[import-not-found] +except ImportError: + + class DefaultAioHttpClient(httpx.AsyncClient): # type: ignore + def __init__(self, **kwargs: typing.Any) -> None: + raise RuntimeError( + "To use the aiohttp client, install the aiohttp extra: pip install vapi_server_sdk[aiohttp]" + ) + +else: + + class DefaultAioHttpClient(httpx_aiohttp.HttpxAiohttpClient): # type: ignore + def __init__(self, **kwargs: typing.Any) -> None: + kwargs.setdefault("timeout", SDK_DEFAULT_TIMEOUT) + kwargs.setdefault("follow_redirects", True) + super().__init__(**kwargs) + + +class DefaultAsyncHttpxClient(httpx.AsyncClient): + def __init__(self, **kwargs: typing.Any) -> None: + kwargs.setdefault("timeout", SDK_DEFAULT_TIMEOUT) + kwargs.setdefault("follow_redirects", True) + super().__init__(**kwargs) diff --git a/src/vapi/analytics/__init__.py b/src/vapi/analytics/__init__.py index f3ea2659..5cde0202 100644 --- a/src/vapi/analytics/__init__.py +++ b/src/vapi/analytics/__init__.py @@ -1,2 +1,4 @@ # This file was auto-generated by Fern from our API Definition. +# isort: skip_file + diff --git a/src/vapi/analytics/client.py b/src/vapi/analytics/client.py index 8f7a9e71..5ef58dd4 100644 --- a/src/vapi/analytics/client.py +++ b/src/vapi/analytics/client.py @@ -1,15 +1,12 @@ # This file was auto-generated by Fern from our API Definition. import typing -from ..core.client_wrapper import SyncClientWrapper -from ..types.analytics_query import AnalyticsQuery + +from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ..core.request_options import RequestOptions +from ..types.analytics_query import AnalyticsQuery from ..types.analytics_query_result import AnalyticsQueryResult -from ..core.serialization import convert_and_respect_annotation_metadata -from ..core.pydantic_utilities import parse_obj_as -from json.decoder import JSONDecodeError -from ..core.api_error import ApiError -from ..core.client_wrapper import AsyncClientWrapper +from .raw_client import AsyncRawAnalyticsClient, RawAnalyticsClient # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -17,7 +14,18 @@ class AnalyticsClient: def __init__(self, *, client_wrapper: SyncClientWrapper): - self._client_wrapper = client_wrapper + self._raw_client = RawAnalyticsClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawAnalyticsClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawAnalyticsClient + """ + return self._raw_client def get( self, *, queries: typing.Sequence[AnalyticsQuery], request_options: typing.Optional[RequestOptions] = None @@ -46,6 +54,7 @@ def get( client.analytics.get( queries=[ AnalyticsQuery( + table="call", name="name", operations=[ AnalyticsOperation( @@ -57,35 +66,24 @@ def get( ], ) """ - _response = self._client_wrapper.httpx_client.request( - "analytics", - method="POST", - json={ - "queries": convert_and_respect_annotation_metadata( - object_=queries, annotation=typing.Sequence[AnalyticsQuery], direction="write" - ), - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - typing.List[AnalyticsQueryResult], - parse_obj_as( - type_=typing.List[AnalyticsQueryResult], # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = self._raw_client.get(queries=queries, request_options=request_options) + return _response.data class AsyncAnalyticsClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper + self._raw_client = AsyncRawAnalyticsClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawAnalyticsClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawAnalyticsClient + """ + return self._raw_client async def get( self, *, queries: typing.Sequence[AnalyticsQuery], request_options: typing.Optional[RequestOptions] = None @@ -119,6 +117,7 @@ async def main() -> None: await client.analytics.get( queries=[ AnalyticsQuery( + table="call", name="name", operations=[ AnalyticsOperation( @@ -133,27 +132,5 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - "analytics", - method="POST", - json={ - "queries": convert_and_respect_annotation_metadata( - object_=queries, annotation=typing.Sequence[AnalyticsQuery], direction="write" - ), - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - typing.List[AnalyticsQueryResult], - parse_obj_as( - type_=typing.List[AnalyticsQueryResult], # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = await self._raw_client.get(queries=queries, request_options=request_options) + return _response.data diff --git a/src/vapi/analytics/raw_client.py b/src/vapi/analytics/raw_client.py new file mode 100644 index 00000000..448600b3 --- /dev/null +++ b/src/vapi/analytics/raw_client.py @@ -0,0 +1,128 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +from json.decoder import JSONDecodeError + +from ..core.api_error import ApiError +from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.http_response import AsyncHttpResponse, HttpResponse +from ..core.parse_error import ParsingError +from ..core.request_options import RequestOptions +from ..core.serialization import convert_and_respect_annotation_metadata +from ..core.unchecked_base_model import construct_type +from ..types.analytics_query import AnalyticsQuery +from ..types.analytics_query_result import AnalyticsQueryResult +from pydantic import ValidationError + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class RawAnalyticsClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def get( + self, *, queries: typing.Sequence[AnalyticsQuery], request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[typing.List[AnalyticsQueryResult]]: + """ + Parameters + ---------- + queries : typing.Sequence[AnalyticsQuery] + This is the list of metric queries you want to perform. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[typing.List[AnalyticsQueryResult]] + + """ + _response = self._client_wrapper.httpx_client.request( + "analytics", + method="POST", + json={ + "queries": convert_and_respect_annotation_metadata( + object_=queries, annotation=typing.Sequence[AnalyticsQuery], direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.List[AnalyticsQueryResult], + construct_type( + type_=typing.List[AnalyticsQueryResult], # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawAnalyticsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def get( + self, *, queries: typing.Sequence[AnalyticsQuery], request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[typing.List[AnalyticsQueryResult]]: + """ + Parameters + ---------- + queries : typing.Sequence[AnalyticsQuery] + This is the list of metric queries you want to perform. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[typing.List[AnalyticsQueryResult]] + + """ + _response = await self._client_wrapper.httpx_client.request( + "analytics", + method="POST", + json={ + "queries": convert_and_respect_annotation_metadata( + object_=queries, annotation=typing.Sequence[AnalyticsQuery], direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.List[AnalyticsQueryResult], + construct_type( + type_=typing.List[AnalyticsQueryResult], # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/vapi/assistants/__init__.py b/src/vapi/assistants/__init__.py index 431bfe75..55ffd71c 100644 --- a/src/vapi/assistants/__init__.py +++ b/src/vapi/assistants/__init__.py @@ -1,21 +1,379 @@ # This file was auto-generated by Fern from our API Definition. -from .types import ( - UpdateAssistantDtoBackgroundSound, - UpdateAssistantDtoClientMessagesItem, - UpdateAssistantDtoFirstMessageMode, - UpdateAssistantDtoModel, - UpdateAssistantDtoServerMessagesItem, - UpdateAssistantDtoTranscriber, - UpdateAssistantDtoVoice, -) +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ( + UpdateAssistantDtoBackgroundSound, + UpdateAssistantDtoBackgroundSoundZero, + UpdateAssistantDtoClientMessagesItem, + UpdateAssistantDtoCredentialsItem, + UpdateAssistantDtoCredentialsItem_11Labs, + UpdateAssistantDtoCredentialsItem_Anthropic, + UpdateAssistantDtoCredentialsItem_AnthropicBedrock, + UpdateAssistantDtoCredentialsItem_Anyscale, + UpdateAssistantDtoCredentialsItem_AssemblyAi, + UpdateAssistantDtoCredentialsItem_Azure, + UpdateAssistantDtoCredentialsItem_AzureOpenai, + UpdateAssistantDtoCredentialsItem_ByoSipTrunk, + UpdateAssistantDtoCredentialsItem_Cartesia, + UpdateAssistantDtoCredentialsItem_Cerebras, + UpdateAssistantDtoCredentialsItem_Cloudflare, + UpdateAssistantDtoCredentialsItem_CustomCredential, + UpdateAssistantDtoCredentialsItem_CustomLlm, + UpdateAssistantDtoCredentialsItem_DeepSeek, + UpdateAssistantDtoCredentialsItem_Deepgram, + UpdateAssistantDtoCredentialsItem_Deepinfra, + UpdateAssistantDtoCredentialsItem_Email, + UpdateAssistantDtoCredentialsItem_Gcp, + UpdateAssistantDtoCredentialsItem_GhlOauth2Authorization, + UpdateAssistantDtoCredentialsItem_Gladia, + UpdateAssistantDtoCredentialsItem_Gohighlevel, + UpdateAssistantDtoCredentialsItem_Google, + UpdateAssistantDtoCredentialsItem_GoogleCalendarOauth2Authorization, + UpdateAssistantDtoCredentialsItem_GoogleCalendarOauth2Client, + UpdateAssistantDtoCredentialsItem_GoogleSheetsOauth2Authorization, + UpdateAssistantDtoCredentialsItem_Groq, + UpdateAssistantDtoCredentialsItem_Hume, + UpdateAssistantDtoCredentialsItem_InflectionAi, + UpdateAssistantDtoCredentialsItem_Inworld, + UpdateAssistantDtoCredentialsItem_Langfuse, + UpdateAssistantDtoCredentialsItem_Lmnt, + UpdateAssistantDtoCredentialsItem_Make, + UpdateAssistantDtoCredentialsItem_Minimax, + UpdateAssistantDtoCredentialsItem_Mistral, + UpdateAssistantDtoCredentialsItem_Neuphonic, + UpdateAssistantDtoCredentialsItem_Openai, + UpdateAssistantDtoCredentialsItem_Openrouter, + UpdateAssistantDtoCredentialsItem_PerplexityAi, + UpdateAssistantDtoCredentialsItem_Playht, + UpdateAssistantDtoCredentialsItem_RimeAi, + UpdateAssistantDtoCredentialsItem_Runpod, + UpdateAssistantDtoCredentialsItem_S3, + UpdateAssistantDtoCredentialsItem_SlackOauth2Authorization, + UpdateAssistantDtoCredentialsItem_SlackWebhook, + UpdateAssistantDtoCredentialsItem_SmallestAi, + UpdateAssistantDtoCredentialsItem_Soniox, + UpdateAssistantDtoCredentialsItem_Speechmatics, + UpdateAssistantDtoCredentialsItem_Supabase, + UpdateAssistantDtoCredentialsItem_Tavus, + UpdateAssistantDtoCredentialsItem_TogetherAi, + UpdateAssistantDtoCredentialsItem_Trieve, + UpdateAssistantDtoCredentialsItem_Twilio, + UpdateAssistantDtoCredentialsItem_Vonage, + UpdateAssistantDtoCredentialsItem_Webhook, + UpdateAssistantDtoCredentialsItem_Wellsaid, + UpdateAssistantDtoCredentialsItem_Xai, + UpdateAssistantDtoFirstMessageMode, + UpdateAssistantDtoHooksItem, + UpdateAssistantDtoModel, + UpdateAssistantDtoModel_Anthropic, + UpdateAssistantDtoModel_AnthropicBedrock, + UpdateAssistantDtoModel_Anyscale, + UpdateAssistantDtoModel_Cerebras, + UpdateAssistantDtoModel_CustomLlm, + UpdateAssistantDtoModel_DeepSeek, + UpdateAssistantDtoModel_Deepinfra, + UpdateAssistantDtoModel_Google, + UpdateAssistantDtoModel_Groq, + UpdateAssistantDtoModel_InflectionAi, + UpdateAssistantDtoModel_Minimax, + UpdateAssistantDtoModel_Openai, + UpdateAssistantDtoModel_Openrouter, + UpdateAssistantDtoModel_PerplexityAi, + UpdateAssistantDtoModel_TogetherAi, + UpdateAssistantDtoModel_Xai, + UpdateAssistantDtoServerMessagesItem, + UpdateAssistantDtoTranscriber, + UpdateAssistantDtoTranscriber_11Labs, + UpdateAssistantDtoTranscriber_AssemblyAi, + UpdateAssistantDtoTranscriber_Azure, + UpdateAssistantDtoTranscriber_Cartesia, + UpdateAssistantDtoTranscriber_CustomTranscriber, + UpdateAssistantDtoTranscriber_Deepgram, + UpdateAssistantDtoTranscriber_Gladia, + UpdateAssistantDtoTranscriber_Google, + UpdateAssistantDtoTranscriber_Openai, + UpdateAssistantDtoTranscriber_Soniox, + UpdateAssistantDtoTranscriber_Speechmatics, + UpdateAssistantDtoTranscriber_Talkscriber, + UpdateAssistantDtoVoice, + UpdateAssistantDtoVoice_11Labs, + UpdateAssistantDtoVoice_Azure, + UpdateAssistantDtoVoice_Cartesia, + UpdateAssistantDtoVoice_CustomVoice, + UpdateAssistantDtoVoice_Deepgram, + UpdateAssistantDtoVoice_Hume, + UpdateAssistantDtoVoice_Inworld, + UpdateAssistantDtoVoice_Lmnt, + UpdateAssistantDtoVoice_Minimax, + UpdateAssistantDtoVoice_Neuphonic, + UpdateAssistantDtoVoice_Openai, + UpdateAssistantDtoVoice_Playht, + UpdateAssistantDtoVoice_RimeAi, + UpdateAssistantDtoVoice_Sesame, + UpdateAssistantDtoVoice_SmallestAi, + UpdateAssistantDtoVoice_Tavus, + UpdateAssistantDtoVoice_Vapi, + UpdateAssistantDtoVoice_Wellsaid, + UpdateAssistantDtoVoicemailDetection, + UpdateAssistantDtoVoicemailDetectionZero, + ) +_dynamic_imports: typing.Dict[str, str] = { + "UpdateAssistantDtoBackgroundSound": ".types", + "UpdateAssistantDtoBackgroundSoundZero": ".types", + "UpdateAssistantDtoClientMessagesItem": ".types", + "UpdateAssistantDtoCredentialsItem": ".types", + "UpdateAssistantDtoCredentialsItem_11Labs": ".types", + "UpdateAssistantDtoCredentialsItem_Anthropic": ".types", + "UpdateAssistantDtoCredentialsItem_AnthropicBedrock": ".types", + "UpdateAssistantDtoCredentialsItem_Anyscale": ".types", + "UpdateAssistantDtoCredentialsItem_AssemblyAi": ".types", + "UpdateAssistantDtoCredentialsItem_Azure": ".types", + "UpdateAssistantDtoCredentialsItem_AzureOpenai": ".types", + "UpdateAssistantDtoCredentialsItem_ByoSipTrunk": ".types", + "UpdateAssistantDtoCredentialsItem_Cartesia": ".types", + "UpdateAssistantDtoCredentialsItem_Cerebras": ".types", + "UpdateAssistantDtoCredentialsItem_Cloudflare": ".types", + "UpdateAssistantDtoCredentialsItem_CustomCredential": ".types", + "UpdateAssistantDtoCredentialsItem_CustomLlm": ".types", + "UpdateAssistantDtoCredentialsItem_DeepSeek": ".types", + "UpdateAssistantDtoCredentialsItem_Deepgram": ".types", + "UpdateAssistantDtoCredentialsItem_Deepinfra": ".types", + "UpdateAssistantDtoCredentialsItem_Email": ".types", + "UpdateAssistantDtoCredentialsItem_Gcp": ".types", + "UpdateAssistantDtoCredentialsItem_GhlOauth2Authorization": ".types", + "UpdateAssistantDtoCredentialsItem_Gladia": ".types", + "UpdateAssistantDtoCredentialsItem_Gohighlevel": ".types", + "UpdateAssistantDtoCredentialsItem_Google": ".types", + "UpdateAssistantDtoCredentialsItem_GoogleCalendarOauth2Authorization": ".types", + "UpdateAssistantDtoCredentialsItem_GoogleCalendarOauth2Client": ".types", + "UpdateAssistantDtoCredentialsItem_GoogleSheetsOauth2Authorization": ".types", + "UpdateAssistantDtoCredentialsItem_Groq": ".types", + "UpdateAssistantDtoCredentialsItem_Hume": ".types", + "UpdateAssistantDtoCredentialsItem_InflectionAi": ".types", + "UpdateAssistantDtoCredentialsItem_Inworld": ".types", + "UpdateAssistantDtoCredentialsItem_Langfuse": ".types", + "UpdateAssistantDtoCredentialsItem_Lmnt": ".types", + "UpdateAssistantDtoCredentialsItem_Make": ".types", + "UpdateAssistantDtoCredentialsItem_Minimax": ".types", + "UpdateAssistantDtoCredentialsItem_Mistral": ".types", + "UpdateAssistantDtoCredentialsItem_Neuphonic": ".types", + "UpdateAssistantDtoCredentialsItem_Openai": ".types", + "UpdateAssistantDtoCredentialsItem_Openrouter": ".types", + "UpdateAssistantDtoCredentialsItem_PerplexityAi": ".types", + "UpdateAssistantDtoCredentialsItem_Playht": ".types", + "UpdateAssistantDtoCredentialsItem_RimeAi": ".types", + "UpdateAssistantDtoCredentialsItem_Runpod": ".types", + "UpdateAssistantDtoCredentialsItem_S3": ".types", + "UpdateAssistantDtoCredentialsItem_SlackOauth2Authorization": ".types", + "UpdateAssistantDtoCredentialsItem_SlackWebhook": ".types", + "UpdateAssistantDtoCredentialsItem_SmallestAi": ".types", + "UpdateAssistantDtoCredentialsItem_Soniox": ".types", + "UpdateAssistantDtoCredentialsItem_Speechmatics": ".types", + "UpdateAssistantDtoCredentialsItem_Supabase": ".types", + "UpdateAssistantDtoCredentialsItem_Tavus": ".types", + "UpdateAssistantDtoCredentialsItem_TogetherAi": ".types", + "UpdateAssistantDtoCredentialsItem_Trieve": ".types", + "UpdateAssistantDtoCredentialsItem_Twilio": ".types", + "UpdateAssistantDtoCredentialsItem_Vonage": ".types", + "UpdateAssistantDtoCredentialsItem_Webhook": ".types", + "UpdateAssistantDtoCredentialsItem_Wellsaid": ".types", + "UpdateAssistantDtoCredentialsItem_Xai": ".types", + "UpdateAssistantDtoFirstMessageMode": ".types", + "UpdateAssistantDtoHooksItem": ".types", + "UpdateAssistantDtoModel": ".types", + "UpdateAssistantDtoModel_Anthropic": ".types", + "UpdateAssistantDtoModel_AnthropicBedrock": ".types", + "UpdateAssistantDtoModel_Anyscale": ".types", + "UpdateAssistantDtoModel_Cerebras": ".types", + "UpdateAssistantDtoModel_CustomLlm": ".types", + "UpdateAssistantDtoModel_DeepSeek": ".types", + "UpdateAssistantDtoModel_Deepinfra": ".types", + "UpdateAssistantDtoModel_Google": ".types", + "UpdateAssistantDtoModel_Groq": ".types", + "UpdateAssistantDtoModel_InflectionAi": ".types", + "UpdateAssistantDtoModel_Minimax": ".types", + "UpdateAssistantDtoModel_Openai": ".types", + "UpdateAssistantDtoModel_Openrouter": ".types", + "UpdateAssistantDtoModel_PerplexityAi": ".types", + "UpdateAssistantDtoModel_TogetherAi": ".types", + "UpdateAssistantDtoModel_Xai": ".types", + "UpdateAssistantDtoServerMessagesItem": ".types", + "UpdateAssistantDtoTranscriber": ".types", + "UpdateAssistantDtoTranscriber_11Labs": ".types", + "UpdateAssistantDtoTranscriber_AssemblyAi": ".types", + "UpdateAssistantDtoTranscriber_Azure": ".types", + "UpdateAssistantDtoTranscriber_Cartesia": ".types", + "UpdateAssistantDtoTranscriber_CustomTranscriber": ".types", + "UpdateAssistantDtoTranscriber_Deepgram": ".types", + "UpdateAssistantDtoTranscriber_Gladia": ".types", + "UpdateAssistantDtoTranscriber_Google": ".types", + "UpdateAssistantDtoTranscriber_Openai": ".types", + "UpdateAssistantDtoTranscriber_Soniox": ".types", + "UpdateAssistantDtoTranscriber_Speechmatics": ".types", + "UpdateAssistantDtoTranscriber_Talkscriber": ".types", + "UpdateAssistantDtoVoice": ".types", + "UpdateAssistantDtoVoice_11Labs": ".types", + "UpdateAssistantDtoVoice_Azure": ".types", + "UpdateAssistantDtoVoice_Cartesia": ".types", + "UpdateAssistantDtoVoice_CustomVoice": ".types", + "UpdateAssistantDtoVoice_Deepgram": ".types", + "UpdateAssistantDtoVoice_Hume": ".types", + "UpdateAssistantDtoVoice_Inworld": ".types", + "UpdateAssistantDtoVoice_Lmnt": ".types", + "UpdateAssistantDtoVoice_Minimax": ".types", + "UpdateAssistantDtoVoice_Neuphonic": ".types", + "UpdateAssistantDtoVoice_Openai": ".types", + "UpdateAssistantDtoVoice_Playht": ".types", + "UpdateAssistantDtoVoice_RimeAi": ".types", + "UpdateAssistantDtoVoice_Sesame": ".types", + "UpdateAssistantDtoVoice_SmallestAi": ".types", + "UpdateAssistantDtoVoice_Tavus": ".types", + "UpdateAssistantDtoVoice_Vapi": ".types", + "UpdateAssistantDtoVoice_Wellsaid": ".types", + "UpdateAssistantDtoVoicemailDetection": ".types", + "UpdateAssistantDtoVoicemailDetectionZero": ".types", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "UpdateAssistantDtoBackgroundSound", + "UpdateAssistantDtoBackgroundSoundZero", "UpdateAssistantDtoClientMessagesItem", + "UpdateAssistantDtoCredentialsItem", + "UpdateAssistantDtoCredentialsItem_11Labs", + "UpdateAssistantDtoCredentialsItem_Anthropic", + "UpdateAssistantDtoCredentialsItem_AnthropicBedrock", + "UpdateAssistantDtoCredentialsItem_Anyscale", + "UpdateAssistantDtoCredentialsItem_AssemblyAi", + "UpdateAssistantDtoCredentialsItem_Azure", + "UpdateAssistantDtoCredentialsItem_AzureOpenai", + "UpdateAssistantDtoCredentialsItem_ByoSipTrunk", + "UpdateAssistantDtoCredentialsItem_Cartesia", + "UpdateAssistantDtoCredentialsItem_Cerebras", + "UpdateAssistantDtoCredentialsItem_Cloudflare", + "UpdateAssistantDtoCredentialsItem_CustomCredential", + "UpdateAssistantDtoCredentialsItem_CustomLlm", + "UpdateAssistantDtoCredentialsItem_DeepSeek", + "UpdateAssistantDtoCredentialsItem_Deepgram", + "UpdateAssistantDtoCredentialsItem_Deepinfra", + "UpdateAssistantDtoCredentialsItem_Email", + "UpdateAssistantDtoCredentialsItem_Gcp", + "UpdateAssistantDtoCredentialsItem_GhlOauth2Authorization", + "UpdateAssistantDtoCredentialsItem_Gladia", + "UpdateAssistantDtoCredentialsItem_Gohighlevel", + "UpdateAssistantDtoCredentialsItem_Google", + "UpdateAssistantDtoCredentialsItem_GoogleCalendarOauth2Authorization", + "UpdateAssistantDtoCredentialsItem_GoogleCalendarOauth2Client", + "UpdateAssistantDtoCredentialsItem_GoogleSheetsOauth2Authorization", + "UpdateAssistantDtoCredentialsItem_Groq", + "UpdateAssistantDtoCredentialsItem_Hume", + "UpdateAssistantDtoCredentialsItem_InflectionAi", + "UpdateAssistantDtoCredentialsItem_Inworld", + "UpdateAssistantDtoCredentialsItem_Langfuse", + "UpdateAssistantDtoCredentialsItem_Lmnt", + "UpdateAssistantDtoCredentialsItem_Make", + "UpdateAssistantDtoCredentialsItem_Minimax", + "UpdateAssistantDtoCredentialsItem_Mistral", + "UpdateAssistantDtoCredentialsItem_Neuphonic", + "UpdateAssistantDtoCredentialsItem_Openai", + "UpdateAssistantDtoCredentialsItem_Openrouter", + "UpdateAssistantDtoCredentialsItem_PerplexityAi", + "UpdateAssistantDtoCredentialsItem_Playht", + "UpdateAssistantDtoCredentialsItem_RimeAi", + "UpdateAssistantDtoCredentialsItem_Runpod", + "UpdateAssistantDtoCredentialsItem_S3", + "UpdateAssistantDtoCredentialsItem_SlackOauth2Authorization", + "UpdateAssistantDtoCredentialsItem_SlackWebhook", + "UpdateAssistantDtoCredentialsItem_SmallestAi", + "UpdateAssistantDtoCredentialsItem_Soniox", + "UpdateAssistantDtoCredentialsItem_Speechmatics", + "UpdateAssistantDtoCredentialsItem_Supabase", + "UpdateAssistantDtoCredentialsItem_Tavus", + "UpdateAssistantDtoCredentialsItem_TogetherAi", + "UpdateAssistantDtoCredentialsItem_Trieve", + "UpdateAssistantDtoCredentialsItem_Twilio", + "UpdateAssistantDtoCredentialsItem_Vonage", + "UpdateAssistantDtoCredentialsItem_Webhook", + "UpdateAssistantDtoCredentialsItem_Wellsaid", + "UpdateAssistantDtoCredentialsItem_Xai", "UpdateAssistantDtoFirstMessageMode", + "UpdateAssistantDtoHooksItem", "UpdateAssistantDtoModel", + "UpdateAssistantDtoModel_Anthropic", + "UpdateAssistantDtoModel_AnthropicBedrock", + "UpdateAssistantDtoModel_Anyscale", + "UpdateAssistantDtoModel_Cerebras", + "UpdateAssistantDtoModel_CustomLlm", + "UpdateAssistantDtoModel_DeepSeek", + "UpdateAssistantDtoModel_Deepinfra", + "UpdateAssistantDtoModel_Google", + "UpdateAssistantDtoModel_Groq", + "UpdateAssistantDtoModel_InflectionAi", + "UpdateAssistantDtoModel_Minimax", + "UpdateAssistantDtoModel_Openai", + "UpdateAssistantDtoModel_Openrouter", + "UpdateAssistantDtoModel_PerplexityAi", + "UpdateAssistantDtoModel_TogetherAi", + "UpdateAssistantDtoModel_Xai", "UpdateAssistantDtoServerMessagesItem", "UpdateAssistantDtoTranscriber", + "UpdateAssistantDtoTranscriber_11Labs", + "UpdateAssistantDtoTranscriber_AssemblyAi", + "UpdateAssistantDtoTranscriber_Azure", + "UpdateAssistantDtoTranscriber_Cartesia", + "UpdateAssistantDtoTranscriber_CustomTranscriber", + "UpdateAssistantDtoTranscriber_Deepgram", + "UpdateAssistantDtoTranscriber_Gladia", + "UpdateAssistantDtoTranscriber_Google", + "UpdateAssistantDtoTranscriber_Openai", + "UpdateAssistantDtoTranscriber_Soniox", + "UpdateAssistantDtoTranscriber_Speechmatics", + "UpdateAssistantDtoTranscriber_Talkscriber", "UpdateAssistantDtoVoice", + "UpdateAssistantDtoVoice_11Labs", + "UpdateAssistantDtoVoice_Azure", + "UpdateAssistantDtoVoice_Cartesia", + "UpdateAssistantDtoVoice_CustomVoice", + "UpdateAssistantDtoVoice_Deepgram", + "UpdateAssistantDtoVoice_Hume", + "UpdateAssistantDtoVoice_Inworld", + "UpdateAssistantDtoVoice_Lmnt", + "UpdateAssistantDtoVoice_Minimax", + "UpdateAssistantDtoVoice_Neuphonic", + "UpdateAssistantDtoVoice_Openai", + "UpdateAssistantDtoVoice_Playht", + "UpdateAssistantDtoVoice_RimeAi", + "UpdateAssistantDtoVoice_Sesame", + "UpdateAssistantDtoVoice_SmallestAi", + "UpdateAssistantDtoVoice_Tavus", + "UpdateAssistantDtoVoice_Vapi", + "UpdateAssistantDtoVoice_Wellsaid", + "UpdateAssistantDtoVoicemailDetection", + "UpdateAssistantDtoVoicemailDetectionZero", ] diff --git a/src/vapi/assistants/client.py b/src/vapi/assistants/client.py index d6549568..6e72fd0e 100644 --- a/src/vapi/assistants/client.py +++ b/src/vapi/assistants/client.py @@ -1,39 +1,43 @@ # This file was auto-generated by Fern from our API Definition. -import typing -from ..core.client_wrapper import SyncClientWrapper import datetime as dt +import typing + +from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ..core.request_options import RequestOptions +from ..types.analysis_plan import AnalysisPlan +from ..types.artifact_plan import ArtifactPlan from ..types.assistant import Assistant -from ..core.datetime_utils import serialize_datetime -from ..core.pydantic_utilities import parse_obj_as -from json.decoder import JSONDecodeError -from ..core.api_error import ApiError -from ..types.create_assistant_dto_transcriber import CreateAssistantDtoTranscriber -from ..types.create_assistant_dto_model import CreateAssistantDtoModel -from ..types.create_assistant_dto_voice import CreateAssistantDtoVoice -from ..types.create_assistant_dto_first_message_mode import CreateAssistantDtoFirstMessageMode +from ..types.background_speech_denoising_plan import BackgroundSpeechDenoisingPlan +from ..types.compliance_plan import CompliancePlan +from ..types.create_assistant_dto_background_sound import CreateAssistantDtoBackgroundSound from ..types.create_assistant_dto_client_messages_item import CreateAssistantDtoClientMessagesItem +from ..types.create_assistant_dto_credentials_item import CreateAssistantDtoCredentialsItem +from ..types.create_assistant_dto_first_message_mode import CreateAssistantDtoFirstMessageMode +from ..types.create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem +from ..types.create_assistant_dto_model import CreateAssistantDtoModel from ..types.create_assistant_dto_server_messages_item import CreateAssistantDtoServerMessagesItem -from ..types.create_assistant_dto_background_sound import CreateAssistantDtoBackgroundSound -from ..types.transport_configuration_twilio import TransportConfigurationTwilio -from ..types.twilio_voicemail_detection import TwilioVoicemailDetection -from ..types.analysis_plan import AnalysisPlan -from ..types.artifact_plan import ArtifactPlan -from ..types.message_plan import MessagePlan +from ..types.create_assistant_dto_transcriber import CreateAssistantDtoTranscriber +from ..types.create_assistant_dto_voice import CreateAssistantDtoVoice +from ..types.create_assistant_dto_voicemail_detection import CreateAssistantDtoVoicemailDetection +from ..types.keypad_input_plan import KeypadInputPlan +from ..types.langfuse_observability_plan import LangfuseObservabilityPlan +from ..types.monitor_plan import MonitorPlan +from ..types.server import Server from ..types.start_speaking_plan import StartSpeakingPlan from ..types.stop_speaking_plan import StopSpeakingPlan -from ..types.monitor_plan import MonitorPlan -from ..core.serialization import convert_and_respect_annotation_metadata -from ..core.jsonable_encoder import jsonable_encoder -from .types.update_assistant_dto_transcriber import UpdateAssistantDtoTranscriber -from .types.update_assistant_dto_model import UpdateAssistantDtoModel -from .types.update_assistant_dto_voice import UpdateAssistantDtoVoice -from .types.update_assistant_dto_first_message_mode import UpdateAssistantDtoFirstMessageMode +from ..types.transport_configuration_twilio import TransportConfigurationTwilio +from .raw_client import AsyncRawAssistantsClient, RawAssistantsClient +from .types.update_assistant_dto_background_sound import UpdateAssistantDtoBackgroundSound from .types.update_assistant_dto_client_messages_item import UpdateAssistantDtoClientMessagesItem +from .types.update_assistant_dto_credentials_item import UpdateAssistantDtoCredentialsItem +from .types.update_assistant_dto_first_message_mode import UpdateAssistantDtoFirstMessageMode +from .types.update_assistant_dto_hooks_item import UpdateAssistantDtoHooksItem +from .types.update_assistant_dto_model import UpdateAssistantDtoModel from .types.update_assistant_dto_server_messages_item import UpdateAssistantDtoServerMessagesItem -from .types.update_assistant_dto_background_sound import UpdateAssistantDtoBackgroundSound -from ..core.client_wrapper import AsyncClientWrapper +from .types.update_assistant_dto_transcriber import UpdateAssistantDtoTranscriber +from .types.update_assistant_dto_voice import UpdateAssistantDtoVoice +from .types.update_assistant_dto_voicemail_detection import UpdateAssistantDtoVoicemailDetection # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -41,7 +45,18 @@ class AssistantsClient: def __init__(self, *, client_wrapper: SyncClientWrapper): - self._client_wrapper = client_wrapper + self._raw_client = RawAssistantsClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawAssistantsClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawAssistantsClient + """ + return self._raw_client def list( self, @@ -104,35 +119,19 @@ def list( ) client.assistants.list() """ - _response = self._client_wrapper.httpx_client.request( - "assistant", - method="GET", - params={ - "limit": limit, - "createdAtGt": serialize_datetime(created_at_gt) if created_at_gt is not None else None, - "createdAtLt": serialize_datetime(created_at_lt) if created_at_lt is not None else None, - "createdAtGe": serialize_datetime(created_at_ge) if created_at_ge is not None else None, - "createdAtLe": serialize_datetime(created_at_le) if created_at_le is not None else None, - "updatedAtGt": serialize_datetime(updated_at_gt) if updated_at_gt is not None else None, - "updatedAtLt": serialize_datetime(updated_at_lt) if updated_at_lt is not None else None, - "updatedAtGe": serialize_datetime(updated_at_ge) if updated_at_ge is not None else None, - "updatedAtLe": serialize_datetime(updated_at_le) if updated_at_le is not None else None, - }, + _response = self._raw_client.list( + limit=limit, + created_at_gt=created_at_gt, + created_at_lt=created_at_lt, + created_at_ge=created_at_ge, + created_at_le=created_at_le, + updated_at_gt=updated_at_gt, + updated_at_lt=updated_at_lt, + updated_at_ge=updated_at_ge, + updated_at_le=updated_at_le, request_options=request_options, ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - typing.List[Assistant], - parse_obj_as( - type_=typing.List[Assistant], # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + return _response.data def create( self, @@ -140,33 +139,34 @@ def create( transcriber: typing.Optional[CreateAssistantDtoTranscriber] = OMIT, model: typing.Optional[CreateAssistantDtoModel] = OMIT, voice: typing.Optional[CreateAssistantDtoVoice] = OMIT, + first_message: typing.Optional[str] = OMIT, + first_message_interruptions_enabled: typing.Optional[bool] = OMIT, first_message_mode: typing.Optional[CreateAssistantDtoFirstMessageMode] = OMIT, - hipaa_enabled: typing.Optional[bool] = OMIT, + voicemail_detection: typing.Optional[CreateAssistantDtoVoicemailDetection] = OMIT, client_messages: typing.Optional[typing.Sequence[CreateAssistantDtoClientMessagesItem]] = OMIT, server_messages: typing.Optional[typing.Sequence[CreateAssistantDtoServerMessagesItem]] = OMIT, - silence_timeout_seconds: typing.Optional[float] = OMIT, max_duration_seconds: typing.Optional[float] = OMIT, background_sound: typing.Optional[CreateAssistantDtoBackgroundSound] = OMIT, - backchanneling_enabled: typing.Optional[bool] = OMIT, - background_denoising_enabled: typing.Optional[bool] = OMIT, model_output_in_messages_enabled: typing.Optional[bool] = OMIT, transport_configurations: typing.Optional[typing.Sequence[TransportConfigurationTwilio]] = OMIT, + observability_plan: typing.Optional[LangfuseObservabilityPlan] = OMIT, + credentials: typing.Optional[typing.Sequence[CreateAssistantDtoCredentialsItem]] = OMIT, + hooks: typing.Optional[typing.Sequence[CreateAssistantDtoHooksItem]] = OMIT, name: typing.Optional[str] = OMIT, - first_message: typing.Optional[str] = OMIT, - voicemail_detection: typing.Optional[TwilioVoicemailDetection] = OMIT, voicemail_message: typing.Optional[str] = OMIT, end_call_message: typing.Optional[str] = OMIT, end_call_phrases: typing.Optional[typing.Sequence[str]] = OMIT, - metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, - server_url: typing.Optional[str] = OMIT, - server_url_secret: typing.Optional[str] = OMIT, + compliance_plan: typing.Optional[CompliancePlan] = OMIT, + metadata: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, + background_speech_denoising_plan: typing.Optional[BackgroundSpeechDenoisingPlan] = OMIT, analysis_plan: typing.Optional[AnalysisPlan] = OMIT, artifact_plan: typing.Optional[ArtifactPlan] = OMIT, - message_plan: typing.Optional[MessagePlan] = OMIT, start_speaking_plan: typing.Optional[StartSpeakingPlan] = OMIT, stop_speaking_plan: typing.Optional[StopSpeakingPlan] = OMIT, monitor_plan: typing.Optional[MonitorPlan] = OMIT, credential_ids: typing.Optional[typing.Sequence[str]] = OMIT, + server: typing.Optional[Server] = OMIT, + keypad_input_plan: typing.Optional[KeypadInputPlan] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> Assistant: """ @@ -181,30 +181,32 @@ def create( voice : typing.Optional[CreateAssistantDtoVoice] These are the options for the assistant's voice. + first_message : typing.Optional[str] + This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.). + + If unspecified, assistant will wait for user to speak and use the model to respond once they speak. + + first_message_interruptions_enabled : typing.Optional[bool] + first_message_mode : typing.Optional[CreateAssistantDtoFirstMessageMode] This is the mode for the first message. Default is 'assistant-speaks-first'. Use: - - 'assistant-speaks-first' to have the assistant speak first. - 'assistant-waits-for-user' to have the assistant wait for the user to speak first. - 'assistant-speaks-first-with-model-generated-message' to have the assistant speak first with a message generated by the model based on the conversation state. (`assistant.model.messages` at call start, `call.messages` at squad transfer points). @default 'assistant-speaks-first' - hipaa_enabled : typing.Optional[bool] - When this is enabled, no logs, recordings, or transcriptions will be stored. At the end of the call, you will still receive an end-of-call-report message to store on your server. Defaults to false. + voicemail_detection : typing.Optional[CreateAssistantDtoVoicemailDetection] + These are the settings to configure or disable voicemail detection. Alternatively, voicemail detection can be configured using the model.tools=[VoicemailTool]. + By default, voicemail detection is disabled. client_messages : typing.Optional[typing.Sequence[CreateAssistantDtoClientMessagesItem]] - These are the messages that will be sent to your Client SDKs. Default is conversation-update,function-call,hang,model-output,speech-update,status-update,transcript,tool-calls,user-interrupted,voice-input. You can check the shape of the messages in ClientMessage schema. + These are the messages that will be sent to your Client SDKs. Default is conversation-update,function-call,hang,model-output,speech-update,status-update,transfer-update,transcript,tool-calls,user-interrupted,voice-input,workflow.node.started,assistant.started. You can check the shape of the messages in ClientMessage schema. server_messages : typing.Optional[typing.Sequence[CreateAssistantDtoServerMessagesItem]] - These are the messages that will be sent to your Server URL. Default is conversation-update,end-of-call-report,function-call,hang,speech-update,status-update,tool-calls,transfer-destination-request,user-interrupted. You can check the shape of the messages in ServerMessage schema. - - silence_timeout_seconds : typing.Optional[float] - How many seconds of silence to wait before ending the call. Defaults to 30. - - @default 30 + These are the messages that will be sent to your Server URL. Default is conversation-update,end-of-call-report,function-call,hang,speech-update,status-update,tool-calls,transfer-destination-request,handoff-destination-request,user-interrupted,assistant.started. You can check the shape of the messages in ServerMessage schema. max_duration_seconds : typing.Optional[float] This is the maximum number of seconds that the call will last. When the call reaches this duration, it will be ended. @@ -213,45 +215,31 @@ def create( background_sound : typing.Optional[CreateAssistantDtoBackgroundSound] This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'. - - backchanneling_enabled : typing.Optional[bool] - This determines whether the model says 'mhmm', 'ahem' etc. while user is speaking. - - Default `false` while in beta. - - @default false - - background_denoising_enabled : typing.Optional[bool] - This enables filtering of noise and background speech while the user is talking. - - Default `false` while in beta. - - @default false + You can also provide a custom sound by providing a URL to an audio file. model_output_in_messages_enabled : typing.Optional[bool] This determines whether the model's output is used in conversation history rather than the transcription of assistant's speech. - Default `false` while in beta. - @default false transport_configurations : typing.Optional[typing.Sequence[TransportConfigurationTwilio]] These are the configurations to be passed to the transport providers of assistant's calls, like Twilio. You can store multiple configurations for different transport providers. For a call, only the configuration matching the call transport provider is used. - name : typing.Optional[str] - This is the name of the assistant. + observability_plan : typing.Optional[LangfuseObservabilityPlan] + This is the plan for observability of assistant's calls. - This is required when you want to transfer between assistants in a call. + Currently, only Langfuse is supported. - first_message : typing.Optional[str] - This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.). + credentials : typing.Optional[typing.Sequence[CreateAssistantDtoCredentialsItem]] + These are dynamic credentials that will be used for the assistant calls. By default, all the credentials are available for use in the call but you can supplement an additional credentials using this. Dynamic credentials override existing credentials. - If unspecified, assistant will wait for user to speak and use the model to respond once they speak. + hooks : typing.Optional[typing.Sequence[CreateAssistantDtoHooksItem]] + This is a set of actions that will be performed on certain events. - voicemail_detection : typing.Optional[TwilioVoicemailDetection] - These are the settings to configure or disable voicemail detection. Alternatively, voicemail detection can be configured using the model.tools=[VoicemailTool]. - This uses Twilio's built-in detection while the VoicemailTool relies on the model to detect if a voicemail was reached. - You can use neither of them, one of them, or both of them. By default, Twilio built-in detection is enabled while VoicemailTool is not. + name : typing.Optional[str] + This is the name of the assistant. + + This is required when you want to transfer between assistants in a call. voicemail_message : typing.Optional[str] This is the message that the assistant will say if the call is forwarded to voicemail. @@ -266,20 +254,23 @@ def create( end_call_phrases : typing.Optional[typing.Sequence[str]] This list contains phrases that, if spoken by the assistant, will trigger the call to be hung up. Case insensitive. - metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - This is for metadata you want to store on the assistant. + compliance_plan : typing.Optional[CompliancePlan] - server_url : typing.Optional[str] - This is the URL Vapi will communicate with via HTTP GET and POST Requests. This is used for retrieving context, function calling, and end-of-call reports. + metadata : typing.Optional[typing.Dict[str, typing.Any]] + This is for metadata you want to store on the assistant. - All requests will be sent with the call object among other things relevant to that message. You can find more details in the Server URL documentation. + background_speech_denoising_plan : typing.Optional[BackgroundSpeechDenoisingPlan] + This enables filtering of noise and background speech while the user is talking. - This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: tool.server.url > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl + Features: + - Smart denoising using Krisp + - Fourier denoising - server_url_secret : typing.Optional[str] - This is the secret you can set that Vapi will send with every request to your server. Will be sent as a header called x-vapi-secret. + Smart denoising can be combined with or used independently of Fourier denoising. - Same precedence logic as serverUrl. + Order of precedence: + - Smart denoising + - Fourier denoising analysis_plan : typing.Optional[AnalysisPlan] This is the plan for analysis of assistant's calls. Stored in `call.analysis`. @@ -287,18 +278,10 @@ def create( artifact_plan : typing.Optional[ArtifactPlan] This is the plan for artifacts generated during assistant's calls. Stored in `call.artifact`. - Note: `recordingEnabled` is currently at the root level. It will be moved to `artifactPlan` in the future, but will remain backwards compatible. - - message_plan : typing.Optional[MessagePlan] - This is the plan for static predefined messages that can be spoken by the assistant during the call, like `idleMessages`. - - Note: `firstMessage`, `voicemailMessage`, and `endCallMessage` are currently at the root level. They will be moved to `messagePlan` in the future, but will remain backwards compatible. - start_speaking_plan : typing.Optional[StartSpeakingPlan] This is the plan for when the assistant should start talking. You should configure this if you're running into these issues: - - The assistant is too slow to start talking after the customer is done speaking. - The assistant is too fast to start talking after the customer is done speaking. - The assistant is so fast that it's actually interrupting the customer. @@ -307,7 +290,6 @@ def create( This is the plan for when assistant should stop talking on customer interruption. You should configure this if you're running into these issues: - - The assistant is too slow to recognize customer's interruption. - The assistant is too fast to recognize customer's interruption. - The assistant is getting interrupted by phrases that are just acknowledgments. @@ -318,15 +300,24 @@ def create( This is the plan for real-time monitoring of the assistant's calls. Usage: - - To enable live listening of the assistant's calls, set `monitorPlan.listenEnabled` to `true`. - To enable live control of the assistant's calls, set `monitorPlan.controlEnabled` to `true`. - - Note, `serverMessages`, `clientMessages`, `serverUrl` and `serverUrlSecret` are currently at the root level but will be moved to `monitorPlan` in the future. Will remain backwards compatible + - To attach monitors to the assistant, set `monitorPlan.monitorIds` to the set of monitor ids. credential_ids : typing.Optional[typing.Sequence[str]] These are the credentials that will be used for the assistant calls. By default, all the credentials are available for use in the call but you can provide a subset using this. + server : typing.Optional[Server] + This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema. + + The order of precedence is: + + 1. assistant.server.url + 2. phoneNumber.serverUrl + 3. org.serverUrl + + keypad_input_plan : typing.Optional[KeypadInputPlan] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -344,81 +335,41 @@ def create( ) client.assistants.create() """ - _response = self._client_wrapper.httpx_client.request( - "assistant", - method="POST", - json={ - "transcriber": convert_and_respect_annotation_metadata( - object_=transcriber, annotation=CreateAssistantDtoTranscriber, direction="write" - ), - "model": convert_and_respect_annotation_metadata( - object_=model, annotation=CreateAssistantDtoModel, direction="write" - ), - "voice": convert_and_respect_annotation_metadata( - object_=voice, annotation=CreateAssistantDtoVoice, direction="write" - ), - "firstMessageMode": first_message_mode, - "hipaaEnabled": hipaa_enabled, - "clientMessages": client_messages, - "serverMessages": server_messages, - "silenceTimeoutSeconds": silence_timeout_seconds, - "maxDurationSeconds": max_duration_seconds, - "backgroundSound": background_sound, - "backchannelingEnabled": backchanneling_enabled, - "backgroundDenoisingEnabled": background_denoising_enabled, - "modelOutputInMessagesEnabled": model_output_in_messages_enabled, - "transportConfigurations": convert_and_respect_annotation_metadata( - object_=transport_configurations, - annotation=typing.Sequence[TransportConfigurationTwilio], - direction="write", - ), - "name": name, - "firstMessage": first_message, - "voicemailDetection": convert_and_respect_annotation_metadata( - object_=voicemail_detection, annotation=TwilioVoicemailDetection, direction="write" - ), - "voicemailMessage": voicemail_message, - "endCallMessage": end_call_message, - "endCallPhrases": end_call_phrases, - "metadata": metadata, - "serverUrl": server_url, - "serverUrlSecret": server_url_secret, - "analysisPlan": convert_and_respect_annotation_metadata( - object_=analysis_plan, annotation=AnalysisPlan, direction="write" - ), - "artifactPlan": convert_and_respect_annotation_metadata( - object_=artifact_plan, annotation=ArtifactPlan, direction="write" - ), - "messagePlan": convert_and_respect_annotation_metadata( - object_=message_plan, annotation=MessagePlan, direction="write" - ), - "startSpeakingPlan": convert_and_respect_annotation_metadata( - object_=start_speaking_plan, annotation=StartSpeakingPlan, direction="write" - ), - "stopSpeakingPlan": convert_and_respect_annotation_metadata( - object_=stop_speaking_plan, annotation=StopSpeakingPlan, direction="write" - ), - "monitorPlan": convert_and_respect_annotation_metadata( - object_=monitor_plan, annotation=MonitorPlan, direction="write" - ), - "credentialIds": credential_ids, - }, + _response = self._raw_client.create( + transcriber=transcriber, + model=model, + voice=voice, + first_message=first_message, + first_message_interruptions_enabled=first_message_interruptions_enabled, + first_message_mode=first_message_mode, + voicemail_detection=voicemail_detection, + client_messages=client_messages, + server_messages=server_messages, + max_duration_seconds=max_duration_seconds, + background_sound=background_sound, + model_output_in_messages_enabled=model_output_in_messages_enabled, + transport_configurations=transport_configurations, + observability_plan=observability_plan, + credentials=credentials, + hooks=hooks, + name=name, + voicemail_message=voicemail_message, + end_call_message=end_call_message, + end_call_phrases=end_call_phrases, + compliance_plan=compliance_plan, + metadata=metadata, + background_speech_denoising_plan=background_speech_denoising_plan, + analysis_plan=analysis_plan, + artifact_plan=artifact_plan, + start_speaking_plan=start_speaking_plan, + stop_speaking_plan=stop_speaking_plan, + monitor_plan=monitor_plan, + credential_ids=credential_ids, + server=server, + keypad_input_plan=keypad_input_plan, request_options=request_options, - omit=OMIT, ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - Assistant, - parse_obj_as( - type_=Assistant, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + return _response.data def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Assistant: """ @@ -445,24 +396,8 @@ def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = Non id="id", ) """ - _response = self._client_wrapper.httpx_client.request( - f"assistant/{jsonable_encoder(id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - Assistant, - parse_obj_as( - type_=Assistant, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = self._raw_client.get(id, request_options=request_options) + return _response.data def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Assistant: """ @@ -489,24 +424,8 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = id="id", ) """ - _response = self._client_wrapper.httpx_client.request( - f"assistant/{jsonable_encoder(id)}", - method="DELETE", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - Assistant, - parse_obj_as( - type_=Assistant, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = self._raw_client.delete(id, request_options=request_options) + return _response.data def update( self, @@ -515,33 +434,34 @@ def update( transcriber: typing.Optional[UpdateAssistantDtoTranscriber] = OMIT, model: typing.Optional[UpdateAssistantDtoModel] = OMIT, voice: typing.Optional[UpdateAssistantDtoVoice] = OMIT, + first_message: typing.Optional[str] = OMIT, + first_message_interruptions_enabled: typing.Optional[bool] = OMIT, first_message_mode: typing.Optional[UpdateAssistantDtoFirstMessageMode] = OMIT, - hipaa_enabled: typing.Optional[bool] = OMIT, + voicemail_detection: typing.Optional[UpdateAssistantDtoVoicemailDetection] = OMIT, client_messages: typing.Optional[typing.Sequence[UpdateAssistantDtoClientMessagesItem]] = OMIT, server_messages: typing.Optional[typing.Sequence[UpdateAssistantDtoServerMessagesItem]] = OMIT, - silence_timeout_seconds: typing.Optional[float] = OMIT, max_duration_seconds: typing.Optional[float] = OMIT, background_sound: typing.Optional[UpdateAssistantDtoBackgroundSound] = OMIT, - backchanneling_enabled: typing.Optional[bool] = OMIT, - background_denoising_enabled: typing.Optional[bool] = OMIT, model_output_in_messages_enabled: typing.Optional[bool] = OMIT, transport_configurations: typing.Optional[typing.Sequence[TransportConfigurationTwilio]] = OMIT, + observability_plan: typing.Optional[LangfuseObservabilityPlan] = OMIT, + credentials: typing.Optional[typing.Sequence[UpdateAssistantDtoCredentialsItem]] = OMIT, + hooks: typing.Optional[typing.Sequence[UpdateAssistantDtoHooksItem]] = OMIT, name: typing.Optional[str] = OMIT, - first_message: typing.Optional[str] = OMIT, - voicemail_detection: typing.Optional[TwilioVoicemailDetection] = OMIT, voicemail_message: typing.Optional[str] = OMIT, end_call_message: typing.Optional[str] = OMIT, end_call_phrases: typing.Optional[typing.Sequence[str]] = OMIT, - metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, - server_url: typing.Optional[str] = OMIT, - server_url_secret: typing.Optional[str] = OMIT, + compliance_plan: typing.Optional[CompliancePlan] = OMIT, + metadata: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, + background_speech_denoising_plan: typing.Optional[BackgroundSpeechDenoisingPlan] = OMIT, analysis_plan: typing.Optional[AnalysisPlan] = OMIT, artifact_plan: typing.Optional[ArtifactPlan] = OMIT, - message_plan: typing.Optional[MessagePlan] = OMIT, start_speaking_plan: typing.Optional[StartSpeakingPlan] = OMIT, stop_speaking_plan: typing.Optional[StopSpeakingPlan] = OMIT, monitor_plan: typing.Optional[MonitorPlan] = OMIT, credential_ids: typing.Optional[typing.Sequence[str]] = OMIT, + server: typing.Optional[Server] = OMIT, + keypad_input_plan: typing.Optional[KeypadInputPlan] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> Assistant: """ @@ -558,6 +478,13 @@ def update( voice : typing.Optional[UpdateAssistantDtoVoice] These are the options for the assistant's voice. + first_message : typing.Optional[str] + This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.). + + If unspecified, assistant will wait for user to speak and use the model to respond once they speak. + + first_message_interruptions_enabled : typing.Optional[bool] + first_message_mode : typing.Optional[UpdateAssistantDtoFirstMessageMode] This is the mode for the first message. Default is 'assistant-speaks-first'. @@ -568,19 +495,15 @@ def update( @default 'assistant-speaks-first' - hipaa_enabled : typing.Optional[bool] - When this is enabled, no logs, recordings, or transcriptions will be stored. At the end of the call, you will still receive an end-of-call-report message to store on your server. Defaults to false. + voicemail_detection : typing.Optional[UpdateAssistantDtoVoicemailDetection] + These are the settings to configure or disable voicemail detection. Alternatively, voicemail detection can be configured using the model.tools=[VoicemailTool]. + By default, voicemail detection is disabled. client_messages : typing.Optional[typing.Sequence[UpdateAssistantDtoClientMessagesItem]] - These are the messages that will be sent to your Client SDKs. Default is conversation-update,function-call,hang,model-output,speech-update,status-update,transcript,tool-calls,user-interrupted,voice-input. You can check the shape of the messages in ClientMessage schema. + These are the messages that will be sent to your Client SDKs. Default is conversation-update,function-call,hang,model-output,speech-update,status-update,transfer-update,transcript,tool-calls,user-interrupted,voice-input,workflow.node.started,assistant.started. You can check the shape of the messages in ClientMessage schema. server_messages : typing.Optional[typing.Sequence[UpdateAssistantDtoServerMessagesItem]] - These are the messages that will be sent to your Server URL. Default is conversation-update,end-of-call-report,function-call,hang,speech-update,status-update,tool-calls,transfer-destination-request,user-interrupted. You can check the shape of the messages in ServerMessage schema. - - silence_timeout_seconds : typing.Optional[float] - How many seconds of silence to wait before ending the call. Defaults to 30. - - @default 30 + These are the messages that will be sent to your Server URL. Default is conversation-update,end-of-call-report,function-call,hang,speech-update,status-update,tool-calls,transfer-destination-request,handoff-destination-request,user-interrupted,assistant.started. You can check the shape of the messages in ServerMessage schema. max_duration_seconds : typing.Optional[float] This is the maximum number of seconds that the call will last. When the call reaches this duration, it will be ended. @@ -589,45 +512,31 @@ def update( background_sound : typing.Optional[UpdateAssistantDtoBackgroundSound] This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'. - - backchanneling_enabled : typing.Optional[bool] - This determines whether the model says 'mhmm', 'ahem' etc. while user is speaking. - - Default `false` while in beta. - - @default false - - background_denoising_enabled : typing.Optional[bool] - This enables filtering of noise and background speech while the user is talking. - - Default `false` while in beta. - - @default false + You can also provide a custom sound by providing a URL to an audio file. model_output_in_messages_enabled : typing.Optional[bool] This determines whether the model's output is used in conversation history rather than the transcription of assistant's speech. - Default `false` while in beta. - @default false transport_configurations : typing.Optional[typing.Sequence[TransportConfigurationTwilio]] These are the configurations to be passed to the transport providers of assistant's calls, like Twilio. You can store multiple configurations for different transport providers. For a call, only the configuration matching the call transport provider is used. - name : typing.Optional[str] - This is the name of the assistant. + observability_plan : typing.Optional[LangfuseObservabilityPlan] + This is the plan for observability of assistant's calls. - This is required when you want to transfer between assistants in a call. + Currently, only Langfuse is supported. - first_message : typing.Optional[str] - This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.). + credentials : typing.Optional[typing.Sequence[UpdateAssistantDtoCredentialsItem]] + These are dynamic credentials that will be used for the assistant calls. By default, all the credentials are available for use in the call but you can supplement an additional credentials using this. Dynamic credentials override existing credentials. - If unspecified, assistant will wait for user to speak and use the model to respond once they speak. + hooks : typing.Optional[typing.Sequence[UpdateAssistantDtoHooksItem]] + This is a set of actions that will be performed on certain events. - voicemail_detection : typing.Optional[TwilioVoicemailDetection] - These are the settings to configure or disable voicemail detection. Alternatively, voicemail detection can be configured using the model.tools=[VoicemailTool]. - This uses Twilio's built-in detection while the VoicemailTool relies on the model to detect if a voicemail was reached. - You can use neither of them, one of them, or both of them. By default, Twilio built-in detection is enabled while VoicemailTool is not. + name : typing.Optional[str] + This is the name of the assistant. + + This is required when you want to transfer between assistants in a call. voicemail_message : typing.Optional[str] This is the message that the assistant will say if the call is forwarded to voicemail. @@ -642,20 +551,23 @@ def update( end_call_phrases : typing.Optional[typing.Sequence[str]] This list contains phrases that, if spoken by the assistant, will trigger the call to be hung up. Case insensitive. - metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - This is for metadata you want to store on the assistant. + compliance_plan : typing.Optional[CompliancePlan] - server_url : typing.Optional[str] - This is the URL Vapi will communicate with via HTTP GET and POST Requests. This is used for retrieving context, function calling, and end-of-call reports. + metadata : typing.Optional[typing.Dict[str, typing.Any]] + This is for metadata you want to store on the assistant. - All requests will be sent with the call object among other things relevant to that message. You can find more details in the Server URL documentation. + background_speech_denoising_plan : typing.Optional[BackgroundSpeechDenoisingPlan] + This enables filtering of noise and background speech while the user is talking. - This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: tool.server.url > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl + Features: + - Smart denoising using Krisp + - Fourier denoising - server_url_secret : typing.Optional[str] - This is the secret you can set that Vapi will send with every request to your server. Will be sent as a header called x-vapi-secret. + Smart denoising can be combined with or used independently of Fourier denoising. - Same precedence logic as serverUrl. + Order of precedence: + - Smart denoising + - Fourier denoising analysis_plan : typing.Optional[AnalysisPlan] This is the plan for analysis of assistant's calls. Stored in `call.analysis`. @@ -663,13 +575,6 @@ def update( artifact_plan : typing.Optional[ArtifactPlan] This is the plan for artifacts generated during assistant's calls. Stored in `call.artifact`. - Note: `recordingEnabled` is currently at the root level. It will be moved to `artifactPlan` in the future, but will remain backwards compatible. - - message_plan : typing.Optional[MessagePlan] - This is the plan for static predefined messages that can be spoken by the assistant during the call, like `idleMessages`. - - Note: `firstMessage`, `voicemailMessage`, and `endCallMessage` are currently at the root level. They will be moved to `messagePlan` in the future, but will remain backwards compatible. - start_speaking_plan : typing.Optional[StartSpeakingPlan] This is the plan for when the assistant should start talking. @@ -694,12 +599,22 @@ def update( Usage: - To enable live listening of the assistant's calls, set `monitorPlan.listenEnabled` to `true`. - To enable live control of the assistant's calls, set `monitorPlan.controlEnabled` to `true`. - - Note, `serverMessages`, `clientMessages`, `serverUrl` and `serverUrlSecret` are currently at the root level but will be moved to `monitorPlan` in the future. Will remain backwards compatible + - To attach monitors to the assistant, set `monitorPlan.monitorIds` to the set of monitor ids. credential_ids : typing.Optional[typing.Sequence[str]] These are the credentials that will be used for the assistant calls. By default, all the credentials are available for use in the call but you can provide a subset using this. + server : typing.Optional[Server] + This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema. + + The order of precedence is: + + 1. assistant.server.url + 2. phoneNumber.serverUrl + 3. org.serverUrl + + keypad_input_plan : typing.Optional[KeypadInputPlan] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -719,86 +634,58 @@ def update( id="id", ) """ - _response = self._client_wrapper.httpx_client.request( - f"assistant/{jsonable_encoder(id)}", - method="PATCH", - json={ - "transcriber": convert_and_respect_annotation_metadata( - object_=transcriber, annotation=UpdateAssistantDtoTranscriber, direction="write" - ), - "model": convert_and_respect_annotation_metadata( - object_=model, annotation=UpdateAssistantDtoModel, direction="write" - ), - "voice": convert_and_respect_annotation_metadata( - object_=voice, annotation=UpdateAssistantDtoVoice, direction="write" - ), - "firstMessageMode": first_message_mode, - "hipaaEnabled": hipaa_enabled, - "clientMessages": client_messages, - "serverMessages": server_messages, - "silenceTimeoutSeconds": silence_timeout_seconds, - "maxDurationSeconds": max_duration_seconds, - "backgroundSound": background_sound, - "backchannelingEnabled": backchanneling_enabled, - "backgroundDenoisingEnabled": background_denoising_enabled, - "modelOutputInMessagesEnabled": model_output_in_messages_enabled, - "transportConfigurations": convert_and_respect_annotation_metadata( - object_=transport_configurations, - annotation=typing.Sequence[TransportConfigurationTwilio], - direction="write", - ), - "name": name, - "firstMessage": first_message, - "voicemailDetection": convert_and_respect_annotation_metadata( - object_=voicemail_detection, annotation=TwilioVoicemailDetection, direction="write" - ), - "voicemailMessage": voicemail_message, - "endCallMessage": end_call_message, - "endCallPhrases": end_call_phrases, - "metadata": metadata, - "serverUrl": server_url, - "serverUrlSecret": server_url_secret, - "analysisPlan": convert_and_respect_annotation_metadata( - object_=analysis_plan, annotation=AnalysisPlan, direction="write" - ), - "artifactPlan": convert_and_respect_annotation_metadata( - object_=artifact_plan, annotation=ArtifactPlan, direction="write" - ), - "messagePlan": convert_and_respect_annotation_metadata( - object_=message_plan, annotation=MessagePlan, direction="write" - ), - "startSpeakingPlan": convert_and_respect_annotation_metadata( - object_=start_speaking_plan, annotation=StartSpeakingPlan, direction="write" - ), - "stopSpeakingPlan": convert_and_respect_annotation_metadata( - object_=stop_speaking_plan, annotation=StopSpeakingPlan, direction="write" - ), - "monitorPlan": convert_and_respect_annotation_metadata( - object_=monitor_plan, annotation=MonitorPlan, direction="write" - ), - "credentialIds": credential_ids, - }, + _response = self._raw_client.update( + id, + transcriber=transcriber, + model=model, + voice=voice, + first_message=first_message, + first_message_interruptions_enabled=first_message_interruptions_enabled, + first_message_mode=first_message_mode, + voicemail_detection=voicemail_detection, + client_messages=client_messages, + server_messages=server_messages, + max_duration_seconds=max_duration_seconds, + background_sound=background_sound, + model_output_in_messages_enabled=model_output_in_messages_enabled, + transport_configurations=transport_configurations, + observability_plan=observability_plan, + credentials=credentials, + hooks=hooks, + name=name, + voicemail_message=voicemail_message, + end_call_message=end_call_message, + end_call_phrases=end_call_phrases, + compliance_plan=compliance_plan, + metadata=metadata, + background_speech_denoising_plan=background_speech_denoising_plan, + analysis_plan=analysis_plan, + artifact_plan=artifact_plan, + start_speaking_plan=start_speaking_plan, + stop_speaking_plan=stop_speaking_plan, + monitor_plan=monitor_plan, + credential_ids=credential_ids, + server=server, + keypad_input_plan=keypad_input_plan, request_options=request_options, - omit=OMIT, ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - Assistant, - parse_obj_as( - type_=Assistant, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + return _response.data class AsyncAssistantsClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper + self._raw_client = AsyncRawAssistantsClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawAssistantsClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawAssistantsClient + """ + return self._raw_client async def list( self, @@ -869,35 +756,19 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - "assistant", - method="GET", - params={ - "limit": limit, - "createdAtGt": serialize_datetime(created_at_gt) if created_at_gt is not None else None, - "createdAtLt": serialize_datetime(created_at_lt) if created_at_lt is not None else None, - "createdAtGe": serialize_datetime(created_at_ge) if created_at_ge is not None else None, - "createdAtLe": serialize_datetime(created_at_le) if created_at_le is not None else None, - "updatedAtGt": serialize_datetime(updated_at_gt) if updated_at_gt is not None else None, - "updatedAtLt": serialize_datetime(updated_at_lt) if updated_at_lt is not None else None, - "updatedAtGe": serialize_datetime(updated_at_ge) if updated_at_ge is not None else None, - "updatedAtLe": serialize_datetime(updated_at_le) if updated_at_le is not None else None, - }, + _response = await self._raw_client.list( + limit=limit, + created_at_gt=created_at_gt, + created_at_lt=created_at_lt, + created_at_ge=created_at_ge, + created_at_le=created_at_le, + updated_at_gt=updated_at_gt, + updated_at_lt=updated_at_lt, + updated_at_ge=updated_at_ge, + updated_at_le=updated_at_le, request_options=request_options, ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - typing.List[Assistant], - parse_obj_as( - type_=typing.List[Assistant], # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + return _response.data async def create( self, @@ -905,33 +776,34 @@ async def create( transcriber: typing.Optional[CreateAssistantDtoTranscriber] = OMIT, model: typing.Optional[CreateAssistantDtoModel] = OMIT, voice: typing.Optional[CreateAssistantDtoVoice] = OMIT, + first_message: typing.Optional[str] = OMIT, + first_message_interruptions_enabled: typing.Optional[bool] = OMIT, first_message_mode: typing.Optional[CreateAssistantDtoFirstMessageMode] = OMIT, - hipaa_enabled: typing.Optional[bool] = OMIT, + voicemail_detection: typing.Optional[CreateAssistantDtoVoicemailDetection] = OMIT, client_messages: typing.Optional[typing.Sequence[CreateAssistantDtoClientMessagesItem]] = OMIT, server_messages: typing.Optional[typing.Sequence[CreateAssistantDtoServerMessagesItem]] = OMIT, - silence_timeout_seconds: typing.Optional[float] = OMIT, max_duration_seconds: typing.Optional[float] = OMIT, background_sound: typing.Optional[CreateAssistantDtoBackgroundSound] = OMIT, - backchanneling_enabled: typing.Optional[bool] = OMIT, - background_denoising_enabled: typing.Optional[bool] = OMIT, model_output_in_messages_enabled: typing.Optional[bool] = OMIT, transport_configurations: typing.Optional[typing.Sequence[TransportConfigurationTwilio]] = OMIT, + observability_plan: typing.Optional[LangfuseObservabilityPlan] = OMIT, + credentials: typing.Optional[typing.Sequence[CreateAssistantDtoCredentialsItem]] = OMIT, + hooks: typing.Optional[typing.Sequence[CreateAssistantDtoHooksItem]] = OMIT, name: typing.Optional[str] = OMIT, - first_message: typing.Optional[str] = OMIT, - voicemail_detection: typing.Optional[TwilioVoicemailDetection] = OMIT, voicemail_message: typing.Optional[str] = OMIT, end_call_message: typing.Optional[str] = OMIT, end_call_phrases: typing.Optional[typing.Sequence[str]] = OMIT, - metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, - server_url: typing.Optional[str] = OMIT, - server_url_secret: typing.Optional[str] = OMIT, + compliance_plan: typing.Optional[CompliancePlan] = OMIT, + metadata: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, + background_speech_denoising_plan: typing.Optional[BackgroundSpeechDenoisingPlan] = OMIT, analysis_plan: typing.Optional[AnalysisPlan] = OMIT, artifact_plan: typing.Optional[ArtifactPlan] = OMIT, - message_plan: typing.Optional[MessagePlan] = OMIT, start_speaking_plan: typing.Optional[StartSpeakingPlan] = OMIT, stop_speaking_plan: typing.Optional[StopSpeakingPlan] = OMIT, monitor_plan: typing.Optional[MonitorPlan] = OMIT, credential_ids: typing.Optional[typing.Sequence[str]] = OMIT, + server: typing.Optional[Server] = OMIT, + keypad_input_plan: typing.Optional[KeypadInputPlan] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> Assistant: """ @@ -946,30 +818,32 @@ async def create( voice : typing.Optional[CreateAssistantDtoVoice] These are the options for the assistant's voice. + first_message : typing.Optional[str] + This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.). + + If unspecified, assistant will wait for user to speak and use the model to respond once they speak. + + first_message_interruptions_enabled : typing.Optional[bool] + first_message_mode : typing.Optional[CreateAssistantDtoFirstMessageMode] This is the mode for the first message. Default is 'assistant-speaks-first'. Use: - - 'assistant-speaks-first' to have the assistant speak first. - 'assistant-waits-for-user' to have the assistant wait for the user to speak first. - 'assistant-speaks-first-with-model-generated-message' to have the assistant speak first with a message generated by the model based on the conversation state. (`assistant.model.messages` at call start, `call.messages` at squad transfer points). @default 'assistant-speaks-first' - hipaa_enabled : typing.Optional[bool] - When this is enabled, no logs, recordings, or transcriptions will be stored. At the end of the call, you will still receive an end-of-call-report message to store on your server. Defaults to false. + voicemail_detection : typing.Optional[CreateAssistantDtoVoicemailDetection] + These are the settings to configure or disable voicemail detection. Alternatively, voicemail detection can be configured using the model.tools=[VoicemailTool]. + By default, voicemail detection is disabled. client_messages : typing.Optional[typing.Sequence[CreateAssistantDtoClientMessagesItem]] - These are the messages that will be sent to your Client SDKs. Default is conversation-update,function-call,hang,model-output,speech-update,status-update,transcript,tool-calls,user-interrupted,voice-input. You can check the shape of the messages in ClientMessage schema. + These are the messages that will be sent to your Client SDKs. Default is conversation-update,function-call,hang,model-output,speech-update,status-update,transfer-update,transcript,tool-calls,user-interrupted,voice-input,workflow.node.started,assistant.started. You can check the shape of the messages in ClientMessage schema. server_messages : typing.Optional[typing.Sequence[CreateAssistantDtoServerMessagesItem]] - These are the messages that will be sent to your Server URL. Default is conversation-update,end-of-call-report,function-call,hang,speech-update,status-update,tool-calls,transfer-destination-request,user-interrupted. You can check the shape of the messages in ServerMessage schema. - - silence_timeout_seconds : typing.Optional[float] - How many seconds of silence to wait before ending the call. Defaults to 30. - - @default 30 + These are the messages that will be sent to your Server URL. Default is conversation-update,end-of-call-report,function-call,hang,speech-update,status-update,tool-calls,transfer-destination-request,handoff-destination-request,user-interrupted,assistant.started. You can check the shape of the messages in ServerMessage schema. max_duration_seconds : typing.Optional[float] This is the maximum number of seconds that the call will last. When the call reaches this duration, it will be ended. @@ -978,45 +852,31 @@ async def create( background_sound : typing.Optional[CreateAssistantDtoBackgroundSound] This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'. - - backchanneling_enabled : typing.Optional[bool] - This determines whether the model says 'mhmm', 'ahem' etc. while user is speaking. - - Default `false` while in beta. - - @default false - - background_denoising_enabled : typing.Optional[bool] - This enables filtering of noise and background speech while the user is talking. - - Default `false` while in beta. - - @default false + You can also provide a custom sound by providing a URL to an audio file. model_output_in_messages_enabled : typing.Optional[bool] This determines whether the model's output is used in conversation history rather than the transcription of assistant's speech. - Default `false` while in beta. - @default false transport_configurations : typing.Optional[typing.Sequence[TransportConfigurationTwilio]] These are the configurations to be passed to the transport providers of assistant's calls, like Twilio. You can store multiple configurations for different transport providers. For a call, only the configuration matching the call transport provider is used. - name : typing.Optional[str] - This is the name of the assistant. + observability_plan : typing.Optional[LangfuseObservabilityPlan] + This is the plan for observability of assistant's calls. - This is required when you want to transfer between assistants in a call. + Currently, only Langfuse is supported. - first_message : typing.Optional[str] - This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.). + credentials : typing.Optional[typing.Sequence[CreateAssistantDtoCredentialsItem]] + These are dynamic credentials that will be used for the assistant calls. By default, all the credentials are available for use in the call but you can supplement an additional credentials using this. Dynamic credentials override existing credentials. - If unspecified, assistant will wait for user to speak and use the model to respond once they speak. + hooks : typing.Optional[typing.Sequence[CreateAssistantDtoHooksItem]] + This is a set of actions that will be performed on certain events. - voicemail_detection : typing.Optional[TwilioVoicemailDetection] - These are the settings to configure or disable voicemail detection. Alternatively, voicemail detection can be configured using the model.tools=[VoicemailTool]. - This uses Twilio's built-in detection while the VoicemailTool relies on the model to detect if a voicemail was reached. - You can use neither of them, one of them, or both of them. By default, Twilio built-in detection is enabled while VoicemailTool is not. + name : typing.Optional[str] + This is the name of the assistant. + + This is required when you want to transfer between assistants in a call. voicemail_message : typing.Optional[str] This is the message that the assistant will say if the call is forwarded to voicemail. @@ -1031,20 +891,23 @@ async def create( end_call_phrases : typing.Optional[typing.Sequence[str]] This list contains phrases that, if spoken by the assistant, will trigger the call to be hung up. Case insensitive. - metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - This is for metadata you want to store on the assistant. + compliance_plan : typing.Optional[CompliancePlan] - server_url : typing.Optional[str] - This is the URL Vapi will communicate with via HTTP GET and POST Requests. This is used for retrieving context, function calling, and end-of-call reports. + metadata : typing.Optional[typing.Dict[str, typing.Any]] + This is for metadata you want to store on the assistant. - All requests will be sent with the call object among other things relevant to that message. You can find more details in the Server URL documentation. + background_speech_denoising_plan : typing.Optional[BackgroundSpeechDenoisingPlan] + This enables filtering of noise and background speech while the user is talking. - This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: tool.server.url > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl + Features: + - Smart denoising using Krisp + - Fourier denoising - server_url_secret : typing.Optional[str] - This is the secret you can set that Vapi will send with every request to your server. Will be sent as a header called x-vapi-secret. + Smart denoising can be combined with or used independently of Fourier denoising. - Same precedence logic as serverUrl. + Order of precedence: + - Smart denoising + - Fourier denoising analysis_plan : typing.Optional[AnalysisPlan] This is the plan for analysis of assistant's calls. Stored in `call.analysis`. @@ -1052,18 +915,10 @@ async def create( artifact_plan : typing.Optional[ArtifactPlan] This is the plan for artifacts generated during assistant's calls. Stored in `call.artifact`. - Note: `recordingEnabled` is currently at the root level. It will be moved to `artifactPlan` in the future, but will remain backwards compatible. - - message_plan : typing.Optional[MessagePlan] - This is the plan for static predefined messages that can be spoken by the assistant during the call, like `idleMessages`. - - Note: `firstMessage`, `voicemailMessage`, and `endCallMessage` are currently at the root level. They will be moved to `messagePlan` in the future, but will remain backwards compatible. - start_speaking_plan : typing.Optional[StartSpeakingPlan] This is the plan for when the assistant should start talking. You should configure this if you're running into these issues: - - The assistant is too slow to start talking after the customer is done speaking. - The assistant is too fast to start talking after the customer is done speaking. - The assistant is so fast that it's actually interrupting the customer. @@ -1072,7 +927,6 @@ async def create( This is the plan for when assistant should stop talking on customer interruption. You should configure this if you're running into these issues: - - The assistant is too slow to recognize customer's interruption. - The assistant is too fast to recognize customer's interruption. - The assistant is getting interrupted by phrases that are just acknowledgments. @@ -1083,15 +937,24 @@ async def create( This is the plan for real-time monitoring of the assistant's calls. Usage: - - To enable live listening of the assistant's calls, set `monitorPlan.listenEnabled` to `true`. - To enable live control of the assistant's calls, set `monitorPlan.controlEnabled` to `true`. - - Note, `serverMessages`, `clientMessages`, `serverUrl` and `serverUrlSecret` are currently at the root level but will be moved to `monitorPlan` in the future. Will remain backwards compatible + - To attach monitors to the assistant, set `monitorPlan.monitorIds` to the set of monitor ids. credential_ids : typing.Optional[typing.Sequence[str]] These are the credentials that will be used for the assistant calls. By default, all the credentials are available for use in the call but you can provide a subset using this. + server : typing.Optional[Server] + This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema. + + The order of precedence is: + + 1. assistant.server.url + 2. phoneNumber.serverUrl + 3. org.serverUrl + + keypad_input_plan : typing.Optional[KeypadInputPlan] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1117,81 +980,41 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - "assistant", - method="POST", - json={ - "transcriber": convert_and_respect_annotation_metadata( - object_=transcriber, annotation=CreateAssistantDtoTranscriber, direction="write" - ), - "model": convert_and_respect_annotation_metadata( - object_=model, annotation=CreateAssistantDtoModel, direction="write" - ), - "voice": convert_and_respect_annotation_metadata( - object_=voice, annotation=CreateAssistantDtoVoice, direction="write" - ), - "firstMessageMode": first_message_mode, - "hipaaEnabled": hipaa_enabled, - "clientMessages": client_messages, - "serverMessages": server_messages, - "silenceTimeoutSeconds": silence_timeout_seconds, - "maxDurationSeconds": max_duration_seconds, - "backgroundSound": background_sound, - "backchannelingEnabled": backchanneling_enabled, - "backgroundDenoisingEnabled": background_denoising_enabled, - "modelOutputInMessagesEnabled": model_output_in_messages_enabled, - "transportConfigurations": convert_and_respect_annotation_metadata( - object_=transport_configurations, - annotation=typing.Sequence[TransportConfigurationTwilio], - direction="write", - ), - "name": name, - "firstMessage": first_message, - "voicemailDetection": convert_and_respect_annotation_metadata( - object_=voicemail_detection, annotation=TwilioVoicemailDetection, direction="write" - ), - "voicemailMessage": voicemail_message, - "endCallMessage": end_call_message, - "endCallPhrases": end_call_phrases, - "metadata": metadata, - "serverUrl": server_url, - "serverUrlSecret": server_url_secret, - "analysisPlan": convert_and_respect_annotation_metadata( - object_=analysis_plan, annotation=AnalysisPlan, direction="write" - ), - "artifactPlan": convert_and_respect_annotation_metadata( - object_=artifact_plan, annotation=ArtifactPlan, direction="write" - ), - "messagePlan": convert_and_respect_annotation_metadata( - object_=message_plan, annotation=MessagePlan, direction="write" - ), - "startSpeakingPlan": convert_and_respect_annotation_metadata( - object_=start_speaking_plan, annotation=StartSpeakingPlan, direction="write" - ), - "stopSpeakingPlan": convert_and_respect_annotation_metadata( - object_=stop_speaking_plan, annotation=StopSpeakingPlan, direction="write" - ), - "monitorPlan": convert_and_respect_annotation_metadata( - object_=monitor_plan, annotation=MonitorPlan, direction="write" - ), - "credentialIds": credential_ids, - }, + _response = await self._raw_client.create( + transcriber=transcriber, + model=model, + voice=voice, + first_message=first_message, + first_message_interruptions_enabled=first_message_interruptions_enabled, + first_message_mode=first_message_mode, + voicemail_detection=voicemail_detection, + client_messages=client_messages, + server_messages=server_messages, + max_duration_seconds=max_duration_seconds, + background_sound=background_sound, + model_output_in_messages_enabled=model_output_in_messages_enabled, + transport_configurations=transport_configurations, + observability_plan=observability_plan, + credentials=credentials, + hooks=hooks, + name=name, + voicemail_message=voicemail_message, + end_call_message=end_call_message, + end_call_phrases=end_call_phrases, + compliance_plan=compliance_plan, + metadata=metadata, + background_speech_denoising_plan=background_speech_denoising_plan, + analysis_plan=analysis_plan, + artifact_plan=artifact_plan, + start_speaking_plan=start_speaking_plan, + stop_speaking_plan=stop_speaking_plan, + monitor_plan=monitor_plan, + credential_ids=credential_ids, + server=server, + keypad_input_plan=keypad_input_plan, request_options=request_options, - omit=OMIT, ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - Assistant, - parse_obj_as( - type_=Assistant, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + return _response.data async def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Assistant: """ @@ -1226,24 +1049,8 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - f"assistant/{jsonable_encoder(id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - Assistant, - parse_obj_as( - type_=Assistant, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = await self._raw_client.get(id, request_options=request_options) + return _response.data async def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Assistant: """ @@ -1278,24 +1085,8 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - f"assistant/{jsonable_encoder(id)}", - method="DELETE", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - Assistant, - parse_obj_as( - type_=Assistant, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = await self._raw_client.delete(id, request_options=request_options) + return _response.data async def update( self, @@ -1304,33 +1095,34 @@ async def update( transcriber: typing.Optional[UpdateAssistantDtoTranscriber] = OMIT, model: typing.Optional[UpdateAssistantDtoModel] = OMIT, voice: typing.Optional[UpdateAssistantDtoVoice] = OMIT, + first_message: typing.Optional[str] = OMIT, + first_message_interruptions_enabled: typing.Optional[bool] = OMIT, first_message_mode: typing.Optional[UpdateAssistantDtoFirstMessageMode] = OMIT, - hipaa_enabled: typing.Optional[bool] = OMIT, + voicemail_detection: typing.Optional[UpdateAssistantDtoVoicemailDetection] = OMIT, client_messages: typing.Optional[typing.Sequence[UpdateAssistantDtoClientMessagesItem]] = OMIT, server_messages: typing.Optional[typing.Sequence[UpdateAssistantDtoServerMessagesItem]] = OMIT, - silence_timeout_seconds: typing.Optional[float] = OMIT, max_duration_seconds: typing.Optional[float] = OMIT, background_sound: typing.Optional[UpdateAssistantDtoBackgroundSound] = OMIT, - backchanneling_enabled: typing.Optional[bool] = OMIT, - background_denoising_enabled: typing.Optional[bool] = OMIT, model_output_in_messages_enabled: typing.Optional[bool] = OMIT, transport_configurations: typing.Optional[typing.Sequence[TransportConfigurationTwilio]] = OMIT, + observability_plan: typing.Optional[LangfuseObservabilityPlan] = OMIT, + credentials: typing.Optional[typing.Sequence[UpdateAssistantDtoCredentialsItem]] = OMIT, + hooks: typing.Optional[typing.Sequence[UpdateAssistantDtoHooksItem]] = OMIT, name: typing.Optional[str] = OMIT, - first_message: typing.Optional[str] = OMIT, - voicemail_detection: typing.Optional[TwilioVoicemailDetection] = OMIT, voicemail_message: typing.Optional[str] = OMIT, end_call_message: typing.Optional[str] = OMIT, end_call_phrases: typing.Optional[typing.Sequence[str]] = OMIT, - metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, - server_url: typing.Optional[str] = OMIT, - server_url_secret: typing.Optional[str] = OMIT, + compliance_plan: typing.Optional[CompliancePlan] = OMIT, + metadata: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, + background_speech_denoising_plan: typing.Optional[BackgroundSpeechDenoisingPlan] = OMIT, analysis_plan: typing.Optional[AnalysisPlan] = OMIT, artifact_plan: typing.Optional[ArtifactPlan] = OMIT, - message_plan: typing.Optional[MessagePlan] = OMIT, start_speaking_plan: typing.Optional[StartSpeakingPlan] = OMIT, stop_speaking_plan: typing.Optional[StopSpeakingPlan] = OMIT, monitor_plan: typing.Optional[MonitorPlan] = OMIT, credential_ids: typing.Optional[typing.Sequence[str]] = OMIT, + server: typing.Optional[Server] = OMIT, + keypad_input_plan: typing.Optional[KeypadInputPlan] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> Assistant: """ @@ -1347,6 +1139,13 @@ async def update( voice : typing.Optional[UpdateAssistantDtoVoice] These are the options for the assistant's voice. + first_message : typing.Optional[str] + This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.). + + If unspecified, assistant will wait for user to speak and use the model to respond once they speak. + + first_message_interruptions_enabled : typing.Optional[bool] + first_message_mode : typing.Optional[UpdateAssistantDtoFirstMessageMode] This is the mode for the first message. Default is 'assistant-speaks-first'. @@ -1357,19 +1156,15 @@ async def update( @default 'assistant-speaks-first' - hipaa_enabled : typing.Optional[bool] - When this is enabled, no logs, recordings, or transcriptions will be stored. At the end of the call, you will still receive an end-of-call-report message to store on your server. Defaults to false. + voicemail_detection : typing.Optional[UpdateAssistantDtoVoicemailDetection] + These are the settings to configure or disable voicemail detection. Alternatively, voicemail detection can be configured using the model.tools=[VoicemailTool]. + By default, voicemail detection is disabled. client_messages : typing.Optional[typing.Sequence[UpdateAssistantDtoClientMessagesItem]] - These are the messages that will be sent to your Client SDKs. Default is conversation-update,function-call,hang,model-output,speech-update,status-update,transcript,tool-calls,user-interrupted,voice-input. You can check the shape of the messages in ClientMessage schema. + These are the messages that will be sent to your Client SDKs. Default is conversation-update,function-call,hang,model-output,speech-update,status-update,transfer-update,transcript,tool-calls,user-interrupted,voice-input,workflow.node.started,assistant.started. You can check the shape of the messages in ClientMessage schema. server_messages : typing.Optional[typing.Sequence[UpdateAssistantDtoServerMessagesItem]] - These are the messages that will be sent to your Server URL. Default is conversation-update,end-of-call-report,function-call,hang,speech-update,status-update,tool-calls,transfer-destination-request,user-interrupted. You can check the shape of the messages in ServerMessage schema. - - silence_timeout_seconds : typing.Optional[float] - How many seconds of silence to wait before ending the call. Defaults to 30. - - @default 30 + These are the messages that will be sent to your Server URL. Default is conversation-update,end-of-call-report,function-call,hang,speech-update,status-update,tool-calls,transfer-destination-request,handoff-destination-request,user-interrupted,assistant.started. You can check the shape of the messages in ServerMessage schema. max_duration_seconds : typing.Optional[float] This is the maximum number of seconds that the call will last. When the call reaches this duration, it will be ended. @@ -1378,45 +1173,31 @@ async def update( background_sound : typing.Optional[UpdateAssistantDtoBackgroundSound] This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'. - - backchanneling_enabled : typing.Optional[bool] - This determines whether the model says 'mhmm', 'ahem' etc. while user is speaking. - - Default `false` while in beta. - - @default false - - background_denoising_enabled : typing.Optional[bool] - This enables filtering of noise and background speech while the user is talking. - - Default `false` while in beta. - - @default false + You can also provide a custom sound by providing a URL to an audio file. model_output_in_messages_enabled : typing.Optional[bool] This determines whether the model's output is used in conversation history rather than the transcription of assistant's speech. - Default `false` while in beta. - @default false transport_configurations : typing.Optional[typing.Sequence[TransportConfigurationTwilio]] These are the configurations to be passed to the transport providers of assistant's calls, like Twilio. You can store multiple configurations for different transport providers. For a call, only the configuration matching the call transport provider is used. - name : typing.Optional[str] - This is the name of the assistant. + observability_plan : typing.Optional[LangfuseObservabilityPlan] + This is the plan for observability of assistant's calls. - This is required when you want to transfer between assistants in a call. + Currently, only Langfuse is supported. - first_message : typing.Optional[str] - This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.). + credentials : typing.Optional[typing.Sequence[UpdateAssistantDtoCredentialsItem]] + These are dynamic credentials that will be used for the assistant calls. By default, all the credentials are available for use in the call but you can supplement an additional credentials using this. Dynamic credentials override existing credentials. - If unspecified, assistant will wait for user to speak and use the model to respond once they speak. + hooks : typing.Optional[typing.Sequence[UpdateAssistantDtoHooksItem]] + This is a set of actions that will be performed on certain events. - voicemail_detection : typing.Optional[TwilioVoicemailDetection] - These are the settings to configure or disable voicemail detection. Alternatively, voicemail detection can be configured using the model.tools=[VoicemailTool]. - This uses Twilio's built-in detection while the VoicemailTool relies on the model to detect if a voicemail was reached. - You can use neither of them, one of them, or both of them. By default, Twilio built-in detection is enabled while VoicemailTool is not. + name : typing.Optional[str] + This is the name of the assistant. + + This is required when you want to transfer between assistants in a call. voicemail_message : typing.Optional[str] This is the message that the assistant will say if the call is forwarded to voicemail. @@ -1431,20 +1212,23 @@ async def update( end_call_phrases : typing.Optional[typing.Sequence[str]] This list contains phrases that, if spoken by the assistant, will trigger the call to be hung up. Case insensitive. - metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - This is for metadata you want to store on the assistant. + compliance_plan : typing.Optional[CompliancePlan] - server_url : typing.Optional[str] - This is the URL Vapi will communicate with via HTTP GET and POST Requests. This is used for retrieving context, function calling, and end-of-call reports. + metadata : typing.Optional[typing.Dict[str, typing.Any]] + This is for metadata you want to store on the assistant. - All requests will be sent with the call object among other things relevant to that message. You can find more details in the Server URL documentation. + background_speech_denoising_plan : typing.Optional[BackgroundSpeechDenoisingPlan] + This enables filtering of noise and background speech while the user is talking. - This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: tool.server.url > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl + Features: + - Smart denoising using Krisp + - Fourier denoising - server_url_secret : typing.Optional[str] - This is the secret you can set that Vapi will send with every request to your server. Will be sent as a header called x-vapi-secret. + Smart denoising can be combined with or used independently of Fourier denoising. - Same precedence logic as serverUrl. + Order of precedence: + - Smart denoising + - Fourier denoising analysis_plan : typing.Optional[AnalysisPlan] This is the plan for analysis of assistant's calls. Stored in `call.analysis`. @@ -1452,13 +1236,6 @@ async def update( artifact_plan : typing.Optional[ArtifactPlan] This is the plan for artifacts generated during assistant's calls. Stored in `call.artifact`. - Note: `recordingEnabled` is currently at the root level. It will be moved to `artifactPlan` in the future, but will remain backwards compatible. - - message_plan : typing.Optional[MessagePlan] - This is the plan for static predefined messages that can be spoken by the assistant during the call, like `idleMessages`. - - Note: `firstMessage`, `voicemailMessage`, and `endCallMessage` are currently at the root level. They will be moved to `messagePlan` in the future, but will remain backwards compatible. - start_speaking_plan : typing.Optional[StartSpeakingPlan] This is the plan for when the assistant should start talking. @@ -1483,12 +1260,22 @@ async def update( Usage: - To enable live listening of the assistant's calls, set `monitorPlan.listenEnabled` to `true`. - To enable live control of the assistant's calls, set `monitorPlan.controlEnabled` to `true`. - - Note, `serverMessages`, `clientMessages`, `serverUrl` and `serverUrlSecret` are currently at the root level but will be moved to `monitorPlan` in the future. Will remain backwards compatible + - To attach monitors to the assistant, set `monitorPlan.monitorIds` to the set of monitor ids. credential_ids : typing.Optional[typing.Sequence[str]] These are the credentials that will be used for the assistant calls. By default, all the credentials are available for use in the call but you can provide a subset using this. + server : typing.Optional[Server] + This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema. + + The order of precedence is: + + 1. assistant.server.url + 2. phoneNumber.serverUrl + 3. org.serverUrl + + keypad_input_plan : typing.Optional[KeypadInputPlan] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1516,78 +1303,39 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - f"assistant/{jsonable_encoder(id)}", - method="PATCH", - json={ - "transcriber": convert_and_respect_annotation_metadata( - object_=transcriber, annotation=UpdateAssistantDtoTranscriber, direction="write" - ), - "model": convert_and_respect_annotation_metadata( - object_=model, annotation=UpdateAssistantDtoModel, direction="write" - ), - "voice": convert_and_respect_annotation_metadata( - object_=voice, annotation=UpdateAssistantDtoVoice, direction="write" - ), - "firstMessageMode": first_message_mode, - "hipaaEnabled": hipaa_enabled, - "clientMessages": client_messages, - "serverMessages": server_messages, - "silenceTimeoutSeconds": silence_timeout_seconds, - "maxDurationSeconds": max_duration_seconds, - "backgroundSound": background_sound, - "backchannelingEnabled": backchanneling_enabled, - "backgroundDenoisingEnabled": background_denoising_enabled, - "modelOutputInMessagesEnabled": model_output_in_messages_enabled, - "transportConfigurations": convert_and_respect_annotation_metadata( - object_=transport_configurations, - annotation=typing.Sequence[TransportConfigurationTwilio], - direction="write", - ), - "name": name, - "firstMessage": first_message, - "voicemailDetection": convert_and_respect_annotation_metadata( - object_=voicemail_detection, annotation=TwilioVoicemailDetection, direction="write" - ), - "voicemailMessage": voicemail_message, - "endCallMessage": end_call_message, - "endCallPhrases": end_call_phrases, - "metadata": metadata, - "serverUrl": server_url, - "serverUrlSecret": server_url_secret, - "analysisPlan": convert_and_respect_annotation_metadata( - object_=analysis_plan, annotation=AnalysisPlan, direction="write" - ), - "artifactPlan": convert_and_respect_annotation_metadata( - object_=artifact_plan, annotation=ArtifactPlan, direction="write" - ), - "messagePlan": convert_and_respect_annotation_metadata( - object_=message_plan, annotation=MessagePlan, direction="write" - ), - "startSpeakingPlan": convert_and_respect_annotation_metadata( - object_=start_speaking_plan, annotation=StartSpeakingPlan, direction="write" - ), - "stopSpeakingPlan": convert_and_respect_annotation_metadata( - object_=stop_speaking_plan, annotation=StopSpeakingPlan, direction="write" - ), - "monitorPlan": convert_and_respect_annotation_metadata( - object_=monitor_plan, annotation=MonitorPlan, direction="write" - ), - "credentialIds": credential_ids, - }, + _response = await self._raw_client.update( + id, + transcriber=transcriber, + model=model, + voice=voice, + first_message=first_message, + first_message_interruptions_enabled=first_message_interruptions_enabled, + first_message_mode=first_message_mode, + voicemail_detection=voicemail_detection, + client_messages=client_messages, + server_messages=server_messages, + max_duration_seconds=max_duration_seconds, + background_sound=background_sound, + model_output_in_messages_enabled=model_output_in_messages_enabled, + transport_configurations=transport_configurations, + observability_plan=observability_plan, + credentials=credentials, + hooks=hooks, + name=name, + voicemail_message=voicemail_message, + end_call_message=end_call_message, + end_call_phrases=end_call_phrases, + compliance_plan=compliance_plan, + metadata=metadata, + background_speech_denoising_plan=background_speech_denoising_plan, + analysis_plan=analysis_plan, + artifact_plan=artifact_plan, + start_speaking_plan=start_speaking_plan, + stop_speaking_plan=stop_speaking_plan, + monitor_plan=monitor_plan, + credential_ids=credential_ids, + server=server, + keypad_input_plan=keypad_input_plan, request_options=request_options, - omit=OMIT, ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - Assistant, - parse_obj_as( - type_=Assistant, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + return _response.data diff --git a/src/vapi/assistants/raw_client.py b/src/vapi/assistants/raw_client.py new file mode 100644 index 00000000..f71c1976 --- /dev/null +++ b/src/vapi/assistants/raw_client.py @@ -0,0 +1,1567 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing +from json.decoder import JSONDecodeError + +from ..core.api_error import ApiError +from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.datetime_utils import serialize_datetime +from ..core.http_response import AsyncHttpResponse, HttpResponse +from ..core.jsonable_encoder import jsonable_encoder +from ..core.parse_error import ParsingError +from ..core.request_options import RequestOptions +from ..core.serialization import convert_and_respect_annotation_metadata +from ..core.unchecked_base_model import construct_type +from ..types.analysis_plan import AnalysisPlan +from ..types.artifact_plan import ArtifactPlan +from ..types.assistant import Assistant +from ..types.background_speech_denoising_plan import BackgroundSpeechDenoisingPlan +from ..types.compliance_plan import CompliancePlan +from ..types.create_assistant_dto_background_sound import CreateAssistantDtoBackgroundSound +from ..types.create_assistant_dto_client_messages_item import CreateAssistantDtoClientMessagesItem +from ..types.create_assistant_dto_credentials_item import CreateAssistantDtoCredentialsItem +from ..types.create_assistant_dto_first_message_mode import CreateAssistantDtoFirstMessageMode +from ..types.create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem +from ..types.create_assistant_dto_model import CreateAssistantDtoModel +from ..types.create_assistant_dto_server_messages_item import CreateAssistantDtoServerMessagesItem +from ..types.create_assistant_dto_transcriber import CreateAssistantDtoTranscriber +from ..types.create_assistant_dto_voice import CreateAssistantDtoVoice +from ..types.create_assistant_dto_voicemail_detection import CreateAssistantDtoVoicemailDetection +from ..types.keypad_input_plan import KeypadInputPlan +from ..types.langfuse_observability_plan import LangfuseObservabilityPlan +from ..types.monitor_plan import MonitorPlan +from ..types.server import Server +from ..types.start_speaking_plan import StartSpeakingPlan +from ..types.stop_speaking_plan import StopSpeakingPlan +from ..types.transport_configuration_twilio import TransportConfigurationTwilio +from .types.update_assistant_dto_background_sound import UpdateAssistantDtoBackgroundSound +from .types.update_assistant_dto_client_messages_item import UpdateAssistantDtoClientMessagesItem +from .types.update_assistant_dto_credentials_item import UpdateAssistantDtoCredentialsItem +from .types.update_assistant_dto_first_message_mode import UpdateAssistantDtoFirstMessageMode +from .types.update_assistant_dto_hooks_item import UpdateAssistantDtoHooksItem +from .types.update_assistant_dto_model import UpdateAssistantDtoModel +from .types.update_assistant_dto_server_messages_item import UpdateAssistantDtoServerMessagesItem +from .types.update_assistant_dto_transcriber import UpdateAssistantDtoTranscriber +from .types.update_assistant_dto_voice import UpdateAssistantDtoVoice +from .types.update_assistant_dto_voicemail_detection import UpdateAssistantDtoVoicemailDetection +from pydantic import ValidationError + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class RawAssistantsClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def list( + self, + *, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[typing.List[Assistant]]: + """ + Parameters + ---------- + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[typing.List[Assistant]] + + """ + _response = self._client_wrapper.httpx_client.request( + "assistant", + method="GET", + params={ + "limit": limit, + "createdAtGt": serialize_datetime(created_at_gt) if created_at_gt is not None else None, + "createdAtLt": serialize_datetime(created_at_lt) if created_at_lt is not None else None, + "createdAtGe": serialize_datetime(created_at_ge) if created_at_ge is not None else None, + "createdAtLe": serialize_datetime(created_at_le) if created_at_le is not None else None, + "updatedAtGt": serialize_datetime(updated_at_gt) if updated_at_gt is not None else None, + "updatedAtLt": serialize_datetime(updated_at_lt) if updated_at_lt is not None else None, + "updatedAtGe": serialize_datetime(updated_at_ge) if updated_at_ge is not None else None, + "updatedAtLe": serialize_datetime(updated_at_le) if updated_at_le is not None else None, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.List[Assistant], + construct_type( + type_=typing.List[Assistant], # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def create( + self, + *, + transcriber: typing.Optional[CreateAssistantDtoTranscriber] = OMIT, + model: typing.Optional[CreateAssistantDtoModel] = OMIT, + voice: typing.Optional[CreateAssistantDtoVoice] = OMIT, + first_message: typing.Optional[str] = OMIT, + first_message_interruptions_enabled: typing.Optional[bool] = OMIT, + first_message_mode: typing.Optional[CreateAssistantDtoFirstMessageMode] = OMIT, + voicemail_detection: typing.Optional[CreateAssistantDtoVoicemailDetection] = OMIT, + client_messages: typing.Optional[typing.Sequence[CreateAssistantDtoClientMessagesItem]] = OMIT, + server_messages: typing.Optional[typing.Sequence[CreateAssistantDtoServerMessagesItem]] = OMIT, + max_duration_seconds: typing.Optional[float] = OMIT, + background_sound: typing.Optional[CreateAssistantDtoBackgroundSound] = OMIT, + model_output_in_messages_enabled: typing.Optional[bool] = OMIT, + transport_configurations: typing.Optional[typing.Sequence[TransportConfigurationTwilio]] = OMIT, + observability_plan: typing.Optional[LangfuseObservabilityPlan] = OMIT, + credentials: typing.Optional[typing.Sequence[CreateAssistantDtoCredentialsItem]] = OMIT, + hooks: typing.Optional[typing.Sequence[CreateAssistantDtoHooksItem]] = OMIT, + name: typing.Optional[str] = OMIT, + voicemail_message: typing.Optional[str] = OMIT, + end_call_message: typing.Optional[str] = OMIT, + end_call_phrases: typing.Optional[typing.Sequence[str]] = OMIT, + compliance_plan: typing.Optional[CompliancePlan] = OMIT, + metadata: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, + background_speech_denoising_plan: typing.Optional[BackgroundSpeechDenoisingPlan] = OMIT, + analysis_plan: typing.Optional[AnalysisPlan] = OMIT, + artifact_plan: typing.Optional[ArtifactPlan] = OMIT, + start_speaking_plan: typing.Optional[StartSpeakingPlan] = OMIT, + stop_speaking_plan: typing.Optional[StopSpeakingPlan] = OMIT, + monitor_plan: typing.Optional[MonitorPlan] = OMIT, + credential_ids: typing.Optional[typing.Sequence[str]] = OMIT, + server: typing.Optional[Server] = OMIT, + keypad_input_plan: typing.Optional[KeypadInputPlan] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[Assistant]: + """ + Parameters + ---------- + transcriber : typing.Optional[CreateAssistantDtoTranscriber] + These are the options for the assistant's transcriber. + + model : typing.Optional[CreateAssistantDtoModel] + These are the options for the assistant's LLM. + + voice : typing.Optional[CreateAssistantDtoVoice] + These are the options for the assistant's voice. + + first_message : typing.Optional[str] + This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.). + + If unspecified, assistant will wait for user to speak and use the model to respond once they speak. + + first_message_interruptions_enabled : typing.Optional[bool] + + first_message_mode : typing.Optional[CreateAssistantDtoFirstMessageMode] + This is the mode for the first message. Default is 'assistant-speaks-first'. + + Use: + - 'assistant-speaks-first' to have the assistant speak first. + - 'assistant-waits-for-user' to have the assistant wait for the user to speak first. + - 'assistant-speaks-first-with-model-generated-message' to have the assistant speak first with a message generated by the model based on the conversation state. (`assistant.model.messages` at call start, `call.messages` at squad transfer points). + + @default 'assistant-speaks-first' + + voicemail_detection : typing.Optional[CreateAssistantDtoVoicemailDetection] + These are the settings to configure or disable voicemail detection. Alternatively, voicemail detection can be configured using the model.tools=[VoicemailTool]. + By default, voicemail detection is disabled. + + client_messages : typing.Optional[typing.Sequence[CreateAssistantDtoClientMessagesItem]] + These are the messages that will be sent to your Client SDKs. Default is conversation-update,function-call,hang,model-output,speech-update,status-update,transfer-update,transcript,tool-calls,user-interrupted,voice-input,workflow.node.started,assistant.started. You can check the shape of the messages in ClientMessage schema. + + server_messages : typing.Optional[typing.Sequence[CreateAssistantDtoServerMessagesItem]] + These are the messages that will be sent to your Server URL. Default is conversation-update,end-of-call-report,function-call,hang,speech-update,status-update,tool-calls,transfer-destination-request,handoff-destination-request,user-interrupted,assistant.started. You can check the shape of the messages in ServerMessage schema. + + max_duration_seconds : typing.Optional[float] + This is the maximum number of seconds that the call will last. When the call reaches this duration, it will be ended. + + @default 600 (10 minutes) + + background_sound : typing.Optional[CreateAssistantDtoBackgroundSound] + This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'. + You can also provide a custom sound by providing a URL to an audio file. + + model_output_in_messages_enabled : typing.Optional[bool] + This determines whether the model's output is used in conversation history rather than the transcription of assistant's speech. + + @default false + + transport_configurations : typing.Optional[typing.Sequence[TransportConfigurationTwilio]] + These are the configurations to be passed to the transport providers of assistant's calls, like Twilio. You can store multiple configurations for different transport providers. For a call, only the configuration matching the call transport provider is used. + + observability_plan : typing.Optional[LangfuseObservabilityPlan] + This is the plan for observability of assistant's calls. + + Currently, only Langfuse is supported. + + credentials : typing.Optional[typing.Sequence[CreateAssistantDtoCredentialsItem]] + These are dynamic credentials that will be used for the assistant calls. By default, all the credentials are available for use in the call but you can supplement an additional credentials using this. Dynamic credentials override existing credentials. + + hooks : typing.Optional[typing.Sequence[CreateAssistantDtoHooksItem]] + This is a set of actions that will be performed on certain events. + + name : typing.Optional[str] + This is the name of the assistant. + + This is required when you want to transfer between assistants in a call. + + voicemail_message : typing.Optional[str] + This is the message that the assistant will say if the call is forwarded to voicemail. + + If unspecified, it will hang up. + + end_call_message : typing.Optional[str] + This is the message that the assistant will say if it ends the call. + + If unspecified, it will hang up without saying anything. + + end_call_phrases : typing.Optional[typing.Sequence[str]] + This list contains phrases that, if spoken by the assistant, will trigger the call to be hung up. Case insensitive. + + compliance_plan : typing.Optional[CompliancePlan] + + metadata : typing.Optional[typing.Dict[str, typing.Any]] + This is for metadata you want to store on the assistant. + + background_speech_denoising_plan : typing.Optional[BackgroundSpeechDenoisingPlan] + This enables filtering of noise and background speech while the user is talking. + + Features: + - Smart denoising using Krisp + - Fourier denoising + + Smart denoising can be combined with or used independently of Fourier denoising. + + Order of precedence: + - Smart denoising + - Fourier denoising + + analysis_plan : typing.Optional[AnalysisPlan] + This is the plan for analysis of assistant's calls. Stored in `call.analysis`. + + artifact_plan : typing.Optional[ArtifactPlan] + This is the plan for artifacts generated during assistant's calls. Stored in `call.artifact`. + + start_speaking_plan : typing.Optional[StartSpeakingPlan] + This is the plan for when the assistant should start talking. + + You should configure this if you're running into these issues: + - The assistant is too slow to start talking after the customer is done speaking. + - The assistant is too fast to start talking after the customer is done speaking. + - The assistant is so fast that it's actually interrupting the customer. + + stop_speaking_plan : typing.Optional[StopSpeakingPlan] + This is the plan for when assistant should stop talking on customer interruption. + + You should configure this if you're running into these issues: + - The assistant is too slow to recognize customer's interruption. + - The assistant is too fast to recognize customer's interruption. + - The assistant is getting interrupted by phrases that are just acknowledgments. + - The assistant is getting interrupted by background noises. + - The assistant is not properly stopping -- it starts talking right after getting interrupted. + + monitor_plan : typing.Optional[MonitorPlan] + This is the plan for real-time monitoring of the assistant's calls. + + Usage: + - To enable live listening of the assistant's calls, set `monitorPlan.listenEnabled` to `true`. + - To enable live control of the assistant's calls, set `monitorPlan.controlEnabled` to `true`. + - To attach monitors to the assistant, set `monitorPlan.monitorIds` to the set of monitor ids. + + credential_ids : typing.Optional[typing.Sequence[str]] + These are the credentials that will be used for the assistant calls. By default, all the credentials are available for use in the call but you can provide a subset using this. + + server : typing.Optional[Server] + This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema. + + The order of precedence is: + + 1. assistant.server.url + 2. phoneNumber.serverUrl + 3. org.serverUrl + + keypad_input_plan : typing.Optional[KeypadInputPlan] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[Assistant] + + """ + _response = self._client_wrapper.httpx_client.request( + "assistant", + method="POST", + json={ + "transcriber": convert_and_respect_annotation_metadata( + object_=transcriber, annotation=CreateAssistantDtoTranscriber, direction="write" + ), + "model": convert_and_respect_annotation_metadata( + object_=model, annotation=CreateAssistantDtoModel, direction="write" + ), + "voice": convert_and_respect_annotation_metadata( + object_=voice, annotation=CreateAssistantDtoVoice, direction="write" + ), + "firstMessage": first_message, + "firstMessageInterruptionsEnabled": first_message_interruptions_enabled, + "firstMessageMode": first_message_mode, + "voicemailDetection": convert_and_respect_annotation_metadata( + object_=voicemail_detection, annotation=CreateAssistantDtoVoicemailDetection, direction="write" + ), + "clientMessages": client_messages, + "serverMessages": server_messages, + "maxDurationSeconds": max_duration_seconds, + "backgroundSound": convert_and_respect_annotation_metadata( + object_=background_sound, annotation=CreateAssistantDtoBackgroundSound, direction="write" + ), + "modelOutputInMessagesEnabled": model_output_in_messages_enabled, + "transportConfigurations": convert_and_respect_annotation_metadata( + object_=transport_configurations, + annotation=typing.Sequence[TransportConfigurationTwilio], + direction="write", + ), + "observabilityPlan": convert_and_respect_annotation_metadata( + object_=observability_plan, annotation=LangfuseObservabilityPlan, direction="write" + ), + "credentials": convert_and_respect_annotation_metadata( + object_=credentials, + annotation=typing.Sequence[CreateAssistantDtoCredentialsItem], + direction="write", + ), + "hooks": convert_and_respect_annotation_metadata( + object_=hooks, annotation=typing.Sequence[CreateAssistantDtoHooksItem], direction="write" + ), + "name": name, + "voicemailMessage": voicemail_message, + "endCallMessage": end_call_message, + "endCallPhrases": end_call_phrases, + "compliancePlan": convert_and_respect_annotation_metadata( + object_=compliance_plan, annotation=CompliancePlan, direction="write" + ), + "metadata": metadata, + "backgroundSpeechDenoisingPlan": convert_and_respect_annotation_metadata( + object_=background_speech_denoising_plan, + annotation=BackgroundSpeechDenoisingPlan, + direction="write", + ), + "analysisPlan": convert_and_respect_annotation_metadata( + object_=analysis_plan, annotation=AnalysisPlan, direction="write" + ), + "artifactPlan": convert_and_respect_annotation_metadata( + object_=artifact_plan, annotation=ArtifactPlan, direction="write" + ), + "startSpeakingPlan": convert_and_respect_annotation_metadata( + object_=start_speaking_plan, annotation=StartSpeakingPlan, direction="write" + ), + "stopSpeakingPlan": convert_and_respect_annotation_metadata( + object_=stop_speaking_plan, annotation=StopSpeakingPlan, direction="write" + ), + "monitorPlan": convert_and_respect_annotation_metadata( + object_=monitor_plan, annotation=MonitorPlan, direction="write" + ), + "credentialIds": credential_ids, + "server": convert_and_respect_annotation_metadata(object_=server, annotation=Server, direction="write"), + "keypadInputPlan": convert_and_respect_annotation_metadata( + object_=keypad_input_plan, annotation=KeypadInputPlan, direction="write" + ), + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Assistant, + construct_type( + type_=Assistant, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[Assistant]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[Assistant] + + """ + _response = self._client_wrapper.httpx_client.request( + f"assistant/{jsonable_encoder(id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Assistant, + construct_type( + type_=Assistant, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[Assistant]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[Assistant] + + """ + _response = self._client_wrapper.httpx_client.request( + f"assistant/{jsonable_encoder(id)}", + method="DELETE", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Assistant, + construct_type( + type_=Assistant, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def update( + self, + id: str, + *, + transcriber: typing.Optional[UpdateAssistantDtoTranscriber] = OMIT, + model: typing.Optional[UpdateAssistantDtoModel] = OMIT, + voice: typing.Optional[UpdateAssistantDtoVoice] = OMIT, + first_message: typing.Optional[str] = OMIT, + first_message_interruptions_enabled: typing.Optional[bool] = OMIT, + first_message_mode: typing.Optional[UpdateAssistantDtoFirstMessageMode] = OMIT, + voicemail_detection: typing.Optional[UpdateAssistantDtoVoicemailDetection] = OMIT, + client_messages: typing.Optional[typing.Sequence[UpdateAssistantDtoClientMessagesItem]] = OMIT, + server_messages: typing.Optional[typing.Sequence[UpdateAssistantDtoServerMessagesItem]] = OMIT, + max_duration_seconds: typing.Optional[float] = OMIT, + background_sound: typing.Optional[UpdateAssistantDtoBackgroundSound] = OMIT, + model_output_in_messages_enabled: typing.Optional[bool] = OMIT, + transport_configurations: typing.Optional[typing.Sequence[TransportConfigurationTwilio]] = OMIT, + observability_plan: typing.Optional[LangfuseObservabilityPlan] = OMIT, + credentials: typing.Optional[typing.Sequence[UpdateAssistantDtoCredentialsItem]] = OMIT, + hooks: typing.Optional[typing.Sequence[UpdateAssistantDtoHooksItem]] = OMIT, + name: typing.Optional[str] = OMIT, + voicemail_message: typing.Optional[str] = OMIT, + end_call_message: typing.Optional[str] = OMIT, + end_call_phrases: typing.Optional[typing.Sequence[str]] = OMIT, + compliance_plan: typing.Optional[CompliancePlan] = OMIT, + metadata: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, + background_speech_denoising_plan: typing.Optional[BackgroundSpeechDenoisingPlan] = OMIT, + analysis_plan: typing.Optional[AnalysisPlan] = OMIT, + artifact_plan: typing.Optional[ArtifactPlan] = OMIT, + start_speaking_plan: typing.Optional[StartSpeakingPlan] = OMIT, + stop_speaking_plan: typing.Optional[StopSpeakingPlan] = OMIT, + monitor_plan: typing.Optional[MonitorPlan] = OMIT, + credential_ids: typing.Optional[typing.Sequence[str]] = OMIT, + server: typing.Optional[Server] = OMIT, + keypad_input_plan: typing.Optional[KeypadInputPlan] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[Assistant]: + """ + Parameters + ---------- + id : str + + transcriber : typing.Optional[UpdateAssistantDtoTranscriber] + These are the options for the assistant's transcriber. + + model : typing.Optional[UpdateAssistantDtoModel] + These are the options for the assistant's LLM. + + voice : typing.Optional[UpdateAssistantDtoVoice] + These are the options for the assistant's voice. + + first_message : typing.Optional[str] + This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.). + + If unspecified, assistant will wait for user to speak and use the model to respond once they speak. + + first_message_interruptions_enabled : typing.Optional[bool] + + first_message_mode : typing.Optional[UpdateAssistantDtoFirstMessageMode] + This is the mode for the first message. Default is 'assistant-speaks-first'. + + Use: + - 'assistant-speaks-first' to have the assistant speak first. + - 'assistant-waits-for-user' to have the assistant wait for the user to speak first. + - 'assistant-speaks-first-with-model-generated-message' to have the assistant speak first with a message generated by the model based on the conversation state. (`assistant.model.messages` at call start, `call.messages` at squad transfer points). + + @default 'assistant-speaks-first' + + voicemail_detection : typing.Optional[UpdateAssistantDtoVoicemailDetection] + These are the settings to configure or disable voicemail detection. Alternatively, voicemail detection can be configured using the model.tools=[VoicemailTool]. + By default, voicemail detection is disabled. + + client_messages : typing.Optional[typing.Sequence[UpdateAssistantDtoClientMessagesItem]] + These are the messages that will be sent to your Client SDKs. Default is conversation-update,function-call,hang,model-output,speech-update,status-update,transfer-update,transcript,tool-calls,user-interrupted,voice-input,workflow.node.started,assistant.started. You can check the shape of the messages in ClientMessage schema. + + server_messages : typing.Optional[typing.Sequence[UpdateAssistantDtoServerMessagesItem]] + These are the messages that will be sent to your Server URL. Default is conversation-update,end-of-call-report,function-call,hang,speech-update,status-update,tool-calls,transfer-destination-request,handoff-destination-request,user-interrupted,assistant.started. You can check the shape of the messages in ServerMessage schema. + + max_duration_seconds : typing.Optional[float] + This is the maximum number of seconds that the call will last. When the call reaches this duration, it will be ended. + + @default 600 (10 minutes) + + background_sound : typing.Optional[UpdateAssistantDtoBackgroundSound] + This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'. + You can also provide a custom sound by providing a URL to an audio file. + + model_output_in_messages_enabled : typing.Optional[bool] + This determines whether the model's output is used in conversation history rather than the transcription of assistant's speech. + + @default false + + transport_configurations : typing.Optional[typing.Sequence[TransportConfigurationTwilio]] + These are the configurations to be passed to the transport providers of assistant's calls, like Twilio. You can store multiple configurations for different transport providers. For a call, only the configuration matching the call transport provider is used. + + observability_plan : typing.Optional[LangfuseObservabilityPlan] + This is the plan for observability of assistant's calls. + + Currently, only Langfuse is supported. + + credentials : typing.Optional[typing.Sequence[UpdateAssistantDtoCredentialsItem]] + These are dynamic credentials that will be used for the assistant calls. By default, all the credentials are available for use in the call but you can supplement an additional credentials using this. Dynamic credentials override existing credentials. + + hooks : typing.Optional[typing.Sequence[UpdateAssistantDtoHooksItem]] + This is a set of actions that will be performed on certain events. + + name : typing.Optional[str] + This is the name of the assistant. + + This is required when you want to transfer between assistants in a call. + + voicemail_message : typing.Optional[str] + This is the message that the assistant will say if the call is forwarded to voicemail. + + If unspecified, it will hang up. + + end_call_message : typing.Optional[str] + This is the message that the assistant will say if it ends the call. + + If unspecified, it will hang up without saying anything. + + end_call_phrases : typing.Optional[typing.Sequence[str]] + This list contains phrases that, if spoken by the assistant, will trigger the call to be hung up. Case insensitive. + + compliance_plan : typing.Optional[CompliancePlan] + + metadata : typing.Optional[typing.Dict[str, typing.Any]] + This is for metadata you want to store on the assistant. + + background_speech_denoising_plan : typing.Optional[BackgroundSpeechDenoisingPlan] + This enables filtering of noise and background speech while the user is talking. + + Features: + - Smart denoising using Krisp + - Fourier denoising + + Smart denoising can be combined with or used independently of Fourier denoising. + + Order of precedence: + - Smart denoising + - Fourier denoising + + analysis_plan : typing.Optional[AnalysisPlan] + This is the plan for analysis of assistant's calls. Stored in `call.analysis`. + + artifact_plan : typing.Optional[ArtifactPlan] + This is the plan for artifacts generated during assistant's calls. Stored in `call.artifact`. + + start_speaking_plan : typing.Optional[StartSpeakingPlan] + This is the plan for when the assistant should start talking. + + You should configure this if you're running into these issues: + - The assistant is too slow to start talking after the customer is done speaking. + - The assistant is too fast to start talking after the customer is done speaking. + - The assistant is so fast that it's actually interrupting the customer. + + stop_speaking_plan : typing.Optional[StopSpeakingPlan] + This is the plan for when assistant should stop talking on customer interruption. + + You should configure this if you're running into these issues: + - The assistant is too slow to recognize customer's interruption. + - The assistant is too fast to recognize customer's interruption. + - The assistant is getting interrupted by phrases that are just acknowledgments. + - The assistant is getting interrupted by background noises. + - The assistant is not properly stopping -- it starts talking right after getting interrupted. + + monitor_plan : typing.Optional[MonitorPlan] + This is the plan for real-time monitoring of the assistant's calls. + + Usage: + - To enable live listening of the assistant's calls, set `monitorPlan.listenEnabled` to `true`. + - To enable live control of the assistant's calls, set `monitorPlan.controlEnabled` to `true`. + - To attach monitors to the assistant, set `monitorPlan.monitorIds` to the set of monitor ids. + + credential_ids : typing.Optional[typing.Sequence[str]] + These are the credentials that will be used for the assistant calls. By default, all the credentials are available for use in the call but you can provide a subset using this. + + server : typing.Optional[Server] + This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema. + + The order of precedence is: + + 1. assistant.server.url + 2. phoneNumber.serverUrl + 3. org.serverUrl + + keypad_input_plan : typing.Optional[KeypadInputPlan] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[Assistant] + + """ + _response = self._client_wrapper.httpx_client.request( + f"assistant/{jsonable_encoder(id)}", + method="PATCH", + json={ + "transcriber": convert_and_respect_annotation_metadata( + object_=transcriber, annotation=UpdateAssistantDtoTranscriber, direction="write" + ), + "model": convert_and_respect_annotation_metadata( + object_=model, annotation=UpdateAssistantDtoModel, direction="write" + ), + "voice": convert_and_respect_annotation_metadata( + object_=voice, annotation=UpdateAssistantDtoVoice, direction="write" + ), + "firstMessage": first_message, + "firstMessageInterruptionsEnabled": first_message_interruptions_enabled, + "firstMessageMode": first_message_mode, + "voicemailDetection": convert_and_respect_annotation_metadata( + object_=voicemail_detection, annotation=UpdateAssistantDtoVoicemailDetection, direction="write" + ), + "clientMessages": client_messages, + "serverMessages": server_messages, + "maxDurationSeconds": max_duration_seconds, + "backgroundSound": convert_and_respect_annotation_metadata( + object_=background_sound, annotation=UpdateAssistantDtoBackgroundSound, direction="write" + ), + "modelOutputInMessagesEnabled": model_output_in_messages_enabled, + "transportConfigurations": convert_and_respect_annotation_metadata( + object_=transport_configurations, + annotation=typing.Sequence[TransportConfigurationTwilio], + direction="write", + ), + "observabilityPlan": convert_and_respect_annotation_metadata( + object_=observability_plan, annotation=LangfuseObservabilityPlan, direction="write" + ), + "credentials": convert_and_respect_annotation_metadata( + object_=credentials, + annotation=typing.Sequence[UpdateAssistantDtoCredentialsItem], + direction="write", + ), + "hooks": convert_and_respect_annotation_metadata( + object_=hooks, annotation=typing.Sequence[UpdateAssistantDtoHooksItem], direction="write" + ), + "name": name, + "voicemailMessage": voicemail_message, + "endCallMessage": end_call_message, + "endCallPhrases": end_call_phrases, + "compliancePlan": convert_and_respect_annotation_metadata( + object_=compliance_plan, annotation=CompliancePlan, direction="write" + ), + "metadata": metadata, + "backgroundSpeechDenoisingPlan": convert_and_respect_annotation_metadata( + object_=background_speech_denoising_plan, + annotation=BackgroundSpeechDenoisingPlan, + direction="write", + ), + "analysisPlan": convert_and_respect_annotation_metadata( + object_=analysis_plan, annotation=AnalysisPlan, direction="write" + ), + "artifactPlan": convert_and_respect_annotation_metadata( + object_=artifact_plan, annotation=ArtifactPlan, direction="write" + ), + "startSpeakingPlan": convert_and_respect_annotation_metadata( + object_=start_speaking_plan, annotation=StartSpeakingPlan, direction="write" + ), + "stopSpeakingPlan": convert_and_respect_annotation_metadata( + object_=stop_speaking_plan, annotation=StopSpeakingPlan, direction="write" + ), + "monitorPlan": convert_and_respect_annotation_metadata( + object_=monitor_plan, annotation=MonitorPlan, direction="write" + ), + "credentialIds": credential_ids, + "server": convert_and_respect_annotation_metadata(object_=server, annotation=Server, direction="write"), + "keypadInputPlan": convert_and_respect_annotation_metadata( + object_=keypad_input_plan, annotation=KeypadInputPlan, direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Assistant, + construct_type( + type_=Assistant, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawAssistantsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def list( + self, + *, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[typing.List[Assistant]]: + """ + Parameters + ---------- + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[typing.List[Assistant]] + + """ + _response = await self._client_wrapper.httpx_client.request( + "assistant", + method="GET", + params={ + "limit": limit, + "createdAtGt": serialize_datetime(created_at_gt) if created_at_gt is not None else None, + "createdAtLt": serialize_datetime(created_at_lt) if created_at_lt is not None else None, + "createdAtGe": serialize_datetime(created_at_ge) if created_at_ge is not None else None, + "createdAtLe": serialize_datetime(created_at_le) if created_at_le is not None else None, + "updatedAtGt": serialize_datetime(updated_at_gt) if updated_at_gt is not None else None, + "updatedAtLt": serialize_datetime(updated_at_lt) if updated_at_lt is not None else None, + "updatedAtGe": serialize_datetime(updated_at_ge) if updated_at_ge is not None else None, + "updatedAtLe": serialize_datetime(updated_at_le) if updated_at_le is not None else None, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.List[Assistant], + construct_type( + type_=typing.List[Assistant], # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def create( + self, + *, + transcriber: typing.Optional[CreateAssistantDtoTranscriber] = OMIT, + model: typing.Optional[CreateAssistantDtoModel] = OMIT, + voice: typing.Optional[CreateAssistantDtoVoice] = OMIT, + first_message: typing.Optional[str] = OMIT, + first_message_interruptions_enabled: typing.Optional[bool] = OMIT, + first_message_mode: typing.Optional[CreateAssistantDtoFirstMessageMode] = OMIT, + voicemail_detection: typing.Optional[CreateAssistantDtoVoicemailDetection] = OMIT, + client_messages: typing.Optional[typing.Sequence[CreateAssistantDtoClientMessagesItem]] = OMIT, + server_messages: typing.Optional[typing.Sequence[CreateAssistantDtoServerMessagesItem]] = OMIT, + max_duration_seconds: typing.Optional[float] = OMIT, + background_sound: typing.Optional[CreateAssistantDtoBackgroundSound] = OMIT, + model_output_in_messages_enabled: typing.Optional[bool] = OMIT, + transport_configurations: typing.Optional[typing.Sequence[TransportConfigurationTwilio]] = OMIT, + observability_plan: typing.Optional[LangfuseObservabilityPlan] = OMIT, + credentials: typing.Optional[typing.Sequence[CreateAssistantDtoCredentialsItem]] = OMIT, + hooks: typing.Optional[typing.Sequence[CreateAssistantDtoHooksItem]] = OMIT, + name: typing.Optional[str] = OMIT, + voicemail_message: typing.Optional[str] = OMIT, + end_call_message: typing.Optional[str] = OMIT, + end_call_phrases: typing.Optional[typing.Sequence[str]] = OMIT, + compliance_plan: typing.Optional[CompliancePlan] = OMIT, + metadata: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, + background_speech_denoising_plan: typing.Optional[BackgroundSpeechDenoisingPlan] = OMIT, + analysis_plan: typing.Optional[AnalysisPlan] = OMIT, + artifact_plan: typing.Optional[ArtifactPlan] = OMIT, + start_speaking_plan: typing.Optional[StartSpeakingPlan] = OMIT, + stop_speaking_plan: typing.Optional[StopSpeakingPlan] = OMIT, + monitor_plan: typing.Optional[MonitorPlan] = OMIT, + credential_ids: typing.Optional[typing.Sequence[str]] = OMIT, + server: typing.Optional[Server] = OMIT, + keypad_input_plan: typing.Optional[KeypadInputPlan] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[Assistant]: + """ + Parameters + ---------- + transcriber : typing.Optional[CreateAssistantDtoTranscriber] + These are the options for the assistant's transcriber. + + model : typing.Optional[CreateAssistantDtoModel] + These are the options for the assistant's LLM. + + voice : typing.Optional[CreateAssistantDtoVoice] + These are the options for the assistant's voice. + + first_message : typing.Optional[str] + This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.). + + If unspecified, assistant will wait for user to speak and use the model to respond once they speak. + + first_message_interruptions_enabled : typing.Optional[bool] + + first_message_mode : typing.Optional[CreateAssistantDtoFirstMessageMode] + This is the mode for the first message. Default is 'assistant-speaks-first'. + + Use: + - 'assistant-speaks-first' to have the assistant speak first. + - 'assistant-waits-for-user' to have the assistant wait for the user to speak first. + - 'assistant-speaks-first-with-model-generated-message' to have the assistant speak first with a message generated by the model based on the conversation state. (`assistant.model.messages` at call start, `call.messages` at squad transfer points). + + @default 'assistant-speaks-first' + + voicemail_detection : typing.Optional[CreateAssistantDtoVoicemailDetection] + These are the settings to configure or disable voicemail detection. Alternatively, voicemail detection can be configured using the model.tools=[VoicemailTool]. + By default, voicemail detection is disabled. + + client_messages : typing.Optional[typing.Sequence[CreateAssistantDtoClientMessagesItem]] + These are the messages that will be sent to your Client SDKs. Default is conversation-update,function-call,hang,model-output,speech-update,status-update,transfer-update,transcript,tool-calls,user-interrupted,voice-input,workflow.node.started,assistant.started. You can check the shape of the messages in ClientMessage schema. + + server_messages : typing.Optional[typing.Sequence[CreateAssistantDtoServerMessagesItem]] + These are the messages that will be sent to your Server URL. Default is conversation-update,end-of-call-report,function-call,hang,speech-update,status-update,tool-calls,transfer-destination-request,handoff-destination-request,user-interrupted,assistant.started. You can check the shape of the messages in ServerMessage schema. + + max_duration_seconds : typing.Optional[float] + This is the maximum number of seconds that the call will last. When the call reaches this duration, it will be ended. + + @default 600 (10 minutes) + + background_sound : typing.Optional[CreateAssistantDtoBackgroundSound] + This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'. + You can also provide a custom sound by providing a URL to an audio file. + + model_output_in_messages_enabled : typing.Optional[bool] + This determines whether the model's output is used in conversation history rather than the transcription of assistant's speech. + + @default false + + transport_configurations : typing.Optional[typing.Sequence[TransportConfigurationTwilio]] + These are the configurations to be passed to the transport providers of assistant's calls, like Twilio. You can store multiple configurations for different transport providers. For a call, only the configuration matching the call transport provider is used. + + observability_plan : typing.Optional[LangfuseObservabilityPlan] + This is the plan for observability of assistant's calls. + + Currently, only Langfuse is supported. + + credentials : typing.Optional[typing.Sequence[CreateAssistantDtoCredentialsItem]] + These are dynamic credentials that will be used for the assistant calls. By default, all the credentials are available for use in the call but you can supplement an additional credentials using this. Dynamic credentials override existing credentials. + + hooks : typing.Optional[typing.Sequence[CreateAssistantDtoHooksItem]] + This is a set of actions that will be performed on certain events. + + name : typing.Optional[str] + This is the name of the assistant. + + This is required when you want to transfer between assistants in a call. + + voicemail_message : typing.Optional[str] + This is the message that the assistant will say if the call is forwarded to voicemail. + + If unspecified, it will hang up. + + end_call_message : typing.Optional[str] + This is the message that the assistant will say if it ends the call. + + If unspecified, it will hang up without saying anything. + + end_call_phrases : typing.Optional[typing.Sequence[str]] + This list contains phrases that, if spoken by the assistant, will trigger the call to be hung up. Case insensitive. + + compliance_plan : typing.Optional[CompliancePlan] + + metadata : typing.Optional[typing.Dict[str, typing.Any]] + This is for metadata you want to store on the assistant. + + background_speech_denoising_plan : typing.Optional[BackgroundSpeechDenoisingPlan] + This enables filtering of noise and background speech while the user is talking. + + Features: + - Smart denoising using Krisp + - Fourier denoising + + Smart denoising can be combined with or used independently of Fourier denoising. + + Order of precedence: + - Smart denoising + - Fourier denoising + + analysis_plan : typing.Optional[AnalysisPlan] + This is the plan for analysis of assistant's calls. Stored in `call.analysis`. + + artifact_plan : typing.Optional[ArtifactPlan] + This is the plan for artifacts generated during assistant's calls. Stored in `call.artifact`. + + start_speaking_plan : typing.Optional[StartSpeakingPlan] + This is the plan for when the assistant should start talking. + + You should configure this if you're running into these issues: + - The assistant is too slow to start talking after the customer is done speaking. + - The assistant is too fast to start talking after the customer is done speaking. + - The assistant is so fast that it's actually interrupting the customer. + + stop_speaking_plan : typing.Optional[StopSpeakingPlan] + This is the plan for when assistant should stop talking on customer interruption. + + You should configure this if you're running into these issues: + - The assistant is too slow to recognize customer's interruption. + - The assistant is too fast to recognize customer's interruption. + - The assistant is getting interrupted by phrases that are just acknowledgments. + - The assistant is getting interrupted by background noises. + - The assistant is not properly stopping -- it starts talking right after getting interrupted. + + monitor_plan : typing.Optional[MonitorPlan] + This is the plan for real-time monitoring of the assistant's calls. + + Usage: + - To enable live listening of the assistant's calls, set `monitorPlan.listenEnabled` to `true`. + - To enable live control of the assistant's calls, set `monitorPlan.controlEnabled` to `true`. + - To attach monitors to the assistant, set `monitorPlan.monitorIds` to the set of monitor ids. + + credential_ids : typing.Optional[typing.Sequence[str]] + These are the credentials that will be used for the assistant calls. By default, all the credentials are available for use in the call but you can provide a subset using this. + + server : typing.Optional[Server] + This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema. + + The order of precedence is: + + 1. assistant.server.url + 2. phoneNumber.serverUrl + 3. org.serverUrl + + keypad_input_plan : typing.Optional[KeypadInputPlan] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[Assistant] + + """ + _response = await self._client_wrapper.httpx_client.request( + "assistant", + method="POST", + json={ + "transcriber": convert_and_respect_annotation_metadata( + object_=transcriber, annotation=CreateAssistantDtoTranscriber, direction="write" + ), + "model": convert_and_respect_annotation_metadata( + object_=model, annotation=CreateAssistantDtoModel, direction="write" + ), + "voice": convert_and_respect_annotation_metadata( + object_=voice, annotation=CreateAssistantDtoVoice, direction="write" + ), + "firstMessage": first_message, + "firstMessageInterruptionsEnabled": first_message_interruptions_enabled, + "firstMessageMode": first_message_mode, + "voicemailDetection": convert_and_respect_annotation_metadata( + object_=voicemail_detection, annotation=CreateAssistantDtoVoicemailDetection, direction="write" + ), + "clientMessages": client_messages, + "serverMessages": server_messages, + "maxDurationSeconds": max_duration_seconds, + "backgroundSound": convert_and_respect_annotation_metadata( + object_=background_sound, annotation=CreateAssistantDtoBackgroundSound, direction="write" + ), + "modelOutputInMessagesEnabled": model_output_in_messages_enabled, + "transportConfigurations": convert_and_respect_annotation_metadata( + object_=transport_configurations, + annotation=typing.Sequence[TransportConfigurationTwilio], + direction="write", + ), + "observabilityPlan": convert_and_respect_annotation_metadata( + object_=observability_plan, annotation=LangfuseObservabilityPlan, direction="write" + ), + "credentials": convert_and_respect_annotation_metadata( + object_=credentials, + annotation=typing.Sequence[CreateAssistantDtoCredentialsItem], + direction="write", + ), + "hooks": convert_and_respect_annotation_metadata( + object_=hooks, annotation=typing.Sequence[CreateAssistantDtoHooksItem], direction="write" + ), + "name": name, + "voicemailMessage": voicemail_message, + "endCallMessage": end_call_message, + "endCallPhrases": end_call_phrases, + "compliancePlan": convert_and_respect_annotation_metadata( + object_=compliance_plan, annotation=CompliancePlan, direction="write" + ), + "metadata": metadata, + "backgroundSpeechDenoisingPlan": convert_and_respect_annotation_metadata( + object_=background_speech_denoising_plan, + annotation=BackgroundSpeechDenoisingPlan, + direction="write", + ), + "analysisPlan": convert_and_respect_annotation_metadata( + object_=analysis_plan, annotation=AnalysisPlan, direction="write" + ), + "artifactPlan": convert_and_respect_annotation_metadata( + object_=artifact_plan, annotation=ArtifactPlan, direction="write" + ), + "startSpeakingPlan": convert_and_respect_annotation_metadata( + object_=start_speaking_plan, annotation=StartSpeakingPlan, direction="write" + ), + "stopSpeakingPlan": convert_and_respect_annotation_metadata( + object_=stop_speaking_plan, annotation=StopSpeakingPlan, direction="write" + ), + "monitorPlan": convert_and_respect_annotation_metadata( + object_=monitor_plan, annotation=MonitorPlan, direction="write" + ), + "credentialIds": credential_ids, + "server": convert_and_respect_annotation_metadata(object_=server, annotation=Server, direction="write"), + "keypadInputPlan": convert_and_respect_annotation_metadata( + object_=keypad_input_plan, annotation=KeypadInputPlan, direction="write" + ), + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Assistant, + construct_type( + type_=Assistant, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def get( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[Assistant]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[Assistant] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"assistant/{jsonable_encoder(id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Assistant, + construct_type( + type_=Assistant, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def delete( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[Assistant]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[Assistant] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"assistant/{jsonable_encoder(id)}", + method="DELETE", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Assistant, + construct_type( + type_=Assistant, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def update( + self, + id: str, + *, + transcriber: typing.Optional[UpdateAssistantDtoTranscriber] = OMIT, + model: typing.Optional[UpdateAssistantDtoModel] = OMIT, + voice: typing.Optional[UpdateAssistantDtoVoice] = OMIT, + first_message: typing.Optional[str] = OMIT, + first_message_interruptions_enabled: typing.Optional[bool] = OMIT, + first_message_mode: typing.Optional[UpdateAssistantDtoFirstMessageMode] = OMIT, + voicemail_detection: typing.Optional[UpdateAssistantDtoVoicemailDetection] = OMIT, + client_messages: typing.Optional[typing.Sequence[UpdateAssistantDtoClientMessagesItem]] = OMIT, + server_messages: typing.Optional[typing.Sequence[UpdateAssistantDtoServerMessagesItem]] = OMIT, + max_duration_seconds: typing.Optional[float] = OMIT, + background_sound: typing.Optional[UpdateAssistantDtoBackgroundSound] = OMIT, + model_output_in_messages_enabled: typing.Optional[bool] = OMIT, + transport_configurations: typing.Optional[typing.Sequence[TransportConfigurationTwilio]] = OMIT, + observability_plan: typing.Optional[LangfuseObservabilityPlan] = OMIT, + credentials: typing.Optional[typing.Sequence[UpdateAssistantDtoCredentialsItem]] = OMIT, + hooks: typing.Optional[typing.Sequence[UpdateAssistantDtoHooksItem]] = OMIT, + name: typing.Optional[str] = OMIT, + voicemail_message: typing.Optional[str] = OMIT, + end_call_message: typing.Optional[str] = OMIT, + end_call_phrases: typing.Optional[typing.Sequence[str]] = OMIT, + compliance_plan: typing.Optional[CompliancePlan] = OMIT, + metadata: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, + background_speech_denoising_plan: typing.Optional[BackgroundSpeechDenoisingPlan] = OMIT, + analysis_plan: typing.Optional[AnalysisPlan] = OMIT, + artifact_plan: typing.Optional[ArtifactPlan] = OMIT, + start_speaking_plan: typing.Optional[StartSpeakingPlan] = OMIT, + stop_speaking_plan: typing.Optional[StopSpeakingPlan] = OMIT, + monitor_plan: typing.Optional[MonitorPlan] = OMIT, + credential_ids: typing.Optional[typing.Sequence[str]] = OMIT, + server: typing.Optional[Server] = OMIT, + keypad_input_plan: typing.Optional[KeypadInputPlan] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[Assistant]: + """ + Parameters + ---------- + id : str + + transcriber : typing.Optional[UpdateAssistantDtoTranscriber] + These are the options for the assistant's transcriber. + + model : typing.Optional[UpdateAssistantDtoModel] + These are the options for the assistant's LLM. + + voice : typing.Optional[UpdateAssistantDtoVoice] + These are the options for the assistant's voice. + + first_message : typing.Optional[str] + This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.). + + If unspecified, assistant will wait for user to speak and use the model to respond once they speak. + + first_message_interruptions_enabled : typing.Optional[bool] + + first_message_mode : typing.Optional[UpdateAssistantDtoFirstMessageMode] + This is the mode for the first message. Default is 'assistant-speaks-first'. + + Use: + - 'assistant-speaks-first' to have the assistant speak first. + - 'assistant-waits-for-user' to have the assistant wait for the user to speak first. + - 'assistant-speaks-first-with-model-generated-message' to have the assistant speak first with a message generated by the model based on the conversation state. (`assistant.model.messages` at call start, `call.messages` at squad transfer points). + + @default 'assistant-speaks-first' + + voicemail_detection : typing.Optional[UpdateAssistantDtoVoicemailDetection] + These are the settings to configure or disable voicemail detection. Alternatively, voicemail detection can be configured using the model.tools=[VoicemailTool]. + By default, voicemail detection is disabled. + + client_messages : typing.Optional[typing.Sequence[UpdateAssistantDtoClientMessagesItem]] + These are the messages that will be sent to your Client SDKs. Default is conversation-update,function-call,hang,model-output,speech-update,status-update,transfer-update,transcript,tool-calls,user-interrupted,voice-input,workflow.node.started,assistant.started. You can check the shape of the messages in ClientMessage schema. + + server_messages : typing.Optional[typing.Sequence[UpdateAssistantDtoServerMessagesItem]] + These are the messages that will be sent to your Server URL. Default is conversation-update,end-of-call-report,function-call,hang,speech-update,status-update,tool-calls,transfer-destination-request,handoff-destination-request,user-interrupted,assistant.started. You can check the shape of the messages in ServerMessage schema. + + max_duration_seconds : typing.Optional[float] + This is the maximum number of seconds that the call will last. When the call reaches this duration, it will be ended. + + @default 600 (10 minutes) + + background_sound : typing.Optional[UpdateAssistantDtoBackgroundSound] + This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'. + You can also provide a custom sound by providing a URL to an audio file. + + model_output_in_messages_enabled : typing.Optional[bool] + This determines whether the model's output is used in conversation history rather than the transcription of assistant's speech. + + @default false + + transport_configurations : typing.Optional[typing.Sequence[TransportConfigurationTwilio]] + These are the configurations to be passed to the transport providers of assistant's calls, like Twilio. You can store multiple configurations for different transport providers. For a call, only the configuration matching the call transport provider is used. + + observability_plan : typing.Optional[LangfuseObservabilityPlan] + This is the plan for observability of assistant's calls. + + Currently, only Langfuse is supported. + + credentials : typing.Optional[typing.Sequence[UpdateAssistantDtoCredentialsItem]] + These are dynamic credentials that will be used for the assistant calls. By default, all the credentials are available for use in the call but you can supplement an additional credentials using this. Dynamic credentials override existing credentials. + + hooks : typing.Optional[typing.Sequence[UpdateAssistantDtoHooksItem]] + This is a set of actions that will be performed on certain events. + + name : typing.Optional[str] + This is the name of the assistant. + + This is required when you want to transfer between assistants in a call. + + voicemail_message : typing.Optional[str] + This is the message that the assistant will say if the call is forwarded to voicemail. + + If unspecified, it will hang up. + + end_call_message : typing.Optional[str] + This is the message that the assistant will say if it ends the call. + + If unspecified, it will hang up without saying anything. + + end_call_phrases : typing.Optional[typing.Sequence[str]] + This list contains phrases that, if spoken by the assistant, will trigger the call to be hung up. Case insensitive. + + compliance_plan : typing.Optional[CompliancePlan] + + metadata : typing.Optional[typing.Dict[str, typing.Any]] + This is for metadata you want to store on the assistant. + + background_speech_denoising_plan : typing.Optional[BackgroundSpeechDenoisingPlan] + This enables filtering of noise and background speech while the user is talking. + + Features: + - Smart denoising using Krisp + - Fourier denoising + + Smart denoising can be combined with or used independently of Fourier denoising. + + Order of precedence: + - Smart denoising + - Fourier denoising + + analysis_plan : typing.Optional[AnalysisPlan] + This is the plan for analysis of assistant's calls. Stored in `call.analysis`. + + artifact_plan : typing.Optional[ArtifactPlan] + This is the plan for artifacts generated during assistant's calls. Stored in `call.artifact`. + + start_speaking_plan : typing.Optional[StartSpeakingPlan] + This is the plan for when the assistant should start talking. + + You should configure this if you're running into these issues: + - The assistant is too slow to start talking after the customer is done speaking. + - The assistant is too fast to start talking after the customer is done speaking. + - The assistant is so fast that it's actually interrupting the customer. + + stop_speaking_plan : typing.Optional[StopSpeakingPlan] + This is the plan for when assistant should stop talking on customer interruption. + + You should configure this if you're running into these issues: + - The assistant is too slow to recognize customer's interruption. + - The assistant is too fast to recognize customer's interruption. + - The assistant is getting interrupted by phrases that are just acknowledgments. + - The assistant is getting interrupted by background noises. + - The assistant is not properly stopping -- it starts talking right after getting interrupted. + + monitor_plan : typing.Optional[MonitorPlan] + This is the plan for real-time monitoring of the assistant's calls. + + Usage: + - To enable live listening of the assistant's calls, set `monitorPlan.listenEnabled` to `true`. + - To enable live control of the assistant's calls, set `monitorPlan.controlEnabled` to `true`. + - To attach monitors to the assistant, set `monitorPlan.monitorIds` to the set of monitor ids. + + credential_ids : typing.Optional[typing.Sequence[str]] + These are the credentials that will be used for the assistant calls. By default, all the credentials are available for use in the call but you can provide a subset using this. + + server : typing.Optional[Server] + This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema. + + The order of precedence is: + + 1. assistant.server.url + 2. phoneNumber.serverUrl + 3. org.serverUrl + + keypad_input_plan : typing.Optional[KeypadInputPlan] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[Assistant] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"assistant/{jsonable_encoder(id)}", + method="PATCH", + json={ + "transcriber": convert_and_respect_annotation_metadata( + object_=transcriber, annotation=UpdateAssistantDtoTranscriber, direction="write" + ), + "model": convert_and_respect_annotation_metadata( + object_=model, annotation=UpdateAssistantDtoModel, direction="write" + ), + "voice": convert_and_respect_annotation_metadata( + object_=voice, annotation=UpdateAssistantDtoVoice, direction="write" + ), + "firstMessage": first_message, + "firstMessageInterruptionsEnabled": first_message_interruptions_enabled, + "firstMessageMode": first_message_mode, + "voicemailDetection": convert_and_respect_annotation_metadata( + object_=voicemail_detection, annotation=UpdateAssistantDtoVoicemailDetection, direction="write" + ), + "clientMessages": client_messages, + "serverMessages": server_messages, + "maxDurationSeconds": max_duration_seconds, + "backgroundSound": convert_and_respect_annotation_metadata( + object_=background_sound, annotation=UpdateAssistantDtoBackgroundSound, direction="write" + ), + "modelOutputInMessagesEnabled": model_output_in_messages_enabled, + "transportConfigurations": convert_and_respect_annotation_metadata( + object_=transport_configurations, + annotation=typing.Sequence[TransportConfigurationTwilio], + direction="write", + ), + "observabilityPlan": convert_and_respect_annotation_metadata( + object_=observability_plan, annotation=LangfuseObservabilityPlan, direction="write" + ), + "credentials": convert_and_respect_annotation_metadata( + object_=credentials, + annotation=typing.Sequence[UpdateAssistantDtoCredentialsItem], + direction="write", + ), + "hooks": convert_and_respect_annotation_metadata( + object_=hooks, annotation=typing.Sequence[UpdateAssistantDtoHooksItem], direction="write" + ), + "name": name, + "voicemailMessage": voicemail_message, + "endCallMessage": end_call_message, + "endCallPhrases": end_call_phrases, + "compliancePlan": convert_and_respect_annotation_metadata( + object_=compliance_plan, annotation=CompliancePlan, direction="write" + ), + "metadata": metadata, + "backgroundSpeechDenoisingPlan": convert_and_respect_annotation_metadata( + object_=background_speech_denoising_plan, + annotation=BackgroundSpeechDenoisingPlan, + direction="write", + ), + "analysisPlan": convert_and_respect_annotation_metadata( + object_=analysis_plan, annotation=AnalysisPlan, direction="write" + ), + "artifactPlan": convert_and_respect_annotation_metadata( + object_=artifact_plan, annotation=ArtifactPlan, direction="write" + ), + "startSpeakingPlan": convert_and_respect_annotation_metadata( + object_=start_speaking_plan, annotation=StartSpeakingPlan, direction="write" + ), + "stopSpeakingPlan": convert_and_respect_annotation_metadata( + object_=stop_speaking_plan, annotation=StopSpeakingPlan, direction="write" + ), + "monitorPlan": convert_and_respect_annotation_metadata( + object_=monitor_plan, annotation=MonitorPlan, direction="write" + ), + "credentialIds": credential_ids, + "server": convert_and_respect_annotation_metadata(object_=server, annotation=Server, direction="write"), + "keypadInputPlan": convert_and_respect_annotation_metadata( + object_=keypad_input_plan, annotation=KeypadInputPlan, direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Assistant, + construct_type( + type_=Assistant, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/vapi/assistants/types/__init__.py b/src/vapi/assistants/types/__init__.py index a1bac009..2f0dc6ae 100644 --- a/src/vapi/assistants/types/__init__.py +++ b/src/vapi/assistants/types/__init__.py @@ -1,19 +1,385 @@ # This file was auto-generated by Fern from our API Definition. -from .update_assistant_dto_background_sound import UpdateAssistantDtoBackgroundSound -from .update_assistant_dto_client_messages_item import UpdateAssistantDtoClientMessagesItem -from .update_assistant_dto_first_message_mode import UpdateAssistantDtoFirstMessageMode -from .update_assistant_dto_model import UpdateAssistantDtoModel -from .update_assistant_dto_server_messages_item import UpdateAssistantDtoServerMessagesItem -from .update_assistant_dto_transcriber import UpdateAssistantDtoTranscriber -from .update_assistant_dto_voice import UpdateAssistantDtoVoice +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .update_assistant_dto_background_sound import UpdateAssistantDtoBackgroundSound + from .update_assistant_dto_background_sound_zero import UpdateAssistantDtoBackgroundSoundZero + from .update_assistant_dto_client_messages_item import UpdateAssistantDtoClientMessagesItem + from .update_assistant_dto_credentials_item import ( + UpdateAssistantDtoCredentialsItem, + UpdateAssistantDtoCredentialsItem_11Labs, + UpdateAssistantDtoCredentialsItem_Anthropic, + UpdateAssistantDtoCredentialsItem_AnthropicBedrock, + UpdateAssistantDtoCredentialsItem_Anyscale, + UpdateAssistantDtoCredentialsItem_AssemblyAi, + UpdateAssistantDtoCredentialsItem_Azure, + UpdateAssistantDtoCredentialsItem_AzureOpenai, + UpdateAssistantDtoCredentialsItem_ByoSipTrunk, + UpdateAssistantDtoCredentialsItem_Cartesia, + UpdateAssistantDtoCredentialsItem_Cerebras, + UpdateAssistantDtoCredentialsItem_Cloudflare, + UpdateAssistantDtoCredentialsItem_CustomCredential, + UpdateAssistantDtoCredentialsItem_CustomLlm, + UpdateAssistantDtoCredentialsItem_DeepSeek, + UpdateAssistantDtoCredentialsItem_Deepgram, + UpdateAssistantDtoCredentialsItem_Deepinfra, + UpdateAssistantDtoCredentialsItem_Email, + UpdateAssistantDtoCredentialsItem_Gcp, + UpdateAssistantDtoCredentialsItem_GhlOauth2Authorization, + UpdateAssistantDtoCredentialsItem_Gladia, + UpdateAssistantDtoCredentialsItem_Gohighlevel, + UpdateAssistantDtoCredentialsItem_Google, + UpdateAssistantDtoCredentialsItem_GoogleCalendarOauth2Authorization, + UpdateAssistantDtoCredentialsItem_GoogleCalendarOauth2Client, + UpdateAssistantDtoCredentialsItem_GoogleSheetsOauth2Authorization, + UpdateAssistantDtoCredentialsItem_Groq, + UpdateAssistantDtoCredentialsItem_Hume, + UpdateAssistantDtoCredentialsItem_InflectionAi, + UpdateAssistantDtoCredentialsItem_Inworld, + UpdateAssistantDtoCredentialsItem_Langfuse, + UpdateAssistantDtoCredentialsItem_Lmnt, + UpdateAssistantDtoCredentialsItem_Make, + UpdateAssistantDtoCredentialsItem_Minimax, + UpdateAssistantDtoCredentialsItem_Mistral, + UpdateAssistantDtoCredentialsItem_Neuphonic, + UpdateAssistantDtoCredentialsItem_Openai, + UpdateAssistantDtoCredentialsItem_Openrouter, + UpdateAssistantDtoCredentialsItem_PerplexityAi, + UpdateAssistantDtoCredentialsItem_Playht, + UpdateAssistantDtoCredentialsItem_RimeAi, + UpdateAssistantDtoCredentialsItem_Runpod, + UpdateAssistantDtoCredentialsItem_S3, + UpdateAssistantDtoCredentialsItem_SlackOauth2Authorization, + UpdateAssistantDtoCredentialsItem_SlackWebhook, + UpdateAssistantDtoCredentialsItem_SmallestAi, + UpdateAssistantDtoCredentialsItem_Soniox, + UpdateAssistantDtoCredentialsItem_Speechmatics, + UpdateAssistantDtoCredentialsItem_Supabase, + UpdateAssistantDtoCredentialsItem_Tavus, + UpdateAssistantDtoCredentialsItem_TogetherAi, + UpdateAssistantDtoCredentialsItem_Trieve, + UpdateAssistantDtoCredentialsItem_Twilio, + UpdateAssistantDtoCredentialsItem_Vonage, + UpdateAssistantDtoCredentialsItem_Webhook, + UpdateAssistantDtoCredentialsItem_Wellsaid, + UpdateAssistantDtoCredentialsItem_Xai, + ) + from .update_assistant_dto_first_message_mode import UpdateAssistantDtoFirstMessageMode + from .update_assistant_dto_hooks_item import UpdateAssistantDtoHooksItem + from .update_assistant_dto_model import ( + UpdateAssistantDtoModel, + UpdateAssistantDtoModel_Anthropic, + UpdateAssistantDtoModel_AnthropicBedrock, + UpdateAssistantDtoModel_Anyscale, + UpdateAssistantDtoModel_Cerebras, + UpdateAssistantDtoModel_CustomLlm, + UpdateAssistantDtoModel_DeepSeek, + UpdateAssistantDtoModel_Deepinfra, + UpdateAssistantDtoModel_Google, + UpdateAssistantDtoModel_Groq, + UpdateAssistantDtoModel_InflectionAi, + UpdateAssistantDtoModel_Minimax, + UpdateAssistantDtoModel_Openai, + UpdateAssistantDtoModel_Openrouter, + UpdateAssistantDtoModel_PerplexityAi, + UpdateAssistantDtoModel_TogetherAi, + UpdateAssistantDtoModel_Xai, + ) + from .update_assistant_dto_server_messages_item import UpdateAssistantDtoServerMessagesItem + from .update_assistant_dto_transcriber import ( + UpdateAssistantDtoTranscriber, + UpdateAssistantDtoTranscriber_11Labs, + UpdateAssistantDtoTranscriber_AssemblyAi, + UpdateAssistantDtoTranscriber_Azure, + UpdateAssistantDtoTranscriber_Cartesia, + UpdateAssistantDtoTranscriber_CustomTranscriber, + UpdateAssistantDtoTranscriber_Deepgram, + UpdateAssistantDtoTranscriber_Gladia, + UpdateAssistantDtoTranscriber_Google, + UpdateAssistantDtoTranscriber_Openai, + UpdateAssistantDtoTranscriber_Soniox, + UpdateAssistantDtoTranscriber_Speechmatics, + UpdateAssistantDtoTranscriber_Talkscriber, + ) + from .update_assistant_dto_voice import ( + UpdateAssistantDtoVoice, + UpdateAssistantDtoVoice_11Labs, + UpdateAssistantDtoVoice_Azure, + UpdateAssistantDtoVoice_Cartesia, + UpdateAssistantDtoVoice_CustomVoice, + UpdateAssistantDtoVoice_Deepgram, + UpdateAssistantDtoVoice_Hume, + UpdateAssistantDtoVoice_Inworld, + UpdateAssistantDtoVoice_Lmnt, + UpdateAssistantDtoVoice_Minimax, + UpdateAssistantDtoVoice_Neuphonic, + UpdateAssistantDtoVoice_Openai, + UpdateAssistantDtoVoice_Playht, + UpdateAssistantDtoVoice_RimeAi, + UpdateAssistantDtoVoice_Sesame, + UpdateAssistantDtoVoice_SmallestAi, + UpdateAssistantDtoVoice_Tavus, + UpdateAssistantDtoVoice_Vapi, + UpdateAssistantDtoVoice_Wellsaid, + ) + from .update_assistant_dto_voicemail_detection import UpdateAssistantDtoVoicemailDetection + from .update_assistant_dto_voicemail_detection_zero import UpdateAssistantDtoVoicemailDetectionZero +_dynamic_imports: typing.Dict[str, str] = { + "UpdateAssistantDtoBackgroundSound": ".update_assistant_dto_background_sound", + "UpdateAssistantDtoBackgroundSoundZero": ".update_assistant_dto_background_sound_zero", + "UpdateAssistantDtoClientMessagesItem": ".update_assistant_dto_client_messages_item", + "UpdateAssistantDtoCredentialsItem": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_11Labs": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_Anthropic": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_AnthropicBedrock": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_Anyscale": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_AssemblyAi": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_Azure": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_AzureOpenai": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_ByoSipTrunk": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_Cartesia": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_Cerebras": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_Cloudflare": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_CustomCredential": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_CustomLlm": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_DeepSeek": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_Deepgram": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_Deepinfra": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_Email": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_Gcp": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_GhlOauth2Authorization": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_Gladia": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_Gohighlevel": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_Google": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_GoogleCalendarOauth2Authorization": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_GoogleCalendarOauth2Client": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_GoogleSheetsOauth2Authorization": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_Groq": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_Hume": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_InflectionAi": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_Inworld": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_Langfuse": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_Lmnt": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_Make": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_Minimax": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_Mistral": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_Neuphonic": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_Openai": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_Openrouter": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_PerplexityAi": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_Playht": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_RimeAi": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_Runpod": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_S3": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_SlackOauth2Authorization": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_SlackWebhook": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_SmallestAi": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_Soniox": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_Speechmatics": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_Supabase": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_Tavus": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_TogetherAi": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_Trieve": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_Twilio": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_Vonage": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_Webhook": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_Wellsaid": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoCredentialsItem_Xai": ".update_assistant_dto_credentials_item", + "UpdateAssistantDtoFirstMessageMode": ".update_assistant_dto_first_message_mode", + "UpdateAssistantDtoHooksItem": ".update_assistant_dto_hooks_item", + "UpdateAssistantDtoModel": ".update_assistant_dto_model", + "UpdateAssistantDtoModel_Anthropic": ".update_assistant_dto_model", + "UpdateAssistantDtoModel_AnthropicBedrock": ".update_assistant_dto_model", + "UpdateAssistantDtoModel_Anyscale": ".update_assistant_dto_model", + "UpdateAssistantDtoModel_Cerebras": ".update_assistant_dto_model", + "UpdateAssistantDtoModel_CustomLlm": ".update_assistant_dto_model", + "UpdateAssistantDtoModel_DeepSeek": ".update_assistant_dto_model", + "UpdateAssistantDtoModel_Deepinfra": ".update_assistant_dto_model", + "UpdateAssistantDtoModel_Google": ".update_assistant_dto_model", + "UpdateAssistantDtoModel_Groq": ".update_assistant_dto_model", + "UpdateAssistantDtoModel_InflectionAi": ".update_assistant_dto_model", + "UpdateAssistantDtoModel_Minimax": ".update_assistant_dto_model", + "UpdateAssistantDtoModel_Openai": ".update_assistant_dto_model", + "UpdateAssistantDtoModel_Openrouter": ".update_assistant_dto_model", + "UpdateAssistantDtoModel_PerplexityAi": ".update_assistant_dto_model", + "UpdateAssistantDtoModel_TogetherAi": ".update_assistant_dto_model", + "UpdateAssistantDtoModel_Xai": ".update_assistant_dto_model", + "UpdateAssistantDtoServerMessagesItem": ".update_assistant_dto_server_messages_item", + "UpdateAssistantDtoTranscriber": ".update_assistant_dto_transcriber", + "UpdateAssistantDtoTranscriber_11Labs": ".update_assistant_dto_transcriber", + "UpdateAssistantDtoTranscriber_AssemblyAi": ".update_assistant_dto_transcriber", + "UpdateAssistantDtoTranscriber_Azure": ".update_assistant_dto_transcriber", + "UpdateAssistantDtoTranscriber_Cartesia": ".update_assistant_dto_transcriber", + "UpdateAssistantDtoTranscriber_CustomTranscriber": ".update_assistant_dto_transcriber", + "UpdateAssistantDtoTranscriber_Deepgram": ".update_assistant_dto_transcriber", + "UpdateAssistantDtoTranscriber_Gladia": ".update_assistant_dto_transcriber", + "UpdateAssistantDtoTranscriber_Google": ".update_assistant_dto_transcriber", + "UpdateAssistantDtoTranscriber_Openai": ".update_assistant_dto_transcriber", + "UpdateAssistantDtoTranscriber_Soniox": ".update_assistant_dto_transcriber", + "UpdateAssistantDtoTranscriber_Speechmatics": ".update_assistant_dto_transcriber", + "UpdateAssistantDtoTranscriber_Talkscriber": ".update_assistant_dto_transcriber", + "UpdateAssistantDtoVoice": ".update_assistant_dto_voice", + "UpdateAssistantDtoVoice_11Labs": ".update_assistant_dto_voice", + "UpdateAssistantDtoVoice_Azure": ".update_assistant_dto_voice", + "UpdateAssistantDtoVoice_Cartesia": ".update_assistant_dto_voice", + "UpdateAssistantDtoVoice_CustomVoice": ".update_assistant_dto_voice", + "UpdateAssistantDtoVoice_Deepgram": ".update_assistant_dto_voice", + "UpdateAssistantDtoVoice_Hume": ".update_assistant_dto_voice", + "UpdateAssistantDtoVoice_Inworld": ".update_assistant_dto_voice", + "UpdateAssistantDtoVoice_Lmnt": ".update_assistant_dto_voice", + "UpdateAssistantDtoVoice_Minimax": ".update_assistant_dto_voice", + "UpdateAssistantDtoVoice_Neuphonic": ".update_assistant_dto_voice", + "UpdateAssistantDtoVoice_Openai": ".update_assistant_dto_voice", + "UpdateAssistantDtoVoice_Playht": ".update_assistant_dto_voice", + "UpdateAssistantDtoVoice_RimeAi": ".update_assistant_dto_voice", + "UpdateAssistantDtoVoice_Sesame": ".update_assistant_dto_voice", + "UpdateAssistantDtoVoice_SmallestAi": ".update_assistant_dto_voice", + "UpdateAssistantDtoVoice_Tavus": ".update_assistant_dto_voice", + "UpdateAssistantDtoVoice_Vapi": ".update_assistant_dto_voice", + "UpdateAssistantDtoVoice_Wellsaid": ".update_assistant_dto_voice", + "UpdateAssistantDtoVoicemailDetection": ".update_assistant_dto_voicemail_detection", + "UpdateAssistantDtoVoicemailDetectionZero": ".update_assistant_dto_voicemail_detection_zero", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "UpdateAssistantDtoBackgroundSound", + "UpdateAssistantDtoBackgroundSoundZero", "UpdateAssistantDtoClientMessagesItem", + "UpdateAssistantDtoCredentialsItem", + "UpdateAssistantDtoCredentialsItem_11Labs", + "UpdateAssistantDtoCredentialsItem_Anthropic", + "UpdateAssistantDtoCredentialsItem_AnthropicBedrock", + "UpdateAssistantDtoCredentialsItem_Anyscale", + "UpdateAssistantDtoCredentialsItem_AssemblyAi", + "UpdateAssistantDtoCredentialsItem_Azure", + "UpdateAssistantDtoCredentialsItem_AzureOpenai", + "UpdateAssistantDtoCredentialsItem_ByoSipTrunk", + "UpdateAssistantDtoCredentialsItem_Cartesia", + "UpdateAssistantDtoCredentialsItem_Cerebras", + "UpdateAssistantDtoCredentialsItem_Cloudflare", + "UpdateAssistantDtoCredentialsItem_CustomCredential", + "UpdateAssistantDtoCredentialsItem_CustomLlm", + "UpdateAssistantDtoCredentialsItem_DeepSeek", + "UpdateAssistantDtoCredentialsItem_Deepgram", + "UpdateAssistantDtoCredentialsItem_Deepinfra", + "UpdateAssistantDtoCredentialsItem_Email", + "UpdateAssistantDtoCredentialsItem_Gcp", + "UpdateAssistantDtoCredentialsItem_GhlOauth2Authorization", + "UpdateAssistantDtoCredentialsItem_Gladia", + "UpdateAssistantDtoCredentialsItem_Gohighlevel", + "UpdateAssistantDtoCredentialsItem_Google", + "UpdateAssistantDtoCredentialsItem_GoogleCalendarOauth2Authorization", + "UpdateAssistantDtoCredentialsItem_GoogleCalendarOauth2Client", + "UpdateAssistantDtoCredentialsItem_GoogleSheetsOauth2Authorization", + "UpdateAssistantDtoCredentialsItem_Groq", + "UpdateAssistantDtoCredentialsItem_Hume", + "UpdateAssistantDtoCredentialsItem_InflectionAi", + "UpdateAssistantDtoCredentialsItem_Inworld", + "UpdateAssistantDtoCredentialsItem_Langfuse", + "UpdateAssistantDtoCredentialsItem_Lmnt", + "UpdateAssistantDtoCredentialsItem_Make", + "UpdateAssistantDtoCredentialsItem_Minimax", + "UpdateAssistantDtoCredentialsItem_Mistral", + "UpdateAssistantDtoCredentialsItem_Neuphonic", + "UpdateAssistantDtoCredentialsItem_Openai", + "UpdateAssistantDtoCredentialsItem_Openrouter", + "UpdateAssistantDtoCredentialsItem_PerplexityAi", + "UpdateAssistantDtoCredentialsItem_Playht", + "UpdateAssistantDtoCredentialsItem_RimeAi", + "UpdateAssistantDtoCredentialsItem_Runpod", + "UpdateAssistantDtoCredentialsItem_S3", + "UpdateAssistantDtoCredentialsItem_SlackOauth2Authorization", + "UpdateAssistantDtoCredentialsItem_SlackWebhook", + "UpdateAssistantDtoCredentialsItem_SmallestAi", + "UpdateAssistantDtoCredentialsItem_Soniox", + "UpdateAssistantDtoCredentialsItem_Speechmatics", + "UpdateAssistantDtoCredentialsItem_Supabase", + "UpdateAssistantDtoCredentialsItem_Tavus", + "UpdateAssistantDtoCredentialsItem_TogetherAi", + "UpdateAssistantDtoCredentialsItem_Trieve", + "UpdateAssistantDtoCredentialsItem_Twilio", + "UpdateAssistantDtoCredentialsItem_Vonage", + "UpdateAssistantDtoCredentialsItem_Webhook", + "UpdateAssistantDtoCredentialsItem_Wellsaid", + "UpdateAssistantDtoCredentialsItem_Xai", "UpdateAssistantDtoFirstMessageMode", + "UpdateAssistantDtoHooksItem", "UpdateAssistantDtoModel", + "UpdateAssistantDtoModel_Anthropic", + "UpdateAssistantDtoModel_AnthropicBedrock", + "UpdateAssistantDtoModel_Anyscale", + "UpdateAssistantDtoModel_Cerebras", + "UpdateAssistantDtoModel_CustomLlm", + "UpdateAssistantDtoModel_DeepSeek", + "UpdateAssistantDtoModel_Deepinfra", + "UpdateAssistantDtoModel_Google", + "UpdateAssistantDtoModel_Groq", + "UpdateAssistantDtoModel_InflectionAi", + "UpdateAssistantDtoModel_Minimax", + "UpdateAssistantDtoModel_Openai", + "UpdateAssistantDtoModel_Openrouter", + "UpdateAssistantDtoModel_PerplexityAi", + "UpdateAssistantDtoModel_TogetherAi", + "UpdateAssistantDtoModel_Xai", "UpdateAssistantDtoServerMessagesItem", "UpdateAssistantDtoTranscriber", + "UpdateAssistantDtoTranscriber_11Labs", + "UpdateAssistantDtoTranscriber_AssemblyAi", + "UpdateAssistantDtoTranscriber_Azure", + "UpdateAssistantDtoTranscriber_Cartesia", + "UpdateAssistantDtoTranscriber_CustomTranscriber", + "UpdateAssistantDtoTranscriber_Deepgram", + "UpdateAssistantDtoTranscriber_Gladia", + "UpdateAssistantDtoTranscriber_Google", + "UpdateAssistantDtoTranscriber_Openai", + "UpdateAssistantDtoTranscriber_Soniox", + "UpdateAssistantDtoTranscriber_Speechmatics", + "UpdateAssistantDtoTranscriber_Talkscriber", "UpdateAssistantDtoVoice", + "UpdateAssistantDtoVoice_11Labs", + "UpdateAssistantDtoVoice_Azure", + "UpdateAssistantDtoVoice_Cartesia", + "UpdateAssistantDtoVoice_CustomVoice", + "UpdateAssistantDtoVoice_Deepgram", + "UpdateAssistantDtoVoice_Hume", + "UpdateAssistantDtoVoice_Inworld", + "UpdateAssistantDtoVoice_Lmnt", + "UpdateAssistantDtoVoice_Minimax", + "UpdateAssistantDtoVoice_Neuphonic", + "UpdateAssistantDtoVoice_Openai", + "UpdateAssistantDtoVoice_Playht", + "UpdateAssistantDtoVoice_RimeAi", + "UpdateAssistantDtoVoice_Sesame", + "UpdateAssistantDtoVoice_SmallestAi", + "UpdateAssistantDtoVoice_Tavus", + "UpdateAssistantDtoVoice_Vapi", + "UpdateAssistantDtoVoice_Wellsaid", + "UpdateAssistantDtoVoicemailDetection", + "UpdateAssistantDtoVoicemailDetectionZero", ] diff --git a/src/vapi/assistants/types/update_assistant_dto_background_sound.py b/src/vapi/assistants/types/update_assistant_dto_background_sound.py index 77833dcd..0050b214 100644 --- a/src/vapi/assistants/types/update_assistant_dto_background_sound.py +++ b/src/vapi/assistants/types/update_assistant_dto_background_sound.py @@ -2,4 +2,6 @@ import typing -UpdateAssistantDtoBackgroundSound = typing.Union[typing.Literal["off", "office"], typing.Any] +from .update_assistant_dto_background_sound_zero import UpdateAssistantDtoBackgroundSoundZero + +UpdateAssistantDtoBackgroundSound = typing.Union[UpdateAssistantDtoBackgroundSoundZero, str] diff --git a/src/vapi/assistants/types/update_assistant_dto_background_sound_zero.py b/src/vapi/assistants/types/update_assistant_dto_background_sound_zero.py new file mode 100644 index 00000000..cc0fe441 --- /dev/null +++ b/src/vapi/assistants/types/update_assistant_dto_background_sound_zero.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +UpdateAssistantDtoBackgroundSoundZero = typing.Union[typing.Literal["off", "office"], typing.Any] diff --git a/src/vapi/assistants/types/update_assistant_dto_client_messages_item.py b/src/vapi/assistants/types/update_assistant_dto_client_messages_item.py index 543bf4d7..0c953016 100644 --- a/src/vapi/assistants/types/update_assistant_dto_client_messages_item.py +++ b/src/vapi/assistants/types/update_assistant_dto_client_messages_item.py @@ -5,6 +5,7 @@ UpdateAssistantDtoClientMessagesItem = typing.Union[ typing.Literal[ "conversation-update", + "assistant.speechStarted", "function-call", "function-call-result", "hang", @@ -16,8 +17,12 @@ "transcript", "tool-calls", "tool-calls-result", + "tool.completed", + "transfer-update", "user-interrupted", "voice-input", + "workflow.node.started", + "assistant.started", ], typing.Any, ] diff --git a/src/vapi/assistants/types/update_assistant_dto_credentials_item.py b/src/vapi/assistants/types/update_assistant_dto_credentials_item.py new file mode 100644 index 00000000..00bfd2d9 --- /dev/null +++ b/src/vapi/assistants/types/update_assistant_dto_credentials_item.py @@ -0,0 +1,1070 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ...core.pydantic_utilities import IS_PYDANTIC_V2 +from ...core.serialization import FieldMetadata +from ...core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from ...types.azure_blob_storage_bucket_plan import AzureBlobStorageBucketPlan +from ...types.bucket_plan import BucketPlan +from ...types.cloudflare_r_2_bucket_plan import CloudflareR2BucketPlan +from ...types.create_anthropic_bedrock_credential_dto_authentication_plan import ( + CreateAnthropicBedrockCredentialDtoAuthenticationPlan, +) +from ...types.create_anthropic_bedrock_credential_dto_region import CreateAnthropicBedrockCredentialDtoRegion +from ...types.create_azure_credential_dto_region import CreateAzureCredentialDtoRegion +from ...types.create_azure_credential_dto_service import CreateAzureCredentialDtoService +from ...types.create_azure_open_ai_credential_dto_models_item import CreateAzureOpenAiCredentialDtoModelsItem +from ...types.create_azure_open_ai_credential_dto_region import CreateAzureOpenAiCredentialDtoRegion +from ...types.create_custom_credential_dto_authentication_plan import CreateCustomCredentialDtoAuthenticationPlan +from ...types.create_custom_credential_dto_encryption_plan import CreateCustomCredentialDtoEncryptionPlan +from ...types.create_webhook_credential_dto_authentication_plan import CreateWebhookCredentialDtoAuthenticationPlan +from ...types.gcp_key import GcpKey +from ...types.o_auth_2_authentication_plan import OAuth2AuthenticationPlan +from ...types.oauth_2_authentication_session import Oauth2AuthenticationSession +from ...types.sbc_configuration import SbcConfiguration +from ...types.sip_trunk_gateway import SipTrunkGateway +from ...types.sip_trunk_outbound_authentication_plan import SipTrunkOutboundAuthenticationPlan +from ...types.supabase_bucket_plan import SupabaseBucketPlan + + +class UpdateAssistantDtoCredentialsItem_11Labs(UncheckedBaseModel): + provider: typing.Literal["11labs"] = "11labs" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_Anthropic(UncheckedBaseModel): + provider: typing.Literal["anthropic"] = "anthropic" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_AnthropicBedrock(UncheckedBaseModel): + provider: typing.Literal["anthropic-bedrock"] = "anthropic-bedrock" + region: CreateAnthropicBedrockCredentialDtoRegion + authentication_plan: typing_extensions.Annotated[ + CreateAnthropicBedrockCredentialDtoAuthenticationPlan, + FieldMetadata(alias="authenticationPlan"), + pydantic.Field(alias="authenticationPlan"), + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_Anyscale(UncheckedBaseModel): + provider: typing.Literal["anyscale"] = "anyscale" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_AssemblyAi(UncheckedBaseModel): + provider: typing.Literal["assembly-ai"] = "assembly-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_AzureOpenai(UncheckedBaseModel): + provider: typing.Literal["azure-openai"] = "azure-openai" + region: CreateAzureOpenAiCredentialDtoRegion + models: typing.List[CreateAzureOpenAiCredentialDtoModelsItem] + open_ai_key: typing_extensions.Annotated[str, FieldMetadata(alias="openAIKey"), pydantic.Field(alias="openAIKey")] + ocp_apim_subscription_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="ocpApimSubscriptionKey"), + pydantic.Field(alias="ocpApimSubscriptionKey"), + ] = None + open_ai_endpoint: typing_extensions.Annotated[ + str, FieldMetadata(alias="openAIEndpoint"), pydantic.Field(alias="openAIEndpoint") + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_Azure(UncheckedBaseModel): + provider: typing.Literal["azure"] = "azure" + service: CreateAzureCredentialDtoService + region: typing.Optional[CreateAzureCredentialDtoRegion] = None + api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey") + ] = None + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="fallbackIndex"), pydantic.Field(alias="fallbackIndex") + ] = None + bucket_plan: typing_extensions.Annotated[ + typing.Optional[AzureBlobStorageBucketPlan], + FieldMetadata(alias="bucketPlan"), + pydantic.Field(alias="bucketPlan"), + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_ByoSipTrunk(UncheckedBaseModel): + provider: typing.Literal["byo-sip-trunk"] = "byo-sip-trunk" + gateways: typing.List[SipTrunkGateway] + outbound_authentication_plan: typing_extensions.Annotated[ + typing.Optional[SipTrunkOutboundAuthenticationPlan], + FieldMetadata(alias="outboundAuthenticationPlan"), + pydantic.Field(alias="outboundAuthenticationPlan"), + ] = None + outbound_leading_plus_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="outboundLeadingPlusEnabled"), + pydantic.Field(alias="outboundLeadingPlusEnabled"), + ] = None + tech_prefix: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="techPrefix"), pydantic.Field(alias="techPrefix") + ] = None + sip_diversion_header: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipDiversionHeader"), pydantic.Field(alias="sipDiversionHeader") + ] = None + sbc_configuration: typing_extensions.Annotated[ + typing.Optional[SbcConfiguration], + FieldMetadata(alias="sbcConfiguration"), + pydantic.Field(alias="sbcConfiguration"), + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_Cartesia(UncheckedBaseModel): + provider: typing.Literal["cartesia"] = "cartesia" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_Cerebras(UncheckedBaseModel): + provider: typing.Literal["cerebras"] = "cerebras" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_Cloudflare(UncheckedBaseModel): + provider: typing.Literal["cloudflare"] = "cloudflare" + account_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="accountId"), pydantic.Field(alias="accountId") + ] = None + api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey") + ] = None + account_email: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="accountEmail"), pydantic.Field(alias="accountEmail") + ] = None + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="fallbackIndex"), pydantic.Field(alias="fallbackIndex") + ] = None + bucket_plan: typing_extensions.Annotated[ + typing.Optional[CloudflareR2BucketPlan], FieldMetadata(alias="bucketPlan"), pydantic.Field(alias="bucketPlan") + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_CustomLlm(UncheckedBaseModel): + provider: typing.Literal["custom-llm"] = "custom-llm" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + authentication_plan: typing_extensions.Annotated[ + typing.Optional[OAuth2AuthenticationPlan], + FieldMetadata(alias="authenticationPlan"), + pydantic.Field(alias="authenticationPlan"), + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_Deepgram(UncheckedBaseModel): + provider: typing.Literal["deepgram"] = "deepgram" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + api_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="apiUrl"), pydantic.Field(alias="apiUrl") + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_Deepinfra(UncheckedBaseModel): + provider: typing.Literal["deepinfra"] = "deepinfra" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_DeepSeek(UncheckedBaseModel): + provider: typing.Literal["deep-seek"] = "deep-seek" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_Gcp(UncheckedBaseModel): + provider: typing.Literal["gcp"] = "gcp" + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="fallbackIndex"), pydantic.Field(alias="fallbackIndex") + ] = None + gcp_key: typing_extensions.Annotated[GcpKey, FieldMetadata(alias="gcpKey"), pydantic.Field(alias="gcpKey")] + region: typing.Optional[str] = None + bucket_plan: typing_extensions.Annotated[ + typing.Optional[BucketPlan], FieldMetadata(alias="bucketPlan"), pydantic.Field(alias="bucketPlan") + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_Gladia(UncheckedBaseModel): + provider: typing.Literal["gladia"] = "gladia" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_Gohighlevel(UncheckedBaseModel): + provider: typing.Literal["gohighlevel"] = "gohighlevel" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_Google(UncheckedBaseModel): + provider: typing.Literal["google"] = "google" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_Groq(UncheckedBaseModel): + provider: typing.Literal["groq"] = "groq" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_InflectionAi(UncheckedBaseModel): + provider: typing.Literal["inflection-ai"] = "inflection-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_Langfuse(UncheckedBaseModel): + provider: typing.Literal["langfuse"] = "langfuse" + public_key: typing_extensions.Annotated[str, FieldMetadata(alias="publicKey"), pydantic.Field(alias="publicKey")] + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + api_url: typing_extensions.Annotated[str, FieldMetadata(alias="apiUrl"), pydantic.Field(alias="apiUrl")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_Lmnt(UncheckedBaseModel): + provider: typing.Literal["lmnt"] = "lmnt" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_Make(UncheckedBaseModel): + provider: typing.Literal["make"] = "make" + team_id: typing_extensions.Annotated[str, FieldMetadata(alias="teamId"), pydantic.Field(alias="teamId")] + region: str + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_Openai(UncheckedBaseModel): + provider: typing.Literal["openai"] = "openai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_Openrouter(UncheckedBaseModel): + provider: typing.Literal["openrouter"] = "openrouter" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_PerplexityAi(UncheckedBaseModel): + provider: typing.Literal["perplexity-ai"] = "perplexity-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_Playht(UncheckedBaseModel): + provider: typing.Literal["playht"] = "playht" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + user_id: typing_extensions.Annotated[str, FieldMetadata(alias="userId"), pydantic.Field(alias="userId")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_RimeAi(UncheckedBaseModel): + provider: typing.Literal["rime-ai"] = "rime-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_Runpod(UncheckedBaseModel): + provider: typing.Literal["runpod"] = "runpod" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_S3(UncheckedBaseModel): + provider: typing.Literal["s3"] = "s3" + aws_access_key_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="awsAccessKeyId"), pydantic.Field(alias="awsAccessKeyId") + ] + aws_secret_access_key: typing_extensions.Annotated[ + str, FieldMetadata(alias="awsSecretAccessKey"), pydantic.Field(alias="awsSecretAccessKey") + ] + region: str + s_3_bucket_name: typing_extensions.Annotated[ + str, FieldMetadata(alias="s3BucketName"), pydantic.Field(alias="s3BucketName") + ] + s_3_path_prefix: typing_extensions.Annotated[ + str, FieldMetadata(alias="s3PathPrefix"), pydantic.Field(alias="s3PathPrefix") + ] + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="fallbackIndex"), pydantic.Field(alias="fallbackIndex") + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_Supabase(UncheckedBaseModel): + provider: typing.Literal["supabase"] = "supabase" + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="fallbackIndex"), pydantic.Field(alias="fallbackIndex") + ] = None + bucket_plan: typing_extensions.Annotated[ + typing.Optional[SupabaseBucketPlan], FieldMetadata(alias="bucketPlan"), pydantic.Field(alias="bucketPlan") + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_SmallestAi(UncheckedBaseModel): + provider: typing.Literal["smallest-ai"] = "smallest-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_Tavus(UncheckedBaseModel): + provider: typing.Literal["tavus"] = "tavus" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_TogetherAi(UncheckedBaseModel): + provider: typing.Literal["together-ai"] = "together-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_Twilio(UncheckedBaseModel): + provider: typing.Literal["twilio"] = "twilio" + auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="authToken"), pydantic.Field(alias="authToken") + ] = None + api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey") + ] = None + api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="apiSecret"), pydantic.Field(alias="apiSecret") + ] = None + account_sid: typing_extensions.Annotated[str, FieldMetadata(alias="accountSid"), pydantic.Field(alias="accountSid")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_Vonage(UncheckedBaseModel): + provider: typing.Literal["vonage"] = "vonage" + api_secret: typing_extensions.Annotated[str, FieldMetadata(alias="apiSecret"), pydantic.Field(alias="apiSecret")] + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_Webhook(UncheckedBaseModel): + provider: typing.Literal["webhook"] = "webhook" + authentication_plan: typing_extensions.Annotated[ + CreateWebhookCredentialDtoAuthenticationPlan, + FieldMetadata(alias="authenticationPlan"), + pydantic.Field(alias="authenticationPlan"), + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_CustomCredential(UncheckedBaseModel): + provider: typing.Literal["custom-credential"] = "custom-credential" + authentication_plan: typing_extensions.Annotated[ + CreateCustomCredentialDtoAuthenticationPlan, + FieldMetadata(alias="authenticationPlan"), + pydantic.Field(alias="authenticationPlan"), + ] + encryption_plan: typing_extensions.Annotated[ + typing.Optional[CreateCustomCredentialDtoEncryptionPlan], + FieldMetadata(alias="encryptionPlan"), + pydantic.Field(alias="encryptionPlan"), + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_Xai(UncheckedBaseModel): + provider: typing.Literal["xai"] = "xai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_Neuphonic(UncheckedBaseModel): + provider: typing.Literal["neuphonic"] = "neuphonic" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_Hume(UncheckedBaseModel): + provider: typing.Literal["hume"] = "hume" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_Mistral(UncheckedBaseModel): + provider: typing.Literal["mistral"] = "mistral" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_Speechmatics(UncheckedBaseModel): + provider: typing.Literal["speechmatics"] = "speechmatics" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_Soniox(UncheckedBaseModel): + provider: typing.Literal["soniox"] = "soniox" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_Trieve(UncheckedBaseModel): + provider: typing.Literal["trieve"] = "trieve" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_GoogleCalendarOauth2Client(UncheckedBaseModel): + provider: typing.Literal["google.calendar.oauth2-client"] = "google.calendar.oauth2-client" + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_GoogleCalendarOauth2Authorization(UncheckedBaseModel): + provider: typing.Literal["google.calendar.oauth2-authorization"] = "google.calendar.oauth2-authorization" + authorization_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="authorizationId"), pydantic.Field(alias="authorizationId") + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_GoogleSheetsOauth2Authorization(UncheckedBaseModel): + provider: typing.Literal["google.sheets.oauth2-authorization"] = "google.sheets.oauth2-authorization" + authorization_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="authorizationId"), pydantic.Field(alias="authorizationId") + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_SlackOauth2Authorization(UncheckedBaseModel): + provider: typing.Literal["slack.oauth2-authorization"] = "slack.oauth2-authorization" + authorization_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="authorizationId"), pydantic.Field(alias="authorizationId") + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_GhlOauth2Authorization(UncheckedBaseModel): + provider: typing.Literal["ghl.oauth2-authorization"] = "ghl.oauth2-authorization" + authentication_session: typing_extensions.Annotated[ + Oauth2AuthenticationSession, + FieldMetadata(alias="authenticationSession"), + pydantic.Field(alias="authenticationSession"), + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_Inworld(UncheckedBaseModel): + provider: typing.Literal["inworld"] = "inworld" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_Minimax(UncheckedBaseModel): + provider: typing.Literal["minimax"] = "minimax" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + group_id: typing_extensions.Annotated[str, FieldMetadata(alias="groupId"), pydantic.Field(alias="groupId")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_Wellsaid(UncheckedBaseModel): + provider: typing.Literal["wellsaid"] = "wellsaid" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_Email(UncheckedBaseModel): + provider: typing.Literal["email"] = "email" + email: str + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoCredentialsItem_SlackWebhook(UncheckedBaseModel): + provider: typing.Literal["slack-webhook"] = "slack-webhook" + webhook_url: typing_extensions.Annotated[str, FieldMetadata(alias="webhookUrl"), pydantic.Field(alias="webhookUrl")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateAssistantDtoCredentialsItem = typing_extensions.Annotated[ + typing.Union[ + UpdateAssistantDtoCredentialsItem_11Labs, + UpdateAssistantDtoCredentialsItem_Anthropic, + UpdateAssistantDtoCredentialsItem_AnthropicBedrock, + UpdateAssistantDtoCredentialsItem_Anyscale, + UpdateAssistantDtoCredentialsItem_AssemblyAi, + UpdateAssistantDtoCredentialsItem_AzureOpenai, + UpdateAssistantDtoCredentialsItem_Azure, + UpdateAssistantDtoCredentialsItem_ByoSipTrunk, + UpdateAssistantDtoCredentialsItem_Cartesia, + UpdateAssistantDtoCredentialsItem_Cerebras, + UpdateAssistantDtoCredentialsItem_Cloudflare, + UpdateAssistantDtoCredentialsItem_CustomLlm, + UpdateAssistantDtoCredentialsItem_Deepgram, + UpdateAssistantDtoCredentialsItem_Deepinfra, + UpdateAssistantDtoCredentialsItem_DeepSeek, + UpdateAssistantDtoCredentialsItem_Gcp, + UpdateAssistantDtoCredentialsItem_Gladia, + UpdateAssistantDtoCredentialsItem_Gohighlevel, + UpdateAssistantDtoCredentialsItem_Google, + UpdateAssistantDtoCredentialsItem_Groq, + UpdateAssistantDtoCredentialsItem_InflectionAi, + UpdateAssistantDtoCredentialsItem_Langfuse, + UpdateAssistantDtoCredentialsItem_Lmnt, + UpdateAssistantDtoCredentialsItem_Make, + UpdateAssistantDtoCredentialsItem_Openai, + UpdateAssistantDtoCredentialsItem_Openrouter, + UpdateAssistantDtoCredentialsItem_PerplexityAi, + UpdateAssistantDtoCredentialsItem_Playht, + UpdateAssistantDtoCredentialsItem_RimeAi, + UpdateAssistantDtoCredentialsItem_Runpod, + UpdateAssistantDtoCredentialsItem_S3, + UpdateAssistantDtoCredentialsItem_Supabase, + UpdateAssistantDtoCredentialsItem_SmallestAi, + UpdateAssistantDtoCredentialsItem_Tavus, + UpdateAssistantDtoCredentialsItem_TogetherAi, + UpdateAssistantDtoCredentialsItem_Twilio, + UpdateAssistantDtoCredentialsItem_Vonage, + UpdateAssistantDtoCredentialsItem_Webhook, + UpdateAssistantDtoCredentialsItem_CustomCredential, + UpdateAssistantDtoCredentialsItem_Xai, + UpdateAssistantDtoCredentialsItem_Neuphonic, + UpdateAssistantDtoCredentialsItem_Hume, + UpdateAssistantDtoCredentialsItem_Mistral, + UpdateAssistantDtoCredentialsItem_Speechmatics, + UpdateAssistantDtoCredentialsItem_Soniox, + UpdateAssistantDtoCredentialsItem_Trieve, + UpdateAssistantDtoCredentialsItem_GoogleCalendarOauth2Client, + UpdateAssistantDtoCredentialsItem_GoogleCalendarOauth2Authorization, + UpdateAssistantDtoCredentialsItem_GoogleSheetsOauth2Authorization, + UpdateAssistantDtoCredentialsItem_SlackOauth2Authorization, + UpdateAssistantDtoCredentialsItem_GhlOauth2Authorization, + UpdateAssistantDtoCredentialsItem_Inworld, + UpdateAssistantDtoCredentialsItem_Minimax, + UpdateAssistantDtoCredentialsItem_Wellsaid, + UpdateAssistantDtoCredentialsItem_Email, + UpdateAssistantDtoCredentialsItem_SlackWebhook, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/assistants/types/update_assistant_dto_hooks_item.py b/src/vapi/assistants/types/update_assistant_dto_hooks_item.py new file mode 100644 index 00000000..08b70fcb --- /dev/null +++ b/src/vapi/assistants/types/update_assistant_dto_hooks_item.py @@ -0,0 +1,17 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from ...types.call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted +from ...types.call_hook_call_ending import CallHookCallEnding +from ...types.call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted +from ...types.call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout +from ...types.session_created_hook import SessionCreatedHook + +UpdateAssistantDtoHooksItem = typing.Union[ + CallHookCallEnding, + CallHookAssistantSpeechInterrupted, + CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechTimeout, + SessionCreatedHook, +] diff --git a/src/vapi/assistants/types/update_assistant_dto_model.py b/src/vapi/assistants/types/update_assistant_dto_model.py index 7b31ca9a..5ff11d65 100644 --- a/src/vapi/assistants/types/update_assistant_dto_model.py +++ b/src/vapi/assistants/types/update_assistant_dto_model.py @@ -1,26 +1,1734 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from ...types.anyscale_model import AnyscaleModel -from ...types.anthropic_model import AnthropicModel -from ...types.custom_llm_model import CustomLlmModel -from ...types.deep_infra_model import DeepInfraModel -from ...types.groq_model import GroqModel -from ...types.open_ai_model import OpenAiModel -from ...types.open_router_model import OpenRouterModel -from ...types.perplexity_ai_model import PerplexityAiModel -from ...types.together_ai_model import TogetherAiModel -from ...types.vapi_model import VapiModel - -UpdateAssistantDtoModel = typing.Union[ - AnyscaleModel, - AnthropicModel, - CustomLlmModel, - DeepInfraModel, - GroqModel, - OpenAiModel, - OpenRouterModel, - PerplexityAiModel, - TogetherAiModel, - VapiModel, + +import pydantic +import typing_extensions +from ...core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ...core.serialization import FieldMetadata +from ...core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from ...types.anthropic_bedrock_model_model import AnthropicBedrockModelModel +from ...types.anthropic_model_model import AnthropicModelModel +from ...types.anthropic_thinking_config import AnthropicThinkingConfig +from ...types.cerebras_model_model import CerebrasModelModel +from ...types.create_custom_knowledge_base_dto import CreateCustomKnowledgeBaseDto +from ...types.custom_llm_model_metadata_send_mode import CustomLlmModelMetadataSendMode +from ...types.deep_seek_model_model import DeepSeekModelModel +from ...types.google_model_model import GoogleModelModel +from ...types.google_realtime_config import GoogleRealtimeConfig +from ...types.groq_model_model import GroqModelModel +from ...types.inflection_ai_model_model import InflectionAiModelModel +from ...types.minimax_llm_model_model import MinimaxLlmModelModel +from ...types.open_ai_message import OpenAiMessage +from ...types.open_ai_model_fallback_models_item import OpenAiModelFallbackModelsItem +from ...types.open_ai_model_model import OpenAiModelModel +from ...types.open_ai_model_prompt_cache_retention import OpenAiModelPromptCacheRetention +from ...types.open_ai_model_tool_strict_compatibility_mode import OpenAiModelToolStrictCompatibilityMode +from ...types.xai_model_model import XaiModelModel + + +class UpdateAssistantDtoModel_Anthropic(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["anthropic"] = "anthropic" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["AnthropicModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: AnthropicModelModel + thinking: typing.Optional[AnthropicThinkingConfig] = None + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoModel_AnthropicBedrock(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["anthropic-bedrock"] = "anthropic-bedrock" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["AnthropicBedrockModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: AnthropicBedrockModelModel + thinking: typing.Optional[AnthropicThinkingConfig] = None + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoModel_Anyscale(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["anyscale"] = "anyscale" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["AnyscaleModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: str + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoModel_Cerebras(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["cerebras"] = "cerebras" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["CerebrasModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: CerebrasModelModel + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoModel_CustomLlm(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["custom-llm"] = "custom-llm" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["CustomLlmModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + metadata_send_mode: typing_extensions.Annotated[ + typing.Optional[CustomLlmModelMetadataSendMode], + FieldMetadata(alias="metadataSendMode"), + pydantic.Field(alias="metadataSendMode"), + ] = None + headers: typing.Optional[typing.Dict[str, str]] = None + url: str + word_level_confidence_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="wordLevelConfidenceEnabled"), + pydantic.Field(alias="wordLevelConfidenceEnabled"), + ] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + model: str + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoModel_Deepinfra(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["deepinfra"] = "deepinfra" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["DeepInfraModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: str + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoModel_DeepSeek(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["deep-seek"] = "deep-seek" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["DeepSeekModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: DeepSeekModelModel + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoModel_Google(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["google"] = "google" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["GoogleModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: GoogleModelModel + realtime_config: typing_extensions.Annotated[ + typing.Optional[GoogleRealtimeConfig], + FieldMetadata(alias="realtimeConfig"), + pydantic.Field(alias="realtimeConfig"), + ] = None + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoModel_Groq(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["groq"] = "groq" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["GroqModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: GroqModelModel + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoModel_InflectionAi(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["inflection-ai"] = "inflection-ai" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["InflectionAiModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: InflectionAiModelModel + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoModel_Minimax(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["minimax"] = "minimax" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["MinimaxLlmModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: MinimaxLlmModelModel + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoModel_Openai(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["openai"] = "openai" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["OpenAiModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: OpenAiModelModel + fallback_models: typing_extensions.Annotated[ + typing.Optional[typing.List[OpenAiModelFallbackModelsItem]], + FieldMetadata(alias="fallbackModels"), + pydantic.Field(alias="fallbackModels"), + ] = None + tool_strict_compatibility_mode: typing_extensions.Annotated[ + typing.Optional[OpenAiModelToolStrictCompatibilityMode], + FieldMetadata(alias="toolStrictCompatibilityMode"), + pydantic.Field(alias="toolStrictCompatibilityMode"), + ] = None + prompt_cache_retention: typing_extensions.Annotated[ + typing.Optional[OpenAiModelPromptCacheRetention], + FieldMetadata(alias="promptCacheRetention"), + pydantic.Field(alias="promptCacheRetention"), + ] = None + prompt_cache_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="promptCacheKey"), pydantic.Field(alias="promptCacheKey") + ] = None + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoModel_Openrouter(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["openrouter"] = "openrouter" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["OpenRouterModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: str + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoModel_PerplexityAi(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["perplexity-ai"] = "perplexity-ai" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["PerplexityAiModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: str + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoModel_TogetherAi(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["together-ai"] = "together-ai" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["TogetherAiModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: str + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoModel_Xai(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["xai"] = "xai" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["XaiModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: XaiModelModel + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateAssistantDtoModel = typing_extensions.Annotated[ + typing.Union[ + UpdateAssistantDtoModel_Anthropic, + UpdateAssistantDtoModel_AnthropicBedrock, + UpdateAssistantDtoModel_Anyscale, + UpdateAssistantDtoModel_Cerebras, + UpdateAssistantDtoModel_CustomLlm, + UpdateAssistantDtoModel_Deepinfra, + UpdateAssistantDtoModel_DeepSeek, + UpdateAssistantDtoModel_Google, + UpdateAssistantDtoModel_Groq, + UpdateAssistantDtoModel_InflectionAi, + UpdateAssistantDtoModel_Minimax, + UpdateAssistantDtoModel_Openai, + UpdateAssistantDtoModel_Openrouter, + UpdateAssistantDtoModel_PerplexityAi, + UpdateAssistantDtoModel_TogetherAi, + UpdateAssistantDtoModel_Xai, + ], + UnionMetadata(discriminant="provider"), ] +from ...types.anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from ...types.anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from ...types.anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from ...types.anyscale_model import AnyscaleModel # noqa: E402, I001 +from ...types.anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from ...types.assistant_overrides import AssistantOverrides # noqa: E402, I001 +from ...types.assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from ...types.assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from ...types.assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from ...types.call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from ...types.call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from ...types.call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from ...types.call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from ...types.call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from ...types.call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from ...types.call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from ...types.call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from ...types.cerebras_model import CerebrasModel # noqa: E402, I001 +from ...types.cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from ...types.create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from ...types.create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from ...types.create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from ...types.create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from ...types.create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from ...types.create_squad_dto import CreateSquadDto # noqa: E402, I001 +from ...types.custom_llm_model import CustomLlmModel # noqa: E402, I001 +from ...types.custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from ...types.deep_infra_model import DeepInfraModel # noqa: E402, I001 +from ...types.deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from ...types.deep_seek_model import DeepSeekModel # noqa: E402, I001 +from ...types.deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from ...types.google_model import GoogleModel # noqa: E402, I001 +from ...types.google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from ...types.groq_model import GroqModel # noqa: E402, I001 +from ...types.groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from ...types.handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from ...types.handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from ...types.inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from ...types.inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from ...types.minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from ...types.minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from ...types.open_ai_model import OpenAiModel # noqa: E402, I001 +from ...types.open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from ...types.open_router_model import OpenRouterModel # noqa: E402, I001 +from ...types.open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from ...types.perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from ...types.perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from ...types.session_created_hook import SessionCreatedHook # noqa: E402, I001 +from ...types.squad_member_dto import SquadMemberDto # noqa: E402, I001 +from ...types.squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from ...types.together_ai_model import TogetherAiModel # noqa: E402, I001 +from ...types.together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from ...types.tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from ...types.tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from ...types.xai_model import XaiModel # noqa: E402, I001 +from ...types.xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 +from ...types.anthropic_model import AnthropicModel # noqa: E402, I001 + +update_forward_refs( + UpdateAssistantDtoModel_Anthropic, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + UpdateAssistantDtoModel_AnthropicBedrock, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + UpdateAssistantDtoModel_Anyscale, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + UpdateAssistantDtoModel_Cerebras, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + UpdateAssistantDtoModel_CustomLlm, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + UpdateAssistantDtoModel_Deepinfra, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + UpdateAssistantDtoModel_DeepSeek, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + UpdateAssistantDtoModel_Google, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + UpdateAssistantDtoModel_Groq, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + UpdateAssistantDtoModel_InflectionAi, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + UpdateAssistantDtoModel_Minimax, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + UpdateAssistantDtoModel_Openai, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + UpdateAssistantDtoModel_Openrouter, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + UpdateAssistantDtoModel_PerplexityAi, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + UpdateAssistantDtoModel_TogetherAi, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + UpdateAssistantDtoModel_Xai, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/assistants/types/update_assistant_dto_server_messages_item.py b/src/vapi/assistants/types/update_assistant_dto_server_messages_item.py index f9032507..83615e8e 100644 --- a/src/vapi/assistants/types/update_assistant_dto_server_messages_item.py +++ b/src/vapi/assistants/types/update_assistant_dto_server_messages_item.py @@ -9,6 +9,7 @@ "function-call", "hang", "language-changed", + "language-change-detected", "model-output", "phone-call-control", "speech-update", diff --git a/src/vapi/assistants/types/update_assistant_dto_transcriber.py b/src/vapi/assistants/types/update_assistant_dto_transcriber.py index 994d53da..51942cdf 100644 --- a/src/vapi/assistants/types/update_assistant_dto_transcriber.py +++ b/src/vapi/assistants/types/update_assistant_dto_transcriber.py @@ -1,8 +1,538 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from ...types.deepgram_transcriber import DeepgramTranscriber -from ...types.gladia_transcriber import GladiaTranscriber -from ...types.talkscriber_transcriber import TalkscriberTranscriber -UpdateAssistantDtoTranscriber = typing.Union[DeepgramTranscriber, GladiaTranscriber, TalkscriberTranscriber] +import pydantic +import typing_extensions +from ...core.pydantic_utilities import IS_PYDANTIC_V2 +from ...core.serialization import FieldMetadata +from ...core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from ...types.assembly_ai_transcriber_language import AssemblyAiTranscriberLanguage +from ...types.assembly_ai_transcriber_speech_model import AssemblyAiTranscriberSpeechModel +from ...types.azure_speech_transcriber_language import AzureSpeechTranscriberLanguage +from ...types.azure_speech_transcriber_segmentation_strategy import AzureSpeechTranscriberSegmentationStrategy +from ...types.cartesia_transcriber_language import CartesiaTranscriberLanguage +from ...types.cartesia_transcriber_model import CartesiaTranscriberModel +from ...types.deepgram_transcriber_language import DeepgramTranscriberLanguage +from ...types.deepgram_transcriber_model import DeepgramTranscriberModel +from ...types.eleven_labs_transcriber_language import ElevenLabsTranscriberLanguage +from ...types.eleven_labs_transcriber_model import ElevenLabsTranscriberModel +from ...types.fallback_transcriber_plan import FallbackTranscriberPlan +from ...types.gladia_custom_vocabulary_config_dto import GladiaCustomVocabularyConfigDto +from ...types.gladia_transcriber_language import GladiaTranscriberLanguage +from ...types.gladia_transcriber_language_behaviour import GladiaTranscriberLanguageBehaviour +from ...types.gladia_transcriber_languages import GladiaTranscriberLanguages +from ...types.gladia_transcriber_model import GladiaTranscriberModel +from ...types.gladia_transcriber_region import GladiaTranscriberRegion +from ...types.google_transcriber_language import GoogleTranscriberLanguage +from ...types.google_transcriber_model import GoogleTranscriberModel +from ...types.open_ai_transcriber_language import OpenAiTranscriberLanguage +from ...types.open_ai_transcriber_model import OpenAiTranscriberModel +from ...types.server import Server +from ...types.soniox_transcriber_language import SonioxTranscriberLanguage +from ...types.soniox_transcriber_model import SonioxTranscriberModel +from ...types.speechmatics_custom_vocabulary_item import SpeechmaticsCustomVocabularyItem +from ...types.speechmatics_transcriber_language import SpeechmaticsTranscriberLanguage +from ...types.speechmatics_transcriber_model import SpeechmaticsTranscriberModel +from ...types.speechmatics_transcriber_numeral_style import SpeechmaticsTranscriberNumeralStyle +from ...types.speechmatics_transcriber_operating_point import SpeechmaticsTranscriberOperatingPoint +from ...types.speechmatics_transcriber_region import SpeechmaticsTranscriberRegion +from ...types.talkscriber_transcriber_language import TalkscriberTranscriberLanguage +from ...types.talkscriber_transcriber_model import TalkscriberTranscriberModel + + +class UpdateAssistantDtoTranscriber_AssemblyAi(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["assembly-ai"] = "assembly-ai" + language: typing.Optional[AssemblyAiTranscriberLanguage] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="confidenceThreshold"), pydantic.Field(alias="confidenceThreshold") + ] = None + format_turns: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="formatTurns"), pydantic.Field(alias="formatTurns") + ] = None + end_of_turn_confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="endOfTurnConfidenceThreshold"), + pydantic.Field(alias="endOfTurnConfidenceThreshold"), + ] = None + min_end_of_turn_silence_when_confident: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minEndOfTurnSilenceWhenConfident"), + pydantic.Field(alias="minEndOfTurnSilenceWhenConfident"), + ] = None + word_finalization_max_wait_time: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="wordFinalizationMaxWaitTime"), + pydantic.Field(alias="wordFinalizationMaxWaitTime"), + ] = None + max_turn_silence: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTurnSilence"), pydantic.Field(alias="maxTurnSilence") + ] = None + vad_assisted_endpointing_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="vadAssistedEndpointingEnabled"), + pydantic.Field(alias="vadAssistedEndpointingEnabled"), + ] = None + speech_model: typing_extensions.Annotated[ + typing.Optional[AssemblyAiTranscriberSpeechModel], + FieldMetadata(alias="speechModel"), + pydantic.Field(alias="speechModel"), + ] = None + realtime_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="realtimeUrl"), pydantic.Field(alias="realtimeUrl") + ] = None + word_boost: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="wordBoost"), pydantic.Field(alias="wordBoost") + ] = None + keyterms_prompt: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="keytermsPrompt"), pydantic.Field(alias="keytermsPrompt") + ] = None + end_utterance_silence_threshold: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="endUtteranceSilenceThreshold"), + pydantic.Field(alias="endUtteranceSilenceThreshold"), + ] = None + disable_partial_transcripts: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="disablePartialTranscripts"), + pydantic.Field(alias="disablePartialTranscripts"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoTranscriber_Azure(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["azure"] = "azure" + language: typing.Optional[AzureSpeechTranscriberLanguage] = None + segmentation_strategy: typing_extensions.Annotated[ + typing.Optional[AzureSpeechTranscriberSegmentationStrategy], + FieldMetadata(alias="segmentationStrategy"), + pydantic.Field(alias="segmentationStrategy"), + ] = None + segmentation_silence_timeout_ms: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="segmentationSilenceTimeoutMs"), + pydantic.Field(alias="segmentationSilenceTimeoutMs"), + ] = None + segmentation_maximum_time_ms: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="segmentationMaximumTimeMs"), + pydantic.Field(alias="segmentationMaximumTimeMs"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoTranscriber_CustomTranscriber(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["custom-transcriber"] = "custom-transcriber" + server: Server + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoTranscriber_Deepgram(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["deepgram"] = "deepgram" + model: typing.Optional[DeepgramTranscriberModel] = None + language: typing.Optional[DeepgramTranscriberLanguage] = None + smart_format: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smartFormat"), pydantic.Field(alias="smartFormat") + ] = None + mip_opt_out: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="mipOptOut"), pydantic.Field(alias="mipOptOut") + ] = None + numerals: typing.Optional[bool] = None + profanity_filter: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="profanityFilter"), pydantic.Field(alias="profanityFilter") + ] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="confidenceThreshold"), pydantic.Field(alias="confidenceThreshold") + ] = None + eager_eot_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="eagerEotThreshold"), pydantic.Field(alias="eagerEotThreshold") + ] = None + eot_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="eotThreshold"), pydantic.Field(alias="eotThreshold") + ] = None + eot_timeout_ms: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="eotTimeoutMs"), pydantic.Field(alias="eotTimeoutMs") + ] = None + keywords: typing.Optional[typing.List[str]] = None + keyterm: typing.Optional[typing.List[str]] = None + endpointing: typing.Optional[float] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoTranscriber_11Labs(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["11labs"] = "11labs" + model: typing.Optional[ElevenLabsTranscriberModel] = None + language: typing.Optional[ElevenLabsTranscriberLanguage] = None + silence_threshold_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="silenceThresholdSeconds"), + pydantic.Field(alias="silenceThresholdSeconds"), + ] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="confidenceThreshold"), pydantic.Field(alias="confidenceThreshold") + ] = None + min_speech_duration_ms: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="minSpeechDurationMs"), pydantic.Field(alias="minSpeechDurationMs") + ] = None + min_silence_duration_ms: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minSilenceDurationMs"), + pydantic.Field(alias="minSilenceDurationMs"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoTranscriber_Gladia(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["gladia"] = "gladia" + model: typing.Optional[GladiaTranscriberModel] = None + language_behaviour: typing_extensions.Annotated[ + typing.Optional[GladiaTranscriberLanguageBehaviour], + FieldMetadata(alias="languageBehaviour"), + pydantic.Field(alias="languageBehaviour"), + ] = None + language: typing.Optional[GladiaTranscriberLanguage] = None + languages: typing.Optional[GladiaTranscriberLanguages] = None + transcription_hint: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="transcriptionHint"), pydantic.Field(alias="transcriptionHint") + ] = None + prosody: typing.Optional[bool] = None + audio_enhancer: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="audioEnhancer"), pydantic.Field(alias="audioEnhancer") + ] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="confidenceThreshold"), pydantic.Field(alias="confidenceThreshold") + ] = None + endpointing: typing.Optional[float] = None + speech_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="speechThreshold"), pydantic.Field(alias="speechThreshold") + ] = None + custom_vocabulary_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="customVocabularyEnabled"), + pydantic.Field(alias="customVocabularyEnabled"), + ] = None + custom_vocabulary_config: typing_extensions.Annotated[ + typing.Optional[GladiaCustomVocabularyConfigDto], + FieldMetadata(alias="customVocabularyConfig"), + pydantic.Field(alias="customVocabularyConfig"), + ] = None + region: typing.Optional[GladiaTranscriberRegion] = None + receive_partial_transcripts: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="receivePartialTranscripts"), + pydantic.Field(alias="receivePartialTranscripts"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoTranscriber_Google(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["google"] = "google" + model: typing.Optional[GoogleTranscriberModel] = None + language: typing.Optional[GoogleTranscriberLanguage] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoTranscriber_Speechmatics(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["speechmatics"] = "speechmatics" + model: typing.Optional[SpeechmaticsTranscriberModel] = None + language: typing.Optional[SpeechmaticsTranscriberLanguage] = None + operating_point: typing_extensions.Annotated[ + typing.Optional[SpeechmaticsTranscriberOperatingPoint], + FieldMetadata(alias="operatingPoint"), + pydantic.Field(alias="operatingPoint"), + ] = None + region: typing.Optional[SpeechmaticsTranscriberRegion] = None + enable_diarization: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="enableDiarization"), pydantic.Field(alias="enableDiarization") + ] = None + max_delay: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxDelay"), pydantic.Field(alias="maxDelay") + ] = None + custom_vocabulary: typing_extensions.Annotated[ + typing.List[SpeechmaticsCustomVocabularyItem], + FieldMetadata(alias="customVocabulary"), + pydantic.Field(alias="customVocabulary"), + ] + numeral_style: typing_extensions.Annotated[ + typing.Optional[SpeechmaticsTranscriberNumeralStyle], + FieldMetadata(alias="numeralStyle"), + pydantic.Field(alias="numeralStyle"), + ] = None + end_of_turn_sensitivity: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="endOfTurnSensitivity"), + pydantic.Field(alias="endOfTurnSensitivity"), + ] = None + remove_disfluencies: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="removeDisfluencies"), pydantic.Field(alias="removeDisfluencies") + ] = None + minimum_speech_duration: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minimumSpeechDuration"), + pydantic.Field(alias="minimumSpeechDuration"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoTranscriber_Talkscriber(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["talkscriber"] = "talkscriber" + model: typing.Optional[TalkscriberTranscriberModel] = None + language: typing.Optional[TalkscriberTranscriberLanguage] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoTranscriber_Openai(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["openai"] = "openai" + model: OpenAiTranscriberModel + language: typing.Optional[OpenAiTranscriberLanguage] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoTranscriber_Cartesia(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["cartesia"] = "cartesia" + model: typing.Optional[CartesiaTranscriberModel] = None + language: typing.Optional[CartesiaTranscriberLanguage] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoTranscriber_Soniox(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["soniox"] = "soniox" + model: typing.Optional[SonioxTranscriberModel] = None + language: typing.Optional[SonioxTranscriberLanguage] = None + language_hints_strict: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="languageHintsStrict"), pydantic.Field(alias="languageHintsStrict") + ] = None + max_endpoint_delay_ms: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxEndpointDelayMs"), pydantic.Field(alias="maxEndpointDelayMs") + ] = None + custom_vocabulary: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="customVocabulary"), + pydantic.Field(alias="customVocabulary"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateAssistantDtoTranscriber = typing_extensions.Annotated[ + typing.Union[ + UpdateAssistantDtoTranscriber_AssemblyAi, + UpdateAssistantDtoTranscriber_Azure, + UpdateAssistantDtoTranscriber_CustomTranscriber, + UpdateAssistantDtoTranscriber_Deepgram, + UpdateAssistantDtoTranscriber_11Labs, + UpdateAssistantDtoTranscriber_Gladia, + UpdateAssistantDtoTranscriber_Google, + UpdateAssistantDtoTranscriber_Speechmatics, + UpdateAssistantDtoTranscriber_Talkscriber, + UpdateAssistantDtoTranscriber_Openai, + UpdateAssistantDtoTranscriber_Cartesia, + UpdateAssistantDtoTranscriber_Soniox, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/assistants/types/update_assistant_dto_voice.py b/src/vapi/assistants/types/update_assistant_dto_voice.py index 04e5fe7b..5456801d 100644 --- a/src/vapi/assistants/types/update_assistant_dto_voice.py +++ b/src/vapi/assistants/types/update_assistant_dto_voice.py @@ -1,24 +1,740 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from ...types.azure_voice import AzureVoice -from ...types.cartesia_voice import CartesiaVoice -from ...types.deepgram_voice import DeepgramVoice -from ...types.eleven_labs_voice import ElevenLabsVoice -from ...types.lmnt_voice import LmntVoice -from ...types.neets_voice import NeetsVoice -from ...types.open_ai_voice import OpenAiVoice -from ...types.play_ht_voice import PlayHtVoice -from ...types.rime_ai_voice import RimeAiVoice - -UpdateAssistantDtoVoice = typing.Union[ - AzureVoice, - CartesiaVoice, - DeepgramVoice, - ElevenLabsVoice, - LmntVoice, - NeetsVoice, - OpenAiVoice, - PlayHtVoice, - RimeAiVoice, + +import pydantic +import typing_extensions +from ...core.pydantic_utilities import IS_PYDANTIC_V2 +from ...core.serialization import FieldMetadata +from ...core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from ...types.azure_voice_id import AzureVoiceId +from ...types.cartesia_experimental_controls import CartesiaExperimentalControls +from ...types.cartesia_generation_config import CartesiaGenerationConfig +from ...types.cartesia_voice_language import CartesiaVoiceLanguage +from ...types.cartesia_voice_model import CartesiaVoiceModel +from ...types.chunk_plan import ChunkPlan +from ...types.deepgram_voice_id import DeepgramVoiceId +from ...types.deepgram_voice_model import DeepgramVoiceModel +from ...types.eleven_labs_pronunciation_dictionary_locator import ElevenLabsPronunciationDictionaryLocator +from ...types.eleven_labs_voice_id import ElevenLabsVoiceId +from ...types.eleven_labs_voice_model import ElevenLabsVoiceModel +from ...types.fallback_plan import FallbackPlan +from ...types.hume_voice_model import HumeVoiceModel +from ...types.inworld_voice_language_code import InworldVoiceLanguageCode +from ...types.inworld_voice_model import InworldVoiceModel +from ...types.inworld_voice_voice_id import InworldVoiceVoiceId +from ...types.lmnt_voice_id import LmntVoiceId +from ...types.lmnt_voice_language import LmntVoiceLanguage +from ...types.minimax_voice_language_boost import MinimaxVoiceLanguageBoost +from ...types.minimax_voice_model import MinimaxVoiceModel +from ...types.minimax_voice_region import MinimaxVoiceRegion +from ...types.minimax_voice_subtitle_type import MinimaxVoiceSubtitleType +from ...types.neuphonic_voice_model import NeuphonicVoiceModel +from ...types.open_ai_voice_id import OpenAiVoiceId +from ...types.open_ai_voice_model import OpenAiVoiceModel +from ...types.play_ht_voice_emotion import PlayHtVoiceEmotion +from ...types.play_ht_voice_id import PlayHtVoiceId +from ...types.play_ht_voice_language import PlayHtVoiceLanguage +from ...types.play_ht_voice_model import PlayHtVoiceModel +from ...types.rime_ai_voice_id import RimeAiVoiceId +from ...types.rime_ai_voice_language import RimeAiVoiceLanguage +from ...types.rime_ai_voice_model import RimeAiVoiceModel +from ...types.server import Server +from ...types.sesame_voice_model import SesameVoiceModel +from ...types.smallest_ai_voice_id import SmallestAiVoiceId +from ...types.smallest_ai_voice_model import SmallestAiVoiceModel +from ...types.tavus_conversation_properties import TavusConversationProperties +from ...types.tavus_voice_voice_id import TavusVoiceVoiceId +from ...types.vapi_pronunciation_dictionary_locator import VapiPronunciationDictionaryLocator +from ...types.vapi_voice_voice_id import VapiVoiceVoiceId +from ...types.well_said_voice_model import WellSaidVoiceModel + + +class UpdateAssistantDtoVoice_Azure(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["azure"] = "azure" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[AzureVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + speed: typing.Optional[float] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoVoice_Cartesia(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["cartesia"] = "cartesia" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[CartesiaVoiceModel] = None + language: typing.Optional[CartesiaVoiceLanguage] = None + experimental_controls: typing_extensions.Annotated[ + typing.Optional[CartesiaExperimentalControls], + FieldMetadata(alias="experimentalControls"), + pydantic.Field(alias="experimentalControls"), + ] = None + generation_config: typing_extensions.Annotated[ + typing.Optional[CartesiaGenerationConfig], + FieldMetadata(alias="generationConfig"), + pydantic.Field(alias="generationConfig"), + ] = None + pronunciation_dict_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="pronunciationDictId"), pydantic.Field(alias="pronunciationDictId") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoVoice_CustomVoice(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["custom-voice"] = "custom-voice" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + server: Server + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoVoice_Deepgram(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["deepgram"] = "deepgram" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + DeepgramVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[DeepgramVoiceModel] = None + mip_opt_out: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="mipOptOut"), pydantic.Field(alias="mipOptOut") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoVoice_11Labs(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["11labs"] = "11labs" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + ElevenLabsVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + stability: typing.Optional[float] = None + similarity_boost: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="similarityBoost"), pydantic.Field(alias="similarityBoost") + ] = None + style: typing.Optional[float] = None + use_speaker_boost: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="useSpeakerBoost"), pydantic.Field(alias="useSpeakerBoost") + ] = None + speed: typing.Optional[float] = None + optimize_streaming_latency: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="optimizeStreamingLatency"), + pydantic.Field(alias="optimizeStreamingLatency"), + ] = None + enable_ssml_parsing: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="enableSsmlParsing"), pydantic.Field(alias="enableSsmlParsing") + ] = None + auto_mode: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="autoMode"), pydantic.Field(alias="autoMode") + ] = None + model: typing.Optional[ElevenLabsVoiceModel] = None + language: typing.Optional[str] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + pronunciation_dictionary_locators: typing_extensions.Annotated[ + typing.Optional[typing.List[ElevenLabsPronunciationDictionaryLocator]], + FieldMetadata(alias="pronunciationDictionaryLocators"), + pydantic.Field(alias="pronunciationDictionaryLocators"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoVoice_Hume(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["hume"] = "hume" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + model: typing.Optional[HumeVoiceModel] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + is_custom_hume_voice: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="isCustomHumeVoice"), pydantic.Field(alias="isCustomHumeVoice") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + description: typing.Optional[str] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoVoice_Lmnt(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["lmnt"] = "lmnt" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[LmntVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + speed: typing.Optional[float] = None + language: typing.Optional[LmntVoiceLanguage] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoVoice_Neuphonic(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["neuphonic"] = "neuphonic" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[NeuphonicVoiceModel] = None + language: typing.Dict[str, typing.Any] + speed: typing.Optional[float] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoVoice_Openai(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["openai"] = "openai" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + OpenAiVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[OpenAiVoiceModel] = None + instructions: typing.Optional[str] = None + speed: typing.Optional[float] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoVoice_Playht(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["playht"] = "playht" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + PlayHtVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + speed: typing.Optional[float] = None + temperature: typing.Optional[float] = None + emotion: typing.Optional[PlayHtVoiceEmotion] = None + voice_guidance: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="voiceGuidance"), pydantic.Field(alias="voiceGuidance") + ] = None + style_guidance: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="styleGuidance"), pydantic.Field(alias="styleGuidance") + ] = None + text_guidance: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="textGuidance"), pydantic.Field(alias="textGuidance") + ] = None + model: typing.Optional[PlayHtVoiceModel] = None + language: typing.Optional[PlayHtVoiceLanguage] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoVoice_Wellsaid(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["wellsaid"] = "wellsaid" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[WellSaidVoiceModel] = None + enable_ssml: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="enableSsml"), pydantic.Field(alias="enableSsml") + ] = None + library_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="libraryIds"), pydantic.Field(alias="libraryIds") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoVoice_RimeAi(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["rime-ai"] = "rime-ai" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + RimeAiVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[RimeAiVoiceModel] = None + speed: typing.Optional[float] = None + pause_between_brackets: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="pauseBetweenBrackets"), pydantic.Field(alias="pauseBetweenBrackets") + ] = None + phonemize_between_brackets: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="phonemizeBetweenBrackets"), + pydantic.Field(alias="phonemizeBetweenBrackets"), + ] = None + reduce_latency: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="reduceLatency"), pydantic.Field(alias="reduceLatency") + ] = None + inline_speed_alpha: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="inlineSpeedAlpha"), pydantic.Field(alias="inlineSpeedAlpha") + ] = None + language: typing.Optional[RimeAiVoiceLanguage] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoVoice_SmallestAi(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["smallest-ai"] = "smallest-ai" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + SmallestAiVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[SmallestAiVoiceModel] = None + speed: typing.Optional[float] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoVoice_Tavus(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["tavus"] = "tavus" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + TavusVoiceVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + persona_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="personaId"), pydantic.Field(alias="personaId") + ] = None + callback_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callbackUrl"), pydantic.Field(alias="callbackUrl") + ] = None + conversation_name: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="conversationName"), pydantic.Field(alias="conversationName") + ] = None + conversational_context: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="conversationalContext"), + pydantic.Field(alias="conversationalContext"), + ] = None + custom_greeting: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="customGreeting"), pydantic.Field(alias="customGreeting") + ] = None + properties: typing.Optional[TavusConversationProperties] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoVoice_Vapi(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["vapi"] = "vapi" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + VapiVoiceVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + speed: typing.Optional[float] = None + pronunciation_dictionary: typing_extensions.Annotated[ + typing.Optional[typing.List[VapiPronunciationDictionaryLocator]], + FieldMetadata(alias="pronunciationDictionary"), + pydantic.Field(alias="pronunciationDictionary"), + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoVoice_Sesame(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["sesame"] = "sesame" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: SesameVoiceModel + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoVoice_Inworld(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["inworld"] = "inworld" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + InworldVoiceVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[InworldVoiceModel] = None + language_code: typing_extensions.Annotated[ + typing.Optional[InworldVoiceLanguageCode], + FieldMetadata(alias="languageCode"), + pydantic.Field(alias="languageCode"), + ] = None + temperature: typing.Optional[float] = None + speaking_rate: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="speakingRate"), pydantic.Field(alias="speakingRate") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAssistantDtoVoice_Minimax(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["minimax"] = "minimax" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[MinimaxVoiceModel] = None + emotion: typing.Optional[str] = None + subtitle_type: typing_extensions.Annotated[ + typing.Optional[MinimaxVoiceSubtitleType], + FieldMetadata(alias="subtitleType"), + pydantic.Field(alias="subtitleType"), + ] = None + pitch: typing.Optional[float] = None + speed: typing.Optional[float] = None + volume: typing.Optional[float] = None + region: typing.Optional[MinimaxVoiceRegion] = None + language_boost: typing_extensions.Annotated[ + typing.Optional[MinimaxVoiceLanguageBoost], + FieldMetadata(alias="languageBoost"), + pydantic.Field(alias="languageBoost"), + ] = None + text_normalization_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="textNormalizationEnabled"), + pydantic.Field(alias="textNormalizationEnabled"), + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateAssistantDtoVoice = typing_extensions.Annotated[ + typing.Union[ + UpdateAssistantDtoVoice_Azure, + UpdateAssistantDtoVoice_Cartesia, + UpdateAssistantDtoVoice_CustomVoice, + UpdateAssistantDtoVoice_Deepgram, + UpdateAssistantDtoVoice_11Labs, + UpdateAssistantDtoVoice_Hume, + UpdateAssistantDtoVoice_Lmnt, + UpdateAssistantDtoVoice_Neuphonic, + UpdateAssistantDtoVoice_Openai, + UpdateAssistantDtoVoice_Playht, + UpdateAssistantDtoVoice_Wellsaid, + UpdateAssistantDtoVoice_RimeAi, + UpdateAssistantDtoVoice_SmallestAi, + UpdateAssistantDtoVoice_Tavus, + UpdateAssistantDtoVoice_Vapi, + UpdateAssistantDtoVoice_Sesame, + UpdateAssistantDtoVoice_Inworld, + UpdateAssistantDtoVoice_Minimax, + ], + UnionMetadata(discriminant="provider"), ] diff --git a/src/vapi/assistants/types/update_assistant_dto_voicemail_detection.py b/src/vapi/assistants/types/update_assistant_dto_voicemail_detection.py new file mode 100644 index 00000000..fff26d8c --- /dev/null +++ b/src/vapi/assistants/types/update_assistant_dto_voicemail_detection.py @@ -0,0 +1,17 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from ...types.google_voicemail_detection_plan import GoogleVoicemailDetectionPlan +from ...types.open_ai_voicemail_detection_plan import OpenAiVoicemailDetectionPlan +from ...types.twilio_voicemail_detection_plan import TwilioVoicemailDetectionPlan +from ...types.vapi_voicemail_detection_plan import VapiVoicemailDetectionPlan +from .update_assistant_dto_voicemail_detection_zero import UpdateAssistantDtoVoicemailDetectionZero + +UpdateAssistantDtoVoicemailDetection = typing.Union[ + UpdateAssistantDtoVoicemailDetectionZero, + GoogleVoicemailDetectionPlan, + OpenAiVoicemailDetectionPlan, + TwilioVoicemailDetectionPlan, + VapiVoicemailDetectionPlan, +] diff --git a/src/vapi/assistants/types/update_assistant_dto_voicemail_detection_zero.py b/src/vapi/assistants/types/update_assistant_dto_voicemail_detection_zero.py new file mode 100644 index 00000000..a7f2025a --- /dev/null +++ b/src/vapi/assistants/types/update_assistant_dto_voicemail_detection_zero.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +UpdateAssistantDtoVoicemailDetectionZero = typing.Union[typing.Literal["off"], typing.Any] diff --git a/src/vapi/blocks/__init__.py b/src/vapi/blocks/__init__.py deleted file mode 100644 index 64a903bd..00000000 --- a/src/vapi/blocks/__init__.py +++ /dev/null @@ -1,25 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from .types import ( - BlocksCreateRequest, - BlocksCreateResponse, - BlocksDeleteResponse, - BlocksGetResponse, - BlocksListResponseItem, - BlocksUpdateResponse, - UpdateBlockDtoMessagesItem, - UpdateBlockDtoStepsItem, - UpdateBlockDtoTool, -) - -__all__ = [ - "BlocksCreateRequest", - "BlocksCreateResponse", - "BlocksDeleteResponse", - "BlocksGetResponse", - "BlocksListResponseItem", - "BlocksUpdateResponse", - "UpdateBlockDtoMessagesItem", - "UpdateBlockDtoStepsItem", - "UpdateBlockDtoTool", -] diff --git a/src/vapi/blocks/client.py b/src/vapi/blocks/client.py deleted file mode 100644 index 7071f643..00000000 --- a/src/vapi/blocks/client.py +++ /dev/null @@ -1,804 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from ..core.client_wrapper import SyncClientWrapper -import datetime as dt -from ..core.request_options import RequestOptions -from .types.blocks_list_response_item import BlocksListResponseItem -from ..core.datetime_utils import serialize_datetime -from ..core.pydantic_utilities import parse_obj_as -from json.decoder import JSONDecodeError -from ..core.api_error import ApiError -from .types.blocks_create_request import BlocksCreateRequest -from .types.blocks_create_response import BlocksCreateResponse -from ..core.serialization import convert_and_respect_annotation_metadata -from .types.blocks_get_response import BlocksGetResponse -from ..core.jsonable_encoder import jsonable_encoder -from .types.blocks_delete_response import BlocksDeleteResponse -from .types.update_block_dto_messages_item import UpdateBlockDtoMessagesItem -from ..types.json_schema import JsonSchema -from .types.update_block_dto_tool import UpdateBlockDtoTool -from .types.update_block_dto_steps_item import UpdateBlockDtoStepsItem -from .types.blocks_update_response import BlocksUpdateResponse -from ..core.client_wrapper import AsyncClientWrapper - -# this is used as the default value for optional parameters -OMIT = typing.cast(typing.Any, ...) - - -class BlocksClient: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._client_wrapper = client_wrapper - - def list( - self, - *, - limit: typing.Optional[float] = None, - created_at_gt: typing.Optional[dt.datetime] = None, - created_at_lt: typing.Optional[dt.datetime] = None, - created_at_ge: typing.Optional[dt.datetime] = None, - created_at_le: typing.Optional[dt.datetime] = None, - updated_at_gt: typing.Optional[dt.datetime] = None, - updated_at_lt: typing.Optional[dt.datetime] = None, - updated_at_ge: typing.Optional[dt.datetime] = None, - updated_at_le: typing.Optional[dt.datetime] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> typing.List[BlocksListResponseItem]: - """ - Parameters - ---------- - limit : typing.Optional[float] - This is the maximum number of items to return. Defaults to 100. - - created_at_gt : typing.Optional[dt.datetime] - This will return items where the createdAt is greater than the specified value. - - created_at_lt : typing.Optional[dt.datetime] - This will return items where the createdAt is less than the specified value. - - created_at_ge : typing.Optional[dt.datetime] - This will return items where the createdAt is greater than or equal to the specified value. - - created_at_le : typing.Optional[dt.datetime] - This will return items where the createdAt is less than or equal to the specified value. - - updated_at_gt : typing.Optional[dt.datetime] - This will return items where the updatedAt is greater than the specified value. - - updated_at_lt : typing.Optional[dt.datetime] - This will return items where the updatedAt is less than the specified value. - - updated_at_ge : typing.Optional[dt.datetime] - This will return items where the updatedAt is greater than or equal to the specified value. - - updated_at_le : typing.Optional[dt.datetime] - This will return items where the updatedAt is less than or equal to the specified value. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.List[BlocksListResponseItem] - - - Examples - -------- - from vapi import Vapi - - client = Vapi( - token="YOUR_TOKEN", - ) - client.blocks.list() - """ - _response = self._client_wrapper.httpx_client.request( - "block", - method="GET", - params={ - "limit": limit, - "createdAtGt": serialize_datetime(created_at_gt) if created_at_gt is not None else None, - "createdAtLt": serialize_datetime(created_at_lt) if created_at_lt is not None else None, - "createdAtGe": serialize_datetime(created_at_ge) if created_at_ge is not None else None, - "createdAtLe": serialize_datetime(created_at_le) if created_at_le is not None else None, - "updatedAtGt": serialize_datetime(updated_at_gt) if updated_at_gt is not None else None, - "updatedAtLt": serialize_datetime(updated_at_lt) if updated_at_lt is not None else None, - "updatedAtGe": serialize_datetime(updated_at_ge) if updated_at_ge is not None else None, - "updatedAtLe": serialize_datetime(updated_at_le) if updated_at_le is not None else None, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - typing.List[BlocksListResponseItem], - parse_obj_as( - type_=typing.List[BlocksListResponseItem], # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - def create( - self, *, request: BlocksCreateRequest, request_options: typing.Optional[RequestOptions] = None - ) -> BlocksCreateResponse: - """ - Parameters - ---------- - request : BlocksCreateRequest - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - BlocksCreateResponse - - - Examples - -------- - from vapi import CreateConversationBlockDto, Vapi - - client = Vapi( - token="YOUR_TOKEN", - ) - client.blocks.create( - request=CreateConversationBlockDto( - instruction="instruction", - ), - ) - """ - _response = self._client_wrapper.httpx_client.request( - "block", - method="POST", - json=convert_and_respect_annotation_metadata( - object_=request, annotation=BlocksCreateRequest, direction="write" - ), - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - BlocksCreateResponse, - parse_obj_as( - type_=BlocksCreateResponse, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> BlocksGetResponse: - """ - Parameters - ---------- - id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - BlocksGetResponse - - - Examples - -------- - from vapi import Vapi - - client = Vapi( - token="YOUR_TOKEN", - ) - client.blocks.get( - id="id", - ) - """ - _response = self._client_wrapper.httpx_client.request( - f"block/{jsonable_encoder(id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - BlocksGetResponse, - parse_obj_as( - type_=BlocksGetResponse, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> BlocksDeleteResponse: - """ - Parameters - ---------- - id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - BlocksDeleteResponse - - - Examples - -------- - from vapi import Vapi - - client = Vapi( - token="YOUR_TOKEN", - ) - client.blocks.delete( - id="id", - ) - """ - _response = self._client_wrapper.httpx_client.request( - f"block/{jsonable_encoder(id)}", - method="DELETE", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - BlocksDeleteResponse, - parse_obj_as( - type_=BlocksDeleteResponse, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - def update( - self, - id: str, - *, - messages: typing.Optional[typing.Sequence[UpdateBlockDtoMessagesItem]] = OMIT, - input_schema: typing.Optional[JsonSchema] = OMIT, - output_schema: typing.Optional[JsonSchema] = OMIT, - tool: typing.Optional[UpdateBlockDtoTool] = OMIT, - steps: typing.Optional[typing.Sequence[UpdateBlockDtoStepsItem]] = OMIT, - name: typing.Optional[str] = OMIT, - instruction: typing.Optional[str] = OMIT, - tool_id: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> BlocksUpdateResponse: - """ - Parameters - ---------- - id : str - - messages : typing.Optional[typing.Sequence[UpdateBlockDtoMessagesItem]] - These are the pre-configured messages that will be spoken to the user while the block is running. - - input_schema : typing.Optional[JsonSchema] - This is the input schema for the block. This is the input the block needs to run. It's given to the block as `steps[0].input` - - These are accessible as variables: - - ({{input.propertyName}}) in context of the block execution (step) - - ({{stepName.input.propertyName}}) in context of the workflow - - output_schema : typing.Optional[JsonSchema] - This is the output schema for the block. This is the output the block will return to the workflow (`{{stepName.output}}`). - - These are accessible as variables: - - ({{output.propertyName}}) in context of the block execution (step) - - ({{stepName.output.propertyName}}) in context of the workflow (read caveat #1) - - ({{blockName.output.propertyName}}) in context of the workflow (read caveat #2) - - Caveats: - 1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.output.propertyName}} will reference the latest usage of the step. - 2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.output.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow with steps. - - tool : typing.Optional[UpdateBlockDtoTool] - This is the tool that the block will call. To use an existing tool, use `toolId`. - - steps : typing.Optional[typing.Sequence[UpdateBlockDtoStepsItem]] - These are the steps in the workflow. - - name : typing.Optional[str] - This is the name of the block. This is just for your reference. - - instruction : typing.Optional[str] - This is the instruction to the model. - - You can reference any variable in the context of the current block execution (step): - - "{{input.your-property-name}}" for the current step's input - - "{{your-step-name.output.your-property-name}}" for another step's output (in the same workflow; read caveat #1) - - "{{your-step-name.input.your-property-name}}" for another step's input (in the same workflow; read caveat #1) - - "{{your-block-name.output.your-property-name}}" for another block's output (in the same workflow; read caveat #2) - - "{{your-block-name.input.your-property-name}}" for another block's input (in the same workflow; read caveat #2) - - "{{workflow.input.your-property-name}}" for the current workflow's input - - "{{global.your-property-name}}" for the global context - - This can be as simple or as complex as you want it to be. - - "say hello and ask the user about their day!" - - "collect the user's first and last name" - - "user is {{input.firstName}} {{input.lastName}}. their age is {{input.age}}. ask them about their salary and if they might be interested in buying a house. we offer {{input.offer}}" - - Caveats: - 1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.output/input.propertyName}} will reference the latest usage of the step. - 2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.output/input.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow with steps. - - tool_id : typing.Optional[str] - This is the id of the tool that the block will call. To use a transient tool, use `tool`. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - BlocksUpdateResponse - - - Examples - -------- - from vapi import Vapi - - client = Vapi( - token="YOUR_TOKEN", - ) - client.blocks.update( - id="id", - ) - """ - _response = self._client_wrapper.httpx_client.request( - f"block/{jsonable_encoder(id)}", - method="PATCH", - json={ - "messages": convert_and_respect_annotation_metadata( - object_=messages, annotation=typing.Sequence[UpdateBlockDtoMessagesItem], direction="write" - ), - "inputSchema": convert_and_respect_annotation_metadata( - object_=input_schema, annotation=JsonSchema, direction="write" - ), - "outputSchema": convert_and_respect_annotation_metadata( - object_=output_schema, annotation=JsonSchema, direction="write" - ), - "tool": convert_and_respect_annotation_metadata( - object_=tool, annotation=UpdateBlockDtoTool, direction="write" - ), - "steps": convert_and_respect_annotation_metadata( - object_=steps, annotation=typing.Sequence[UpdateBlockDtoStepsItem], direction="write" - ), - "name": name, - "instruction": instruction, - "toolId": tool_id, - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - BlocksUpdateResponse, - parse_obj_as( - type_=BlocksUpdateResponse, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - -class AsyncBlocksClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def list( - self, - *, - limit: typing.Optional[float] = None, - created_at_gt: typing.Optional[dt.datetime] = None, - created_at_lt: typing.Optional[dt.datetime] = None, - created_at_ge: typing.Optional[dt.datetime] = None, - created_at_le: typing.Optional[dt.datetime] = None, - updated_at_gt: typing.Optional[dt.datetime] = None, - updated_at_lt: typing.Optional[dt.datetime] = None, - updated_at_ge: typing.Optional[dt.datetime] = None, - updated_at_le: typing.Optional[dt.datetime] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> typing.List[BlocksListResponseItem]: - """ - Parameters - ---------- - limit : typing.Optional[float] - This is the maximum number of items to return. Defaults to 100. - - created_at_gt : typing.Optional[dt.datetime] - This will return items where the createdAt is greater than the specified value. - - created_at_lt : typing.Optional[dt.datetime] - This will return items where the createdAt is less than the specified value. - - created_at_ge : typing.Optional[dt.datetime] - This will return items where the createdAt is greater than or equal to the specified value. - - created_at_le : typing.Optional[dt.datetime] - This will return items where the createdAt is less than or equal to the specified value. - - updated_at_gt : typing.Optional[dt.datetime] - This will return items where the updatedAt is greater than the specified value. - - updated_at_lt : typing.Optional[dt.datetime] - This will return items where the updatedAt is less than the specified value. - - updated_at_ge : typing.Optional[dt.datetime] - This will return items where the updatedAt is greater than or equal to the specified value. - - updated_at_le : typing.Optional[dt.datetime] - This will return items where the updatedAt is less than or equal to the specified value. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.List[BlocksListResponseItem] - - - Examples - -------- - import asyncio - - from vapi import AsyncVapi - - client = AsyncVapi( - token="YOUR_TOKEN", - ) - - - async def main() -> None: - await client.blocks.list() - - - asyncio.run(main()) - """ - _response = await self._client_wrapper.httpx_client.request( - "block", - method="GET", - params={ - "limit": limit, - "createdAtGt": serialize_datetime(created_at_gt) if created_at_gt is not None else None, - "createdAtLt": serialize_datetime(created_at_lt) if created_at_lt is not None else None, - "createdAtGe": serialize_datetime(created_at_ge) if created_at_ge is not None else None, - "createdAtLe": serialize_datetime(created_at_le) if created_at_le is not None else None, - "updatedAtGt": serialize_datetime(updated_at_gt) if updated_at_gt is not None else None, - "updatedAtLt": serialize_datetime(updated_at_lt) if updated_at_lt is not None else None, - "updatedAtGe": serialize_datetime(updated_at_ge) if updated_at_ge is not None else None, - "updatedAtLe": serialize_datetime(updated_at_le) if updated_at_le is not None else None, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - typing.List[BlocksListResponseItem], - parse_obj_as( - type_=typing.List[BlocksListResponseItem], # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - async def create( - self, *, request: BlocksCreateRequest, request_options: typing.Optional[RequestOptions] = None - ) -> BlocksCreateResponse: - """ - Parameters - ---------- - request : BlocksCreateRequest - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - BlocksCreateResponse - - - Examples - -------- - import asyncio - - from vapi import AsyncVapi, CreateConversationBlockDto - - client = AsyncVapi( - token="YOUR_TOKEN", - ) - - - async def main() -> None: - await client.blocks.create( - request=CreateConversationBlockDto( - instruction="instruction", - ), - ) - - - asyncio.run(main()) - """ - _response = await self._client_wrapper.httpx_client.request( - "block", - method="POST", - json=convert_and_respect_annotation_metadata( - object_=request, annotation=BlocksCreateRequest, direction="write" - ), - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - BlocksCreateResponse, - parse_obj_as( - type_=BlocksCreateResponse, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - async def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> BlocksGetResponse: - """ - Parameters - ---------- - id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - BlocksGetResponse - - - Examples - -------- - import asyncio - - from vapi import AsyncVapi - - client = AsyncVapi( - token="YOUR_TOKEN", - ) - - - async def main() -> None: - await client.blocks.get( - id="id", - ) - - - asyncio.run(main()) - """ - _response = await self._client_wrapper.httpx_client.request( - f"block/{jsonable_encoder(id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - BlocksGetResponse, - parse_obj_as( - type_=BlocksGetResponse, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - async def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> BlocksDeleteResponse: - """ - Parameters - ---------- - id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - BlocksDeleteResponse - - - Examples - -------- - import asyncio - - from vapi import AsyncVapi - - client = AsyncVapi( - token="YOUR_TOKEN", - ) - - - async def main() -> None: - await client.blocks.delete( - id="id", - ) - - - asyncio.run(main()) - """ - _response = await self._client_wrapper.httpx_client.request( - f"block/{jsonable_encoder(id)}", - method="DELETE", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - BlocksDeleteResponse, - parse_obj_as( - type_=BlocksDeleteResponse, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - async def update( - self, - id: str, - *, - messages: typing.Optional[typing.Sequence[UpdateBlockDtoMessagesItem]] = OMIT, - input_schema: typing.Optional[JsonSchema] = OMIT, - output_schema: typing.Optional[JsonSchema] = OMIT, - tool: typing.Optional[UpdateBlockDtoTool] = OMIT, - steps: typing.Optional[typing.Sequence[UpdateBlockDtoStepsItem]] = OMIT, - name: typing.Optional[str] = OMIT, - instruction: typing.Optional[str] = OMIT, - tool_id: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> BlocksUpdateResponse: - """ - Parameters - ---------- - id : str - - messages : typing.Optional[typing.Sequence[UpdateBlockDtoMessagesItem]] - These are the pre-configured messages that will be spoken to the user while the block is running. - - input_schema : typing.Optional[JsonSchema] - This is the input schema for the block. This is the input the block needs to run. It's given to the block as `steps[0].input` - - These are accessible as variables: - - ({{input.propertyName}}) in context of the block execution (step) - - ({{stepName.input.propertyName}}) in context of the workflow - - output_schema : typing.Optional[JsonSchema] - This is the output schema for the block. This is the output the block will return to the workflow (`{{stepName.output}}`). - - These are accessible as variables: - - ({{output.propertyName}}) in context of the block execution (step) - - ({{stepName.output.propertyName}}) in context of the workflow (read caveat #1) - - ({{blockName.output.propertyName}}) in context of the workflow (read caveat #2) - - Caveats: - 1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.output.propertyName}} will reference the latest usage of the step. - 2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.output.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow with steps. - - tool : typing.Optional[UpdateBlockDtoTool] - This is the tool that the block will call. To use an existing tool, use `toolId`. - - steps : typing.Optional[typing.Sequence[UpdateBlockDtoStepsItem]] - These are the steps in the workflow. - - name : typing.Optional[str] - This is the name of the block. This is just for your reference. - - instruction : typing.Optional[str] - This is the instruction to the model. - - You can reference any variable in the context of the current block execution (step): - - "{{input.your-property-name}}" for the current step's input - - "{{your-step-name.output.your-property-name}}" for another step's output (in the same workflow; read caveat #1) - - "{{your-step-name.input.your-property-name}}" for another step's input (in the same workflow; read caveat #1) - - "{{your-block-name.output.your-property-name}}" for another block's output (in the same workflow; read caveat #2) - - "{{your-block-name.input.your-property-name}}" for another block's input (in the same workflow; read caveat #2) - - "{{workflow.input.your-property-name}}" for the current workflow's input - - "{{global.your-property-name}}" for the global context - - This can be as simple or as complex as you want it to be. - - "say hello and ask the user about their day!" - - "collect the user's first and last name" - - "user is {{input.firstName}} {{input.lastName}}. their age is {{input.age}}. ask them about their salary and if they might be interested in buying a house. we offer {{input.offer}}" - - Caveats: - 1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.output/input.propertyName}} will reference the latest usage of the step. - 2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.output/input.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow with steps. - - tool_id : typing.Optional[str] - This is the id of the tool that the block will call. To use a transient tool, use `tool`. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - BlocksUpdateResponse - - - Examples - -------- - import asyncio - - from vapi import AsyncVapi - - client = AsyncVapi( - token="YOUR_TOKEN", - ) - - - async def main() -> None: - await client.blocks.update( - id="id", - ) - - - asyncio.run(main()) - """ - _response = await self._client_wrapper.httpx_client.request( - f"block/{jsonable_encoder(id)}", - method="PATCH", - json={ - "messages": convert_and_respect_annotation_metadata( - object_=messages, annotation=typing.Sequence[UpdateBlockDtoMessagesItem], direction="write" - ), - "inputSchema": convert_and_respect_annotation_metadata( - object_=input_schema, annotation=JsonSchema, direction="write" - ), - "outputSchema": convert_and_respect_annotation_metadata( - object_=output_schema, annotation=JsonSchema, direction="write" - ), - "tool": convert_and_respect_annotation_metadata( - object_=tool, annotation=UpdateBlockDtoTool, direction="write" - ), - "steps": convert_and_respect_annotation_metadata( - object_=steps, annotation=typing.Sequence[UpdateBlockDtoStepsItem], direction="write" - ), - "name": name, - "instruction": instruction, - "toolId": tool_id, - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - BlocksUpdateResponse, - parse_obj_as( - type_=BlocksUpdateResponse, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/src/vapi/blocks/types/__init__.py b/src/vapi/blocks/types/__init__.py deleted file mode 100644 index 48bdec73..00000000 --- a/src/vapi/blocks/types/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from .blocks_create_request import BlocksCreateRequest -from .blocks_create_response import BlocksCreateResponse -from .blocks_delete_response import BlocksDeleteResponse -from .blocks_get_response import BlocksGetResponse -from .blocks_list_response_item import BlocksListResponseItem -from .blocks_update_response import BlocksUpdateResponse -from .update_block_dto_messages_item import UpdateBlockDtoMessagesItem -from .update_block_dto_steps_item import UpdateBlockDtoStepsItem -from .update_block_dto_tool import UpdateBlockDtoTool - -__all__ = [ - "BlocksCreateRequest", - "BlocksCreateResponse", - "BlocksDeleteResponse", - "BlocksGetResponse", - "BlocksListResponseItem", - "BlocksUpdateResponse", - "UpdateBlockDtoMessagesItem", - "UpdateBlockDtoStepsItem", - "UpdateBlockDtoTool", -] diff --git a/src/vapi/blocks/types/blocks_create_request.py b/src/vapi/blocks/types/blocks_create_request.py deleted file mode 100644 index 053cffce..00000000 --- a/src/vapi/blocks/types/blocks_create_request.py +++ /dev/null @@ -1,8 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from ...types.create_conversation_block_dto import CreateConversationBlockDto -from ...types.create_tool_call_block_dto import CreateToolCallBlockDto -from ...types.create_workflow_block_dto import CreateWorkflowBlockDto - -BlocksCreateRequest = typing.Union[CreateConversationBlockDto, CreateToolCallBlockDto, CreateWorkflowBlockDto] diff --git a/src/vapi/blocks/types/blocks_create_response.py b/src/vapi/blocks/types/blocks_create_response.py deleted file mode 100644 index b5a0be59..00000000 --- a/src/vapi/blocks/types/blocks_create_response.py +++ /dev/null @@ -1,8 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from ...types.conversation_block import ConversationBlock -from ...types.tool_call_block import ToolCallBlock -from ...types.workflow_block import WorkflowBlock - -BlocksCreateResponse = typing.Union[ConversationBlock, ToolCallBlock, WorkflowBlock] diff --git a/src/vapi/blocks/types/blocks_delete_response.py b/src/vapi/blocks/types/blocks_delete_response.py deleted file mode 100644 index e06a62bf..00000000 --- a/src/vapi/blocks/types/blocks_delete_response.py +++ /dev/null @@ -1,8 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from ...types.conversation_block import ConversationBlock -from ...types.tool_call_block import ToolCallBlock -from ...types.workflow_block import WorkflowBlock - -BlocksDeleteResponse = typing.Union[ConversationBlock, ToolCallBlock, WorkflowBlock] diff --git a/src/vapi/blocks/types/blocks_get_response.py b/src/vapi/blocks/types/blocks_get_response.py deleted file mode 100644 index b9c5588a..00000000 --- a/src/vapi/blocks/types/blocks_get_response.py +++ /dev/null @@ -1,8 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from ...types.conversation_block import ConversationBlock -from ...types.tool_call_block import ToolCallBlock -from ...types.workflow_block import WorkflowBlock - -BlocksGetResponse = typing.Union[ConversationBlock, ToolCallBlock, WorkflowBlock] diff --git a/src/vapi/blocks/types/blocks_list_response_item.py b/src/vapi/blocks/types/blocks_list_response_item.py deleted file mode 100644 index 9109b1cc..00000000 --- a/src/vapi/blocks/types/blocks_list_response_item.py +++ /dev/null @@ -1,8 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from ...types.conversation_block import ConversationBlock -from ...types.tool_call_block import ToolCallBlock -from ...types.workflow_block import WorkflowBlock - -BlocksListResponseItem = typing.Union[ConversationBlock, ToolCallBlock, WorkflowBlock] diff --git a/src/vapi/blocks/types/blocks_update_response.py b/src/vapi/blocks/types/blocks_update_response.py deleted file mode 100644 index 6907ed2f..00000000 --- a/src/vapi/blocks/types/blocks_update_response.py +++ /dev/null @@ -1,8 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from ...types.conversation_block import ConversationBlock -from ...types.tool_call_block import ToolCallBlock -from ...types.workflow_block import WorkflowBlock - -BlocksUpdateResponse = typing.Union[ConversationBlock, ToolCallBlock, WorkflowBlock] diff --git a/src/vapi/blocks/types/update_block_dto_messages_item.py b/src/vapi/blocks/types/update_block_dto_messages_item.py deleted file mode 100644 index 170019a1..00000000 --- a/src/vapi/blocks/types/update_block_dto_messages_item.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from ...types.block_start_message import BlockStartMessage -from ...types.block_complete_message import BlockCompleteMessage - -UpdateBlockDtoMessagesItem = typing.Union[BlockStartMessage, BlockCompleteMessage] diff --git a/src/vapi/blocks/types/update_block_dto_steps_item.py b/src/vapi/blocks/types/update_block_dto_steps_item.py deleted file mode 100644 index bdbeb334..00000000 --- a/src/vapi/blocks/types/update_block_dto_steps_item.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from ...types.handoff_step import HandoffStep -from ...types.callback_step import CallbackStep - -UpdateBlockDtoStepsItem = typing.Union[HandoffStep, CallbackStep] diff --git a/src/vapi/blocks/types/update_block_dto_tool.py b/src/vapi/blocks/types/update_block_dto_tool.py deleted file mode 100644 index 3701d93d..00000000 --- a/src/vapi/blocks/types/update_block_dto_tool.py +++ /dev/null @@ -1,20 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from ...types.create_dtmf_tool_dto import CreateDtmfToolDto -from ...types.create_end_call_tool_dto import CreateEndCallToolDto -from ...types.create_voicemail_tool_dto import CreateVoicemailToolDto -from ...types.create_function_tool_dto import CreateFunctionToolDto -from ...types.create_ghl_tool_dto import CreateGhlToolDto -from ...types.create_make_tool_dto import CreateMakeToolDto -from ...types.create_transfer_call_tool_dto import CreateTransferCallToolDto - -UpdateBlockDtoTool = typing.Union[ - CreateDtmfToolDto, - CreateEndCallToolDto, - CreateVoicemailToolDto, - CreateFunctionToolDto, - CreateGhlToolDto, - CreateMakeToolDto, - CreateTransferCallToolDto, -] diff --git a/src/vapi/calls/__init__.py b/src/vapi/calls/__init__.py index f3ea2659..d6a631c9 100644 --- a/src/vapi/calls/__init__.py +++ b/src/vapi/calls/__init__.py @@ -1,2 +1,34 @@ # This file was auto-generated by Fern from our API Definition. +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import CreateCallsResponse +_dynamic_imports: typing.Dict[str, str] = {"CreateCallsResponse": ".types"} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = ["CreateCallsResponse"] diff --git a/src/vapi/calls/client.py b/src/vapi/calls/client.py index 5328d823..187aa41c 100644 --- a/src/vapi/calls/client.py +++ b/src/vapi/calls/client.py @@ -1,22 +1,21 @@ # This file was auto-generated by Fern from our API Definition. -import typing -from ..core.client_wrapper import SyncClientWrapper import datetime as dt +import typing + +from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ..core.request_options import RequestOptions +from ..types.assistant_overrides import AssistantOverrides from ..types.call import Call -from ..core.datetime_utils import serialize_datetime -from ..core.pydantic_utilities import parse_obj_as -from json.decoder import JSONDecodeError -from ..core.api_error import ApiError from ..types.create_assistant_dto import CreateAssistantDto -from ..types.assistant_overrides import AssistantOverrides +from ..types.create_customer_dto import CreateCustomerDto from ..types.create_squad_dto import CreateSquadDto +from ..types.create_workflow_dto import CreateWorkflowDto from ..types.import_twilio_phone_number_dto import ImportTwilioPhoneNumberDto -from ..types.create_customer_dto import CreateCustomerDto -from ..core.serialization import convert_and_respect_annotation_metadata -from ..core.jsonable_encoder import jsonable_encoder -from ..core.client_wrapper import AsyncClientWrapper +from ..types.schedule_plan import SchedulePlan +from ..types.workflow_overrides import WorkflowOverrides +from .raw_client import AsyncRawCallsClient, RawCallsClient +from .types.create_calls_response import CreateCallsResponse # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -24,12 +23,25 @@ class CallsClient: def __init__(self, *, client_wrapper: SyncClientWrapper): - self._client_wrapper = client_wrapper + self._raw_client = RawCallsClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawCallsClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawCallsClient + """ + return self._raw_client def list( self, *, + id: typing.Optional[str] = None, assistant_id: typing.Optional[str] = None, + phone_number_id: typing.Optional[str] = None, limit: typing.Optional[float] = None, created_at_gt: typing.Optional[dt.datetime] = None, created_at_lt: typing.Optional[dt.datetime] = None, @@ -44,9 +56,17 @@ def list( """ Parameters ---------- + id : typing.Optional[str] + This is the unique identifier for the call. + assistant_id : typing.Optional[str] This will return calls with the specified assistantId. + phone_number_id : typing.Optional[str] + This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead. + + Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type. + limit : typing.Optional[float] This is the maximum number of items to return. Defaults to 100. @@ -91,73 +111,120 @@ def list( ) client.calls.list() """ - _response = self._client_wrapper.httpx_client.request( - "call", - method="GET", - params={ - "assistantId": assistant_id, - "limit": limit, - "createdAtGt": serialize_datetime(created_at_gt) if created_at_gt is not None else None, - "createdAtLt": serialize_datetime(created_at_lt) if created_at_lt is not None else None, - "createdAtGe": serialize_datetime(created_at_ge) if created_at_ge is not None else None, - "createdAtLe": serialize_datetime(created_at_le) if created_at_le is not None else None, - "updatedAtGt": serialize_datetime(updated_at_gt) if updated_at_gt is not None else None, - "updatedAtLt": serialize_datetime(updated_at_lt) if updated_at_lt is not None else None, - "updatedAtGe": serialize_datetime(updated_at_ge) if updated_at_ge is not None else None, - "updatedAtLe": serialize_datetime(updated_at_le) if updated_at_le is not None else None, - }, + _response = self._raw_client.list( + id=id, + assistant_id=assistant_id, + phone_number_id=phone_number_id, + limit=limit, + created_at_gt=created_at_gt, + created_at_lt=created_at_lt, + created_at_ge=created_at_ge, + created_at_le=created_at_le, + updated_at_gt=updated_at_gt, + updated_at_lt=updated_at_lt, + updated_at_ge=updated_at_ge, + updated_at_le=updated_at_le, request_options=request_options, ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - typing.List[Call], - parse_obj_as( - type_=typing.List[Call], # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + return _response.data def create( self, *, + customers: typing.Optional[typing.Sequence[CreateCustomerDto]] = OMIT, name: typing.Optional[str] = OMIT, + schedule_plan: typing.Optional[SchedulePlan] = OMIT, + transport: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, assistant_id: typing.Optional[str] = OMIT, assistant: typing.Optional[CreateAssistantDto] = OMIT, assistant_overrides: typing.Optional[AssistantOverrides] = OMIT, squad_id: typing.Optional[str] = OMIT, squad: typing.Optional[CreateSquadDto] = OMIT, + squad_overrides: typing.Optional[AssistantOverrides] = OMIT, + workflow_id: typing.Optional[str] = OMIT, + workflow: typing.Optional[CreateWorkflowDto] = OMIT, + workflow_overrides: typing.Optional[WorkflowOverrides] = OMIT, phone_number_id: typing.Optional[str] = OMIT, phone_number: typing.Optional[ImportTwilioPhoneNumberDto] = OMIT, customer_id: typing.Optional[str] = OMIT, customer: typing.Optional[CreateCustomerDto] = OMIT, request_options: typing.Optional[RequestOptions] = None, - ) -> Call: + ) -> CreateCallsResponse: """ Parameters ---------- + customers : typing.Optional[typing.Sequence[CreateCustomerDto]] + This is used to issue batch calls to multiple customers. + + Only relevant for `outboundPhoneCall`. To call a single customer, use `customer` instead. + name : typing.Optional[str] This is the name of the call. This is just for your own reference. + schedule_plan : typing.Optional[SchedulePlan] + This is the schedule plan of the call. + + transport : typing.Optional[typing.Dict[str, typing.Any]] + This is the transport of the call. + assistant_id : typing.Optional[str] - This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead. + This is the assistant ID that will be used for the call. To use a transient assistant, use `assistant` instead. + + To start a call with: + - Assistant, use `assistantId` or `assistant` + - Squad, use `squadId` or `squad` + - Workflow, use `workflowId` or `workflow` assistant : typing.Optional[CreateAssistantDto] This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. + To start a call with: + - Assistant, use `assistant` + - Squad, use `squad` + - Workflow, use `workflow` + assistant_overrides : typing.Optional[AssistantOverrides] These are the overrides for the `assistant` or `assistantId`'s settings and template variables. squad_id : typing.Optional[str] This is the squad that will be used for the call. To use a transient squad, use `squad` instead. + To start a call with: + - Assistant, use `assistant` or `assistantId` + - Squad, use `squad` or `squadId` + - Workflow, use `workflow` or `workflowId` + squad : typing.Optional[CreateSquadDto] This is a squad that will be used for the call. To use an existing squad, use `squadId` instead. + To start a call with: + - Assistant, use `assistant` or `assistantId` + - Squad, use `squad` or `squadId` + - Workflow, use `workflow` or `workflowId` + + squad_overrides : typing.Optional[AssistantOverrides] + These are the overrides for the `squad` or `squadId`'s member settings and template variables. + This will apply to all members of the squad. + + workflow_id : typing.Optional[str] + This is the workflow that will be used for the call. To use a transient workflow, use `workflow` instead. + + To start a call with: + - Assistant, use `assistant` or `assistantId` + - Squad, use `squad` or `squadId` + - Workflow, use `workflow` or `workflowId` + + workflow : typing.Optional[CreateWorkflowDto] + This is a workflow that will be used for the call. To use an existing workflow, use `workflowId` instead. + + To start a call with: + - Assistant, use `assistant` or `assistantId` + - Squad, use `squad` or `squadId` + - Workflow, use `workflow` or `workflowId` + + workflow_overrides : typing.Optional[WorkflowOverrides] + These are the overrides for the `workflow` or `workflowId`'s settings and template variables. + phone_number_id : typing.Optional[str] This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead. @@ -183,7 +250,7 @@ def create( Returns ------- - Call + CreateCallsResponse Examples @@ -195,47 +262,27 @@ def create( ) client.calls.create() """ - _response = self._client_wrapper.httpx_client.request( - "call", - method="POST", - json={ - "name": name, - "assistantId": assistant_id, - "assistant": convert_and_respect_annotation_metadata( - object_=assistant, annotation=CreateAssistantDto, direction="write" - ), - "assistantOverrides": convert_and_respect_annotation_metadata( - object_=assistant_overrides, annotation=AssistantOverrides, direction="write" - ), - "squadId": squad_id, - "squad": convert_and_respect_annotation_metadata( - object_=squad, annotation=CreateSquadDto, direction="write" - ), - "phoneNumberId": phone_number_id, - "phoneNumber": convert_and_respect_annotation_metadata( - object_=phone_number, annotation=ImportTwilioPhoneNumberDto, direction="write" - ), - "customerId": customer_id, - "customer": convert_and_respect_annotation_metadata( - object_=customer, annotation=CreateCustomerDto, direction="write" - ), - }, + _response = self._raw_client.create( + customers=customers, + name=name, + schedule_plan=schedule_plan, + transport=transport, + assistant_id=assistant_id, + assistant=assistant, + assistant_overrides=assistant_overrides, + squad_id=squad_id, + squad=squad, + squad_overrides=squad_overrides, + workflow_id=workflow_id, + workflow=workflow, + workflow_overrides=workflow_overrides, + phone_number_id=phone_number_id, + phone_number=phone_number, + customer_id=customer_id, + customer=customer, request_options=request_options, - omit=OMIT, ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - Call, - parse_obj_as( - type_=Call, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + return _response.data def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Call: """ @@ -262,31 +309,27 @@ def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = Non id="id", ) """ - _response = self._client_wrapper.httpx_client.request( - f"call/{jsonable_encoder(id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - Call, - parse_obj_as( - type_=Call, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Call: + _response = self._raw_client.get(id, request_options=request_options) + return _response.data + + def delete( + self, + id: str, + *, + ids: typing.Optional[typing.Sequence[str]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> Call: """ Parameters ---------- id : str + ids : typing.Optional[typing.Sequence[str]] + These are the Call IDs to be bulk deleted. + If provided, the call ID if any in the request query will be ignored + When requesting a bulk delete, updates when a call is deleted will be sent as a webhook to the server URL configured in the Org settings. + It may take up to a few hours to complete the bulk delete, and will be asynchronous. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -306,24 +349,8 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = id="id", ) """ - _response = self._client_wrapper.httpx_client.request( - f"call/{jsonable_encoder(id)}", - method="DELETE", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - Call, - parse_obj_as( - type_=Call, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = self._raw_client.delete(id, ids=ids, request_options=request_options) + return _response.data def update( self, id: str, *, name: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None @@ -355,38 +382,31 @@ def update( id="id", ) """ - _response = self._client_wrapper.httpx_client.request( - f"call/{jsonable_encoder(id)}", - method="PATCH", - json={ - "name": name, - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - Call, - parse_obj_as( - type_=Call, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = self._raw_client.update(id, name=name, request_options=request_options) + return _response.data class AsyncCallsClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper + self._raw_client = AsyncRawCallsClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawCallsClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawCallsClient + """ + return self._raw_client async def list( self, *, + id: typing.Optional[str] = None, assistant_id: typing.Optional[str] = None, + phone_number_id: typing.Optional[str] = None, limit: typing.Optional[float] = None, created_at_gt: typing.Optional[dt.datetime] = None, created_at_lt: typing.Optional[dt.datetime] = None, @@ -401,9 +421,17 @@ async def list( """ Parameters ---------- + id : typing.Optional[str] + This is the unique identifier for the call. + assistant_id : typing.Optional[str] This will return calls with the specified assistantId. + phone_number_id : typing.Optional[str] + This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead. + + Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type. + limit : typing.Optional[float] This is the maximum number of items to return. Defaults to 100. @@ -456,73 +484,120 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - "call", - method="GET", - params={ - "assistantId": assistant_id, - "limit": limit, - "createdAtGt": serialize_datetime(created_at_gt) if created_at_gt is not None else None, - "createdAtLt": serialize_datetime(created_at_lt) if created_at_lt is not None else None, - "createdAtGe": serialize_datetime(created_at_ge) if created_at_ge is not None else None, - "createdAtLe": serialize_datetime(created_at_le) if created_at_le is not None else None, - "updatedAtGt": serialize_datetime(updated_at_gt) if updated_at_gt is not None else None, - "updatedAtLt": serialize_datetime(updated_at_lt) if updated_at_lt is not None else None, - "updatedAtGe": serialize_datetime(updated_at_ge) if updated_at_ge is not None else None, - "updatedAtLe": serialize_datetime(updated_at_le) if updated_at_le is not None else None, - }, + _response = await self._raw_client.list( + id=id, + assistant_id=assistant_id, + phone_number_id=phone_number_id, + limit=limit, + created_at_gt=created_at_gt, + created_at_lt=created_at_lt, + created_at_ge=created_at_ge, + created_at_le=created_at_le, + updated_at_gt=updated_at_gt, + updated_at_lt=updated_at_lt, + updated_at_ge=updated_at_ge, + updated_at_le=updated_at_le, request_options=request_options, ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - typing.List[Call], - parse_obj_as( - type_=typing.List[Call], # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + return _response.data async def create( self, *, + customers: typing.Optional[typing.Sequence[CreateCustomerDto]] = OMIT, name: typing.Optional[str] = OMIT, + schedule_plan: typing.Optional[SchedulePlan] = OMIT, + transport: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, assistant_id: typing.Optional[str] = OMIT, assistant: typing.Optional[CreateAssistantDto] = OMIT, assistant_overrides: typing.Optional[AssistantOverrides] = OMIT, squad_id: typing.Optional[str] = OMIT, squad: typing.Optional[CreateSquadDto] = OMIT, + squad_overrides: typing.Optional[AssistantOverrides] = OMIT, + workflow_id: typing.Optional[str] = OMIT, + workflow: typing.Optional[CreateWorkflowDto] = OMIT, + workflow_overrides: typing.Optional[WorkflowOverrides] = OMIT, phone_number_id: typing.Optional[str] = OMIT, phone_number: typing.Optional[ImportTwilioPhoneNumberDto] = OMIT, customer_id: typing.Optional[str] = OMIT, customer: typing.Optional[CreateCustomerDto] = OMIT, request_options: typing.Optional[RequestOptions] = None, - ) -> Call: + ) -> CreateCallsResponse: """ Parameters ---------- + customers : typing.Optional[typing.Sequence[CreateCustomerDto]] + This is used to issue batch calls to multiple customers. + + Only relevant for `outboundPhoneCall`. To call a single customer, use `customer` instead. + name : typing.Optional[str] This is the name of the call. This is just for your own reference. + schedule_plan : typing.Optional[SchedulePlan] + This is the schedule plan of the call. + + transport : typing.Optional[typing.Dict[str, typing.Any]] + This is the transport of the call. + assistant_id : typing.Optional[str] - This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead. + This is the assistant ID that will be used for the call. To use a transient assistant, use `assistant` instead. + + To start a call with: + - Assistant, use `assistantId` or `assistant` + - Squad, use `squadId` or `squad` + - Workflow, use `workflowId` or `workflow` assistant : typing.Optional[CreateAssistantDto] This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. + To start a call with: + - Assistant, use `assistant` + - Squad, use `squad` + - Workflow, use `workflow` + assistant_overrides : typing.Optional[AssistantOverrides] These are the overrides for the `assistant` or `assistantId`'s settings and template variables. squad_id : typing.Optional[str] This is the squad that will be used for the call. To use a transient squad, use `squad` instead. + To start a call with: + - Assistant, use `assistant` or `assistantId` + - Squad, use `squad` or `squadId` + - Workflow, use `workflow` or `workflowId` + squad : typing.Optional[CreateSquadDto] This is a squad that will be used for the call. To use an existing squad, use `squadId` instead. + To start a call with: + - Assistant, use `assistant` or `assistantId` + - Squad, use `squad` or `squadId` + - Workflow, use `workflow` or `workflowId` + + squad_overrides : typing.Optional[AssistantOverrides] + These are the overrides for the `squad` or `squadId`'s member settings and template variables. + This will apply to all members of the squad. + + workflow_id : typing.Optional[str] + This is the workflow that will be used for the call. To use a transient workflow, use `workflow` instead. + + To start a call with: + - Assistant, use `assistant` or `assistantId` + - Squad, use `squad` or `squadId` + - Workflow, use `workflow` or `workflowId` + + workflow : typing.Optional[CreateWorkflowDto] + This is a workflow that will be used for the call. To use an existing workflow, use `workflowId` instead. + + To start a call with: + - Assistant, use `assistant` or `assistantId` + - Squad, use `squad` or `squadId` + - Workflow, use `workflow` or `workflowId` + + workflow_overrides : typing.Optional[WorkflowOverrides] + These are the overrides for the `workflow` or `workflowId`'s settings and template variables. + phone_number_id : typing.Optional[str] This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead. @@ -548,7 +623,7 @@ async def create( Returns ------- - Call + CreateCallsResponse Examples @@ -568,47 +643,27 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - "call", - method="POST", - json={ - "name": name, - "assistantId": assistant_id, - "assistant": convert_and_respect_annotation_metadata( - object_=assistant, annotation=CreateAssistantDto, direction="write" - ), - "assistantOverrides": convert_and_respect_annotation_metadata( - object_=assistant_overrides, annotation=AssistantOverrides, direction="write" - ), - "squadId": squad_id, - "squad": convert_and_respect_annotation_metadata( - object_=squad, annotation=CreateSquadDto, direction="write" - ), - "phoneNumberId": phone_number_id, - "phoneNumber": convert_and_respect_annotation_metadata( - object_=phone_number, annotation=ImportTwilioPhoneNumberDto, direction="write" - ), - "customerId": customer_id, - "customer": convert_and_respect_annotation_metadata( - object_=customer, annotation=CreateCustomerDto, direction="write" - ), - }, + _response = await self._raw_client.create( + customers=customers, + name=name, + schedule_plan=schedule_plan, + transport=transport, + assistant_id=assistant_id, + assistant=assistant, + assistant_overrides=assistant_overrides, + squad_id=squad_id, + squad=squad, + squad_overrides=squad_overrides, + workflow_id=workflow_id, + workflow=workflow, + workflow_overrides=workflow_overrides, + phone_number_id=phone_number_id, + phone_number=phone_number, + customer_id=customer_id, + customer=customer, request_options=request_options, - omit=OMIT, ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - Call, - parse_obj_as( - type_=Call, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + return _response.data async def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Call: """ @@ -643,31 +698,27 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - f"call/{jsonable_encoder(id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - Call, - parse_obj_as( - type_=Call, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - async def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Call: + _response = await self._raw_client.get(id, request_options=request_options) + return _response.data + + async def delete( + self, + id: str, + *, + ids: typing.Optional[typing.Sequence[str]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> Call: """ Parameters ---------- id : str + ids : typing.Optional[typing.Sequence[str]] + These are the Call IDs to be bulk deleted. + If provided, the call ID if any in the request query will be ignored + When requesting a bulk delete, updates when a call is deleted will be sent as a webhook to the server URL configured in the Org settings. + It may take up to a few hours to complete the bulk delete, and will be asynchronous. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -695,24 +746,8 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - f"call/{jsonable_encoder(id)}", - method="DELETE", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - Call, - parse_obj_as( - type_=Call, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = await self._raw_client.delete(id, ids=ids, request_options=request_options) + return _response.data async def update( self, id: str, *, name: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None @@ -752,25 +787,5 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - f"call/{jsonable_encoder(id)}", - method="PATCH", - json={ - "name": name, - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - Call, - parse_obj_as( - type_=Call, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = await self._raw_client.update(id, name=name, request_options=request_options) + return _response.data diff --git a/src/vapi/calls/raw_client.py b/src/vapi/calls/raw_client.py new file mode 100644 index 00000000..e3e58891 --- /dev/null +++ b/src/vapi/calls/raw_client.py @@ -0,0 +1,921 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing +from json.decoder import JSONDecodeError + +from ..core.api_error import ApiError +from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.datetime_utils import serialize_datetime +from ..core.http_response import AsyncHttpResponse, HttpResponse +from ..core.jsonable_encoder import jsonable_encoder +from ..core.parse_error import ParsingError +from ..core.request_options import RequestOptions +from ..core.serialization import convert_and_respect_annotation_metadata +from ..core.unchecked_base_model import construct_type +from ..types.assistant_overrides import AssistantOverrides +from ..types.call import Call +from ..types.create_assistant_dto import CreateAssistantDto +from ..types.create_customer_dto import CreateCustomerDto +from ..types.create_squad_dto import CreateSquadDto +from ..types.create_workflow_dto import CreateWorkflowDto +from ..types.import_twilio_phone_number_dto import ImportTwilioPhoneNumberDto +from ..types.schedule_plan import SchedulePlan +from ..types.workflow_overrides import WorkflowOverrides +from .types.create_calls_response import CreateCallsResponse +from pydantic import ValidationError + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class RawCallsClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def list( + self, + *, + id: typing.Optional[str] = None, + assistant_id: typing.Optional[str] = None, + phone_number_id: typing.Optional[str] = None, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[typing.List[Call]]: + """ + Parameters + ---------- + id : typing.Optional[str] + This is the unique identifier for the call. + + assistant_id : typing.Optional[str] + This will return calls with the specified assistantId. + + phone_number_id : typing.Optional[str] + This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead. + + Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type. + + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[typing.List[Call]] + + """ + _response = self._client_wrapper.httpx_client.request( + "call", + method="GET", + params={ + "id": id, + "assistantId": assistant_id, + "phoneNumberId": phone_number_id, + "limit": limit, + "createdAtGt": serialize_datetime(created_at_gt) if created_at_gt is not None else None, + "createdAtLt": serialize_datetime(created_at_lt) if created_at_lt is not None else None, + "createdAtGe": serialize_datetime(created_at_ge) if created_at_ge is not None else None, + "createdAtLe": serialize_datetime(created_at_le) if created_at_le is not None else None, + "updatedAtGt": serialize_datetime(updated_at_gt) if updated_at_gt is not None else None, + "updatedAtLt": serialize_datetime(updated_at_lt) if updated_at_lt is not None else None, + "updatedAtGe": serialize_datetime(updated_at_ge) if updated_at_ge is not None else None, + "updatedAtLe": serialize_datetime(updated_at_le) if updated_at_le is not None else None, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.List[Call], + construct_type( + type_=typing.List[Call], # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def create( + self, + *, + customers: typing.Optional[typing.Sequence[CreateCustomerDto]] = OMIT, + name: typing.Optional[str] = OMIT, + schedule_plan: typing.Optional[SchedulePlan] = OMIT, + transport: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, + assistant_id: typing.Optional[str] = OMIT, + assistant: typing.Optional[CreateAssistantDto] = OMIT, + assistant_overrides: typing.Optional[AssistantOverrides] = OMIT, + squad_id: typing.Optional[str] = OMIT, + squad: typing.Optional[CreateSquadDto] = OMIT, + squad_overrides: typing.Optional[AssistantOverrides] = OMIT, + workflow_id: typing.Optional[str] = OMIT, + workflow: typing.Optional[CreateWorkflowDto] = OMIT, + workflow_overrides: typing.Optional[WorkflowOverrides] = OMIT, + phone_number_id: typing.Optional[str] = OMIT, + phone_number: typing.Optional[ImportTwilioPhoneNumberDto] = OMIT, + customer_id: typing.Optional[str] = OMIT, + customer: typing.Optional[CreateCustomerDto] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[CreateCallsResponse]: + """ + Parameters + ---------- + customers : typing.Optional[typing.Sequence[CreateCustomerDto]] + This is used to issue batch calls to multiple customers. + + Only relevant for `outboundPhoneCall`. To call a single customer, use `customer` instead. + + name : typing.Optional[str] + This is the name of the call. This is just for your own reference. + + schedule_plan : typing.Optional[SchedulePlan] + This is the schedule plan of the call. + + transport : typing.Optional[typing.Dict[str, typing.Any]] + This is the transport of the call. + + assistant_id : typing.Optional[str] + This is the assistant ID that will be used for the call. To use a transient assistant, use `assistant` instead. + + To start a call with: + - Assistant, use `assistantId` or `assistant` + - Squad, use `squadId` or `squad` + - Workflow, use `workflowId` or `workflow` + + assistant : typing.Optional[CreateAssistantDto] + This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. + + To start a call with: + - Assistant, use `assistant` + - Squad, use `squad` + - Workflow, use `workflow` + + assistant_overrides : typing.Optional[AssistantOverrides] + These are the overrides for the `assistant` or `assistantId`'s settings and template variables. + + squad_id : typing.Optional[str] + This is the squad that will be used for the call. To use a transient squad, use `squad` instead. + + To start a call with: + - Assistant, use `assistant` or `assistantId` + - Squad, use `squad` or `squadId` + - Workflow, use `workflow` or `workflowId` + + squad : typing.Optional[CreateSquadDto] + This is a squad that will be used for the call. To use an existing squad, use `squadId` instead. + + To start a call with: + - Assistant, use `assistant` or `assistantId` + - Squad, use `squad` or `squadId` + - Workflow, use `workflow` or `workflowId` + + squad_overrides : typing.Optional[AssistantOverrides] + These are the overrides for the `squad` or `squadId`'s member settings and template variables. + This will apply to all members of the squad. + + workflow_id : typing.Optional[str] + This is the workflow that will be used for the call. To use a transient workflow, use `workflow` instead. + + To start a call with: + - Assistant, use `assistant` or `assistantId` + - Squad, use `squad` or `squadId` + - Workflow, use `workflow` or `workflowId` + + workflow : typing.Optional[CreateWorkflowDto] + This is a workflow that will be used for the call. To use an existing workflow, use `workflowId` instead. + + To start a call with: + - Assistant, use `assistant` or `assistantId` + - Squad, use `squad` or `squadId` + - Workflow, use `workflow` or `workflowId` + + workflow_overrides : typing.Optional[WorkflowOverrides] + These are the overrides for the `workflow` or `workflowId`'s settings and template variables. + + phone_number_id : typing.Optional[str] + This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead. + + Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type. + + phone_number : typing.Optional[ImportTwilioPhoneNumberDto] + This is the phone number that will be used for the call. To use an existing number, use `phoneNumberId` instead. + + Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type. + + customer_id : typing.Optional[str] + This is the customer that will be called. To call a transient customer , use `customer` instead. + + Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type. + + customer : typing.Optional[CreateCustomerDto] + This is the customer that will be called. To call an existing customer, use `customerId` instead. + + Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[CreateCallsResponse] + + """ + _response = self._client_wrapper.httpx_client.request( + "call", + method="POST", + json={ + "customers": convert_and_respect_annotation_metadata( + object_=customers, annotation=typing.Sequence[CreateCustomerDto], direction="write" + ), + "name": name, + "schedulePlan": convert_and_respect_annotation_metadata( + object_=schedule_plan, annotation=SchedulePlan, direction="write" + ), + "transport": transport, + "assistantId": assistant_id, + "assistant": convert_and_respect_annotation_metadata( + object_=assistant, annotation=CreateAssistantDto, direction="write" + ), + "assistantOverrides": convert_and_respect_annotation_metadata( + object_=assistant_overrides, annotation=AssistantOverrides, direction="write" + ), + "squadId": squad_id, + "squad": convert_and_respect_annotation_metadata( + object_=squad, annotation=CreateSquadDto, direction="write" + ), + "squadOverrides": convert_and_respect_annotation_metadata( + object_=squad_overrides, annotation=AssistantOverrides, direction="write" + ), + "workflowId": workflow_id, + "workflow": convert_and_respect_annotation_metadata( + object_=workflow, annotation=CreateWorkflowDto, direction="write" + ), + "workflowOverrides": convert_and_respect_annotation_metadata( + object_=workflow_overrides, annotation=WorkflowOverrides, direction="write" + ), + "phoneNumberId": phone_number_id, + "phoneNumber": convert_and_respect_annotation_metadata( + object_=phone_number, annotation=ImportTwilioPhoneNumberDto, direction="write" + ), + "customerId": customer_id, + "customer": convert_and_respect_annotation_metadata( + object_=customer, annotation=CreateCustomerDto, direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + CreateCallsResponse, + construct_type( + type_=CreateCallsResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[Call]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[Call] + + """ + _response = self._client_wrapper.httpx_client.request( + f"call/{jsonable_encoder(id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Call, + construct_type( + type_=Call, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def delete( + self, + id: str, + *, + ids: typing.Optional[typing.Sequence[str]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[Call]: + """ + Parameters + ---------- + id : str + + ids : typing.Optional[typing.Sequence[str]] + These are the Call IDs to be bulk deleted. + If provided, the call ID if any in the request query will be ignored + When requesting a bulk delete, updates when a call is deleted will be sent as a webhook to the server URL configured in the Org settings. + It may take up to a few hours to complete the bulk delete, and will be asynchronous. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[Call] + + """ + _response = self._client_wrapper.httpx_client.request( + f"call/{jsonable_encoder(id)}", + method="DELETE", + json={ + "ids": ids, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Call, + construct_type( + type_=Call, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def update( + self, id: str, *, name: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[Call]: + """ + Parameters + ---------- + id : str + + name : typing.Optional[str] + This is the name of the call. This is just for your own reference. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[Call] + + """ + _response = self._client_wrapper.httpx_client.request( + f"call/{jsonable_encoder(id)}", + method="PATCH", + json={ + "name": name, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Call, + construct_type( + type_=Call, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawCallsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def list( + self, + *, + id: typing.Optional[str] = None, + assistant_id: typing.Optional[str] = None, + phone_number_id: typing.Optional[str] = None, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[typing.List[Call]]: + """ + Parameters + ---------- + id : typing.Optional[str] + This is the unique identifier for the call. + + assistant_id : typing.Optional[str] + This will return calls with the specified assistantId. + + phone_number_id : typing.Optional[str] + This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead. + + Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type. + + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[typing.List[Call]] + + """ + _response = await self._client_wrapper.httpx_client.request( + "call", + method="GET", + params={ + "id": id, + "assistantId": assistant_id, + "phoneNumberId": phone_number_id, + "limit": limit, + "createdAtGt": serialize_datetime(created_at_gt) if created_at_gt is not None else None, + "createdAtLt": serialize_datetime(created_at_lt) if created_at_lt is not None else None, + "createdAtGe": serialize_datetime(created_at_ge) if created_at_ge is not None else None, + "createdAtLe": serialize_datetime(created_at_le) if created_at_le is not None else None, + "updatedAtGt": serialize_datetime(updated_at_gt) if updated_at_gt is not None else None, + "updatedAtLt": serialize_datetime(updated_at_lt) if updated_at_lt is not None else None, + "updatedAtGe": serialize_datetime(updated_at_ge) if updated_at_ge is not None else None, + "updatedAtLe": serialize_datetime(updated_at_le) if updated_at_le is not None else None, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.List[Call], + construct_type( + type_=typing.List[Call], # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def create( + self, + *, + customers: typing.Optional[typing.Sequence[CreateCustomerDto]] = OMIT, + name: typing.Optional[str] = OMIT, + schedule_plan: typing.Optional[SchedulePlan] = OMIT, + transport: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, + assistant_id: typing.Optional[str] = OMIT, + assistant: typing.Optional[CreateAssistantDto] = OMIT, + assistant_overrides: typing.Optional[AssistantOverrides] = OMIT, + squad_id: typing.Optional[str] = OMIT, + squad: typing.Optional[CreateSquadDto] = OMIT, + squad_overrides: typing.Optional[AssistantOverrides] = OMIT, + workflow_id: typing.Optional[str] = OMIT, + workflow: typing.Optional[CreateWorkflowDto] = OMIT, + workflow_overrides: typing.Optional[WorkflowOverrides] = OMIT, + phone_number_id: typing.Optional[str] = OMIT, + phone_number: typing.Optional[ImportTwilioPhoneNumberDto] = OMIT, + customer_id: typing.Optional[str] = OMIT, + customer: typing.Optional[CreateCustomerDto] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[CreateCallsResponse]: + """ + Parameters + ---------- + customers : typing.Optional[typing.Sequence[CreateCustomerDto]] + This is used to issue batch calls to multiple customers. + + Only relevant for `outboundPhoneCall`. To call a single customer, use `customer` instead. + + name : typing.Optional[str] + This is the name of the call. This is just for your own reference. + + schedule_plan : typing.Optional[SchedulePlan] + This is the schedule plan of the call. + + transport : typing.Optional[typing.Dict[str, typing.Any]] + This is the transport of the call. + + assistant_id : typing.Optional[str] + This is the assistant ID that will be used for the call. To use a transient assistant, use `assistant` instead. + + To start a call with: + - Assistant, use `assistantId` or `assistant` + - Squad, use `squadId` or `squad` + - Workflow, use `workflowId` or `workflow` + + assistant : typing.Optional[CreateAssistantDto] + This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. + + To start a call with: + - Assistant, use `assistant` + - Squad, use `squad` + - Workflow, use `workflow` + + assistant_overrides : typing.Optional[AssistantOverrides] + These are the overrides for the `assistant` or `assistantId`'s settings and template variables. + + squad_id : typing.Optional[str] + This is the squad that will be used for the call. To use a transient squad, use `squad` instead. + + To start a call with: + - Assistant, use `assistant` or `assistantId` + - Squad, use `squad` or `squadId` + - Workflow, use `workflow` or `workflowId` + + squad : typing.Optional[CreateSquadDto] + This is a squad that will be used for the call. To use an existing squad, use `squadId` instead. + + To start a call with: + - Assistant, use `assistant` or `assistantId` + - Squad, use `squad` or `squadId` + - Workflow, use `workflow` or `workflowId` + + squad_overrides : typing.Optional[AssistantOverrides] + These are the overrides for the `squad` or `squadId`'s member settings and template variables. + This will apply to all members of the squad. + + workflow_id : typing.Optional[str] + This is the workflow that will be used for the call. To use a transient workflow, use `workflow` instead. + + To start a call with: + - Assistant, use `assistant` or `assistantId` + - Squad, use `squad` or `squadId` + - Workflow, use `workflow` or `workflowId` + + workflow : typing.Optional[CreateWorkflowDto] + This is a workflow that will be used for the call. To use an existing workflow, use `workflowId` instead. + + To start a call with: + - Assistant, use `assistant` or `assistantId` + - Squad, use `squad` or `squadId` + - Workflow, use `workflow` or `workflowId` + + workflow_overrides : typing.Optional[WorkflowOverrides] + These are the overrides for the `workflow` or `workflowId`'s settings and template variables. + + phone_number_id : typing.Optional[str] + This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead. + + Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type. + + phone_number : typing.Optional[ImportTwilioPhoneNumberDto] + This is the phone number that will be used for the call. To use an existing number, use `phoneNumberId` instead. + + Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type. + + customer_id : typing.Optional[str] + This is the customer that will be called. To call a transient customer , use `customer` instead. + + Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type. + + customer : typing.Optional[CreateCustomerDto] + This is the customer that will be called. To call an existing customer, use `customerId` instead. + + Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[CreateCallsResponse] + + """ + _response = await self._client_wrapper.httpx_client.request( + "call", + method="POST", + json={ + "customers": convert_and_respect_annotation_metadata( + object_=customers, annotation=typing.Sequence[CreateCustomerDto], direction="write" + ), + "name": name, + "schedulePlan": convert_and_respect_annotation_metadata( + object_=schedule_plan, annotation=SchedulePlan, direction="write" + ), + "transport": transport, + "assistantId": assistant_id, + "assistant": convert_and_respect_annotation_metadata( + object_=assistant, annotation=CreateAssistantDto, direction="write" + ), + "assistantOverrides": convert_and_respect_annotation_metadata( + object_=assistant_overrides, annotation=AssistantOverrides, direction="write" + ), + "squadId": squad_id, + "squad": convert_and_respect_annotation_metadata( + object_=squad, annotation=CreateSquadDto, direction="write" + ), + "squadOverrides": convert_and_respect_annotation_metadata( + object_=squad_overrides, annotation=AssistantOverrides, direction="write" + ), + "workflowId": workflow_id, + "workflow": convert_and_respect_annotation_metadata( + object_=workflow, annotation=CreateWorkflowDto, direction="write" + ), + "workflowOverrides": convert_and_respect_annotation_metadata( + object_=workflow_overrides, annotation=WorkflowOverrides, direction="write" + ), + "phoneNumberId": phone_number_id, + "phoneNumber": convert_and_respect_annotation_metadata( + object_=phone_number, annotation=ImportTwilioPhoneNumberDto, direction="write" + ), + "customerId": customer_id, + "customer": convert_and_respect_annotation_metadata( + object_=customer, annotation=CreateCustomerDto, direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + CreateCallsResponse, + construct_type( + type_=CreateCallsResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> AsyncHttpResponse[Call]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[Call] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"call/{jsonable_encoder(id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Call, + construct_type( + type_=Call, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def delete( + self, + id: str, + *, + ids: typing.Optional[typing.Sequence[str]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[Call]: + """ + Parameters + ---------- + id : str + + ids : typing.Optional[typing.Sequence[str]] + These are the Call IDs to be bulk deleted. + If provided, the call ID if any in the request query will be ignored + When requesting a bulk delete, updates when a call is deleted will be sent as a webhook to the server URL configured in the Org settings. + It may take up to a few hours to complete the bulk delete, and will be asynchronous. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[Call] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"call/{jsonable_encoder(id)}", + method="DELETE", + json={ + "ids": ids, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Call, + construct_type( + type_=Call, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def update( + self, id: str, *, name: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[Call]: + """ + Parameters + ---------- + id : str + + name : typing.Optional[str] + This is the name of the call. This is just for your own reference. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[Call] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"call/{jsonable_encoder(id)}", + method="PATCH", + json={ + "name": name, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Call, + construct_type( + type_=Call, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/vapi/calls/types/__init__.py b/src/vapi/calls/types/__init__.py new file mode 100644 index 00000000..73c149f9 --- /dev/null +++ b/src/vapi/calls/types/__init__.py @@ -0,0 +1,34 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .create_calls_response import CreateCallsResponse +_dynamic_imports: typing.Dict[str, str] = {"CreateCallsResponse": ".create_calls_response"} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = ["CreateCallsResponse"] diff --git a/src/vapi/calls/types/create_calls_response.py b/src/vapi/calls/types/create_calls_response.py new file mode 100644 index 00000000..51d80a24 --- /dev/null +++ b/src/vapi/calls/types/create_calls_response.py @@ -0,0 +1,8 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from ...types.call import Call +from ...types.call_batch_response import CallBatchResponse + +CreateCallsResponse = typing.Union[Call, CallBatchResponse] diff --git a/src/vapi/campaigns/__init__.py b/src/vapi/campaigns/__init__.py new file mode 100644 index 00000000..81f668f7 --- /dev/null +++ b/src/vapi/campaigns/__init__.py @@ -0,0 +1,46 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ( + CampaignControllerFindAllRequestSortOrder, + CampaignControllerFindAllRequestStatus, + UpdateCampaignDtoStatus, + ) +_dynamic_imports: typing.Dict[str, str] = { + "CampaignControllerFindAllRequestSortOrder": ".types", + "CampaignControllerFindAllRequestStatus": ".types", + "UpdateCampaignDtoStatus": ".types", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = [ + "CampaignControllerFindAllRequestSortOrder", + "CampaignControllerFindAllRequestStatus", + "UpdateCampaignDtoStatus", +] diff --git a/src/vapi/campaigns/client.py b/src/vapi/campaigns/client.py new file mode 100644 index 00000000..2d3527fd --- /dev/null +++ b/src/vapi/campaigns/client.py @@ -0,0 +1,709 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.request_options import RequestOptions +from ..types.campaign import Campaign +from ..types.campaign_paginated_response import CampaignPaginatedResponse +from ..types.create_customer_dto import CreateCustomerDto +from ..types.dial_plan_entry import DialPlanEntry +from ..types.schedule_plan import SchedulePlan +from .raw_client import AsyncRawCampaignsClient, RawCampaignsClient +from .types.campaign_controller_find_all_request_sort_order import CampaignControllerFindAllRequestSortOrder +from .types.campaign_controller_find_all_request_status import CampaignControllerFindAllRequestStatus +from .types.update_campaign_dto_status import UpdateCampaignDtoStatus + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class CampaignsClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawCampaignsClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawCampaignsClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawCampaignsClient + """ + return self._raw_client + + def campaign_controller_find_all( + self, + *, + id: typing.Optional[str] = None, + status: typing.Optional[CampaignControllerFindAllRequestStatus] = None, + page: typing.Optional[float] = None, + sort_order: typing.Optional[CampaignControllerFindAllRequestSortOrder] = None, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> CampaignPaginatedResponse: + """ + Parameters + ---------- + id : typing.Optional[str] + + status : typing.Optional[CampaignControllerFindAllRequestStatus] + + page : typing.Optional[float] + This is the page number to return. Defaults to 1. + + sort_order : typing.Optional[CampaignControllerFindAllRequestSortOrder] + This is the sort order for pagination. Defaults to 'DESC'. + + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + CampaignPaginatedResponse + + + Examples + -------- + from vapi import Vapi + + client = Vapi( + token="YOUR_TOKEN", + ) + client.campaigns.campaign_controller_find_all() + """ + _response = self._raw_client.campaign_controller_find_all( + id=id, + status=status, + page=page, + sort_order=sort_order, + limit=limit, + created_at_gt=created_at_gt, + created_at_lt=created_at_lt, + created_at_ge=created_at_ge, + created_at_le=created_at_le, + updated_at_gt=updated_at_gt, + updated_at_lt=updated_at_lt, + updated_at_ge=updated_at_ge, + updated_at_le=updated_at_le, + request_options=request_options, + ) + return _response.data + + def campaign_controller_create( + self, + *, + name: str, + assistant_id: typing.Optional[str] = OMIT, + workflow_id: typing.Optional[str] = OMIT, + squad_id: typing.Optional[str] = OMIT, + phone_number_id: typing.Optional[str] = OMIT, + dial_plan: typing.Optional[typing.Sequence[DialPlanEntry]] = OMIT, + schedule_plan: typing.Optional[SchedulePlan] = OMIT, + customers: typing.Optional[typing.Sequence[CreateCustomerDto]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> Campaign: + """ + Parameters + ---------- + name : str + This is the name of the campaign. This is just for your own reference. + + assistant_id : typing.Optional[str] + This is the assistant ID that will be used for the campaign calls. Note: Only one of assistantId, workflowId, or squadId can be used. + + workflow_id : typing.Optional[str] + This is the workflow ID that will be used for the campaign calls. Note: Only one of assistantId, workflowId, or squadId can be used. + + squad_id : typing.Optional[str] + This is the squad ID that will be used for the campaign calls. Note: Only one of assistantId, workflowId, or squadId can be used. + + phone_number_id : typing.Optional[str] + This is the phone number ID that will be used for the campaign calls. Required if dialPlan is not provided. Note: phoneNumberId and dialPlan are mutually exclusive. + + dial_plan : typing.Optional[typing.Sequence[DialPlanEntry]] + This is a list of dial entries, each specifying a phone number and the customers to call using that number. Use this when you want different phone numbers to call different sets of customers. Note: phoneNumberId and dialPlan are mutually exclusive. + + schedule_plan : typing.Optional[SchedulePlan] + This is the schedule plan for the campaign. Calls will start at startedAt and continue until your organization’s concurrency limit is reached. Any remaining calls will be retried for up to one hour as capacity becomes available. After that hour or after latestAt, whichever comes first, any calls that couldn’t be placed won’t be retried. + + customers : typing.Optional[typing.Sequence[CreateCustomerDto]] + These are the customers that will be called in the campaign. Required if dialPlan is not provided. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Campaign + + + Examples + -------- + from vapi import Vapi + + client = Vapi( + token="YOUR_TOKEN", + ) + client.campaigns.campaign_controller_create( + name="Q2 Sales Campaign", + ) + """ + _response = self._raw_client.campaign_controller_create( + name=name, + assistant_id=assistant_id, + workflow_id=workflow_id, + squad_id=squad_id, + phone_number_id=phone_number_id, + dial_plan=dial_plan, + schedule_plan=schedule_plan, + customers=customers, + request_options=request_options, + ) + return _response.data + + def campaign_controller_find_one( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> Campaign: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Campaign + + + Examples + -------- + from vapi import Vapi + + client = Vapi( + token="YOUR_TOKEN", + ) + client.campaigns.campaign_controller_find_one( + id="id", + ) + """ + _response = self._raw_client.campaign_controller_find_one(id, request_options=request_options) + return _response.data + + def campaign_controller_remove( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> Campaign: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Campaign + + + Examples + -------- + from vapi import Vapi + + client = Vapi( + token="YOUR_TOKEN", + ) + client.campaigns.campaign_controller_remove( + id="id", + ) + """ + _response = self._raw_client.campaign_controller_remove(id, request_options=request_options) + return _response.data + + def campaign_controller_update( + self, + id: str, + *, + name: typing.Optional[str] = OMIT, + assistant_id: typing.Optional[str] = OMIT, + workflow_id: typing.Optional[str] = OMIT, + squad_id: typing.Optional[str] = OMIT, + phone_number_id: typing.Optional[str] = OMIT, + dial_plan: typing.Optional[typing.Sequence[DialPlanEntry]] = OMIT, + schedule_plan: typing.Optional[SchedulePlan] = OMIT, + status: typing.Optional[UpdateCampaignDtoStatus] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> Campaign: + """ + Parameters + ---------- + id : str + + name : typing.Optional[str] + This is the name of the campaign. This is just for your own reference. + + assistant_id : typing.Optional[str] + This is the assistant ID that will be used for the campaign calls. + Can only be updated if campaign is not in progress or has ended. + + workflow_id : typing.Optional[str] + This is the workflow ID that will be used for the campaign calls. + Can only be updated if campaign is not in progress or has ended. + + squad_id : typing.Optional[str] + This is the squad ID that will be used for the campaign calls. + Can only be updated if campaign is not in progress or has ended. + + phone_number_id : typing.Optional[str] + This is the phone number ID that will be used for the campaign calls. + Can only be updated if campaign is not in progress or has ended. + Note: `phoneNumberId` and `dialPlan` are mutually exclusive. + + dial_plan : typing.Optional[typing.Sequence[DialPlanEntry]] + This is a list of dial entries, each specifying a phone number and the customers to call using that number. Can only be updated if campaign is not in progress or has ended. Note: phoneNumberId and dialPlan are mutually exclusive. + + schedule_plan : typing.Optional[SchedulePlan] + This is the schedule plan for the campaign. + Can only be updated if campaign is not in progress or has ended. + + status : typing.Optional[UpdateCampaignDtoStatus] + This is the status of the campaign. + Can only be updated to 'ended' if you want to end the campaign. + When set to 'ended', it will delete all scheduled calls. Calls in progress will be allowed to complete. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Campaign + + + Examples + -------- + from vapi import Vapi + + client = Vapi( + token="YOUR_TOKEN", + ) + client.campaigns.campaign_controller_update( + id="id", + ) + """ + _response = self._raw_client.campaign_controller_update( + id, + name=name, + assistant_id=assistant_id, + workflow_id=workflow_id, + squad_id=squad_id, + phone_number_id=phone_number_id, + dial_plan=dial_plan, + schedule_plan=schedule_plan, + status=status, + request_options=request_options, + ) + return _response.data + + +class AsyncCampaignsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawCampaignsClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawCampaignsClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawCampaignsClient + """ + return self._raw_client + + async def campaign_controller_find_all( + self, + *, + id: typing.Optional[str] = None, + status: typing.Optional[CampaignControllerFindAllRequestStatus] = None, + page: typing.Optional[float] = None, + sort_order: typing.Optional[CampaignControllerFindAllRequestSortOrder] = None, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> CampaignPaginatedResponse: + """ + Parameters + ---------- + id : typing.Optional[str] + + status : typing.Optional[CampaignControllerFindAllRequestStatus] + + page : typing.Optional[float] + This is the page number to return. Defaults to 1. + + sort_order : typing.Optional[CampaignControllerFindAllRequestSortOrder] + This is the sort order for pagination. Defaults to 'DESC'. + + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + CampaignPaginatedResponse + + + Examples + -------- + import asyncio + + from vapi import AsyncVapi + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.campaigns.campaign_controller_find_all() + + + asyncio.run(main()) + """ + _response = await self._raw_client.campaign_controller_find_all( + id=id, + status=status, + page=page, + sort_order=sort_order, + limit=limit, + created_at_gt=created_at_gt, + created_at_lt=created_at_lt, + created_at_ge=created_at_ge, + created_at_le=created_at_le, + updated_at_gt=updated_at_gt, + updated_at_lt=updated_at_lt, + updated_at_ge=updated_at_ge, + updated_at_le=updated_at_le, + request_options=request_options, + ) + return _response.data + + async def campaign_controller_create( + self, + *, + name: str, + assistant_id: typing.Optional[str] = OMIT, + workflow_id: typing.Optional[str] = OMIT, + squad_id: typing.Optional[str] = OMIT, + phone_number_id: typing.Optional[str] = OMIT, + dial_plan: typing.Optional[typing.Sequence[DialPlanEntry]] = OMIT, + schedule_plan: typing.Optional[SchedulePlan] = OMIT, + customers: typing.Optional[typing.Sequence[CreateCustomerDto]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> Campaign: + """ + Parameters + ---------- + name : str + This is the name of the campaign. This is just for your own reference. + + assistant_id : typing.Optional[str] + This is the assistant ID that will be used for the campaign calls. Note: Only one of assistantId, workflowId, or squadId can be used. + + workflow_id : typing.Optional[str] + This is the workflow ID that will be used for the campaign calls. Note: Only one of assistantId, workflowId, or squadId can be used. + + squad_id : typing.Optional[str] + This is the squad ID that will be used for the campaign calls. Note: Only one of assistantId, workflowId, or squadId can be used. + + phone_number_id : typing.Optional[str] + This is the phone number ID that will be used for the campaign calls. Required if dialPlan is not provided. Note: phoneNumberId and dialPlan are mutually exclusive. + + dial_plan : typing.Optional[typing.Sequence[DialPlanEntry]] + This is a list of dial entries, each specifying a phone number and the customers to call using that number. Use this when you want different phone numbers to call different sets of customers. Note: phoneNumberId and dialPlan are mutually exclusive. + + schedule_plan : typing.Optional[SchedulePlan] + This is the schedule plan for the campaign. Calls will start at startedAt and continue until your organization’s concurrency limit is reached. Any remaining calls will be retried for up to one hour as capacity becomes available. After that hour or after latestAt, whichever comes first, any calls that couldn’t be placed won’t be retried. + + customers : typing.Optional[typing.Sequence[CreateCustomerDto]] + These are the customers that will be called in the campaign. Required if dialPlan is not provided. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Campaign + + + Examples + -------- + import asyncio + + from vapi import AsyncVapi + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.campaigns.campaign_controller_create( + name="Q2 Sales Campaign", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.campaign_controller_create( + name=name, + assistant_id=assistant_id, + workflow_id=workflow_id, + squad_id=squad_id, + phone_number_id=phone_number_id, + dial_plan=dial_plan, + schedule_plan=schedule_plan, + customers=customers, + request_options=request_options, + ) + return _response.data + + async def campaign_controller_find_one( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> Campaign: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Campaign + + + Examples + -------- + import asyncio + + from vapi import AsyncVapi + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.campaigns.campaign_controller_find_one( + id="id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.campaign_controller_find_one(id, request_options=request_options) + return _response.data + + async def campaign_controller_remove( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> Campaign: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Campaign + + + Examples + -------- + import asyncio + + from vapi import AsyncVapi + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.campaigns.campaign_controller_remove( + id="id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.campaign_controller_remove(id, request_options=request_options) + return _response.data + + async def campaign_controller_update( + self, + id: str, + *, + name: typing.Optional[str] = OMIT, + assistant_id: typing.Optional[str] = OMIT, + workflow_id: typing.Optional[str] = OMIT, + squad_id: typing.Optional[str] = OMIT, + phone_number_id: typing.Optional[str] = OMIT, + dial_plan: typing.Optional[typing.Sequence[DialPlanEntry]] = OMIT, + schedule_plan: typing.Optional[SchedulePlan] = OMIT, + status: typing.Optional[UpdateCampaignDtoStatus] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> Campaign: + """ + Parameters + ---------- + id : str + + name : typing.Optional[str] + This is the name of the campaign. This is just for your own reference. + + assistant_id : typing.Optional[str] + This is the assistant ID that will be used for the campaign calls. + Can only be updated if campaign is not in progress or has ended. + + workflow_id : typing.Optional[str] + This is the workflow ID that will be used for the campaign calls. + Can only be updated if campaign is not in progress or has ended. + + squad_id : typing.Optional[str] + This is the squad ID that will be used for the campaign calls. + Can only be updated if campaign is not in progress or has ended. + + phone_number_id : typing.Optional[str] + This is the phone number ID that will be used for the campaign calls. + Can only be updated if campaign is not in progress or has ended. + Note: `phoneNumberId` and `dialPlan` are mutually exclusive. + + dial_plan : typing.Optional[typing.Sequence[DialPlanEntry]] + This is a list of dial entries, each specifying a phone number and the customers to call using that number. Can only be updated if campaign is not in progress or has ended. Note: phoneNumberId and dialPlan are mutually exclusive. + + schedule_plan : typing.Optional[SchedulePlan] + This is the schedule plan for the campaign. + Can only be updated if campaign is not in progress or has ended. + + status : typing.Optional[UpdateCampaignDtoStatus] + This is the status of the campaign. + Can only be updated to 'ended' if you want to end the campaign. + When set to 'ended', it will delete all scheduled calls. Calls in progress will be allowed to complete. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Campaign + + + Examples + -------- + import asyncio + + from vapi import AsyncVapi + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.campaigns.campaign_controller_update( + id="id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.campaign_controller_update( + id, + name=name, + assistant_id=assistant_id, + workflow_id=workflow_id, + squad_id=squad_id, + phone_number_id=phone_number_id, + dial_plan=dial_plan, + schedule_plan=schedule_plan, + status=status, + request_options=request_options, + ) + return _response.data diff --git a/src/vapi/campaigns/raw_client.py b/src/vapi/campaigns/raw_client.py new file mode 100644 index 00000000..32b92212 --- /dev/null +++ b/src/vapi/campaigns/raw_client.py @@ -0,0 +1,793 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing +from json.decoder import JSONDecodeError + +from ..core.api_error import ApiError +from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.datetime_utils import serialize_datetime +from ..core.http_response import AsyncHttpResponse, HttpResponse +from ..core.jsonable_encoder import jsonable_encoder +from ..core.parse_error import ParsingError +from ..core.request_options import RequestOptions +from ..core.serialization import convert_and_respect_annotation_metadata +from ..core.unchecked_base_model import construct_type +from ..types.campaign import Campaign +from ..types.campaign_paginated_response import CampaignPaginatedResponse +from ..types.create_customer_dto import CreateCustomerDto +from ..types.dial_plan_entry import DialPlanEntry +from ..types.schedule_plan import SchedulePlan +from .types.campaign_controller_find_all_request_sort_order import CampaignControllerFindAllRequestSortOrder +from .types.campaign_controller_find_all_request_status import CampaignControllerFindAllRequestStatus +from .types.update_campaign_dto_status import UpdateCampaignDtoStatus +from pydantic import ValidationError + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class RawCampaignsClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def campaign_controller_find_all( + self, + *, + id: typing.Optional[str] = None, + status: typing.Optional[CampaignControllerFindAllRequestStatus] = None, + page: typing.Optional[float] = None, + sort_order: typing.Optional[CampaignControllerFindAllRequestSortOrder] = None, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[CampaignPaginatedResponse]: + """ + Parameters + ---------- + id : typing.Optional[str] + + status : typing.Optional[CampaignControllerFindAllRequestStatus] + + page : typing.Optional[float] + This is the page number to return. Defaults to 1. + + sort_order : typing.Optional[CampaignControllerFindAllRequestSortOrder] + This is the sort order for pagination. Defaults to 'DESC'. + + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[CampaignPaginatedResponse] + + """ + _response = self._client_wrapper.httpx_client.request( + "campaign", + method="GET", + params={ + "id": id, + "status": status, + "page": page, + "sortOrder": sort_order, + "limit": limit, + "createdAtGt": serialize_datetime(created_at_gt) if created_at_gt is not None else None, + "createdAtLt": serialize_datetime(created_at_lt) if created_at_lt is not None else None, + "createdAtGe": serialize_datetime(created_at_ge) if created_at_ge is not None else None, + "createdAtLe": serialize_datetime(created_at_le) if created_at_le is not None else None, + "updatedAtGt": serialize_datetime(updated_at_gt) if updated_at_gt is not None else None, + "updatedAtLt": serialize_datetime(updated_at_lt) if updated_at_lt is not None else None, + "updatedAtGe": serialize_datetime(updated_at_ge) if updated_at_ge is not None else None, + "updatedAtLe": serialize_datetime(updated_at_le) if updated_at_le is not None else None, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + CampaignPaginatedResponse, + construct_type( + type_=CampaignPaginatedResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def campaign_controller_create( + self, + *, + name: str, + assistant_id: typing.Optional[str] = OMIT, + workflow_id: typing.Optional[str] = OMIT, + squad_id: typing.Optional[str] = OMIT, + phone_number_id: typing.Optional[str] = OMIT, + dial_plan: typing.Optional[typing.Sequence[DialPlanEntry]] = OMIT, + schedule_plan: typing.Optional[SchedulePlan] = OMIT, + customers: typing.Optional[typing.Sequence[CreateCustomerDto]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[Campaign]: + """ + Parameters + ---------- + name : str + This is the name of the campaign. This is just for your own reference. + + assistant_id : typing.Optional[str] + This is the assistant ID that will be used for the campaign calls. Note: Only one of assistantId, workflowId, or squadId can be used. + + workflow_id : typing.Optional[str] + This is the workflow ID that will be used for the campaign calls. Note: Only one of assistantId, workflowId, or squadId can be used. + + squad_id : typing.Optional[str] + This is the squad ID that will be used for the campaign calls. Note: Only one of assistantId, workflowId, or squadId can be used. + + phone_number_id : typing.Optional[str] + This is the phone number ID that will be used for the campaign calls. Required if dialPlan is not provided. Note: phoneNumberId and dialPlan are mutually exclusive. + + dial_plan : typing.Optional[typing.Sequence[DialPlanEntry]] + This is a list of dial entries, each specifying a phone number and the customers to call using that number. Use this when you want different phone numbers to call different sets of customers. Note: phoneNumberId and dialPlan are mutually exclusive. + + schedule_plan : typing.Optional[SchedulePlan] + This is the schedule plan for the campaign. Calls will start at startedAt and continue until your organization’s concurrency limit is reached. Any remaining calls will be retried for up to one hour as capacity becomes available. After that hour or after latestAt, whichever comes first, any calls that couldn’t be placed won’t be retried. + + customers : typing.Optional[typing.Sequence[CreateCustomerDto]] + These are the customers that will be called in the campaign. Required if dialPlan is not provided. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[Campaign] + + """ + _response = self._client_wrapper.httpx_client.request( + "campaign", + method="POST", + json={ + "name": name, + "assistantId": assistant_id, + "workflowId": workflow_id, + "squadId": squad_id, + "phoneNumberId": phone_number_id, + "dialPlan": convert_and_respect_annotation_metadata( + object_=dial_plan, annotation=typing.Sequence[DialPlanEntry], direction="write" + ), + "schedulePlan": convert_and_respect_annotation_metadata( + object_=schedule_plan, annotation=SchedulePlan, direction="write" + ), + "customers": convert_and_respect_annotation_metadata( + object_=customers, annotation=typing.Sequence[CreateCustomerDto], direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Campaign, + construct_type( + type_=Campaign, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def campaign_controller_find_one( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[Campaign]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[Campaign] + + """ + _response = self._client_wrapper.httpx_client.request( + f"campaign/{jsonable_encoder(id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Campaign, + construct_type( + type_=Campaign, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def campaign_controller_remove( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[Campaign]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[Campaign] + + """ + _response = self._client_wrapper.httpx_client.request( + f"campaign/{jsonable_encoder(id)}", + method="DELETE", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Campaign, + construct_type( + type_=Campaign, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def campaign_controller_update( + self, + id: str, + *, + name: typing.Optional[str] = OMIT, + assistant_id: typing.Optional[str] = OMIT, + workflow_id: typing.Optional[str] = OMIT, + squad_id: typing.Optional[str] = OMIT, + phone_number_id: typing.Optional[str] = OMIT, + dial_plan: typing.Optional[typing.Sequence[DialPlanEntry]] = OMIT, + schedule_plan: typing.Optional[SchedulePlan] = OMIT, + status: typing.Optional[UpdateCampaignDtoStatus] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[Campaign]: + """ + Parameters + ---------- + id : str + + name : typing.Optional[str] + This is the name of the campaign. This is just for your own reference. + + assistant_id : typing.Optional[str] + This is the assistant ID that will be used for the campaign calls. + Can only be updated if campaign is not in progress or has ended. + + workflow_id : typing.Optional[str] + This is the workflow ID that will be used for the campaign calls. + Can only be updated if campaign is not in progress or has ended. + + squad_id : typing.Optional[str] + This is the squad ID that will be used for the campaign calls. + Can only be updated if campaign is not in progress or has ended. + + phone_number_id : typing.Optional[str] + This is the phone number ID that will be used for the campaign calls. + Can only be updated if campaign is not in progress or has ended. + Note: `phoneNumberId` and `dialPlan` are mutually exclusive. + + dial_plan : typing.Optional[typing.Sequence[DialPlanEntry]] + This is a list of dial entries, each specifying a phone number and the customers to call using that number. Can only be updated if campaign is not in progress or has ended. Note: phoneNumberId and dialPlan are mutually exclusive. + + schedule_plan : typing.Optional[SchedulePlan] + This is the schedule plan for the campaign. + Can only be updated if campaign is not in progress or has ended. + + status : typing.Optional[UpdateCampaignDtoStatus] + This is the status of the campaign. + Can only be updated to 'ended' if you want to end the campaign. + When set to 'ended', it will delete all scheduled calls. Calls in progress will be allowed to complete. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[Campaign] + + """ + _response = self._client_wrapper.httpx_client.request( + f"campaign/{jsonable_encoder(id)}", + method="PATCH", + json={ + "name": name, + "assistantId": assistant_id, + "workflowId": workflow_id, + "squadId": squad_id, + "phoneNumberId": phone_number_id, + "dialPlan": convert_and_respect_annotation_metadata( + object_=dial_plan, annotation=typing.Sequence[DialPlanEntry], direction="write" + ), + "schedulePlan": convert_and_respect_annotation_metadata( + object_=schedule_plan, annotation=SchedulePlan, direction="write" + ), + "status": status, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Campaign, + construct_type( + type_=Campaign, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawCampaignsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def campaign_controller_find_all( + self, + *, + id: typing.Optional[str] = None, + status: typing.Optional[CampaignControllerFindAllRequestStatus] = None, + page: typing.Optional[float] = None, + sort_order: typing.Optional[CampaignControllerFindAllRequestSortOrder] = None, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[CampaignPaginatedResponse]: + """ + Parameters + ---------- + id : typing.Optional[str] + + status : typing.Optional[CampaignControllerFindAllRequestStatus] + + page : typing.Optional[float] + This is the page number to return. Defaults to 1. + + sort_order : typing.Optional[CampaignControllerFindAllRequestSortOrder] + This is the sort order for pagination. Defaults to 'DESC'. + + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[CampaignPaginatedResponse] + + """ + _response = await self._client_wrapper.httpx_client.request( + "campaign", + method="GET", + params={ + "id": id, + "status": status, + "page": page, + "sortOrder": sort_order, + "limit": limit, + "createdAtGt": serialize_datetime(created_at_gt) if created_at_gt is not None else None, + "createdAtLt": serialize_datetime(created_at_lt) if created_at_lt is not None else None, + "createdAtGe": serialize_datetime(created_at_ge) if created_at_ge is not None else None, + "createdAtLe": serialize_datetime(created_at_le) if created_at_le is not None else None, + "updatedAtGt": serialize_datetime(updated_at_gt) if updated_at_gt is not None else None, + "updatedAtLt": serialize_datetime(updated_at_lt) if updated_at_lt is not None else None, + "updatedAtGe": serialize_datetime(updated_at_ge) if updated_at_ge is not None else None, + "updatedAtLe": serialize_datetime(updated_at_le) if updated_at_le is not None else None, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + CampaignPaginatedResponse, + construct_type( + type_=CampaignPaginatedResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def campaign_controller_create( + self, + *, + name: str, + assistant_id: typing.Optional[str] = OMIT, + workflow_id: typing.Optional[str] = OMIT, + squad_id: typing.Optional[str] = OMIT, + phone_number_id: typing.Optional[str] = OMIT, + dial_plan: typing.Optional[typing.Sequence[DialPlanEntry]] = OMIT, + schedule_plan: typing.Optional[SchedulePlan] = OMIT, + customers: typing.Optional[typing.Sequence[CreateCustomerDto]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[Campaign]: + """ + Parameters + ---------- + name : str + This is the name of the campaign. This is just for your own reference. + + assistant_id : typing.Optional[str] + This is the assistant ID that will be used for the campaign calls. Note: Only one of assistantId, workflowId, or squadId can be used. + + workflow_id : typing.Optional[str] + This is the workflow ID that will be used for the campaign calls. Note: Only one of assistantId, workflowId, or squadId can be used. + + squad_id : typing.Optional[str] + This is the squad ID that will be used for the campaign calls. Note: Only one of assistantId, workflowId, or squadId can be used. + + phone_number_id : typing.Optional[str] + This is the phone number ID that will be used for the campaign calls. Required if dialPlan is not provided. Note: phoneNumberId and dialPlan are mutually exclusive. + + dial_plan : typing.Optional[typing.Sequence[DialPlanEntry]] + This is a list of dial entries, each specifying a phone number and the customers to call using that number. Use this when you want different phone numbers to call different sets of customers. Note: phoneNumberId and dialPlan are mutually exclusive. + + schedule_plan : typing.Optional[SchedulePlan] + This is the schedule plan for the campaign. Calls will start at startedAt and continue until your organization’s concurrency limit is reached. Any remaining calls will be retried for up to one hour as capacity becomes available. After that hour or after latestAt, whichever comes first, any calls that couldn’t be placed won’t be retried. + + customers : typing.Optional[typing.Sequence[CreateCustomerDto]] + These are the customers that will be called in the campaign. Required if dialPlan is not provided. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[Campaign] + + """ + _response = await self._client_wrapper.httpx_client.request( + "campaign", + method="POST", + json={ + "name": name, + "assistantId": assistant_id, + "workflowId": workflow_id, + "squadId": squad_id, + "phoneNumberId": phone_number_id, + "dialPlan": convert_and_respect_annotation_metadata( + object_=dial_plan, annotation=typing.Sequence[DialPlanEntry], direction="write" + ), + "schedulePlan": convert_and_respect_annotation_metadata( + object_=schedule_plan, annotation=SchedulePlan, direction="write" + ), + "customers": convert_and_respect_annotation_metadata( + object_=customers, annotation=typing.Sequence[CreateCustomerDto], direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Campaign, + construct_type( + type_=Campaign, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def campaign_controller_find_one( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[Campaign]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[Campaign] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"campaign/{jsonable_encoder(id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Campaign, + construct_type( + type_=Campaign, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def campaign_controller_remove( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[Campaign]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[Campaign] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"campaign/{jsonable_encoder(id)}", + method="DELETE", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Campaign, + construct_type( + type_=Campaign, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def campaign_controller_update( + self, + id: str, + *, + name: typing.Optional[str] = OMIT, + assistant_id: typing.Optional[str] = OMIT, + workflow_id: typing.Optional[str] = OMIT, + squad_id: typing.Optional[str] = OMIT, + phone_number_id: typing.Optional[str] = OMIT, + dial_plan: typing.Optional[typing.Sequence[DialPlanEntry]] = OMIT, + schedule_plan: typing.Optional[SchedulePlan] = OMIT, + status: typing.Optional[UpdateCampaignDtoStatus] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[Campaign]: + """ + Parameters + ---------- + id : str + + name : typing.Optional[str] + This is the name of the campaign. This is just for your own reference. + + assistant_id : typing.Optional[str] + This is the assistant ID that will be used for the campaign calls. + Can only be updated if campaign is not in progress or has ended. + + workflow_id : typing.Optional[str] + This is the workflow ID that will be used for the campaign calls. + Can only be updated if campaign is not in progress or has ended. + + squad_id : typing.Optional[str] + This is the squad ID that will be used for the campaign calls. + Can only be updated if campaign is not in progress or has ended. + + phone_number_id : typing.Optional[str] + This is the phone number ID that will be used for the campaign calls. + Can only be updated if campaign is not in progress or has ended. + Note: `phoneNumberId` and `dialPlan` are mutually exclusive. + + dial_plan : typing.Optional[typing.Sequence[DialPlanEntry]] + This is a list of dial entries, each specifying a phone number and the customers to call using that number. Can only be updated if campaign is not in progress or has ended. Note: phoneNumberId and dialPlan are mutually exclusive. + + schedule_plan : typing.Optional[SchedulePlan] + This is the schedule plan for the campaign. + Can only be updated if campaign is not in progress or has ended. + + status : typing.Optional[UpdateCampaignDtoStatus] + This is the status of the campaign. + Can only be updated to 'ended' if you want to end the campaign. + When set to 'ended', it will delete all scheduled calls. Calls in progress will be allowed to complete. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[Campaign] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"campaign/{jsonable_encoder(id)}", + method="PATCH", + json={ + "name": name, + "assistantId": assistant_id, + "workflowId": workflow_id, + "squadId": squad_id, + "phoneNumberId": phone_number_id, + "dialPlan": convert_and_respect_annotation_metadata( + object_=dial_plan, annotation=typing.Sequence[DialPlanEntry], direction="write" + ), + "schedulePlan": convert_and_respect_annotation_metadata( + object_=schedule_plan, annotation=SchedulePlan, direction="write" + ), + "status": status, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Campaign, + construct_type( + type_=Campaign, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/vapi/campaigns/types/__init__.py b/src/vapi/campaigns/types/__init__.py new file mode 100644 index 00000000..577a295e --- /dev/null +++ b/src/vapi/campaigns/types/__init__.py @@ -0,0 +1,44 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .campaign_controller_find_all_request_sort_order import CampaignControllerFindAllRequestSortOrder + from .campaign_controller_find_all_request_status import CampaignControllerFindAllRequestStatus + from .update_campaign_dto_status import UpdateCampaignDtoStatus +_dynamic_imports: typing.Dict[str, str] = { + "CampaignControllerFindAllRequestSortOrder": ".campaign_controller_find_all_request_sort_order", + "CampaignControllerFindAllRequestStatus": ".campaign_controller_find_all_request_status", + "UpdateCampaignDtoStatus": ".update_campaign_dto_status", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = [ + "CampaignControllerFindAllRequestSortOrder", + "CampaignControllerFindAllRequestStatus", + "UpdateCampaignDtoStatus", +] diff --git a/src/vapi/campaigns/types/campaign_controller_find_all_request_sort_order.py b/src/vapi/campaigns/types/campaign_controller_find_all_request_sort_order.py new file mode 100644 index 00000000..bcdf8fb7 --- /dev/null +++ b/src/vapi/campaigns/types/campaign_controller_find_all_request_sort_order.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CampaignControllerFindAllRequestSortOrder = typing.Union[typing.Literal["ASC", "DESC"], typing.Any] diff --git a/src/vapi/campaigns/types/campaign_controller_find_all_request_status.py b/src/vapi/campaigns/types/campaign_controller_find_all_request_status.py new file mode 100644 index 00000000..1e38fd7d --- /dev/null +++ b/src/vapi/campaigns/types/campaign_controller_find_all_request_status.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CampaignControllerFindAllRequestStatus = typing.Union[typing.Literal["scheduled", "in-progress", "ended"], typing.Any] diff --git a/src/vapi/campaigns/types/update_campaign_dto_status.py b/src/vapi/campaigns/types/update_campaign_dto_status.py new file mode 100644 index 00000000..a8ebb9d2 --- /dev/null +++ b/src/vapi/campaigns/types/update_campaign_dto_status.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +UpdateCampaignDtoStatus = typing.Union[typing.Literal["ended"], typing.Any] diff --git a/src/vapi/chats/__init__.py b/src/vapi/chats/__init__.py new file mode 100644 index 00000000..ebfe4ed5 --- /dev/null +++ b/src/vapi/chats/__init__.py @@ -0,0 +1,58 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ( + CreateChatDtoInput, + CreateChatDtoInputOneItem, + CreateChatsResponse, + CreateResponseChatsResponse, + ListChatsRequestSortOrder, + OpenAiResponsesRequestInput, + OpenAiResponsesRequestInputOneItem, + ) +_dynamic_imports: typing.Dict[str, str] = { + "CreateChatDtoInput": ".types", + "CreateChatDtoInputOneItem": ".types", + "CreateChatsResponse": ".types", + "CreateResponseChatsResponse": ".types", + "ListChatsRequestSortOrder": ".types", + "OpenAiResponsesRequestInput": ".types", + "OpenAiResponsesRequestInputOneItem": ".types", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = [ + "CreateChatDtoInput", + "CreateChatDtoInputOneItem", + "CreateChatsResponse", + "CreateResponseChatsResponse", + "ListChatsRequestSortOrder", + "OpenAiResponsesRequestInput", + "OpenAiResponsesRequestInputOneItem", +] diff --git a/src/vapi/chats/client.py b/src/vapi/chats/client.py new file mode 100644 index 00000000..989c3723 --- /dev/null +++ b/src/vapi/chats/client.py @@ -0,0 +1,830 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.request_options import RequestOptions +from ..types.assistant_overrides import AssistantOverrides +from ..types.chat import Chat +from ..types.chat_paginated_response import ChatPaginatedResponse +from ..types.create_assistant_dto import CreateAssistantDto +from ..types.create_squad_dto import CreateSquadDto +from ..types.twilio_sms_chat_transport import TwilioSmsChatTransport +from .raw_client import AsyncRawChatsClient, RawChatsClient +from .types.create_chat_dto_input import CreateChatDtoInput +from .types.create_chats_response import CreateChatsResponse +from .types.create_response_chats_response import CreateResponseChatsResponse +from .types.list_chats_request_sort_order import ListChatsRequestSortOrder +from .types.open_ai_responses_request_input import OpenAiResponsesRequestInput + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class ChatsClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawChatsClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawChatsClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawChatsClient + """ + return self._raw_client + + def list( + self, + *, + id: typing.Optional[str] = None, + assistant_id: typing.Optional[str] = None, + assistant_id_any: typing.Optional[str] = None, + squad_id: typing.Optional[str] = None, + session_id: typing.Optional[str] = None, + previous_chat_id: typing.Optional[str] = None, + page: typing.Optional[float] = None, + sort_order: typing.Optional[ListChatsRequestSortOrder] = None, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> ChatPaginatedResponse: + """ + Parameters + ---------- + id : typing.Optional[str] + This is the unique identifier for the chat to filter by. + + assistant_id : typing.Optional[str] + This is the unique identifier for the assistant that will be used for the chat. + + assistant_id_any : typing.Optional[str] + Filter by multiple assistant IDs. Provide as comma-separated values. + + squad_id : typing.Optional[str] + This is the unique identifier for the squad that will be used for the chat. + + session_id : typing.Optional[str] + This is the unique identifier for the session that will be used for the chat. + + previous_chat_id : typing.Optional[str] + This is the unique identifier for the previous chat to filter by. + + page : typing.Optional[float] + This is the page number to return. Defaults to 1. + + sort_order : typing.Optional[ListChatsRequestSortOrder] + This is the sort order for pagination. Defaults to 'DESC'. + + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ChatPaginatedResponse + + + Examples + -------- + from vapi import Vapi + + client = Vapi( + token="YOUR_TOKEN", + ) + client.chats.list( + assistant_id_any="assistant-1,assistant-2,assistant-3", + ) + """ + _response = self._raw_client.list( + id=id, + assistant_id=assistant_id, + assistant_id_any=assistant_id_any, + squad_id=squad_id, + session_id=session_id, + previous_chat_id=previous_chat_id, + page=page, + sort_order=sort_order, + limit=limit, + created_at_gt=created_at_gt, + created_at_lt=created_at_lt, + created_at_ge=created_at_ge, + created_at_le=created_at_le, + updated_at_gt=updated_at_gt, + updated_at_lt=updated_at_lt, + updated_at_ge=updated_at_ge, + updated_at_le=updated_at_le, + request_options=request_options, + ) + return _response.data + + def create( + self, + *, + input: CreateChatDtoInput, + assistant_id: typing.Optional[str] = OMIT, + assistant: typing.Optional[CreateAssistantDto] = OMIT, + assistant_overrides: typing.Optional[AssistantOverrides] = OMIT, + squad_id: typing.Optional[str] = OMIT, + squad: typing.Optional[CreateSquadDto] = OMIT, + name: typing.Optional[str] = OMIT, + session_id: typing.Optional[str] = OMIT, + stream: typing.Optional[bool] = OMIT, + previous_chat_id: typing.Optional[str] = OMIT, + transport: typing.Optional[TwilioSmsChatTransport] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> CreateChatsResponse: + """ + Creates a new chat with optional SMS delivery via transport field. Requires at least one of: assistantId/assistant, sessionId, or previousChatId. Note: sessionId and previousChatId are mutually exclusive. Transport field enables SMS delivery with two modes: (1) New conversation - provide transport.phoneNumberId and transport.customer to create a new session, (2) Existing conversation - provide sessionId to use existing session data. Cannot specify both sessionId and transport fields together. The transport.useLLMGeneratedMessageForOutbound flag controls whether input is processed by LLM (true, default) or forwarded directly as SMS (false). + + Parameters + ---------- + input : CreateChatDtoInput + This is the input text for the chat. + Can be a string or an array of chat messages. + This field is REQUIRED for chat creation. + + assistant_id : typing.Optional[str] + This is the assistant that will be used for the chat. To use an existing assistant, use `assistantId` instead. + + assistant : typing.Optional[CreateAssistantDto] + This is the assistant that will be used for the chat. To use an existing assistant, use `assistantId` instead. + + assistant_overrides : typing.Optional[AssistantOverrides] + These are the variable values that will be used to replace template variables in the assistant messages. + Only variable substitution is supported in chat contexts - other assistant properties cannot be overridden. + + squad_id : typing.Optional[str] + This is the squad that will be used for the chat. To use a transient squad, use `squad` instead. + + squad : typing.Optional[CreateSquadDto] + This is the squad that will be used for the chat. To use an existing squad, use `squadId` instead. + + name : typing.Optional[str] + This is the name of the chat. This is just for your own reference. + + session_id : typing.Optional[str] + This is the ID of the session that will be used for the chat. + Mutually exclusive with previousChatId. + + stream : typing.Optional[bool] + This is a flag that determines whether the response should be streamed. + When true, the response will be sent as chunks of text. + + previous_chat_id : typing.Optional[str] + This is the ID of the chat that will be used as context for the new chat. + The messages from the previous chat will be used as context. + Mutually exclusive with sessionId. + + transport : typing.Optional[TwilioSmsChatTransport] + This is used to send the chat through a transport like SMS. + If transport.phoneNumberId and transport.customer are provided, creates a new session. + If sessionId is provided without transport fields, uses existing session data. + Cannot specify both sessionId and transport fields (phoneNumberId/customer) together. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + CreateChatsResponse + Chat response - either non-streaming chat or streaming + + Examples + -------- + from vapi import Vapi + + client = Vapi( + token="YOUR_TOKEN", + ) + client.chats.create( + input="input", + ) + """ + _response = self._raw_client.create( + input=input, + assistant_id=assistant_id, + assistant=assistant, + assistant_overrides=assistant_overrides, + squad_id=squad_id, + squad=squad, + name=name, + session_id=session_id, + stream=stream, + previous_chat_id=previous_chat_id, + transport=transport, + request_options=request_options, + ) + return _response.data + + def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Chat: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Chat + + + Examples + -------- + from vapi import Vapi + + client = Vapi( + token="YOUR_TOKEN", + ) + client.chats.get( + id="id", + ) + """ + _response = self._raw_client.get(id, request_options=request_options) + return _response.data + + def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Chat: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Chat + + + Examples + -------- + from vapi import Vapi + + client = Vapi( + token="YOUR_TOKEN", + ) + client.chats.delete( + id="id", + ) + """ + _response = self._raw_client.delete(id, request_options=request_options) + return _response.data + + def create_response( + self, + *, + input: OpenAiResponsesRequestInput, + assistant_id: typing.Optional[str] = OMIT, + assistant: typing.Optional[CreateAssistantDto] = OMIT, + assistant_overrides: typing.Optional[AssistantOverrides] = OMIT, + squad_id: typing.Optional[str] = OMIT, + squad: typing.Optional[CreateSquadDto] = OMIT, + name: typing.Optional[str] = OMIT, + session_id: typing.Optional[str] = OMIT, + stream: typing.Optional[bool] = OMIT, + previous_chat_id: typing.Optional[str] = OMIT, + transport: typing.Optional[TwilioSmsChatTransport] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> CreateResponseChatsResponse: + """ + Parameters + ---------- + input : OpenAiResponsesRequestInput + This is the input text for the chat. + Can be a string or an array of chat messages. + This field is REQUIRED for chat creation. + + assistant_id : typing.Optional[str] + This is the assistant that will be used for the chat. To use an existing assistant, use `assistantId` instead. + + assistant : typing.Optional[CreateAssistantDto] + This is the assistant that will be used for the chat. To use an existing assistant, use `assistantId` instead. + + assistant_overrides : typing.Optional[AssistantOverrides] + These are the variable values that will be used to replace template variables in the assistant messages. + Only variable substitution is supported in chat contexts - other assistant properties cannot be overridden. + + squad_id : typing.Optional[str] + This is the squad that will be used for the chat. To use a transient squad, use `squad` instead. + + squad : typing.Optional[CreateSquadDto] + This is the squad that will be used for the chat. To use an existing squad, use `squadId` instead. + + name : typing.Optional[str] + This is the name of the chat. This is just for your own reference. + + session_id : typing.Optional[str] + This is the ID of the session that will be used for the chat. + Mutually exclusive with previousChatId. + + stream : typing.Optional[bool] + Whether to stream the response or not. + + previous_chat_id : typing.Optional[str] + This is the ID of the chat that will be used as context for the new chat. + The messages from the previous chat will be used as context. + Mutually exclusive with sessionId. + + transport : typing.Optional[TwilioSmsChatTransport] + This is used to send the chat through a transport like SMS. + If transport.phoneNumberId and transport.customer are provided, creates a new session. + If sessionId is provided without transport fields, uses existing session data. + Cannot specify both sessionId and transport fields (phoneNumberId/customer) together. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + CreateResponseChatsResponse + OpenAI Responses API format - either non-streaming or streaming + + Examples + -------- + from vapi import Vapi + + client = Vapi( + token="YOUR_TOKEN", + ) + client.chats.create_response( + input="input", + ) + """ + _response = self._raw_client.create_response( + input=input, + assistant_id=assistant_id, + assistant=assistant, + assistant_overrides=assistant_overrides, + squad_id=squad_id, + squad=squad, + name=name, + session_id=session_id, + stream=stream, + previous_chat_id=previous_chat_id, + transport=transport, + request_options=request_options, + ) + return _response.data + + +class AsyncChatsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawChatsClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawChatsClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawChatsClient + """ + return self._raw_client + + async def list( + self, + *, + id: typing.Optional[str] = None, + assistant_id: typing.Optional[str] = None, + assistant_id_any: typing.Optional[str] = None, + squad_id: typing.Optional[str] = None, + session_id: typing.Optional[str] = None, + previous_chat_id: typing.Optional[str] = None, + page: typing.Optional[float] = None, + sort_order: typing.Optional[ListChatsRequestSortOrder] = None, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> ChatPaginatedResponse: + """ + Parameters + ---------- + id : typing.Optional[str] + This is the unique identifier for the chat to filter by. + + assistant_id : typing.Optional[str] + This is the unique identifier for the assistant that will be used for the chat. + + assistant_id_any : typing.Optional[str] + Filter by multiple assistant IDs. Provide as comma-separated values. + + squad_id : typing.Optional[str] + This is the unique identifier for the squad that will be used for the chat. + + session_id : typing.Optional[str] + This is the unique identifier for the session that will be used for the chat. + + previous_chat_id : typing.Optional[str] + This is the unique identifier for the previous chat to filter by. + + page : typing.Optional[float] + This is the page number to return. Defaults to 1. + + sort_order : typing.Optional[ListChatsRequestSortOrder] + This is the sort order for pagination. Defaults to 'DESC'. + + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ChatPaginatedResponse + + + Examples + -------- + import asyncio + + from vapi import AsyncVapi + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.chats.list( + assistant_id_any="assistant-1,assistant-2,assistant-3", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.list( + id=id, + assistant_id=assistant_id, + assistant_id_any=assistant_id_any, + squad_id=squad_id, + session_id=session_id, + previous_chat_id=previous_chat_id, + page=page, + sort_order=sort_order, + limit=limit, + created_at_gt=created_at_gt, + created_at_lt=created_at_lt, + created_at_ge=created_at_ge, + created_at_le=created_at_le, + updated_at_gt=updated_at_gt, + updated_at_lt=updated_at_lt, + updated_at_ge=updated_at_ge, + updated_at_le=updated_at_le, + request_options=request_options, + ) + return _response.data + + async def create( + self, + *, + input: CreateChatDtoInput, + assistant_id: typing.Optional[str] = OMIT, + assistant: typing.Optional[CreateAssistantDto] = OMIT, + assistant_overrides: typing.Optional[AssistantOverrides] = OMIT, + squad_id: typing.Optional[str] = OMIT, + squad: typing.Optional[CreateSquadDto] = OMIT, + name: typing.Optional[str] = OMIT, + session_id: typing.Optional[str] = OMIT, + stream: typing.Optional[bool] = OMIT, + previous_chat_id: typing.Optional[str] = OMIT, + transport: typing.Optional[TwilioSmsChatTransport] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> CreateChatsResponse: + """ + Creates a new chat with optional SMS delivery via transport field. Requires at least one of: assistantId/assistant, sessionId, or previousChatId. Note: sessionId and previousChatId are mutually exclusive. Transport field enables SMS delivery with two modes: (1) New conversation - provide transport.phoneNumberId and transport.customer to create a new session, (2) Existing conversation - provide sessionId to use existing session data. Cannot specify both sessionId and transport fields together. The transport.useLLMGeneratedMessageForOutbound flag controls whether input is processed by LLM (true, default) or forwarded directly as SMS (false). + + Parameters + ---------- + input : CreateChatDtoInput + This is the input text for the chat. + Can be a string or an array of chat messages. + This field is REQUIRED for chat creation. + + assistant_id : typing.Optional[str] + This is the assistant that will be used for the chat. To use an existing assistant, use `assistantId` instead. + + assistant : typing.Optional[CreateAssistantDto] + This is the assistant that will be used for the chat. To use an existing assistant, use `assistantId` instead. + + assistant_overrides : typing.Optional[AssistantOverrides] + These are the variable values that will be used to replace template variables in the assistant messages. + Only variable substitution is supported in chat contexts - other assistant properties cannot be overridden. + + squad_id : typing.Optional[str] + This is the squad that will be used for the chat. To use a transient squad, use `squad` instead. + + squad : typing.Optional[CreateSquadDto] + This is the squad that will be used for the chat. To use an existing squad, use `squadId` instead. + + name : typing.Optional[str] + This is the name of the chat. This is just for your own reference. + + session_id : typing.Optional[str] + This is the ID of the session that will be used for the chat. + Mutually exclusive with previousChatId. + + stream : typing.Optional[bool] + This is a flag that determines whether the response should be streamed. + When true, the response will be sent as chunks of text. + + previous_chat_id : typing.Optional[str] + This is the ID of the chat that will be used as context for the new chat. + The messages from the previous chat will be used as context. + Mutually exclusive with sessionId. + + transport : typing.Optional[TwilioSmsChatTransport] + This is used to send the chat through a transport like SMS. + If transport.phoneNumberId and transport.customer are provided, creates a new session. + If sessionId is provided without transport fields, uses existing session data. + Cannot specify both sessionId and transport fields (phoneNumberId/customer) together. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + CreateChatsResponse + Chat response - either non-streaming chat or streaming + + Examples + -------- + import asyncio + + from vapi import AsyncVapi + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.chats.create( + input="input", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.create( + input=input, + assistant_id=assistant_id, + assistant=assistant, + assistant_overrides=assistant_overrides, + squad_id=squad_id, + squad=squad, + name=name, + session_id=session_id, + stream=stream, + previous_chat_id=previous_chat_id, + transport=transport, + request_options=request_options, + ) + return _response.data + + async def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Chat: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Chat + + + Examples + -------- + import asyncio + + from vapi import AsyncVapi + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.chats.get( + id="id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.get(id, request_options=request_options) + return _response.data + + async def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Chat: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Chat + + + Examples + -------- + import asyncio + + from vapi import AsyncVapi + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.chats.delete( + id="id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.delete(id, request_options=request_options) + return _response.data + + async def create_response( + self, + *, + input: OpenAiResponsesRequestInput, + assistant_id: typing.Optional[str] = OMIT, + assistant: typing.Optional[CreateAssistantDto] = OMIT, + assistant_overrides: typing.Optional[AssistantOverrides] = OMIT, + squad_id: typing.Optional[str] = OMIT, + squad: typing.Optional[CreateSquadDto] = OMIT, + name: typing.Optional[str] = OMIT, + session_id: typing.Optional[str] = OMIT, + stream: typing.Optional[bool] = OMIT, + previous_chat_id: typing.Optional[str] = OMIT, + transport: typing.Optional[TwilioSmsChatTransport] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> CreateResponseChatsResponse: + """ + Parameters + ---------- + input : OpenAiResponsesRequestInput + This is the input text for the chat. + Can be a string or an array of chat messages. + This field is REQUIRED for chat creation. + + assistant_id : typing.Optional[str] + This is the assistant that will be used for the chat. To use an existing assistant, use `assistantId` instead. + + assistant : typing.Optional[CreateAssistantDto] + This is the assistant that will be used for the chat. To use an existing assistant, use `assistantId` instead. + + assistant_overrides : typing.Optional[AssistantOverrides] + These are the variable values that will be used to replace template variables in the assistant messages. + Only variable substitution is supported in chat contexts - other assistant properties cannot be overridden. + + squad_id : typing.Optional[str] + This is the squad that will be used for the chat. To use a transient squad, use `squad` instead. + + squad : typing.Optional[CreateSquadDto] + This is the squad that will be used for the chat. To use an existing squad, use `squadId` instead. + + name : typing.Optional[str] + This is the name of the chat. This is just for your own reference. + + session_id : typing.Optional[str] + This is the ID of the session that will be used for the chat. + Mutually exclusive with previousChatId. + + stream : typing.Optional[bool] + Whether to stream the response or not. + + previous_chat_id : typing.Optional[str] + This is the ID of the chat that will be used as context for the new chat. + The messages from the previous chat will be used as context. + Mutually exclusive with sessionId. + + transport : typing.Optional[TwilioSmsChatTransport] + This is used to send the chat through a transport like SMS. + If transport.phoneNumberId and transport.customer are provided, creates a new session. + If sessionId is provided without transport fields, uses existing session data. + Cannot specify both sessionId and transport fields (phoneNumberId/customer) together. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + CreateResponseChatsResponse + OpenAI Responses API format - either non-streaming or streaming + + Examples + -------- + import asyncio + + from vapi import AsyncVapi + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.chats.create_response( + input="input", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.create_response( + input=input, + assistant_id=assistant_id, + assistant=assistant, + assistant_overrides=assistant_overrides, + squad_id=squad_id, + squad=squad, + name=name, + session_id=session_id, + stream=stream, + previous_chat_id=previous_chat_id, + transport=transport, + request_options=request_options, + ) + return _response.data diff --git a/src/vapi/chats/raw_client.py b/src/vapi/chats/raw_client.py new file mode 100644 index 00000000..bfdaaf67 --- /dev/null +++ b/src/vapi/chats/raw_client.py @@ -0,0 +1,934 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing +from json.decoder import JSONDecodeError + +from ..core.api_error import ApiError +from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.datetime_utils import serialize_datetime +from ..core.http_response import AsyncHttpResponse, HttpResponse +from ..core.jsonable_encoder import jsonable_encoder +from ..core.parse_error import ParsingError +from ..core.request_options import RequestOptions +from ..core.serialization import convert_and_respect_annotation_metadata +from ..core.unchecked_base_model import construct_type +from ..types.assistant_overrides import AssistantOverrides +from ..types.chat import Chat +from ..types.chat_paginated_response import ChatPaginatedResponse +from ..types.create_assistant_dto import CreateAssistantDto +from ..types.create_squad_dto import CreateSquadDto +from ..types.twilio_sms_chat_transport import TwilioSmsChatTransport +from .types.create_chat_dto_input import CreateChatDtoInput +from .types.create_chats_response import CreateChatsResponse +from .types.create_response_chats_response import CreateResponseChatsResponse +from .types.list_chats_request_sort_order import ListChatsRequestSortOrder +from .types.open_ai_responses_request_input import OpenAiResponsesRequestInput +from pydantic import ValidationError + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class RawChatsClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def list( + self, + *, + id: typing.Optional[str] = None, + assistant_id: typing.Optional[str] = None, + assistant_id_any: typing.Optional[str] = None, + squad_id: typing.Optional[str] = None, + session_id: typing.Optional[str] = None, + previous_chat_id: typing.Optional[str] = None, + page: typing.Optional[float] = None, + sort_order: typing.Optional[ListChatsRequestSortOrder] = None, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[ChatPaginatedResponse]: + """ + Parameters + ---------- + id : typing.Optional[str] + This is the unique identifier for the chat to filter by. + + assistant_id : typing.Optional[str] + This is the unique identifier for the assistant that will be used for the chat. + + assistant_id_any : typing.Optional[str] + Filter by multiple assistant IDs. Provide as comma-separated values. + + squad_id : typing.Optional[str] + This is the unique identifier for the squad that will be used for the chat. + + session_id : typing.Optional[str] + This is the unique identifier for the session that will be used for the chat. + + previous_chat_id : typing.Optional[str] + This is the unique identifier for the previous chat to filter by. + + page : typing.Optional[float] + This is the page number to return. Defaults to 1. + + sort_order : typing.Optional[ListChatsRequestSortOrder] + This is the sort order for pagination. Defaults to 'DESC'. + + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[ChatPaginatedResponse] + + """ + _response = self._client_wrapper.httpx_client.request( + "chat", + method="GET", + params={ + "id": id, + "assistantId": assistant_id, + "assistantIdAny": assistant_id_any, + "squadId": squad_id, + "sessionId": session_id, + "previousChatId": previous_chat_id, + "page": page, + "sortOrder": sort_order, + "limit": limit, + "createdAtGt": serialize_datetime(created_at_gt) if created_at_gt is not None else None, + "createdAtLt": serialize_datetime(created_at_lt) if created_at_lt is not None else None, + "createdAtGe": serialize_datetime(created_at_ge) if created_at_ge is not None else None, + "createdAtLe": serialize_datetime(created_at_le) if created_at_le is not None else None, + "updatedAtGt": serialize_datetime(updated_at_gt) if updated_at_gt is not None else None, + "updatedAtLt": serialize_datetime(updated_at_lt) if updated_at_lt is not None else None, + "updatedAtGe": serialize_datetime(updated_at_ge) if updated_at_ge is not None else None, + "updatedAtLe": serialize_datetime(updated_at_le) if updated_at_le is not None else None, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ChatPaginatedResponse, + construct_type( + type_=ChatPaginatedResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def create( + self, + *, + input: CreateChatDtoInput, + assistant_id: typing.Optional[str] = OMIT, + assistant: typing.Optional[CreateAssistantDto] = OMIT, + assistant_overrides: typing.Optional[AssistantOverrides] = OMIT, + squad_id: typing.Optional[str] = OMIT, + squad: typing.Optional[CreateSquadDto] = OMIT, + name: typing.Optional[str] = OMIT, + session_id: typing.Optional[str] = OMIT, + stream: typing.Optional[bool] = OMIT, + previous_chat_id: typing.Optional[str] = OMIT, + transport: typing.Optional[TwilioSmsChatTransport] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[CreateChatsResponse]: + """ + Creates a new chat with optional SMS delivery via transport field. Requires at least one of: assistantId/assistant, sessionId, or previousChatId. Note: sessionId and previousChatId are mutually exclusive. Transport field enables SMS delivery with two modes: (1) New conversation - provide transport.phoneNumberId and transport.customer to create a new session, (2) Existing conversation - provide sessionId to use existing session data. Cannot specify both sessionId and transport fields together. The transport.useLLMGeneratedMessageForOutbound flag controls whether input is processed by LLM (true, default) or forwarded directly as SMS (false). + + Parameters + ---------- + input : CreateChatDtoInput + This is the input text for the chat. + Can be a string or an array of chat messages. + This field is REQUIRED for chat creation. + + assistant_id : typing.Optional[str] + This is the assistant that will be used for the chat. To use an existing assistant, use `assistantId` instead. + + assistant : typing.Optional[CreateAssistantDto] + This is the assistant that will be used for the chat. To use an existing assistant, use `assistantId` instead. + + assistant_overrides : typing.Optional[AssistantOverrides] + These are the variable values that will be used to replace template variables in the assistant messages. + Only variable substitution is supported in chat contexts - other assistant properties cannot be overridden. + + squad_id : typing.Optional[str] + This is the squad that will be used for the chat. To use a transient squad, use `squad` instead. + + squad : typing.Optional[CreateSquadDto] + This is the squad that will be used for the chat. To use an existing squad, use `squadId` instead. + + name : typing.Optional[str] + This is the name of the chat. This is just for your own reference. + + session_id : typing.Optional[str] + This is the ID of the session that will be used for the chat. + Mutually exclusive with previousChatId. + + stream : typing.Optional[bool] + This is a flag that determines whether the response should be streamed. + When true, the response will be sent as chunks of text. + + previous_chat_id : typing.Optional[str] + This is the ID of the chat that will be used as context for the new chat. + The messages from the previous chat will be used as context. + Mutually exclusive with sessionId. + + transport : typing.Optional[TwilioSmsChatTransport] + This is used to send the chat through a transport like SMS. + If transport.phoneNumberId and transport.customer are provided, creates a new session. + If sessionId is provided without transport fields, uses existing session data. + Cannot specify both sessionId and transport fields (phoneNumberId/customer) together. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[CreateChatsResponse] + Chat response - either non-streaming chat or streaming + """ + _response = self._client_wrapper.httpx_client.request( + "chat", + method="POST", + json={ + "assistantId": assistant_id, + "assistant": convert_and_respect_annotation_metadata( + object_=assistant, annotation=CreateAssistantDto, direction="write" + ), + "assistantOverrides": convert_and_respect_annotation_metadata( + object_=assistant_overrides, annotation=AssistantOverrides, direction="write" + ), + "squadId": squad_id, + "squad": convert_and_respect_annotation_metadata( + object_=squad, annotation=CreateSquadDto, direction="write" + ), + "name": name, + "sessionId": session_id, + "input": convert_and_respect_annotation_metadata( + object_=input, annotation=CreateChatDtoInput, direction="write" + ), + "stream": stream, + "previousChatId": previous_chat_id, + "transport": convert_and_respect_annotation_metadata( + object_=transport, annotation=TwilioSmsChatTransport, direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + CreateChatsResponse, + construct_type( + type_=CreateChatsResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[Chat]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[Chat] + + """ + _response = self._client_wrapper.httpx_client.request( + f"chat/{jsonable_encoder(id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Chat, + construct_type( + type_=Chat, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[Chat]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[Chat] + + """ + _response = self._client_wrapper.httpx_client.request( + f"chat/{jsonable_encoder(id)}", + method="DELETE", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Chat, + construct_type( + type_=Chat, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def create_response( + self, + *, + input: OpenAiResponsesRequestInput, + assistant_id: typing.Optional[str] = OMIT, + assistant: typing.Optional[CreateAssistantDto] = OMIT, + assistant_overrides: typing.Optional[AssistantOverrides] = OMIT, + squad_id: typing.Optional[str] = OMIT, + squad: typing.Optional[CreateSquadDto] = OMIT, + name: typing.Optional[str] = OMIT, + session_id: typing.Optional[str] = OMIT, + stream: typing.Optional[bool] = OMIT, + previous_chat_id: typing.Optional[str] = OMIT, + transport: typing.Optional[TwilioSmsChatTransport] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[CreateResponseChatsResponse]: + """ + Parameters + ---------- + input : OpenAiResponsesRequestInput + This is the input text for the chat. + Can be a string or an array of chat messages. + This field is REQUIRED for chat creation. + + assistant_id : typing.Optional[str] + This is the assistant that will be used for the chat. To use an existing assistant, use `assistantId` instead. + + assistant : typing.Optional[CreateAssistantDto] + This is the assistant that will be used for the chat. To use an existing assistant, use `assistantId` instead. + + assistant_overrides : typing.Optional[AssistantOverrides] + These are the variable values that will be used to replace template variables in the assistant messages. + Only variable substitution is supported in chat contexts - other assistant properties cannot be overridden. + + squad_id : typing.Optional[str] + This is the squad that will be used for the chat. To use a transient squad, use `squad` instead. + + squad : typing.Optional[CreateSquadDto] + This is the squad that will be used for the chat. To use an existing squad, use `squadId` instead. + + name : typing.Optional[str] + This is the name of the chat. This is just for your own reference. + + session_id : typing.Optional[str] + This is the ID of the session that will be used for the chat. + Mutually exclusive with previousChatId. + + stream : typing.Optional[bool] + Whether to stream the response or not. + + previous_chat_id : typing.Optional[str] + This is the ID of the chat that will be used as context for the new chat. + The messages from the previous chat will be used as context. + Mutually exclusive with sessionId. + + transport : typing.Optional[TwilioSmsChatTransport] + This is used to send the chat through a transport like SMS. + If transport.phoneNumberId and transport.customer are provided, creates a new session. + If sessionId is provided without transport fields, uses existing session data. + Cannot specify both sessionId and transport fields (phoneNumberId/customer) together. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[CreateResponseChatsResponse] + OpenAI Responses API format - either non-streaming or streaming + """ + _response = self._client_wrapper.httpx_client.request( + "chat/responses", + method="POST", + json={ + "assistantId": assistant_id, + "assistant": convert_and_respect_annotation_metadata( + object_=assistant, annotation=CreateAssistantDto, direction="write" + ), + "assistantOverrides": convert_and_respect_annotation_metadata( + object_=assistant_overrides, annotation=AssistantOverrides, direction="write" + ), + "squadId": squad_id, + "squad": convert_and_respect_annotation_metadata( + object_=squad, annotation=CreateSquadDto, direction="write" + ), + "name": name, + "sessionId": session_id, + "input": convert_and_respect_annotation_metadata( + object_=input, annotation=OpenAiResponsesRequestInput, direction="write" + ), + "stream": stream, + "previousChatId": previous_chat_id, + "transport": convert_and_respect_annotation_metadata( + object_=transport, annotation=TwilioSmsChatTransport, direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + CreateResponseChatsResponse, + construct_type( + type_=CreateResponseChatsResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawChatsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def list( + self, + *, + id: typing.Optional[str] = None, + assistant_id: typing.Optional[str] = None, + assistant_id_any: typing.Optional[str] = None, + squad_id: typing.Optional[str] = None, + session_id: typing.Optional[str] = None, + previous_chat_id: typing.Optional[str] = None, + page: typing.Optional[float] = None, + sort_order: typing.Optional[ListChatsRequestSortOrder] = None, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[ChatPaginatedResponse]: + """ + Parameters + ---------- + id : typing.Optional[str] + This is the unique identifier for the chat to filter by. + + assistant_id : typing.Optional[str] + This is the unique identifier for the assistant that will be used for the chat. + + assistant_id_any : typing.Optional[str] + Filter by multiple assistant IDs. Provide as comma-separated values. + + squad_id : typing.Optional[str] + This is the unique identifier for the squad that will be used for the chat. + + session_id : typing.Optional[str] + This is the unique identifier for the session that will be used for the chat. + + previous_chat_id : typing.Optional[str] + This is the unique identifier for the previous chat to filter by. + + page : typing.Optional[float] + This is the page number to return. Defaults to 1. + + sort_order : typing.Optional[ListChatsRequestSortOrder] + This is the sort order for pagination. Defaults to 'DESC'. + + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[ChatPaginatedResponse] + + """ + _response = await self._client_wrapper.httpx_client.request( + "chat", + method="GET", + params={ + "id": id, + "assistantId": assistant_id, + "assistantIdAny": assistant_id_any, + "squadId": squad_id, + "sessionId": session_id, + "previousChatId": previous_chat_id, + "page": page, + "sortOrder": sort_order, + "limit": limit, + "createdAtGt": serialize_datetime(created_at_gt) if created_at_gt is not None else None, + "createdAtLt": serialize_datetime(created_at_lt) if created_at_lt is not None else None, + "createdAtGe": serialize_datetime(created_at_ge) if created_at_ge is not None else None, + "createdAtLe": serialize_datetime(created_at_le) if created_at_le is not None else None, + "updatedAtGt": serialize_datetime(updated_at_gt) if updated_at_gt is not None else None, + "updatedAtLt": serialize_datetime(updated_at_lt) if updated_at_lt is not None else None, + "updatedAtGe": serialize_datetime(updated_at_ge) if updated_at_ge is not None else None, + "updatedAtLe": serialize_datetime(updated_at_le) if updated_at_le is not None else None, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ChatPaginatedResponse, + construct_type( + type_=ChatPaginatedResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def create( + self, + *, + input: CreateChatDtoInput, + assistant_id: typing.Optional[str] = OMIT, + assistant: typing.Optional[CreateAssistantDto] = OMIT, + assistant_overrides: typing.Optional[AssistantOverrides] = OMIT, + squad_id: typing.Optional[str] = OMIT, + squad: typing.Optional[CreateSquadDto] = OMIT, + name: typing.Optional[str] = OMIT, + session_id: typing.Optional[str] = OMIT, + stream: typing.Optional[bool] = OMIT, + previous_chat_id: typing.Optional[str] = OMIT, + transport: typing.Optional[TwilioSmsChatTransport] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[CreateChatsResponse]: + """ + Creates a new chat with optional SMS delivery via transport field. Requires at least one of: assistantId/assistant, sessionId, or previousChatId. Note: sessionId and previousChatId are mutually exclusive. Transport field enables SMS delivery with two modes: (1) New conversation - provide transport.phoneNumberId and transport.customer to create a new session, (2) Existing conversation - provide sessionId to use existing session data. Cannot specify both sessionId and transport fields together. The transport.useLLMGeneratedMessageForOutbound flag controls whether input is processed by LLM (true, default) or forwarded directly as SMS (false). + + Parameters + ---------- + input : CreateChatDtoInput + This is the input text for the chat. + Can be a string or an array of chat messages. + This field is REQUIRED for chat creation. + + assistant_id : typing.Optional[str] + This is the assistant that will be used for the chat. To use an existing assistant, use `assistantId` instead. + + assistant : typing.Optional[CreateAssistantDto] + This is the assistant that will be used for the chat. To use an existing assistant, use `assistantId` instead. + + assistant_overrides : typing.Optional[AssistantOverrides] + These are the variable values that will be used to replace template variables in the assistant messages. + Only variable substitution is supported in chat contexts - other assistant properties cannot be overridden. + + squad_id : typing.Optional[str] + This is the squad that will be used for the chat. To use a transient squad, use `squad` instead. + + squad : typing.Optional[CreateSquadDto] + This is the squad that will be used for the chat. To use an existing squad, use `squadId` instead. + + name : typing.Optional[str] + This is the name of the chat. This is just for your own reference. + + session_id : typing.Optional[str] + This is the ID of the session that will be used for the chat. + Mutually exclusive with previousChatId. + + stream : typing.Optional[bool] + This is a flag that determines whether the response should be streamed. + When true, the response will be sent as chunks of text. + + previous_chat_id : typing.Optional[str] + This is the ID of the chat that will be used as context for the new chat. + The messages from the previous chat will be used as context. + Mutually exclusive with sessionId. + + transport : typing.Optional[TwilioSmsChatTransport] + This is used to send the chat through a transport like SMS. + If transport.phoneNumberId and transport.customer are provided, creates a new session. + If sessionId is provided without transport fields, uses existing session data. + Cannot specify both sessionId and transport fields (phoneNumberId/customer) together. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[CreateChatsResponse] + Chat response - either non-streaming chat or streaming + """ + _response = await self._client_wrapper.httpx_client.request( + "chat", + method="POST", + json={ + "assistantId": assistant_id, + "assistant": convert_and_respect_annotation_metadata( + object_=assistant, annotation=CreateAssistantDto, direction="write" + ), + "assistantOverrides": convert_and_respect_annotation_metadata( + object_=assistant_overrides, annotation=AssistantOverrides, direction="write" + ), + "squadId": squad_id, + "squad": convert_and_respect_annotation_metadata( + object_=squad, annotation=CreateSquadDto, direction="write" + ), + "name": name, + "sessionId": session_id, + "input": convert_and_respect_annotation_metadata( + object_=input, annotation=CreateChatDtoInput, direction="write" + ), + "stream": stream, + "previousChatId": previous_chat_id, + "transport": convert_and_respect_annotation_metadata( + object_=transport, annotation=TwilioSmsChatTransport, direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + CreateChatsResponse, + construct_type( + type_=CreateChatsResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> AsyncHttpResponse[Chat]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[Chat] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"chat/{jsonable_encoder(id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Chat, + construct_type( + type_=Chat, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def delete( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[Chat]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[Chat] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"chat/{jsonable_encoder(id)}", + method="DELETE", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Chat, + construct_type( + type_=Chat, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def create_response( + self, + *, + input: OpenAiResponsesRequestInput, + assistant_id: typing.Optional[str] = OMIT, + assistant: typing.Optional[CreateAssistantDto] = OMIT, + assistant_overrides: typing.Optional[AssistantOverrides] = OMIT, + squad_id: typing.Optional[str] = OMIT, + squad: typing.Optional[CreateSquadDto] = OMIT, + name: typing.Optional[str] = OMIT, + session_id: typing.Optional[str] = OMIT, + stream: typing.Optional[bool] = OMIT, + previous_chat_id: typing.Optional[str] = OMIT, + transport: typing.Optional[TwilioSmsChatTransport] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[CreateResponseChatsResponse]: + """ + Parameters + ---------- + input : OpenAiResponsesRequestInput + This is the input text for the chat. + Can be a string or an array of chat messages. + This field is REQUIRED for chat creation. + + assistant_id : typing.Optional[str] + This is the assistant that will be used for the chat. To use an existing assistant, use `assistantId` instead. + + assistant : typing.Optional[CreateAssistantDto] + This is the assistant that will be used for the chat. To use an existing assistant, use `assistantId` instead. + + assistant_overrides : typing.Optional[AssistantOverrides] + These are the variable values that will be used to replace template variables in the assistant messages. + Only variable substitution is supported in chat contexts - other assistant properties cannot be overridden. + + squad_id : typing.Optional[str] + This is the squad that will be used for the chat. To use a transient squad, use `squad` instead. + + squad : typing.Optional[CreateSquadDto] + This is the squad that will be used for the chat. To use an existing squad, use `squadId` instead. + + name : typing.Optional[str] + This is the name of the chat. This is just for your own reference. + + session_id : typing.Optional[str] + This is the ID of the session that will be used for the chat. + Mutually exclusive with previousChatId. + + stream : typing.Optional[bool] + Whether to stream the response or not. + + previous_chat_id : typing.Optional[str] + This is the ID of the chat that will be used as context for the new chat. + The messages from the previous chat will be used as context. + Mutually exclusive with sessionId. + + transport : typing.Optional[TwilioSmsChatTransport] + This is used to send the chat through a transport like SMS. + If transport.phoneNumberId and transport.customer are provided, creates a new session. + If sessionId is provided without transport fields, uses existing session data. + Cannot specify both sessionId and transport fields (phoneNumberId/customer) together. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[CreateResponseChatsResponse] + OpenAI Responses API format - either non-streaming or streaming + """ + _response = await self._client_wrapper.httpx_client.request( + "chat/responses", + method="POST", + json={ + "assistantId": assistant_id, + "assistant": convert_and_respect_annotation_metadata( + object_=assistant, annotation=CreateAssistantDto, direction="write" + ), + "assistantOverrides": convert_and_respect_annotation_metadata( + object_=assistant_overrides, annotation=AssistantOverrides, direction="write" + ), + "squadId": squad_id, + "squad": convert_and_respect_annotation_metadata( + object_=squad, annotation=CreateSquadDto, direction="write" + ), + "name": name, + "sessionId": session_id, + "input": convert_and_respect_annotation_metadata( + object_=input, annotation=OpenAiResponsesRequestInput, direction="write" + ), + "stream": stream, + "previousChatId": previous_chat_id, + "transport": convert_and_respect_annotation_metadata( + object_=transport, annotation=TwilioSmsChatTransport, direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + CreateResponseChatsResponse, + construct_type( + type_=CreateResponseChatsResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/vapi/chats/types/__init__.py b/src/vapi/chats/types/__init__.py new file mode 100644 index 00000000..b84fbbd5 --- /dev/null +++ b/src/vapi/chats/types/__init__.py @@ -0,0 +1,56 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .create_chat_dto_input import CreateChatDtoInput + from .create_chat_dto_input_one_item import CreateChatDtoInputOneItem + from .create_chats_response import CreateChatsResponse + from .create_response_chats_response import CreateResponseChatsResponse + from .list_chats_request_sort_order import ListChatsRequestSortOrder + from .open_ai_responses_request_input import OpenAiResponsesRequestInput + from .open_ai_responses_request_input_one_item import OpenAiResponsesRequestInputOneItem +_dynamic_imports: typing.Dict[str, str] = { + "CreateChatDtoInput": ".create_chat_dto_input", + "CreateChatDtoInputOneItem": ".create_chat_dto_input_one_item", + "CreateChatsResponse": ".create_chats_response", + "CreateResponseChatsResponse": ".create_response_chats_response", + "ListChatsRequestSortOrder": ".list_chats_request_sort_order", + "OpenAiResponsesRequestInput": ".open_ai_responses_request_input", + "OpenAiResponsesRequestInputOneItem": ".open_ai_responses_request_input_one_item", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = [ + "CreateChatDtoInput", + "CreateChatDtoInputOneItem", + "CreateChatsResponse", + "CreateResponseChatsResponse", + "ListChatsRequestSortOrder", + "OpenAiResponsesRequestInput", + "OpenAiResponsesRequestInputOneItem", +] diff --git a/src/vapi/chats/types/create_chat_dto_input.py b/src/vapi/chats/types/create_chat_dto_input.py new file mode 100644 index 00000000..0a260c95 --- /dev/null +++ b/src/vapi/chats/types/create_chat_dto_input.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .create_chat_dto_input_one_item import CreateChatDtoInputOneItem + +CreateChatDtoInput = typing.Union[str, typing.List[CreateChatDtoInputOneItem]] diff --git a/src/vapi/chats/types/create_chat_dto_input_one_item.py b/src/vapi/chats/types/create_chat_dto_input_one_item.py new file mode 100644 index 00000000..2896c456 --- /dev/null +++ b/src/vapi/chats/types/create_chat_dto_input_one_item.py @@ -0,0 +1,11 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from ...types.assistant_message import AssistantMessage +from ...types.developer_message import DeveloperMessage +from ...types.system_message import SystemMessage +from ...types.tool_message import ToolMessage +from ...types.user_message import UserMessage + +CreateChatDtoInputOneItem = typing.Union[SystemMessage, UserMessage, AssistantMessage, ToolMessage, DeveloperMessage] diff --git a/src/vapi/chats/types/create_chats_response.py b/src/vapi/chats/types/create_chats_response.py new file mode 100644 index 00000000..f63a5a15 --- /dev/null +++ b/src/vapi/chats/types/create_chats_response.py @@ -0,0 +1,8 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from ...types.chat import Chat +from ...types.create_chat_stream_response import CreateChatStreamResponse + +CreateChatsResponse = typing.Union[Chat, CreateChatStreamResponse] diff --git a/src/vapi/chats/types/create_response_chats_response.py b/src/vapi/chats/types/create_response_chats_response.py new file mode 100644 index 00000000..fa80e2f1 --- /dev/null +++ b/src/vapi/chats/types/create_response_chats_response.py @@ -0,0 +1,13 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from ...types.response_completed_event import ResponseCompletedEvent +from ...types.response_error_event import ResponseErrorEvent +from ...types.response_object import ResponseObject +from ...types.response_text_delta_event import ResponseTextDeltaEvent +from ...types.response_text_done_event import ResponseTextDoneEvent + +CreateResponseChatsResponse = typing.Union[ + ResponseObject, ResponseTextDeltaEvent, ResponseTextDoneEvent, ResponseCompletedEvent, ResponseErrorEvent +] diff --git a/src/vapi/chats/types/list_chats_request_sort_order.py b/src/vapi/chats/types/list_chats_request_sort_order.py new file mode 100644 index 00000000..fa641ca9 --- /dev/null +++ b/src/vapi/chats/types/list_chats_request_sort_order.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ListChatsRequestSortOrder = typing.Union[typing.Literal["ASC", "DESC"], typing.Any] diff --git a/src/vapi/chats/types/open_ai_responses_request_input.py b/src/vapi/chats/types/open_ai_responses_request_input.py new file mode 100644 index 00000000..4881f855 --- /dev/null +++ b/src/vapi/chats/types/open_ai_responses_request_input.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .open_ai_responses_request_input_one_item import OpenAiResponsesRequestInputOneItem + +OpenAiResponsesRequestInput = typing.Union[str, typing.List[OpenAiResponsesRequestInputOneItem]] diff --git a/src/vapi/chats/types/open_ai_responses_request_input_one_item.py b/src/vapi/chats/types/open_ai_responses_request_input_one_item.py new file mode 100644 index 00000000..4e90d1da --- /dev/null +++ b/src/vapi/chats/types/open_ai_responses_request_input_one_item.py @@ -0,0 +1,13 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from ...types.assistant_message import AssistantMessage +from ...types.developer_message import DeveloperMessage +from ...types.system_message import SystemMessage +from ...types.tool_message import ToolMessage +from ...types.user_message import UserMessage + +OpenAiResponsesRequestInputOneItem = typing.Union[ + SystemMessage, UserMessage, AssistantMessage, ToolMessage, DeveloperMessage +] diff --git a/src/vapi/client.py b/src/vapi/client.py index 3c805baa..5833beb0 100644 --- a/src/vapi/client.py +++ b/src/vapi/client.py @@ -1,28 +1,30 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .environment import VapiEnvironment + import httpx -from .core.client_wrapper import SyncClientWrapper -from .calls.client import CallsClient -from .assistants.client import AssistantsClient -from .phone_numbers.client import PhoneNumbersClient -from .squads.client import SquadsClient -from .blocks.client import BlocksClient -from .tools.client import ToolsClient -from .files.client import FilesClient -from .analytics.client import AnalyticsClient -from .logs.client import LogsClient -from .core.client_wrapper import AsyncClientWrapper -from .calls.client import AsyncCallsClient -from .assistants.client import AsyncAssistantsClient -from .phone_numbers.client import AsyncPhoneNumbersClient -from .squads.client import AsyncSquadsClient -from .blocks.client import AsyncBlocksClient -from .tools.client import AsyncToolsClient -from .files.client import AsyncFilesClient -from .analytics.client import AsyncAnalyticsClient -from .logs.client import AsyncLogsClient +from .core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .core.logging import LogConfig, Logger +from .environment import VapiEnvironment + +if typing.TYPE_CHECKING: + from .analytics.client import AnalyticsClient, AsyncAnalyticsClient + from .assistants.client import AssistantsClient, AsyncAssistantsClient + from .calls.client import AsyncCallsClient, CallsClient + from .campaigns.client import AsyncCampaignsClient, CampaignsClient + from .chats.client import AsyncChatsClient, ChatsClient + from .eval.client import AsyncEvalClient, EvalClient + from .files.client import AsyncFilesClient, FilesClient + from .insight.client import AsyncInsightClient, InsightClient + from .observability_scorecard.client import AsyncObservabilityScorecardClient, ObservabilityScorecardClient + from .phone_numbers.client import AsyncPhoneNumbersClient, PhoneNumbersClient + from .provider_resources.client import AsyncProviderResourcesClient, ProviderResourcesClient + from .sessions.client import AsyncSessionsClient, SessionsClient + from .squads.client import AsyncSquadsClient, SquadsClient + from .structured_outputs.client import AsyncStructuredOutputsClient, StructuredOutputsClient + from .tools.client import AsyncToolsClient, ToolsClient class Vapi: @@ -44,6 +46,9 @@ class Vapi: token : typing.Union[str, typing.Callable[[], str]] + headers : typing.Optional[typing.Dict[str, str]] + Additional headers to send with every request. + timeout : typing.Optional[float] The timeout to be used, in seconds, for requests. By default the timeout is 60 seconds, unless a custom httpx client is used, in which case this default is not enforced. @@ -53,6 +58,9 @@ class Vapi: httpx_client : typing.Optional[httpx.Client] The httpx client to use for making requests, a preconfigured client is used by default, however this is useful should you want to pass in any custom httpx configuration. + logging : typing.Optional[typing.Union[LogConfig, Logger]] + Configure logging for the SDK. Accepts a LogConfig dict with 'level' (debug/info/warn/error), 'logger' (custom logger implementation), and 'silent' (boolean, defaults to True) fields. You can also pass a pre-configured Logger instance. + Examples -------- from vapi import Vapi @@ -68,30 +76,180 @@ def __init__( base_url: typing.Optional[str] = None, environment: VapiEnvironment = VapiEnvironment.DEFAULT, token: typing.Union[str, typing.Callable[[], str]], + headers: typing.Optional[typing.Dict[str, str]] = None, timeout: typing.Optional[float] = None, follow_redirects: typing.Optional[bool] = True, httpx_client: typing.Optional[httpx.Client] = None, + logging: typing.Optional[typing.Union[LogConfig, Logger]] = None, ): - _defaulted_timeout = timeout if timeout is not None else 60 if httpx_client is None else None + _defaulted_timeout = ( + timeout if timeout is not None else 60 if httpx_client is None else httpx_client.timeout.read + ) self._client_wrapper = SyncClientWrapper( base_url=_get_base_url(base_url=base_url, environment=environment), token=token, + headers=headers, httpx_client=httpx_client if httpx_client is not None else httpx.Client(timeout=_defaulted_timeout, follow_redirects=follow_redirects) if follow_redirects is not None else httpx.Client(timeout=_defaulted_timeout), timeout=_defaulted_timeout, + logging=logging, ) - self.calls = CallsClient(client_wrapper=self._client_wrapper) - self.assistants = AssistantsClient(client_wrapper=self._client_wrapper) - self.phone_numbers = PhoneNumbersClient(client_wrapper=self._client_wrapper) - self.squads = SquadsClient(client_wrapper=self._client_wrapper) - self.blocks = BlocksClient(client_wrapper=self._client_wrapper) - self.tools = ToolsClient(client_wrapper=self._client_wrapper) - self.files = FilesClient(client_wrapper=self._client_wrapper) - self.analytics = AnalyticsClient(client_wrapper=self._client_wrapper) - self.logs = LogsClient(client_wrapper=self._client_wrapper) + self._assistants: typing.Optional[AssistantsClient] = None + self._squads: typing.Optional[SquadsClient] = None + self._calls: typing.Optional[CallsClient] = None + self._chats: typing.Optional[ChatsClient] = None + self._campaigns: typing.Optional[CampaignsClient] = None + self._sessions: typing.Optional[SessionsClient] = None + self._phone_numbers: typing.Optional[PhoneNumbersClient] = None + self._tools: typing.Optional[ToolsClient] = None + self._files: typing.Optional[FilesClient] = None + self._structured_outputs: typing.Optional[StructuredOutputsClient] = None + self._insight: typing.Optional[InsightClient] = None + self._eval: typing.Optional[EvalClient] = None + self._observability_scorecard: typing.Optional[ObservabilityScorecardClient] = None + self._provider_resources: typing.Optional[ProviderResourcesClient] = None + self._analytics: typing.Optional[AnalyticsClient] = None + + @property + def assistants(self): + if self._assistants is None: + from .assistants.client import AssistantsClient # noqa: E402 + + self._assistants = AssistantsClient(client_wrapper=self._client_wrapper) + return self._assistants + + @property + def squads(self): + if self._squads is None: + from .squads.client import SquadsClient # noqa: E402 + + self._squads = SquadsClient(client_wrapper=self._client_wrapper) + return self._squads + + @property + def calls(self): + if self._calls is None: + from .calls.client import CallsClient # noqa: E402 + + self._calls = CallsClient(client_wrapper=self._client_wrapper) + return self._calls + + @property + def chats(self): + if self._chats is None: + from .chats.client import ChatsClient # noqa: E402 + + self._chats = ChatsClient(client_wrapper=self._client_wrapper) + return self._chats + + @property + def campaigns(self): + if self._campaigns is None: + from .campaigns.client import CampaignsClient # noqa: E402 + + self._campaigns = CampaignsClient(client_wrapper=self._client_wrapper) + return self._campaigns + + @property + def sessions(self): + if self._sessions is None: + from .sessions.client import SessionsClient # noqa: E402 + + self._sessions = SessionsClient(client_wrapper=self._client_wrapper) + return self._sessions + + @property + def phone_numbers(self): + if self._phone_numbers is None: + from .phone_numbers.client import PhoneNumbersClient # noqa: E402 + + self._phone_numbers = PhoneNumbersClient(client_wrapper=self._client_wrapper) + return self._phone_numbers + + @property + def tools(self): + if self._tools is None: + from .tools.client import ToolsClient # noqa: E402 + + self._tools = ToolsClient(client_wrapper=self._client_wrapper) + return self._tools + + @property + def files(self): + if self._files is None: + from .files.client import FilesClient # noqa: E402 + + self._files = FilesClient(client_wrapper=self._client_wrapper) + return self._files + + @property + def structured_outputs(self): + if self._structured_outputs is None: + from .structured_outputs.client import StructuredOutputsClient # noqa: E402 + + self._structured_outputs = StructuredOutputsClient(client_wrapper=self._client_wrapper) + return self._structured_outputs + + @property + def insight(self): + if self._insight is None: + from .insight.client import InsightClient # noqa: E402 + + self._insight = InsightClient(client_wrapper=self._client_wrapper) + return self._insight + + @property + def eval(self): + if self._eval is None: + from .eval.client import EvalClient # noqa: E402 + + self._eval = EvalClient(client_wrapper=self._client_wrapper) + return self._eval + + @property + def observability_scorecard(self): + if self._observability_scorecard is None: + from .observability_scorecard.client import ObservabilityScorecardClient # noqa: E402 + + self._observability_scorecard = ObservabilityScorecardClient(client_wrapper=self._client_wrapper) + return self._observability_scorecard + + @property + def provider_resources(self): + if self._provider_resources is None: + from .provider_resources.client import ProviderResourcesClient # noqa: E402 + + self._provider_resources = ProviderResourcesClient(client_wrapper=self._client_wrapper) + return self._provider_resources + + @property + def analytics(self): + if self._analytics is None: + from .analytics.client import AnalyticsClient # noqa: E402 + + self._analytics = AnalyticsClient(client_wrapper=self._client_wrapper) + return self._analytics + + +def _make_default_async_client( + timeout: typing.Optional[float], + follow_redirects: typing.Optional[bool], +) -> httpx.AsyncClient: + try: + import httpx_aiohttp # type: ignore[import-not-found] + except ImportError: + pass + else: + if follow_redirects is not None: + return httpx_aiohttp.HttpxAiohttpClient(timeout=timeout, follow_redirects=follow_redirects) + return httpx_aiohttp.HttpxAiohttpClient(timeout=timeout) + + if follow_redirects is not None: + return httpx.AsyncClient(timeout=timeout, follow_redirects=follow_redirects) + return httpx.AsyncClient(timeout=timeout) class AsyncVapi: @@ -113,6 +271,12 @@ class AsyncVapi: token : typing.Union[str, typing.Callable[[], str]] + headers : typing.Optional[typing.Dict[str, str]] + Additional headers to send with every request. + + async_token : typing.Optional[typing.Callable[[], typing.Awaitable[str]]] + An async callable that returns a bearer token. Use this when token acquisition involves async I/O (e.g., refreshing tokens via an async HTTP client). When provided, this is used instead of the synchronous token for async requests. + timeout : typing.Optional[float] The timeout to be used, in seconds, for requests. By default the timeout is 60 seconds, unless a custom httpx client is used, in which case this default is not enforced. @@ -122,6 +286,9 @@ class AsyncVapi: httpx_client : typing.Optional[httpx.AsyncClient] The httpx client to use for making requests, a preconfigured client is used by default, however this is useful should you want to pass in any custom httpx configuration. + logging : typing.Optional[typing.Union[LogConfig, Logger]] + Configure logging for the SDK. Accepts a LogConfig dict with 'level' (debug/info/warn/error), 'logger' (custom logger implementation), and 'silent' (boolean, defaults to True) fields. You can also pass a pre-configured Logger instance. + Examples -------- from vapi import AsyncVapi @@ -137,30 +304,162 @@ def __init__( base_url: typing.Optional[str] = None, environment: VapiEnvironment = VapiEnvironment.DEFAULT, token: typing.Union[str, typing.Callable[[], str]], + headers: typing.Optional[typing.Dict[str, str]] = None, + async_token: typing.Optional[typing.Callable[[], typing.Awaitable[str]]] = None, timeout: typing.Optional[float] = None, follow_redirects: typing.Optional[bool] = True, httpx_client: typing.Optional[httpx.AsyncClient] = None, + logging: typing.Optional[typing.Union[LogConfig, Logger]] = None, ): - _defaulted_timeout = timeout if timeout is not None else 60 if httpx_client is None else None + _defaulted_timeout = ( + timeout if timeout is not None else 60 if httpx_client is None else httpx_client.timeout.read + ) self._client_wrapper = AsyncClientWrapper( base_url=_get_base_url(base_url=base_url, environment=environment), token=token, + headers=headers, + async_token=async_token, httpx_client=httpx_client if httpx_client is not None - else httpx.AsyncClient(timeout=_defaulted_timeout, follow_redirects=follow_redirects) - if follow_redirects is not None - else httpx.AsyncClient(timeout=_defaulted_timeout), + else _make_default_async_client(timeout=_defaulted_timeout, follow_redirects=follow_redirects), timeout=_defaulted_timeout, + logging=logging, ) - self.calls = AsyncCallsClient(client_wrapper=self._client_wrapper) - self.assistants = AsyncAssistantsClient(client_wrapper=self._client_wrapper) - self.phone_numbers = AsyncPhoneNumbersClient(client_wrapper=self._client_wrapper) - self.squads = AsyncSquadsClient(client_wrapper=self._client_wrapper) - self.blocks = AsyncBlocksClient(client_wrapper=self._client_wrapper) - self.tools = AsyncToolsClient(client_wrapper=self._client_wrapper) - self.files = AsyncFilesClient(client_wrapper=self._client_wrapper) - self.analytics = AsyncAnalyticsClient(client_wrapper=self._client_wrapper) - self.logs = AsyncLogsClient(client_wrapper=self._client_wrapper) + self._assistants: typing.Optional[AsyncAssistantsClient] = None + self._squads: typing.Optional[AsyncSquadsClient] = None + self._calls: typing.Optional[AsyncCallsClient] = None + self._chats: typing.Optional[AsyncChatsClient] = None + self._campaigns: typing.Optional[AsyncCampaignsClient] = None + self._sessions: typing.Optional[AsyncSessionsClient] = None + self._phone_numbers: typing.Optional[AsyncPhoneNumbersClient] = None + self._tools: typing.Optional[AsyncToolsClient] = None + self._files: typing.Optional[AsyncFilesClient] = None + self._structured_outputs: typing.Optional[AsyncStructuredOutputsClient] = None + self._insight: typing.Optional[AsyncInsightClient] = None + self._eval: typing.Optional[AsyncEvalClient] = None + self._observability_scorecard: typing.Optional[AsyncObservabilityScorecardClient] = None + self._provider_resources: typing.Optional[AsyncProviderResourcesClient] = None + self._analytics: typing.Optional[AsyncAnalyticsClient] = None + + @property + def assistants(self): + if self._assistants is None: + from .assistants.client import AsyncAssistantsClient # noqa: E402 + + self._assistants = AsyncAssistantsClient(client_wrapper=self._client_wrapper) + return self._assistants + + @property + def squads(self): + if self._squads is None: + from .squads.client import AsyncSquadsClient # noqa: E402 + + self._squads = AsyncSquadsClient(client_wrapper=self._client_wrapper) + return self._squads + + @property + def calls(self): + if self._calls is None: + from .calls.client import AsyncCallsClient # noqa: E402 + + self._calls = AsyncCallsClient(client_wrapper=self._client_wrapper) + return self._calls + + @property + def chats(self): + if self._chats is None: + from .chats.client import AsyncChatsClient # noqa: E402 + + self._chats = AsyncChatsClient(client_wrapper=self._client_wrapper) + return self._chats + + @property + def campaigns(self): + if self._campaigns is None: + from .campaigns.client import AsyncCampaignsClient # noqa: E402 + + self._campaigns = AsyncCampaignsClient(client_wrapper=self._client_wrapper) + return self._campaigns + + @property + def sessions(self): + if self._sessions is None: + from .sessions.client import AsyncSessionsClient # noqa: E402 + + self._sessions = AsyncSessionsClient(client_wrapper=self._client_wrapper) + return self._sessions + + @property + def phone_numbers(self): + if self._phone_numbers is None: + from .phone_numbers.client import AsyncPhoneNumbersClient # noqa: E402 + + self._phone_numbers = AsyncPhoneNumbersClient(client_wrapper=self._client_wrapper) + return self._phone_numbers + + @property + def tools(self): + if self._tools is None: + from .tools.client import AsyncToolsClient # noqa: E402 + + self._tools = AsyncToolsClient(client_wrapper=self._client_wrapper) + return self._tools + + @property + def files(self): + if self._files is None: + from .files.client import AsyncFilesClient # noqa: E402 + + self._files = AsyncFilesClient(client_wrapper=self._client_wrapper) + return self._files + + @property + def structured_outputs(self): + if self._structured_outputs is None: + from .structured_outputs.client import AsyncStructuredOutputsClient # noqa: E402 + + self._structured_outputs = AsyncStructuredOutputsClient(client_wrapper=self._client_wrapper) + return self._structured_outputs + + @property + def insight(self): + if self._insight is None: + from .insight.client import AsyncInsightClient # noqa: E402 + + self._insight = AsyncInsightClient(client_wrapper=self._client_wrapper) + return self._insight + + @property + def eval(self): + if self._eval is None: + from .eval.client import AsyncEvalClient # noqa: E402 + + self._eval = AsyncEvalClient(client_wrapper=self._client_wrapper) + return self._eval + + @property + def observability_scorecard(self): + if self._observability_scorecard is None: + from .observability_scorecard.client import AsyncObservabilityScorecardClient # noqa: E402 + + self._observability_scorecard = AsyncObservabilityScorecardClient(client_wrapper=self._client_wrapper) + return self._observability_scorecard + + @property + def provider_resources(self): + if self._provider_resources is None: + from .provider_resources.client import AsyncProviderResourcesClient # noqa: E402 + + self._provider_resources = AsyncProviderResourcesClient(client_wrapper=self._client_wrapper) + return self._provider_resources + + @property + def analytics(self): + if self._analytics is None: + from .analytics.client import AsyncAnalyticsClient # noqa: E402 + + self._analytics = AsyncAnalyticsClient(client_wrapper=self._client_wrapper) + return self._analytics def _get_base_url(*, base_url: typing.Optional[str] = None, environment: VapiEnvironment) -> str: diff --git a/src/vapi/core/__init__.py b/src/vapi/core/__init__.py index 42031ad0..3b227d7f 100644 --- a/src/vapi/core/__init__.py +++ b/src/vapi/core/__init__.py @@ -1,46 +1,128 @@ # This file was auto-generated by Fern from our API Definition. -from .api_error import ApiError -from .client_wrapper import AsyncClientWrapper, BaseClientWrapper, SyncClientWrapper -from .datetime_utils import serialize_datetime -from .file import File, convert_file_dict_to_httpx_tuples, with_content_type -from .http_client import AsyncHttpClient, HttpClient -from .jsonable_encoder import jsonable_encoder -from .pagination import AsyncPager, SyncPager -from .pydantic_utilities import ( - IS_PYDANTIC_V2, - UniversalBaseModel, - UniversalRootModel, - parse_obj_as, - universal_field_validator, - universal_root_validator, - update_forward_refs, -) -from .query_encoder import encode_query -from .remove_none_from_dict import remove_none_from_dict -from .request_options import RequestOptions -from .serialization import FieldMetadata, convert_and_respect_annotation_metadata +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .api_error import ApiError + from .client_wrapper import AsyncClientWrapper, BaseClientWrapper, SyncClientWrapper + from .datetime_utils import Rfc2822DateTime, parse_rfc2822_datetime, serialize_datetime + from .file import File, convert_file_dict_to_httpx_tuples, with_content_type + from .http_client import AsyncHttpClient, HttpClient + from .http_response import AsyncHttpResponse, HttpResponse + from .jsonable_encoder import jsonable_encoder + from .logging import ConsoleLogger, ILogger, LogConfig, LogLevel, Logger, create_logger + from .parse_error import ParsingError + from .pydantic_utilities import ( + IS_PYDANTIC_V2, + UniversalBaseModel, + UniversalRootModel, + parse_obj_as, + universal_field_validator, + universal_root_validator, + update_forward_refs, + ) + from .query_encoder import encode_query + from .remove_none_from_dict import remove_none_from_dict + from .request_options import RequestOptions + from .serialization import FieldMetadata, convert_and_respect_annotation_metadata + from .unchecked_base_model import UncheckedBaseModel, UnionMetadata, construct_type +_dynamic_imports: typing.Dict[str, str] = { + "ApiError": ".api_error", + "AsyncClientWrapper": ".client_wrapper", + "AsyncHttpClient": ".http_client", + "AsyncHttpResponse": ".http_response", + "BaseClientWrapper": ".client_wrapper", + "ConsoleLogger": ".logging", + "FieldMetadata": ".serialization", + "File": ".file", + "HttpClient": ".http_client", + "HttpResponse": ".http_response", + "ILogger": ".logging", + "IS_PYDANTIC_V2": ".pydantic_utilities", + "LogConfig": ".logging", + "LogLevel": ".logging", + "Logger": ".logging", + "ParsingError": ".parse_error", + "RequestOptions": ".request_options", + "Rfc2822DateTime": ".datetime_utils", + "SyncClientWrapper": ".client_wrapper", + "UncheckedBaseModel": ".unchecked_base_model", + "UnionMetadata": ".unchecked_base_model", + "UniversalBaseModel": ".pydantic_utilities", + "UniversalRootModel": ".pydantic_utilities", + "construct_type": ".unchecked_base_model", + "convert_and_respect_annotation_metadata": ".serialization", + "convert_file_dict_to_httpx_tuples": ".file", + "create_logger": ".logging", + "encode_query": ".query_encoder", + "jsonable_encoder": ".jsonable_encoder", + "parse_obj_as": ".pydantic_utilities", + "parse_rfc2822_datetime": ".datetime_utils", + "remove_none_from_dict": ".remove_none_from_dict", + "serialize_datetime": ".datetime_utils", + "universal_field_validator": ".pydantic_utilities", + "universal_root_validator": ".pydantic_utilities", + "update_forward_refs": ".pydantic_utilities", + "with_content_type": ".file", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "ApiError", "AsyncClientWrapper", "AsyncHttpClient", - "AsyncPager", + "AsyncHttpResponse", "BaseClientWrapper", + "ConsoleLogger", "FieldMetadata", "File", "HttpClient", + "HttpResponse", + "ILogger", "IS_PYDANTIC_V2", + "LogConfig", + "LogLevel", + "Logger", + "ParsingError", "RequestOptions", + "Rfc2822DateTime", "SyncClientWrapper", - "SyncPager", + "UncheckedBaseModel", + "UnionMetadata", "UniversalBaseModel", "UniversalRootModel", + "construct_type", "convert_and_respect_annotation_metadata", "convert_file_dict_to_httpx_tuples", + "create_logger", "encode_query", "jsonable_encoder", "parse_obj_as", + "parse_rfc2822_datetime", "remove_none_from_dict", "serialize_datetime", "universal_field_validator", diff --git a/src/vapi/core/api_error.py b/src/vapi/core/api_error.py index 2e9fc543..6f850a60 100644 --- a/src/vapi/core/api_error.py +++ b/src/vapi/core/api_error.py @@ -1,15 +1,23 @@ # This file was auto-generated by Fern from our API Definition. -import typing +from typing import Any, Dict, Optional class ApiError(Exception): - status_code: typing.Optional[int] - body: typing.Any + headers: Optional[Dict[str, str]] + status_code: Optional[int] + body: Any - def __init__(self, *, status_code: typing.Optional[int] = None, body: typing.Any = None): + def __init__( + self, + *, + headers: Optional[Dict[str, str]] = None, + status_code: Optional[int] = None, + body: Any = None, + ) -> None: + self.headers = headers self.status_code = status_code self.body = body def __str__(self) -> str: - return f"status_code: {self.status_code}, body: {self.body}" + return f"headers: {self.headers}, status_code: {self.status_code}, body: {self.body}" diff --git a/src/vapi/core/client_wrapper.py b/src/vapi/core/client_wrapper.py index 0d1d097f..f0001ffb 100644 --- a/src/vapi/core/client_wrapper.py +++ b/src/vapi/core/client_wrapper.py @@ -1,9 +1,10 @@ # This file was auto-generated by Fern from our API Definition. import typing + import httpx -from .http_client import HttpClient -from .http_client import AsyncHttpClient +from .http_client import AsyncHttpClient, HttpClient +from .logging import LogConfig, Logger class BaseClientWrapper: @@ -11,18 +12,28 @@ def __init__( self, *, token: typing.Union[str, typing.Callable[[], str]], + headers: typing.Optional[typing.Dict[str, str]] = None, base_url: str, timeout: typing.Optional[float] = None, + logging: typing.Optional[typing.Union[LogConfig, Logger]] = None, ): self._token = token + self._headers = headers self._base_url = base_url self._timeout = timeout + self._logging = logging def get_headers(self) -> typing.Dict[str, str]: + import platform + headers: typing.Dict[str, str] = { + "User-Agent": "vapi_server_sdk/2.0.0", "X-Fern-Language": "Python", + "X-Fern-Runtime": f"python/{platform.python_version()}", + "X-Fern-Platform": f"{platform.system().lower()}/{platform.release()}", "X-Fern-SDK-Name": "vapi_server_sdk", - "X-Fern-SDK-Version": "0.1.0", + "X-Fern-SDK-Version": "2.0.0", + **(self.get_custom_headers() or {}), } headers["Authorization"] = f"Bearer {self._get_token()}" return headers @@ -33,6 +44,9 @@ def _get_token(self) -> str: else: return self._token() + def get_custom_headers(self) -> typing.Optional[typing.Dict[str, str]]: + return self._headers + def get_base_url(self) -> str: return self._base_url @@ -45,16 +59,19 @@ def __init__( self, *, token: typing.Union[str, typing.Callable[[], str]], + headers: typing.Optional[typing.Dict[str, str]] = None, base_url: str, timeout: typing.Optional[float] = None, + logging: typing.Optional[typing.Union[LogConfig, Logger]] = None, httpx_client: httpx.Client, ): - super().__init__(token=token, base_url=base_url, timeout=timeout) + super().__init__(token=token, headers=headers, base_url=base_url, timeout=timeout, logging=logging) self.httpx_client = HttpClient( httpx_client=httpx_client, base_headers=self.get_headers, base_timeout=self.get_timeout, base_url=self.get_base_url, + logging_config=self._logging, ) @@ -63,14 +80,27 @@ def __init__( self, *, token: typing.Union[str, typing.Callable[[], str]], + headers: typing.Optional[typing.Dict[str, str]] = None, base_url: str, timeout: typing.Optional[float] = None, + logging: typing.Optional[typing.Union[LogConfig, Logger]] = None, + async_token: typing.Optional[typing.Callable[[], typing.Awaitable[str]]] = None, httpx_client: httpx.AsyncClient, ): - super().__init__(token=token, base_url=base_url, timeout=timeout) + super().__init__(token=token, headers=headers, base_url=base_url, timeout=timeout, logging=logging) + self._async_token = async_token self.httpx_client = AsyncHttpClient( httpx_client=httpx_client, base_headers=self.get_headers, base_timeout=self.get_timeout, base_url=self.get_base_url, + async_base_headers=self.async_get_headers, + logging_config=self._logging, ) + + async def async_get_headers(self) -> typing.Dict[str, str]: + headers = self.get_headers() + if self._async_token is not None: + token = await self._async_token() + headers["Authorization"] = f"Bearer {token}" + return headers diff --git a/src/vapi/core/datetime_utils.py b/src/vapi/core/datetime_utils.py index 7c9864a9..a12b2ad0 100644 --- a/src/vapi/core/datetime_utils.py +++ b/src/vapi/core/datetime_utils.py @@ -1,6 +1,48 @@ # This file was auto-generated by Fern from our API Definition. import datetime as dt +from email.utils import parsedate_to_datetime +from typing import Any + +import pydantic + +IS_PYDANTIC_V2 = pydantic.VERSION.startswith("2.") + + +def parse_rfc2822_datetime(v: Any) -> dt.datetime: + """ + Parse an RFC 2822 datetime string (e.g., "Wed, 02 Oct 2002 13:00:00 GMT") + into a datetime object. If the value is already a datetime, return it as-is. + Falls back to ISO 8601 parsing if RFC 2822 parsing fails. + """ + if isinstance(v, dt.datetime): + return v + if isinstance(v, str): + try: + return parsedate_to_datetime(v) + except Exception: + pass + # Fallback to ISO 8601 parsing + return dt.datetime.fromisoformat(v.replace("Z", "+00:00")) + raise ValueError(f"Expected str or datetime, got {type(v)}") + + +class Rfc2822DateTime(dt.datetime): + """A datetime subclass that parses RFC 2822 date strings. + + On Pydantic V1, uses __get_validators__ for pre-validation. + On Pydantic V2, uses __get_pydantic_core_schema__ for BeforeValidator-style parsing. + """ + + @classmethod + def __get_validators__(cls): # type: ignore[no-untyped-def] + yield parse_rfc2822_datetime + + @classmethod + def __get_pydantic_core_schema__(cls, _source_type: Any, _handler: Any) -> Any: # type: ignore[override] + from pydantic_core import core_schema + + return core_schema.no_info_before_validator_function(parse_rfc2822_datetime, core_schema.datetime_schema()) def serialize_datetime(v: dt.datetime) -> str: diff --git a/src/vapi/core/file.py b/src/vapi/core/file.py index b4cbba30..44b0d27c 100644 --- a/src/vapi/core/file.py +++ b/src/vapi/core/file.py @@ -43,20 +43,25 @@ def convert_file_dict_to_httpx_tuples( return httpx_tuples -def with_content_type(*, file: File, content_type: str) -> File: - """ """ +def with_content_type(*, file: File, default_content_type: str) -> File: + """ + This function resolves to the file's content type, if provided, and defaults + to the default_content_type value if not. + """ if isinstance(file, tuple): if len(file) == 2: filename, content = cast(Tuple[Optional[str], FileContent], file) # type: ignore - return (filename, content, content_type) + return (filename, content, default_content_type) elif len(file) == 3: - filename, content, _ = cast(Tuple[Optional[str], FileContent, Optional[str]], file) # type: ignore - return (filename, content, content_type) + filename, content, file_content_type = cast(Tuple[Optional[str], FileContent, Optional[str]], file) # type: ignore + out_content_type = file_content_type or default_content_type + return (filename, content, out_content_type) elif len(file) == 4: - filename, content, _, headers = cast( # type: ignore + filename, content, file_content_type, headers = cast( # type: ignore Tuple[Optional[str], FileContent, Optional[str], Mapping[str, str]], file ) - return (filename, content, content_type, headers) + out_content_type = file_content_type or default_content_type + return (filename, content, out_content_type, headers) else: raise ValueError(f"Unexpected tuple length: {len(file)}") - return (None, file, content_type) + return (None, file, default_content_type) diff --git a/src/vapi/core/force_multipart.py b/src/vapi/core/force_multipart.py new file mode 100644 index 00000000..5440913f --- /dev/null +++ b/src/vapi/core/force_multipart.py @@ -0,0 +1,18 @@ +# This file was auto-generated by Fern from our API Definition. + +from typing import Any, Dict + + +class ForceMultipartDict(Dict[str, Any]): + """ + A dictionary subclass that always evaluates to True in boolean contexts. + + This is used to force multipart/form-data encoding in HTTP requests even when + the dictionary is empty, which would normally evaluate to False. + """ + + def __bool__(self) -> bool: + return True + + +FORCE_MULTIPART = ForceMultipartDict() diff --git a/src/vapi/core/http_client.py b/src/vapi/core/http_client.py index eb4e8943..f0a39ca8 100644 --- a/src/vapi/core/http_client.py +++ b/src/vapi/core/http_client.py @@ -2,25 +2,25 @@ import asyncio import email.utils -import json import re import time import typing -import urllib.parse from contextlib import asynccontextmanager, contextmanager from random import random import httpx - from .file import File, convert_file_dict_to_httpx_tuples +from .force_multipart import FORCE_MULTIPART from .jsonable_encoder import jsonable_encoder +from .logging import LogConfig, Logger, create_logger from .query_encoder import encode_query -from .remove_none_from_dict import remove_none_from_dict +from .remove_none_from_dict import remove_none_from_dict as remove_none_from_dict from .request_options import RequestOptions +from httpx._types import RequestFiles -INITIAL_RETRY_DELAY_SECONDS = 0.5 -MAX_RETRY_DELAY_SECONDS = 10 -MAX_RETRY_DELAY_SECONDS_FROM_HEADER = 30 +INITIAL_RETRY_DELAY_SECONDS = 1.0 +MAX_RETRY_DELAY_SECONDS = 60.0 +JITTER_FACTOR = 0.2 # 20% random jitter def _parse_retry_after(response_headers: httpx.Headers) -> typing.Optional[float]: @@ -64,6 +64,38 @@ def _parse_retry_after(response_headers: httpx.Headers) -> typing.Optional[float return seconds +def _add_positive_jitter(delay: float) -> float: + """Add positive jitter (0-20%) to prevent thundering herd.""" + jitter_multiplier = 1 + random() * JITTER_FACTOR + return delay * jitter_multiplier + + +def _add_symmetric_jitter(delay: float) -> float: + """Add symmetric jitter (±10%) for exponential backoff.""" + jitter_multiplier = 1 + (random() - 0.5) * JITTER_FACTOR + return delay * jitter_multiplier + + +def _parse_x_ratelimit_reset(response_headers: httpx.Headers) -> typing.Optional[float]: + """ + Parse the X-RateLimit-Reset header (Unix timestamp in seconds). + Returns seconds to wait, or None if header is missing/invalid. + """ + reset_time_str = response_headers.get("x-ratelimit-reset") + if reset_time_str is None: + return None + + try: + reset_time = int(reset_time_str) + delay = reset_time - time.time() + if delay > 0: + return delay + except (ValueError, TypeError): + pass + + return None + + def _retry_timeout(response: httpx.Response, retries: int) -> float: """ Determine the amount of time to wait before retrying a request. @@ -71,22 +103,95 @@ def _retry_timeout(response: httpx.Response, retries: int) -> float: with a jitter to determine the number of seconds to wait. """ - # If the API asks us to wait a certain amount of time (and it's a reasonable amount), just do what it says. + # 1. Check Retry-After header first retry_after = _parse_retry_after(response.headers) - if retry_after is not None and retry_after <= MAX_RETRY_DELAY_SECONDS_FROM_HEADER: - return retry_after + if retry_after is not None and retry_after > 0: + return min(retry_after, MAX_RETRY_DELAY_SECONDS) + + # 2. Check X-RateLimit-Reset header (with positive jitter) + ratelimit_reset = _parse_x_ratelimit_reset(response.headers) + if ratelimit_reset is not None: + return _add_positive_jitter(min(ratelimit_reset, MAX_RETRY_DELAY_SECONDS)) - # Apply exponential backoff, capped at MAX_RETRY_DELAY_SECONDS. - retry_delay = min(INITIAL_RETRY_DELAY_SECONDS * pow(2.0, retries), MAX_RETRY_DELAY_SECONDS) + # 3. Fall back to exponential backoff (with symmetric jitter) + backoff = min(INITIAL_RETRY_DELAY_SECONDS * pow(2.0, retries), MAX_RETRY_DELAY_SECONDS) + return _add_symmetric_jitter(backoff) - # Add a randomness / jitter to the retry delay to avoid overwhelming the server with retries. - timeout = retry_delay * (1 - 0.25 * random()) - return timeout if timeout >= 0 else 0 + +def _retry_timeout_from_retries(retries: int) -> float: + """Determine retry timeout using exponential backoff when no response is available.""" + backoff = min(INITIAL_RETRY_DELAY_SECONDS * pow(2.0, retries), MAX_RETRY_DELAY_SECONDS) + return _add_symmetric_jitter(backoff) def _should_retry(response: httpx.Response) -> bool: - retriable_400s = [429, 408, 409] - return response.status_code >= 500 or response.status_code in retriable_400s + retryable_400s = [429, 408, 409] + return response.status_code >= 500 or response.status_code in retryable_400s + + +_SENSITIVE_HEADERS = frozenset( + { + "authorization", + "www-authenticate", + "x-api-key", + "api-key", + "apikey", + "x-api-token", + "x-auth-token", + "auth-token", + "cookie", + "set-cookie", + "proxy-authorization", + "proxy-authenticate", + "x-csrf-token", + "x-xsrf-token", + "x-session-token", + "x-access-token", + } +) + + +def _redact_headers(headers: typing.Dict[str, str]) -> typing.Dict[str, str]: + return {k: ("[REDACTED]" if k.lower() in _SENSITIVE_HEADERS else v) for k, v in headers.items()} + + +def _build_url(base_url: str, path: typing.Optional[str]) -> str: + """ + Build a full URL by joining a base URL with a path. + + This function correctly handles base URLs that contain path prefixes (e.g., tenant-based URLs) + by using string concatenation instead of urllib.parse.urljoin(), which would incorrectly + strip path components when the path starts with '/'. + + Example: + >>> _build_url("https://cloud.example.com/org/tenant/api", "/users") + 'https://cloud.example.com/org/tenant/api/users' + + Args: + base_url: The base URL, which may contain path prefixes. + path: The path to append. Can be None or empty string. + + Returns: + The full URL with base_url and path properly joined. + """ + if not path: + return base_url + return f"{base_url.rstrip('/')}/{path.lstrip('/')}" + + +def _maybe_filter_none_from_multipart_data( + data: typing.Optional[typing.Any], + request_files: typing.Optional[RequestFiles], + force_multipart: typing.Optional[bool], +) -> typing.Optional[typing.Any]: + """ + Filter None values from data body for multipart/form requests. + This prevents httpx from converting None to empty strings in multipart encoding. + Only applies when files are present or force_multipart is True. + """ + if data is not None and isinstance(data, typing.Mapping) and (request_files or force_multipart): + return remove_none_from_dict(data) + return data def remove_omit_from_dict( @@ -143,8 +248,19 @@ def get_request_body( # If both data and json are None, we send json data in the event extra properties are specified json_body = maybe_filter_request_body(json, request_options, omit) - # If you have an empty JSON body, you should just send None - return (json_body if json_body != {} else None), data_body if data_body != {} else None + has_additional_body_parameters = bool( + request_options is not None and request_options.get("additional_body_parameters") + ) + + # Only collapse empty dict to None when the body was not explicitly provided + # and there are no additional body parameters. This preserves explicit empty + # bodies (e.g., when an endpoint has a request body type but all fields are optional). + if json_body == {} and json is None and not has_additional_body_parameters: + json_body = None + if data_body == {} and data is None and not has_additional_body_parameters: + data_body = None + + return json_body, data_body class HttpClient: @@ -155,11 +271,15 @@ def __init__( base_timeout: typing.Callable[[], typing.Optional[float]], base_headers: typing.Callable[[], typing.Dict[str, str]], base_url: typing.Optional[typing.Callable[[], str]] = None, + base_max_retries: int = 2, + logging_config: typing.Optional[typing.Union[LogConfig, Logger]] = None, ): self.base_url = base_url self.base_timeout = base_timeout self.base_headers = base_headers + self.base_max_retries = base_max_retries self.httpx_client = httpx_client + self.logger = create_logger(logging_config) def get_base_url(self, maybe_base_url: typing.Optional[str]) -> str: base_url = maybe_base_url @@ -180,11 +300,17 @@ def request( json: typing.Optional[typing.Any] = None, data: typing.Optional[typing.Any] = None, content: typing.Optional[typing.Union[bytes, typing.Iterator[bytes], typing.AsyncIterator[bytes]]] = None, - files: typing.Optional[typing.Dict[str, typing.Optional[typing.Union[File, typing.List[File]]]]] = None, + files: typing.Optional[ + typing.Union[ + typing.Dict[str, typing.Optional[typing.Union[File, typing.List[File]]]], + typing.List[typing.Tuple[str, File]], + ] + ] = None, headers: typing.Optional[typing.Dict[str, typing.Any]] = None, request_options: typing.Optional[RequestOptions] = None, retries: int = 0, omit: typing.Optional[typing.Any] = None, + force_multipart: typing.Optional[bool] = None, ) -> httpx.Response: base_url = self.get_base_url(base_url) timeout = ( @@ -195,47 +321,97 @@ def request( json_body, data_body = get_request_body(json=json, data=data, request_options=request_options, omit=omit) - response = self.httpx_client.request( - method=method, - url=urllib.parse.urljoin(f"{base_url}/", path), - headers=jsonable_encoder( + request_files: typing.Optional[RequestFiles] = ( + convert_file_dict_to_httpx_tuples(remove_omit_from_dict(remove_none_from_dict(files), omit)) + if (files is not None and files is not omit and isinstance(files, dict)) + else None + ) + + if (request_files is None or len(request_files) == 0) and force_multipart: + request_files = FORCE_MULTIPART + + data_body = _maybe_filter_none_from_multipart_data(data_body, request_files, force_multipart) + + # Compute encoded params separately to avoid passing empty list to httpx + # (httpx strips existing query params from URL when params=[] is passed) + _encoded_params = encode_query( + jsonable_encoder( remove_none_from_dict( - { - **self.base_headers(), - **(headers if headers is not None else {}), - **(request_options.get("additional_headers", {}) or {} if request_options is not None else {}), - } - ) - ), - params=encode_query( - jsonable_encoder( - remove_none_from_dict( - remove_omit_from_dict( - { - **(params if params is not None else {}), - **( - request_options.get("additional_query_parameters", {}) or {} - if request_options is not None - else {} - ), - }, - omit, - ) + remove_omit_from_dict( + { + **(params if params is not None else {}), + **( + request_options.get("additional_query_parameters", {}) or {} + if request_options is not None + else {} + ), + }, + omit, ) ) - ), - json=json_body, - data=data_body, - content=content, - files=convert_file_dict_to_httpx_tuples(remove_none_from_dict(files)) - if (files is not None and files is not omit) - else None, - timeout=timeout, + ) + ) + + _request_url = _build_url(base_url, path) + _request_headers = jsonable_encoder( + remove_none_from_dict( + { + **self.base_headers(), + **(headers if headers is not None else {}), + **(request_options.get("additional_headers", {}) or {} if request_options is not None else {}), + } + ) + ) + + if self.logger.is_debug(): + self.logger.debug( + "Making HTTP request", + method=method, + url=_request_url, + headers=_redact_headers(_request_headers), + has_body=json_body is not None or data_body is not None, + ) + + max_retries: int = ( + request_options.get("max_retries", self.base_max_retries) + if request_options is not None + else self.base_max_retries ) - max_retries: int = request_options.get("max_retries", 0) if request_options is not None else 0 + try: + response = self.httpx_client.request( + method=method, + url=_request_url, + headers=_request_headers, + params=_encoded_params if _encoded_params else None, + json=json_body, + data=data_body, + content=content, + files=request_files, + timeout=timeout, + ) + except (httpx.ConnectError, httpx.RemoteProtocolError): + if retries < max_retries: + time.sleep(_retry_timeout_from_retries(retries=retries)) + return self.request( + path=path, + method=method, + base_url=base_url, + params=params, + json=json, + data=data, + content=content, + files=files, + headers=headers, + request_options=request_options, + retries=retries + 1, + omit=omit, + force_multipart=force_multipart, + ) + raise + if _should_retry(response=response): - if max_retries > retries: + if retries < max_retries: time.sleep(_retry_timeout(response=response, retries=retries)) return self.request( path=path, @@ -243,12 +419,32 @@ def request( base_url=base_url, params=params, json=json, + data=data, content=content, files=files, headers=headers, request_options=request_options, retries=retries + 1, omit=omit, + force_multipart=force_multipart, + ) + + if self.logger.is_debug(): + if 200 <= response.status_code < 400: + self.logger.debug( + "HTTP request succeeded", + method=method, + url=_request_url, + status_code=response.status_code, + ) + + if self.logger.is_error(): + if response.status_code >= 400: + self.logger.error( + "HTTP request failed with error status", + method=method, + url=_request_url, + status_code=response.status_code, ) return response @@ -264,11 +460,17 @@ def stream( json: typing.Optional[typing.Any] = None, data: typing.Optional[typing.Any] = None, content: typing.Optional[typing.Union[bytes, typing.Iterator[bytes], typing.AsyncIterator[bytes]]] = None, - files: typing.Optional[typing.Dict[str, typing.Optional[typing.Union[File, typing.List[File]]]]] = None, + files: typing.Optional[ + typing.Union[ + typing.Dict[str, typing.Optional[typing.Union[File, typing.List[File]]]], + typing.List[typing.Tuple[str, File]], + ] + ] = None, headers: typing.Optional[typing.Dict[str, typing.Any]] = None, request_options: typing.Optional[RequestOptions] = None, retries: int = 0, omit: typing.Optional[typing.Any] = None, + force_multipart: typing.Optional[bool] = None, ) -> typing.Iterator[httpx.Response]: base_url = self.get_base_url(base_url) timeout = ( @@ -277,43 +479,67 @@ def stream( else self.base_timeout() ) + request_files: typing.Optional[RequestFiles] = ( + convert_file_dict_to_httpx_tuples(remove_omit_from_dict(remove_none_from_dict(files), omit)) + if (files is not None and files is not omit and isinstance(files, dict)) + else None + ) + + if (request_files is None or len(request_files) == 0) and force_multipart: + request_files = FORCE_MULTIPART + json_body, data_body = get_request_body(json=json, data=data, request_options=request_options, omit=omit) - with self.httpx_client.stream( - method=method, - url=urllib.parse.urljoin(f"{base_url}/", path), - headers=jsonable_encoder( + data_body = _maybe_filter_none_from_multipart_data(data_body, request_files, force_multipart) + + # Compute encoded params separately to avoid passing empty list to httpx + # (httpx strips existing query params from URL when params=[] is passed) + _encoded_params = encode_query( + jsonable_encoder( remove_none_from_dict( - { - **self.base_headers(), - **(headers if headers is not None else {}), - **(request_options.get("additional_headers", {}) if request_options is not None else {}), - } - ) - ), - params=encode_query( - jsonable_encoder( - remove_none_from_dict( - remove_omit_from_dict( - { - **(params if params is not None else {}), - **( - request_options.get("additional_query_parameters", {}) - if request_options is not None - else {} - ), - }, - omit, - ) + remove_omit_from_dict( + { + **(params if params is not None else {}), + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + }, + omit, ) ) - ), + ) + ) + + _request_url = _build_url(base_url, path) + _request_headers = jsonable_encoder( + remove_none_from_dict( + { + **self.base_headers(), + **(headers if headers is not None else {}), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ) + + if self.logger.is_debug(): + self.logger.debug( + "Making streaming HTTP request", + method=method, + url=_request_url, + headers=_redact_headers(_request_headers), + ) + + with self.httpx_client.stream( + method=method, + url=_request_url, + headers=_request_headers, + params=_encoded_params if _encoded_params else None, json=json_body, data=data_body, content=content, - files=convert_file_dict_to_httpx_tuples(remove_none_from_dict(files)) - if (files is not None and files is not omit) - else None, + files=request_files, timeout=timeout, ) as stream: yield stream @@ -327,11 +553,22 @@ def __init__( base_timeout: typing.Callable[[], typing.Optional[float]], base_headers: typing.Callable[[], typing.Dict[str, str]], base_url: typing.Optional[typing.Callable[[], str]] = None, + base_max_retries: int = 2, + async_base_headers: typing.Optional[typing.Callable[[], typing.Awaitable[typing.Dict[str, str]]]] = None, + logging_config: typing.Optional[typing.Union[LogConfig, Logger]] = None, ): self.base_url = base_url self.base_timeout = base_timeout self.base_headers = base_headers + self.base_max_retries = base_max_retries + self.async_base_headers = async_base_headers self.httpx_client = httpx_client + self.logger = create_logger(logging_config) + + async def _get_headers(self) -> typing.Dict[str, str]: + if self.async_base_headers is not None: + return await self.async_base_headers() + return self.base_headers() def get_base_url(self, maybe_base_url: typing.Optional[str]) -> str: base_url = maybe_base_url @@ -352,11 +589,17 @@ async def request( json: typing.Optional[typing.Any] = None, data: typing.Optional[typing.Any] = None, content: typing.Optional[typing.Union[bytes, typing.Iterator[bytes], typing.AsyncIterator[bytes]]] = None, - files: typing.Optional[typing.Dict[str, typing.Optional[typing.Union[File, typing.List[File]]]]] = None, + files: typing.Optional[ + typing.Union[ + typing.Dict[str, typing.Optional[typing.Union[File, typing.List[File]]]], + typing.List[typing.Tuple[str, File]], + ] + ] = None, headers: typing.Optional[typing.Dict[str, typing.Any]] = None, request_options: typing.Optional[RequestOptions] = None, retries: int = 0, omit: typing.Optional[typing.Any] = None, + force_multipart: typing.Optional[bool] = None, ) -> httpx.Response: base_url = self.get_base_url(base_url) timeout = ( @@ -365,48 +608,102 @@ async def request( else self.base_timeout() ) + request_files: typing.Optional[RequestFiles] = ( + convert_file_dict_to_httpx_tuples(remove_omit_from_dict(remove_none_from_dict(files), omit)) + if (files is not None and files is not omit and isinstance(files, dict)) + else None + ) + + if (request_files is None or len(request_files) == 0) and force_multipart: + request_files = FORCE_MULTIPART + json_body, data_body = get_request_body(json=json, data=data, request_options=request_options, omit=omit) - # Add the input to each of these and do None-safety checks - response = await self.httpx_client.request( - method=method, - url=urllib.parse.urljoin(f"{base_url}/", path), - headers=jsonable_encoder( + data_body = _maybe_filter_none_from_multipart_data(data_body, request_files, force_multipart) + + # Get headers (supports async token providers) + _headers = await self._get_headers() + + # Compute encoded params separately to avoid passing empty list to httpx + # (httpx strips existing query params from URL when params=[] is passed) + _encoded_params = encode_query( + jsonable_encoder( remove_none_from_dict( - { - **self.base_headers(), - **(headers if headers is not None else {}), - **(request_options.get("additional_headers", {}) or {} if request_options is not None else {}), - } - ) - ), - params=encode_query( - jsonable_encoder( - remove_none_from_dict( - remove_omit_from_dict( - { - **(params if params is not None else {}), - **( - request_options.get("additional_query_parameters", {}) or {} - if request_options is not None - else {} - ), - }, - omit, - ) + remove_omit_from_dict( + { + **(params if params is not None else {}), + **( + request_options.get("additional_query_parameters", {}) or {} + if request_options is not None + else {} + ), + }, + omit, ) ) - ), - json=json_body, - data=data_body, - content=content, - files=convert_file_dict_to_httpx_tuples(remove_none_from_dict(files)) if files is not None else None, - timeout=timeout, + ) ) - max_retries: int = request_options.get("max_retries", 0) if request_options is not None else 0 + _request_url = _build_url(base_url, path) + _request_headers = jsonable_encoder( + remove_none_from_dict( + { + **_headers, + **(headers if headers is not None else {}), + **(request_options.get("additional_headers", {}) or {} if request_options is not None else {}), + } + ) + ) + + if self.logger.is_debug(): + self.logger.debug( + "Making HTTP request", + method=method, + url=_request_url, + headers=_redact_headers(_request_headers), + has_body=json_body is not None or data_body is not None, + ) + + max_retries: int = ( + request_options.get("max_retries", self.base_max_retries) + if request_options is not None + else self.base_max_retries + ) + + try: + response = await self.httpx_client.request( + method=method, + url=_request_url, + headers=_request_headers, + params=_encoded_params if _encoded_params else None, + json=json_body, + data=data_body, + content=content, + files=request_files, + timeout=timeout, + ) + except (httpx.ConnectError, httpx.RemoteProtocolError): + if retries < max_retries: + await asyncio.sleep(_retry_timeout_from_retries(retries=retries)) + return await self.request( + path=path, + method=method, + base_url=base_url, + params=params, + json=json, + data=data, + content=content, + files=files, + headers=headers, + request_options=request_options, + retries=retries + 1, + omit=omit, + force_multipart=force_multipart, + ) + raise + if _should_retry(response=response): - if max_retries > retries: + if retries < max_retries: await asyncio.sleep(_retry_timeout(response=response, retries=retries)) return await self.request( path=path, @@ -414,13 +711,34 @@ async def request( base_url=base_url, params=params, json=json, + data=data, content=content, files=files, headers=headers, request_options=request_options, retries=retries + 1, omit=omit, + force_multipart=force_multipart, + ) + + if self.logger.is_debug(): + if 200 <= response.status_code < 400: + self.logger.debug( + "HTTP request succeeded", + method=method, + url=_request_url, + status_code=response.status_code, ) + + if self.logger.is_error(): + if response.status_code >= 400: + self.logger.error( + "HTTP request failed with error status", + method=method, + url=_request_url, + status_code=response.status_code, + ) + return response @asynccontextmanager @@ -434,11 +752,17 @@ async def stream( json: typing.Optional[typing.Any] = None, data: typing.Optional[typing.Any] = None, content: typing.Optional[typing.Union[bytes, typing.Iterator[bytes], typing.AsyncIterator[bytes]]] = None, - files: typing.Optional[typing.Dict[str, typing.Optional[typing.Union[File, typing.List[File]]]]] = None, + files: typing.Optional[ + typing.Union[ + typing.Dict[str, typing.Optional[typing.Union[File, typing.List[File]]]], + typing.List[typing.Tuple[str, File]], + ] + ] = None, headers: typing.Optional[typing.Dict[str, typing.Any]] = None, request_options: typing.Optional[RequestOptions] = None, retries: int = 0, omit: typing.Optional[typing.Any] = None, + force_multipart: typing.Optional[bool] = None, ) -> typing.AsyncIterator[httpx.Response]: base_url = self.get_base_url(base_url) timeout = ( @@ -447,41 +771,70 @@ async def stream( else self.base_timeout() ) + request_files: typing.Optional[RequestFiles] = ( + convert_file_dict_to_httpx_tuples(remove_omit_from_dict(remove_none_from_dict(files), omit)) + if (files is not None and files is not omit and isinstance(files, dict)) + else None + ) + + if (request_files is None or len(request_files) == 0) and force_multipart: + request_files = FORCE_MULTIPART + json_body, data_body = get_request_body(json=json, data=data, request_options=request_options, omit=omit) - async with self.httpx_client.stream( - method=method, - url=urllib.parse.urljoin(f"{base_url}/", path), - headers=jsonable_encoder( + data_body = _maybe_filter_none_from_multipart_data(data_body, request_files, force_multipart) + + # Get headers (supports async token providers) + _headers = await self._get_headers() + + # Compute encoded params separately to avoid passing empty list to httpx + # (httpx strips existing query params from URL when params=[] is passed) + _encoded_params = encode_query( + jsonable_encoder( remove_none_from_dict( - { - **self.base_headers(), - **(headers if headers is not None else {}), - **(request_options.get("additional_headers", {}) if request_options is not None else {}), - } - ) - ), - params=encode_query( - jsonable_encoder( - remove_none_from_dict( - remove_omit_from_dict( - { - **(params if params is not None else {}), - **( - request_options.get("additional_query_parameters", {}) - if request_options is not None - else {} - ), - }, - omit=omit, - ) + remove_omit_from_dict( + { + **(params if params is not None else {}), + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + }, + omit=omit, ) ) - ), + ) + ) + + _request_url = _build_url(base_url, path) + _request_headers = jsonable_encoder( + remove_none_from_dict( + { + **_headers, + **(headers if headers is not None else {}), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ) + + if self.logger.is_debug(): + self.logger.debug( + "Making streaming HTTP request", + method=method, + url=_request_url, + headers=_redact_headers(_request_headers), + ) + + async with self.httpx_client.stream( + method=method, + url=_request_url, + headers=_request_headers, + params=_encoded_params if _encoded_params else None, json=json_body, data=data_body, content=content, - files=convert_file_dict_to_httpx_tuples(remove_none_from_dict(files)) if files is not None else None, + files=request_files, timeout=timeout, ) as stream: yield stream diff --git a/src/vapi/core/http_response.py b/src/vapi/core/http_response.py new file mode 100644 index 00000000..00bb1096 --- /dev/null +++ b/src/vapi/core/http_response.py @@ -0,0 +1,59 @@ +# This file was auto-generated by Fern from our API Definition. + +from typing import Dict, Generic, TypeVar + +import httpx + +# Generic to represent the underlying type of the data wrapped by the HTTP response. +T = TypeVar("T") + + +class BaseHttpResponse: + """Minimalist HTTP response wrapper that exposes response headers and status code.""" + + _response: httpx.Response + + def __init__(self, response: httpx.Response): + self._response = response + + @property + def headers(self) -> Dict[str, str]: + return dict(self._response.headers) + + @property + def status_code(self) -> int: + return self._response.status_code + + +class HttpResponse(Generic[T], BaseHttpResponse): + """HTTP response wrapper that exposes response headers and data.""" + + _data: T + + def __init__(self, response: httpx.Response, data: T): + super().__init__(response) + self._data = data + + @property + def data(self) -> T: + return self._data + + def close(self) -> None: + self._response.close() + + +class AsyncHttpResponse(Generic[T], BaseHttpResponse): + """HTTP response wrapper that exposes response headers and data.""" + + _data: T + + def __init__(self, response: httpx.Response, data: T): + super().__init__(response) + self._data = data + + @property + def data(self) -> T: + return self._data + + async def close(self) -> None: + await self._response.aclose() diff --git a/src/vapi/core/http_sse/__init__.py b/src/vapi/core/http_sse/__init__.py new file mode 100644 index 00000000..730e5a33 --- /dev/null +++ b/src/vapi/core/http_sse/__init__.py @@ -0,0 +1,42 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from ._api import EventSource, aconnect_sse, connect_sse + from ._exceptions import SSEError + from ._models import ServerSentEvent +_dynamic_imports: typing.Dict[str, str] = { + "EventSource": "._api", + "SSEError": "._exceptions", + "ServerSentEvent": "._models", + "aconnect_sse": "._api", + "connect_sse": "._api", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = ["EventSource", "SSEError", "ServerSentEvent", "aconnect_sse", "connect_sse"] diff --git a/src/vapi/core/http_sse/_api.py b/src/vapi/core/http_sse/_api.py new file mode 100644 index 00000000..f900b3b6 --- /dev/null +++ b/src/vapi/core/http_sse/_api.py @@ -0,0 +1,112 @@ +# This file was auto-generated by Fern from our API Definition. + +import re +from contextlib import asynccontextmanager, contextmanager +from typing import Any, AsyncGenerator, AsyncIterator, Iterator, cast + +import httpx +from ._decoders import SSEDecoder +from ._exceptions import SSEError +from ._models import ServerSentEvent + + +class EventSource: + def __init__(self, response: httpx.Response) -> None: + self._response = response + + def _check_content_type(self) -> None: + content_type = self._response.headers.get("content-type", "").partition(";")[0] + if "text/event-stream" not in content_type: + raise SSEError( + f"Expected response header Content-Type to contain 'text/event-stream', got {content_type!r}" + ) + + def _get_charset(self) -> str: + """Extract charset from Content-Type header, fallback to UTF-8.""" + content_type = self._response.headers.get("content-type", "") + + # Parse charset parameter using regex + charset_match = re.search(r"charset=([^;\s]+)", content_type, re.IGNORECASE) + if charset_match: + charset = charset_match.group(1).strip("\"'") + # Validate that it's a known encoding + try: + # Test if the charset is valid by trying to encode/decode + "test".encode(charset).decode(charset) + return charset + except (LookupError, UnicodeError): + # If charset is invalid, fall back to UTF-8 + pass + + # Default to UTF-8 if no charset specified or invalid charset + return "utf-8" + + @property + def response(self) -> httpx.Response: + return self._response + + def iter_sse(self) -> Iterator[ServerSentEvent]: + self._check_content_type() + decoder = SSEDecoder() + charset = self._get_charset() + + buffer = "" + for chunk in self._response.iter_bytes(): + # Decode chunk using detected charset + text_chunk = chunk.decode(charset, errors="replace") + buffer += text_chunk + + # Process complete lines + while "\n" in buffer: + line, buffer = buffer.split("\n", 1) + line = line.rstrip("\r") + sse = decoder.decode(line) + # when we reach a "\n\n" => line = '' + # => decoder will attempt to return an SSE Event + if sse is not None: + yield sse + + # Process any remaining data in buffer + if buffer.strip(): + line = buffer.rstrip("\r") + sse = decoder.decode(line) + if sse is not None: + yield sse + + async def aiter_sse(self) -> AsyncGenerator[ServerSentEvent, None]: + self._check_content_type() + decoder = SSEDecoder() + lines = cast(AsyncGenerator[str, None], self._response.aiter_lines()) + try: + async for line in lines: + line = line.rstrip("\n") + sse = decoder.decode(line) + if sse is not None: + yield sse + finally: + await lines.aclose() + + +@contextmanager +def connect_sse(client: httpx.Client, method: str, url: str, **kwargs: Any) -> Iterator[EventSource]: + headers = kwargs.pop("headers", {}) + headers["Accept"] = "text/event-stream" + headers["Cache-Control"] = "no-store" + + with client.stream(method, url, headers=headers, **kwargs) as response: + yield EventSource(response) + + +@asynccontextmanager +async def aconnect_sse( + client: httpx.AsyncClient, + method: str, + url: str, + **kwargs: Any, +) -> AsyncIterator[EventSource]: + headers = kwargs.pop("headers", {}) + headers["Accept"] = "text/event-stream" + headers["Cache-Control"] = "no-store" + + async with client.stream(method, url, headers=headers, **kwargs) as response: + yield EventSource(response) diff --git a/src/vapi/core/http_sse/_decoders.py b/src/vapi/core/http_sse/_decoders.py new file mode 100644 index 00000000..339b0890 --- /dev/null +++ b/src/vapi/core/http_sse/_decoders.py @@ -0,0 +1,61 @@ +# This file was auto-generated by Fern from our API Definition. + +from typing import List, Optional + +from ._models import ServerSentEvent + + +class SSEDecoder: + def __init__(self) -> None: + self._event = "" + self._data: List[str] = [] + self._last_event_id = "" + self._retry: Optional[int] = None + + def decode(self, line: str) -> Optional[ServerSentEvent]: + # See: https://html.spec.whatwg.org/multipage/server-sent-events.html#event-stream-interpretation # noqa: E501 + + if not line: + if not self._event and not self._data and not self._last_event_id and self._retry is None: + return None + + sse = ServerSentEvent( + event=self._event, + data="\n".join(self._data), + id=self._last_event_id, + retry=self._retry, + ) + + # NOTE: as per the SSE spec, do not reset last_event_id. + self._event = "" + self._data = [] + self._retry = None + + return sse + + if line.startswith(":"): + return None + + fieldname, _, value = line.partition(":") + + if value.startswith(" "): + value = value[1:] + + if fieldname == "event": + self._event = value + elif fieldname == "data": + self._data.append(value) + elif fieldname == "id": + if "\0" in value: + pass + else: + self._last_event_id = value + elif fieldname == "retry": + try: + self._retry = int(value) + except (TypeError, ValueError): + pass + else: + pass # Field is ignored. + + return None diff --git a/src/vapi/core/http_sse/_exceptions.py b/src/vapi/core/http_sse/_exceptions.py new file mode 100644 index 00000000..81605a8a --- /dev/null +++ b/src/vapi/core/http_sse/_exceptions.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import httpx + + +class SSEError(httpx.TransportError): + pass diff --git a/src/vapi/core/http_sse/_models.py b/src/vapi/core/http_sse/_models.py new file mode 100644 index 00000000..1af57f8f --- /dev/null +++ b/src/vapi/core/http_sse/_models.py @@ -0,0 +1,17 @@ +# This file was auto-generated by Fern from our API Definition. + +import json +from dataclasses import dataclass +from typing import Any, Optional + + +@dataclass(frozen=True) +class ServerSentEvent: + event: str = "message" + data: str = "" + id: str = "" + retry: Optional[int] = None + + def json(self) -> Any: + """Parse the data field as JSON.""" + return json.loads(self.data) diff --git a/src/vapi/core/jsonable_encoder.py b/src/vapi/core/jsonable_encoder.py index 1b631e90..f8beaeaf 100644 --- a/src/vapi/core/jsonable_encoder.py +++ b/src/vapi/core/jsonable_encoder.py @@ -17,7 +17,6 @@ from typing import Any, Callable, Dict, List, Optional, Set, Union import pydantic - from .datetime_utils import serialize_datetime from .pydantic_utilities import ( IS_PYDANTIC_V2, @@ -31,6 +30,10 @@ def jsonable_encoder(obj: Any, custom_encoder: Optional[Dict[Any, Callable[[Any], Any]]] = None) -> Any: custom_encoder = custom_encoder or {} + # Generated SDKs use Ellipsis (`...`) as the sentinel value for "OMIT". + # OMIT values should be excluded from serialized payloads. + if obj is Ellipsis: + return None if custom_encoder: if type(obj) in custom_encoder: return custom_encoder[type(obj)](obj) @@ -71,6 +74,8 @@ def jsonable_encoder(obj: Any, custom_encoder: Optional[Dict[Any, Callable[[Any] allowed_keys = set(obj.keys()) for key, value in obj.items(): if key in allowed_keys: + if value is Ellipsis: + continue encoded_key = jsonable_encoder(key, custom_encoder=custom_encoder) encoded_value = jsonable_encoder(value, custom_encoder=custom_encoder) encoded_dict[encoded_key] = encoded_value @@ -78,6 +83,8 @@ def jsonable_encoder(obj: Any, custom_encoder: Optional[Dict[Any, Callable[[Any] if isinstance(obj, (list, set, frozenset, GeneratorType, tuple)): encoded_list = [] for item in obj: + if item is Ellipsis: + continue encoded_list.append(jsonable_encoder(item, custom_encoder=custom_encoder)) return encoded_list diff --git a/src/vapi/core/logging.py b/src/vapi/core/logging.py new file mode 100644 index 00000000..e5e57245 --- /dev/null +++ b/src/vapi/core/logging.py @@ -0,0 +1,107 @@ +# This file was auto-generated by Fern from our API Definition. + +import logging +import typing + +LogLevel = typing.Literal["debug", "info", "warn", "error"] + +_LOG_LEVEL_MAP: typing.Dict[LogLevel, int] = { + "debug": 1, + "info": 2, + "warn": 3, + "error": 4, +} + + +class ILogger(typing.Protocol): + def debug(self, message: str, **kwargs: typing.Any) -> None: ... + def info(self, message: str, **kwargs: typing.Any) -> None: ... + def warn(self, message: str, **kwargs: typing.Any) -> None: ... + def error(self, message: str, **kwargs: typing.Any) -> None: ... + + +class ConsoleLogger: + _logger: logging.Logger + + def __init__(self) -> None: + self._logger = logging.getLogger("fern") + if not self._logger.handlers: + handler = logging.StreamHandler() + handler.setFormatter(logging.Formatter("%(levelname)s - %(message)s")) + self._logger.addHandler(handler) + self._logger.setLevel(logging.DEBUG) + + def debug(self, message: str, **kwargs: typing.Any) -> None: + self._logger.debug(message, extra=kwargs) + + def info(self, message: str, **kwargs: typing.Any) -> None: + self._logger.info(message, extra=kwargs) + + def warn(self, message: str, **kwargs: typing.Any) -> None: + self._logger.warning(message, extra=kwargs) + + def error(self, message: str, **kwargs: typing.Any) -> None: + self._logger.error(message, extra=kwargs) + + +class LogConfig(typing.TypedDict, total=False): + level: LogLevel + logger: ILogger + silent: bool + + +class Logger: + _level: int + _logger: ILogger + _silent: bool + + def __init__(self, *, level: LogLevel, logger: ILogger, silent: bool) -> None: + self._level = _LOG_LEVEL_MAP[level] + self._logger = logger + self._silent = silent + + def _should_log(self, level: LogLevel) -> bool: + return not self._silent and self._level <= _LOG_LEVEL_MAP[level] + + def is_debug(self) -> bool: + return self._should_log("debug") + + def is_info(self) -> bool: + return self._should_log("info") + + def is_warn(self) -> bool: + return self._should_log("warn") + + def is_error(self) -> bool: + return self._should_log("error") + + def debug(self, message: str, **kwargs: typing.Any) -> None: + if self.is_debug(): + self._logger.debug(message, **kwargs) + + def info(self, message: str, **kwargs: typing.Any) -> None: + if self.is_info(): + self._logger.info(message, **kwargs) + + def warn(self, message: str, **kwargs: typing.Any) -> None: + if self.is_warn(): + self._logger.warn(message, **kwargs) + + def error(self, message: str, **kwargs: typing.Any) -> None: + if self.is_error(): + self._logger.error(message, **kwargs) + + +_default_logger: Logger = Logger(level="info", logger=ConsoleLogger(), silent=True) + + +def create_logger(config: typing.Optional[typing.Union[LogConfig, Logger]] = None) -> Logger: + if config is None: + return _default_logger + if isinstance(config, Logger): + return config + return Logger( + level=config.get("level", "info"), + logger=config.get("logger", ConsoleLogger()), + silent=config.get("silent", True), + ) diff --git a/src/vapi/core/pagination.py b/src/vapi/core/pagination.py deleted file mode 100644 index 5f482635..00000000 --- a/src/vapi/core/pagination.py +++ /dev/null @@ -1,88 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -from typing_extensions import Self - -import pydantic - -# Generic to represent the underlying type of the results within a page -T = typing.TypeVar("T") - - -# SDKs implement a Page ABC per-pagination request, the endpoint then retuns a pager that wraps this type -# for example, an endpoint will return SyncPager[UserPage] where UserPage implements the Page ABC. ex: -# -# SyncPager( -# has_next=response.list_metadata.after is not None, -# items=response.data, -# # This should be the outer function that returns the SyncPager again -# get_next=lambda: list(..., cursor: response.cursor) (or list(..., offset: offset + 1)) -# ) -class BasePage(pydantic.BaseModel, typing.Generic[T]): - has_next: bool - items: typing.Optional[typing.List[T]] - - -class SyncPage(BasePage[T], typing.Generic[T]): - get_next: typing.Optional[typing.Callable[[], typing.Optional[Self]]] - - -class AsyncPage(BasePage[T], typing.Generic[T]): - get_next: typing.Optional[typing.Callable[[], typing.Awaitable[typing.Optional[Self]]]] - - -# ---------------------------- - - -class SyncPager(SyncPage[T], typing.Generic[T]): - # Here we type ignore the iterator to avoid a mypy error - # caused by the type conflict with Pydanitc's __iter__ method - # brought in by extending the base model - def __iter__(self) -> typing.Iterator[T]: # type: ignore - for page in self.iter_pages(): - if page.items is not None: - for item in page.items: - yield item - - def iter_pages(self) -> typing.Iterator[SyncPage[T]]: - page: typing.Union[SyncPager[T], None] = self - while True: - if page is not None: - yield page - if page.has_next and page.get_next is not None: - page = page.get_next() - if page is None or page.items is None or len(page.items) == 0: - return - else: - return - else: - return - - def next_page(self) -> typing.Optional[SyncPage[T]]: - return self.get_next() if self.get_next is not None else None - - -class AsyncPager(AsyncPage[T], typing.Generic[T]): - async def __aiter__(self) -> typing.AsyncIterator[T]: # type: ignore - async for page in self.iter_pages(): - if page.items is not None: - for item in page.items: - yield item - - async def iter_pages(self) -> typing.AsyncIterator[AsyncPage[T]]: - page: typing.Union[AsyncPager[T], None] = self - while True: - if page is not None: - yield page - if page is not None and page.has_next and page.get_next is not None: - page = await page.get_next() - if page is None or page.items is None or len(page.items) == 0: - return - else: - return - else: - return - - async def next_page(self) -> typing.Optional[AsyncPage[T]]: - return await self.get_next() if self.get_next is not None else None diff --git a/src/vapi/core/parse_error.py b/src/vapi/core/parse_error.py new file mode 100644 index 00000000..4527c6a8 --- /dev/null +++ b/src/vapi/core/parse_error.py @@ -0,0 +1,36 @@ +# This file was auto-generated by Fern from our API Definition. + +from typing import Any, Dict, Optional + + +class ParsingError(Exception): + """ + Raised when the SDK fails to parse/validate a response from the server. + This typically indicates that the server returned a response whose shape + does not match the expected schema. + """ + + headers: Optional[Dict[str, str]] + status_code: Optional[int] + body: Any + cause: Optional[Exception] + + def __init__( + self, + *, + headers: Optional[Dict[str, str]] = None, + status_code: Optional[int] = None, + body: Any = None, + cause: Optional[Exception] = None, + ) -> None: + self.headers = headers + self.status_code = status_code + self.body = body + self.cause = cause + super().__init__() + if cause is not None: + self.__cause__ = cause + + def __str__(self) -> str: + cause_str = f", cause: {self.cause}" if self.cause is not None else "" + return f"headers: {self.headers}, status_code: {self.status_code}, body: {self.body}{cause_str}" diff --git a/src/vapi/core/pydantic_utilities.py b/src/vapi/core/pydantic_utilities.py index ee8f0e41..fea3a08d 100644 --- a/src/vapi/core/pydantic_utilities.py +++ b/src/vapi/core/pydantic_utilities.py @@ -2,90 +2,406 @@ # nopycln: file import datetime as dt -import typing +import inspect +import json +import logging from collections import defaultdict +from dataclasses import asdict +from typing import ( + TYPE_CHECKING, + Any, + Callable, + ClassVar, + Dict, + List, + Mapping, + Optional, + Set, + Tuple, + Type, + TypeVar, + Union, + cast, +) +import pydantic import typing_extensions +from pydantic.fields import FieldInfo as _FieldInfo -import pydantic +_logger = logging.getLogger(__name__) -from .datetime_utils import serialize_datetime -from .serialization import convert_and_respect_annotation_metadata +if TYPE_CHECKING: + from .http_sse._models import ServerSentEvent IS_PYDANTIC_V2 = pydantic.VERSION.startswith("2.") if IS_PYDANTIC_V2: - # isort will try to reformat the comments on these imports, which breaks mypy - # isort: off - from pydantic.v1.datetime_parse import ( # type: ignore # pyright: ignore[reportMissingImports] # Pydantic v2 - parse_date as parse_date, + _datetime_adapter = pydantic.TypeAdapter(dt.datetime) # type: ignore[attr-defined] + _date_adapter = pydantic.TypeAdapter(dt.date) # type: ignore[attr-defined] + + def parse_datetime(value: Any) -> dt.datetime: # type: ignore[misc] + if isinstance(value, dt.datetime): + return value + return _datetime_adapter.validate_python(value) + + def parse_date(value: Any) -> dt.date: # type: ignore[misc] + if isinstance(value, dt.datetime): + return value.date() + if isinstance(value, dt.date): + return value + return _date_adapter.validate_python(value) + + # Avoid importing from pydantic.v1 to maintain Python 3.14 compatibility. + from typing import get_args as get_args # type: ignore[assignment] + from typing import get_origin as get_origin # type: ignore[assignment] + + def is_literal_type(tp: Optional[Type[Any]]) -> bool: # type: ignore[misc] + return typing_extensions.get_origin(tp) is typing_extensions.Literal + + def is_union(tp: Optional[Type[Any]]) -> bool: # type: ignore[misc] + return tp is Union or typing_extensions.get_origin(tp) is Union # type: ignore[comparison-overlap] + + # Inline encoders_by_type to avoid importing from pydantic.v1.json + import re as _re + from collections import deque as _deque + from decimal import Decimal as _Decimal + from enum import Enum as _Enum + from ipaddress import ( + IPv4Address as _IPv4Address, ) - from pydantic.v1.datetime_parse import ( # pyright: ignore[reportMissingImports] # Pydantic v2 - parse_datetime as parse_datetime, + from ipaddress import ( + IPv4Interface as _IPv4Interface, ) - from pydantic.v1.json import ( # type: ignore # pyright: ignore[reportMissingImports] # Pydantic v2 - ENCODERS_BY_TYPE as encoders_by_type, + from ipaddress import ( + IPv4Network as _IPv4Network, ) - from pydantic.v1.typing import ( # type: ignore # pyright: ignore[reportMissingImports] # Pydantic v2 - get_args as get_args, + from ipaddress import ( + IPv6Address as _IPv6Address, ) - from pydantic.v1.typing import ( # pyright: ignore[reportMissingImports] # Pydantic v2 - get_origin as get_origin, + from ipaddress import ( + IPv6Interface as _IPv6Interface, ) - from pydantic.v1.typing import ( # pyright: ignore[reportMissingImports] # Pydantic v2 - is_literal_type as is_literal_type, + from ipaddress import ( + IPv6Network as _IPv6Network, ) - from pydantic.v1.typing import ( # pyright: ignore[reportMissingImports] # Pydantic v2 - is_union as is_union, - ) - from pydantic.v1.fields import ModelField as ModelField # type: ignore # pyright: ignore[reportMissingImports] # Pydantic v2 + from pathlib import Path as _Path + from types import GeneratorType as _GeneratorType + from uuid import UUID as _UUID + + from pydantic.fields import FieldInfo as ModelField # type: ignore[no-redef, assignment] + + def _decimal_encoder(dec_value: Any) -> Any: + if dec_value.as_tuple().exponent >= 0: + return int(dec_value) + return float(dec_value) + + encoders_by_type: Dict[Type[Any], Callable[[Any], Any]] = { # type: ignore[no-redef] + bytes: lambda o: o.decode(), + dt.date: lambda o: o.isoformat(), + dt.datetime: lambda o: o.isoformat(), + dt.time: lambda o: o.isoformat(), + dt.timedelta: lambda td: td.total_seconds(), + _Decimal: _decimal_encoder, + _Enum: lambda o: o.value, + frozenset: list, + _deque: list, + _GeneratorType: list, + _IPv4Address: str, + _IPv4Interface: str, + _IPv4Network: str, + _IPv6Address: str, + _IPv6Interface: str, + _IPv6Network: str, + _Path: str, + _re.Pattern: lambda o: o.pattern, + set: list, + _UUID: str, + } else: - from pydantic.datetime_parse import parse_date as parse_date # type: ignore # Pydantic v1 - from pydantic.datetime_parse import parse_datetime as parse_datetime # type: ignore # Pydantic v1 - from pydantic.fields import ModelField as ModelField # type: ignore # Pydantic v1 - from pydantic.json import ENCODERS_BY_TYPE as encoders_by_type # type: ignore # Pydantic v1 - from pydantic.typing import get_args as get_args # type: ignore # Pydantic v1 - from pydantic.typing import get_origin as get_origin # type: ignore # Pydantic v1 - from pydantic.typing import is_literal_type as is_literal_type # type: ignore # Pydantic v1 - from pydantic.typing import is_union as is_union # type: ignore # Pydantic v1 - - # isort: on - - -T = typing.TypeVar("T") -Model = typing.TypeVar("Model", bound=pydantic.BaseModel) + from pydantic.datetime_parse import parse_date as parse_date # type: ignore[no-redef] + from pydantic.datetime_parse import parse_datetime as parse_datetime # type: ignore[no-redef] + from pydantic.fields import ModelField as ModelField # type: ignore[attr-defined, no-redef, assignment] + from pydantic.json import ENCODERS_BY_TYPE as encoders_by_type # type: ignore[no-redef] + from pydantic.typing import get_args as get_args # type: ignore[no-redef] + from pydantic.typing import get_origin as get_origin # type: ignore[no-redef] + from pydantic.typing import is_literal_type as is_literal_type # type: ignore[no-redef, assignment] + from pydantic.typing import is_union as is_union # type: ignore[no-redef] +from .datetime_utils import serialize_datetime +from .serialization import convert_and_respect_annotation_metadata +from typing_extensions import TypeAlias + +T = TypeVar("T") +Model = TypeVar("Model", bound=pydantic.BaseModel) + + +def _get_discriminator_and_variants(type_: Type[Any]) -> Tuple[Optional[str], Optional[List[Type[Any]]]]: + """ + Extract the discriminator field name and union variants from a discriminated union type. + Supports Annotated[Union[...], Field(discriminator=...)] patterns. + Returns (discriminator, variants) or (None, None) if not a discriminated union. + """ + origin = typing_extensions.get_origin(type_) + + if origin is typing_extensions.Annotated: + args = typing_extensions.get_args(type_) + if len(args) >= 2: + inner_type = args[0] + # Check annotations for discriminator + discriminator = None + for annotation in args[1:]: + if hasattr(annotation, "discriminator"): + discriminator = getattr(annotation, "discriminator", None) + break + + if discriminator: + inner_origin = typing_extensions.get_origin(inner_type) + if inner_origin is Union: + variants = list(typing_extensions.get_args(inner_type)) + return discriminator, variants + return None, None + + +def _get_field_annotation(model: Type[Any], field_name: str) -> Optional[Type[Any]]: + """Get the type annotation of a field from a Pydantic model.""" + if IS_PYDANTIC_V2: + fields = getattr(model, "model_fields", {}) + field_info = fields.get(field_name) + if field_info: + return cast(Optional[Type[Any]], field_info.annotation) + else: + fields = getattr(model, "__fields__", {}) + field_info = fields.get(field_name) + if field_info: + return cast(Optional[Type[Any]], field_info.outer_type_) + return None + + +def _find_variant_by_discriminator( + variants: List[Type[Any]], + discriminator: str, + discriminator_value: Any, +) -> Optional[Type[Any]]: + """Find the union variant that matches the discriminator value.""" + for variant in variants: + if not (inspect.isclass(variant) and issubclass(variant, pydantic.BaseModel)): + continue + + disc_annotation = _get_field_annotation(variant, discriminator) + if disc_annotation and is_literal_type(disc_annotation): + literal_args = get_args(disc_annotation) + if literal_args and literal_args[0] == discriminator_value: + return variant + return None + + +def _is_string_type(type_: Type[Any]) -> bool: + """Check if a type is str or Optional[str].""" + if type_ is str: + return True + + origin = typing_extensions.get_origin(type_) + if origin is Union: + args = typing_extensions.get_args(type_) + # Optional[str] = Union[str, None] + non_none_args = [a for a in args if a is not type(None)] + if len(non_none_args) == 1 and non_none_args[0] is str: + return True + + return False + + +def parse_sse_obj(sse: "ServerSentEvent", type_: Type[T]) -> T: + """ + Parse a ServerSentEvent into the appropriate type. + + Handles two scenarios based on where the discriminator field is located: + + 1. Data-level discrimination: The discriminator (e.g., 'type') is inside the 'data' payload. + The union describes the data content, not the SSE envelope. + -> Returns: json.loads(data) parsed into the type + + Example: ChatStreamResponse with discriminator='type' + Input: ServerSentEvent(event="message", data='{"type": "content-delta", ...}', id="") + Output: ContentDeltaEvent (parsed from data, SSE envelope stripped) + + 2. Event-level discrimination: The discriminator (e.g., 'event') is at the SSE event level. + The union describes the full SSE event structure. + -> Returns: SSE envelope with 'data' field JSON-parsed only if the variant expects non-string + + Example: JobStreamResponse with discriminator='event' + Input: ServerSentEvent(event="ERROR", data='{"code": "FAILED", ...}', id="123") + Output: JobStreamResponse_Error with data as ErrorData object + + But for variants where data is str (like STATUS_UPDATE): + Input: ServerSentEvent(event="STATUS_UPDATE", data='{"status": "processing"}', id="1") + Output: JobStreamResponse_StatusUpdate with data as string (not parsed) + + Args: + sse: The ServerSentEvent object to parse + type_: The target discriminated union type + + Returns: + The parsed object of type T + + Note: + This function is only available in SDK contexts where http_sse module exists. + """ + sse_event = asdict(sse) + discriminator, variants = _get_discriminator_and_variants(type_) + + if discriminator is None or variants is None: + # Not a discriminated union - parse the data field as JSON + data_value = sse_event.get("data") + if isinstance(data_value, str) and data_value: + try: + parsed_data = json.loads(data_value) + return parse_obj_as(type_, parsed_data) + except json.JSONDecodeError as e: + _logger.warning( + "Failed to parse SSE data field as JSON: %s, data: %s", + e, + data_value[:100] if len(data_value) > 100 else data_value, + ) + return parse_obj_as(type_, sse_event) + + data_value = sse_event.get("data") + + # Check if discriminator is at the top level (event-level discrimination) + if discriminator in sse_event: + # Case 2: Event-level discrimination + # Find the matching variant to check if 'data' field needs JSON parsing + disc_value = sse_event.get(discriminator) + matching_variant = _find_variant_by_discriminator(variants, discriminator, disc_value) + + if matching_variant is not None: + # Check what type the variant expects for 'data' + data_type = _get_field_annotation(matching_variant, "data") + if data_type is not None and not _is_string_type(data_type): + # Variant expects non-string data - parse JSON + if isinstance(data_value, str) and data_value: + try: + parsed_data = json.loads(data_value) + new_object = dict(sse_event) + new_object["data"] = parsed_data + return parse_obj_as(type_, new_object) + except json.JSONDecodeError as e: + _logger.warning( + "Failed to parse SSE data field as JSON for event-level discrimination: %s, data: %s", + e, + data_value[:100] if len(data_value) > 100 else data_value, + ) + # Either no matching variant, data is string type, or JSON parse failed + return parse_obj_as(type_, sse_event) -def parse_obj_as(type_: typing.Type[T], object_: typing.Any) -> T: - dealiased_object = convert_and_respect_annotation_metadata(object_=object_, annotation=type_, direction="read") + else: + # Case 1: Data-level discrimination + # The discriminator is inside the data payload - extract and parse data only + if isinstance(data_value, str) and data_value: + try: + parsed_data = json.loads(data_value) + return parse_obj_as(type_, parsed_data) + except json.JSONDecodeError as e: + _logger.warning( + "Failed to parse SSE data field as JSON for data-level discrimination: %s, data: %s", + e, + data_value[:100] if len(data_value) > 100 else data_value, + ) + return parse_obj_as(type_, sse_event) + + +def parse_obj_as(type_: Type[T], object_: Any) -> T: + # convert_and_respect_annotation_metadata is required for TypedDict aliasing. + # + # For Pydantic models, whether we should pre-dealias depends on how the model encodes aliasing: + # - If the model uses real Pydantic aliases (pydantic.Field(alias=...)), then we must pass wire keys through + # unchanged so Pydantic can validate them. + # - If the model encodes aliasing only via FieldMetadata annotations, then we MUST pre-dealias because Pydantic + # will not recognize those aliases during validation. + if inspect.isclass(type_) and issubclass(type_, pydantic.BaseModel): + has_pydantic_aliases = False + if IS_PYDANTIC_V2: + for field_name, field_info in getattr(type_, "model_fields", {}).items(): # type: ignore[attr-defined] + alias = getattr(field_info, "alias", None) + if alias is not None and alias != field_name: + has_pydantic_aliases = True + break + else: + for field in getattr(type_, "__fields__", {}).values(): + alias = getattr(field, "alias", None) + name = getattr(field, "name", None) + if alias is not None and name is not None and alias != name: + has_pydantic_aliases = True + break + + dealiased_object = ( + object_ + if has_pydantic_aliases + else convert_and_respect_annotation_metadata(object_=object_, annotation=type_, direction="read") + ) + else: + dealiased_object = convert_and_respect_annotation_metadata(object_=object_, annotation=type_, direction="read") if IS_PYDANTIC_V2: - adapter = pydantic.TypeAdapter(type_) # type: ignore # Pydantic v2 + adapter = pydantic.TypeAdapter(type_) # type: ignore[attr-defined] return adapter.validate_python(dealiased_object) - else: - return pydantic.parse_obj_as(type_, dealiased_object) + return pydantic.parse_obj_as(type_, dealiased_object) -def to_jsonable_with_fallback( - obj: typing.Any, fallback_serializer: typing.Callable[[typing.Any], typing.Any] -) -> typing.Any: +def to_jsonable_with_fallback(obj: Any, fallback_serializer: Callable[[Any], Any]) -> Any: if IS_PYDANTIC_V2: from pydantic_core import to_jsonable_python return to_jsonable_python(obj, fallback=fallback_serializer) - else: - return fallback_serializer(obj) + return fallback_serializer(obj) class UniversalBaseModel(pydantic.BaseModel): if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( - # Allow fields begining with `model_` to be used in the model + model_config: ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( # type: ignore[typeddict-unknown-key] + # Allow fields beginning with `model_` to be used in the model protected_namespaces=(), - ) # type: ignore # Pydantic v2 - - @pydantic.model_serializer(mode="wrap", when_used="json") # type: ignore # Pydantic v2 - def serialize_model(self, handler: pydantic.SerializerFunctionWrapHandler) -> typing.Any: # type: ignore # Pydantic v2 - serialized = handler(self) + ) + + @pydantic.model_validator(mode="before") # type: ignore[attr-defined] + @classmethod + def _coerce_field_names_to_aliases(cls, data: Any) -> Any: + """ + Accept Python field names in input by rewriting them to their Pydantic aliases, + while avoiding silent collisions when a key could refer to multiple fields. + """ + if not isinstance(data, Mapping): + return data + + fields = getattr(cls, "model_fields", {}) # type: ignore[attr-defined] + name_to_alias: Dict[str, str] = {} + alias_to_name: Dict[str, str] = {} + + for name, field_info in fields.items(): + alias = getattr(field_info, "alias", None) or name + name_to_alias[name] = alias + if alias != name: + alias_to_name[alias] = name + + # Detect ambiguous keys: a key that is an alias for one field and a name for another. + ambiguous_keys = set(alias_to_name.keys()).intersection(set(name_to_alias.keys())) + for key in ambiguous_keys: + if key in data and name_to_alias[key] not in data: + raise ValueError( + f"Ambiguous input key '{key}': it is both a field name and an alias. " + "Provide the explicit alias key to disambiguate." + ) + + original_keys = set(data.keys()) + rewritten: Dict[str, Any] = dict(data) + for name, alias in name_to_alias.items(): + if alias != name and name in original_keys and alias not in rewritten: + rewritten[alias] = rewritten.pop(name) + + return rewritten + + @pydantic.model_serializer(mode="plain", when_used="json") # type: ignore[attr-defined] + def serialize_model(self) -> Any: # type: ignore[name-defined] + serialized = self.dict() # type: ignore[attr-defined] data = {k: serialize_datetime(v) if isinstance(v, dt.datetime) else v for k, v in serialized.items()} return data @@ -95,60 +411,88 @@ class Config: smart_union = True json_encoders = {dt.datetime: serialize_datetime} + @pydantic.root_validator(pre=True) + def _coerce_field_names_to_aliases(cls, values: Any) -> Any: + """ + Pydantic v1 equivalent of _coerce_field_names_to_aliases. + """ + if not isinstance(values, Mapping): + return values + + fields = getattr(cls, "__fields__", {}) + name_to_alias: Dict[str, str] = {} + alias_to_name: Dict[str, str] = {} + + for name, field in fields.items(): + alias = getattr(field, "alias", None) or name + name_to_alias[name] = alias + if alias != name: + alias_to_name[alias] = name + + ambiguous_keys = set(alias_to_name.keys()).intersection(set(name_to_alias.keys())) + for key in ambiguous_keys: + if key in values and name_to_alias[key] not in values: + raise ValueError( + f"Ambiguous input key '{key}': it is both a field name and an alias. " + "Provide the explicit alias key to disambiguate." + ) + + original_keys = set(values.keys()) + rewritten: Dict[str, Any] = dict(values) + for name, alias in name_to_alias.items(): + if alias != name and name in original_keys and alias not in rewritten: + rewritten[alias] = rewritten.pop(name) + + return rewritten + @classmethod - def model_construct( - cls: typing.Type["Model"], _fields_set: typing.Optional[typing.Set[str]] = None, **values: typing.Any - ) -> "Model": + def model_construct(cls: Type["Model"], _fields_set: Optional[Set[str]] = None, **values: Any) -> "Model": dealiased_object = convert_and_respect_annotation_metadata(object_=values, annotation=cls, direction="read") return cls.construct(_fields_set, **dealiased_object) @classmethod - def construct( - cls: typing.Type["Model"], _fields_set: typing.Optional[typing.Set[str]] = None, **values: typing.Any - ) -> "Model": + def construct(cls: Type["Model"], _fields_set: Optional[Set[str]] = None, **values: Any) -> "Model": dealiased_object = convert_and_respect_annotation_metadata(object_=values, annotation=cls, direction="read") if IS_PYDANTIC_V2: - return super().model_construct(_fields_set, **dealiased_object) # type: ignore # Pydantic v2 - else: - return super().construct(_fields_set, **dealiased_object) + return super().model_construct(_fields_set, **dealiased_object) # type: ignore[misc] + return super().construct(_fields_set, **dealiased_object) - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = { + def json(self, **kwargs: Any) -> str: + kwargs_with_defaults = { "by_alias": True, "exclude_unset": True, **kwargs, } if IS_PYDANTIC_V2: - return super().model_dump_json(**kwargs_with_defaults) # type: ignore # Pydantic v2 - else: - return super().json(**kwargs_with_defaults) + return super().model_dump_json(**kwargs_with_defaults) # type: ignore[misc] + return super().json(**kwargs_with_defaults) - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + def dict(self, **kwargs: Any) -> Dict[str, Any]: """ Override the default dict method to `exclude_unset` by default. This function patches `exclude_unset` to work include fields within non-None default values. """ - # Note: the logic here is multi-plexed given the levers exposed in Pydantic V1 vs V2 + # Note: the logic here is multiplexed given the levers exposed in Pydantic V1 vs V2 # Pydantic V1's .dict can be extremely slow, so we do not want to call it twice. # # We'd ideally do the same for Pydantic V2, but it shells out to a library to serialize models # that we have less control over, and this is less intrusive than custom serializers for now. if IS_PYDANTIC_V2: - kwargs_with_defaults_exclude_unset: typing.Any = { + kwargs_with_defaults_exclude_unset = { **kwargs, "by_alias": True, "exclude_unset": True, "exclude_none": False, } - kwargs_with_defaults_exclude_none: typing.Any = { + kwargs_with_defaults_exclude_none = { **kwargs, "by_alias": True, "exclude_none": True, "exclude_unset": False, } dict_dump = deep_union_pydantic_dicts( - super().model_dump(**kwargs_with_defaults_exclude_unset), # type: ignore # Pydantic v2 - super().model_dump(**kwargs_with_defaults_exclude_none), # type: ignore # Pydantic v2 + super().model_dump(**kwargs_with_defaults_exclude_unset), # type: ignore[misc] + super().model_dump(**kwargs_with_defaults_exclude_none), # type: ignore[misc] ) else: @@ -168,7 +512,7 @@ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: if default is not None: self.__fields_set__.add(name) - kwargs_with_defaults_exclude_unset_include_fields: typing.Any = { + kwargs_with_defaults_exclude_unset_include_fields = { "by_alias": True, "exclude_unset": True, "include": _fields_set, @@ -177,15 +521,16 @@ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: dict_dump = super().dict(**kwargs_with_defaults_exclude_unset_include_fields) - return convert_and_respect_annotation_metadata(object_=dict_dump, annotation=self.__class__, direction="write") + return cast( + Dict[str, Any], + convert_and_respect_annotation_metadata(object_=dict_dump, annotation=self.__class__, direction="write"), + ) -def _union_list_of_pydantic_dicts( - source: typing.List[typing.Any], destination: typing.List[typing.Any] -) -> typing.List[typing.Any]: - converted_list: typing.List[typing.Any] = [] +def _union_list_of_pydantic_dicts(source: List[Any], destination: List[Any]) -> List[Any]: + converted_list: List[Any] = [] for i, item in enumerate(source): - destination_value = destination[i] # type: ignore + destination_value = destination[i] if isinstance(item, dict): converted_list.append(deep_union_pydantic_dicts(item, destination_value)) elif isinstance(item, list): @@ -195,9 +540,7 @@ def _union_list_of_pydantic_dicts( return converted_list -def deep_union_pydantic_dicts( - source: typing.Dict[str, typing.Any], destination: typing.Dict[str, typing.Any] -) -> typing.Dict[str, typing.Any]: +def deep_union_pydantic_dicts(source: Dict[str, Any], destination: Dict[str, Any]) -> Dict[str, Any]: for key, value in source.items(): node = destination.setdefault(key, {}) if isinstance(value, dict): @@ -215,18 +558,16 @@ def deep_union_pydantic_dicts( if IS_PYDANTIC_V2: - class V2RootModel(UniversalBaseModel, pydantic.RootModel): # type: ignore # Pydantic v2 + class V2RootModel(UniversalBaseModel, pydantic.RootModel): # type: ignore[misc, name-defined, type-arg] pass - UniversalRootModel: typing_extensions.TypeAlias = V2RootModel # type: ignore + UniversalRootModel: TypeAlias = V2RootModel # type: ignore[misc] else: - UniversalRootModel: typing_extensions.TypeAlias = UniversalBaseModel # type: ignore + UniversalRootModel: TypeAlias = UniversalBaseModel # type: ignore[misc, no-redef] -def encode_by_type(o: typing.Any) -> typing.Any: - encoders_by_class_tuples: typing.Dict[typing.Callable[[typing.Any], typing.Any], typing.Tuple[typing.Any, ...]] = ( - defaultdict(tuple) - ) +def encode_by_type(o: Any) -> Any: + encoders_by_class_tuples: Dict[Callable[[Any], Any], Tuple[Any, ...]] = defaultdict(tuple) for type_, encoder in encoders_by_type.items(): encoders_by_class_tuples[encoder] += (type_,) @@ -237,54 +578,51 @@ def encode_by_type(o: typing.Any) -> typing.Any: return encoder(o) -def update_forward_refs(model: typing.Type["Model"], **localns: typing.Any) -> None: +def update_forward_refs(model: Type["Model"], **localns: Any) -> None: if IS_PYDANTIC_V2: - model.model_rebuild(raise_errors=False) # type: ignore # Pydantic v2 + model.model_rebuild(raise_errors=False) # type: ignore[attr-defined] else: model.update_forward_refs(**localns) # Mirrors Pydantic's internal typing -AnyCallable = typing.Callable[..., typing.Any] +AnyCallable = Callable[..., Any] def universal_root_validator( pre: bool = False, -) -> typing.Callable[[AnyCallable], AnyCallable]: +) -> Callable[[AnyCallable], AnyCallable]: def decorator(func: AnyCallable) -> AnyCallable: if IS_PYDANTIC_V2: - return pydantic.model_validator(mode="before" if pre else "after")(func) # type: ignore # Pydantic v2 - else: - return pydantic.root_validator(pre=pre)(func) # type: ignore # Pydantic v1 + # In Pydantic v2, for RootModel we always use "before" mode + # The custom validators transform the input value before the model is created + return cast(AnyCallable, pydantic.model_validator(mode="before")(func)) # type: ignore[attr-defined] + return cast(AnyCallable, pydantic.root_validator(pre=pre)(func)) # type: ignore[call-overload] return decorator -def universal_field_validator(field_name: str, pre: bool = False) -> typing.Callable[[AnyCallable], AnyCallable]: +def universal_field_validator(field_name: str, pre: bool = False) -> Callable[[AnyCallable], AnyCallable]: def decorator(func: AnyCallable) -> AnyCallable: if IS_PYDANTIC_V2: - return pydantic.field_validator(field_name, mode="before" if pre else "after")(func) # type: ignore # Pydantic v2 - else: - return pydantic.validator(field_name, pre=pre)(func) # type: ignore # Pydantic v1 + return cast(AnyCallable, pydantic.field_validator(field_name, mode="before" if pre else "after")(func)) # type: ignore[attr-defined] + return cast(AnyCallable, pydantic.validator(field_name, pre=pre)(func)) return decorator -PydanticField = typing.Union[ModelField, pydantic.fields.FieldInfo] +PydanticField = Union[ModelField, _FieldInfo] -def _get_model_fields( - model: typing.Type["Model"], -) -> typing.Mapping[str, PydanticField]: +def _get_model_fields(model: Type["Model"]) -> Mapping[str, PydanticField]: if IS_PYDANTIC_V2: - return model.model_fields # type: ignore # Pydantic v2 - else: - return model.__fields__ # type: ignore # Pydantic v1 + return cast(Mapping[str, PydanticField], model.model_fields) # type: ignore[attr-defined] + return cast(Mapping[str, PydanticField], model.__fields__) -def _get_field_default(field: PydanticField) -> typing.Any: +def _get_field_default(field: PydanticField) -> Any: try: - value = field.get_default() # type: ignore # Pydantic < v1.10.15 + value = field.get_default() # type: ignore[union-attr] except: value = field.default if IS_PYDANTIC_V2: diff --git a/src/vapi/core/request_options.py b/src/vapi/core/request_options.py index d0bf0dbc..1b388044 100644 --- a/src/vapi/core/request_options.py +++ b/src/vapi/core/request_options.py @@ -23,6 +23,8 @@ class RequestOptions(typing.TypedDict, total=False): - additional_query_parameters: typing.Dict[str, typing.Any]. A dictionary containing additional parameters to spread into the request's query parameters dict - additional_body_parameters: typing.Dict[str, typing.Any]. A dictionary containing additional parameters to spread into the request's body parameters dict + + - chunk_size: int. The size, in bytes, to process each chunk of data being streamed back within the response. This equates to leveraging `chunk_size` within `requests` or `httpx`, and is only leveraged for file downloads. """ timeout_in_seconds: NotRequired[int] @@ -30,3 +32,4 @@ class RequestOptions(typing.TypedDict, total=False): additional_headers: NotRequired[typing.Dict[str, typing.Any]] additional_query_parameters: NotRequired[typing.Dict[str, typing.Any]] additional_body_parameters: NotRequired[typing.Dict[str, typing.Any]] + chunk_size: NotRequired[int] diff --git a/src/vapi/core/serialization.py b/src/vapi/core/serialization.py index cb5dcbf9..c36e865c 100644 --- a/src/vapi/core/serialization.py +++ b/src/vapi/core/serialization.py @@ -4,9 +4,8 @@ import inspect import typing -import typing_extensions - import pydantic +import typing_extensions class FieldMetadata: @@ -161,7 +160,12 @@ def _convert_mapping( direction: typing.Literal["read", "write"], ) -> typing.Mapping[str, object]: converted_object: typing.Dict[str, object] = {} - annotations = typing_extensions.get_type_hints(expected_type, include_extras=True) + try: + annotations = typing_extensions.get_type_hints(expected_type, include_extras=True) + except NameError: + # The TypedDict contains a circular reference, so + # we use the __annotations__ attribute directly. + annotations = getattr(expected_type, "__annotations__", {}) aliases_to_field_names = _get_alias_to_field_name(annotations) for key, value in object_.items(): if direction == "read" and key in aliases_to_field_names: diff --git a/src/vapi/core/unchecked_base_model.py b/src/vapi/core/unchecked_base_model.py new file mode 100644 index 00000000..67d7e3be --- /dev/null +++ b/src/vapi/core/unchecked_base_model.py @@ -0,0 +1,485 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import enum +import inspect +import sys +import typing +import uuid + +import pydantic +import typing_extensions +from .pydantic_utilities import ( # type: ignore[attr-defined] + IS_PYDANTIC_V2, + ModelField, + UniversalBaseModel, + get_args, + get_origin, + is_literal_type, + is_union, + parse_date, + parse_datetime, + parse_obj_as, +) +from .serialization import get_field_to_alias_mapping +from pydantic_core import PydanticUndefined + + +class UnionMetadata: + discriminant: str + + def __init__(self, *, discriminant: str) -> None: + self.discriminant = discriminant + + +Model = typing.TypeVar("Model", bound=pydantic.BaseModel) + + +def _maybe_resolve_forward_ref( + type_: typing.Any, + host: typing.Optional[typing.Type[typing.Any]], +) -> typing.Any: + """Resolve a ForwardRef using the module where *host* is defined. + + Pydantic v2 + ``from __future__ import annotations`` can leave field + annotations as ``list[ForwardRef('Block')]`` even after ``model_rebuild``. + Without resolution, ``construct_type`` sees a ForwardRef (not a class) and + skips recursive model construction, leaving nested data as raw dicts. + """ + if host is None or not isinstance(type_, typing.ForwardRef): + return type_ + mod = sys.modules.get(host.__module__) + if mod is None: + return type_ + try: + return eval(type_.__forward_arg__, vars(mod)) + except Exception: + return type_ + + +class UncheckedBaseModel(UniversalBaseModel): + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 + else: + + class Config: + extra = pydantic.Extra.allow + + @classmethod + def model_construct( + cls: typing.Type["Model"], + _fields_set: typing.Optional[typing.Set[str]] = None, + **values: typing.Any, + ) -> "Model": + # Fallback construct function to the specified override below. + return cls.construct(_fields_set=_fields_set, **values) + + # Allow construct to not validate model + # Implementation taken from: https://github.com/pydantic/pydantic/issues/1168#issuecomment-817742836 + @classmethod + def construct( + cls: typing.Type["Model"], + _fields_set: typing.Optional[typing.Set[str]] = None, + **values: typing.Any, + ) -> "Model": + m = cls.__new__(cls) + fields_values = {} + + if _fields_set is None: + _fields_set = set(values.keys()) + + fields = _get_model_fields(cls) + populate_by_name = _get_is_populate_by_name(cls) + field_aliases = get_field_to_alias_mapping(cls) + + for name, field in fields.items(): + # Key here is only used to pull data from the values dict + # you should always use the NAME of the field to for field_values, etc. + # because that's how the object is constructed from a pydantic perspective + key = field.alias + if (key is None or field.alias == name) and name in field_aliases: + key = field_aliases[name] + + if key is None or (key not in values and populate_by_name): # Added this to allow population by field name + key = name + + if key in values: + if IS_PYDANTIC_V2: + type_ = field.annotation # type: ignore # Pydantic v2 + else: + type_ = typing.cast(typing.Type, field.outer_type_) # type: ignore # Pydantic < v1.10.15 + + fields_values[name] = ( + construct_type(object_=values[key], type_=type_, host=cls) if type_ is not None else values[key] + ) + _fields_set.add(name) + else: + default = _get_field_default(field) + fields_values[name] = default + + # If the default values are non-null act like they've been set + # This effectively allows exclude_unset to work like exclude_none where + # the latter passes through intentionally set none values. + if default != None and default != PydanticUndefined: + _fields_set.add(name) + + # Add extras back in + extras = {} + pydantic_alias_fields = [field.alias for field in fields.values()] + internal_alias_fields = list(field_aliases.values()) + for key, value in values.items(): + # If the key is not a field by name, nor an alias to a field, then it's extra + if (key not in pydantic_alias_fields and key not in internal_alias_fields) and key not in fields: + if IS_PYDANTIC_V2: + extras[key] = value + else: + _fields_set.add(key) + fields_values[key] = value + + object.__setattr__(m, "__dict__", fields_values) + + if IS_PYDANTIC_V2: + object.__setattr__(m, "__pydantic_private__", None) + object.__setattr__(m, "__pydantic_extra__", extras) + object.__setattr__(m, "__pydantic_fields_set__", _fields_set) + else: + object.__setattr__(m, "__fields_set__", _fields_set) + m._init_private_attributes() # type: ignore # Pydantic v1 + return m + + +def _validate_collection_items_compatible(collection: typing.Any, target_type: typing.Type[typing.Any]) -> bool: + """ + Validate that all items in a collection are compatible with the target type. + + Args: + collection: The collection to validate (list, set, or dict values) + target_type: The target type to validate against + + Returns: + True if all items are compatible, False otherwise + """ + if inspect.isclass(target_type) and issubclass(target_type, pydantic.BaseModel): + for item in collection: + try: + # Try to validate the item against the target type + if isinstance(item, dict): + parse_obj_as(target_type, item) + else: + # If it's not a dict, it might already be the right type + if not isinstance(item, target_type): + return False + except Exception: + return False + return True + + +def _get_literal_field_value( + inner_type: typing.Type[typing.Any], field_name: str, field: typing.Any, object_: typing.Any +) -> typing.Any: + """Get the value of a Literal field from *object_*, checking both alias and field name.""" + name_or_alias = get_field_to_alias_mapping(inner_type).get(field_name, field_name) + pydantic_alias = getattr(field, "alias", None) + if isinstance(object_, dict): + if name_or_alias in object_: + return object_[name_or_alias] + if pydantic_alias and pydantic_alias != name_or_alias and pydantic_alias in object_: + return object_[pydantic_alias] + return None + return getattr(object_, name_or_alias, getattr(object_, pydantic_alias, None) if pydantic_alias else None) + + +def _literal_fields_match_strict(inner_type: typing.Type[typing.Any], object_: typing.Any) -> bool: + """Return True iff every Literal-typed field in *inner_type* is **present** in + *object_* and its value equals the field's declared default. + + This prevents models whose fields are all optional (e.g. ``FigureDetails``) + from vacuously matching inputs that don't carry the discriminant key at all + (e.g. ``{}`` for text blocks). For types with no Literal fields this + returns True unconditionally. + """ + fields = _get_model_fields(inner_type) + for field_name, field in fields.items(): + if IS_PYDANTIC_V2: + field_type = field.annotation # type: ignore # Pydantic v2 + else: + field_type = field.outer_type_ # type: ignore # Pydantic v1 + + if is_literal_type(field_type): # type: ignore[arg-type] + field_default = _get_field_default(field) + object_value = _get_literal_field_value(inner_type, field_name, field, object_) + if field_default != object_value: + return False + return True + + +def _convert_undiscriminated_union_type( + union_type: typing.Type[typing.Any], + object_: typing.Any, + host: typing.Optional[typing.Type[typing.Any]] = None, +) -> typing.Any: + inner_types = get_args(union_type) + if typing.Any in inner_types: + return object_ + + # When any union member carries a Literal discriminant field, require the + # discriminant key to be present AND matching before accepting a candidate. + # This prevents models with all-optional fields (e.g. FigureDetails) from + # greedily matching inputs that belong to a different variant or to a + # plain-dict fallback (e.g. EmptyBlockDetails = Dict[str, Any]). + has_literal_discriminant = any( + inspect.isclass(t) + and issubclass(t, pydantic.BaseModel) + and any( + is_literal_type( + f.annotation if IS_PYDANTIC_V2 else f.outer_type_ # type: ignore + ) + for f in _get_model_fields(t).values() + ) + for t in inner_types + ) + + for inner_type in inner_types: + # Handle lists of objects that need parsing + if get_origin(inner_type) is list and isinstance(object_, list): + list_inner_type = _maybe_resolve_forward_ref(get_args(inner_type)[0], host) + try: + if inspect.isclass(list_inner_type) and issubclass(list_inner_type, pydantic.BaseModel): + # Validate that all items in the list are compatible with the target type + if _validate_collection_items_compatible(object_, list_inner_type): + parsed_list = [parse_obj_as(object_=item, type_=list_inner_type) for item in object_] + return parsed_list + except Exception: + pass + + try: + if inspect.isclass(inner_type) and issubclass(inner_type, pydantic.BaseModel): + if has_literal_discriminant and not _literal_fields_match_strict(inner_type, object_): + continue + # Attempt a validated parse until one works + return parse_obj_as(inner_type, object_) + except Exception: + continue + + # First pass: try types where all literal fields match the object's values. + for inner_type in inner_types: + if inspect.isclass(inner_type) and issubclass(inner_type, pydantic.BaseModel): + if has_literal_discriminant: + if not _literal_fields_match_strict(inner_type, object_): + continue + else: + # Legacy lenient check: skip only when a Literal value is + # present but doesn't match (allows absent-discriminant inputs). + fields = _get_model_fields(inner_type) + literal_fields_match = True + for field_name, field in fields.items(): + if IS_PYDANTIC_V2: + field_type = field.annotation # type: ignore # Pydantic v2 + else: + field_type = field.outer_type_ # type: ignore # Pydantic v1 + + if is_literal_type(field_type): # type: ignore[arg-type] + field_default = _get_field_default(field) + object_value = _get_literal_field_value(inner_type, field_name, field, object_) + if object_value is not None and field_default != object_value: + literal_fields_match = False + break + + if not literal_fields_match: + continue + + try: + return construct_type(object_=object_, type_=inner_type, host=host) + except Exception: + continue + + # Second pass: if no literal matches, return the first successful cast. + # When a Literal discriminant is present, skip Pydantic models whose + # discriminant doesn't match so that plain-dict fallback types are reached. + for inner_type in inner_types: + try: + if has_literal_discriminant and inspect.isclass(inner_type) and issubclass(inner_type, pydantic.BaseModel): + if not _literal_fields_match_strict(inner_type, object_): + continue + return construct_type(object_=object_, type_=inner_type, host=host) + except Exception: + continue + + +def _convert_union_type( + type_: typing.Type[typing.Any], + object_: typing.Any, + host: typing.Optional[typing.Type[typing.Any]] = None, +) -> typing.Any: + base_type = get_origin(type_) or type_ + union_type = type_ + if base_type == typing_extensions.Annotated: # type: ignore[comparison-overlap] + union_type = get_args(type_)[0] + annotated_metadata = get_args(type_)[1:] + for metadata in annotated_metadata: + if isinstance(metadata, UnionMetadata): + try: + # Cast to the correct type, based on the discriminant + for inner_type in get_args(union_type): + try: + objects_discriminant = getattr(object_, metadata.discriminant) + except: + objects_discriminant = object_[metadata.discriminant] + if inner_type.__fields__[metadata.discriminant].default == objects_discriminant: + return construct_type(object_=object_, type_=inner_type, host=host) + except Exception: + # Allow to fall through to our regular union handling + pass + return _convert_undiscriminated_union_type(union_type, object_, host) + + +def construct_type( + *, + type_: typing.Type[typing.Any], + object_: typing.Any, + host: typing.Optional[typing.Type[typing.Any]] = None, +) -> typing.Any: + """ + Here we are essentially creating the same `construct` method in spirit as the above, but for all types, not just + Pydantic models. + The idea is to essentially attempt to coerce object_ to type_ (recursively) + """ + # Short circuit when dealing with optionals, don't try to coerces None to a type + if object_ is None: + return None + + base_type = get_origin(type_) or type_ + is_annotated = base_type == typing_extensions.Annotated # type: ignore[comparison-overlap] + maybe_annotation_members = get_args(type_) + is_annotated_union = is_annotated and is_union(get_origin(maybe_annotation_members[0])) + + if base_type == typing.Any: # type: ignore[comparison-overlap] + return object_ + + if base_type == dict: + if not isinstance(object_, typing.Mapping): + return object_ + + key_type, items_type = get_args(type_) + key_type = _maybe_resolve_forward_ref(key_type, host) + items_type = _maybe_resolve_forward_ref(items_type, host) + d = { + construct_type(object_=key, type_=key_type, host=host): construct_type( + object_=item, type_=items_type, host=host + ) + for key, item in object_.items() + } + return d + + if base_type == list: + if not isinstance(object_, list): + return object_ + + inner_type = _maybe_resolve_forward_ref(get_args(type_)[0], host) + return [construct_type(object_=entry, type_=inner_type, host=host) for entry in object_] + + if base_type == set: + if not isinstance(object_, set) and not isinstance(object_, list): + return object_ + + inner_type = _maybe_resolve_forward_ref(get_args(type_)[0], host) + return {construct_type(object_=entry, type_=inner_type, host=host) for entry in object_} + + if is_union(base_type) or is_annotated_union: + return _convert_union_type(type_, object_, host) + + # Cannot do an `issubclass` with a literal type, let's also just confirm we have a class before this call + if ( + object_ is not None + and not is_literal_type(type_) + and ( + (inspect.isclass(base_type) and issubclass(base_type, pydantic.BaseModel)) + or ( + is_annotated + and inspect.isclass(maybe_annotation_members[0]) + and issubclass(maybe_annotation_members[0], pydantic.BaseModel) + ) + ) + ): + if IS_PYDANTIC_V2: + return type_.model_construct(**object_) + else: + return type_.construct(**object_) + + if base_type == dt.datetime: + try: + return parse_datetime(object_) + except Exception: + return object_ + + if base_type == dt.date: + try: + return parse_date(object_) + except Exception: + return object_ + + if base_type == uuid.UUID: + try: + return uuid.UUID(object_) + except Exception: + return object_ + + if base_type == int: + try: + return int(object_) + except Exception: + return object_ + + if base_type == bool: + try: + if isinstance(object_, str): + stringified_object = object_.lower() + return stringified_object == "true" or stringified_object == "1" + + return bool(object_) + except Exception: + return object_ + + if inspect.isclass(base_type) and issubclass(base_type, enum.Enum): + try: + return base_type(object_) + except (ValueError, KeyError): + return object_ + + return object_ + + +def _get_is_populate_by_name(model: typing.Type["Model"]) -> bool: + if IS_PYDANTIC_V2: + return model.model_config.get("populate_by_name", False) # type: ignore # Pydantic v2 + return model.__config__.allow_population_by_field_name # type: ignore # Pydantic v1 + + +from pydantic.fields import FieldInfo as _FieldInfo + +PydanticField = typing.Union[ModelField, _FieldInfo] + + +# Pydantic V1 swapped the typing of __fields__'s values from ModelField to FieldInfo +# And so we try to handle both V1 cases, as well as V2 (FieldInfo from model.model_fields) +def _get_model_fields( + model: typing.Type["Model"], +) -> typing.Mapping[str, PydanticField]: + if IS_PYDANTIC_V2: + return model.model_fields # type: ignore # Pydantic v2 + else: + return model.__fields__ # type: ignore # Pydantic v1 + + +def _get_field_default(field: PydanticField) -> typing.Any: + try: + value = field.get_default() # type: ignore # Pydantic < v1.10.15 + except: + value = field.default + if IS_PYDANTIC_V2: + from pydantic_core import PydanticUndefined + + if value == PydanticUndefined: + return None + return value + return value diff --git a/src/vapi/errors/__init__.py b/src/vapi/errors/__init__.py index 14350df6..faed7e51 100644 --- a/src/vapi/errors/__init__.py +++ b/src/vapi/errors/__init__.py @@ -1,5 +1,35 @@ # This file was auto-generated by Fern from our API Definition. -from .bad_request_error import BadRequestError +# isort: skip_file -__all__ = ["BadRequestError"] +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .bad_request_error import BadRequestError + from .not_found_error import NotFoundError +_dynamic_imports: typing.Dict[str, str] = {"BadRequestError": ".bad_request_error", "NotFoundError": ".not_found_error"} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = ["BadRequestError", "NotFoundError"] diff --git a/src/vapi/errors/bad_request_error.py b/src/vapi/errors/bad_request_error.py index 9c13c61f..ec78e269 100644 --- a/src/vapi/errors/bad_request_error.py +++ b/src/vapi/errors/bad_request_error.py @@ -1,9 +1,10 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.api_error import ApiError import typing +from ..core.api_error import ApiError + class BadRequestError(ApiError): - def __init__(self, body: typing.Optional[typing.Any]): - super().__init__(status_code=400, body=body) + def __init__(self, body: typing.Any, headers: typing.Optional[typing.Dict[str, str]] = None): + super().__init__(status_code=400, headers=headers, body=body) diff --git a/src/vapi/errors/not_found_error.py b/src/vapi/errors/not_found_error.py new file mode 100644 index 00000000..75f557df --- /dev/null +++ b/src/vapi/errors/not_found_error.py @@ -0,0 +1,10 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from ..core.api_error import ApiError + + +class NotFoundError(ApiError): + def __init__(self, body: typing.Any, headers: typing.Optional[typing.Dict[str, str]] = None): + super().__init__(status_code=404, headers=headers, body=body) diff --git a/src/vapi/eval/__init__.py b/src/vapi/eval/__init__.py new file mode 100644 index 00000000..877fcbd3 --- /dev/null +++ b/src/vapi/eval/__init__.py @@ -0,0 +1,61 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ( + CreateEvalRunDtoTarget, + CreateEvalRunDtoTarget_Assistant, + CreateEvalRunDtoTarget_Squad, + CreateEvalRunDtoType, + EvalControllerGetPaginatedRequestSortOrder, + EvalControllerGetRunsPaginatedRequestSortOrder, + UpdateEvalDtoMessagesItem, + UpdateEvalDtoType, + ) +_dynamic_imports: typing.Dict[str, str] = { + "CreateEvalRunDtoTarget": ".types", + "CreateEvalRunDtoTarget_Assistant": ".types", + "CreateEvalRunDtoTarget_Squad": ".types", + "CreateEvalRunDtoType": ".types", + "EvalControllerGetPaginatedRequestSortOrder": ".types", + "EvalControllerGetRunsPaginatedRequestSortOrder": ".types", + "UpdateEvalDtoMessagesItem": ".types", + "UpdateEvalDtoType": ".types", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = [ + "CreateEvalRunDtoTarget", + "CreateEvalRunDtoTarget_Assistant", + "CreateEvalRunDtoTarget_Squad", + "CreateEvalRunDtoType", + "EvalControllerGetPaginatedRequestSortOrder", + "EvalControllerGetRunsPaginatedRequestSortOrder", + "UpdateEvalDtoMessagesItem", + "UpdateEvalDtoType", +] diff --git a/src/vapi/eval/client.py b/src/vapi/eval/client.py new file mode 100644 index 00000000..a51db659 --- /dev/null +++ b/src/vapi/eval/client.py @@ -0,0 +1,1052 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.request_options import RequestOptions +from ..types.create_eval_dto import CreateEvalDto +from ..types.create_eval_dto_messages_item import CreateEvalDtoMessagesItem +from ..types.create_eval_dto_type import CreateEvalDtoType +from ..types.eval import Eval +from ..types.eval_paginated_response import EvalPaginatedResponse +from ..types.eval_run import EvalRun +from ..types.eval_run_paginated_response import EvalRunPaginatedResponse +from .raw_client import AsyncRawEvalClient, RawEvalClient +from .types.create_eval_run_dto_target import CreateEvalRunDtoTarget +from .types.create_eval_run_dto_type import CreateEvalRunDtoType +from .types.eval_controller_get_paginated_request_sort_order import EvalControllerGetPaginatedRequestSortOrder +from .types.eval_controller_get_runs_paginated_request_sort_order import EvalControllerGetRunsPaginatedRequestSortOrder +from .types.update_eval_dto_messages_item import UpdateEvalDtoMessagesItem +from .types.update_eval_dto_type import UpdateEvalDtoType + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class EvalClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawEvalClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawEvalClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawEvalClient + """ + return self._raw_client + + def eval_controller_get_paginated( + self, + *, + id: typing.Optional[str] = None, + page: typing.Optional[float] = None, + sort_order: typing.Optional[EvalControllerGetPaginatedRequestSortOrder] = None, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> EvalPaginatedResponse: + """ + Parameters + ---------- + id : typing.Optional[str] + + page : typing.Optional[float] + This is the page number to return. Defaults to 1. + + sort_order : typing.Optional[EvalControllerGetPaginatedRequestSortOrder] + This is the sort order for pagination. Defaults to 'DESC'. + + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + EvalPaginatedResponse + + + Examples + -------- + from vapi import Vapi + + client = Vapi( + token="YOUR_TOKEN", + ) + client.eval.eval_controller_get_paginated() + """ + _response = self._raw_client.eval_controller_get_paginated( + id=id, + page=page, + sort_order=sort_order, + limit=limit, + created_at_gt=created_at_gt, + created_at_lt=created_at_lt, + created_at_ge=created_at_ge, + created_at_le=created_at_le, + updated_at_gt=updated_at_gt, + updated_at_lt=updated_at_lt, + updated_at_ge=updated_at_ge, + updated_at_le=updated_at_le, + request_options=request_options, + ) + return _response.data + + def eval_controller_create( + self, + *, + messages: typing.Sequence[CreateEvalDtoMessagesItem], + type: CreateEvalDtoType, + name: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> Eval: + """ + Parameters + ---------- + messages : typing.Sequence[CreateEvalDtoMessagesItem] + This is the mock conversation that will be used to evaluate the flow of the conversation. + + Mock Messages are used to simulate the flow of the conversation + + Evaluation Messages are used as checkpoints in the flow where the model's response to previous conversation needs to be evaluated to check the content and tool calls + + type : CreateEvalDtoType + This is the type of the eval. + Currently it is fixed to `chat.mockConversation`. + + name : typing.Optional[str] + This is the name of the eval. + It helps identify what the eval is checking for. + + description : typing.Optional[str] + This is the description of the eval. + This helps describe the eval and its purpose in detail. It will not be used to evaluate the flow of the conversation. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Eval + + + Examples + -------- + from vapi import ChatEvalAssistantMessageMock, Vapi + + client = Vapi( + token="YOUR_TOKEN", + ) + client.eval.eval_controller_create( + messages=[ + ChatEvalAssistantMessageMock( + role="assistant", + ) + ], + type="chat.mockConversation", + ) + """ + _response = self._raw_client.eval_controller_create( + messages=messages, type=type, name=name, description=description, request_options=request_options + ) + return _response.data + + def eval_controller_get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Eval: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Eval + + + Examples + -------- + from vapi import Vapi + + client = Vapi( + token="YOUR_TOKEN", + ) + client.eval.eval_controller_get( + id="id", + ) + """ + _response = self._raw_client.eval_controller_get(id, request_options=request_options) + return _response.data + + def eval_controller_remove(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Eval: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Eval + + + Examples + -------- + from vapi import Vapi + + client = Vapi( + token="YOUR_TOKEN", + ) + client.eval.eval_controller_remove( + id="id", + ) + """ + _response = self._raw_client.eval_controller_remove(id, request_options=request_options) + return _response.data + + def eval_controller_update( + self, + id: str, + *, + messages: typing.Optional[typing.Sequence[UpdateEvalDtoMessagesItem]] = OMIT, + name: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + type: typing.Optional[UpdateEvalDtoType] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> Eval: + """ + Parameters + ---------- + id : str + + messages : typing.Optional[typing.Sequence[UpdateEvalDtoMessagesItem]] + This is the mock conversation that will be used to evaluate the flow of the conversation. + + Mock Messages are used to simulate the flow of the conversation + + Evaluation Messages are used as checkpoints in the flow where the model's response to previous conversation needs to be evaluated to check the content and tool calls + + name : typing.Optional[str] + This is the name of the eval. + It helps identify what the eval is checking for. + + description : typing.Optional[str] + This is the description of the eval. + This helps describe the eval and its purpose in detail. It will not be used to evaluate the flow of the conversation. + + type : typing.Optional[UpdateEvalDtoType] + This is the type of the eval. + Currently it is fixed to `chat.mockConversation`. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Eval + + + Examples + -------- + from vapi import Vapi + + client = Vapi( + token="YOUR_TOKEN", + ) + client.eval.eval_controller_update( + id="id", + ) + """ + _response = self._raw_client.eval_controller_update( + id, messages=messages, name=name, description=description, type=type, request_options=request_options + ) + return _response.data + + def eval_controller_get_run(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> EvalRun: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + EvalRun + + + Examples + -------- + from vapi import Vapi + + client = Vapi( + token="YOUR_TOKEN", + ) + client.eval.eval_controller_get_run( + id="id", + ) + """ + _response = self._raw_client.eval_controller_get_run(id, request_options=request_options) + return _response.data + + def eval_controller_remove_run( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> EvalRun: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + EvalRun + + + Examples + -------- + from vapi import Vapi + + client = Vapi( + token="YOUR_TOKEN", + ) + client.eval.eval_controller_remove_run( + id="id", + ) + """ + _response = self._raw_client.eval_controller_remove_run(id, request_options=request_options) + return _response.data + + def eval_controller_get_runs_paginated( + self, + *, + id: typing.Optional[str] = None, + page: typing.Optional[float] = None, + sort_order: typing.Optional[EvalControllerGetRunsPaginatedRequestSortOrder] = None, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> EvalRunPaginatedResponse: + """ + Parameters + ---------- + id : typing.Optional[str] + + page : typing.Optional[float] + This is the page number to return. Defaults to 1. + + sort_order : typing.Optional[EvalControllerGetRunsPaginatedRequestSortOrder] + This is the sort order for pagination. Defaults to 'DESC'. + + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + EvalRunPaginatedResponse + + + Examples + -------- + from vapi import Vapi + + client = Vapi( + token="YOUR_TOKEN", + ) + client.eval.eval_controller_get_runs_paginated() + """ + _response = self._raw_client.eval_controller_get_runs_paginated( + id=id, + page=page, + sort_order=sort_order, + limit=limit, + created_at_gt=created_at_gt, + created_at_lt=created_at_lt, + created_at_ge=created_at_ge, + created_at_le=created_at_le, + updated_at_gt=updated_at_gt, + updated_at_lt=updated_at_lt, + updated_at_ge=updated_at_ge, + updated_at_le=updated_at_le, + request_options=request_options, + ) + return _response.data + + def eval_controller_run( + self, + *, + target: CreateEvalRunDtoTarget, + type: CreateEvalRunDtoType, + eval: typing.Optional[CreateEvalDto] = OMIT, + eval_id: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.Dict[str, typing.Any]: + """ + Parameters + ---------- + target : CreateEvalRunDtoTarget + This is the target that will be run against the eval + + type : CreateEvalRunDtoType + This is the type of the run. + Currently it is fixed to `eval`. + + eval : typing.Optional[CreateEvalDto] + This is the transient eval that will be run + + eval_id : typing.Optional[str] + This is the id of the eval that will be run. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + typing.Dict[str, typing.Any] + + + Examples + -------- + from vapi import Vapi + from vapi.eval import CreateEvalRunDtoTarget_Assistant + + client = Vapi( + token="YOUR_TOKEN", + ) + client.eval.eval_controller_run( + target=CreateEvalRunDtoTarget_Assistant(), + type="eval", + ) + """ + _response = self._raw_client.eval_controller_run( + target=target, type=type, eval=eval, eval_id=eval_id, request_options=request_options + ) + return _response.data + + +class AsyncEvalClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawEvalClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawEvalClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawEvalClient + """ + return self._raw_client + + async def eval_controller_get_paginated( + self, + *, + id: typing.Optional[str] = None, + page: typing.Optional[float] = None, + sort_order: typing.Optional[EvalControllerGetPaginatedRequestSortOrder] = None, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> EvalPaginatedResponse: + """ + Parameters + ---------- + id : typing.Optional[str] + + page : typing.Optional[float] + This is the page number to return. Defaults to 1. + + sort_order : typing.Optional[EvalControllerGetPaginatedRequestSortOrder] + This is the sort order for pagination. Defaults to 'DESC'. + + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + EvalPaginatedResponse + + + Examples + -------- + import asyncio + + from vapi import AsyncVapi + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.eval.eval_controller_get_paginated() + + + asyncio.run(main()) + """ + _response = await self._raw_client.eval_controller_get_paginated( + id=id, + page=page, + sort_order=sort_order, + limit=limit, + created_at_gt=created_at_gt, + created_at_lt=created_at_lt, + created_at_ge=created_at_ge, + created_at_le=created_at_le, + updated_at_gt=updated_at_gt, + updated_at_lt=updated_at_lt, + updated_at_ge=updated_at_ge, + updated_at_le=updated_at_le, + request_options=request_options, + ) + return _response.data + + async def eval_controller_create( + self, + *, + messages: typing.Sequence[CreateEvalDtoMessagesItem], + type: CreateEvalDtoType, + name: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> Eval: + """ + Parameters + ---------- + messages : typing.Sequence[CreateEvalDtoMessagesItem] + This is the mock conversation that will be used to evaluate the flow of the conversation. + + Mock Messages are used to simulate the flow of the conversation + + Evaluation Messages are used as checkpoints in the flow where the model's response to previous conversation needs to be evaluated to check the content and tool calls + + type : CreateEvalDtoType + This is the type of the eval. + Currently it is fixed to `chat.mockConversation`. + + name : typing.Optional[str] + This is the name of the eval. + It helps identify what the eval is checking for. + + description : typing.Optional[str] + This is the description of the eval. + This helps describe the eval and its purpose in detail. It will not be used to evaluate the flow of the conversation. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Eval + + + Examples + -------- + import asyncio + + from vapi import AsyncVapi, ChatEvalAssistantMessageMock + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.eval.eval_controller_create( + messages=[ + ChatEvalAssistantMessageMock( + role="assistant", + ) + ], + type="chat.mockConversation", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.eval_controller_create( + messages=messages, type=type, name=name, description=description, request_options=request_options + ) + return _response.data + + async def eval_controller_get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Eval: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Eval + + + Examples + -------- + import asyncio + + from vapi import AsyncVapi + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.eval.eval_controller_get( + id="id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.eval_controller_get(id, request_options=request_options) + return _response.data + + async def eval_controller_remove(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Eval: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Eval + + + Examples + -------- + import asyncio + + from vapi import AsyncVapi + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.eval.eval_controller_remove( + id="id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.eval_controller_remove(id, request_options=request_options) + return _response.data + + async def eval_controller_update( + self, + id: str, + *, + messages: typing.Optional[typing.Sequence[UpdateEvalDtoMessagesItem]] = OMIT, + name: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + type: typing.Optional[UpdateEvalDtoType] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> Eval: + """ + Parameters + ---------- + id : str + + messages : typing.Optional[typing.Sequence[UpdateEvalDtoMessagesItem]] + This is the mock conversation that will be used to evaluate the flow of the conversation. + + Mock Messages are used to simulate the flow of the conversation + + Evaluation Messages are used as checkpoints in the flow where the model's response to previous conversation needs to be evaluated to check the content and tool calls + + name : typing.Optional[str] + This is the name of the eval. + It helps identify what the eval is checking for. + + description : typing.Optional[str] + This is the description of the eval. + This helps describe the eval and its purpose in detail. It will not be used to evaluate the flow of the conversation. + + type : typing.Optional[UpdateEvalDtoType] + This is the type of the eval. + Currently it is fixed to `chat.mockConversation`. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Eval + + + Examples + -------- + import asyncio + + from vapi import AsyncVapi + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.eval.eval_controller_update( + id="id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.eval_controller_update( + id, messages=messages, name=name, description=description, type=type, request_options=request_options + ) + return _response.data + + async def eval_controller_get_run( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> EvalRun: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + EvalRun + + + Examples + -------- + import asyncio + + from vapi import AsyncVapi + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.eval.eval_controller_get_run( + id="id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.eval_controller_get_run(id, request_options=request_options) + return _response.data + + async def eval_controller_remove_run( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> EvalRun: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + EvalRun + + + Examples + -------- + import asyncio + + from vapi import AsyncVapi + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.eval.eval_controller_remove_run( + id="id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.eval_controller_remove_run(id, request_options=request_options) + return _response.data + + async def eval_controller_get_runs_paginated( + self, + *, + id: typing.Optional[str] = None, + page: typing.Optional[float] = None, + sort_order: typing.Optional[EvalControllerGetRunsPaginatedRequestSortOrder] = None, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> EvalRunPaginatedResponse: + """ + Parameters + ---------- + id : typing.Optional[str] + + page : typing.Optional[float] + This is the page number to return. Defaults to 1. + + sort_order : typing.Optional[EvalControllerGetRunsPaginatedRequestSortOrder] + This is the sort order for pagination. Defaults to 'DESC'. + + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + EvalRunPaginatedResponse + + + Examples + -------- + import asyncio + + from vapi import AsyncVapi + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.eval.eval_controller_get_runs_paginated() + + + asyncio.run(main()) + """ + _response = await self._raw_client.eval_controller_get_runs_paginated( + id=id, + page=page, + sort_order=sort_order, + limit=limit, + created_at_gt=created_at_gt, + created_at_lt=created_at_lt, + created_at_ge=created_at_ge, + created_at_le=created_at_le, + updated_at_gt=updated_at_gt, + updated_at_lt=updated_at_lt, + updated_at_ge=updated_at_ge, + updated_at_le=updated_at_le, + request_options=request_options, + ) + return _response.data + + async def eval_controller_run( + self, + *, + target: CreateEvalRunDtoTarget, + type: CreateEvalRunDtoType, + eval: typing.Optional[CreateEvalDto] = OMIT, + eval_id: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.Dict[str, typing.Any]: + """ + Parameters + ---------- + target : CreateEvalRunDtoTarget + This is the target that will be run against the eval + + type : CreateEvalRunDtoType + This is the type of the run. + Currently it is fixed to `eval`. + + eval : typing.Optional[CreateEvalDto] + This is the transient eval that will be run + + eval_id : typing.Optional[str] + This is the id of the eval that will be run. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + typing.Dict[str, typing.Any] + + + Examples + -------- + import asyncio + + from vapi import AsyncVapi + from vapi.eval import CreateEvalRunDtoTarget_Assistant + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.eval.eval_controller_run( + target=CreateEvalRunDtoTarget_Assistant(), + type="eval", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.eval_controller_run( + target=target, type=type, eval=eval, eval_id=eval_id, request_options=request_options + ) + return _response.data diff --git a/src/vapi/eval/raw_client.py b/src/vapi/eval/raw_client.py new file mode 100644 index 00000000..9c11348f --- /dev/null +++ b/src/vapi/eval/raw_client.py @@ -0,0 +1,1208 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing +from json.decoder import JSONDecodeError + +from ..core.api_error import ApiError +from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.datetime_utils import serialize_datetime +from ..core.http_response import AsyncHttpResponse, HttpResponse +from ..core.jsonable_encoder import jsonable_encoder +from ..core.parse_error import ParsingError +from ..core.request_options import RequestOptions +from ..core.serialization import convert_and_respect_annotation_metadata +from ..core.unchecked_base_model import construct_type +from ..types.create_eval_dto import CreateEvalDto +from ..types.create_eval_dto_messages_item import CreateEvalDtoMessagesItem +from ..types.create_eval_dto_type import CreateEvalDtoType +from ..types.eval import Eval +from ..types.eval_paginated_response import EvalPaginatedResponse +from ..types.eval_run import EvalRun +from ..types.eval_run_paginated_response import EvalRunPaginatedResponse +from .types.create_eval_run_dto_target import CreateEvalRunDtoTarget +from .types.create_eval_run_dto_type import CreateEvalRunDtoType +from .types.eval_controller_get_paginated_request_sort_order import EvalControllerGetPaginatedRequestSortOrder +from .types.eval_controller_get_runs_paginated_request_sort_order import EvalControllerGetRunsPaginatedRequestSortOrder +from .types.update_eval_dto_messages_item import UpdateEvalDtoMessagesItem +from .types.update_eval_dto_type import UpdateEvalDtoType +from pydantic import ValidationError + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class RawEvalClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def eval_controller_get_paginated( + self, + *, + id: typing.Optional[str] = None, + page: typing.Optional[float] = None, + sort_order: typing.Optional[EvalControllerGetPaginatedRequestSortOrder] = None, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[EvalPaginatedResponse]: + """ + Parameters + ---------- + id : typing.Optional[str] + + page : typing.Optional[float] + This is the page number to return. Defaults to 1. + + sort_order : typing.Optional[EvalControllerGetPaginatedRequestSortOrder] + This is the sort order for pagination. Defaults to 'DESC'. + + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[EvalPaginatedResponse] + + """ + _response = self._client_wrapper.httpx_client.request( + "eval", + method="GET", + params={ + "id": id, + "page": page, + "sortOrder": sort_order, + "limit": limit, + "createdAtGt": serialize_datetime(created_at_gt) if created_at_gt is not None else None, + "createdAtLt": serialize_datetime(created_at_lt) if created_at_lt is not None else None, + "createdAtGe": serialize_datetime(created_at_ge) if created_at_ge is not None else None, + "createdAtLe": serialize_datetime(created_at_le) if created_at_le is not None else None, + "updatedAtGt": serialize_datetime(updated_at_gt) if updated_at_gt is not None else None, + "updatedAtLt": serialize_datetime(updated_at_lt) if updated_at_lt is not None else None, + "updatedAtGe": serialize_datetime(updated_at_ge) if updated_at_ge is not None else None, + "updatedAtLe": serialize_datetime(updated_at_le) if updated_at_le is not None else None, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + EvalPaginatedResponse, + construct_type( + type_=EvalPaginatedResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def eval_controller_create( + self, + *, + messages: typing.Sequence[CreateEvalDtoMessagesItem], + type: CreateEvalDtoType, + name: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[Eval]: + """ + Parameters + ---------- + messages : typing.Sequence[CreateEvalDtoMessagesItem] + This is the mock conversation that will be used to evaluate the flow of the conversation. + + Mock Messages are used to simulate the flow of the conversation + + Evaluation Messages are used as checkpoints in the flow where the model's response to previous conversation needs to be evaluated to check the content and tool calls + + type : CreateEvalDtoType + This is the type of the eval. + Currently it is fixed to `chat.mockConversation`. + + name : typing.Optional[str] + This is the name of the eval. + It helps identify what the eval is checking for. + + description : typing.Optional[str] + This is the description of the eval. + This helps describe the eval and its purpose in detail. It will not be used to evaluate the flow of the conversation. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[Eval] + + """ + _response = self._client_wrapper.httpx_client.request( + "eval", + method="POST", + json={ + "messages": convert_and_respect_annotation_metadata( + object_=messages, annotation=typing.Sequence[CreateEvalDtoMessagesItem], direction="write" + ), + "name": name, + "description": description, + "type": type, + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Eval, + construct_type( + type_=Eval, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def eval_controller_get( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[Eval]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[Eval] + + """ + _response = self._client_wrapper.httpx_client.request( + f"eval/{jsonable_encoder(id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Eval, + construct_type( + type_=Eval, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def eval_controller_remove( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[Eval]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[Eval] + + """ + _response = self._client_wrapper.httpx_client.request( + f"eval/{jsonable_encoder(id)}", + method="DELETE", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Eval, + construct_type( + type_=Eval, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def eval_controller_update( + self, + id: str, + *, + messages: typing.Optional[typing.Sequence[UpdateEvalDtoMessagesItem]] = OMIT, + name: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + type: typing.Optional[UpdateEvalDtoType] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[Eval]: + """ + Parameters + ---------- + id : str + + messages : typing.Optional[typing.Sequence[UpdateEvalDtoMessagesItem]] + This is the mock conversation that will be used to evaluate the flow of the conversation. + + Mock Messages are used to simulate the flow of the conversation + + Evaluation Messages are used as checkpoints in the flow where the model's response to previous conversation needs to be evaluated to check the content and tool calls + + name : typing.Optional[str] + This is the name of the eval. + It helps identify what the eval is checking for. + + description : typing.Optional[str] + This is the description of the eval. + This helps describe the eval and its purpose in detail. It will not be used to evaluate the flow of the conversation. + + type : typing.Optional[UpdateEvalDtoType] + This is the type of the eval. + Currently it is fixed to `chat.mockConversation`. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[Eval] + + """ + _response = self._client_wrapper.httpx_client.request( + f"eval/{jsonable_encoder(id)}", + method="PATCH", + json={ + "messages": convert_and_respect_annotation_metadata( + object_=messages, annotation=typing.Sequence[UpdateEvalDtoMessagesItem], direction="write" + ), + "name": name, + "description": description, + "type": type, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Eval, + construct_type( + type_=Eval, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def eval_controller_get_run( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[EvalRun]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[EvalRun] + + """ + _response = self._client_wrapper.httpx_client.request( + f"eval/run/{jsonable_encoder(id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + EvalRun, + construct_type( + type_=EvalRun, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def eval_controller_remove_run( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[EvalRun]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[EvalRun] + + """ + _response = self._client_wrapper.httpx_client.request( + f"eval/run/{jsonable_encoder(id)}", + method="DELETE", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + EvalRun, + construct_type( + type_=EvalRun, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def eval_controller_get_runs_paginated( + self, + *, + id: typing.Optional[str] = None, + page: typing.Optional[float] = None, + sort_order: typing.Optional[EvalControllerGetRunsPaginatedRequestSortOrder] = None, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[EvalRunPaginatedResponse]: + """ + Parameters + ---------- + id : typing.Optional[str] + + page : typing.Optional[float] + This is the page number to return. Defaults to 1. + + sort_order : typing.Optional[EvalControllerGetRunsPaginatedRequestSortOrder] + This is the sort order for pagination. Defaults to 'DESC'. + + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[EvalRunPaginatedResponse] + + """ + _response = self._client_wrapper.httpx_client.request( + "eval/run", + method="GET", + params={ + "id": id, + "page": page, + "sortOrder": sort_order, + "limit": limit, + "createdAtGt": serialize_datetime(created_at_gt) if created_at_gt is not None else None, + "createdAtLt": serialize_datetime(created_at_lt) if created_at_lt is not None else None, + "createdAtGe": serialize_datetime(created_at_ge) if created_at_ge is not None else None, + "createdAtLe": serialize_datetime(created_at_le) if created_at_le is not None else None, + "updatedAtGt": serialize_datetime(updated_at_gt) if updated_at_gt is not None else None, + "updatedAtLt": serialize_datetime(updated_at_lt) if updated_at_lt is not None else None, + "updatedAtGe": serialize_datetime(updated_at_ge) if updated_at_ge is not None else None, + "updatedAtLe": serialize_datetime(updated_at_le) if updated_at_le is not None else None, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + EvalRunPaginatedResponse, + construct_type( + type_=EvalRunPaginatedResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def eval_controller_run( + self, + *, + target: CreateEvalRunDtoTarget, + type: CreateEvalRunDtoType, + eval: typing.Optional[CreateEvalDto] = OMIT, + eval_id: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[typing.Dict[str, typing.Any]]: + """ + Parameters + ---------- + target : CreateEvalRunDtoTarget + This is the target that will be run against the eval + + type : CreateEvalRunDtoType + This is the type of the run. + Currently it is fixed to `eval`. + + eval : typing.Optional[CreateEvalDto] + This is the transient eval that will be run + + eval_id : typing.Optional[str] + This is the id of the eval that will be run. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[typing.Dict[str, typing.Any]] + + """ + _response = self._client_wrapper.httpx_client.request( + "eval/run", + method="POST", + json={ + "eval": convert_and_respect_annotation_metadata( + object_=eval, annotation=CreateEvalDto, direction="write" + ), + "target": convert_and_respect_annotation_metadata( + object_=target, annotation=CreateEvalRunDtoTarget, direction="write" + ), + "type": type, + "evalId": eval_id, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.Dict[str, typing.Any], + construct_type( + type_=typing.Dict[str, typing.Any], # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawEvalClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def eval_controller_get_paginated( + self, + *, + id: typing.Optional[str] = None, + page: typing.Optional[float] = None, + sort_order: typing.Optional[EvalControllerGetPaginatedRequestSortOrder] = None, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[EvalPaginatedResponse]: + """ + Parameters + ---------- + id : typing.Optional[str] + + page : typing.Optional[float] + This is the page number to return. Defaults to 1. + + sort_order : typing.Optional[EvalControllerGetPaginatedRequestSortOrder] + This is the sort order for pagination. Defaults to 'DESC'. + + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[EvalPaginatedResponse] + + """ + _response = await self._client_wrapper.httpx_client.request( + "eval", + method="GET", + params={ + "id": id, + "page": page, + "sortOrder": sort_order, + "limit": limit, + "createdAtGt": serialize_datetime(created_at_gt) if created_at_gt is not None else None, + "createdAtLt": serialize_datetime(created_at_lt) if created_at_lt is not None else None, + "createdAtGe": serialize_datetime(created_at_ge) if created_at_ge is not None else None, + "createdAtLe": serialize_datetime(created_at_le) if created_at_le is not None else None, + "updatedAtGt": serialize_datetime(updated_at_gt) if updated_at_gt is not None else None, + "updatedAtLt": serialize_datetime(updated_at_lt) if updated_at_lt is not None else None, + "updatedAtGe": serialize_datetime(updated_at_ge) if updated_at_ge is not None else None, + "updatedAtLe": serialize_datetime(updated_at_le) if updated_at_le is not None else None, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + EvalPaginatedResponse, + construct_type( + type_=EvalPaginatedResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def eval_controller_create( + self, + *, + messages: typing.Sequence[CreateEvalDtoMessagesItem], + type: CreateEvalDtoType, + name: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[Eval]: + """ + Parameters + ---------- + messages : typing.Sequence[CreateEvalDtoMessagesItem] + This is the mock conversation that will be used to evaluate the flow of the conversation. + + Mock Messages are used to simulate the flow of the conversation + + Evaluation Messages are used as checkpoints in the flow where the model's response to previous conversation needs to be evaluated to check the content and tool calls + + type : CreateEvalDtoType + This is the type of the eval. + Currently it is fixed to `chat.mockConversation`. + + name : typing.Optional[str] + This is the name of the eval. + It helps identify what the eval is checking for. + + description : typing.Optional[str] + This is the description of the eval. + This helps describe the eval and its purpose in detail. It will not be used to evaluate the flow of the conversation. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[Eval] + + """ + _response = await self._client_wrapper.httpx_client.request( + "eval", + method="POST", + json={ + "messages": convert_and_respect_annotation_metadata( + object_=messages, annotation=typing.Sequence[CreateEvalDtoMessagesItem], direction="write" + ), + "name": name, + "description": description, + "type": type, + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Eval, + construct_type( + type_=Eval, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def eval_controller_get( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[Eval]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[Eval] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"eval/{jsonable_encoder(id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Eval, + construct_type( + type_=Eval, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def eval_controller_remove( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[Eval]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[Eval] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"eval/{jsonable_encoder(id)}", + method="DELETE", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Eval, + construct_type( + type_=Eval, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def eval_controller_update( + self, + id: str, + *, + messages: typing.Optional[typing.Sequence[UpdateEvalDtoMessagesItem]] = OMIT, + name: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + type: typing.Optional[UpdateEvalDtoType] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[Eval]: + """ + Parameters + ---------- + id : str + + messages : typing.Optional[typing.Sequence[UpdateEvalDtoMessagesItem]] + This is the mock conversation that will be used to evaluate the flow of the conversation. + + Mock Messages are used to simulate the flow of the conversation + + Evaluation Messages are used as checkpoints in the flow where the model's response to previous conversation needs to be evaluated to check the content and tool calls + + name : typing.Optional[str] + This is the name of the eval. + It helps identify what the eval is checking for. + + description : typing.Optional[str] + This is the description of the eval. + This helps describe the eval and its purpose in detail. It will not be used to evaluate the flow of the conversation. + + type : typing.Optional[UpdateEvalDtoType] + This is the type of the eval. + Currently it is fixed to `chat.mockConversation`. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[Eval] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"eval/{jsonable_encoder(id)}", + method="PATCH", + json={ + "messages": convert_and_respect_annotation_metadata( + object_=messages, annotation=typing.Sequence[UpdateEvalDtoMessagesItem], direction="write" + ), + "name": name, + "description": description, + "type": type, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Eval, + construct_type( + type_=Eval, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def eval_controller_get_run( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[EvalRun]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[EvalRun] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"eval/run/{jsonable_encoder(id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + EvalRun, + construct_type( + type_=EvalRun, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def eval_controller_remove_run( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[EvalRun]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[EvalRun] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"eval/run/{jsonable_encoder(id)}", + method="DELETE", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + EvalRun, + construct_type( + type_=EvalRun, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def eval_controller_get_runs_paginated( + self, + *, + id: typing.Optional[str] = None, + page: typing.Optional[float] = None, + sort_order: typing.Optional[EvalControllerGetRunsPaginatedRequestSortOrder] = None, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[EvalRunPaginatedResponse]: + """ + Parameters + ---------- + id : typing.Optional[str] + + page : typing.Optional[float] + This is the page number to return. Defaults to 1. + + sort_order : typing.Optional[EvalControllerGetRunsPaginatedRequestSortOrder] + This is the sort order for pagination. Defaults to 'DESC'. + + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[EvalRunPaginatedResponse] + + """ + _response = await self._client_wrapper.httpx_client.request( + "eval/run", + method="GET", + params={ + "id": id, + "page": page, + "sortOrder": sort_order, + "limit": limit, + "createdAtGt": serialize_datetime(created_at_gt) if created_at_gt is not None else None, + "createdAtLt": serialize_datetime(created_at_lt) if created_at_lt is not None else None, + "createdAtGe": serialize_datetime(created_at_ge) if created_at_ge is not None else None, + "createdAtLe": serialize_datetime(created_at_le) if created_at_le is not None else None, + "updatedAtGt": serialize_datetime(updated_at_gt) if updated_at_gt is not None else None, + "updatedAtLt": serialize_datetime(updated_at_lt) if updated_at_lt is not None else None, + "updatedAtGe": serialize_datetime(updated_at_ge) if updated_at_ge is not None else None, + "updatedAtLe": serialize_datetime(updated_at_le) if updated_at_le is not None else None, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + EvalRunPaginatedResponse, + construct_type( + type_=EvalRunPaginatedResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def eval_controller_run( + self, + *, + target: CreateEvalRunDtoTarget, + type: CreateEvalRunDtoType, + eval: typing.Optional[CreateEvalDto] = OMIT, + eval_id: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[typing.Dict[str, typing.Any]]: + """ + Parameters + ---------- + target : CreateEvalRunDtoTarget + This is the target that will be run against the eval + + type : CreateEvalRunDtoType + This is the type of the run. + Currently it is fixed to `eval`. + + eval : typing.Optional[CreateEvalDto] + This is the transient eval that will be run + + eval_id : typing.Optional[str] + This is the id of the eval that will be run. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[typing.Dict[str, typing.Any]] + + """ + _response = await self._client_wrapper.httpx_client.request( + "eval/run", + method="POST", + json={ + "eval": convert_and_respect_annotation_metadata( + object_=eval, annotation=CreateEvalDto, direction="write" + ), + "target": convert_and_respect_annotation_metadata( + object_=target, annotation=CreateEvalRunDtoTarget, direction="write" + ), + "type": type, + "evalId": eval_id, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.Dict[str, typing.Any], + construct_type( + type_=typing.Dict[str, typing.Any], # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/vapi/eval/types/__init__.py b/src/vapi/eval/types/__init__.py new file mode 100644 index 00000000..8a0f2060 --- /dev/null +++ b/src/vapi/eval/types/__init__.py @@ -0,0 +1,61 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .create_eval_run_dto_target import ( + CreateEvalRunDtoTarget, + CreateEvalRunDtoTarget_Assistant, + CreateEvalRunDtoTarget_Squad, + ) + from .create_eval_run_dto_type import CreateEvalRunDtoType + from .eval_controller_get_paginated_request_sort_order import EvalControllerGetPaginatedRequestSortOrder + from .eval_controller_get_runs_paginated_request_sort_order import EvalControllerGetRunsPaginatedRequestSortOrder + from .update_eval_dto_messages_item import UpdateEvalDtoMessagesItem + from .update_eval_dto_type import UpdateEvalDtoType +_dynamic_imports: typing.Dict[str, str] = { + "CreateEvalRunDtoTarget": ".create_eval_run_dto_target", + "CreateEvalRunDtoTarget_Assistant": ".create_eval_run_dto_target", + "CreateEvalRunDtoTarget_Squad": ".create_eval_run_dto_target", + "CreateEvalRunDtoType": ".create_eval_run_dto_type", + "EvalControllerGetPaginatedRequestSortOrder": ".eval_controller_get_paginated_request_sort_order", + "EvalControllerGetRunsPaginatedRequestSortOrder": ".eval_controller_get_runs_paginated_request_sort_order", + "UpdateEvalDtoMessagesItem": ".update_eval_dto_messages_item", + "UpdateEvalDtoType": ".update_eval_dto_type", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = [ + "CreateEvalRunDtoTarget", + "CreateEvalRunDtoTarget_Assistant", + "CreateEvalRunDtoTarget_Squad", + "CreateEvalRunDtoType", + "EvalControllerGetPaginatedRequestSortOrder", + "EvalControllerGetRunsPaginatedRequestSortOrder", + "UpdateEvalDtoMessagesItem", + "UpdateEvalDtoType", +] diff --git a/src/vapi/eval/types/create_eval_run_dto_target.py b/src/vapi/eval/types/create_eval_run_dto_target.py new file mode 100644 index 00000000..3c84b773 --- /dev/null +++ b/src/vapi/eval/types/create_eval_run_dto_target.py @@ -0,0 +1,246 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ...core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ...core.serialization import FieldMetadata +from ...core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class CreateEvalRunDtoTarget_Assistant(UncheckedBaseModel): + """ + This is the target that will be run against the eval + """ + + type: typing.Literal["assistant"] = "assistant" + assistant: typing.Optional["CreateAssistantDto"] = None + assistant_overrides: typing_extensions.Annotated[ + typing.Optional["AssistantOverrides"], + FieldMetadata(alias="assistantOverrides"), + pydantic.Field(alias="assistantOverrides"), + ] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateEvalRunDtoTarget_Squad(UncheckedBaseModel): + """ + This is the target that will be run against the eval + """ + + type: typing.Literal["squad"] = "squad" + squad: typing.Optional["CreateSquadDto"] = None + assistant_overrides: typing_extensions.Annotated[ + typing.Optional["AssistantOverrides"], + FieldMetadata(alias="assistantOverrides"), + pydantic.Field(alias="assistantOverrides"), + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateEvalRunDtoTarget = typing_extensions.Annotated[ + typing.Union[CreateEvalRunDtoTarget_Assistant, CreateEvalRunDtoTarget_Squad], UnionMetadata(discriminant="type") +] +from ...types.anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from ...types.anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from ...types.anthropic_model import AnthropicModel # noqa: E402, I001 +from ...types.anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from ...types.anyscale_model import AnyscaleModel # noqa: E402, I001 +from ...types.anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from ...types.assistant_overrides import AssistantOverrides # noqa: E402, I001 +from ...types.assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from ...types.assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from ...types.assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from ...types.call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from ...types.call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from ...types.call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from ...types.call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from ...types.call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from ...types.call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from ...types.call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from ...types.call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from ...types.cerebras_model import CerebrasModel # noqa: E402, I001 +from ...types.cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from ...types.create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from ...types.create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from ...types.create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from ...types.create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from ...types.create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from ...types.create_squad_dto import CreateSquadDto # noqa: E402, I001 +from ...types.custom_llm_model import CustomLlmModel # noqa: E402, I001 +from ...types.custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from ...types.deep_infra_model import DeepInfraModel # noqa: E402, I001 +from ...types.deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from ...types.deep_seek_model import DeepSeekModel # noqa: E402, I001 +from ...types.deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from ...types.google_model import GoogleModel # noqa: E402, I001 +from ...types.google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from ...types.groq_model import GroqModel # noqa: E402, I001 +from ...types.groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from ...types.handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from ...types.handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from ...types.inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from ...types.inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from ...types.minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from ...types.minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from ...types.open_ai_model import OpenAiModel # noqa: E402, I001 +from ...types.open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from ...types.open_router_model import OpenRouterModel # noqa: E402, I001 +from ...types.open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from ...types.perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from ...types.perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from ...types.session_created_hook import SessionCreatedHook # noqa: E402, I001 +from ...types.squad_member_dto import SquadMemberDto # noqa: E402, I001 +from ...types.squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from ...types.together_ai_model import TogetherAiModel # noqa: E402, I001 +from ...types.together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from ...types.tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from ...types.tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from ...types.xai_model import XaiModel # noqa: E402, I001 +from ...types.xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + CreateEvalRunDtoTarget_Assistant, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + CreateEvalRunDtoTarget_Squad, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/eval/types/create_eval_run_dto_type.py b/src/vapi/eval/types/create_eval_run_dto_type.py new file mode 100644 index 00000000..ded29e1c --- /dev/null +++ b/src/vapi/eval/types/create_eval_run_dto_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CreateEvalRunDtoType = typing.Union[typing.Literal["eval"], typing.Any] diff --git a/src/vapi/eval/types/eval_controller_get_paginated_request_sort_order.py b/src/vapi/eval/types/eval_controller_get_paginated_request_sort_order.py new file mode 100644 index 00000000..fdeafe11 --- /dev/null +++ b/src/vapi/eval/types/eval_controller_get_paginated_request_sort_order.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +EvalControllerGetPaginatedRequestSortOrder = typing.Union[typing.Literal["ASC", "DESC"], typing.Any] diff --git a/src/vapi/eval/types/eval_controller_get_runs_paginated_request_sort_order.py b/src/vapi/eval/types/eval_controller_get_runs_paginated_request_sort_order.py new file mode 100644 index 00000000..730cef99 --- /dev/null +++ b/src/vapi/eval/types/eval_controller_get_runs_paginated_request_sort_order.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +EvalControllerGetRunsPaginatedRequestSortOrder = typing.Union[typing.Literal["ASC", "DESC"], typing.Any] diff --git a/src/vapi/eval/types/update_eval_dto_messages_item.py b/src/vapi/eval/types/update_eval_dto_messages_item.py new file mode 100644 index 00000000..37003d14 --- /dev/null +++ b/src/vapi/eval/types/update_eval_dto_messages_item.py @@ -0,0 +1,19 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from ...types.chat_eval_assistant_message_evaluation import ChatEvalAssistantMessageEvaluation +from ...types.chat_eval_assistant_message_mock import ChatEvalAssistantMessageMock +from ...types.chat_eval_system_message_mock import ChatEvalSystemMessageMock +from ...types.chat_eval_tool_response_message_evaluation import ChatEvalToolResponseMessageEvaluation +from ...types.chat_eval_tool_response_message_mock import ChatEvalToolResponseMessageMock +from ...types.chat_eval_user_message_mock import ChatEvalUserMessageMock + +UpdateEvalDtoMessagesItem = typing.Union[ + ChatEvalAssistantMessageMock, + ChatEvalSystemMessageMock, + ChatEvalToolResponseMessageMock, + ChatEvalToolResponseMessageEvaluation, + ChatEvalUserMessageMock, + ChatEvalAssistantMessageEvaluation, +] diff --git a/src/vapi/eval/types/update_eval_dto_type.py b/src/vapi/eval/types/update_eval_dto_type.py new file mode 100644 index 00000000..5ac85396 --- /dev/null +++ b/src/vapi/eval/types/update_eval_dto_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +UpdateEvalDtoType = typing.Union[typing.Literal["chat.mockConversation"], typing.Any] diff --git a/src/vapi/files/__init__.py b/src/vapi/files/__init__.py index f3ea2659..5cde0202 100644 --- a/src/vapi/files/__init__.py +++ b/src/vapi/files/__init__.py @@ -1,2 +1,4 @@ # This file was auto-generated by Fern from our API Definition. +# isort: skip_file + diff --git a/src/vapi/files/client.py b/src/vapi/files/client.py index 12af218a..8c718029 100644 --- a/src/vapi/files/client.py +++ b/src/vapi/files/client.py @@ -1,16 +1,12 @@ # This file was auto-generated by Fern from our API Definition. import typing -from ..core.client_wrapper import SyncClientWrapper + +from .. import core +from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ..core.request_options import RequestOptions from ..types.file import File -from ..core.pydantic_utilities import parse_obj_as -from json.decoder import JSONDecodeError -from ..core.api_error import ApiError -from .. import core -from ..errors.bad_request_error import BadRequestError -from ..core.jsonable_encoder import jsonable_encoder -from ..core.client_wrapper import AsyncClientWrapper +from .raw_client import AsyncRawFilesClient, RawFilesClient # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -18,7 +14,18 @@ class FilesClient: def __init__(self, *, client_wrapper: SyncClientWrapper): - self._client_wrapper = client_wrapper + self._raw_client = RawFilesClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawFilesClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawFilesClient + """ + return self._raw_client def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> typing.List[File]: """ @@ -41,24 +48,8 @@ def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> ty ) client.files.list() """ - _response = self._client_wrapper.httpx_client.request( - "file", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - typing.List[File], - parse_obj_as( - type_=typing.List[File], # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = self._raw_client.list(request_options=request_options) + return _response.data def create(self, *, file: core.File, request_options: typing.Optional[RequestOptions] = None) -> File: """ @@ -84,39 +75,8 @@ def create(self, *, file: core.File, request_options: typing.Optional[RequestOpt ) client.files.create() """ - _response = self._client_wrapper.httpx_client.request( - "file", - method="POST", - data={}, - files={ - "file": file, - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - File, - parse_obj_as( - type_=File, # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 400: - raise BadRequestError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = self._raw_client.create(file=file, request_options=request_options) + return _response.data def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> File: """ @@ -143,24 +103,8 @@ def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = Non id="id", ) """ - _response = self._client_wrapper.httpx_client.request( - f"file/{jsonable_encoder(id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - File, - parse_obj_as( - type_=File, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = self._raw_client.get(id, request_options=request_options) + return _response.data def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> File: """ @@ -187,24 +131,8 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = id="id", ) """ - _response = self._client_wrapper.httpx_client.request( - f"file/{jsonable_encoder(id)}", - method="DELETE", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - File, - parse_obj_as( - type_=File, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = self._raw_client.delete(id, request_options=request_options) + return _response.data def update( self, id: str, *, name: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None @@ -236,33 +164,24 @@ def update( id="id", ) """ - _response = self._client_wrapper.httpx_client.request( - f"file/{jsonable_encoder(id)}", - method="PATCH", - json={ - "name": name, - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - File, - parse_obj_as( - type_=File, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = self._raw_client.update(id, name=name, request_options=request_options) + return _response.data class AsyncFilesClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper + self._raw_client = AsyncRawFilesClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawFilesClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawFilesClient + """ + return self._raw_client async def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> typing.List[File]: """ @@ -293,24 +212,8 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - "file", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - typing.List[File], - parse_obj_as( - type_=typing.List[File], # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = await self._raw_client.list(request_options=request_options) + return _response.data async def create(self, *, file: core.File, request_options: typing.Optional[RequestOptions] = None) -> File: """ @@ -344,39 +247,8 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - "file", - method="POST", - data={}, - files={ - "file": file, - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - File, - parse_obj_as( - type_=File, # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 400: - raise BadRequestError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = await self._raw_client.create(file=file, request_options=request_options) + return _response.data async def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> File: """ @@ -411,24 +283,8 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - f"file/{jsonable_encoder(id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - File, - parse_obj_as( - type_=File, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = await self._raw_client.get(id, request_options=request_options) + return _response.data async def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> File: """ @@ -463,24 +319,8 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - f"file/{jsonable_encoder(id)}", - method="DELETE", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - File, - parse_obj_as( - type_=File, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = await self._raw_client.delete(id, request_options=request_options) + return _response.data async def update( self, id: str, *, name: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None @@ -520,25 +360,5 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - f"file/{jsonable_encoder(id)}", - method="PATCH", - json={ - "name": name, - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - File, - parse_obj_as( - type_=File, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = await self._raw_client.update(id, name=name, request_options=request_options) + return _response.data diff --git a/src/vapi/files/raw_client.py b/src/vapi/files/raw_client.py new file mode 100644 index 00000000..2fb53d63 --- /dev/null +++ b/src/vapi/files/raw_client.py @@ -0,0 +1,471 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +from json.decoder import JSONDecodeError + +from .. import core +from ..core.api_error import ApiError +from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.http_response import AsyncHttpResponse, HttpResponse +from ..core.jsonable_encoder import jsonable_encoder +from ..core.parse_error import ParsingError +from ..core.request_options import RequestOptions +from ..core.unchecked_base_model import construct_type +from ..errors.bad_request_error import BadRequestError +from ..types.file import File +from pydantic import ValidationError + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class RawFilesClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[typing.List[File]]: + """ + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[typing.List[File]] + + """ + _response = self._client_wrapper.httpx_client.request( + "file", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.List[File], + construct_type( + type_=typing.List[File], # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def create(self, *, file: core.File, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[File]: + """ + Parameters + ---------- + file : core.File + See core.File for more documentation + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[File] + File uploaded successfully + """ + _response = self._client_wrapper.httpx_client.request( + "file", + method="POST", + data={}, + files={ + "file": file, + }, + request_options=request_options, + omit=OMIT, + force_multipart=True, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + File, + construct_type( + type_=File, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 400: + raise BadRequestError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + construct_type( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[File]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[File] + + """ + _response = self._client_wrapper.httpx_client.request( + f"file/{jsonable_encoder(id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + File, + construct_type( + type_=File, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[File]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[File] + + """ + _response = self._client_wrapper.httpx_client.request( + f"file/{jsonable_encoder(id)}", + method="DELETE", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + File, + construct_type( + type_=File, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def update( + self, id: str, *, name: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[File]: + """ + Parameters + ---------- + id : str + + name : typing.Optional[str] + This is the name of the file. This is just for your own reference. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[File] + + """ + _response = self._client_wrapper.httpx_client.request( + f"file/{jsonable_encoder(id)}", + method="PATCH", + json={ + "name": name, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + File, + construct_type( + type_=File, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawFilesClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def list( + self, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[typing.List[File]]: + """ + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[typing.List[File]] + + """ + _response = await self._client_wrapper.httpx_client.request( + "file", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.List[File], + construct_type( + type_=typing.List[File], # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def create( + self, *, file: core.File, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[File]: + """ + Parameters + ---------- + file : core.File + See core.File for more documentation + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[File] + File uploaded successfully + """ + _response = await self._client_wrapper.httpx_client.request( + "file", + method="POST", + data={}, + files={ + "file": file, + }, + request_options=request_options, + omit=OMIT, + force_multipart=True, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + File, + construct_type( + type_=File, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 400: + raise BadRequestError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + construct_type( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> AsyncHttpResponse[File]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[File] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"file/{jsonable_encoder(id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + File, + construct_type( + type_=File, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def delete( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[File]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[File] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"file/{jsonable_encoder(id)}", + method="DELETE", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + File, + construct_type( + type_=File, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def update( + self, id: str, *, name: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[File]: + """ + Parameters + ---------- + id : str + + name : typing.Optional[str] + This is the name of the file. This is just for your own reference. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[File] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"file/{jsonable_encoder(id)}", + method="PATCH", + json={ + "name": name, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + File, + construct_type( + type_=File, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/vapi/insight/__init__.py b/src/vapi/insight/__init__.py new file mode 100644 index 00000000..81f8e9c5 --- /dev/null +++ b/src/vapi/insight/__init__.py @@ -0,0 +1,145 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ( + InsightControllerCreateRequest, + InsightControllerCreateRequest_Bar, + InsightControllerCreateRequest_Line, + InsightControllerCreateRequest_Pie, + InsightControllerCreateRequest_Text, + InsightControllerCreateResponse, + InsightControllerCreateResponse_Bar, + InsightControllerCreateResponse_Line, + InsightControllerCreateResponse_Pie, + InsightControllerCreateResponse_Text, + InsightControllerFindAllRequestSortOrder, + InsightControllerFindOneResponse, + InsightControllerFindOneResponse_Bar, + InsightControllerFindOneResponse_Line, + InsightControllerFindOneResponse_Pie, + InsightControllerFindOneResponse_Text, + InsightControllerPreviewRequest, + InsightControllerPreviewRequest_Bar, + InsightControllerPreviewRequest_Line, + InsightControllerPreviewRequest_Pie, + InsightControllerPreviewRequest_Text, + InsightControllerRemoveResponse, + InsightControllerRemoveResponse_Bar, + InsightControllerRemoveResponse_Line, + InsightControllerRemoveResponse_Pie, + InsightControllerRemoveResponse_Text, + InsightControllerUpdateRequestBody, + InsightControllerUpdateRequestBody_Bar, + InsightControllerUpdateRequestBody_Line, + InsightControllerUpdateRequestBody_Pie, + InsightControllerUpdateRequestBody_Text, + InsightControllerUpdateResponse, + InsightControllerUpdateResponse_Bar, + InsightControllerUpdateResponse_Line, + InsightControllerUpdateResponse_Pie, + InsightControllerUpdateResponse_Text, + ) +_dynamic_imports: typing.Dict[str, str] = { + "InsightControllerCreateRequest": ".types", + "InsightControllerCreateRequest_Bar": ".types", + "InsightControllerCreateRequest_Line": ".types", + "InsightControllerCreateRequest_Pie": ".types", + "InsightControllerCreateRequest_Text": ".types", + "InsightControllerCreateResponse": ".types", + "InsightControllerCreateResponse_Bar": ".types", + "InsightControllerCreateResponse_Line": ".types", + "InsightControllerCreateResponse_Pie": ".types", + "InsightControllerCreateResponse_Text": ".types", + "InsightControllerFindAllRequestSortOrder": ".types", + "InsightControllerFindOneResponse": ".types", + "InsightControllerFindOneResponse_Bar": ".types", + "InsightControllerFindOneResponse_Line": ".types", + "InsightControllerFindOneResponse_Pie": ".types", + "InsightControllerFindOneResponse_Text": ".types", + "InsightControllerPreviewRequest": ".types", + "InsightControllerPreviewRequest_Bar": ".types", + "InsightControllerPreviewRequest_Line": ".types", + "InsightControllerPreviewRequest_Pie": ".types", + "InsightControllerPreviewRequest_Text": ".types", + "InsightControllerRemoveResponse": ".types", + "InsightControllerRemoveResponse_Bar": ".types", + "InsightControllerRemoveResponse_Line": ".types", + "InsightControllerRemoveResponse_Pie": ".types", + "InsightControllerRemoveResponse_Text": ".types", + "InsightControllerUpdateRequestBody": ".types", + "InsightControllerUpdateRequestBody_Bar": ".types", + "InsightControllerUpdateRequestBody_Line": ".types", + "InsightControllerUpdateRequestBody_Pie": ".types", + "InsightControllerUpdateRequestBody_Text": ".types", + "InsightControllerUpdateResponse": ".types", + "InsightControllerUpdateResponse_Bar": ".types", + "InsightControllerUpdateResponse_Line": ".types", + "InsightControllerUpdateResponse_Pie": ".types", + "InsightControllerUpdateResponse_Text": ".types", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = [ + "InsightControllerCreateRequest", + "InsightControllerCreateRequest_Bar", + "InsightControllerCreateRequest_Line", + "InsightControllerCreateRequest_Pie", + "InsightControllerCreateRequest_Text", + "InsightControllerCreateResponse", + "InsightControllerCreateResponse_Bar", + "InsightControllerCreateResponse_Line", + "InsightControllerCreateResponse_Pie", + "InsightControllerCreateResponse_Text", + "InsightControllerFindAllRequestSortOrder", + "InsightControllerFindOneResponse", + "InsightControllerFindOneResponse_Bar", + "InsightControllerFindOneResponse_Line", + "InsightControllerFindOneResponse_Pie", + "InsightControllerFindOneResponse_Text", + "InsightControllerPreviewRequest", + "InsightControllerPreviewRequest_Bar", + "InsightControllerPreviewRequest_Line", + "InsightControllerPreviewRequest_Pie", + "InsightControllerPreviewRequest_Text", + "InsightControllerRemoveResponse", + "InsightControllerRemoveResponse_Bar", + "InsightControllerRemoveResponse_Line", + "InsightControllerRemoveResponse_Pie", + "InsightControllerRemoveResponse_Text", + "InsightControllerUpdateRequestBody", + "InsightControllerUpdateRequestBody_Bar", + "InsightControllerUpdateRequestBody_Line", + "InsightControllerUpdateRequestBody_Pie", + "InsightControllerUpdateRequestBody_Text", + "InsightControllerUpdateResponse", + "InsightControllerUpdateResponse_Bar", + "InsightControllerUpdateResponse_Line", + "InsightControllerUpdateResponse_Pie", + "InsightControllerUpdateResponse_Text", +] diff --git a/src/vapi/insight/client.py b/src/vapi/insight/client.py new file mode 100644 index 00000000..62086d9c --- /dev/null +++ b/src/vapi/insight/client.py @@ -0,0 +1,743 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.request_options import RequestOptions +from ..types.insight_paginated_response import InsightPaginatedResponse +from ..types.insight_run_format_plan import InsightRunFormatPlan +from ..types.insight_run_response import InsightRunResponse +from ..types.insight_time_range_with_step import InsightTimeRangeWithStep +from .raw_client import AsyncRawInsightClient, RawInsightClient +from .types.insight_controller_create_request import InsightControllerCreateRequest +from .types.insight_controller_create_response import InsightControllerCreateResponse +from .types.insight_controller_find_all_request_sort_order import InsightControllerFindAllRequestSortOrder +from .types.insight_controller_find_one_response import InsightControllerFindOneResponse +from .types.insight_controller_preview_request import InsightControllerPreviewRequest +from .types.insight_controller_remove_response import InsightControllerRemoveResponse +from .types.insight_controller_update_request_body import InsightControllerUpdateRequestBody +from .types.insight_controller_update_response import InsightControllerUpdateResponse + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class InsightClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawInsightClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawInsightClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawInsightClient + """ + return self._raw_client + + def insight_controller_find_all( + self, + *, + id: typing.Optional[str] = None, + page: typing.Optional[float] = None, + sort_order: typing.Optional[InsightControllerFindAllRequestSortOrder] = None, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> InsightPaginatedResponse: + """ + Parameters + ---------- + id : typing.Optional[str] + + page : typing.Optional[float] + This is the page number to return. Defaults to 1. + + sort_order : typing.Optional[InsightControllerFindAllRequestSortOrder] + This is the sort order for pagination. Defaults to 'DESC'. + + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + InsightPaginatedResponse + + + Examples + -------- + from vapi import Vapi + + client = Vapi( + token="YOUR_TOKEN", + ) + client.insight.insight_controller_find_all() + """ + _response = self._raw_client.insight_controller_find_all( + id=id, + page=page, + sort_order=sort_order, + limit=limit, + created_at_gt=created_at_gt, + created_at_lt=created_at_lt, + created_at_ge=created_at_ge, + created_at_le=created_at_le, + updated_at_gt=updated_at_gt, + updated_at_lt=updated_at_lt, + updated_at_ge=updated_at_ge, + updated_at_le=updated_at_le, + request_options=request_options, + ) + return _response.data + + def insight_controller_create( + self, *, request: InsightControllerCreateRequest, request_options: typing.Optional[RequestOptions] = None + ) -> InsightControllerCreateResponse: + """ + Parameters + ---------- + request : InsightControllerCreateRequest + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + InsightControllerCreateResponse + + + Examples + -------- + from vapi import JsonQueryOnCallTableWithStringTypeColumn, Vapi + from vapi.insight import InsightControllerCreateRequest_Bar + + client = Vapi( + token="YOUR_TOKEN", + ) + client.insight.insight_controller_create( + request=InsightControllerCreateRequest_Bar( + queries=[ + JsonQueryOnCallTableWithStringTypeColumn( + type="vapiql-json", + table="call", + column="id", + operation="count", + ) + ], + ), + ) + """ + _response = self._raw_client.insight_controller_create(request=request, request_options=request_options) + return _response.data + + def insight_controller_find_one( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> InsightControllerFindOneResponse: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + InsightControllerFindOneResponse + + + Examples + -------- + from vapi import Vapi + + client = Vapi( + token="YOUR_TOKEN", + ) + client.insight.insight_controller_find_one( + id="id", + ) + """ + _response = self._raw_client.insight_controller_find_one(id, request_options=request_options) + return _response.data + + def insight_controller_remove( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> InsightControllerRemoveResponse: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + InsightControllerRemoveResponse + + + Examples + -------- + from vapi import Vapi + + client = Vapi( + token="YOUR_TOKEN", + ) + client.insight.insight_controller_remove( + id="id", + ) + """ + _response = self._raw_client.insight_controller_remove(id, request_options=request_options) + return _response.data + + def insight_controller_update( + self, + id: str, + *, + request: InsightControllerUpdateRequestBody, + request_options: typing.Optional[RequestOptions] = None, + ) -> InsightControllerUpdateResponse: + """ + Parameters + ---------- + id : str + + request : InsightControllerUpdateRequestBody + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + InsightControllerUpdateResponse + + + Examples + -------- + from vapi import Vapi + from vapi.insight import InsightControllerUpdateRequestBody_Bar + + client = Vapi( + token="YOUR_TOKEN", + ) + client.insight.insight_controller_update( + id="id", + request=InsightControllerUpdateRequestBody_Bar(), + ) + """ + _response = self._raw_client.insight_controller_update(id, request=request, request_options=request_options) + return _response.data + + def insight_controller_run( + self, + id: str, + *, + format_plan: typing.Optional[InsightRunFormatPlan] = OMIT, + time_range_override: typing.Optional[InsightTimeRangeWithStep] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> InsightRunResponse: + """ + Parameters + ---------- + id : str + + format_plan : typing.Optional[InsightRunFormatPlan] + + time_range_override : typing.Optional[InsightTimeRangeWithStep] + This is the optional time range override for the insight. + If provided, overrides every field in the insight's timeRange. + If this is provided with missing fields, defaults will be used, not the insight's timeRange. + start default - "-7d" + end default - "now" + step default - "day" + For Pie and Text Insights, step will be ignored even if provided. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + InsightRunResponse + + + Examples + -------- + from vapi import Vapi + + client = Vapi( + token="YOUR_TOKEN", + ) + client.insight.insight_controller_run( + id="id", + ) + """ + _response = self._raw_client.insight_controller_run( + id, format_plan=format_plan, time_range_override=time_range_override, request_options=request_options + ) + return _response.data + + def insight_controller_preview( + self, *, request: InsightControllerPreviewRequest, request_options: typing.Optional[RequestOptions] = None + ) -> InsightRunResponse: + """ + Parameters + ---------- + request : InsightControllerPreviewRequest + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + InsightRunResponse + + + Examples + -------- + from vapi import JsonQueryOnCallTableWithStringTypeColumn, Vapi + from vapi.insight import InsightControllerPreviewRequest_Bar + + client = Vapi( + token="YOUR_TOKEN", + ) + client.insight.insight_controller_preview( + request=InsightControllerPreviewRequest_Bar( + queries=[ + JsonQueryOnCallTableWithStringTypeColumn( + type="vapiql-json", + table="call", + column="id", + operation="count", + ) + ], + ), + ) + """ + _response = self._raw_client.insight_controller_preview(request=request, request_options=request_options) + return _response.data + + +class AsyncInsightClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawInsightClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawInsightClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawInsightClient + """ + return self._raw_client + + async def insight_controller_find_all( + self, + *, + id: typing.Optional[str] = None, + page: typing.Optional[float] = None, + sort_order: typing.Optional[InsightControllerFindAllRequestSortOrder] = None, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> InsightPaginatedResponse: + """ + Parameters + ---------- + id : typing.Optional[str] + + page : typing.Optional[float] + This is the page number to return. Defaults to 1. + + sort_order : typing.Optional[InsightControllerFindAllRequestSortOrder] + This is the sort order for pagination. Defaults to 'DESC'. + + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + InsightPaginatedResponse + + + Examples + -------- + import asyncio + + from vapi import AsyncVapi + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.insight.insight_controller_find_all() + + + asyncio.run(main()) + """ + _response = await self._raw_client.insight_controller_find_all( + id=id, + page=page, + sort_order=sort_order, + limit=limit, + created_at_gt=created_at_gt, + created_at_lt=created_at_lt, + created_at_ge=created_at_ge, + created_at_le=created_at_le, + updated_at_gt=updated_at_gt, + updated_at_lt=updated_at_lt, + updated_at_ge=updated_at_ge, + updated_at_le=updated_at_le, + request_options=request_options, + ) + return _response.data + + async def insight_controller_create( + self, *, request: InsightControllerCreateRequest, request_options: typing.Optional[RequestOptions] = None + ) -> InsightControllerCreateResponse: + """ + Parameters + ---------- + request : InsightControllerCreateRequest + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + InsightControllerCreateResponse + + + Examples + -------- + import asyncio + + from vapi import AsyncVapi, JsonQueryOnCallTableWithStringTypeColumn + from vapi.insight import InsightControllerCreateRequest_Bar + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.insight.insight_controller_create( + request=InsightControllerCreateRequest_Bar( + queries=[ + JsonQueryOnCallTableWithStringTypeColumn( + type="vapiql-json", + table="call", + column="id", + operation="count", + ) + ], + ), + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.insight_controller_create(request=request, request_options=request_options) + return _response.data + + async def insight_controller_find_one( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> InsightControllerFindOneResponse: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + InsightControllerFindOneResponse + + + Examples + -------- + import asyncio + + from vapi import AsyncVapi + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.insight.insight_controller_find_one( + id="id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.insight_controller_find_one(id, request_options=request_options) + return _response.data + + async def insight_controller_remove( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> InsightControllerRemoveResponse: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + InsightControllerRemoveResponse + + + Examples + -------- + import asyncio + + from vapi import AsyncVapi + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.insight.insight_controller_remove( + id="id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.insight_controller_remove(id, request_options=request_options) + return _response.data + + async def insight_controller_update( + self, + id: str, + *, + request: InsightControllerUpdateRequestBody, + request_options: typing.Optional[RequestOptions] = None, + ) -> InsightControllerUpdateResponse: + """ + Parameters + ---------- + id : str + + request : InsightControllerUpdateRequestBody + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + InsightControllerUpdateResponse + + + Examples + -------- + import asyncio + + from vapi import AsyncVapi + from vapi.insight import InsightControllerUpdateRequestBody_Bar + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.insight.insight_controller_update( + id="id", + request=InsightControllerUpdateRequestBody_Bar(), + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.insight_controller_update( + id, request=request, request_options=request_options + ) + return _response.data + + async def insight_controller_run( + self, + id: str, + *, + format_plan: typing.Optional[InsightRunFormatPlan] = OMIT, + time_range_override: typing.Optional[InsightTimeRangeWithStep] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> InsightRunResponse: + """ + Parameters + ---------- + id : str + + format_plan : typing.Optional[InsightRunFormatPlan] + + time_range_override : typing.Optional[InsightTimeRangeWithStep] + This is the optional time range override for the insight. + If provided, overrides every field in the insight's timeRange. + If this is provided with missing fields, defaults will be used, not the insight's timeRange. + start default - "-7d" + end default - "now" + step default - "day" + For Pie and Text Insights, step will be ignored even if provided. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + InsightRunResponse + + + Examples + -------- + import asyncio + + from vapi import AsyncVapi + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.insight.insight_controller_run( + id="id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.insight_controller_run( + id, format_plan=format_plan, time_range_override=time_range_override, request_options=request_options + ) + return _response.data + + async def insight_controller_preview( + self, *, request: InsightControllerPreviewRequest, request_options: typing.Optional[RequestOptions] = None + ) -> InsightRunResponse: + """ + Parameters + ---------- + request : InsightControllerPreviewRequest + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + InsightRunResponse + + + Examples + -------- + import asyncio + + from vapi import AsyncVapi, JsonQueryOnCallTableWithStringTypeColumn + from vapi.insight import InsightControllerPreviewRequest_Bar + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.insight.insight_controller_preview( + request=InsightControllerPreviewRequest_Bar( + queries=[ + JsonQueryOnCallTableWithStringTypeColumn( + type="vapiql-json", + table="call", + column="id", + operation="count", + ) + ], + ), + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.insight_controller_preview(request=request, request_options=request_options) + return _response.data diff --git a/src/vapi/insight/raw_client.py b/src/vapi/insight/raw_client.py new file mode 100644 index 00000000..9f77dc93 --- /dev/null +++ b/src/vapi/insight/raw_client.py @@ -0,0 +1,821 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing +from json.decoder import JSONDecodeError + +from ..core.api_error import ApiError +from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.datetime_utils import serialize_datetime +from ..core.http_response import AsyncHttpResponse, HttpResponse +from ..core.jsonable_encoder import jsonable_encoder +from ..core.parse_error import ParsingError +from ..core.request_options import RequestOptions +from ..core.serialization import convert_and_respect_annotation_metadata +from ..core.unchecked_base_model import construct_type +from ..types.insight_paginated_response import InsightPaginatedResponse +from ..types.insight_run_format_plan import InsightRunFormatPlan +from ..types.insight_run_response import InsightRunResponse +from ..types.insight_time_range_with_step import InsightTimeRangeWithStep +from .types.insight_controller_create_request import InsightControllerCreateRequest +from .types.insight_controller_create_response import InsightControllerCreateResponse +from .types.insight_controller_find_all_request_sort_order import InsightControllerFindAllRequestSortOrder +from .types.insight_controller_find_one_response import InsightControllerFindOneResponse +from .types.insight_controller_preview_request import InsightControllerPreviewRequest +from .types.insight_controller_remove_response import InsightControllerRemoveResponse +from .types.insight_controller_update_request_body import InsightControllerUpdateRequestBody +from .types.insight_controller_update_response import InsightControllerUpdateResponse +from pydantic import ValidationError + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class RawInsightClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def insight_controller_find_all( + self, + *, + id: typing.Optional[str] = None, + page: typing.Optional[float] = None, + sort_order: typing.Optional[InsightControllerFindAllRequestSortOrder] = None, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[InsightPaginatedResponse]: + """ + Parameters + ---------- + id : typing.Optional[str] + + page : typing.Optional[float] + This is the page number to return. Defaults to 1. + + sort_order : typing.Optional[InsightControllerFindAllRequestSortOrder] + This is the sort order for pagination. Defaults to 'DESC'. + + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[InsightPaginatedResponse] + + """ + _response = self._client_wrapper.httpx_client.request( + "reporting/insight", + method="GET", + params={ + "id": id, + "page": page, + "sortOrder": sort_order, + "limit": limit, + "createdAtGt": serialize_datetime(created_at_gt) if created_at_gt is not None else None, + "createdAtLt": serialize_datetime(created_at_lt) if created_at_lt is not None else None, + "createdAtGe": serialize_datetime(created_at_ge) if created_at_ge is not None else None, + "createdAtLe": serialize_datetime(created_at_le) if created_at_le is not None else None, + "updatedAtGt": serialize_datetime(updated_at_gt) if updated_at_gt is not None else None, + "updatedAtLt": serialize_datetime(updated_at_lt) if updated_at_lt is not None else None, + "updatedAtGe": serialize_datetime(updated_at_ge) if updated_at_ge is not None else None, + "updatedAtLe": serialize_datetime(updated_at_le) if updated_at_le is not None else None, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + InsightPaginatedResponse, + construct_type( + type_=InsightPaginatedResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def insight_controller_create( + self, *, request: InsightControllerCreateRequest, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[InsightControllerCreateResponse]: + """ + Parameters + ---------- + request : InsightControllerCreateRequest + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[InsightControllerCreateResponse] + + """ + _response = self._client_wrapper.httpx_client.request( + "reporting/insight", + method="POST", + json=convert_and_respect_annotation_metadata( + object_=request, annotation=InsightControllerCreateRequest, direction="write" + ), + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + InsightControllerCreateResponse, + construct_type( + type_=InsightControllerCreateResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def insight_controller_find_one( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[InsightControllerFindOneResponse]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[InsightControllerFindOneResponse] + + """ + _response = self._client_wrapper.httpx_client.request( + f"reporting/insight/{jsonable_encoder(id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + InsightControllerFindOneResponse, + construct_type( + type_=InsightControllerFindOneResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def insight_controller_remove( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[InsightControllerRemoveResponse]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[InsightControllerRemoveResponse] + + """ + _response = self._client_wrapper.httpx_client.request( + f"reporting/insight/{jsonable_encoder(id)}", + method="DELETE", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + InsightControllerRemoveResponse, + construct_type( + type_=InsightControllerRemoveResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def insight_controller_update( + self, + id: str, + *, + request: InsightControllerUpdateRequestBody, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[InsightControllerUpdateResponse]: + """ + Parameters + ---------- + id : str + + request : InsightControllerUpdateRequestBody + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[InsightControllerUpdateResponse] + + """ + _response = self._client_wrapper.httpx_client.request( + f"reporting/insight/{jsonable_encoder(id)}", + method="PATCH", + json=convert_and_respect_annotation_metadata( + object_=request, annotation=InsightControllerUpdateRequestBody, direction="write" + ), + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + InsightControllerUpdateResponse, + construct_type( + type_=InsightControllerUpdateResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def insight_controller_run( + self, + id: str, + *, + format_plan: typing.Optional[InsightRunFormatPlan] = OMIT, + time_range_override: typing.Optional[InsightTimeRangeWithStep] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[InsightRunResponse]: + """ + Parameters + ---------- + id : str + + format_plan : typing.Optional[InsightRunFormatPlan] + + time_range_override : typing.Optional[InsightTimeRangeWithStep] + This is the optional time range override for the insight. + If provided, overrides every field in the insight's timeRange. + If this is provided with missing fields, defaults will be used, not the insight's timeRange. + start default - "-7d" + end default - "now" + step default - "day" + For Pie and Text Insights, step will be ignored even if provided. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[InsightRunResponse] + + """ + _response = self._client_wrapper.httpx_client.request( + f"reporting/insight/{jsonable_encoder(id)}/run", + method="POST", + json={ + "formatPlan": convert_and_respect_annotation_metadata( + object_=format_plan, annotation=InsightRunFormatPlan, direction="write" + ), + "timeRangeOverride": convert_and_respect_annotation_metadata( + object_=time_range_override, annotation=InsightTimeRangeWithStep, direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + InsightRunResponse, + construct_type( + type_=InsightRunResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def insight_controller_preview( + self, *, request: InsightControllerPreviewRequest, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[InsightRunResponse]: + """ + Parameters + ---------- + request : InsightControllerPreviewRequest + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[InsightRunResponse] + + """ + _response = self._client_wrapper.httpx_client.request( + "reporting/insight/preview", + method="POST", + json=convert_and_respect_annotation_metadata( + object_=request, annotation=InsightControllerPreviewRequest, direction="write" + ), + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + InsightRunResponse, + construct_type( + type_=InsightRunResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawInsightClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def insight_controller_find_all( + self, + *, + id: typing.Optional[str] = None, + page: typing.Optional[float] = None, + sort_order: typing.Optional[InsightControllerFindAllRequestSortOrder] = None, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[InsightPaginatedResponse]: + """ + Parameters + ---------- + id : typing.Optional[str] + + page : typing.Optional[float] + This is the page number to return. Defaults to 1. + + sort_order : typing.Optional[InsightControllerFindAllRequestSortOrder] + This is the sort order for pagination. Defaults to 'DESC'. + + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[InsightPaginatedResponse] + + """ + _response = await self._client_wrapper.httpx_client.request( + "reporting/insight", + method="GET", + params={ + "id": id, + "page": page, + "sortOrder": sort_order, + "limit": limit, + "createdAtGt": serialize_datetime(created_at_gt) if created_at_gt is not None else None, + "createdAtLt": serialize_datetime(created_at_lt) if created_at_lt is not None else None, + "createdAtGe": serialize_datetime(created_at_ge) if created_at_ge is not None else None, + "createdAtLe": serialize_datetime(created_at_le) if created_at_le is not None else None, + "updatedAtGt": serialize_datetime(updated_at_gt) if updated_at_gt is not None else None, + "updatedAtLt": serialize_datetime(updated_at_lt) if updated_at_lt is not None else None, + "updatedAtGe": serialize_datetime(updated_at_ge) if updated_at_ge is not None else None, + "updatedAtLe": serialize_datetime(updated_at_le) if updated_at_le is not None else None, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + InsightPaginatedResponse, + construct_type( + type_=InsightPaginatedResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def insight_controller_create( + self, *, request: InsightControllerCreateRequest, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[InsightControllerCreateResponse]: + """ + Parameters + ---------- + request : InsightControllerCreateRequest + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[InsightControllerCreateResponse] + + """ + _response = await self._client_wrapper.httpx_client.request( + "reporting/insight", + method="POST", + json=convert_and_respect_annotation_metadata( + object_=request, annotation=InsightControllerCreateRequest, direction="write" + ), + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + InsightControllerCreateResponse, + construct_type( + type_=InsightControllerCreateResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def insight_controller_find_one( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[InsightControllerFindOneResponse]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[InsightControllerFindOneResponse] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"reporting/insight/{jsonable_encoder(id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + InsightControllerFindOneResponse, + construct_type( + type_=InsightControllerFindOneResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def insight_controller_remove( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[InsightControllerRemoveResponse]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[InsightControllerRemoveResponse] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"reporting/insight/{jsonable_encoder(id)}", + method="DELETE", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + InsightControllerRemoveResponse, + construct_type( + type_=InsightControllerRemoveResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def insight_controller_update( + self, + id: str, + *, + request: InsightControllerUpdateRequestBody, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[InsightControllerUpdateResponse]: + """ + Parameters + ---------- + id : str + + request : InsightControllerUpdateRequestBody + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[InsightControllerUpdateResponse] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"reporting/insight/{jsonable_encoder(id)}", + method="PATCH", + json=convert_and_respect_annotation_metadata( + object_=request, annotation=InsightControllerUpdateRequestBody, direction="write" + ), + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + InsightControllerUpdateResponse, + construct_type( + type_=InsightControllerUpdateResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def insight_controller_run( + self, + id: str, + *, + format_plan: typing.Optional[InsightRunFormatPlan] = OMIT, + time_range_override: typing.Optional[InsightTimeRangeWithStep] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[InsightRunResponse]: + """ + Parameters + ---------- + id : str + + format_plan : typing.Optional[InsightRunFormatPlan] + + time_range_override : typing.Optional[InsightTimeRangeWithStep] + This is the optional time range override for the insight. + If provided, overrides every field in the insight's timeRange. + If this is provided with missing fields, defaults will be used, not the insight's timeRange. + start default - "-7d" + end default - "now" + step default - "day" + For Pie and Text Insights, step will be ignored even if provided. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[InsightRunResponse] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"reporting/insight/{jsonable_encoder(id)}/run", + method="POST", + json={ + "formatPlan": convert_and_respect_annotation_metadata( + object_=format_plan, annotation=InsightRunFormatPlan, direction="write" + ), + "timeRangeOverride": convert_and_respect_annotation_metadata( + object_=time_range_override, annotation=InsightTimeRangeWithStep, direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + InsightRunResponse, + construct_type( + type_=InsightRunResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def insight_controller_preview( + self, *, request: InsightControllerPreviewRequest, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[InsightRunResponse]: + """ + Parameters + ---------- + request : InsightControllerPreviewRequest + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[InsightRunResponse] + + """ + _response = await self._client_wrapper.httpx_client.request( + "reporting/insight/preview", + method="POST", + json=convert_and_respect_annotation_metadata( + object_=request, annotation=InsightControllerPreviewRequest, direction="write" + ), + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + InsightRunResponse, + construct_type( + type_=InsightRunResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/vapi/insight/types/__init__.py b/src/vapi/insight/types/__init__.py new file mode 100644 index 00000000..7cbf0dcc --- /dev/null +++ b/src/vapi/insight/types/__init__.py @@ -0,0 +1,157 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .insight_controller_create_request import ( + InsightControllerCreateRequest, + InsightControllerCreateRequest_Bar, + InsightControllerCreateRequest_Line, + InsightControllerCreateRequest_Pie, + InsightControllerCreateRequest_Text, + ) + from .insight_controller_create_response import ( + InsightControllerCreateResponse, + InsightControllerCreateResponse_Bar, + InsightControllerCreateResponse_Line, + InsightControllerCreateResponse_Pie, + InsightControllerCreateResponse_Text, + ) + from .insight_controller_find_all_request_sort_order import InsightControllerFindAllRequestSortOrder + from .insight_controller_find_one_response import ( + InsightControllerFindOneResponse, + InsightControllerFindOneResponse_Bar, + InsightControllerFindOneResponse_Line, + InsightControllerFindOneResponse_Pie, + InsightControllerFindOneResponse_Text, + ) + from .insight_controller_preview_request import ( + InsightControllerPreviewRequest, + InsightControllerPreviewRequest_Bar, + InsightControllerPreviewRequest_Line, + InsightControllerPreviewRequest_Pie, + InsightControllerPreviewRequest_Text, + ) + from .insight_controller_remove_response import ( + InsightControllerRemoveResponse, + InsightControllerRemoveResponse_Bar, + InsightControllerRemoveResponse_Line, + InsightControllerRemoveResponse_Pie, + InsightControllerRemoveResponse_Text, + ) + from .insight_controller_update_request_body import ( + InsightControllerUpdateRequestBody, + InsightControllerUpdateRequestBody_Bar, + InsightControllerUpdateRequestBody_Line, + InsightControllerUpdateRequestBody_Pie, + InsightControllerUpdateRequestBody_Text, + ) + from .insight_controller_update_response import ( + InsightControllerUpdateResponse, + InsightControllerUpdateResponse_Bar, + InsightControllerUpdateResponse_Line, + InsightControllerUpdateResponse_Pie, + InsightControllerUpdateResponse_Text, + ) +_dynamic_imports: typing.Dict[str, str] = { + "InsightControllerCreateRequest": ".insight_controller_create_request", + "InsightControllerCreateRequest_Bar": ".insight_controller_create_request", + "InsightControllerCreateRequest_Line": ".insight_controller_create_request", + "InsightControllerCreateRequest_Pie": ".insight_controller_create_request", + "InsightControllerCreateRequest_Text": ".insight_controller_create_request", + "InsightControllerCreateResponse": ".insight_controller_create_response", + "InsightControllerCreateResponse_Bar": ".insight_controller_create_response", + "InsightControllerCreateResponse_Line": ".insight_controller_create_response", + "InsightControllerCreateResponse_Pie": ".insight_controller_create_response", + "InsightControllerCreateResponse_Text": ".insight_controller_create_response", + "InsightControllerFindAllRequestSortOrder": ".insight_controller_find_all_request_sort_order", + "InsightControllerFindOneResponse": ".insight_controller_find_one_response", + "InsightControllerFindOneResponse_Bar": ".insight_controller_find_one_response", + "InsightControllerFindOneResponse_Line": ".insight_controller_find_one_response", + "InsightControllerFindOneResponse_Pie": ".insight_controller_find_one_response", + "InsightControllerFindOneResponse_Text": ".insight_controller_find_one_response", + "InsightControllerPreviewRequest": ".insight_controller_preview_request", + "InsightControllerPreviewRequest_Bar": ".insight_controller_preview_request", + "InsightControllerPreviewRequest_Line": ".insight_controller_preview_request", + "InsightControllerPreviewRequest_Pie": ".insight_controller_preview_request", + "InsightControllerPreviewRequest_Text": ".insight_controller_preview_request", + "InsightControllerRemoveResponse": ".insight_controller_remove_response", + "InsightControllerRemoveResponse_Bar": ".insight_controller_remove_response", + "InsightControllerRemoveResponse_Line": ".insight_controller_remove_response", + "InsightControllerRemoveResponse_Pie": ".insight_controller_remove_response", + "InsightControllerRemoveResponse_Text": ".insight_controller_remove_response", + "InsightControllerUpdateRequestBody": ".insight_controller_update_request_body", + "InsightControllerUpdateRequestBody_Bar": ".insight_controller_update_request_body", + "InsightControllerUpdateRequestBody_Line": ".insight_controller_update_request_body", + "InsightControllerUpdateRequestBody_Pie": ".insight_controller_update_request_body", + "InsightControllerUpdateRequestBody_Text": ".insight_controller_update_request_body", + "InsightControllerUpdateResponse": ".insight_controller_update_response", + "InsightControllerUpdateResponse_Bar": ".insight_controller_update_response", + "InsightControllerUpdateResponse_Line": ".insight_controller_update_response", + "InsightControllerUpdateResponse_Pie": ".insight_controller_update_response", + "InsightControllerUpdateResponse_Text": ".insight_controller_update_response", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = [ + "InsightControllerCreateRequest", + "InsightControllerCreateRequest_Bar", + "InsightControllerCreateRequest_Line", + "InsightControllerCreateRequest_Pie", + "InsightControllerCreateRequest_Text", + "InsightControllerCreateResponse", + "InsightControllerCreateResponse_Bar", + "InsightControllerCreateResponse_Line", + "InsightControllerCreateResponse_Pie", + "InsightControllerCreateResponse_Text", + "InsightControllerFindAllRequestSortOrder", + "InsightControllerFindOneResponse", + "InsightControllerFindOneResponse_Bar", + "InsightControllerFindOneResponse_Line", + "InsightControllerFindOneResponse_Pie", + "InsightControllerFindOneResponse_Text", + "InsightControllerPreviewRequest", + "InsightControllerPreviewRequest_Bar", + "InsightControllerPreviewRequest_Line", + "InsightControllerPreviewRequest_Pie", + "InsightControllerPreviewRequest_Text", + "InsightControllerRemoveResponse", + "InsightControllerRemoveResponse_Bar", + "InsightControllerRemoveResponse_Line", + "InsightControllerRemoveResponse_Pie", + "InsightControllerRemoveResponse_Text", + "InsightControllerUpdateRequestBody", + "InsightControllerUpdateRequestBody_Bar", + "InsightControllerUpdateRequestBody_Line", + "InsightControllerUpdateRequestBody_Pie", + "InsightControllerUpdateRequestBody_Text", + "InsightControllerUpdateResponse", + "InsightControllerUpdateResponse_Bar", + "InsightControllerUpdateResponse_Line", + "InsightControllerUpdateResponse_Pie", + "InsightControllerUpdateResponse_Text", +] diff --git a/src/vapi/insight/types/insight_controller_create_request.py b/src/vapi/insight/types/insight_controller_create_request.py new file mode 100644 index 00000000..35cc3e9c --- /dev/null +++ b/src/vapi/insight/types/insight_controller_create_request.py @@ -0,0 +1,127 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ...core.pydantic_utilities import IS_PYDANTIC_V2 +from ...core.serialization import FieldMetadata +from ...core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from ...types.bar_insight_metadata import BarInsightMetadata +from ...types.create_bar_insight_from_call_table_dto_group_by import CreateBarInsightFromCallTableDtoGroupBy +from ...types.create_bar_insight_from_call_table_dto_queries_item import CreateBarInsightFromCallTableDtoQueriesItem +from ...types.create_line_insight_from_call_table_dto_group_by import CreateLineInsightFromCallTableDtoGroupBy +from ...types.create_line_insight_from_call_table_dto_queries_item import CreateLineInsightFromCallTableDtoQueriesItem +from ...types.create_pie_insight_from_call_table_dto_group_by import CreatePieInsightFromCallTableDtoGroupBy +from ...types.create_pie_insight_from_call_table_dto_queries_item import CreatePieInsightFromCallTableDtoQueriesItem +from ...types.create_text_insight_from_call_table_dto_queries_item import CreateTextInsightFromCallTableDtoQueriesItem +from ...types.insight_formula import InsightFormula +from ...types.insight_time_range import InsightTimeRange +from ...types.insight_time_range_with_step import InsightTimeRangeWithStep +from ...types.line_insight_metadata import LineInsightMetadata + + +class InsightControllerCreateRequest_Bar(UncheckedBaseModel): + type: typing.Literal["bar"] = "bar" + name: typing.Optional[str] = None + formulas: typing.Optional[typing.List[InsightFormula]] = None + metadata: typing.Optional[BarInsightMetadata] = None + time_range: typing_extensions.Annotated[ + typing.Optional[InsightTimeRangeWithStep], FieldMetadata(alias="timeRange"), pydantic.Field(alias="timeRange") + ] = None + group_by: typing_extensions.Annotated[ + typing.Optional[CreateBarInsightFromCallTableDtoGroupBy], + FieldMetadata(alias="groupBy"), + pydantic.Field(alias="groupBy"), + ] = None + queries: typing.List[CreateBarInsightFromCallTableDtoQueriesItem] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class InsightControllerCreateRequest_Pie(UncheckedBaseModel): + type: typing.Literal["pie"] = "pie" + name: typing.Optional[str] = None + formulas: typing.Optional[typing.List[InsightFormula]] = None + time_range: typing_extensions.Annotated[ + typing.Optional[InsightTimeRange], FieldMetadata(alias="timeRange"), pydantic.Field(alias="timeRange") + ] = None + group_by: typing_extensions.Annotated[ + typing.Optional[CreatePieInsightFromCallTableDtoGroupBy], + FieldMetadata(alias="groupBy"), + pydantic.Field(alias="groupBy"), + ] = None + queries: typing.List[CreatePieInsightFromCallTableDtoQueriesItem] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class InsightControllerCreateRequest_Line(UncheckedBaseModel): + type: typing.Literal["line"] = "line" + name: typing.Optional[str] = None + formulas: typing.Optional[typing.List[InsightFormula]] = None + metadata: typing.Optional[LineInsightMetadata] = None + time_range: typing_extensions.Annotated[ + typing.Optional[InsightTimeRangeWithStep], FieldMetadata(alias="timeRange"), pydantic.Field(alias="timeRange") + ] = None + group_by: typing_extensions.Annotated[ + typing.Optional[CreateLineInsightFromCallTableDtoGroupBy], + FieldMetadata(alias="groupBy"), + pydantic.Field(alias="groupBy"), + ] = None + queries: typing.List[CreateLineInsightFromCallTableDtoQueriesItem] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class InsightControllerCreateRequest_Text(UncheckedBaseModel): + type: typing.Literal["text"] = "text" + name: typing.Optional[str] = None + formula: typing.Optional[typing.Dict[str, typing.Any]] = None + time_range: typing_extensions.Annotated[ + typing.Optional[InsightTimeRange], FieldMetadata(alias="timeRange"), pydantic.Field(alias="timeRange") + ] = None + queries: typing.List[CreateTextInsightFromCallTableDtoQueriesItem] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +InsightControllerCreateRequest = typing_extensions.Annotated[ + typing.Union[ + InsightControllerCreateRequest_Bar, + InsightControllerCreateRequest_Pie, + InsightControllerCreateRequest_Line, + InsightControllerCreateRequest_Text, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/insight/types/insight_controller_create_response.py b/src/vapi/insight/types/insight_controller_create_response.py new file mode 100644 index 00000000..6018b190 --- /dev/null +++ b/src/vapi/insight/types/insight_controller_create_response.py @@ -0,0 +1,154 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ...core.pydantic_utilities import IS_PYDANTIC_V2 +from ...core.serialization import FieldMetadata +from ...core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from ...types.bar_insight_group_by import BarInsightGroupBy +from ...types.bar_insight_metadata import BarInsightMetadata +from ...types.bar_insight_queries_item import BarInsightQueriesItem +from ...types.insight_formula import InsightFormula +from ...types.insight_time_range import InsightTimeRange +from ...types.insight_time_range_with_step import InsightTimeRangeWithStep +from ...types.line_insight_group_by import LineInsightGroupBy +from ...types.line_insight_metadata import LineInsightMetadata +from ...types.line_insight_queries_item import LineInsightQueriesItem +from ...types.pie_insight_group_by import PieInsightGroupBy +from ...types.pie_insight_queries_item import PieInsightQueriesItem +from ...types.text_insight_queries_item import TextInsightQueriesItem + + +class InsightControllerCreateResponse_Bar(UncheckedBaseModel): + type: typing.Literal["bar"] = "bar" + name: typing.Optional[str] = None + formulas: typing.Optional[typing.List[InsightFormula]] = None + metadata: typing.Optional[BarInsightMetadata] = None + time_range: typing_extensions.Annotated[ + typing.Optional[InsightTimeRangeWithStep], FieldMetadata(alias="timeRange"), pydantic.Field(alias="timeRange") + ] = None + group_by: typing_extensions.Annotated[ + typing.Optional[BarInsightGroupBy], FieldMetadata(alias="groupBy"), pydantic.Field(alias="groupBy") + ] = None + queries: typing.List[BarInsightQueriesItem] + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class InsightControllerCreateResponse_Pie(UncheckedBaseModel): + type: typing.Literal["pie"] = "pie" + name: typing.Optional[str] = None + formulas: typing.Optional[typing.List[InsightFormula]] = None + time_range: typing_extensions.Annotated[ + typing.Optional[InsightTimeRange], FieldMetadata(alias="timeRange"), pydantic.Field(alias="timeRange") + ] = None + group_by: typing_extensions.Annotated[ + typing.Optional[PieInsightGroupBy], FieldMetadata(alias="groupBy"), pydantic.Field(alias="groupBy") + ] = None + queries: typing.List[PieInsightQueriesItem] + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class InsightControllerCreateResponse_Line(UncheckedBaseModel): + type: typing.Literal["line"] = "line" + name: typing.Optional[str] = None + formulas: typing.Optional[typing.List[InsightFormula]] = None + metadata: typing.Optional[LineInsightMetadata] = None + time_range: typing_extensions.Annotated[ + typing.Optional[InsightTimeRangeWithStep], FieldMetadata(alias="timeRange"), pydantic.Field(alias="timeRange") + ] = None + group_by: typing_extensions.Annotated[ + typing.Optional[LineInsightGroupBy], FieldMetadata(alias="groupBy"), pydantic.Field(alias="groupBy") + ] = None + queries: typing.List[LineInsightQueriesItem] + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class InsightControllerCreateResponse_Text(UncheckedBaseModel): + type: typing.Literal["text"] = "text" + name: typing.Optional[str] = None + formula: typing.Optional[typing.Dict[str, typing.Any]] = None + time_range: typing_extensions.Annotated[ + typing.Optional[InsightTimeRange], FieldMetadata(alias="timeRange"), pydantic.Field(alias="timeRange") + ] = None + queries: typing.List[TextInsightQueriesItem] + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +InsightControllerCreateResponse = typing_extensions.Annotated[ + typing.Union[ + InsightControllerCreateResponse_Bar, + InsightControllerCreateResponse_Pie, + InsightControllerCreateResponse_Line, + InsightControllerCreateResponse_Text, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/insight/types/insight_controller_find_all_request_sort_order.py b/src/vapi/insight/types/insight_controller_find_all_request_sort_order.py new file mode 100644 index 00000000..f6f45957 --- /dev/null +++ b/src/vapi/insight/types/insight_controller_find_all_request_sort_order.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +InsightControllerFindAllRequestSortOrder = typing.Union[typing.Literal["ASC", "DESC"], typing.Any] diff --git a/src/vapi/insight/types/insight_controller_find_one_response.py b/src/vapi/insight/types/insight_controller_find_one_response.py new file mode 100644 index 00000000..5e5475c2 --- /dev/null +++ b/src/vapi/insight/types/insight_controller_find_one_response.py @@ -0,0 +1,154 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ...core.pydantic_utilities import IS_PYDANTIC_V2 +from ...core.serialization import FieldMetadata +from ...core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from ...types.bar_insight_group_by import BarInsightGroupBy +from ...types.bar_insight_metadata import BarInsightMetadata +from ...types.bar_insight_queries_item import BarInsightQueriesItem +from ...types.insight_formula import InsightFormula +from ...types.insight_time_range import InsightTimeRange +from ...types.insight_time_range_with_step import InsightTimeRangeWithStep +from ...types.line_insight_group_by import LineInsightGroupBy +from ...types.line_insight_metadata import LineInsightMetadata +from ...types.line_insight_queries_item import LineInsightQueriesItem +from ...types.pie_insight_group_by import PieInsightGroupBy +from ...types.pie_insight_queries_item import PieInsightQueriesItem +from ...types.text_insight_queries_item import TextInsightQueriesItem + + +class InsightControllerFindOneResponse_Bar(UncheckedBaseModel): + type: typing.Literal["bar"] = "bar" + name: typing.Optional[str] = None + formulas: typing.Optional[typing.List[InsightFormula]] = None + metadata: typing.Optional[BarInsightMetadata] = None + time_range: typing_extensions.Annotated[ + typing.Optional[InsightTimeRangeWithStep], FieldMetadata(alias="timeRange"), pydantic.Field(alias="timeRange") + ] = None + group_by: typing_extensions.Annotated[ + typing.Optional[BarInsightGroupBy], FieldMetadata(alias="groupBy"), pydantic.Field(alias="groupBy") + ] = None + queries: typing.List[BarInsightQueriesItem] + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class InsightControllerFindOneResponse_Pie(UncheckedBaseModel): + type: typing.Literal["pie"] = "pie" + name: typing.Optional[str] = None + formulas: typing.Optional[typing.List[InsightFormula]] = None + time_range: typing_extensions.Annotated[ + typing.Optional[InsightTimeRange], FieldMetadata(alias="timeRange"), pydantic.Field(alias="timeRange") + ] = None + group_by: typing_extensions.Annotated[ + typing.Optional[PieInsightGroupBy], FieldMetadata(alias="groupBy"), pydantic.Field(alias="groupBy") + ] = None + queries: typing.List[PieInsightQueriesItem] + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class InsightControllerFindOneResponse_Line(UncheckedBaseModel): + type: typing.Literal["line"] = "line" + name: typing.Optional[str] = None + formulas: typing.Optional[typing.List[InsightFormula]] = None + metadata: typing.Optional[LineInsightMetadata] = None + time_range: typing_extensions.Annotated[ + typing.Optional[InsightTimeRangeWithStep], FieldMetadata(alias="timeRange"), pydantic.Field(alias="timeRange") + ] = None + group_by: typing_extensions.Annotated[ + typing.Optional[LineInsightGroupBy], FieldMetadata(alias="groupBy"), pydantic.Field(alias="groupBy") + ] = None + queries: typing.List[LineInsightQueriesItem] + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class InsightControllerFindOneResponse_Text(UncheckedBaseModel): + type: typing.Literal["text"] = "text" + name: typing.Optional[str] = None + formula: typing.Optional[typing.Dict[str, typing.Any]] = None + time_range: typing_extensions.Annotated[ + typing.Optional[InsightTimeRange], FieldMetadata(alias="timeRange"), pydantic.Field(alias="timeRange") + ] = None + queries: typing.List[TextInsightQueriesItem] + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +InsightControllerFindOneResponse = typing_extensions.Annotated[ + typing.Union[ + InsightControllerFindOneResponse_Bar, + InsightControllerFindOneResponse_Pie, + InsightControllerFindOneResponse_Line, + InsightControllerFindOneResponse_Text, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/insight/types/insight_controller_preview_request.py b/src/vapi/insight/types/insight_controller_preview_request.py new file mode 100644 index 00000000..658488df --- /dev/null +++ b/src/vapi/insight/types/insight_controller_preview_request.py @@ -0,0 +1,127 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ...core.pydantic_utilities import IS_PYDANTIC_V2 +from ...core.serialization import FieldMetadata +from ...core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from ...types.bar_insight_metadata import BarInsightMetadata +from ...types.create_bar_insight_from_call_table_dto_group_by import CreateBarInsightFromCallTableDtoGroupBy +from ...types.create_bar_insight_from_call_table_dto_queries_item import CreateBarInsightFromCallTableDtoQueriesItem +from ...types.create_line_insight_from_call_table_dto_group_by import CreateLineInsightFromCallTableDtoGroupBy +from ...types.create_line_insight_from_call_table_dto_queries_item import CreateLineInsightFromCallTableDtoQueriesItem +from ...types.create_pie_insight_from_call_table_dto_group_by import CreatePieInsightFromCallTableDtoGroupBy +from ...types.create_pie_insight_from_call_table_dto_queries_item import CreatePieInsightFromCallTableDtoQueriesItem +from ...types.create_text_insight_from_call_table_dto_queries_item import CreateTextInsightFromCallTableDtoQueriesItem +from ...types.insight_formula import InsightFormula +from ...types.insight_time_range import InsightTimeRange +from ...types.insight_time_range_with_step import InsightTimeRangeWithStep +from ...types.line_insight_metadata import LineInsightMetadata + + +class InsightControllerPreviewRequest_Bar(UncheckedBaseModel): + type: typing.Literal["bar"] = "bar" + name: typing.Optional[str] = None + formulas: typing.Optional[typing.List[InsightFormula]] = None + metadata: typing.Optional[BarInsightMetadata] = None + time_range: typing_extensions.Annotated[ + typing.Optional[InsightTimeRangeWithStep], FieldMetadata(alias="timeRange"), pydantic.Field(alias="timeRange") + ] = None + group_by: typing_extensions.Annotated[ + typing.Optional[CreateBarInsightFromCallTableDtoGroupBy], + FieldMetadata(alias="groupBy"), + pydantic.Field(alias="groupBy"), + ] = None + queries: typing.List[CreateBarInsightFromCallTableDtoQueriesItem] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class InsightControllerPreviewRequest_Pie(UncheckedBaseModel): + type: typing.Literal["pie"] = "pie" + name: typing.Optional[str] = None + formulas: typing.Optional[typing.List[InsightFormula]] = None + time_range: typing_extensions.Annotated[ + typing.Optional[InsightTimeRange], FieldMetadata(alias="timeRange"), pydantic.Field(alias="timeRange") + ] = None + group_by: typing_extensions.Annotated[ + typing.Optional[CreatePieInsightFromCallTableDtoGroupBy], + FieldMetadata(alias="groupBy"), + pydantic.Field(alias="groupBy"), + ] = None + queries: typing.List[CreatePieInsightFromCallTableDtoQueriesItem] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class InsightControllerPreviewRequest_Line(UncheckedBaseModel): + type: typing.Literal["line"] = "line" + name: typing.Optional[str] = None + formulas: typing.Optional[typing.List[InsightFormula]] = None + metadata: typing.Optional[LineInsightMetadata] = None + time_range: typing_extensions.Annotated[ + typing.Optional[InsightTimeRangeWithStep], FieldMetadata(alias="timeRange"), pydantic.Field(alias="timeRange") + ] = None + group_by: typing_extensions.Annotated[ + typing.Optional[CreateLineInsightFromCallTableDtoGroupBy], + FieldMetadata(alias="groupBy"), + pydantic.Field(alias="groupBy"), + ] = None + queries: typing.List[CreateLineInsightFromCallTableDtoQueriesItem] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class InsightControllerPreviewRequest_Text(UncheckedBaseModel): + type: typing.Literal["text"] = "text" + name: typing.Optional[str] = None + formula: typing.Optional[typing.Dict[str, typing.Any]] = None + time_range: typing_extensions.Annotated[ + typing.Optional[InsightTimeRange], FieldMetadata(alias="timeRange"), pydantic.Field(alias="timeRange") + ] = None + queries: typing.List[CreateTextInsightFromCallTableDtoQueriesItem] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +InsightControllerPreviewRequest = typing_extensions.Annotated[ + typing.Union[ + InsightControllerPreviewRequest_Bar, + InsightControllerPreviewRequest_Pie, + InsightControllerPreviewRequest_Line, + InsightControllerPreviewRequest_Text, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/insight/types/insight_controller_remove_response.py b/src/vapi/insight/types/insight_controller_remove_response.py new file mode 100644 index 00000000..75194df7 --- /dev/null +++ b/src/vapi/insight/types/insight_controller_remove_response.py @@ -0,0 +1,154 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ...core.pydantic_utilities import IS_PYDANTIC_V2 +from ...core.serialization import FieldMetadata +from ...core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from ...types.bar_insight_group_by import BarInsightGroupBy +from ...types.bar_insight_metadata import BarInsightMetadata +from ...types.bar_insight_queries_item import BarInsightQueriesItem +from ...types.insight_formula import InsightFormula +from ...types.insight_time_range import InsightTimeRange +from ...types.insight_time_range_with_step import InsightTimeRangeWithStep +from ...types.line_insight_group_by import LineInsightGroupBy +from ...types.line_insight_metadata import LineInsightMetadata +from ...types.line_insight_queries_item import LineInsightQueriesItem +from ...types.pie_insight_group_by import PieInsightGroupBy +from ...types.pie_insight_queries_item import PieInsightQueriesItem +from ...types.text_insight_queries_item import TextInsightQueriesItem + + +class InsightControllerRemoveResponse_Bar(UncheckedBaseModel): + type: typing.Literal["bar"] = "bar" + name: typing.Optional[str] = None + formulas: typing.Optional[typing.List[InsightFormula]] = None + metadata: typing.Optional[BarInsightMetadata] = None + time_range: typing_extensions.Annotated[ + typing.Optional[InsightTimeRangeWithStep], FieldMetadata(alias="timeRange"), pydantic.Field(alias="timeRange") + ] = None + group_by: typing_extensions.Annotated[ + typing.Optional[BarInsightGroupBy], FieldMetadata(alias="groupBy"), pydantic.Field(alias="groupBy") + ] = None + queries: typing.List[BarInsightQueriesItem] + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class InsightControllerRemoveResponse_Pie(UncheckedBaseModel): + type: typing.Literal["pie"] = "pie" + name: typing.Optional[str] = None + formulas: typing.Optional[typing.List[InsightFormula]] = None + time_range: typing_extensions.Annotated[ + typing.Optional[InsightTimeRange], FieldMetadata(alias="timeRange"), pydantic.Field(alias="timeRange") + ] = None + group_by: typing_extensions.Annotated[ + typing.Optional[PieInsightGroupBy], FieldMetadata(alias="groupBy"), pydantic.Field(alias="groupBy") + ] = None + queries: typing.List[PieInsightQueriesItem] + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class InsightControllerRemoveResponse_Line(UncheckedBaseModel): + type: typing.Literal["line"] = "line" + name: typing.Optional[str] = None + formulas: typing.Optional[typing.List[InsightFormula]] = None + metadata: typing.Optional[LineInsightMetadata] = None + time_range: typing_extensions.Annotated[ + typing.Optional[InsightTimeRangeWithStep], FieldMetadata(alias="timeRange"), pydantic.Field(alias="timeRange") + ] = None + group_by: typing_extensions.Annotated[ + typing.Optional[LineInsightGroupBy], FieldMetadata(alias="groupBy"), pydantic.Field(alias="groupBy") + ] = None + queries: typing.List[LineInsightQueriesItem] + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class InsightControllerRemoveResponse_Text(UncheckedBaseModel): + type: typing.Literal["text"] = "text" + name: typing.Optional[str] = None + formula: typing.Optional[typing.Dict[str, typing.Any]] = None + time_range: typing_extensions.Annotated[ + typing.Optional[InsightTimeRange], FieldMetadata(alias="timeRange"), pydantic.Field(alias="timeRange") + ] = None + queries: typing.List[TextInsightQueriesItem] + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +InsightControllerRemoveResponse = typing_extensions.Annotated[ + typing.Union[ + InsightControllerRemoveResponse_Bar, + InsightControllerRemoveResponse_Pie, + InsightControllerRemoveResponse_Line, + InsightControllerRemoveResponse_Text, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/insight/types/insight_controller_update_request_body.py b/src/vapi/insight/types/insight_controller_update_request_body.py new file mode 100644 index 00000000..d5de206c --- /dev/null +++ b/src/vapi/insight/types/insight_controller_update_request_body.py @@ -0,0 +1,127 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ...core.pydantic_utilities import IS_PYDANTIC_V2 +from ...core.serialization import FieldMetadata +from ...core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from ...types.bar_insight_metadata import BarInsightMetadata +from ...types.insight_formula import InsightFormula +from ...types.insight_time_range import InsightTimeRange +from ...types.insight_time_range_with_step import InsightTimeRangeWithStep +from ...types.line_insight_metadata import LineInsightMetadata +from ...types.update_bar_insight_from_call_table_dto_group_by import UpdateBarInsightFromCallTableDtoGroupBy +from ...types.update_bar_insight_from_call_table_dto_queries_item import UpdateBarInsightFromCallTableDtoQueriesItem +from ...types.update_line_insight_from_call_table_dto_group_by import UpdateLineInsightFromCallTableDtoGroupBy +from ...types.update_line_insight_from_call_table_dto_queries_item import UpdateLineInsightFromCallTableDtoQueriesItem +from ...types.update_pie_insight_from_call_table_dto_group_by import UpdatePieInsightFromCallTableDtoGroupBy +from ...types.update_pie_insight_from_call_table_dto_queries_item import UpdatePieInsightFromCallTableDtoQueriesItem +from ...types.update_text_insight_from_call_table_dto_queries_item import UpdateTextInsightFromCallTableDtoQueriesItem + + +class InsightControllerUpdateRequestBody_Bar(UncheckedBaseModel): + type: typing.Literal["bar"] = "bar" + name: typing.Optional[str] = None + formulas: typing.Optional[typing.List[InsightFormula]] = None + metadata: typing.Optional[BarInsightMetadata] = None + time_range: typing_extensions.Annotated[ + typing.Optional[InsightTimeRangeWithStep], FieldMetadata(alias="timeRange"), pydantic.Field(alias="timeRange") + ] = None + group_by: typing_extensions.Annotated[ + typing.Optional[UpdateBarInsightFromCallTableDtoGroupBy], + FieldMetadata(alias="groupBy"), + pydantic.Field(alias="groupBy"), + ] = None + queries: typing.Optional[typing.List[UpdateBarInsightFromCallTableDtoQueriesItem]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class InsightControllerUpdateRequestBody_Pie(UncheckedBaseModel): + type: typing.Literal["pie"] = "pie" + name: typing.Optional[str] = None + formulas: typing.Optional[typing.List[InsightFormula]] = None + time_range: typing_extensions.Annotated[ + typing.Optional[InsightTimeRange], FieldMetadata(alias="timeRange"), pydantic.Field(alias="timeRange") + ] = None + group_by: typing_extensions.Annotated[ + typing.Optional[UpdatePieInsightFromCallTableDtoGroupBy], + FieldMetadata(alias="groupBy"), + pydantic.Field(alias="groupBy"), + ] = None + queries: typing.Optional[typing.List[UpdatePieInsightFromCallTableDtoQueriesItem]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class InsightControllerUpdateRequestBody_Line(UncheckedBaseModel): + type: typing.Literal["line"] = "line" + name: typing.Optional[str] = None + formulas: typing.Optional[typing.List[InsightFormula]] = None + metadata: typing.Optional[LineInsightMetadata] = None + time_range: typing_extensions.Annotated[ + typing.Optional[InsightTimeRangeWithStep], FieldMetadata(alias="timeRange"), pydantic.Field(alias="timeRange") + ] = None + group_by: typing_extensions.Annotated[ + typing.Optional[UpdateLineInsightFromCallTableDtoGroupBy], + FieldMetadata(alias="groupBy"), + pydantic.Field(alias="groupBy"), + ] = None + queries: typing.Optional[typing.List[UpdateLineInsightFromCallTableDtoQueriesItem]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class InsightControllerUpdateRequestBody_Text(UncheckedBaseModel): + type: typing.Literal["text"] = "text" + name: typing.Optional[str] = None + formula: typing.Optional[typing.Dict[str, typing.Any]] = None + time_range: typing_extensions.Annotated[ + typing.Optional[InsightTimeRange], FieldMetadata(alias="timeRange"), pydantic.Field(alias="timeRange") + ] = None + queries: typing.Optional[typing.List[UpdateTextInsightFromCallTableDtoQueriesItem]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +InsightControllerUpdateRequestBody = typing_extensions.Annotated[ + typing.Union[ + InsightControllerUpdateRequestBody_Bar, + InsightControllerUpdateRequestBody_Pie, + InsightControllerUpdateRequestBody_Line, + InsightControllerUpdateRequestBody_Text, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/insight/types/insight_controller_update_response.py b/src/vapi/insight/types/insight_controller_update_response.py new file mode 100644 index 00000000..db4cac8b --- /dev/null +++ b/src/vapi/insight/types/insight_controller_update_response.py @@ -0,0 +1,154 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ...core.pydantic_utilities import IS_PYDANTIC_V2 +from ...core.serialization import FieldMetadata +from ...core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from ...types.bar_insight_group_by import BarInsightGroupBy +from ...types.bar_insight_metadata import BarInsightMetadata +from ...types.bar_insight_queries_item import BarInsightQueriesItem +from ...types.insight_formula import InsightFormula +from ...types.insight_time_range import InsightTimeRange +from ...types.insight_time_range_with_step import InsightTimeRangeWithStep +from ...types.line_insight_group_by import LineInsightGroupBy +from ...types.line_insight_metadata import LineInsightMetadata +from ...types.line_insight_queries_item import LineInsightQueriesItem +from ...types.pie_insight_group_by import PieInsightGroupBy +from ...types.pie_insight_queries_item import PieInsightQueriesItem +from ...types.text_insight_queries_item import TextInsightQueriesItem + + +class InsightControllerUpdateResponse_Bar(UncheckedBaseModel): + type: typing.Literal["bar"] = "bar" + name: typing.Optional[str] = None + formulas: typing.Optional[typing.List[InsightFormula]] = None + metadata: typing.Optional[BarInsightMetadata] = None + time_range: typing_extensions.Annotated[ + typing.Optional[InsightTimeRangeWithStep], FieldMetadata(alias="timeRange"), pydantic.Field(alias="timeRange") + ] = None + group_by: typing_extensions.Annotated[ + typing.Optional[BarInsightGroupBy], FieldMetadata(alias="groupBy"), pydantic.Field(alias="groupBy") + ] = None + queries: typing.List[BarInsightQueriesItem] + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class InsightControllerUpdateResponse_Pie(UncheckedBaseModel): + type: typing.Literal["pie"] = "pie" + name: typing.Optional[str] = None + formulas: typing.Optional[typing.List[InsightFormula]] = None + time_range: typing_extensions.Annotated[ + typing.Optional[InsightTimeRange], FieldMetadata(alias="timeRange"), pydantic.Field(alias="timeRange") + ] = None + group_by: typing_extensions.Annotated[ + typing.Optional[PieInsightGroupBy], FieldMetadata(alias="groupBy"), pydantic.Field(alias="groupBy") + ] = None + queries: typing.List[PieInsightQueriesItem] + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class InsightControllerUpdateResponse_Line(UncheckedBaseModel): + type: typing.Literal["line"] = "line" + name: typing.Optional[str] = None + formulas: typing.Optional[typing.List[InsightFormula]] = None + metadata: typing.Optional[LineInsightMetadata] = None + time_range: typing_extensions.Annotated[ + typing.Optional[InsightTimeRangeWithStep], FieldMetadata(alias="timeRange"), pydantic.Field(alias="timeRange") + ] = None + group_by: typing_extensions.Annotated[ + typing.Optional[LineInsightGroupBy], FieldMetadata(alias="groupBy"), pydantic.Field(alias="groupBy") + ] = None + queries: typing.List[LineInsightQueriesItem] + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class InsightControllerUpdateResponse_Text(UncheckedBaseModel): + type: typing.Literal["text"] = "text" + name: typing.Optional[str] = None + formula: typing.Optional[typing.Dict[str, typing.Any]] = None + time_range: typing_extensions.Annotated[ + typing.Optional[InsightTimeRange], FieldMetadata(alias="timeRange"), pydantic.Field(alias="timeRange") + ] = None + queries: typing.List[TextInsightQueriesItem] + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +InsightControllerUpdateResponse = typing_extensions.Annotated[ + typing.Union[ + InsightControllerUpdateResponse_Bar, + InsightControllerUpdateResponse_Pie, + InsightControllerUpdateResponse_Line, + InsightControllerUpdateResponse_Text, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/logs/__init__.py b/src/vapi/logs/__init__.py deleted file mode 100644 index 7e2f04b3..00000000 --- a/src/vapi/logs/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from .types import LogsGetRequestSortOrder, LogsGetRequestType - -__all__ = ["LogsGetRequestSortOrder", "LogsGetRequestType"] diff --git a/src/vapi/logs/client.py b/src/vapi/logs/client.py deleted file mode 100644 index e51acecb..00000000 --- a/src/vapi/logs/client.py +++ /dev/null @@ -1,367 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from ..core.client_wrapper import SyncClientWrapper -import typing -from .types.logs_get_request_type import LogsGetRequestType -from .types.logs_get_request_sort_order import LogsGetRequestSortOrder -import datetime as dt -from ..core.request_options import RequestOptions -from ..core.pagination import SyncPager -from ..types.log import Log -from ..core.datetime_utils import serialize_datetime -from ..types.logs_paginated_response import LogsPaginatedResponse -from ..core.pydantic_utilities import parse_obj_as -from json.decoder import JSONDecodeError -from ..core.api_error import ApiError -from ..core.client_wrapper import AsyncClientWrapper -from ..core.pagination import AsyncPager - - -class LogsClient: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._client_wrapper = client_wrapper - - def get( - self, - *, - org_id: typing.Optional[str] = None, - type: typing.Optional[LogsGetRequestType] = None, - assistant_id: typing.Optional[str] = None, - phone_number_id: typing.Optional[str] = None, - customer_id: typing.Optional[str] = None, - squad_id: typing.Optional[str] = None, - call_id: typing.Optional[str] = None, - page: typing.Optional[int] = None, - sort_order: typing.Optional[LogsGetRequestSortOrder] = None, - limit: typing.Optional[float] = None, - created_at_gt: typing.Optional[dt.datetime] = None, - created_at_lt: typing.Optional[dt.datetime] = None, - created_at_ge: typing.Optional[dt.datetime] = None, - created_at_le: typing.Optional[dt.datetime] = None, - updated_at_gt: typing.Optional[dt.datetime] = None, - updated_at_lt: typing.Optional[dt.datetime] = None, - updated_at_ge: typing.Optional[dt.datetime] = None, - updated_at_le: typing.Optional[dt.datetime] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> SyncPager[Log]: - """ - Parameters - ---------- - org_id : typing.Optional[str] - This is the unique identifier for the org that this log belongs to. - - type : typing.Optional[LogsGetRequestType] - This is the type of the log. - - assistant_id : typing.Optional[str] - This is the ID of the assistant. - - phone_number_id : typing.Optional[str] - This is the ID of the phone number. - - customer_id : typing.Optional[str] - This is the ID of the customer. - - squad_id : typing.Optional[str] - This is the ID of the squad. - - call_id : typing.Optional[str] - This is the ID of the call. - - page : typing.Optional[int] - This is the page number to return. Defaults to 1. - - sort_order : typing.Optional[LogsGetRequestSortOrder] - This is the sort order for pagination. Defaults to 'ASC'. - - limit : typing.Optional[float] - This is the maximum number of items to return. Defaults to 100. - - created_at_gt : typing.Optional[dt.datetime] - This will return items where the createdAt is greater than the specified value. - - created_at_lt : typing.Optional[dt.datetime] - This will return items where the createdAt is less than the specified value. - - created_at_ge : typing.Optional[dt.datetime] - This will return items where the createdAt is greater than or equal to the specified value. - - created_at_le : typing.Optional[dt.datetime] - This will return items where the createdAt is less than or equal to the specified value. - - updated_at_gt : typing.Optional[dt.datetime] - This will return items where the updatedAt is greater than the specified value. - - updated_at_lt : typing.Optional[dt.datetime] - This will return items where the updatedAt is less than the specified value. - - updated_at_ge : typing.Optional[dt.datetime] - This will return items where the updatedAt is greater than or equal to the specified value. - - updated_at_le : typing.Optional[dt.datetime] - This will return items where the updatedAt is less than or equal to the specified value. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - SyncPager[Log] - - - Examples - -------- - from vapi import Vapi - - client = Vapi( - token="YOUR_TOKEN", - ) - response = client.logs.get() - for item in response: - yield item - # alternatively, you can paginate page-by-page - for page in response.iter_pages(): - yield page - """ - page = page if page is not None else 1 - _response = self._client_wrapper.httpx_client.request( - "logs", - method="GET", - params={ - "orgId": org_id, - "type": type, - "assistantId": assistant_id, - "phoneNumberId": phone_number_id, - "customerId": customer_id, - "squadId": squad_id, - "callId": call_id, - "page": page, - "sortOrder": sort_order, - "limit": limit, - "createdAtGt": serialize_datetime(created_at_gt) if created_at_gt is not None else None, - "createdAtLt": serialize_datetime(created_at_lt) if created_at_lt is not None else None, - "createdAtGe": serialize_datetime(created_at_ge) if created_at_ge is not None else None, - "createdAtLe": serialize_datetime(created_at_le) if created_at_le is not None else None, - "updatedAtGt": serialize_datetime(updated_at_gt) if updated_at_gt is not None else None, - "updatedAtLt": serialize_datetime(updated_at_lt) if updated_at_lt is not None else None, - "updatedAtGe": serialize_datetime(updated_at_ge) if updated_at_ge is not None else None, - "updatedAtLe": serialize_datetime(updated_at_le) if updated_at_le is not None else None, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _parsed_response = typing.cast( - LogsPaginatedResponse, - parse_obj_as( - type_=LogsPaginatedResponse, # type: ignore - object_=_response.json(), - ), - ) - _has_next = True - _get_next = lambda: self.get( - org_id=org_id, - type=type, - assistant_id=assistant_id, - phone_number_id=phone_number_id, - customer_id=customer_id, - squad_id=squad_id, - call_id=call_id, - page=page + 1, - sort_order=sort_order, - limit=limit, - created_at_gt=created_at_gt, - created_at_lt=created_at_lt, - created_at_ge=created_at_ge, - created_at_le=created_at_le, - updated_at_gt=updated_at_gt, - updated_at_lt=updated_at_lt, - updated_at_ge=updated_at_ge, - updated_at_le=updated_at_le, - request_options=request_options, - ) - _items = _parsed_response.results - return SyncPager(has_next=_has_next, items=_items, get_next=_get_next) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - -class AsyncLogsClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def get( - self, - *, - org_id: typing.Optional[str] = None, - type: typing.Optional[LogsGetRequestType] = None, - assistant_id: typing.Optional[str] = None, - phone_number_id: typing.Optional[str] = None, - customer_id: typing.Optional[str] = None, - squad_id: typing.Optional[str] = None, - call_id: typing.Optional[str] = None, - page: typing.Optional[int] = None, - sort_order: typing.Optional[LogsGetRequestSortOrder] = None, - limit: typing.Optional[float] = None, - created_at_gt: typing.Optional[dt.datetime] = None, - created_at_lt: typing.Optional[dt.datetime] = None, - created_at_ge: typing.Optional[dt.datetime] = None, - created_at_le: typing.Optional[dt.datetime] = None, - updated_at_gt: typing.Optional[dt.datetime] = None, - updated_at_lt: typing.Optional[dt.datetime] = None, - updated_at_ge: typing.Optional[dt.datetime] = None, - updated_at_le: typing.Optional[dt.datetime] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncPager[Log]: - """ - Parameters - ---------- - org_id : typing.Optional[str] - This is the unique identifier for the org that this log belongs to. - - type : typing.Optional[LogsGetRequestType] - This is the type of the log. - - assistant_id : typing.Optional[str] - This is the ID of the assistant. - - phone_number_id : typing.Optional[str] - This is the ID of the phone number. - - customer_id : typing.Optional[str] - This is the ID of the customer. - - squad_id : typing.Optional[str] - This is the ID of the squad. - - call_id : typing.Optional[str] - This is the ID of the call. - - page : typing.Optional[int] - This is the page number to return. Defaults to 1. - - sort_order : typing.Optional[LogsGetRequestSortOrder] - This is the sort order for pagination. Defaults to 'ASC'. - - limit : typing.Optional[float] - This is the maximum number of items to return. Defaults to 100. - - created_at_gt : typing.Optional[dt.datetime] - This will return items where the createdAt is greater than the specified value. - - created_at_lt : typing.Optional[dt.datetime] - This will return items where the createdAt is less than the specified value. - - created_at_ge : typing.Optional[dt.datetime] - This will return items where the createdAt is greater than or equal to the specified value. - - created_at_le : typing.Optional[dt.datetime] - This will return items where the createdAt is less than or equal to the specified value. - - updated_at_gt : typing.Optional[dt.datetime] - This will return items where the updatedAt is greater than the specified value. - - updated_at_lt : typing.Optional[dt.datetime] - This will return items where the updatedAt is less than the specified value. - - updated_at_ge : typing.Optional[dt.datetime] - This will return items where the updatedAt is greater than or equal to the specified value. - - updated_at_le : typing.Optional[dt.datetime] - This will return items where the updatedAt is less than or equal to the specified value. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncPager[Log] - - - Examples - -------- - import asyncio - - from vapi import AsyncVapi - - client = AsyncVapi( - token="YOUR_TOKEN", - ) - - - async def main() -> None: - response = await client.logs.get() - async for item in response: - yield item - # alternatively, you can paginate page-by-page - async for page in response.iter_pages(): - yield page - - - asyncio.run(main()) - """ - page = page if page is not None else 1 - _response = await self._client_wrapper.httpx_client.request( - "logs", - method="GET", - params={ - "orgId": org_id, - "type": type, - "assistantId": assistant_id, - "phoneNumberId": phone_number_id, - "customerId": customer_id, - "squadId": squad_id, - "callId": call_id, - "page": page, - "sortOrder": sort_order, - "limit": limit, - "createdAtGt": serialize_datetime(created_at_gt) if created_at_gt is not None else None, - "createdAtLt": serialize_datetime(created_at_lt) if created_at_lt is not None else None, - "createdAtGe": serialize_datetime(created_at_ge) if created_at_ge is not None else None, - "createdAtLe": serialize_datetime(created_at_le) if created_at_le is not None else None, - "updatedAtGt": serialize_datetime(updated_at_gt) if updated_at_gt is not None else None, - "updatedAtLt": serialize_datetime(updated_at_lt) if updated_at_lt is not None else None, - "updatedAtGe": serialize_datetime(updated_at_ge) if updated_at_ge is not None else None, - "updatedAtLe": serialize_datetime(updated_at_le) if updated_at_le is not None else None, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _parsed_response = typing.cast( - LogsPaginatedResponse, - parse_obj_as( - type_=LogsPaginatedResponse, # type: ignore - object_=_response.json(), - ), - ) - _has_next = True - _get_next = lambda: self.get( - org_id=org_id, - type=type, - assistant_id=assistant_id, - phone_number_id=phone_number_id, - customer_id=customer_id, - squad_id=squad_id, - call_id=call_id, - page=page + 1, - sort_order=sort_order, - limit=limit, - created_at_gt=created_at_gt, - created_at_lt=created_at_lt, - created_at_ge=created_at_ge, - created_at_le=created_at_le, - updated_at_gt=updated_at_gt, - updated_at_lt=updated_at_lt, - updated_at_ge=updated_at_ge, - updated_at_le=updated_at_le, - request_options=request_options, - ) - _items = _parsed_response.results - return AsyncPager(has_next=_has_next, items=_items, get_next=_get_next) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/src/vapi/logs/types/__init__.py b/src/vapi/logs/types/__init__.py deleted file mode 100644 index 58a9973f..00000000 --- a/src/vapi/logs/types/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from .logs_get_request_sort_order import LogsGetRequestSortOrder -from .logs_get_request_type import LogsGetRequestType - -__all__ = ["LogsGetRequestSortOrder", "LogsGetRequestType"] diff --git a/src/vapi/logs/types/logs_get_request_sort_order.py b/src/vapi/logs/types/logs_get_request_sort_order.py deleted file mode 100644 index a7531eb1..00000000 --- a/src/vapi/logs/types/logs_get_request_sort_order.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -LogsGetRequestSortOrder = typing.Union[typing.Literal["ASC", "DESC"], typing.Any] diff --git a/src/vapi/logs/types/logs_get_request_type.py b/src/vapi/logs/types/logs_get_request_type.py deleted file mode 100644 index 94c2502c..00000000 --- a/src/vapi/logs/types/logs_get_request_type.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -LogsGetRequestType = typing.Union[typing.Literal["API", "Webhook", "Call", "Provider"], typing.Any] diff --git a/src/vapi/observability_scorecard/__init__.py b/src/vapi/observability_scorecard/__init__.py new file mode 100644 index 00000000..5dddb700 --- /dev/null +++ b/src/vapi/observability_scorecard/__init__.py @@ -0,0 +1,34 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ScorecardControllerGetPaginatedRequestSortOrder +_dynamic_imports: typing.Dict[str, str] = {"ScorecardControllerGetPaginatedRequestSortOrder": ".types"} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = ["ScorecardControllerGetPaginatedRequestSortOrder"] diff --git a/src/vapi/observability_scorecard/client.py b/src/vapi/observability_scorecard/client.py new file mode 100644 index 00000000..158ada23 --- /dev/null +++ b/src/vapi/observability_scorecard/client.py @@ -0,0 +1,619 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.request_options import RequestOptions +from ..types.scorecard import Scorecard +from ..types.scorecard_metric import ScorecardMetric +from ..types.scorecard_paginated_response import ScorecardPaginatedResponse +from .raw_client import AsyncRawObservabilityScorecardClient, RawObservabilityScorecardClient +from .types.scorecard_controller_get_paginated_request_sort_order import ScorecardControllerGetPaginatedRequestSortOrder + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class ObservabilityScorecardClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawObservabilityScorecardClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawObservabilityScorecardClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawObservabilityScorecardClient + """ + return self._raw_client + + def scorecard_controller_get( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> Scorecard: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Scorecard + + + Examples + -------- + from vapi import Vapi + + client = Vapi( + token="YOUR_TOKEN", + ) + client.observability_scorecard.scorecard_controller_get( + id="id", + ) + """ + _response = self._raw_client.scorecard_controller_get(id, request_options=request_options) + return _response.data + + def scorecard_controller_remove( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> Scorecard: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Scorecard + + + Examples + -------- + from vapi import Vapi + + client = Vapi( + token="YOUR_TOKEN", + ) + client.observability_scorecard.scorecard_controller_remove( + id="id", + ) + """ + _response = self._raw_client.scorecard_controller_remove(id, request_options=request_options) + return _response.data + + def scorecard_controller_update( + self, + id: str, + *, + name: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + metrics: typing.Optional[typing.Sequence[ScorecardMetric]] = OMIT, + assistant_ids: typing.Optional[typing.Sequence[str]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> Scorecard: + """ + Parameters + ---------- + id : str + + name : typing.Optional[str] + This is the name of the scorecard. It is only for user reference and will not be used for any evaluation. + + description : typing.Optional[str] + This is the description of the scorecard. It is only for user reference and will not be used for any evaluation. + + metrics : typing.Optional[typing.Sequence[ScorecardMetric]] + These are the metrics that will be used to evaluate the scorecard. + Each metric will have a set of conditions and points that will be used to generate the score. + + assistant_ids : typing.Optional[typing.Sequence[str]] + These are the assistant IDs that this scorecard is linked to. + When linked to assistants, this scorecard will be available for evaluation during those assistants' calls. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Scorecard + + + Examples + -------- + from vapi import Vapi + + client = Vapi( + token="YOUR_TOKEN", + ) + client.observability_scorecard.scorecard_controller_update( + id="id", + ) + """ + _response = self._raw_client.scorecard_controller_update( + id, + name=name, + description=description, + metrics=metrics, + assistant_ids=assistant_ids, + request_options=request_options, + ) + return _response.data + + def scorecard_controller_get_paginated( + self, + *, + id: typing.Optional[str] = None, + page: typing.Optional[float] = None, + sort_order: typing.Optional[ScorecardControllerGetPaginatedRequestSortOrder] = None, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> ScorecardPaginatedResponse: + """ + Parameters + ---------- + id : typing.Optional[str] + + page : typing.Optional[float] + This is the page number to return. Defaults to 1. + + sort_order : typing.Optional[ScorecardControllerGetPaginatedRequestSortOrder] + This is the sort order for pagination. Defaults to 'DESC'. + + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ScorecardPaginatedResponse + + + Examples + -------- + from vapi import Vapi + + client = Vapi( + token="YOUR_TOKEN", + ) + client.observability_scorecard.scorecard_controller_get_paginated() + """ + _response = self._raw_client.scorecard_controller_get_paginated( + id=id, + page=page, + sort_order=sort_order, + limit=limit, + created_at_gt=created_at_gt, + created_at_lt=created_at_lt, + created_at_ge=created_at_ge, + created_at_le=created_at_le, + updated_at_gt=updated_at_gt, + updated_at_lt=updated_at_lt, + updated_at_ge=updated_at_ge, + updated_at_le=updated_at_le, + request_options=request_options, + ) + return _response.data + + def scorecard_controller_create( + self, + *, + metrics: typing.Sequence[ScorecardMetric], + name: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + assistant_ids: typing.Optional[typing.Sequence[str]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> Scorecard: + """ + Parameters + ---------- + metrics : typing.Sequence[ScorecardMetric] + These are the metrics that will be used to evaluate the scorecard. + Each metric will have a set of conditions and points that will be used to generate the score. + + name : typing.Optional[str] + This is the name of the scorecard. It is only for user reference and will not be used for any evaluation. + + description : typing.Optional[str] + This is the description of the scorecard. It is only for user reference and will not be used for any evaluation. + + assistant_ids : typing.Optional[typing.Sequence[str]] + These are the assistant IDs that this scorecard is linked to. + When linked to assistants, this scorecard will be available for evaluation during those assistants' calls. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Scorecard + + + Examples + -------- + from vapi import ScorecardMetric, Vapi + + client = Vapi( + token="YOUR_TOKEN", + ) + client.observability_scorecard.scorecard_controller_create( + metrics=[ + ScorecardMetric( + structured_output_id="structuredOutputId", + conditions=[{"key": "value"}], + ) + ], + ) + """ + _response = self._raw_client.scorecard_controller_create( + metrics=metrics, + name=name, + description=description, + assistant_ids=assistant_ids, + request_options=request_options, + ) + return _response.data + + +class AsyncObservabilityScorecardClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawObservabilityScorecardClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawObservabilityScorecardClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawObservabilityScorecardClient + """ + return self._raw_client + + async def scorecard_controller_get( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> Scorecard: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Scorecard + + + Examples + -------- + import asyncio + + from vapi import AsyncVapi + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.observability_scorecard.scorecard_controller_get( + id="id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.scorecard_controller_get(id, request_options=request_options) + return _response.data + + async def scorecard_controller_remove( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> Scorecard: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Scorecard + + + Examples + -------- + import asyncio + + from vapi import AsyncVapi + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.observability_scorecard.scorecard_controller_remove( + id="id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.scorecard_controller_remove(id, request_options=request_options) + return _response.data + + async def scorecard_controller_update( + self, + id: str, + *, + name: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + metrics: typing.Optional[typing.Sequence[ScorecardMetric]] = OMIT, + assistant_ids: typing.Optional[typing.Sequence[str]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> Scorecard: + """ + Parameters + ---------- + id : str + + name : typing.Optional[str] + This is the name of the scorecard. It is only for user reference and will not be used for any evaluation. + + description : typing.Optional[str] + This is the description of the scorecard. It is only for user reference and will not be used for any evaluation. + + metrics : typing.Optional[typing.Sequence[ScorecardMetric]] + These are the metrics that will be used to evaluate the scorecard. + Each metric will have a set of conditions and points that will be used to generate the score. + + assistant_ids : typing.Optional[typing.Sequence[str]] + These are the assistant IDs that this scorecard is linked to. + When linked to assistants, this scorecard will be available for evaluation during those assistants' calls. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Scorecard + + + Examples + -------- + import asyncio + + from vapi import AsyncVapi + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.observability_scorecard.scorecard_controller_update( + id="id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.scorecard_controller_update( + id, + name=name, + description=description, + metrics=metrics, + assistant_ids=assistant_ids, + request_options=request_options, + ) + return _response.data + + async def scorecard_controller_get_paginated( + self, + *, + id: typing.Optional[str] = None, + page: typing.Optional[float] = None, + sort_order: typing.Optional[ScorecardControllerGetPaginatedRequestSortOrder] = None, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> ScorecardPaginatedResponse: + """ + Parameters + ---------- + id : typing.Optional[str] + + page : typing.Optional[float] + This is the page number to return. Defaults to 1. + + sort_order : typing.Optional[ScorecardControllerGetPaginatedRequestSortOrder] + This is the sort order for pagination. Defaults to 'DESC'. + + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ScorecardPaginatedResponse + + + Examples + -------- + import asyncio + + from vapi import AsyncVapi + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.observability_scorecard.scorecard_controller_get_paginated() + + + asyncio.run(main()) + """ + _response = await self._raw_client.scorecard_controller_get_paginated( + id=id, + page=page, + sort_order=sort_order, + limit=limit, + created_at_gt=created_at_gt, + created_at_lt=created_at_lt, + created_at_ge=created_at_ge, + created_at_le=created_at_le, + updated_at_gt=updated_at_gt, + updated_at_lt=updated_at_lt, + updated_at_ge=updated_at_ge, + updated_at_le=updated_at_le, + request_options=request_options, + ) + return _response.data + + async def scorecard_controller_create( + self, + *, + metrics: typing.Sequence[ScorecardMetric], + name: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + assistant_ids: typing.Optional[typing.Sequence[str]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> Scorecard: + """ + Parameters + ---------- + metrics : typing.Sequence[ScorecardMetric] + These are the metrics that will be used to evaluate the scorecard. + Each metric will have a set of conditions and points that will be used to generate the score. + + name : typing.Optional[str] + This is the name of the scorecard. It is only for user reference and will not be used for any evaluation. + + description : typing.Optional[str] + This is the description of the scorecard. It is only for user reference and will not be used for any evaluation. + + assistant_ids : typing.Optional[typing.Sequence[str]] + These are the assistant IDs that this scorecard is linked to. + When linked to assistants, this scorecard will be available for evaluation during those assistants' calls. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Scorecard + + + Examples + -------- + import asyncio + + from vapi import AsyncVapi, ScorecardMetric + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.observability_scorecard.scorecard_controller_create( + metrics=[ + ScorecardMetric( + structured_output_id="structuredOutputId", + conditions=[{"key": "value"}], + ) + ], + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.scorecard_controller_create( + metrics=metrics, + name=name, + description=description, + assistant_ids=assistant_ids, + request_options=request_options, + ) + return _response.data diff --git a/src/vapi/observability_scorecard/raw_client.py b/src/vapi/observability_scorecard/raw_client.py new file mode 100644 index 00000000..46eddd6c --- /dev/null +++ b/src/vapi/observability_scorecard/raw_client.py @@ -0,0 +1,675 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing +from json.decoder import JSONDecodeError + +from ..core.api_error import ApiError +from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.datetime_utils import serialize_datetime +from ..core.http_response import AsyncHttpResponse, HttpResponse +from ..core.jsonable_encoder import jsonable_encoder +from ..core.parse_error import ParsingError +from ..core.request_options import RequestOptions +from ..core.serialization import convert_and_respect_annotation_metadata +from ..core.unchecked_base_model import construct_type +from ..types.scorecard import Scorecard +from ..types.scorecard_metric import ScorecardMetric +from ..types.scorecard_paginated_response import ScorecardPaginatedResponse +from .types.scorecard_controller_get_paginated_request_sort_order import ScorecardControllerGetPaginatedRequestSortOrder +from pydantic import ValidationError + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class RawObservabilityScorecardClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def scorecard_controller_get( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[Scorecard]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[Scorecard] + + """ + _response = self._client_wrapper.httpx_client.request( + f"observability/scorecard/{jsonable_encoder(id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Scorecard, + construct_type( + type_=Scorecard, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def scorecard_controller_remove( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[Scorecard]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[Scorecard] + + """ + _response = self._client_wrapper.httpx_client.request( + f"observability/scorecard/{jsonable_encoder(id)}", + method="DELETE", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Scorecard, + construct_type( + type_=Scorecard, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def scorecard_controller_update( + self, + id: str, + *, + name: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + metrics: typing.Optional[typing.Sequence[ScorecardMetric]] = OMIT, + assistant_ids: typing.Optional[typing.Sequence[str]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[Scorecard]: + """ + Parameters + ---------- + id : str + + name : typing.Optional[str] + This is the name of the scorecard. It is only for user reference and will not be used for any evaluation. + + description : typing.Optional[str] + This is the description of the scorecard. It is only for user reference and will not be used for any evaluation. + + metrics : typing.Optional[typing.Sequence[ScorecardMetric]] + These are the metrics that will be used to evaluate the scorecard. + Each metric will have a set of conditions and points that will be used to generate the score. + + assistant_ids : typing.Optional[typing.Sequence[str]] + These are the assistant IDs that this scorecard is linked to. + When linked to assistants, this scorecard will be available for evaluation during those assistants' calls. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[Scorecard] + + """ + _response = self._client_wrapper.httpx_client.request( + f"observability/scorecard/{jsonable_encoder(id)}", + method="PATCH", + json={ + "name": name, + "description": description, + "metrics": convert_and_respect_annotation_metadata( + object_=metrics, annotation=typing.Sequence[ScorecardMetric], direction="write" + ), + "assistantIds": assistant_ids, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Scorecard, + construct_type( + type_=Scorecard, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def scorecard_controller_get_paginated( + self, + *, + id: typing.Optional[str] = None, + page: typing.Optional[float] = None, + sort_order: typing.Optional[ScorecardControllerGetPaginatedRequestSortOrder] = None, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[ScorecardPaginatedResponse]: + """ + Parameters + ---------- + id : typing.Optional[str] + + page : typing.Optional[float] + This is the page number to return. Defaults to 1. + + sort_order : typing.Optional[ScorecardControllerGetPaginatedRequestSortOrder] + This is the sort order for pagination. Defaults to 'DESC'. + + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[ScorecardPaginatedResponse] + + """ + _response = self._client_wrapper.httpx_client.request( + "observability/scorecard", + method="GET", + params={ + "id": id, + "page": page, + "sortOrder": sort_order, + "limit": limit, + "createdAtGt": serialize_datetime(created_at_gt) if created_at_gt is not None else None, + "createdAtLt": serialize_datetime(created_at_lt) if created_at_lt is not None else None, + "createdAtGe": serialize_datetime(created_at_ge) if created_at_ge is not None else None, + "createdAtLe": serialize_datetime(created_at_le) if created_at_le is not None else None, + "updatedAtGt": serialize_datetime(updated_at_gt) if updated_at_gt is not None else None, + "updatedAtLt": serialize_datetime(updated_at_lt) if updated_at_lt is not None else None, + "updatedAtGe": serialize_datetime(updated_at_ge) if updated_at_ge is not None else None, + "updatedAtLe": serialize_datetime(updated_at_le) if updated_at_le is not None else None, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ScorecardPaginatedResponse, + construct_type( + type_=ScorecardPaginatedResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def scorecard_controller_create( + self, + *, + metrics: typing.Sequence[ScorecardMetric], + name: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + assistant_ids: typing.Optional[typing.Sequence[str]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[Scorecard]: + """ + Parameters + ---------- + metrics : typing.Sequence[ScorecardMetric] + These are the metrics that will be used to evaluate the scorecard. + Each metric will have a set of conditions and points that will be used to generate the score. + + name : typing.Optional[str] + This is the name of the scorecard. It is only for user reference and will not be used for any evaluation. + + description : typing.Optional[str] + This is the description of the scorecard. It is only for user reference and will not be used for any evaluation. + + assistant_ids : typing.Optional[typing.Sequence[str]] + These are the assistant IDs that this scorecard is linked to. + When linked to assistants, this scorecard will be available for evaluation during those assistants' calls. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[Scorecard] + + """ + _response = self._client_wrapper.httpx_client.request( + "observability/scorecard", + method="POST", + json={ + "name": name, + "description": description, + "metrics": convert_and_respect_annotation_metadata( + object_=metrics, annotation=typing.Sequence[ScorecardMetric], direction="write" + ), + "assistantIds": assistant_ids, + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Scorecard, + construct_type( + type_=Scorecard, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawObservabilityScorecardClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def scorecard_controller_get( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[Scorecard]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[Scorecard] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"observability/scorecard/{jsonable_encoder(id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Scorecard, + construct_type( + type_=Scorecard, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def scorecard_controller_remove( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[Scorecard]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[Scorecard] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"observability/scorecard/{jsonable_encoder(id)}", + method="DELETE", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Scorecard, + construct_type( + type_=Scorecard, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def scorecard_controller_update( + self, + id: str, + *, + name: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + metrics: typing.Optional[typing.Sequence[ScorecardMetric]] = OMIT, + assistant_ids: typing.Optional[typing.Sequence[str]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[Scorecard]: + """ + Parameters + ---------- + id : str + + name : typing.Optional[str] + This is the name of the scorecard. It is only for user reference and will not be used for any evaluation. + + description : typing.Optional[str] + This is the description of the scorecard. It is only for user reference and will not be used for any evaluation. + + metrics : typing.Optional[typing.Sequence[ScorecardMetric]] + These are the metrics that will be used to evaluate the scorecard. + Each metric will have a set of conditions and points that will be used to generate the score. + + assistant_ids : typing.Optional[typing.Sequence[str]] + These are the assistant IDs that this scorecard is linked to. + When linked to assistants, this scorecard will be available for evaluation during those assistants' calls. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[Scorecard] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"observability/scorecard/{jsonable_encoder(id)}", + method="PATCH", + json={ + "name": name, + "description": description, + "metrics": convert_and_respect_annotation_metadata( + object_=metrics, annotation=typing.Sequence[ScorecardMetric], direction="write" + ), + "assistantIds": assistant_ids, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Scorecard, + construct_type( + type_=Scorecard, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def scorecard_controller_get_paginated( + self, + *, + id: typing.Optional[str] = None, + page: typing.Optional[float] = None, + sort_order: typing.Optional[ScorecardControllerGetPaginatedRequestSortOrder] = None, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[ScorecardPaginatedResponse]: + """ + Parameters + ---------- + id : typing.Optional[str] + + page : typing.Optional[float] + This is the page number to return. Defaults to 1. + + sort_order : typing.Optional[ScorecardControllerGetPaginatedRequestSortOrder] + This is the sort order for pagination. Defaults to 'DESC'. + + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[ScorecardPaginatedResponse] + + """ + _response = await self._client_wrapper.httpx_client.request( + "observability/scorecard", + method="GET", + params={ + "id": id, + "page": page, + "sortOrder": sort_order, + "limit": limit, + "createdAtGt": serialize_datetime(created_at_gt) if created_at_gt is not None else None, + "createdAtLt": serialize_datetime(created_at_lt) if created_at_lt is not None else None, + "createdAtGe": serialize_datetime(created_at_ge) if created_at_ge is not None else None, + "createdAtLe": serialize_datetime(created_at_le) if created_at_le is not None else None, + "updatedAtGt": serialize_datetime(updated_at_gt) if updated_at_gt is not None else None, + "updatedAtLt": serialize_datetime(updated_at_lt) if updated_at_lt is not None else None, + "updatedAtGe": serialize_datetime(updated_at_ge) if updated_at_ge is not None else None, + "updatedAtLe": serialize_datetime(updated_at_le) if updated_at_le is not None else None, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ScorecardPaginatedResponse, + construct_type( + type_=ScorecardPaginatedResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def scorecard_controller_create( + self, + *, + metrics: typing.Sequence[ScorecardMetric], + name: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + assistant_ids: typing.Optional[typing.Sequence[str]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[Scorecard]: + """ + Parameters + ---------- + metrics : typing.Sequence[ScorecardMetric] + These are the metrics that will be used to evaluate the scorecard. + Each metric will have a set of conditions and points that will be used to generate the score. + + name : typing.Optional[str] + This is the name of the scorecard. It is only for user reference and will not be used for any evaluation. + + description : typing.Optional[str] + This is the description of the scorecard. It is only for user reference and will not be used for any evaluation. + + assistant_ids : typing.Optional[typing.Sequence[str]] + These are the assistant IDs that this scorecard is linked to. + When linked to assistants, this scorecard will be available for evaluation during those assistants' calls. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[Scorecard] + + """ + _response = await self._client_wrapper.httpx_client.request( + "observability/scorecard", + method="POST", + json={ + "name": name, + "description": description, + "metrics": convert_and_respect_annotation_metadata( + object_=metrics, annotation=typing.Sequence[ScorecardMetric], direction="write" + ), + "assistantIds": assistant_ids, + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Scorecard, + construct_type( + type_=Scorecard, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/vapi/observability_scorecard/types/__init__.py b/src/vapi/observability_scorecard/types/__init__.py new file mode 100644 index 00000000..91bedfb9 --- /dev/null +++ b/src/vapi/observability_scorecard/types/__init__.py @@ -0,0 +1,36 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .scorecard_controller_get_paginated_request_sort_order import ScorecardControllerGetPaginatedRequestSortOrder +_dynamic_imports: typing.Dict[str, str] = { + "ScorecardControllerGetPaginatedRequestSortOrder": ".scorecard_controller_get_paginated_request_sort_order" +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = ["ScorecardControllerGetPaginatedRequestSortOrder"] diff --git a/src/vapi/observability_scorecard/types/scorecard_controller_get_paginated_request_sort_order.py b/src/vapi/observability_scorecard/types/scorecard_controller_get_paginated_request_sort_order.py new file mode 100644 index 00000000..bbafc8a6 --- /dev/null +++ b/src/vapi/observability_scorecard/types/scorecard_controller_get_paginated_request_sort_order.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ScorecardControllerGetPaginatedRequestSortOrder = typing.Union[typing.Literal["ASC", "DESC"], typing.Any] diff --git a/src/vapi/phone_numbers/__init__.py b/src/vapi/phone_numbers/__init__.py index ee732107..f720a37c 100644 --- a/src/vapi/phone_numbers/__init__.py +++ b/src/vapi/phone_numbers/__init__.py @@ -1,21 +1,166 @@ # This file was auto-generated by Fern from our API Definition. -from .types import ( - PhoneNumbersCreateRequest, - PhoneNumbersCreateResponse, - PhoneNumbersDeleteResponse, - PhoneNumbersGetResponse, - PhoneNumbersListResponseItem, - PhoneNumbersUpdateResponse, - UpdatePhoneNumberDtoFallbackDestination, -) +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ( + CreatePhoneNumbersRequest, + CreatePhoneNumbersRequest_ByoPhoneNumber, + CreatePhoneNumbersRequest_Telnyx, + CreatePhoneNumbersRequest_Twilio, + CreatePhoneNumbersRequest_Vapi, + CreatePhoneNumbersRequest_Vonage, + CreatePhoneNumbersResponse, + CreatePhoneNumbersResponse_ByoPhoneNumber, + CreatePhoneNumbersResponse_Telnyx, + CreatePhoneNumbersResponse_Twilio, + CreatePhoneNumbersResponse_Vapi, + CreatePhoneNumbersResponse_Vonage, + DeletePhoneNumbersResponse, + DeletePhoneNumbersResponse_ByoPhoneNumber, + DeletePhoneNumbersResponse_Telnyx, + DeletePhoneNumbersResponse_Twilio, + DeletePhoneNumbersResponse_Vapi, + DeletePhoneNumbersResponse_Vonage, + GetPhoneNumbersResponse, + GetPhoneNumbersResponse_ByoPhoneNumber, + GetPhoneNumbersResponse_Telnyx, + GetPhoneNumbersResponse_Twilio, + GetPhoneNumbersResponse_Vapi, + GetPhoneNumbersResponse_Vonage, + ListPhoneNumbersResponseItem, + ListPhoneNumbersResponseItem_ByoPhoneNumber, + ListPhoneNumbersResponseItem_Telnyx, + ListPhoneNumbersResponseItem_Twilio, + ListPhoneNumbersResponseItem_Vapi, + ListPhoneNumbersResponseItem_Vonage, + PhoneNumberControllerFindAllPaginatedRequestSortOrder, + UpdatePhoneNumbersRequestBody, + UpdatePhoneNumbersRequestBody_ByoPhoneNumber, + UpdatePhoneNumbersRequestBody_Telnyx, + UpdatePhoneNumbersRequestBody_Twilio, + UpdatePhoneNumbersRequestBody_Vapi, + UpdatePhoneNumbersRequestBody_Vonage, + UpdatePhoneNumbersResponse, + UpdatePhoneNumbersResponse_ByoPhoneNumber, + UpdatePhoneNumbersResponse_Telnyx, + UpdatePhoneNumbersResponse_Twilio, + UpdatePhoneNumbersResponse_Vapi, + UpdatePhoneNumbersResponse_Vonage, + ) +_dynamic_imports: typing.Dict[str, str] = { + "CreatePhoneNumbersRequest": ".types", + "CreatePhoneNumbersRequest_ByoPhoneNumber": ".types", + "CreatePhoneNumbersRequest_Telnyx": ".types", + "CreatePhoneNumbersRequest_Twilio": ".types", + "CreatePhoneNumbersRequest_Vapi": ".types", + "CreatePhoneNumbersRequest_Vonage": ".types", + "CreatePhoneNumbersResponse": ".types", + "CreatePhoneNumbersResponse_ByoPhoneNumber": ".types", + "CreatePhoneNumbersResponse_Telnyx": ".types", + "CreatePhoneNumbersResponse_Twilio": ".types", + "CreatePhoneNumbersResponse_Vapi": ".types", + "CreatePhoneNumbersResponse_Vonage": ".types", + "DeletePhoneNumbersResponse": ".types", + "DeletePhoneNumbersResponse_ByoPhoneNumber": ".types", + "DeletePhoneNumbersResponse_Telnyx": ".types", + "DeletePhoneNumbersResponse_Twilio": ".types", + "DeletePhoneNumbersResponse_Vapi": ".types", + "DeletePhoneNumbersResponse_Vonage": ".types", + "GetPhoneNumbersResponse": ".types", + "GetPhoneNumbersResponse_ByoPhoneNumber": ".types", + "GetPhoneNumbersResponse_Telnyx": ".types", + "GetPhoneNumbersResponse_Twilio": ".types", + "GetPhoneNumbersResponse_Vapi": ".types", + "GetPhoneNumbersResponse_Vonage": ".types", + "ListPhoneNumbersResponseItem": ".types", + "ListPhoneNumbersResponseItem_ByoPhoneNumber": ".types", + "ListPhoneNumbersResponseItem_Telnyx": ".types", + "ListPhoneNumbersResponseItem_Twilio": ".types", + "ListPhoneNumbersResponseItem_Vapi": ".types", + "ListPhoneNumbersResponseItem_Vonage": ".types", + "PhoneNumberControllerFindAllPaginatedRequestSortOrder": ".types", + "UpdatePhoneNumbersRequestBody": ".types", + "UpdatePhoneNumbersRequestBody_ByoPhoneNumber": ".types", + "UpdatePhoneNumbersRequestBody_Telnyx": ".types", + "UpdatePhoneNumbersRequestBody_Twilio": ".types", + "UpdatePhoneNumbersRequestBody_Vapi": ".types", + "UpdatePhoneNumbersRequestBody_Vonage": ".types", + "UpdatePhoneNumbersResponse": ".types", + "UpdatePhoneNumbersResponse_ByoPhoneNumber": ".types", + "UpdatePhoneNumbersResponse_Telnyx": ".types", + "UpdatePhoneNumbersResponse_Twilio": ".types", + "UpdatePhoneNumbersResponse_Vapi": ".types", + "UpdatePhoneNumbersResponse_Vonage": ".types", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ - "PhoneNumbersCreateRequest", - "PhoneNumbersCreateResponse", - "PhoneNumbersDeleteResponse", - "PhoneNumbersGetResponse", - "PhoneNumbersListResponseItem", - "PhoneNumbersUpdateResponse", - "UpdatePhoneNumberDtoFallbackDestination", + "CreatePhoneNumbersRequest", + "CreatePhoneNumbersRequest_ByoPhoneNumber", + "CreatePhoneNumbersRequest_Telnyx", + "CreatePhoneNumbersRequest_Twilio", + "CreatePhoneNumbersRequest_Vapi", + "CreatePhoneNumbersRequest_Vonage", + "CreatePhoneNumbersResponse", + "CreatePhoneNumbersResponse_ByoPhoneNumber", + "CreatePhoneNumbersResponse_Telnyx", + "CreatePhoneNumbersResponse_Twilio", + "CreatePhoneNumbersResponse_Vapi", + "CreatePhoneNumbersResponse_Vonage", + "DeletePhoneNumbersResponse", + "DeletePhoneNumbersResponse_ByoPhoneNumber", + "DeletePhoneNumbersResponse_Telnyx", + "DeletePhoneNumbersResponse_Twilio", + "DeletePhoneNumbersResponse_Vapi", + "DeletePhoneNumbersResponse_Vonage", + "GetPhoneNumbersResponse", + "GetPhoneNumbersResponse_ByoPhoneNumber", + "GetPhoneNumbersResponse_Telnyx", + "GetPhoneNumbersResponse_Twilio", + "GetPhoneNumbersResponse_Vapi", + "GetPhoneNumbersResponse_Vonage", + "ListPhoneNumbersResponseItem", + "ListPhoneNumbersResponseItem_ByoPhoneNumber", + "ListPhoneNumbersResponseItem_Telnyx", + "ListPhoneNumbersResponseItem_Twilio", + "ListPhoneNumbersResponseItem_Vapi", + "ListPhoneNumbersResponseItem_Vonage", + "PhoneNumberControllerFindAllPaginatedRequestSortOrder", + "UpdatePhoneNumbersRequestBody", + "UpdatePhoneNumbersRequestBody_ByoPhoneNumber", + "UpdatePhoneNumbersRequestBody_Telnyx", + "UpdatePhoneNumbersRequestBody_Twilio", + "UpdatePhoneNumbersRequestBody_Vapi", + "UpdatePhoneNumbersRequestBody_Vonage", + "UpdatePhoneNumbersResponse", + "UpdatePhoneNumbersResponse_ByoPhoneNumber", + "UpdatePhoneNumbersResponse_Telnyx", + "UpdatePhoneNumbersResponse_Twilio", + "UpdatePhoneNumbersResponse_Vapi", + "UpdatePhoneNumbersResponse_Vonage", ] diff --git a/src/vapi/phone_numbers/client.py b/src/vapi/phone_numbers/client.py index c1250c0b..8745d92d 100644 --- a/src/vapi/phone_numbers/client.py +++ b/src/vapi/phone_numbers/client.py @@ -1,23 +1,22 @@ # This file was auto-generated by Fern from our API Definition. -import typing -from ..core.client_wrapper import SyncClientWrapper import datetime as dt +import typing + +from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ..core.request_options import RequestOptions -from .types.phone_numbers_list_response_item import PhoneNumbersListResponseItem -from ..core.datetime_utils import serialize_datetime -from ..core.pydantic_utilities import parse_obj_as -from json.decoder import JSONDecodeError -from ..core.api_error import ApiError -from .types.phone_numbers_create_request import PhoneNumbersCreateRequest -from .types.phone_numbers_create_response import PhoneNumbersCreateResponse -from ..core.serialization import convert_and_respect_annotation_metadata -from .types.phone_numbers_get_response import PhoneNumbersGetResponse -from ..core.jsonable_encoder import jsonable_encoder -from .types.phone_numbers_delete_response import PhoneNumbersDeleteResponse -from .types.update_phone_number_dto_fallback_destination import UpdatePhoneNumberDtoFallbackDestination -from .types.phone_numbers_update_response import PhoneNumbersUpdateResponse -from ..core.client_wrapper import AsyncClientWrapper +from ..types.phone_number_paginated_response import PhoneNumberPaginatedResponse +from .raw_client import AsyncRawPhoneNumbersClient, RawPhoneNumbersClient +from .types.create_phone_numbers_request import CreatePhoneNumbersRequest +from .types.create_phone_numbers_response import CreatePhoneNumbersResponse +from .types.delete_phone_numbers_response import DeletePhoneNumbersResponse +from .types.get_phone_numbers_response import GetPhoneNumbersResponse +from .types.list_phone_numbers_response_item import ListPhoneNumbersResponseItem +from .types.phone_number_controller_find_all_paginated_request_sort_order import ( + PhoneNumberControllerFindAllPaginatedRequestSortOrder, +) +from .types.update_phone_numbers_request_body import UpdatePhoneNumbersRequestBody +from .types.update_phone_numbers_response import UpdatePhoneNumbersResponse # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -25,7 +24,18 @@ class PhoneNumbersClient: def __init__(self, *, client_wrapper: SyncClientWrapper): - self._client_wrapper = client_wrapper + self._raw_client = RawPhoneNumbersClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawPhoneNumbersClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawPhoneNumbersClient + """ + return self._raw_client def list( self, @@ -40,7 +50,7 @@ def list( updated_at_ge: typing.Optional[dt.datetime] = None, updated_at_le: typing.Optional[dt.datetime] = None, request_options: typing.Optional[RequestOptions] = None, - ) -> typing.List[PhoneNumbersListResponseItem]: + ) -> typing.List[ListPhoneNumbersResponseItem]: """ Parameters ---------- @@ -76,7 +86,7 @@ def list( Returns ------- - typing.List[PhoneNumbersListResponseItem] + typing.List[ListPhoneNumbersResponseItem] Examples @@ -88,89 +98,144 @@ def list( ) client.phone_numbers.list() """ - _response = self._client_wrapper.httpx_client.request( - "phone-number", - method="GET", - params={ - "limit": limit, - "createdAtGt": serialize_datetime(created_at_gt) if created_at_gt is not None else None, - "createdAtLt": serialize_datetime(created_at_lt) if created_at_lt is not None else None, - "createdAtGe": serialize_datetime(created_at_ge) if created_at_ge is not None else None, - "createdAtLe": serialize_datetime(created_at_le) if created_at_le is not None else None, - "updatedAtGt": serialize_datetime(updated_at_gt) if updated_at_gt is not None else None, - "updatedAtLt": serialize_datetime(updated_at_lt) if updated_at_lt is not None else None, - "updatedAtGe": serialize_datetime(updated_at_ge) if updated_at_ge is not None else None, - "updatedAtLe": serialize_datetime(updated_at_le) if updated_at_le is not None else None, - }, + _response = self._raw_client.list( + limit=limit, + created_at_gt=created_at_gt, + created_at_lt=created_at_lt, + created_at_ge=created_at_ge, + created_at_le=created_at_le, + updated_at_gt=updated_at_gt, + updated_at_lt=updated_at_lt, + updated_at_ge=updated_at_ge, + updated_at_le=updated_at_le, request_options=request_options, ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - typing.List[PhoneNumbersListResponseItem], - parse_obj_as( - type_=typing.List[PhoneNumbersListResponseItem], # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + return _response.data def create( - self, *, request: PhoneNumbersCreateRequest, request_options: typing.Optional[RequestOptions] = None - ) -> PhoneNumbersCreateResponse: + self, *, request: CreatePhoneNumbersRequest, request_options: typing.Optional[RequestOptions] = None + ) -> CreatePhoneNumbersResponse: """ Parameters ---------- - request : PhoneNumbersCreateRequest + request : CreatePhoneNumbersRequest request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - PhoneNumbersCreateResponse + CreatePhoneNumbersResponse Examples -------- - from vapi import CreateByoPhoneNumberDto, Vapi + from vapi import Vapi + from vapi.phone_numbers import CreatePhoneNumbersRequest_ByoPhoneNumber client = Vapi( token="YOUR_TOKEN", ) client.phone_numbers.create( - request=CreateByoPhoneNumberDto( + request=CreatePhoneNumbersRequest_ByoPhoneNumber( credential_id="credentialId", ), ) """ - _response = self._client_wrapper.httpx_client.request( - "phone-number", - method="POST", - json=convert_and_respect_annotation_metadata( - object_=request, annotation=PhoneNumbersCreateRequest, direction="write" - ), + _response = self._raw_client.create(request=request, request_options=request_options) + return _response.data + + def phone_number_controller_find_all_paginated( + self, + *, + search: typing.Optional[str] = None, + page: typing.Optional[float] = None, + sort_order: typing.Optional[PhoneNumberControllerFindAllPaginatedRequestSortOrder] = None, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> PhoneNumberPaginatedResponse: + """ + Parameters + ---------- + search : typing.Optional[str] + This will search phone numbers by name, number, or SIP URI (partial match, case-insensitive). + + page : typing.Optional[float] + This is the page number to return. Defaults to 1. + + sort_order : typing.Optional[PhoneNumberControllerFindAllPaginatedRequestSortOrder] + This is the sort order for pagination. Defaults to 'DESC'. + + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + PhoneNumberPaginatedResponse + + + Examples + -------- + from vapi import Vapi + + client = Vapi( + token="YOUR_TOKEN", + ) + client.phone_numbers.phone_number_controller_find_all_paginated() + """ + _response = self._raw_client.phone_number_controller_find_all_paginated( + search=search, + page=page, + sort_order=sort_order, + limit=limit, + created_at_gt=created_at_gt, + created_at_lt=created_at_lt, + created_at_ge=created_at_ge, + created_at_le=created_at_le, + updated_at_gt=updated_at_gt, + updated_at_lt=updated_at_lt, + updated_at_ge=updated_at_ge, + updated_at_le=updated_at_le, request_options=request_options, - omit=OMIT, ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - PhoneNumbersCreateResponse, - parse_obj_as( - type_=PhoneNumbersCreateResponse, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> PhoneNumbersGetResponse: + return _response.data + + def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> GetPhoneNumbersResponse: """ Parameters ---------- @@ -181,7 +246,7 @@ def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = Non Returns ------- - PhoneNumbersGetResponse + GetPhoneNumbersResponse Examples @@ -195,26 +260,10 @@ def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = Non id="id", ) """ - _response = self._client_wrapper.httpx_client.request( - f"phone-number/{jsonable_encoder(id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - PhoneNumbersGetResponse, - parse_obj_as( - type_=PhoneNumbersGetResponse, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> PhoneNumbersDeleteResponse: + _response = self._raw_client.get(id, request_options=request_options) + return _response.data + + def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> DeletePhoneNumbersResponse: """ Parameters ---------- @@ -225,7 +274,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = Returns ------- - PhoneNumbersDeleteResponse + DeletePhoneNumbersResponse Examples @@ -239,128 +288,62 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = id="id", ) """ - _response = self._client_wrapper.httpx_client.request( - f"phone-number/{jsonable_encoder(id)}", - method="DELETE", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - PhoneNumbersDeleteResponse, - parse_obj_as( - type_=PhoneNumbersDeleteResponse, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = self._raw_client.delete(id, request_options=request_options) + return _response.data def update( self, id: str, *, - fallback_destination: typing.Optional[UpdatePhoneNumberDtoFallbackDestination] = OMIT, - name: typing.Optional[str] = OMIT, - assistant_id: typing.Optional[str] = OMIT, - squad_id: typing.Optional[str] = OMIT, - server_url: typing.Optional[str] = OMIT, - server_url_secret: typing.Optional[str] = OMIT, + request: UpdatePhoneNumbersRequestBody, request_options: typing.Optional[RequestOptions] = None, - ) -> PhoneNumbersUpdateResponse: + ) -> UpdatePhoneNumbersResponse: """ Parameters ---------- id : str - fallback_destination : typing.Optional[UpdatePhoneNumberDtoFallbackDestination] - This is the fallback destination an inbound call will be transferred to if: - 1. `assistantId` is not set - 2. `squadId` is not set - 3. and, `assistant-request` message to the `serverUrl` fails - - If this is not set and above conditions are met, the inbound call is hung up with an error message. - - name : typing.Optional[str] - This is the name of the phone number. This is just for your own reference. - - assistant_id : typing.Optional[str] - This is the assistant that will be used for incoming calls to this phone number. - - If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected. - - squad_id : typing.Optional[str] - This is the squad that will be used for incoming calls to this phone number. - - If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected. - - server_url : typing.Optional[str] - This is the server URL where messages will be sent for calls on this number. This includes the `assistant-request` message. - - You can see the shape of the messages sent in `ServerMessage`. - - This overrides the `org.serverUrl`. Order of precedence: tool.server.url > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl. - - server_url_secret : typing.Optional[str] - This is the secret Vapi will send with every message to your server. It's sent as a header called x-vapi-secret. - - Same precedence logic as serverUrl. + request : UpdatePhoneNumbersRequestBody request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - PhoneNumbersUpdateResponse + UpdatePhoneNumbersResponse Examples -------- from vapi import Vapi + from vapi.phone_numbers import UpdatePhoneNumbersRequestBody_ByoPhoneNumber client = Vapi( token="YOUR_TOKEN", ) client.phone_numbers.update( id="id", + request=UpdatePhoneNumbersRequestBody_ByoPhoneNumber(), ) """ - _response = self._client_wrapper.httpx_client.request( - f"phone-number/{jsonable_encoder(id)}", - method="PATCH", - json={ - "fallbackDestination": convert_and_respect_annotation_metadata( - object_=fallback_destination, annotation=UpdatePhoneNumberDtoFallbackDestination, direction="write" - ), - "name": name, - "assistantId": assistant_id, - "squadId": squad_id, - "serverUrl": server_url, - "serverUrlSecret": server_url_secret, - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - PhoneNumbersUpdateResponse, - parse_obj_as( - type_=PhoneNumbersUpdateResponse, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = self._raw_client.update(id, request=request, request_options=request_options) + return _response.data class AsyncPhoneNumbersClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper + self._raw_client = AsyncRawPhoneNumbersClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawPhoneNumbersClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawPhoneNumbersClient + """ + return self._raw_client async def list( self, @@ -375,7 +358,7 @@ async def list( updated_at_ge: typing.Optional[dt.datetime] = None, updated_at_le: typing.Optional[dt.datetime] = None, request_options: typing.Optional[RequestOptions] = None, - ) -> typing.List[PhoneNumbersListResponseItem]: + ) -> typing.List[ListPhoneNumbersResponseItem]: """ Parameters ---------- @@ -411,7 +394,7 @@ async def list( Returns ------- - typing.List[PhoneNumbersListResponseItem] + typing.List[ListPhoneNumbersResponseItem] Examples @@ -431,57 +414,42 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - "phone-number", - method="GET", - params={ - "limit": limit, - "createdAtGt": serialize_datetime(created_at_gt) if created_at_gt is not None else None, - "createdAtLt": serialize_datetime(created_at_lt) if created_at_lt is not None else None, - "createdAtGe": serialize_datetime(created_at_ge) if created_at_ge is not None else None, - "createdAtLe": serialize_datetime(created_at_le) if created_at_le is not None else None, - "updatedAtGt": serialize_datetime(updated_at_gt) if updated_at_gt is not None else None, - "updatedAtLt": serialize_datetime(updated_at_lt) if updated_at_lt is not None else None, - "updatedAtGe": serialize_datetime(updated_at_ge) if updated_at_ge is not None else None, - "updatedAtLe": serialize_datetime(updated_at_le) if updated_at_le is not None else None, - }, + _response = await self._raw_client.list( + limit=limit, + created_at_gt=created_at_gt, + created_at_lt=created_at_lt, + created_at_ge=created_at_ge, + created_at_le=created_at_le, + updated_at_gt=updated_at_gt, + updated_at_lt=updated_at_lt, + updated_at_ge=updated_at_ge, + updated_at_le=updated_at_le, request_options=request_options, ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - typing.List[PhoneNumbersListResponseItem], - parse_obj_as( - type_=typing.List[PhoneNumbersListResponseItem], # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + return _response.data async def create( - self, *, request: PhoneNumbersCreateRequest, request_options: typing.Optional[RequestOptions] = None - ) -> PhoneNumbersCreateResponse: + self, *, request: CreatePhoneNumbersRequest, request_options: typing.Optional[RequestOptions] = None + ) -> CreatePhoneNumbersResponse: """ Parameters ---------- - request : PhoneNumbersCreateRequest + request : CreatePhoneNumbersRequest request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - PhoneNumbersCreateResponse + CreatePhoneNumbersResponse Examples -------- import asyncio - from vapi import AsyncVapi, CreateByoPhoneNumberDto + from vapi import AsyncVapi + from vapi.phone_numbers import CreatePhoneNumbersRequest_ByoPhoneNumber client = AsyncVapi( token="YOUR_TOKEN", @@ -490,7 +458,7 @@ async def create( async def main() -> None: await client.phone_numbers.create( - request=CreateByoPhoneNumberDto( + request=CreatePhoneNumbersRequest_ByoPhoneNumber( credential_id="credentialId", ), ) @@ -498,30 +466,108 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - "phone-number", - method="POST", - json=convert_and_respect_annotation_metadata( - object_=request, annotation=PhoneNumbersCreateRequest, direction="write" - ), + _response = await self._raw_client.create(request=request, request_options=request_options) + return _response.data + + async def phone_number_controller_find_all_paginated( + self, + *, + search: typing.Optional[str] = None, + page: typing.Optional[float] = None, + sort_order: typing.Optional[PhoneNumberControllerFindAllPaginatedRequestSortOrder] = None, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> PhoneNumberPaginatedResponse: + """ + Parameters + ---------- + search : typing.Optional[str] + This will search phone numbers by name, number, or SIP URI (partial match, case-insensitive). + + page : typing.Optional[float] + This is the page number to return. Defaults to 1. + + sort_order : typing.Optional[PhoneNumberControllerFindAllPaginatedRequestSortOrder] + This is the sort order for pagination. Defaults to 'DESC'. + + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + PhoneNumberPaginatedResponse + + + Examples + -------- + import asyncio + + from vapi import AsyncVapi + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.phone_numbers.phone_number_controller_find_all_paginated() + + + asyncio.run(main()) + """ + _response = await self._raw_client.phone_number_controller_find_all_paginated( + search=search, + page=page, + sort_order=sort_order, + limit=limit, + created_at_gt=created_at_gt, + created_at_lt=created_at_lt, + created_at_ge=created_at_ge, + created_at_le=created_at_le, + updated_at_gt=updated_at_gt, + updated_at_lt=updated_at_lt, + updated_at_ge=updated_at_ge, + updated_at_le=updated_at_le, request_options=request_options, - omit=OMIT, ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - PhoneNumbersCreateResponse, - parse_obj_as( - type_=PhoneNumbersCreateResponse, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - async def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> PhoneNumbersGetResponse: + return _response.data + + async def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> GetPhoneNumbersResponse: """ Parameters ---------- @@ -532,7 +578,7 @@ async def get(self, id: str, *, request_options: typing.Optional[RequestOptions] Returns ------- - PhoneNumbersGetResponse + GetPhoneNumbersResponse Examples @@ -554,28 +600,12 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - f"phone-number/{jsonable_encoder(id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - PhoneNumbersGetResponse, - parse_obj_as( - type_=PhoneNumbersGetResponse, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = await self._raw_client.get(id, request_options=request_options) + return _response.data async def delete( self, id: str, *, request_options: typing.Optional[RequestOptions] = None - ) -> PhoneNumbersDeleteResponse: + ) -> DeletePhoneNumbersResponse: """ Parameters ---------- @@ -586,7 +616,7 @@ async def delete( Returns ------- - PhoneNumbersDeleteResponse + DeletePhoneNumbersResponse Examples @@ -608,81 +638,29 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - f"phone-number/{jsonable_encoder(id)}", - method="DELETE", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - PhoneNumbersDeleteResponse, - parse_obj_as( - type_=PhoneNumbersDeleteResponse, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = await self._raw_client.delete(id, request_options=request_options) + return _response.data async def update( self, id: str, *, - fallback_destination: typing.Optional[UpdatePhoneNumberDtoFallbackDestination] = OMIT, - name: typing.Optional[str] = OMIT, - assistant_id: typing.Optional[str] = OMIT, - squad_id: typing.Optional[str] = OMIT, - server_url: typing.Optional[str] = OMIT, - server_url_secret: typing.Optional[str] = OMIT, + request: UpdatePhoneNumbersRequestBody, request_options: typing.Optional[RequestOptions] = None, - ) -> PhoneNumbersUpdateResponse: + ) -> UpdatePhoneNumbersResponse: """ Parameters ---------- id : str - fallback_destination : typing.Optional[UpdatePhoneNumberDtoFallbackDestination] - This is the fallback destination an inbound call will be transferred to if: - 1. `assistantId` is not set - 2. `squadId` is not set - 3. and, `assistant-request` message to the `serverUrl` fails - - If this is not set and above conditions are met, the inbound call is hung up with an error message. - - name : typing.Optional[str] - This is the name of the phone number. This is just for your own reference. - - assistant_id : typing.Optional[str] - This is the assistant that will be used for incoming calls to this phone number. - - If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected. - - squad_id : typing.Optional[str] - This is the squad that will be used for incoming calls to this phone number. - - If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected. - - server_url : typing.Optional[str] - This is the server URL where messages will be sent for calls on this number. This includes the `assistant-request` message. - - You can see the shape of the messages sent in `ServerMessage`. - - This overrides the `org.serverUrl`. Order of precedence: tool.server.url > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl. - - server_url_secret : typing.Optional[str] - This is the secret Vapi will send with every message to your server. It's sent as a header called x-vapi-secret. - - Same precedence logic as serverUrl. + request : UpdatePhoneNumbersRequestBody request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - PhoneNumbersUpdateResponse + UpdatePhoneNumbersResponse Examples @@ -690,6 +668,7 @@ async def update( import asyncio from vapi import AsyncVapi + from vapi.phone_numbers import UpdatePhoneNumbersRequestBody_ByoPhoneNumber client = AsyncVapi( token="YOUR_TOKEN", @@ -699,37 +678,11 @@ async def update( async def main() -> None: await client.phone_numbers.update( id="id", + request=UpdatePhoneNumbersRequestBody_ByoPhoneNumber(), ) asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - f"phone-number/{jsonable_encoder(id)}", - method="PATCH", - json={ - "fallbackDestination": convert_and_respect_annotation_metadata( - object_=fallback_destination, annotation=UpdatePhoneNumberDtoFallbackDestination, direction="write" - ), - "name": name, - "assistantId": assistant_id, - "squadId": squad_id, - "serverUrl": server_url, - "serverUrlSecret": server_url_secret, - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - PhoneNumbersUpdateResponse, - parse_obj_as( - type_=PhoneNumbersUpdateResponse, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = await self._raw_client.update(id, request=request, request_options=request_options) + return _response.data diff --git a/src/vapi/phone_numbers/raw_client.py b/src/vapi/phone_numbers/raw_client.py new file mode 100644 index 00000000..2ac523c3 --- /dev/null +++ b/src/vapi/phone_numbers/raw_client.py @@ -0,0 +1,772 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing +from json.decoder import JSONDecodeError + +from ..core.api_error import ApiError +from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.datetime_utils import serialize_datetime +from ..core.http_response import AsyncHttpResponse, HttpResponse +from ..core.jsonable_encoder import jsonable_encoder +from ..core.parse_error import ParsingError +from ..core.request_options import RequestOptions +from ..core.serialization import convert_and_respect_annotation_metadata +from ..core.unchecked_base_model import construct_type +from ..types.phone_number_paginated_response import PhoneNumberPaginatedResponse +from .types.create_phone_numbers_request import CreatePhoneNumbersRequest +from .types.create_phone_numbers_response import CreatePhoneNumbersResponse +from .types.delete_phone_numbers_response import DeletePhoneNumbersResponse +from .types.get_phone_numbers_response import GetPhoneNumbersResponse +from .types.list_phone_numbers_response_item import ListPhoneNumbersResponseItem +from .types.phone_number_controller_find_all_paginated_request_sort_order import ( + PhoneNumberControllerFindAllPaginatedRequestSortOrder, +) +from .types.update_phone_numbers_request_body import UpdatePhoneNumbersRequestBody +from .types.update_phone_numbers_response import UpdatePhoneNumbersResponse +from pydantic import ValidationError + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class RawPhoneNumbersClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def list( + self, + *, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[typing.List[ListPhoneNumbersResponseItem]]: + """ + Parameters + ---------- + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[typing.List[ListPhoneNumbersResponseItem]] + + """ + _response = self._client_wrapper.httpx_client.request( + "phone-number", + method="GET", + params={ + "limit": limit, + "createdAtGt": serialize_datetime(created_at_gt) if created_at_gt is not None else None, + "createdAtLt": serialize_datetime(created_at_lt) if created_at_lt is not None else None, + "createdAtGe": serialize_datetime(created_at_ge) if created_at_ge is not None else None, + "createdAtLe": serialize_datetime(created_at_le) if created_at_le is not None else None, + "updatedAtGt": serialize_datetime(updated_at_gt) if updated_at_gt is not None else None, + "updatedAtLt": serialize_datetime(updated_at_lt) if updated_at_lt is not None else None, + "updatedAtGe": serialize_datetime(updated_at_ge) if updated_at_ge is not None else None, + "updatedAtLe": serialize_datetime(updated_at_le) if updated_at_le is not None else None, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.List[ListPhoneNumbersResponseItem], + construct_type( + type_=typing.List[ListPhoneNumbersResponseItem], # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def create( + self, *, request: CreatePhoneNumbersRequest, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[CreatePhoneNumbersResponse]: + """ + Parameters + ---------- + request : CreatePhoneNumbersRequest + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[CreatePhoneNumbersResponse] + + """ + _response = self._client_wrapper.httpx_client.request( + "phone-number", + method="POST", + json=convert_and_respect_annotation_metadata( + object_=request, annotation=CreatePhoneNumbersRequest, direction="write" + ), + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + CreatePhoneNumbersResponse, + construct_type( + type_=CreatePhoneNumbersResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def phone_number_controller_find_all_paginated( + self, + *, + search: typing.Optional[str] = None, + page: typing.Optional[float] = None, + sort_order: typing.Optional[PhoneNumberControllerFindAllPaginatedRequestSortOrder] = None, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[PhoneNumberPaginatedResponse]: + """ + Parameters + ---------- + search : typing.Optional[str] + This will search phone numbers by name, number, or SIP URI (partial match, case-insensitive). + + page : typing.Optional[float] + This is the page number to return. Defaults to 1. + + sort_order : typing.Optional[PhoneNumberControllerFindAllPaginatedRequestSortOrder] + This is the sort order for pagination. Defaults to 'DESC'. + + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[PhoneNumberPaginatedResponse] + + """ + _response = self._client_wrapper.httpx_client.request( + "v2/phone-number", + method="GET", + params={ + "search": search, + "page": page, + "sortOrder": sort_order, + "limit": limit, + "createdAtGt": serialize_datetime(created_at_gt) if created_at_gt is not None else None, + "createdAtLt": serialize_datetime(created_at_lt) if created_at_lt is not None else None, + "createdAtGe": serialize_datetime(created_at_ge) if created_at_ge is not None else None, + "createdAtLe": serialize_datetime(created_at_le) if created_at_le is not None else None, + "updatedAtGt": serialize_datetime(updated_at_gt) if updated_at_gt is not None else None, + "updatedAtLt": serialize_datetime(updated_at_lt) if updated_at_lt is not None else None, + "updatedAtGe": serialize_datetime(updated_at_ge) if updated_at_ge is not None else None, + "updatedAtLe": serialize_datetime(updated_at_le) if updated_at_le is not None else None, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + PhoneNumberPaginatedResponse, + construct_type( + type_=PhoneNumberPaginatedResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def get( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[GetPhoneNumbersResponse]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[GetPhoneNumbersResponse] + + """ + _response = self._client_wrapper.httpx_client.request( + f"phone-number/{jsonable_encoder(id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + GetPhoneNumbersResponse, + construct_type( + type_=GetPhoneNumbersResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def delete( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[DeletePhoneNumbersResponse]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[DeletePhoneNumbersResponse] + + """ + _response = self._client_wrapper.httpx_client.request( + f"phone-number/{jsonable_encoder(id)}", + method="DELETE", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + DeletePhoneNumbersResponse, + construct_type( + type_=DeletePhoneNumbersResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def update( + self, + id: str, + *, + request: UpdatePhoneNumbersRequestBody, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[UpdatePhoneNumbersResponse]: + """ + Parameters + ---------- + id : str + + request : UpdatePhoneNumbersRequestBody + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[UpdatePhoneNumbersResponse] + + """ + _response = self._client_wrapper.httpx_client.request( + f"phone-number/{jsonable_encoder(id)}", + method="PATCH", + json=convert_and_respect_annotation_metadata( + object_=request, annotation=UpdatePhoneNumbersRequestBody, direction="write" + ), + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + UpdatePhoneNumbersResponse, + construct_type( + type_=UpdatePhoneNumbersResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawPhoneNumbersClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def list( + self, + *, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[typing.List[ListPhoneNumbersResponseItem]]: + """ + Parameters + ---------- + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[typing.List[ListPhoneNumbersResponseItem]] + + """ + _response = await self._client_wrapper.httpx_client.request( + "phone-number", + method="GET", + params={ + "limit": limit, + "createdAtGt": serialize_datetime(created_at_gt) if created_at_gt is not None else None, + "createdAtLt": serialize_datetime(created_at_lt) if created_at_lt is not None else None, + "createdAtGe": serialize_datetime(created_at_ge) if created_at_ge is not None else None, + "createdAtLe": serialize_datetime(created_at_le) if created_at_le is not None else None, + "updatedAtGt": serialize_datetime(updated_at_gt) if updated_at_gt is not None else None, + "updatedAtLt": serialize_datetime(updated_at_lt) if updated_at_lt is not None else None, + "updatedAtGe": serialize_datetime(updated_at_ge) if updated_at_ge is not None else None, + "updatedAtLe": serialize_datetime(updated_at_le) if updated_at_le is not None else None, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.List[ListPhoneNumbersResponseItem], + construct_type( + type_=typing.List[ListPhoneNumbersResponseItem], # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def create( + self, *, request: CreatePhoneNumbersRequest, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[CreatePhoneNumbersResponse]: + """ + Parameters + ---------- + request : CreatePhoneNumbersRequest + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[CreatePhoneNumbersResponse] + + """ + _response = await self._client_wrapper.httpx_client.request( + "phone-number", + method="POST", + json=convert_and_respect_annotation_metadata( + object_=request, annotation=CreatePhoneNumbersRequest, direction="write" + ), + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + CreatePhoneNumbersResponse, + construct_type( + type_=CreatePhoneNumbersResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def phone_number_controller_find_all_paginated( + self, + *, + search: typing.Optional[str] = None, + page: typing.Optional[float] = None, + sort_order: typing.Optional[PhoneNumberControllerFindAllPaginatedRequestSortOrder] = None, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[PhoneNumberPaginatedResponse]: + """ + Parameters + ---------- + search : typing.Optional[str] + This will search phone numbers by name, number, or SIP URI (partial match, case-insensitive). + + page : typing.Optional[float] + This is the page number to return. Defaults to 1. + + sort_order : typing.Optional[PhoneNumberControllerFindAllPaginatedRequestSortOrder] + This is the sort order for pagination. Defaults to 'DESC'. + + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[PhoneNumberPaginatedResponse] + + """ + _response = await self._client_wrapper.httpx_client.request( + "v2/phone-number", + method="GET", + params={ + "search": search, + "page": page, + "sortOrder": sort_order, + "limit": limit, + "createdAtGt": serialize_datetime(created_at_gt) if created_at_gt is not None else None, + "createdAtLt": serialize_datetime(created_at_lt) if created_at_lt is not None else None, + "createdAtGe": serialize_datetime(created_at_ge) if created_at_ge is not None else None, + "createdAtLe": serialize_datetime(created_at_le) if created_at_le is not None else None, + "updatedAtGt": serialize_datetime(updated_at_gt) if updated_at_gt is not None else None, + "updatedAtLt": serialize_datetime(updated_at_lt) if updated_at_lt is not None else None, + "updatedAtGe": serialize_datetime(updated_at_ge) if updated_at_ge is not None else None, + "updatedAtLe": serialize_datetime(updated_at_le) if updated_at_le is not None else None, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + PhoneNumberPaginatedResponse, + construct_type( + type_=PhoneNumberPaginatedResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def get( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[GetPhoneNumbersResponse]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[GetPhoneNumbersResponse] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"phone-number/{jsonable_encoder(id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + GetPhoneNumbersResponse, + construct_type( + type_=GetPhoneNumbersResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def delete( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[DeletePhoneNumbersResponse]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[DeletePhoneNumbersResponse] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"phone-number/{jsonable_encoder(id)}", + method="DELETE", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + DeletePhoneNumbersResponse, + construct_type( + type_=DeletePhoneNumbersResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def update( + self, + id: str, + *, + request: UpdatePhoneNumbersRequestBody, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[UpdatePhoneNumbersResponse]: + """ + Parameters + ---------- + id : str + + request : UpdatePhoneNumbersRequestBody + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[UpdatePhoneNumbersResponse] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"phone-number/{jsonable_encoder(id)}", + method="PATCH", + json=convert_and_respect_annotation_metadata( + object_=request, annotation=UpdatePhoneNumbersRequestBody, direction="write" + ), + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + UpdatePhoneNumbersResponse, + construct_type( + type_=UpdatePhoneNumbersResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/vapi/phone_numbers/types/__init__.py b/src/vapi/phone_numbers/types/__init__.py index 456519ed..962da5e9 100644 --- a/src/vapi/phone_numbers/types/__init__.py +++ b/src/vapi/phone_numbers/types/__init__.py @@ -1,19 +1,180 @@ # This file was auto-generated by Fern from our API Definition. -from .phone_numbers_create_request import PhoneNumbersCreateRequest -from .phone_numbers_create_response import PhoneNumbersCreateResponse -from .phone_numbers_delete_response import PhoneNumbersDeleteResponse -from .phone_numbers_get_response import PhoneNumbersGetResponse -from .phone_numbers_list_response_item import PhoneNumbersListResponseItem -from .phone_numbers_update_response import PhoneNumbersUpdateResponse -from .update_phone_number_dto_fallback_destination import UpdatePhoneNumberDtoFallbackDestination +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .create_phone_numbers_request import ( + CreatePhoneNumbersRequest, + CreatePhoneNumbersRequest_ByoPhoneNumber, + CreatePhoneNumbersRequest_Telnyx, + CreatePhoneNumbersRequest_Twilio, + CreatePhoneNumbersRequest_Vapi, + CreatePhoneNumbersRequest_Vonage, + ) + from .create_phone_numbers_response import ( + CreatePhoneNumbersResponse, + CreatePhoneNumbersResponse_ByoPhoneNumber, + CreatePhoneNumbersResponse_Telnyx, + CreatePhoneNumbersResponse_Twilio, + CreatePhoneNumbersResponse_Vapi, + CreatePhoneNumbersResponse_Vonage, + ) + from .delete_phone_numbers_response import ( + DeletePhoneNumbersResponse, + DeletePhoneNumbersResponse_ByoPhoneNumber, + DeletePhoneNumbersResponse_Telnyx, + DeletePhoneNumbersResponse_Twilio, + DeletePhoneNumbersResponse_Vapi, + DeletePhoneNumbersResponse_Vonage, + ) + from .get_phone_numbers_response import ( + GetPhoneNumbersResponse, + GetPhoneNumbersResponse_ByoPhoneNumber, + GetPhoneNumbersResponse_Telnyx, + GetPhoneNumbersResponse_Twilio, + GetPhoneNumbersResponse_Vapi, + GetPhoneNumbersResponse_Vonage, + ) + from .list_phone_numbers_response_item import ( + ListPhoneNumbersResponseItem, + ListPhoneNumbersResponseItem_ByoPhoneNumber, + ListPhoneNumbersResponseItem_Telnyx, + ListPhoneNumbersResponseItem_Twilio, + ListPhoneNumbersResponseItem_Vapi, + ListPhoneNumbersResponseItem_Vonage, + ) + from .phone_number_controller_find_all_paginated_request_sort_order import ( + PhoneNumberControllerFindAllPaginatedRequestSortOrder, + ) + from .update_phone_numbers_request_body import ( + UpdatePhoneNumbersRequestBody, + UpdatePhoneNumbersRequestBody_ByoPhoneNumber, + UpdatePhoneNumbersRequestBody_Telnyx, + UpdatePhoneNumbersRequestBody_Twilio, + UpdatePhoneNumbersRequestBody_Vapi, + UpdatePhoneNumbersRequestBody_Vonage, + ) + from .update_phone_numbers_response import ( + UpdatePhoneNumbersResponse, + UpdatePhoneNumbersResponse_ByoPhoneNumber, + UpdatePhoneNumbersResponse_Telnyx, + UpdatePhoneNumbersResponse_Twilio, + UpdatePhoneNumbersResponse_Vapi, + UpdatePhoneNumbersResponse_Vonage, + ) +_dynamic_imports: typing.Dict[str, str] = { + "CreatePhoneNumbersRequest": ".create_phone_numbers_request", + "CreatePhoneNumbersRequest_ByoPhoneNumber": ".create_phone_numbers_request", + "CreatePhoneNumbersRequest_Telnyx": ".create_phone_numbers_request", + "CreatePhoneNumbersRequest_Twilio": ".create_phone_numbers_request", + "CreatePhoneNumbersRequest_Vapi": ".create_phone_numbers_request", + "CreatePhoneNumbersRequest_Vonage": ".create_phone_numbers_request", + "CreatePhoneNumbersResponse": ".create_phone_numbers_response", + "CreatePhoneNumbersResponse_ByoPhoneNumber": ".create_phone_numbers_response", + "CreatePhoneNumbersResponse_Telnyx": ".create_phone_numbers_response", + "CreatePhoneNumbersResponse_Twilio": ".create_phone_numbers_response", + "CreatePhoneNumbersResponse_Vapi": ".create_phone_numbers_response", + "CreatePhoneNumbersResponse_Vonage": ".create_phone_numbers_response", + "DeletePhoneNumbersResponse": ".delete_phone_numbers_response", + "DeletePhoneNumbersResponse_ByoPhoneNumber": ".delete_phone_numbers_response", + "DeletePhoneNumbersResponse_Telnyx": ".delete_phone_numbers_response", + "DeletePhoneNumbersResponse_Twilio": ".delete_phone_numbers_response", + "DeletePhoneNumbersResponse_Vapi": ".delete_phone_numbers_response", + "DeletePhoneNumbersResponse_Vonage": ".delete_phone_numbers_response", + "GetPhoneNumbersResponse": ".get_phone_numbers_response", + "GetPhoneNumbersResponse_ByoPhoneNumber": ".get_phone_numbers_response", + "GetPhoneNumbersResponse_Telnyx": ".get_phone_numbers_response", + "GetPhoneNumbersResponse_Twilio": ".get_phone_numbers_response", + "GetPhoneNumbersResponse_Vapi": ".get_phone_numbers_response", + "GetPhoneNumbersResponse_Vonage": ".get_phone_numbers_response", + "ListPhoneNumbersResponseItem": ".list_phone_numbers_response_item", + "ListPhoneNumbersResponseItem_ByoPhoneNumber": ".list_phone_numbers_response_item", + "ListPhoneNumbersResponseItem_Telnyx": ".list_phone_numbers_response_item", + "ListPhoneNumbersResponseItem_Twilio": ".list_phone_numbers_response_item", + "ListPhoneNumbersResponseItem_Vapi": ".list_phone_numbers_response_item", + "ListPhoneNumbersResponseItem_Vonage": ".list_phone_numbers_response_item", + "PhoneNumberControllerFindAllPaginatedRequestSortOrder": ".phone_number_controller_find_all_paginated_request_sort_order", + "UpdatePhoneNumbersRequestBody": ".update_phone_numbers_request_body", + "UpdatePhoneNumbersRequestBody_ByoPhoneNumber": ".update_phone_numbers_request_body", + "UpdatePhoneNumbersRequestBody_Telnyx": ".update_phone_numbers_request_body", + "UpdatePhoneNumbersRequestBody_Twilio": ".update_phone_numbers_request_body", + "UpdatePhoneNumbersRequestBody_Vapi": ".update_phone_numbers_request_body", + "UpdatePhoneNumbersRequestBody_Vonage": ".update_phone_numbers_request_body", + "UpdatePhoneNumbersResponse": ".update_phone_numbers_response", + "UpdatePhoneNumbersResponse_ByoPhoneNumber": ".update_phone_numbers_response", + "UpdatePhoneNumbersResponse_Telnyx": ".update_phone_numbers_response", + "UpdatePhoneNumbersResponse_Twilio": ".update_phone_numbers_response", + "UpdatePhoneNumbersResponse_Vapi": ".update_phone_numbers_response", + "UpdatePhoneNumbersResponse_Vonage": ".update_phone_numbers_response", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ - "PhoneNumbersCreateRequest", - "PhoneNumbersCreateResponse", - "PhoneNumbersDeleteResponse", - "PhoneNumbersGetResponse", - "PhoneNumbersListResponseItem", - "PhoneNumbersUpdateResponse", - "UpdatePhoneNumberDtoFallbackDestination", + "CreatePhoneNumbersRequest", + "CreatePhoneNumbersRequest_ByoPhoneNumber", + "CreatePhoneNumbersRequest_Telnyx", + "CreatePhoneNumbersRequest_Twilio", + "CreatePhoneNumbersRequest_Vapi", + "CreatePhoneNumbersRequest_Vonage", + "CreatePhoneNumbersResponse", + "CreatePhoneNumbersResponse_ByoPhoneNumber", + "CreatePhoneNumbersResponse_Telnyx", + "CreatePhoneNumbersResponse_Twilio", + "CreatePhoneNumbersResponse_Vapi", + "CreatePhoneNumbersResponse_Vonage", + "DeletePhoneNumbersResponse", + "DeletePhoneNumbersResponse_ByoPhoneNumber", + "DeletePhoneNumbersResponse_Telnyx", + "DeletePhoneNumbersResponse_Twilio", + "DeletePhoneNumbersResponse_Vapi", + "DeletePhoneNumbersResponse_Vonage", + "GetPhoneNumbersResponse", + "GetPhoneNumbersResponse_ByoPhoneNumber", + "GetPhoneNumbersResponse_Telnyx", + "GetPhoneNumbersResponse_Twilio", + "GetPhoneNumbersResponse_Vapi", + "GetPhoneNumbersResponse_Vonage", + "ListPhoneNumbersResponseItem", + "ListPhoneNumbersResponseItem_ByoPhoneNumber", + "ListPhoneNumbersResponseItem_Telnyx", + "ListPhoneNumbersResponseItem_Twilio", + "ListPhoneNumbersResponseItem_Vapi", + "ListPhoneNumbersResponseItem_Vonage", + "PhoneNumberControllerFindAllPaginatedRequestSortOrder", + "UpdatePhoneNumbersRequestBody", + "UpdatePhoneNumbersRequestBody_ByoPhoneNumber", + "UpdatePhoneNumbersRequestBody_Telnyx", + "UpdatePhoneNumbersRequestBody_Twilio", + "UpdatePhoneNumbersRequestBody_Vapi", + "UpdatePhoneNumbersRequestBody_Vonage", + "UpdatePhoneNumbersResponse", + "UpdatePhoneNumbersResponse_ByoPhoneNumber", + "UpdatePhoneNumbersResponse_Telnyx", + "UpdatePhoneNumbersResponse_Twilio", + "UpdatePhoneNumbersResponse_Vapi", + "UpdatePhoneNumbersResponse_Vonage", ] diff --git a/src/vapi/phone_numbers/types/create_phone_numbers_request.py b/src/vapi/phone_numbers/types/create_phone_numbers_request.py new file mode 100644 index 00000000..6a71c91e --- /dev/null +++ b/src/vapi/phone_numbers/types/create_phone_numbers_request.py @@ -0,0 +1,227 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ...core.pydantic_utilities import IS_PYDANTIC_V2 +from ...core.serialization import FieldMetadata +from ...core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from ...types.create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from ...types.create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from ...types.create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from ...types.create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from ...types.create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from ...types.create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from ...types.create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from ...types.create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from ...types.create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from ...types.create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from ...types.server import Server +from ...types.sip_authentication import SipAuthentication + + +class CreatePhoneNumbersRequest_ByoPhoneNumber(UncheckedBaseModel): + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreatePhoneNumbersRequest_Twilio(UncheckedBaseModel): + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreatePhoneNumbersRequest_Vonage(UncheckedBaseModel): + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreatePhoneNumbersRequest_Vapi(UncheckedBaseModel): + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreatePhoneNumbersRequest_Telnyx(UncheckedBaseModel): + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreatePhoneNumbersRequest = typing_extensions.Annotated[ + typing.Union[ + CreatePhoneNumbersRequest_ByoPhoneNumber, + CreatePhoneNumbersRequest_Twilio, + CreatePhoneNumbersRequest_Vonage, + CreatePhoneNumbersRequest_Vapi, + CreatePhoneNumbersRequest_Telnyx, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/phone_numbers/types/create_phone_numbers_response.py b/src/vapi/phone_numbers/types/create_phone_numbers_response.py new file mode 100644 index 00000000..faf8e401 --- /dev/null +++ b/src/vapi/phone_numbers/types/create_phone_numbers_response.py @@ -0,0 +1,279 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ...core.pydantic_utilities import IS_PYDANTIC_V2 +from ...core.serialization import FieldMetadata +from ...core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from ...types.byo_phone_number_fallback_destination import ByoPhoneNumberFallbackDestination +from ...types.byo_phone_number_hooks_item import ByoPhoneNumberHooksItem +from ...types.byo_phone_number_status import ByoPhoneNumberStatus +from ...types.server import Server +from ...types.sip_authentication import SipAuthentication +from ...types.telnyx_phone_number_fallback_destination import TelnyxPhoneNumberFallbackDestination +from ...types.telnyx_phone_number_hooks_item import TelnyxPhoneNumberHooksItem +from ...types.telnyx_phone_number_status import TelnyxPhoneNumberStatus +from ...types.twilio_phone_number_fallback_destination import TwilioPhoneNumberFallbackDestination +from ...types.twilio_phone_number_hooks_item import TwilioPhoneNumberHooksItem +from ...types.twilio_phone_number_status import TwilioPhoneNumberStatus +from ...types.vapi_phone_number_fallback_destination import VapiPhoneNumberFallbackDestination +from ...types.vapi_phone_number_hooks_item import VapiPhoneNumberHooksItem +from ...types.vapi_phone_number_status import VapiPhoneNumberStatus +from ...types.vonage_phone_number_fallback_destination import VonagePhoneNumberFallbackDestination +from ...types.vonage_phone_number_hooks_item import VonagePhoneNumberHooksItem +from ...types.vonage_phone_number_status import VonagePhoneNumberStatus + + +class CreatePhoneNumbersResponse_ByoPhoneNumber(UncheckedBaseModel): + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[ByoPhoneNumberFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[ByoPhoneNumberHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + status: typing.Optional[ByoPhoneNumberStatus] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreatePhoneNumbersResponse_Twilio(UncheckedBaseModel): + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[TwilioPhoneNumberFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[TwilioPhoneNumberHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + status: typing.Optional[TwilioPhoneNumberStatus] = None + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreatePhoneNumbersResponse_Vonage(UncheckedBaseModel): + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[VonagePhoneNumberFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[VonagePhoneNumberHooksItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + status: typing.Optional[VonagePhoneNumberStatus] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreatePhoneNumbersResponse_Vapi(UncheckedBaseModel): + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[VapiPhoneNumberFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[VapiPhoneNumberHooksItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + status: typing.Optional[VapiPhoneNumberStatus] = None + number: typing.Optional[str] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreatePhoneNumbersResponse_Telnyx(UncheckedBaseModel): + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[TelnyxPhoneNumberFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[TelnyxPhoneNumberHooksItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + status: typing.Optional[TelnyxPhoneNumberStatus] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreatePhoneNumbersResponse = typing_extensions.Annotated[ + typing.Union[ + CreatePhoneNumbersResponse_ByoPhoneNumber, + CreatePhoneNumbersResponse_Twilio, + CreatePhoneNumbersResponse_Vonage, + CreatePhoneNumbersResponse_Vapi, + CreatePhoneNumbersResponse_Telnyx, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/phone_numbers/types/delete_phone_numbers_response.py b/src/vapi/phone_numbers/types/delete_phone_numbers_response.py new file mode 100644 index 00000000..627f92a1 --- /dev/null +++ b/src/vapi/phone_numbers/types/delete_phone_numbers_response.py @@ -0,0 +1,279 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ...core.pydantic_utilities import IS_PYDANTIC_V2 +from ...core.serialization import FieldMetadata +from ...core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from ...types.byo_phone_number_fallback_destination import ByoPhoneNumberFallbackDestination +from ...types.byo_phone_number_hooks_item import ByoPhoneNumberHooksItem +from ...types.byo_phone_number_status import ByoPhoneNumberStatus +from ...types.server import Server +from ...types.sip_authentication import SipAuthentication +from ...types.telnyx_phone_number_fallback_destination import TelnyxPhoneNumberFallbackDestination +from ...types.telnyx_phone_number_hooks_item import TelnyxPhoneNumberHooksItem +from ...types.telnyx_phone_number_status import TelnyxPhoneNumberStatus +from ...types.twilio_phone_number_fallback_destination import TwilioPhoneNumberFallbackDestination +from ...types.twilio_phone_number_hooks_item import TwilioPhoneNumberHooksItem +from ...types.twilio_phone_number_status import TwilioPhoneNumberStatus +from ...types.vapi_phone_number_fallback_destination import VapiPhoneNumberFallbackDestination +from ...types.vapi_phone_number_hooks_item import VapiPhoneNumberHooksItem +from ...types.vapi_phone_number_status import VapiPhoneNumberStatus +from ...types.vonage_phone_number_fallback_destination import VonagePhoneNumberFallbackDestination +from ...types.vonage_phone_number_hooks_item import VonagePhoneNumberHooksItem +from ...types.vonage_phone_number_status import VonagePhoneNumberStatus + + +class DeletePhoneNumbersResponse_ByoPhoneNumber(UncheckedBaseModel): + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[ByoPhoneNumberFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[ByoPhoneNumberHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + status: typing.Optional[ByoPhoneNumberStatus] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeletePhoneNumbersResponse_Twilio(UncheckedBaseModel): + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[TwilioPhoneNumberFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[TwilioPhoneNumberHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + status: typing.Optional[TwilioPhoneNumberStatus] = None + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeletePhoneNumbersResponse_Vonage(UncheckedBaseModel): + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[VonagePhoneNumberFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[VonagePhoneNumberHooksItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + status: typing.Optional[VonagePhoneNumberStatus] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeletePhoneNumbersResponse_Vapi(UncheckedBaseModel): + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[VapiPhoneNumberFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[VapiPhoneNumberHooksItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + status: typing.Optional[VapiPhoneNumberStatus] = None + number: typing.Optional[str] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeletePhoneNumbersResponse_Telnyx(UncheckedBaseModel): + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[TelnyxPhoneNumberFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[TelnyxPhoneNumberHooksItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + status: typing.Optional[TelnyxPhoneNumberStatus] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +DeletePhoneNumbersResponse = typing_extensions.Annotated[ + typing.Union[ + DeletePhoneNumbersResponse_ByoPhoneNumber, + DeletePhoneNumbersResponse_Twilio, + DeletePhoneNumbersResponse_Vonage, + DeletePhoneNumbersResponse_Vapi, + DeletePhoneNumbersResponse_Telnyx, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/phone_numbers/types/get_phone_numbers_response.py b/src/vapi/phone_numbers/types/get_phone_numbers_response.py new file mode 100644 index 00000000..f4b5a390 --- /dev/null +++ b/src/vapi/phone_numbers/types/get_phone_numbers_response.py @@ -0,0 +1,279 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ...core.pydantic_utilities import IS_PYDANTIC_V2 +from ...core.serialization import FieldMetadata +from ...core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from ...types.byo_phone_number_fallback_destination import ByoPhoneNumberFallbackDestination +from ...types.byo_phone_number_hooks_item import ByoPhoneNumberHooksItem +from ...types.byo_phone_number_status import ByoPhoneNumberStatus +from ...types.server import Server +from ...types.sip_authentication import SipAuthentication +from ...types.telnyx_phone_number_fallback_destination import TelnyxPhoneNumberFallbackDestination +from ...types.telnyx_phone_number_hooks_item import TelnyxPhoneNumberHooksItem +from ...types.telnyx_phone_number_status import TelnyxPhoneNumberStatus +from ...types.twilio_phone_number_fallback_destination import TwilioPhoneNumberFallbackDestination +from ...types.twilio_phone_number_hooks_item import TwilioPhoneNumberHooksItem +from ...types.twilio_phone_number_status import TwilioPhoneNumberStatus +from ...types.vapi_phone_number_fallback_destination import VapiPhoneNumberFallbackDestination +from ...types.vapi_phone_number_hooks_item import VapiPhoneNumberHooksItem +from ...types.vapi_phone_number_status import VapiPhoneNumberStatus +from ...types.vonage_phone_number_fallback_destination import VonagePhoneNumberFallbackDestination +from ...types.vonage_phone_number_hooks_item import VonagePhoneNumberHooksItem +from ...types.vonage_phone_number_status import VonagePhoneNumberStatus + + +class GetPhoneNumbersResponse_ByoPhoneNumber(UncheckedBaseModel): + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[ByoPhoneNumberFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[ByoPhoneNumberHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + status: typing.Optional[ByoPhoneNumberStatus] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GetPhoneNumbersResponse_Twilio(UncheckedBaseModel): + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[TwilioPhoneNumberFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[TwilioPhoneNumberHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + status: typing.Optional[TwilioPhoneNumberStatus] = None + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GetPhoneNumbersResponse_Vonage(UncheckedBaseModel): + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[VonagePhoneNumberFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[VonagePhoneNumberHooksItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + status: typing.Optional[VonagePhoneNumberStatus] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GetPhoneNumbersResponse_Vapi(UncheckedBaseModel): + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[VapiPhoneNumberFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[VapiPhoneNumberHooksItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + status: typing.Optional[VapiPhoneNumberStatus] = None + number: typing.Optional[str] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GetPhoneNumbersResponse_Telnyx(UncheckedBaseModel): + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[TelnyxPhoneNumberFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[TelnyxPhoneNumberHooksItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + status: typing.Optional[TelnyxPhoneNumberStatus] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +GetPhoneNumbersResponse = typing_extensions.Annotated[ + typing.Union[ + GetPhoneNumbersResponse_ByoPhoneNumber, + GetPhoneNumbersResponse_Twilio, + GetPhoneNumbersResponse_Vonage, + GetPhoneNumbersResponse_Vapi, + GetPhoneNumbersResponse_Telnyx, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/phone_numbers/types/list_phone_numbers_response_item.py b/src/vapi/phone_numbers/types/list_phone_numbers_response_item.py new file mode 100644 index 00000000..66fa5641 --- /dev/null +++ b/src/vapi/phone_numbers/types/list_phone_numbers_response_item.py @@ -0,0 +1,279 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ...core.pydantic_utilities import IS_PYDANTIC_V2 +from ...core.serialization import FieldMetadata +from ...core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from ...types.byo_phone_number_fallback_destination import ByoPhoneNumberFallbackDestination +from ...types.byo_phone_number_hooks_item import ByoPhoneNumberHooksItem +from ...types.byo_phone_number_status import ByoPhoneNumberStatus +from ...types.server import Server +from ...types.sip_authentication import SipAuthentication +from ...types.telnyx_phone_number_fallback_destination import TelnyxPhoneNumberFallbackDestination +from ...types.telnyx_phone_number_hooks_item import TelnyxPhoneNumberHooksItem +from ...types.telnyx_phone_number_status import TelnyxPhoneNumberStatus +from ...types.twilio_phone_number_fallback_destination import TwilioPhoneNumberFallbackDestination +from ...types.twilio_phone_number_hooks_item import TwilioPhoneNumberHooksItem +from ...types.twilio_phone_number_status import TwilioPhoneNumberStatus +from ...types.vapi_phone_number_fallback_destination import VapiPhoneNumberFallbackDestination +from ...types.vapi_phone_number_hooks_item import VapiPhoneNumberHooksItem +from ...types.vapi_phone_number_status import VapiPhoneNumberStatus +from ...types.vonage_phone_number_fallback_destination import VonagePhoneNumberFallbackDestination +from ...types.vonage_phone_number_hooks_item import VonagePhoneNumberHooksItem +from ...types.vonage_phone_number_status import VonagePhoneNumberStatus + + +class ListPhoneNumbersResponseItem_ByoPhoneNumber(UncheckedBaseModel): + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[ByoPhoneNumberFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[ByoPhoneNumberHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + status: typing.Optional[ByoPhoneNumberStatus] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ListPhoneNumbersResponseItem_Twilio(UncheckedBaseModel): + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[TwilioPhoneNumberFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[TwilioPhoneNumberHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + status: typing.Optional[TwilioPhoneNumberStatus] = None + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ListPhoneNumbersResponseItem_Vonage(UncheckedBaseModel): + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[VonagePhoneNumberFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[VonagePhoneNumberHooksItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + status: typing.Optional[VonagePhoneNumberStatus] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ListPhoneNumbersResponseItem_Vapi(UncheckedBaseModel): + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[VapiPhoneNumberFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[VapiPhoneNumberHooksItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + status: typing.Optional[VapiPhoneNumberStatus] = None + number: typing.Optional[str] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ListPhoneNumbersResponseItem_Telnyx(UncheckedBaseModel): + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[TelnyxPhoneNumberFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[TelnyxPhoneNumberHooksItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + status: typing.Optional[TelnyxPhoneNumberStatus] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ListPhoneNumbersResponseItem = typing_extensions.Annotated[ + typing.Union[ + ListPhoneNumbersResponseItem_ByoPhoneNumber, + ListPhoneNumbersResponseItem_Twilio, + ListPhoneNumbersResponseItem_Vonage, + ListPhoneNumbersResponseItem_Vapi, + ListPhoneNumbersResponseItem_Telnyx, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/phone_numbers/types/phone_number_controller_find_all_paginated_request_sort_order.py b/src/vapi/phone_numbers/types/phone_number_controller_find_all_paginated_request_sort_order.py new file mode 100644 index 00000000..045246f2 --- /dev/null +++ b/src/vapi/phone_numbers/types/phone_number_controller_find_all_paginated_request_sort_order.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +PhoneNumberControllerFindAllPaginatedRequestSortOrder = typing.Union[typing.Literal["ASC", "DESC"], typing.Any] diff --git a/src/vapi/phone_numbers/types/phone_numbers_create_request.py b/src/vapi/phone_numbers/types/phone_numbers_create_request.py deleted file mode 100644 index 9fb3555b..00000000 --- a/src/vapi/phone_numbers/types/phone_numbers_create_request.py +++ /dev/null @@ -1,11 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from ...types.create_byo_phone_number_dto import CreateByoPhoneNumberDto -from ...types.create_twilio_phone_number_dto import CreateTwilioPhoneNumberDto -from ...types.create_vonage_phone_number_dto import CreateVonagePhoneNumberDto -from ...types.create_vapi_phone_number_dto import CreateVapiPhoneNumberDto - -PhoneNumbersCreateRequest = typing.Union[ - CreateByoPhoneNumberDto, CreateTwilioPhoneNumberDto, CreateVonagePhoneNumberDto, CreateVapiPhoneNumberDto -] diff --git a/src/vapi/phone_numbers/types/phone_numbers_create_response.py b/src/vapi/phone_numbers/types/phone_numbers_create_response.py deleted file mode 100644 index 3154fcf6..00000000 --- a/src/vapi/phone_numbers/types/phone_numbers_create_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from ...types.byo_phone_number import ByoPhoneNumber -from ...types.twilio_phone_number import TwilioPhoneNumber -from ...types.vonage_phone_number import VonagePhoneNumber -from ...types.vapi_phone_number import VapiPhoneNumber - -PhoneNumbersCreateResponse = typing.Union[ByoPhoneNumber, TwilioPhoneNumber, VonagePhoneNumber, VapiPhoneNumber] diff --git a/src/vapi/phone_numbers/types/phone_numbers_delete_response.py b/src/vapi/phone_numbers/types/phone_numbers_delete_response.py deleted file mode 100644 index 6e7f6ae8..00000000 --- a/src/vapi/phone_numbers/types/phone_numbers_delete_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from ...types.byo_phone_number import ByoPhoneNumber -from ...types.twilio_phone_number import TwilioPhoneNumber -from ...types.vonage_phone_number import VonagePhoneNumber -from ...types.vapi_phone_number import VapiPhoneNumber - -PhoneNumbersDeleteResponse = typing.Union[ByoPhoneNumber, TwilioPhoneNumber, VonagePhoneNumber, VapiPhoneNumber] diff --git a/src/vapi/phone_numbers/types/phone_numbers_get_response.py b/src/vapi/phone_numbers/types/phone_numbers_get_response.py deleted file mode 100644 index 101f96ed..00000000 --- a/src/vapi/phone_numbers/types/phone_numbers_get_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from ...types.byo_phone_number import ByoPhoneNumber -from ...types.twilio_phone_number import TwilioPhoneNumber -from ...types.vonage_phone_number import VonagePhoneNumber -from ...types.vapi_phone_number import VapiPhoneNumber - -PhoneNumbersGetResponse = typing.Union[ByoPhoneNumber, TwilioPhoneNumber, VonagePhoneNumber, VapiPhoneNumber] diff --git a/src/vapi/phone_numbers/types/phone_numbers_list_response_item.py b/src/vapi/phone_numbers/types/phone_numbers_list_response_item.py deleted file mode 100644 index debea8ab..00000000 --- a/src/vapi/phone_numbers/types/phone_numbers_list_response_item.py +++ /dev/null @@ -1,9 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from ...types.byo_phone_number import ByoPhoneNumber -from ...types.twilio_phone_number import TwilioPhoneNumber -from ...types.vonage_phone_number import VonagePhoneNumber -from ...types.vapi_phone_number import VapiPhoneNumber - -PhoneNumbersListResponseItem = typing.Union[ByoPhoneNumber, TwilioPhoneNumber, VonagePhoneNumber, VapiPhoneNumber] diff --git a/src/vapi/phone_numbers/types/phone_numbers_update_response.py b/src/vapi/phone_numbers/types/phone_numbers_update_response.py deleted file mode 100644 index d30b8f89..00000000 --- a/src/vapi/phone_numbers/types/phone_numbers_update_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from ...types.byo_phone_number import ByoPhoneNumber -from ...types.twilio_phone_number import TwilioPhoneNumber -from ...types.vonage_phone_number import VonagePhoneNumber -from ...types.vapi_phone_number import VapiPhoneNumber - -PhoneNumbersUpdateResponse = typing.Union[ByoPhoneNumber, TwilioPhoneNumber, VonagePhoneNumber, VapiPhoneNumber] diff --git a/src/vapi/phone_numbers/types/update_phone_number_dto_fallback_destination.py b/src/vapi/phone_numbers/types/update_phone_number_dto_fallback_destination.py deleted file mode 100644 index 171fa994..00000000 --- a/src/vapi/phone_numbers/types/update_phone_number_dto_fallback_destination.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from ...types.transfer_destination_number import TransferDestinationNumber -from ...types.transfer_destination_sip import TransferDestinationSip - -UpdatePhoneNumberDtoFallbackDestination = typing.Union[TransferDestinationNumber, TransferDestinationSip] diff --git a/src/vapi/phone_numbers/types/update_phone_numbers_request_body.py b/src/vapi/phone_numbers/types/update_phone_numbers_request_body.py new file mode 100644 index 00000000..c318f11d --- /dev/null +++ b/src/vapi/phone_numbers/types/update_phone_numbers_request_body.py @@ -0,0 +1,222 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ...core.pydantic_utilities import IS_PYDANTIC_V2 +from ...core.serialization import FieldMetadata +from ...core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from ...types.server import Server +from ...types.sip_authentication import SipAuthentication +from ...types.update_byo_phone_number_dto_fallback_destination import UpdateByoPhoneNumberDtoFallbackDestination +from ...types.update_byo_phone_number_dto_hooks_item import UpdateByoPhoneNumberDtoHooksItem +from ...types.update_telnyx_phone_number_dto_fallback_destination import UpdateTelnyxPhoneNumberDtoFallbackDestination +from ...types.update_telnyx_phone_number_dto_hooks_item import UpdateTelnyxPhoneNumberDtoHooksItem +from ...types.update_twilio_phone_number_dto_fallback_destination import UpdateTwilioPhoneNumberDtoFallbackDestination +from ...types.update_twilio_phone_number_dto_hooks_item import UpdateTwilioPhoneNumberDtoHooksItem +from ...types.update_vapi_phone_number_dto_fallback_destination import UpdateVapiPhoneNumberDtoFallbackDestination +from ...types.update_vapi_phone_number_dto_hooks_item import UpdateVapiPhoneNumberDtoHooksItem +from ...types.update_vonage_phone_number_dto_fallback_destination import UpdateVonagePhoneNumberDtoFallbackDestination +from ...types.update_vonage_phone_number_dto_hooks_item import UpdateVonagePhoneNumberDtoHooksItem + + +class UpdatePhoneNumbersRequestBody_ByoPhoneNumber(UncheckedBaseModel): + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[UpdateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[UpdateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdatePhoneNumbersRequestBody_Twilio(UncheckedBaseModel): + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[UpdateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[UpdateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + number: typing.Optional[str] = None + twilio_account_sid: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] = None + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdatePhoneNumbersRequestBody_Vonage(UncheckedBaseModel): + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[UpdateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[UpdateVonagePhoneNumberDtoHooksItem]] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdatePhoneNumbersRequestBody_Vapi(UncheckedBaseModel): + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[UpdateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[UpdateVapiPhoneNumberDtoHooksItem]] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdatePhoneNumbersRequestBody_Telnyx(UncheckedBaseModel): + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[UpdateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[UpdateTelnyxPhoneNumberDtoHooksItem]] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdatePhoneNumbersRequestBody = typing_extensions.Annotated[ + typing.Union[ + UpdatePhoneNumbersRequestBody_ByoPhoneNumber, + UpdatePhoneNumbersRequestBody_Twilio, + UpdatePhoneNumbersRequestBody_Vonage, + UpdatePhoneNumbersRequestBody_Vapi, + UpdatePhoneNumbersRequestBody_Telnyx, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/phone_numbers/types/update_phone_numbers_response.py b/src/vapi/phone_numbers/types/update_phone_numbers_response.py new file mode 100644 index 00000000..7acc97b0 --- /dev/null +++ b/src/vapi/phone_numbers/types/update_phone_numbers_response.py @@ -0,0 +1,279 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ...core.pydantic_utilities import IS_PYDANTIC_V2 +from ...core.serialization import FieldMetadata +from ...core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from ...types.byo_phone_number_fallback_destination import ByoPhoneNumberFallbackDestination +from ...types.byo_phone_number_hooks_item import ByoPhoneNumberHooksItem +from ...types.byo_phone_number_status import ByoPhoneNumberStatus +from ...types.server import Server +from ...types.sip_authentication import SipAuthentication +from ...types.telnyx_phone_number_fallback_destination import TelnyxPhoneNumberFallbackDestination +from ...types.telnyx_phone_number_hooks_item import TelnyxPhoneNumberHooksItem +from ...types.telnyx_phone_number_status import TelnyxPhoneNumberStatus +from ...types.twilio_phone_number_fallback_destination import TwilioPhoneNumberFallbackDestination +from ...types.twilio_phone_number_hooks_item import TwilioPhoneNumberHooksItem +from ...types.twilio_phone_number_status import TwilioPhoneNumberStatus +from ...types.vapi_phone_number_fallback_destination import VapiPhoneNumberFallbackDestination +from ...types.vapi_phone_number_hooks_item import VapiPhoneNumberHooksItem +from ...types.vapi_phone_number_status import VapiPhoneNumberStatus +from ...types.vonage_phone_number_fallback_destination import VonagePhoneNumberFallbackDestination +from ...types.vonage_phone_number_hooks_item import VonagePhoneNumberHooksItem +from ...types.vonage_phone_number_status import VonagePhoneNumberStatus + + +class UpdatePhoneNumbersResponse_ByoPhoneNumber(UncheckedBaseModel): + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[ByoPhoneNumberFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[ByoPhoneNumberHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + status: typing.Optional[ByoPhoneNumberStatus] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdatePhoneNumbersResponse_Twilio(UncheckedBaseModel): + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[TwilioPhoneNumberFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[TwilioPhoneNumberHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + status: typing.Optional[TwilioPhoneNumberStatus] = None + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdatePhoneNumbersResponse_Vonage(UncheckedBaseModel): + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[VonagePhoneNumberFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[VonagePhoneNumberHooksItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + status: typing.Optional[VonagePhoneNumberStatus] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdatePhoneNumbersResponse_Vapi(UncheckedBaseModel): + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[VapiPhoneNumberFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[VapiPhoneNumberHooksItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + status: typing.Optional[VapiPhoneNumberStatus] = None + number: typing.Optional[str] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdatePhoneNumbersResponse_Telnyx(UncheckedBaseModel): + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[TelnyxPhoneNumberFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[TelnyxPhoneNumberHooksItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + status: typing.Optional[TelnyxPhoneNumberStatus] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdatePhoneNumbersResponse = typing_extensions.Annotated[ + typing.Union[ + UpdatePhoneNumbersResponse_ByoPhoneNumber, + UpdatePhoneNumbersResponse_Twilio, + UpdatePhoneNumbersResponse_Vonage, + UpdatePhoneNumbersResponse_Vapi, + UpdatePhoneNumbersResponse_Telnyx, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/provider_resources/__init__.py b/src/vapi/provider_resources/__init__.py new file mode 100644 index 00000000..da04102c --- /dev/null +++ b/src/vapi/provider_resources/__init__.py @@ -0,0 +1,70 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ( + ProviderResourceControllerCreateProviderResourceRequestProvider, + ProviderResourceControllerCreateProviderResourceRequestResourceName, + ProviderResourceControllerDeleteProviderResourceRequestProvider, + ProviderResourceControllerDeleteProviderResourceRequestResourceName, + ProviderResourceControllerGetProviderResourceRequestProvider, + ProviderResourceControllerGetProviderResourceRequestResourceName, + ProviderResourceControllerGetProviderResourcesPaginatedRequestProvider, + ProviderResourceControllerGetProviderResourcesPaginatedRequestResourceName, + ProviderResourceControllerGetProviderResourcesPaginatedRequestSortOrder, + ProviderResourceControllerUpdateProviderResourceRequestProvider, + ProviderResourceControllerUpdateProviderResourceRequestResourceName, + ) +_dynamic_imports: typing.Dict[str, str] = { + "ProviderResourceControllerCreateProviderResourceRequestProvider": ".types", + "ProviderResourceControllerCreateProviderResourceRequestResourceName": ".types", + "ProviderResourceControllerDeleteProviderResourceRequestProvider": ".types", + "ProviderResourceControllerDeleteProviderResourceRequestResourceName": ".types", + "ProviderResourceControllerGetProviderResourceRequestProvider": ".types", + "ProviderResourceControllerGetProviderResourceRequestResourceName": ".types", + "ProviderResourceControllerGetProviderResourcesPaginatedRequestProvider": ".types", + "ProviderResourceControllerGetProviderResourcesPaginatedRequestResourceName": ".types", + "ProviderResourceControllerGetProviderResourcesPaginatedRequestSortOrder": ".types", + "ProviderResourceControllerUpdateProviderResourceRequestProvider": ".types", + "ProviderResourceControllerUpdateProviderResourceRequestResourceName": ".types", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = [ + "ProviderResourceControllerCreateProviderResourceRequestProvider", + "ProviderResourceControllerCreateProviderResourceRequestResourceName", + "ProviderResourceControllerDeleteProviderResourceRequestProvider", + "ProviderResourceControllerDeleteProviderResourceRequestResourceName", + "ProviderResourceControllerGetProviderResourceRequestProvider", + "ProviderResourceControllerGetProviderResourceRequestResourceName", + "ProviderResourceControllerGetProviderResourcesPaginatedRequestProvider", + "ProviderResourceControllerGetProviderResourcesPaginatedRequestResourceName", + "ProviderResourceControllerGetProviderResourcesPaginatedRequestSortOrder", + "ProviderResourceControllerUpdateProviderResourceRequestProvider", + "ProviderResourceControllerUpdateProviderResourceRequestResourceName", +] diff --git a/src/vapi/provider_resources/client.py b/src/vapi/provider_resources/client.py new file mode 100644 index 00000000..eaf876ce --- /dev/null +++ b/src/vapi/provider_resources/client.py @@ -0,0 +1,679 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.request_options import RequestOptions +from ..types.provider_resource import ProviderResource +from ..types.provider_resource_paginated_response import ProviderResourcePaginatedResponse +from .raw_client import AsyncRawProviderResourcesClient, RawProviderResourcesClient +from .types.provider_resource_controller_create_provider_resource_request_provider import ( + ProviderResourceControllerCreateProviderResourceRequestProvider, +) +from .types.provider_resource_controller_create_provider_resource_request_resource_name import ( + ProviderResourceControllerCreateProviderResourceRequestResourceName, +) +from .types.provider_resource_controller_delete_provider_resource_request_provider import ( + ProviderResourceControllerDeleteProviderResourceRequestProvider, +) +from .types.provider_resource_controller_delete_provider_resource_request_resource_name import ( + ProviderResourceControllerDeleteProviderResourceRequestResourceName, +) +from .types.provider_resource_controller_get_provider_resource_request_provider import ( + ProviderResourceControllerGetProviderResourceRequestProvider, +) +from .types.provider_resource_controller_get_provider_resource_request_resource_name import ( + ProviderResourceControllerGetProviderResourceRequestResourceName, +) +from .types.provider_resource_controller_get_provider_resources_paginated_request_provider import ( + ProviderResourceControllerGetProviderResourcesPaginatedRequestProvider, +) +from .types.provider_resource_controller_get_provider_resources_paginated_request_resource_name import ( + ProviderResourceControllerGetProviderResourcesPaginatedRequestResourceName, +) +from .types.provider_resource_controller_get_provider_resources_paginated_request_sort_order import ( + ProviderResourceControllerGetProviderResourcesPaginatedRequestSortOrder, +) +from .types.provider_resource_controller_update_provider_resource_request_provider import ( + ProviderResourceControllerUpdateProviderResourceRequestProvider, +) +from .types.provider_resource_controller_update_provider_resource_request_resource_name import ( + ProviderResourceControllerUpdateProviderResourceRequestResourceName, +) + + +class ProviderResourcesClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawProviderResourcesClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawProviderResourcesClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawProviderResourcesClient + """ + return self._raw_client + + def provider_resource_controller_get_provider_resources_paginated( + self, + provider: ProviderResourceControllerGetProviderResourcesPaginatedRequestProvider, + resource_name: ProviderResourceControllerGetProviderResourcesPaginatedRequestResourceName, + *, + id: typing.Optional[str] = None, + resource_id: typing.Optional[str] = None, + page: typing.Optional[float] = None, + sort_order: typing.Optional[ProviderResourceControllerGetProviderResourcesPaginatedRequestSortOrder] = None, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> ProviderResourcePaginatedResponse: + """ + Parameters + ---------- + provider : ProviderResourceControllerGetProviderResourcesPaginatedRequestProvider + The provider (e.g., 11labs) + + resource_name : ProviderResourceControllerGetProviderResourcesPaginatedRequestResourceName + The resource name (e.g., pronunciation-dictionary) + + id : typing.Optional[str] + + resource_id : typing.Optional[str] + + page : typing.Optional[float] + This is the page number to return. Defaults to 1. + + sort_order : typing.Optional[ProviderResourceControllerGetProviderResourcesPaginatedRequestSortOrder] + This is the sort order for pagination. Defaults to 'DESC'. + + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ProviderResourcePaginatedResponse + List of provider resources + + Examples + -------- + from vapi import Vapi + + client = Vapi( + token="YOUR_TOKEN", + ) + client.provider_resources.provider_resource_controller_get_provider_resources_paginated( + provider="cartesia", + resource_name="pronunciation-dictionary", + ) + """ + _response = self._raw_client.provider_resource_controller_get_provider_resources_paginated( + provider, + resource_name, + id=id, + resource_id=resource_id, + page=page, + sort_order=sort_order, + limit=limit, + created_at_gt=created_at_gt, + created_at_lt=created_at_lt, + created_at_ge=created_at_ge, + created_at_le=created_at_le, + updated_at_gt=updated_at_gt, + updated_at_lt=updated_at_lt, + updated_at_ge=updated_at_ge, + updated_at_le=updated_at_le, + request_options=request_options, + ) + return _response.data + + def provider_resource_controller_create_provider_resource( + self, + provider: ProviderResourceControllerCreateProviderResourceRequestProvider, + resource_name: ProviderResourceControllerCreateProviderResourceRequestResourceName, + *, + request_options: typing.Optional[RequestOptions] = None, + ) -> ProviderResource: + """ + Parameters + ---------- + provider : ProviderResourceControllerCreateProviderResourceRequestProvider + The provider (e.g., 11labs) + + resource_name : ProviderResourceControllerCreateProviderResourceRequestResourceName + The resource name (e.g., pronunciation-dictionary) + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ProviderResource + Successfully created provider resource + + Examples + -------- + from vapi import Vapi + + client = Vapi( + token="YOUR_TOKEN", + ) + client.provider_resources.provider_resource_controller_create_provider_resource( + provider="cartesia", + resource_name="pronunciation-dictionary", + ) + """ + _response = self._raw_client.provider_resource_controller_create_provider_resource( + provider, resource_name, request_options=request_options + ) + return _response.data + + def provider_resource_controller_get_provider_resource( + self, + provider: ProviderResourceControllerGetProviderResourceRequestProvider, + resource_name: ProviderResourceControllerGetProviderResourceRequestResourceName, + id: str, + *, + request_options: typing.Optional[RequestOptions] = None, + ) -> ProviderResource: + """ + Parameters + ---------- + provider : ProviderResourceControllerGetProviderResourceRequestProvider + The provider (e.g., 11labs) + + resource_name : ProviderResourceControllerGetProviderResourceRequestResourceName + The resource name (e.g., pronunciation-dictionary) + + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ProviderResource + Successfully retrieved provider resource + + Examples + -------- + from vapi import Vapi + + client = Vapi( + token="YOUR_TOKEN", + ) + client.provider_resources.provider_resource_controller_get_provider_resource( + provider="cartesia", + resource_name="pronunciation-dictionary", + id="id", + ) + """ + _response = self._raw_client.provider_resource_controller_get_provider_resource( + provider, resource_name, id, request_options=request_options + ) + return _response.data + + def provider_resource_controller_delete_provider_resource( + self, + provider: ProviderResourceControllerDeleteProviderResourceRequestProvider, + resource_name: ProviderResourceControllerDeleteProviderResourceRequestResourceName, + id: str, + *, + request_options: typing.Optional[RequestOptions] = None, + ) -> ProviderResource: + """ + Parameters + ---------- + provider : ProviderResourceControllerDeleteProviderResourceRequestProvider + The provider (e.g., 11labs) + + resource_name : ProviderResourceControllerDeleteProviderResourceRequestResourceName + The resource name (e.g., pronunciation-dictionary) + + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ProviderResource + + + Examples + -------- + from vapi import Vapi + + client = Vapi( + token="YOUR_TOKEN", + ) + client.provider_resources.provider_resource_controller_delete_provider_resource( + provider="cartesia", + resource_name="pronunciation-dictionary", + id="id", + ) + """ + _response = self._raw_client.provider_resource_controller_delete_provider_resource( + provider, resource_name, id, request_options=request_options + ) + return _response.data + + def provider_resource_controller_update_provider_resource( + self, + provider: ProviderResourceControllerUpdateProviderResourceRequestProvider, + resource_name: ProviderResourceControllerUpdateProviderResourceRequestResourceName, + id: str, + *, + request_options: typing.Optional[RequestOptions] = None, + ) -> ProviderResource: + """ + Parameters + ---------- + provider : ProviderResourceControllerUpdateProviderResourceRequestProvider + The provider (e.g., 11labs) + + resource_name : ProviderResourceControllerUpdateProviderResourceRequestResourceName + The resource name (e.g., pronunciation-dictionary) + + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ProviderResource + + + Examples + -------- + from vapi import Vapi + + client = Vapi( + token="YOUR_TOKEN", + ) + client.provider_resources.provider_resource_controller_update_provider_resource( + provider="cartesia", + resource_name="pronunciation-dictionary", + id="id", + ) + """ + _response = self._raw_client.provider_resource_controller_update_provider_resource( + provider, resource_name, id, request_options=request_options + ) + return _response.data + + +class AsyncProviderResourcesClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawProviderResourcesClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawProviderResourcesClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawProviderResourcesClient + """ + return self._raw_client + + async def provider_resource_controller_get_provider_resources_paginated( + self, + provider: ProviderResourceControllerGetProviderResourcesPaginatedRequestProvider, + resource_name: ProviderResourceControllerGetProviderResourcesPaginatedRequestResourceName, + *, + id: typing.Optional[str] = None, + resource_id: typing.Optional[str] = None, + page: typing.Optional[float] = None, + sort_order: typing.Optional[ProviderResourceControllerGetProviderResourcesPaginatedRequestSortOrder] = None, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> ProviderResourcePaginatedResponse: + """ + Parameters + ---------- + provider : ProviderResourceControllerGetProviderResourcesPaginatedRequestProvider + The provider (e.g., 11labs) + + resource_name : ProviderResourceControllerGetProviderResourcesPaginatedRequestResourceName + The resource name (e.g., pronunciation-dictionary) + + id : typing.Optional[str] + + resource_id : typing.Optional[str] + + page : typing.Optional[float] + This is the page number to return. Defaults to 1. + + sort_order : typing.Optional[ProviderResourceControllerGetProviderResourcesPaginatedRequestSortOrder] + This is the sort order for pagination. Defaults to 'DESC'. + + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ProviderResourcePaginatedResponse + List of provider resources + + Examples + -------- + import asyncio + + from vapi import AsyncVapi + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.provider_resources.provider_resource_controller_get_provider_resources_paginated( + provider="cartesia", + resource_name="pronunciation-dictionary", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.provider_resource_controller_get_provider_resources_paginated( + provider, + resource_name, + id=id, + resource_id=resource_id, + page=page, + sort_order=sort_order, + limit=limit, + created_at_gt=created_at_gt, + created_at_lt=created_at_lt, + created_at_ge=created_at_ge, + created_at_le=created_at_le, + updated_at_gt=updated_at_gt, + updated_at_lt=updated_at_lt, + updated_at_ge=updated_at_ge, + updated_at_le=updated_at_le, + request_options=request_options, + ) + return _response.data + + async def provider_resource_controller_create_provider_resource( + self, + provider: ProviderResourceControllerCreateProviderResourceRequestProvider, + resource_name: ProviderResourceControllerCreateProviderResourceRequestResourceName, + *, + request_options: typing.Optional[RequestOptions] = None, + ) -> ProviderResource: + """ + Parameters + ---------- + provider : ProviderResourceControllerCreateProviderResourceRequestProvider + The provider (e.g., 11labs) + + resource_name : ProviderResourceControllerCreateProviderResourceRequestResourceName + The resource name (e.g., pronunciation-dictionary) + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ProviderResource + Successfully created provider resource + + Examples + -------- + import asyncio + + from vapi import AsyncVapi + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.provider_resources.provider_resource_controller_create_provider_resource( + provider="cartesia", + resource_name="pronunciation-dictionary", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.provider_resource_controller_create_provider_resource( + provider, resource_name, request_options=request_options + ) + return _response.data + + async def provider_resource_controller_get_provider_resource( + self, + provider: ProviderResourceControllerGetProviderResourceRequestProvider, + resource_name: ProviderResourceControllerGetProviderResourceRequestResourceName, + id: str, + *, + request_options: typing.Optional[RequestOptions] = None, + ) -> ProviderResource: + """ + Parameters + ---------- + provider : ProviderResourceControllerGetProviderResourceRequestProvider + The provider (e.g., 11labs) + + resource_name : ProviderResourceControllerGetProviderResourceRequestResourceName + The resource name (e.g., pronunciation-dictionary) + + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ProviderResource + Successfully retrieved provider resource + + Examples + -------- + import asyncio + + from vapi import AsyncVapi + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.provider_resources.provider_resource_controller_get_provider_resource( + provider="cartesia", + resource_name="pronunciation-dictionary", + id="id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.provider_resource_controller_get_provider_resource( + provider, resource_name, id, request_options=request_options + ) + return _response.data + + async def provider_resource_controller_delete_provider_resource( + self, + provider: ProviderResourceControllerDeleteProviderResourceRequestProvider, + resource_name: ProviderResourceControllerDeleteProviderResourceRequestResourceName, + id: str, + *, + request_options: typing.Optional[RequestOptions] = None, + ) -> ProviderResource: + """ + Parameters + ---------- + provider : ProviderResourceControllerDeleteProviderResourceRequestProvider + The provider (e.g., 11labs) + + resource_name : ProviderResourceControllerDeleteProviderResourceRequestResourceName + The resource name (e.g., pronunciation-dictionary) + + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ProviderResource + + + Examples + -------- + import asyncio + + from vapi import AsyncVapi + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.provider_resources.provider_resource_controller_delete_provider_resource( + provider="cartesia", + resource_name="pronunciation-dictionary", + id="id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.provider_resource_controller_delete_provider_resource( + provider, resource_name, id, request_options=request_options + ) + return _response.data + + async def provider_resource_controller_update_provider_resource( + self, + provider: ProviderResourceControllerUpdateProviderResourceRequestProvider, + resource_name: ProviderResourceControllerUpdateProviderResourceRequestResourceName, + id: str, + *, + request_options: typing.Optional[RequestOptions] = None, + ) -> ProviderResource: + """ + Parameters + ---------- + provider : ProviderResourceControllerUpdateProviderResourceRequestProvider + The provider (e.g., 11labs) + + resource_name : ProviderResourceControllerUpdateProviderResourceRequestResourceName + The resource name (e.g., pronunciation-dictionary) + + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ProviderResource + + + Examples + -------- + import asyncio + + from vapi import AsyncVapi + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.provider_resources.provider_resource_controller_update_provider_resource( + provider="cartesia", + resource_name="pronunciation-dictionary", + id="id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.provider_resource_controller_update_provider_resource( + provider, resource_name, id, request_options=request_options + ) + return _response.data diff --git a/src/vapi/provider_resources/raw_client.py b/src/vapi/provider_resources/raw_client.py new file mode 100644 index 00000000..f4771b55 --- /dev/null +++ b/src/vapi/provider_resources/raw_client.py @@ -0,0 +1,755 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing +from json.decoder import JSONDecodeError + +from ..core.api_error import ApiError +from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.datetime_utils import serialize_datetime +from ..core.http_response import AsyncHttpResponse, HttpResponse +from ..core.jsonable_encoder import jsonable_encoder +from ..core.parse_error import ParsingError +from ..core.request_options import RequestOptions +from ..core.unchecked_base_model import construct_type +from ..errors.not_found_error import NotFoundError +from ..types.provider_resource import ProviderResource +from ..types.provider_resource_paginated_response import ProviderResourcePaginatedResponse +from .types.provider_resource_controller_create_provider_resource_request_provider import ( + ProviderResourceControllerCreateProviderResourceRequestProvider, +) +from .types.provider_resource_controller_create_provider_resource_request_resource_name import ( + ProviderResourceControllerCreateProviderResourceRequestResourceName, +) +from .types.provider_resource_controller_delete_provider_resource_request_provider import ( + ProviderResourceControllerDeleteProviderResourceRequestProvider, +) +from .types.provider_resource_controller_delete_provider_resource_request_resource_name import ( + ProviderResourceControllerDeleteProviderResourceRequestResourceName, +) +from .types.provider_resource_controller_get_provider_resource_request_provider import ( + ProviderResourceControllerGetProviderResourceRequestProvider, +) +from .types.provider_resource_controller_get_provider_resource_request_resource_name import ( + ProviderResourceControllerGetProviderResourceRequestResourceName, +) +from .types.provider_resource_controller_get_provider_resources_paginated_request_provider import ( + ProviderResourceControllerGetProviderResourcesPaginatedRequestProvider, +) +from .types.provider_resource_controller_get_provider_resources_paginated_request_resource_name import ( + ProviderResourceControllerGetProviderResourcesPaginatedRequestResourceName, +) +from .types.provider_resource_controller_get_provider_resources_paginated_request_sort_order import ( + ProviderResourceControllerGetProviderResourcesPaginatedRequestSortOrder, +) +from .types.provider_resource_controller_update_provider_resource_request_provider import ( + ProviderResourceControllerUpdateProviderResourceRequestProvider, +) +from .types.provider_resource_controller_update_provider_resource_request_resource_name import ( + ProviderResourceControllerUpdateProviderResourceRequestResourceName, +) +from pydantic import ValidationError + + +class RawProviderResourcesClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def provider_resource_controller_get_provider_resources_paginated( + self, + provider: ProviderResourceControllerGetProviderResourcesPaginatedRequestProvider, + resource_name: ProviderResourceControllerGetProviderResourcesPaginatedRequestResourceName, + *, + id: typing.Optional[str] = None, + resource_id: typing.Optional[str] = None, + page: typing.Optional[float] = None, + sort_order: typing.Optional[ProviderResourceControllerGetProviderResourcesPaginatedRequestSortOrder] = None, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[ProviderResourcePaginatedResponse]: + """ + Parameters + ---------- + provider : ProviderResourceControllerGetProviderResourcesPaginatedRequestProvider + The provider (e.g., 11labs) + + resource_name : ProviderResourceControllerGetProviderResourcesPaginatedRequestResourceName + The resource name (e.g., pronunciation-dictionary) + + id : typing.Optional[str] + + resource_id : typing.Optional[str] + + page : typing.Optional[float] + This is the page number to return. Defaults to 1. + + sort_order : typing.Optional[ProviderResourceControllerGetProviderResourcesPaginatedRequestSortOrder] + This is the sort order for pagination. Defaults to 'DESC'. + + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[ProviderResourcePaginatedResponse] + List of provider resources + """ + _response = self._client_wrapper.httpx_client.request( + f"provider/{jsonable_encoder(provider)}/{jsonable_encoder(resource_name)}", + method="GET", + params={ + "id": id, + "resourceId": resource_id, + "page": page, + "sortOrder": sort_order, + "limit": limit, + "createdAtGt": serialize_datetime(created_at_gt) if created_at_gt is not None else None, + "createdAtLt": serialize_datetime(created_at_lt) if created_at_lt is not None else None, + "createdAtGe": serialize_datetime(created_at_ge) if created_at_ge is not None else None, + "createdAtLe": serialize_datetime(created_at_le) if created_at_le is not None else None, + "updatedAtGt": serialize_datetime(updated_at_gt) if updated_at_gt is not None else None, + "updatedAtLt": serialize_datetime(updated_at_lt) if updated_at_lt is not None else None, + "updatedAtGe": serialize_datetime(updated_at_ge) if updated_at_ge is not None else None, + "updatedAtLe": serialize_datetime(updated_at_le) if updated_at_le is not None else None, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ProviderResourcePaginatedResponse, + construct_type( + type_=ProviderResourcePaginatedResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def provider_resource_controller_create_provider_resource( + self, + provider: ProviderResourceControllerCreateProviderResourceRequestProvider, + resource_name: ProviderResourceControllerCreateProviderResourceRequestResourceName, + *, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[ProviderResource]: + """ + Parameters + ---------- + provider : ProviderResourceControllerCreateProviderResourceRequestProvider + The provider (e.g., 11labs) + + resource_name : ProviderResourceControllerCreateProviderResourceRequestResourceName + The resource name (e.g., pronunciation-dictionary) + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[ProviderResource] + Successfully created provider resource + """ + _response = self._client_wrapper.httpx_client.request( + f"provider/{jsonable_encoder(provider)}/{jsonable_encoder(resource_name)}", + method="POST", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ProviderResource, + construct_type( + type_=ProviderResource, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def provider_resource_controller_get_provider_resource( + self, + provider: ProviderResourceControllerGetProviderResourceRequestProvider, + resource_name: ProviderResourceControllerGetProviderResourceRequestResourceName, + id: str, + *, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[ProviderResource]: + """ + Parameters + ---------- + provider : ProviderResourceControllerGetProviderResourceRequestProvider + The provider (e.g., 11labs) + + resource_name : ProviderResourceControllerGetProviderResourceRequestResourceName + The resource name (e.g., pronunciation-dictionary) + + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[ProviderResource] + Successfully retrieved provider resource + """ + _response = self._client_wrapper.httpx_client.request( + f"provider/{jsonable_encoder(provider)}/{jsonable_encoder(resource_name)}/{jsonable_encoder(id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ProviderResource, + construct_type( + type_=ProviderResource, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 404: + raise NotFoundError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + construct_type( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def provider_resource_controller_delete_provider_resource( + self, + provider: ProviderResourceControllerDeleteProviderResourceRequestProvider, + resource_name: ProviderResourceControllerDeleteProviderResourceRequestResourceName, + id: str, + *, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[ProviderResource]: + """ + Parameters + ---------- + provider : ProviderResourceControllerDeleteProviderResourceRequestProvider + The provider (e.g., 11labs) + + resource_name : ProviderResourceControllerDeleteProviderResourceRequestResourceName + The resource name (e.g., pronunciation-dictionary) + + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[ProviderResource] + + """ + _response = self._client_wrapper.httpx_client.request( + f"provider/{jsonable_encoder(provider)}/{jsonable_encoder(resource_name)}/{jsonable_encoder(id)}", + method="DELETE", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ProviderResource, + construct_type( + type_=ProviderResource, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 404: + raise NotFoundError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + construct_type( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def provider_resource_controller_update_provider_resource( + self, + provider: ProviderResourceControllerUpdateProviderResourceRequestProvider, + resource_name: ProviderResourceControllerUpdateProviderResourceRequestResourceName, + id: str, + *, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[ProviderResource]: + """ + Parameters + ---------- + provider : ProviderResourceControllerUpdateProviderResourceRequestProvider + The provider (e.g., 11labs) + + resource_name : ProviderResourceControllerUpdateProviderResourceRequestResourceName + The resource name (e.g., pronunciation-dictionary) + + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[ProviderResource] + + """ + _response = self._client_wrapper.httpx_client.request( + f"provider/{jsonable_encoder(provider)}/{jsonable_encoder(resource_name)}/{jsonable_encoder(id)}", + method="PATCH", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ProviderResource, + construct_type( + type_=ProviderResource, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 404: + raise NotFoundError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + construct_type( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawProviderResourcesClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def provider_resource_controller_get_provider_resources_paginated( + self, + provider: ProviderResourceControllerGetProviderResourcesPaginatedRequestProvider, + resource_name: ProviderResourceControllerGetProviderResourcesPaginatedRequestResourceName, + *, + id: typing.Optional[str] = None, + resource_id: typing.Optional[str] = None, + page: typing.Optional[float] = None, + sort_order: typing.Optional[ProviderResourceControllerGetProviderResourcesPaginatedRequestSortOrder] = None, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[ProviderResourcePaginatedResponse]: + """ + Parameters + ---------- + provider : ProviderResourceControllerGetProviderResourcesPaginatedRequestProvider + The provider (e.g., 11labs) + + resource_name : ProviderResourceControllerGetProviderResourcesPaginatedRequestResourceName + The resource name (e.g., pronunciation-dictionary) + + id : typing.Optional[str] + + resource_id : typing.Optional[str] + + page : typing.Optional[float] + This is the page number to return. Defaults to 1. + + sort_order : typing.Optional[ProviderResourceControllerGetProviderResourcesPaginatedRequestSortOrder] + This is the sort order for pagination. Defaults to 'DESC'. + + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[ProviderResourcePaginatedResponse] + List of provider resources + """ + _response = await self._client_wrapper.httpx_client.request( + f"provider/{jsonable_encoder(provider)}/{jsonable_encoder(resource_name)}", + method="GET", + params={ + "id": id, + "resourceId": resource_id, + "page": page, + "sortOrder": sort_order, + "limit": limit, + "createdAtGt": serialize_datetime(created_at_gt) if created_at_gt is not None else None, + "createdAtLt": serialize_datetime(created_at_lt) if created_at_lt is not None else None, + "createdAtGe": serialize_datetime(created_at_ge) if created_at_ge is not None else None, + "createdAtLe": serialize_datetime(created_at_le) if created_at_le is not None else None, + "updatedAtGt": serialize_datetime(updated_at_gt) if updated_at_gt is not None else None, + "updatedAtLt": serialize_datetime(updated_at_lt) if updated_at_lt is not None else None, + "updatedAtGe": serialize_datetime(updated_at_ge) if updated_at_ge is not None else None, + "updatedAtLe": serialize_datetime(updated_at_le) if updated_at_le is not None else None, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ProviderResourcePaginatedResponse, + construct_type( + type_=ProviderResourcePaginatedResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def provider_resource_controller_create_provider_resource( + self, + provider: ProviderResourceControllerCreateProviderResourceRequestProvider, + resource_name: ProviderResourceControllerCreateProviderResourceRequestResourceName, + *, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[ProviderResource]: + """ + Parameters + ---------- + provider : ProviderResourceControllerCreateProviderResourceRequestProvider + The provider (e.g., 11labs) + + resource_name : ProviderResourceControllerCreateProviderResourceRequestResourceName + The resource name (e.g., pronunciation-dictionary) + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[ProviderResource] + Successfully created provider resource + """ + _response = await self._client_wrapper.httpx_client.request( + f"provider/{jsonable_encoder(provider)}/{jsonable_encoder(resource_name)}", + method="POST", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ProviderResource, + construct_type( + type_=ProviderResource, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def provider_resource_controller_get_provider_resource( + self, + provider: ProviderResourceControllerGetProviderResourceRequestProvider, + resource_name: ProviderResourceControllerGetProviderResourceRequestResourceName, + id: str, + *, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[ProviderResource]: + """ + Parameters + ---------- + provider : ProviderResourceControllerGetProviderResourceRequestProvider + The provider (e.g., 11labs) + + resource_name : ProviderResourceControllerGetProviderResourceRequestResourceName + The resource name (e.g., pronunciation-dictionary) + + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[ProviderResource] + Successfully retrieved provider resource + """ + _response = await self._client_wrapper.httpx_client.request( + f"provider/{jsonable_encoder(provider)}/{jsonable_encoder(resource_name)}/{jsonable_encoder(id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ProviderResource, + construct_type( + type_=ProviderResource, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 404: + raise NotFoundError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + construct_type( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def provider_resource_controller_delete_provider_resource( + self, + provider: ProviderResourceControllerDeleteProviderResourceRequestProvider, + resource_name: ProviderResourceControllerDeleteProviderResourceRequestResourceName, + id: str, + *, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[ProviderResource]: + """ + Parameters + ---------- + provider : ProviderResourceControllerDeleteProviderResourceRequestProvider + The provider (e.g., 11labs) + + resource_name : ProviderResourceControllerDeleteProviderResourceRequestResourceName + The resource name (e.g., pronunciation-dictionary) + + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[ProviderResource] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"provider/{jsonable_encoder(provider)}/{jsonable_encoder(resource_name)}/{jsonable_encoder(id)}", + method="DELETE", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ProviderResource, + construct_type( + type_=ProviderResource, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 404: + raise NotFoundError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + construct_type( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def provider_resource_controller_update_provider_resource( + self, + provider: ProviderResourceControllerUpdateProviderResourceRequestProvider, + resource_name: ProviderResourceControllerUpdateProviderResourceRequestResourceName, + id: str, + *, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[ProviderResource]: + """ + Parameters + ---------- + provider : ProviderResourceControllerUpdateProviderResourceRequestProvider + The provider (e.g., 11labs) + + resource_name : ProviderResourceControllerUpdateProviderResourceRequestResourceName + The resource name (e.g., pronunciation-dictionary) + + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[ProviderResource] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"provider/{jsonable_encoder(provider)}/{jsonable_encoder(resource_name)}/{jsonable_encoder(id)}", + method="PATCH", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ProviderResource, + construct_type( + type_=ProviderResource, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 404: + raise NotFoundError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + construct_type( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/vapi/provider_resources/types/__init__.py b/src/vapi/provider_resources/types/__init__.py new file mode 100644 index 00000000..ea0f5ab0 --- /dev/null +++ b/src/vapi/provider_resources/types/__init__.py @@ -0,0 +1,90 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .provider_resource_controller_create_provider_resource_request_provider import ( + ProviderResourceControllerCreateProviderResourceRequestProvider, + ) + from .provider_resource_controller_create_provider_resource_request_resource_name import ( + ProviderResourceControllerCreateProviderResourceRequestResourceName, + ) + from .provider_resource_controller_delete_provider_resource_request_provider import ( + ProviderResourceControllerDeleteProviderResourceRequestProvider, + ) + from .provider_resource_controller_delete_provider_resource_request_resource_name import ( + ProviderResourceControllerDeleteProviderResourceRequestResourceName, + ) + from .provider_resource_controller_get_provider_resource_request_provider import ( + ProviderResourceControllerGetProviderResourceRequestProvider, + ) + from .provider_resource_controller_get_provider_resource_request_resource_name import ( + ProviderResourceControllerGetProviderResourceRequestResourceName, + ) + from .provider_resource_controller_get_provider_resources_paginated_request_provider import ( + ProviderResourceControllerGetProviderResourcesPaginatedRequestProvider, + ) + from .provider_resource_controller_get_provider_resources_paginated_request_resource_name import ( + ProviderResourceControllerGetProviderResourcesPaginatedRequestResourceName, + ) + from .provider_resource_controller_get_provider_resources_paginated_request_sort_order import ( + ProviderResourceControllerGetProviderResourcesPaginatedRequestSortOrder, + ) + from .provider_resource_controller_update_provider_resource_request_provider import ( + ProviderResourceControllerUpdateProviderResourceRequestProvider, + ) + from .provider_resource_controller_update_provider_resource_request_resource_name import ( + ProviderResourceControllerUpdateProviderResourceRequestResourceName, + ) +_dynamic_imports: typing.Dict[str, str] = { + "ProviderResourceControllerCreateProviderResourceRequestProvider": ".provider_resource_controller_create_provider_resource_request_provider", + "ProviderResourceControllerCreateProviderResourceRequestResourceName": ".provider_resource_controller_create_provider_resource_request_resource_name", + "ProviderResourceControllerDeleteProviderResourceRequestProvider": ".provider_resource_controller_delete_provider_resource_request_provider", + "ProviderResourceControllerDeleteProviderResourceRequestResourceName": ".provider_resource_controller_delete_provider_resource_request_resource_name", + "ProviderResourceControllerGetProviderResourceRequestProvider": ".provider_resource_controller_get_provider_resource_request_provider", + "ProviderResourceControllerGetProviderResourceRequestResourceName": ".provider_resource_controller_get_provider_resource_request_resource_name", + "ProviderResourceControllerGetProviderResourcesPaginatedRequestProvider": ".provider_resource_controller_get_provider_resources_paginated_request_provider", + "ProviderResourceControllerGetProviderResourcesPaginatedRequestResourceName": ".provider_resource_controller_get_provider_resources_paginated_request_resource_name", + "ProviderResourceControllerGetProviderResourcesPaginatedRequestSortOrder": ".provider_resource_controller_get_provider_resources_paginated_request_sort_order", + "ProviderResourceControllerUpdateProviderResourceRequestProvider": ".provider_resource_controller_update_provider_resource_request_provider", + "ProviderResourceControllerUpdateProviderResourceRequestResourceName": ".provider_resource_controller_update_provider_resource_request_resource_name", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = [ + "ProviderResourceControllerCreateProviderResourceRequestProvider", + "ProviderResourceControllerCreateProviderResourceRequestResourceName", + "ProviderResourceControllerDeleteProviderResourceRequestProvider", + "ProviderResourceControllerDeleteProviderResourceRequestResourceName", + "ProviderResourceControllerGetProviderResourceRequestProvider", + "ProviderResourceControllerGetProviderResourceRequestResourceName", + "ProviderResourceControllerGetProviderResourcesPaginatedRequestProvider", + "ProviderResourceControllerGetProviderResourcesPaginatedRequestResourceName", + "ProviderResourceControllerGetProviderResourcesPaginatedRequestSortOrder", + "ProviderResourceControllerUpdateProviderResourceRequestProvider", + "ProviderResourceControllerUpdateProviderResourceRequestResourceName", +] diff --git a/src/vapi/provider_resources/types/provider_resource_controller_create_provider_resource_request_provider.py b/src/vapi/provider_resources/types/provider_resource_controller_create_provider_resource_request_provider.py new file mode 100644 index 00000000..c4e9ea36 --- /dev/null +++ b/src/vapi/provider_resources/types/provider_resource_controller_create_provider_resource_request_provider.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ProviderResourceControllerCreateProviderResourceRequestProvider = typing.Union[ + typing.Literal["cartesia", "11labs"], typing.Any +] diff --git a/src/vapi/provider_resources/types/provider_resource_controller_create_provider_resource_request_resource_name.py b/src/vapi/provider_resources/types/provider_resource_controller_create_provider_resource_request_resource_name.py new file mode 100644 index 00000000..1725657e --- /dev/null +++ b/src/vapi/provider_resources/types/provider_resource_controller_create_provider_resource_request_resource_name.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ProviderResourceControllerCreateProviderResourceRequestResourceName = typing.Union[ + typing.Literal["pronunciation-dictionary"], typing.Any +] diff --git a/src/vapi/provider_resources/types/provider_resource_controller_delete_provider_resource_request_provider.py b/src/vapi/provider_resources/types/provider_resource_controller_delete_provider_resource_request_provider.py new file mode 100644 index 00000000..75f524e2 --- /dev/null +++ b/src/vapi/provider_resources/types/provider_resource_controller_delete_provider_resource_request_provider.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ProviderResourceControllerDeleteProviderResourceRequestProvider = typing.Union[ + typing.Literal["cartesia", "11labs"], typing.Any +] diff --git a/src/vapi/provider_resources/types/provider_resource_controller_delete_provider_resource_request_resource_name.py b/src/vapi/provider_resources/types/provider_resource_controller_delete_provider_resource_request_resource_name.py new file mode 100644 index 00000000..7ce6c42d --- /dev/null +++ b/src/vapi/provider_resources/types/provider_resource_controller_delete_provider_resource_request_resource_name.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ProviderResourceControllerDeleteProviderResourceRequestResourceName = typing.Union[ + typing.Literal["pronunciation-dictionary"], typing.Any +] diff --git a/src/vapi/provider_resources/types/provider_resource_controller_get_provider_resource_request_provider.py b/src/vapi/provider_resources/types/provider_resource_controller_get_provider_resource_request_provider.py new file mode 100644 index 00000000..7408addb --- /dev/null +++ b/src/vapi/provider_resources/types/provider_resource_controller_get_provider_resource_request_provider.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ProviderResourceControllerGetProviderResourceRequestProvider = typing.Union[ + typing.Literal["cartesia", "11labs"], typing.Any +] diff --git a/src/vapi/provider_resources/types/provider_resource_controller_get_provider_resource_request_resource_name.py b/src/vapi/provider_resources/types/provider_resource_controller_get_provider_resource_request_resource_name.py new file mode 100644 index 00000000..027f0aee --- /dev/null +++ b/src/vapi/provider_resources/types/provider_resource_controller_get_provider_resource_request_resource_name.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ProviderResourceControllerGetProviderResourceRequestResourceName = typing.Union[ + typing.Literal["pronunciation-dictionary"], typing.Any +] diff --git a/src/vapi/provider_resources/types/provider_resource_controller_get_provider_resources_paginated_request_provider.py b/src/vapi/provider_resources/types/provider_resource_controller_get_provider_resources_paginated_request_provider.py new file mode 100644 index 00000000..8c6a7e75 --- /dev/null +++ b/src/vapi/provider_resources/types/provider_resource_controller_get_provider_resources_paginated_request_provider.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ProviderResourceControllerGetProviderResourcesPaginatedRequestProvider = typing.Union[ + typing.Literal["cartesia", "11labs"], typing.Any +] diff --git a/src/vapi/provider_resources/types/provider_resource_controller_get_provider_resources_paginated_request_resource_name.py b/src/vapi/provider_resources/types/provider_resource_controller_get_provider_resources_paginated_request_resource_name.py new file mode 100644 index 00000000..5709a25d --- /dev/null +++ b/src/vapi/provider_resources/types/provider_resource_controller_get_provider_resources_paginated_request_resource_name.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ProviderResourceControllerGetProviderResourcesPaginatedRequestResourceName = typing.Union[ + typing.Literal["pronunciation-dictionary"], typing.Any +] diff --git a/src/vapi/provider_resources/types/provider_resource_controller_get_provider_resources_paginated_request_sort_order.py b/src/vapi/provider_resources/types/provider_resource_controller_get_provider_resources_paginated_request_sort_order.py new file mode 100644 index 00000000..c94605b2 --- /dev/null +++ b/src/vapi/provider_resources/types/provider_resource_controller_get_provider_resources_paginated_request_sort_order.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ProviderResourceControllerGetProviderResourcesPaginatedRequestSortOrder = typing.Union[ + typing.Literal["ASC", "DESC"], typing.Any +] diff --git a/src/vapi/provider_resources/types/provider_resource_controller_update_provider_resource_request_provider.py b/src/vapi/provider_resources/types/provider_resource_controller_update_provider_resource_request_provider.py new file mode 100644 index 00000000..ee5f48ca --- /dev/null +++ b/src/vapi/provider_resources/types/provider_resource_controller_update_provider_resource_request_provider.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ProviderResourceControllerUpdateProviderResourceRequestProvider = typing.Union[ + typing.Literal["cartesia", "11labs"], typing.Any +] diff --git a/src/vapi/provider_resources/types/provider_resource_controller_update_provider_resource_request_resource_name.py b/src/vapi/provider_resources/types/provider_resource_controller_update_provider_resource_request_resource_name.py new file mode 100644 index 00000000..756fdeb2 --- /dev/null +++ b/src/vapi/provider_resources/types/provider_resource_controller_update_provider_resource_request_resource_name.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ProviderResourceControllerUpdateProviderResourceRequestResourceName = typing.Union[ + typing.Literal["pronunciation-dictionary"], typing.Any +] diff --git a/src/vapi/sessions/__init__.py b/src/vapi/sessions/__init__.py new file mode 100644 index 00000000..6d7370db --- /dev/null +++ b/src/vapi/sessions/__init__.py @@ -0,0 +1,52 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ( + CreateSessionDtoMessagesItem, + CreateSessionDtoStatus, + ListSessionsRequestSortOrder, + UpdateSessionDtoMessagesItem, + UpdateSessionDtoStatus, + ) +_dynamic_imports: typing.Dict[str, str] = { + "CreateSessionDtoMessagesItem": ".types", + "CreateSessionDtoStatus": ".types", + "ListSessionsRequestSortOrder": ".types", + "UpdateSessionDtoMessagesItem": ".types", + "UpdateSessionDtoStatus": ".types", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = [ + "CreateSessionDtoMessagesItem", + "CreateSessionDtoStatus", + "ListSessionsRequestSortOrder", + "UpdateSessionDtoMessagesItem", + "UpdateSessionDtoStatus", +] diff --git a/src/vapi/sessions/client.py b/src/vapi/sessions/client.py new file mode 100644 index 00000000..9a5c0dba --- /dev/null +++ b/src/vapi/sessions/client.py @@ -0,0 +1,875 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.request_options import RequestOptions +from ..types.assistant_overrides import AssistantOverrides +from ..types.create_assistant_dto import CreateAssistantDto +from ..types.create_customer_dto import CreateCustomerDto +from ..types.create_squad_dto import CreateSquadDto +from ..types.import_twilio_phone_number_dto import ImportTwilioPhoneNumberDto +from ..types.session import Session +from ..types.session_paginated_response import SessionPaginatedResponse +from .raw_client import AsyncRawSessionsClient, RawSessionsClient +from .types.create_session_dto_messages_item import CreateSessionDtoMessagesItem +from .types.create_session_dto_status import CreateSessionDtoStatus +from .types.list_sessions_request_sort_order import ListSessionsRequestSortOrder +from .types.update_session_dto_messages_item import UpdateSessionDtoMessagesItem +from .types.update_session_dto_status import UpdateSessionDtoStatus + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class SessionsClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawSessionsClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawSessionsClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawSessionsClient + """ + return self._raw_client + + def list( + self, + *, + id: typing.Optional[str] = None, + name: typing.Optional[str] = None, + assistant_id: typing.Optional[str] = None, + assistant_id_any: typing.Optional[str] = None, + squad_id: typing.Optional[str] = None, + workflow_id: typing.Optional[str] = None, + number_e_164_check_enabled: typing.Optional[bool] = None, + extension: typing.Optional[str] = None, + assistant_overrides: typing.Optional[str] = None, + number: typing.Optional[str] = None, + sip_uri: typing.Optional[str] = None, + email: typing.Optional[str] = None, + external_id: typing.Optional[str] = None, + customer_number_any: typing.Optional[str] = None, + phone_number_id: typing.Optional[str] = None, + phone_number_id_any: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, + page: typing.Optional[float] = None, + sort_order: typing.Optional[ListSessionsRequestSortOrder] = None, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> SessionPaginatedResponse: + """ + Parameters + ---------- + id : typing.Optional[str] + This is the unique identifier for the session to filter by. + + name : typing.Optional[str] + This is the name of the customer. This is just for your own reference. + + For SIP inbound calls, this is extracted from the `From` SIP header with format `"Display Name" `. + + assistant_id : typing.Optional[str] + This is the ID of the assistant to filter sessions by. + + assistant_id_any : typing.Optional[str] + Filter by multiple assistant IDs. Provide as comma-separated values. + + squad_id : typing.Optional[str] + This is the ID of the squad to filter sessions by. + + workflow_id : typing.Optional[str] + This is the ID of the workflow to filter sessions by. + + number_e_164_check_enabled : typing.Optional[bool] + This is the flag to toggle the E164 check for the `number` field. This is an advanced property which should be used if you know your use case requires it. + + Use cases: + - `false`: To allow non-E164 numbers like `+001234567890`, `1234`, or `abc`. This is useful for dialing out to non-E164 numbers on your SIP trunks. + - `true` (default): To allow only E164 numbers like `+14155551234`. This is standard for PSTN calls. + + If `false`, the `number` is still required to only contain alphanumeric characters (regex: `/^\\+?[a-zA-Z0-9]+$/`). + + @default true (E164 check is enabled) + + extension : typing.Optional[str] + This is the extension that will be dialed after the call is answered. + + assistant_overrides : typing.Optional[str] + These are the overrides for the assistant's settings and template variables specific to this customer. + This allows customization of the assistant's behavior for individual customers in batch calls. + + number : typing.Optional[str] + This is the number of the customer. + + sip_uri : typing.Optional[str] + This is the SIP URI of the customer. + + email : typing.Optional[str] + This is the email of the customer. + + external_id : typing.Optional[str] + This is the external ID of the customer. + + customer_number_any : typing.Optional[str] + Filter by any of the specified customer phone numbers (comma-separated). + + phone_number_id : typing.Optional[str] + This will return sessions with the specified phoneNumberId. + + phone_number_id_any : typing.Optional[typing.Union[str, typing.Sequence[str]]] + This will return sessions with any of the specified phoneNumberIds. + + page : typing.Optional[float] + This is the page number to return. Defaults to 1. + + sort_order : typing.Optional[ListSessionsRequestSortOrder] + This is the sort order for pagination. Defaults to 'DESC'. + + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + SessionPaginatedResponse + + + Examples + -------- + from vapi import Vapi + + client = Vapi( + token="YOUR_TOKEN", + ) + client.sessions.list( + assistant_id_any="assistant-1,assistant-2,assistant-3", + customer_number_any="+1234567890,+0987654321", + ) + """ + _response = self._raw_client.list( + id=id, + name=name, + assistant_id=assistant_id, + assistant_id_any=assistant_id_any, + squad_id=squad_id, + workflow_id=workflow_id, + number_e_164_check_enabled=number_e_164_check_enabled, + extension=extension, + assistant_overrides=assistant_overrides, + number=number, + sip_uri=sip_uri, + email=email, + external_id=external_id, + customer_number_any=customer_number_any, + phone_number_id=phone_number_id, + phone_number_id_any=phone_number_id_any, + page=page, + sort_order=sort_order, + limit=limit, + created_at_gt=created_at_gt, + created_at_lt=created_at_lt, + created_at_ge=created_at_ge, + created_at_le=created_at_le, + updated_at_gt=updated_at_gt, + updated_at_lt=updated_at_lt, + updated_at_ge=updated_at_ge, + updated_at_le=updated_at_le, + request_options=request_options, + ) + return _response.data + + def create( + self, + *, + name: typing.Optional[str] = OMIT, + status: typing.Optional[CreateSessionDtoStatus] = OMIT, + expiration_seconds: typing.Optional[float] = OMIT, + assistant_id: typing.Optional[str] = OMIT, + assistant: typing.Optional[CreateAssistantDto] = OMIT, + assistant_overrides: typing.Optional[AssistantOverrides] = OMIT, + squad_id: typing.Optional[str] = OMIT, + squad: typing.Optional[CreateSquadDto] = OMIT, + messages: typing.Optional[typing.Sequence[CreateSessionDtoMessagesItem]] = OMIT, + customer: typing.Optional[CreateCustomerDto] = OMIT, + customer_id: typing.Optional[str] = OMIT, + phone_number_id: typing.Optional[str] = OMIT, + phone_number: typing.Optional[ImportTwilioPhoneNumberDto] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> Session: + """ + Parameters + ---------- + name : typing.Optional[str] + This is a user-defined name for the session. Maximum length is 40 characters. + + status : typing.Optional[CreateSessionDtoStatus] + This is the current status of the session. Can be either 'active' or 'completed'. + + expiration_seconds : typing.Optional[float] + Session expiration time in seconds. Defaults to 24 hours (86400 seconds) if not set. + + assistant_id : typing.Optional[str] + This is the ID of the assistant associated with this session. Use this when referencing an existing assistant. + + assistant : typing.Optional[CreateAssistantDto] + This is the assistant configuration for this session. Use this when creating a new assistant configuration. + If assistantId is provided, this will be ignored. + + assistant_overrides : typing.Optional[AssistantOverrides] + These are the overrides for the assistant configuration. + Use this to provide variable values and other overrides when using assistantId. + Variable substitution will be applied to the assistant's messages and other text-based fields. + + squad_id : typing.Optional[str] + This is the squad ID associated with this session. Use this when referencing an existing squad. + + squad : typing.Optional[CreateSquadDto] + This is the squad configuration for this session. Use this when creating a new squad configuration. + If squadId is provided, this will be ignored. + + messages : typing.Optional[typing.Sequence[CreateSessionDtoMessagesItem]] + This is an array of chat messages in the session. + + customer : typing.Optional[CreateCustomerDto] + This is the customer information associated with this session. + + customer_id : typing.Optional[str] + This is the customerId of the customer associated with this session. + + phone_number_id : typing.Optional[str] + This is the ID of the phone number associated with this session. + + phone_number : typing.Optional[ImportTwilioPhoneNumberDto] + This is the phone number configuration for this session. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Session + + + Examples + -------- + from vapi import Vapi + + client = Vapi( + token="YOUR_TOKEN", + ) + client.sessions.create() + """ + _response = self._raw_client.create( + name=name, + status=status, + expiration_seconds=expiration_seconds, + assistant_id=assistant_id, + assistant=assistant, + assistant_overrides=assistant_overrides, + squad_id=squad_id, + squad=squad, + messages=messages, + customer=customer, + customer_id=customer_id, + phone_number_id=phone_number_id, + phone_number=phone_number, + request_options=request_options, + ) + return _response.data + + def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Session: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Session + + + Examples + -------- + from vapi import Vapi + + client = Vapi( + token="YOUR_TOKEN", + ) + client.sessions.get( + id="id", + ) + """ + _response = self._raw_client.get(id, request_options=request_options) + return _response.data + + def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Session: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Session + + + Examples + -------- + from vapi import Vapi + + client = Vapi( + token="YOUR_TOKEN", + ) + client.sessions.delete( + id="id", + ) + """ + _response = self._raw_client.delete(id, request_options=request_options) + return _response.data + + def update( + self, + id: str, + *, + name: typing.Optional[str] = OMIT, + status: typing.Optional[UpdateSessionDtoStatus] = OMIT, + expiration_seconds: typing.Optional[float] = OMIT, + messages: typing.Optional[typing.Sequence[UpdateSessionDtoMessagesItem]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> Session: + """ + Parameters + ---------- + id : str + + name : typing.Optional[str] + This is the new name for the session. Maximum length is 40 characters. + + status : typing.Optional[UpdateSessionDtoStatus] + This is the new status for the session. + + expiration_seconds : typing.Optional[float] + Session expiration time in seconds. Defaults to 24 hours (86400 seconds) if not set. + + messages : typing.Optional[typing.Sequence[UpdateSessionDtoMessagesItem]] + This is the updated array of chat messages. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Session + + + Examples + -------- + from vapi import Vapi + + client = Vapi( + token="YOUR_TOKEN", + ) + client.sessions.update( + id="id", + ) + """ + _response = self._raw_client.update( + id, + name=name, + status=status, + expiration_seconds=expiration_seconds, + messages=messages, + request_options=request_options, + ) + return _response.data + + +class AsyncSessionsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawSessionsClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawSessionsClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawSessionsClient + """ + return self._raw_client + + async def list( + self, + *, + id: typing.Optional[str] = None, + name: typing.Optional[str] = None, + assistant_id: typing.Optional[str] = None, + assistant_id_any: typing.Optional[str] = None, + squad_id: typing.Optional[str] = None, + workflow_id: typing.Optional[str] = None, + number_e_164_check_enabled: typing.Optional[bool] = None, + extension: typing.Optional[str] = None, + assistant_overrides: typing.Optional[str] = None, + number: typing.Optional[str] = None, + sip_uri: typing.Optional[str] = None, + email: typing.Optional[str] = None, + external_id: typing.Optional[str] = None, + customer_number_any: typing.Optional[str] = None, + phone_number_id: typing.Optional[str] = None, + phone_number_id_any: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, + page: typing.Optional[float] = None, + sort_order: typing.Optional[ListSessionsRequestSortOrder] = None, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> SessionPaginatedResponse: + """ + Parameters + ---------- + id : typing.Optional[str] + This is the unique identifier for the session to filter by. + + name : typing.Optional[str] + This is the name of the customer. This is just for your own reference. + + For SIP inbound calls, this is extracted from the `From` SIP header with format `"Display Name" `. + + assistant_id : typing.Optional[str] + This is the ID of the assistant to filter sessions by. + + assistant_id_any : typing.Optional[str] + Filter by multiple assistant IDs. Provide as comma-separated values. + + squad_id : typing.Optional[str] + This is the ID of the squad to filter sessions by. + + workflow_id : typing.Optional[str] + This is the ID of the workflow to filter sessions by. + + number_e_164_check_enabled : typing.Optional[bool] + This is the flag to toggle the E164 check for the `number` field. This is an advanced property which should be used if you know your use case requires it. + + Use cases: + - `false`: To allow non-E164 numbers like `+001234567890`, `1234`, or `abc`. This is useful for dialing out to non-E164 numbers on your SIP trunks. + - `true` (default): To allow only E164 numbers like `+14155551234`. This is standard for PSTN calls. + + If `false`, the `number` is still required to only contain alphanumeric characters (regex: `/^\\+?[a-zA-Z0-9]+$/`). + + @default true (E164 check is enabled) + + extension : typing.Optional[str] + This is the extension that will be dialed after the call is answered. + + assistant_overrides : typing.Optional[str] + These are the overrides for the assistant's settings and template variables specific to this customer. + This allows customization of the assistant's behavior for individual customers in batch calls. + + number : typing.Optional[str] + This is the number of the customer. + + sip_uri : typing.Optional[str] + This is the SIP URI of the customer. + + email : typing.Optional[str] + This is the email of the customer. + + external_id : typing.Optional[str] + This is the external ID of the customer. + + customer_number_any : typing.Optional[str] + Filter by any of the specified customer phone numbers (comma-separated). + + phone_number_id : typing.Optional[str] + This will return sessions with the specified phoneNumberId. + + phone_number_id_any : typing.Optional[typing.Union[str, typing.Sequence[str]]] + This will return sessions with any of the specified phoneNumberIds. + + page : typing.Optional[float] + This is the page number to return. Defaults to 1. + + sort_order : typing.Optional[ListSessionsRequestSortOrder] + This is the sort order for pagination. Defaults to 'DESC'. + + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + SessionPaginatedResponse + + + Examples + -------- + import asyncio + + from vapi import AsyncVapi + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.sessions.list( + assistant_id_any="assistant-1,assistant-2,assistant-3", + customer_number_any="+1234567890,+0987654321", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.list( + id=id, + name=name, + assistant_id=assistant_id, + assistant_id_any=assistant_id_any, + squad_id=squad_id, + workflow_id=workflow_id, + number_e_164_check_enabled=number_e_164_check_enabled, + extension=extension, + assistant_overrides=assistant_overrides, + number=number, + sip_uri=sip_uri, + email=email, + external_id=external_id, + customer_number_any=customer_number_any, + phone_number_id=phone_number_id, + phone_number_id_any=phone_number_id_any, + page=page, + sort_order=sort_order, + limit=limit, + created_at_gt=created_at_gt, + created_at_lt=created_at_lt, + created_at_ge=created_at_ge, + created_at_le=created_at_le, + updated_at_gt=updated_at_gt, + updated_at_lt=updated_at_lt, + updated_at_ge=updated_at_ge, + updated_at_le=updated_at_le, + request_options=request_options, + ) + return _response.data + + async def create( + self, + *, + name: typing.Optional[str] = OMIT, + status: typing.Optional[CreateSessionDtoStatus] = OMIT, + expiration_seconds: typing.Optional[float] = OMIT, + assistant_id: typing.Optional[str] = OMIT, + assistant: typing.Optional[CreateAssistantDto] = OMIT, + assistant_overrides: typing.Optional[AssistantOverrides] = OMIT, + squad_id: typing.Optional[str] = OMIT, + squad: typing.Optional[CreateSquadDto] = OMIT, + messages: typing.Optional[typing.Sequence[CreateSessionDtoMessagesItem]] = OMIT, + customer: typing.Optional[CreateCustomerDto] = OMIT, + customer_id: typing.Optional[str] = OMIT, + phone_number_id: typing.Optional[str] = OMIT, + phone_number: typing.Optional[ImportTwilioPhoneNumberDto] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> Session: + """ + Parameters + ---------- + name : typing.Optional[str] + This is a user-defined name for the session. Maximum length is 40 characters. + + status : typing.Optional[CreateSessionDtoStatus] + This is the current status of the session. Can be either 'active' or 'completed'. + + expiration_seconds : typing.Optional[float] + Session expiration time in seconds. Defaults to 24 hours (86400 seconds) if not set. + + assistant_id : typing.Optional[str] + This is the ID of the assistant associated with this session. Use this when referencing an existing assistant. + + assistant : typing.Optional[CreateAssistantDto] + This is the assistant configuration for this session. Use this when creating a new assistant configuration. + If assistantId is provided, this will be ignored. + + assistant_overrides : typing.Optional[AssistantOverrides] + These are the overrides for the assistant configuration. + Use this to provide variable values and other overrides when using assistantId. + Variable substitution will be applied to the assistant's messages and other text-based fields. + + squad_id : typing.Optional[str] + This is the squad ID associated with this session. Use this when referencing an existing squad. + + squad : typing.Optional[CreateSquadDto] + This is the squad configuration for this session. Use this when creating a new squad configuration. + If squadId is provided, this will be ignored. + + messages : typing.Optional[typing.Sequence[CreateSessionDtoMessagesItem]] + This is an array of chat messages in the session. + + customer : typing.Optional[CreateCustomerDto] + This is the customer information associated with this session. + + customer_id : typing.Optional[str] + This is the customerId of the customer associated with this session. + + phone_number_id : typing.Optional[str] + This is the ID of the phone number associated with this session. + + phone_number : typing.Optional[ImportTwilioPhoneNumberDto] + This is the phone number configuration for this session. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Session + + + Examples + -------- + import asyncio + + from vapi import AsyncVapi + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.sessions.create() + + + asyncio.run(main()) + """ + _response = await self._raw_client.create( + name=name, + status=status, + expiration_seconds=expiration_seconds, + assistant_id=assistant_id, + assistant=assistant, + assistant_overrides=assistant_overrides, + squad_id=squad_id, + squad=squad, + messages=messages, + customer=customer, + customer_id=customer_id, + phone_number_id=phone_number_id, + phone_number=phone_number, + request_options=request_options, + ) + return _response.data + + async def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Session: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Session + + + Examples + -------- + import asyncio + + from vapi import AsyncVapi + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.sessions.get( + id="id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.get(id, request_options=request_options) + return _response.data + + async def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Session: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Session + + + Examples + -------- + import asyncio + + from vapi import AsyncVapi + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.sessions.delete( + id="id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.delete(id, request_options=request_options) + return _response.data + + async def update( + self, + id: str, + *, + name: typing.Optional[str] = OMIT, + status: typing.Optional[UpdateSessionDtoStatus] = OMIT, + expiration_seconds: typing.Optional[float] = OMIT, + messages: typing.Optional[typing.Sequence[UpdateSessionDtoMessagesItem]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> Session: + """ + Parameters + ---------- + id : str + + name : typing.Optional[str] + This is the new name for the session. Maximum length is 40 characters. + + status : typing.Optional[UpdateSessionDtoStatus] + This is the new status for the session. + + expiration_seconds : typing.Optional[float] + Session expiration time in seconds. Defaults to 24 hours (86400 seconds) if not set. + + messages : typing.Optional[typing.Sequence[UpdateSessionDtoMessagesItem]] + This is the updated array of chat messages. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Session + + + Examples + -------- + import asyncio + + from vapi import AsyncVapi + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.sessions.update( + id="id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.update( + id, + name=name, + status=status, + expiration_seconds=expiration_seconds, + messages=messages, + request_options=request_options, + ) + return _response.data diff --git a/src/vapi/sessions/raw_client.py b/src/vapi/sessions/raw_client.py new file mode 100644 index 00000000..b4441c8b --- /dev/null +++ b/src/vapi/sessions/raw_client.py @@ -0,0 +1,969 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing +from json.decoder import JSONDecodeError + +from ..core.api_error import ApiError +from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.datetime_utils import serialize_datetime +from ..core.http_response import AsyncHttpResponse, HttpResponse +from ..core.jsonable_encoder import jsonable_encoder +from ..core.parse_error import ParsingError +from ..core.request_options import RequestOptions +from ..core.serialization import convert_and_respect_annotation_metadata +from ..core.unchecked_base_model import construct_type +from ..types.assistant_overrides import AssistantOverrides +from ..types.create_assistant_dto import CreateAssistantDto +from ..types.create_customer_dto import CreateCustomerDto +from ..types.create_squad_dto import CreateSquadDto +from ..types.import_twilio_phone_number_dto import ImportTwilioPhoneNumberDto +from ..types.session import Session +from ..types.session_paginated_response import SessionPaginatedResponse +from .types.create_session_dto_messages_item import CreateSessionDtoMessagesItem +from .types.create_session_dto_status import CreateSessionDtoStatus +from .types.list_sessions_request_sort_order import ListSessionsRequestSortOrder +from .types.update_session_dto_messages_item import UpdateSessionDtoMessagesItem +from .types.update_session_dto_status import UpdateSessionDtoStatus +from pydantic import ValidationError + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class RawSessionsClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def list( + self, + *, + id: typing.Optional[str] = None, + name: typing.Optional[str] = None, + assistant_id: typing.Optional[str] = None, + assistant_id_any: typing.Optional[str] = None, + squad_id: typing.Optional[str] = None, + workflow_id: typing.Optional[str] = None, + number_e_164_check_enabled: typing.Optional[bool] = None, + extension: typing.Optional[str] = None, + assistant_overrides: typing.Optional[str] = None, + number: typing.Optional[str] = None, + sip_uri: typing.Optional[str] = None, + email: typing.Optional[str] = None, + external_id: typing.Optional[str] = None, + customer_number_any: typing.Optional[str] = None, + phone_number_id: typing.Optional[str] = None, + phone_number_id_any: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, + page: typing.Optional[float] = None, + sort_order: typing.Optional[ListSessionsRequestSortOrder] = None, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[SessionPaginatedResponse]: + """ + Parameters + ---------- + id : typing.Optional[str] + This is the unique identifier for the session to filter by. + + name : typing.Optional[str] + This is the name of the customer. This is just for your own reference. + + For SIP inbound calls, this is extracted from the `From` SIP header with format `"Display Name" `. + + assistant_id : typing.Optional[str] + This is the ID of the assistant to filter sessions by. + + assistant_id_any : typing.Optional[str] + Filter by multiple assistant IDs. Provide as comma-separated values. + + squad_id : typing.Optional[str] + This is the ID of the squad to filter sessions by. + + workflow_id : typing.Optional[str] + This is the ID of the workflow to filter sessions by. + + number_e_164_check_enabled : typing.Optional[bool] + This is the flag to toggle the E164 check for the `number` field. This is an advanced property which should be used if you know your use case requires it. + + Use cases: + - `false`: To allow non-E164 numbers like `+001234567890`, `1234`, or `abc`. This is useful for dialing out to non-E164 numbers on your SIP trunks. + - `true` (default): To allow only E164 numbers like `+14155551234`. This is standard for PSTN calls. + + If `false`, the `number` is still required to only contain alphanumeric characters (regex: `/^\\+?[a-zA-Z0-9]+$/`). + + @default true (E164 check is enabled) + + extension : typing.Optional[str] + This is the extension that will be dialed after the call is answered. + + assistant_overrides : typing.Optional[str] + These are the overrides for the assistant's settings and template variables specific to this customer. + This allows customization of the assistant's behavior for individual customers in batch calls. + + number : typing.Optional[str] + This is the number of the customer. + + sip_uri : typing.Optional[str] + This is the SIP URI of the customer. + + email : typing.Optional[str] + This is the email of the customer. + + external_id : typing.Optional[str] + This is the external ID of the customer. + + customer_number_any : typing.Optional[str] + Filter by any of the specified customer phone numbers (comma-separated). + + phone_number_id : typing.Optional[str] + This will return sessions with the specified phoneNumberId. + + phone_number_id_any : typing.Optional[typing.Union[str, typing.Sequence[str]]] + This will return sessions with any of the specified phoneNumberIds. + + page : typing.Optional[float] + This is the page number to return. Defaults to 1. + + sort_order : typing.Optional[ListSessionsRequestSortOrder] + This is the sort order for pagination. Defaults to 'DESC'. + + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[SessionPaginatedResponse] + + """ + _response = self._client_wrapper.httpx_client.request( + "session", + method="GET", + params={ + "id": id, + "name": name, + "assistantId": assistant_id, + "assistantIdAny": assistant_id_any, + "squadId": squad_id, + "workflowId": workflow_id, + "numberE164CheckEnabled": number_e_164_check_enabled, + "extension": extension, + "assistantOverrides": assistant_overrides, + "number": number, + "sipUri": sip_uri, + "email": email, + "externalId": external_id, + "customerNumberAny": customer_number_any, + "phoneNumberId": phone_number_id, + "phoneNumberIdAny": phone_number_id_any, + "page": page, + "sortOrder": sort_order, + "limit": limit, + "createdAtGt": serialize_datetime(created_at_gt) if created_at_gt is not None else None, + "createdAtLt": serialize_datetime(created_at_lt) if created_at_lt is not None else None, + "createdAtGe": serialize_datetime(created_at_ge) if created_at_ge is not None else None, + "createdAtLe": serialize_datetime(created_at_le) if created_at_le is not None else None, + "updatedAtGt": serialize_datetime(updated_at_gt) if updated_at_gt is not None else None, + "updatedAtLt": serialize_datetime(updated_at_lt) if updated_at_lt is not None else None, + "updatedAtGe": serialize_datetime(updated_at_ge) if updated_at_ge is not None else None, + "updatedAtLe": serialize_datetime(updated_at_le) if updated_at_le is not None else None, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + SessionPaginatedResponse, + construct_type( + type_=SessionPaginatedResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def create( + self, + *, + name: typing.Optional[str] = OMIT, + status: typing.Optional[CreateSessionDtoStatus] = OMIT, + expiration_seconds: typing.Optional[float] = OMIT, + assistant_id: typing.Optional[str] = OMIT, + assistant: typing.Optional[CreateAssistantDto] = OMIT, + assistant_overrides: typing.Optional[AssistantOverrides] = OMIT, + squad_id: typing.Optional[str] = OMIT, + squad: typing.Optional[CreateSquadDto] = OMIT, + messages: typing.Optional[typing.Sequence[CreateSessionDtoMessagesItem]] = OMIT, + customer: typing.Optional[CreateCustomerDto] = OMIT, + customer_id: typing.Optional[str] = OMIT, + phone_number_id: typing.Optional[str] = OMIT, + phone_number: typing.Optional[ImportTwilioPhoneNumberDto] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[Session]: + """ + Parameters + ---------- + name : typing.Optional[str] + This is a user-defined name for the session. Maximum length is 40 characters. + + status : typing.Optional[CreateSessionDtoStatus] + This is the current status of the session. Can be either 'active' or 'completed'. + + expiration_seconds : typing.Optional[float] + Session expiration time in seconds. Defaults to 24 hours (86400 seconds) if not set. + + assistant_id : typing.Optional[str] + This is the ID of the assistant associated with this session. Use this when referencing an existing assistant. + + assistant : typing.Optional[CreateAssistantDto] + This is the assistant configuration for this session. Use this when creating a new assistant configuration. + If assistantId is provided, this will be ignored. + + assistant_overrides : typing.Optional[AssistantOverrides] + These are the overrides for the assistant configuration. + Use this to provide variable values and other overrides when using assistantId. + Variable substitution will be applied to the assistant's messages and other text-based fields. + + squad_id : typing.Optional[str] + This is the squad ID associated with this session. Use this when referencing an existing squad. + + squad : typing.Optional[CreateSquadDto] + This is the squad configuration for this session. Use this when creating a new squad configuration. + If squadId is provided, this will be ignored. + + messages : typing.Optional[typing.Sequence[CreateSessionDtoMessagesItem]] + This is an array of chat messages in the session. + + customer : typing.Optional[CreateCustomerDto] + This is the customer information associated with this session. + + customer_id : typing.Optional[str] + This is the customerId of the customer associated with this session. + + phone_number_id : typing.Optional[str] + This is the ID of the phone number associated with this session. + + phone_number : typing.Optional[ImportTwilioPhoneNumberDto] + This is the phone number configuration for this session. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[Session] + + """ + _response = self._client_wrapper.httpx_client.request( + "session", + method="POST", + json={ + "name": name, + "status": status, + "expirationSeconds": expiration_seconds, + "assistantId": assistant_id, + "assistant": convert_and_respect_annotation_metadata( + object_=assistant, annotation=CreateAssistantDto, direction="write" + ), + "assistantOverrides": convert_and_respect_annotation_metadata( + object_=assistant_overrides, annotation=AssistantOverrides, direction="write" + ), + "squadId": squad_id, + "squad": convert_and_respect_annotation_metadata( + object_=squad, annotation=CreateSquadDto, direction="write" + ), + "messages": convert_and_respect_annotation_metadata( + object_=messages, annotation=typing.Sequence[CreateSessionDtoMessagesItem], direction="write" + ), + "customer": convert_and_respect_annotation_metadata( + object_=customer, annotation=CreateCustomerDto, direction="write" + ), + "customerId": customer_id, + "phoneNumberId": phone_number_id, + "phoneNumber": convert_and_respect_annotation_metadata( + object_=phone_number, annotation=ImportTwilioPhoneNumberDto, direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Session, + construct_type( + type_=Session, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[Session]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[Session] + + """ + _response = self._client_wrapper.httpx_client.request( + f"session/{jsonable_encoder(id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Session, + construct_type( + type_=Session, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[Session]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[Session] + + """ + _response = self._client_wrapper.httpx_client.request( + f"session/{jsonable_encoder(id)}", + method="DELETE", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Session, + construct_type( + type_=Session, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def update( + self, + id: str, + *, + name: typing.Optional[str] = OMIT, + status: typing.Optional[UpdateSessionDtoStatus] = OMIT, + expiration_seconds: typing.Optional[float] = OMIT, + messages: typing.Optional[typing.Sequence[UpdateSessionDtoMessagesItem]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[Session]: + """ + Parameters + ---------- + id : str + + name : typing.Optional[str] + This is the new name for the session. Maximum length is 40 characters. + + status : typing.Optional[UpdateSessionDtoStatus] + This is the new status for the session. + + expiration_seconds : typing.Optional[float] + Session expiration time in seconds. Defaults to 24 hours (86400 seconds) if not set. + + messages : typing.Optional[typing.Sequence[UpdateSessionDtoMessagesItem]] + This is the updated array of chat messages. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[Session] + + """ + _response = self._client_wrapper.httpx_client.request( + f"session/{jsonable_encoder(id)}", + method="PATCH", + json={ + "name": name, + "status": status, + "expirationSeconds": expiration_seconds, + "messages": convert_and_respect_annotation_metadata( + object_=messages, annotation=typing.Sequence[UpdateSessionDtoMessagesItem], direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Session, + construct_type( + type_=Session, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawSessionsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def list( + self, + *, + id: typing.Optional[str] = None, + name: typing.Optional[str] = None, + assistant_id: typing.Optional[str] = None, + assistant_id_any: typing.Optional[str] = None, + squad_id: typing.Optional[str] = None, + workflow_id: typing.Optional[str] = None, + number_e_164_check_enabled: typing.Optional[bool] = None, + extension: typing.Optional[str] = None, + assistant_overrides: typing.Optional[str] = None, + number: typing.Optional[str] = None, + sip_uri: typing.Optional[str] = None, + email: typing.Optional[str] = None, + external_id: typing.Optional[str] = None, + customer_number_any: typing.Optional[str] = None, + phone_number_id: typing.Optional[str] = None, + phone_number_id_any: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, + page: typing.Optional[float] = None, + sort_order: typing.Optional[ListSessionsRequestSortOrder] = None, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[SessionPaginatedResponse]: + """ + Parameters + ---------- + id : typing.Optional[str] + This is the unique identifier for the session to filter by. + + name : typing.Optional[str] + This is the name of the customer. This is just for your own reference. + + For SIP inbound calls, this is extracted from the `From` SIP header with format `"Display Name" `. + + assistant_id : typing.Optional[str] + This is the ID of the assistant to filter sessions by. + + assistant_id_any : typing.Optional[str] + Filter by multiple assistant IDs. Provide as comma-separated values. + + squad_id : typing.Optional[str] + This is the ID of the squad to filter sessions by. + + workflow_id : typing.Optional[str] + This is the ID of the workflow to filter sessions by. + + number_e_164_check_enabled : typing.Optional[bool] + This is the flag to toggle the E164 check for the `number` field. This is an advanced property which should be used if you know your use case requires it. + + Use cases: + - `false`: To allow non-E164 numbers like `+001234567890`, `1234`, or `abc`. This is useful for dialing out to non-E164 numbers on your SIP trunks. + - `true` (default): To allow only E164 numbers like `+14155551234`. This is standard for PSTN calls. + + If `false`, the `number` is still required to only contain alphanumeric characters (regex: `/^\\+?[a-zA-Z0-9]+$/`). + + @default true (E164 check is enabled) + + extension : typing.Optional[str] + This is the extension that will be dialed after the call is answered. + + assistant_overrides : typing.Optional[str] + These are the overrides for the assistant's settings and template variables specific to this customer. + This allows customization of the assistant's behavior for individual customers in batch calls. + + number : typing.Optional[str] + This is the number of the customer. + + sip_uri : typing.Optional[str] + This is the SIP URI of the customer. + + email : typing.Optional[str] + This is the email of the customer. + + external_id : typing.Optional[str] + This is the external ID of the customer. + + customer_number_any : typing.Optional[str] + Filter by any of the specified customer phone numbers (comma-separated). + + phone_number_id : typing.Optional[str] + This will return sessions with the specified phoneNumberId. + + phone_number_id_any : typing.Optional[typing.Union[str, typing.Sequence[str]]] + This will return sessions with any of the specified phoneNumberIds. + + page : typing.Optional[float] + This is the page number to return. Defaults to 1. + + sort_order : typing.Optional[ListSessionsRequestSortOrder] + This is the sort order for pagination. Defaults to 'DESC'. + + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[SessionPaginatedResponse] + + """ + _response = await self._client_wrapper.httpx_client.request( + "session", + method="GET", + params={ + "id": id, + "name": name, + "assistantId": assistant_id, + "assistantIdAny": assistant_id_any, + "squadId": squad_id, + "workflowId": workflow_id, + "numberE164CheckEnabled": number_e_164_check_enabled, + "extension": extension, + "assistantOverrides": assistant_overrides, + "number": number, + "sipUri": sip_uri, + "email": email, + "externalId": external_id, + "customerNumberAny": customer_number_any, + "phoneNumberId": phone_number_id, + "phoneNumberIdAny": phone_number_id_any, + "page": page, + "sortOrder": sort_order, + "limit": limit, + "createdAtGt": serialize_datetime(created_at_gt) if created_at_gt is not None else None, + "createdAtLt": serialize_datetime(created_at_lt) if created_at_lt is not None else None, + "createdAtGe": serialize_datetime(created_at_ge) if created_at_ge is not None else None, + "createdAtLe": serialize_datetime(created_at_le) if created_at_le is not None else None, + "updatedAtGt": serialize_datetime(updated_at_gt) if updated_at_gt is not None else None, + "updatedAtLt": serialize_datetime(updated_at_lt) if updated_at_lt is not None else None, + "updatedAtGe": serialize_datetime(updated_at_ge) if updated_at_ge is not None else None, + "updatedAtLe": serialize_datetime(updated_at_le) if updated_at_le is not None else None, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + SessionPaginatedResponse, + construct_type( + type_=SessionPaginatedResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def create( + self, + *, + name: typing.Optional[str] = OMIT, + status: typing.Optional[CreateSessionDtoStatus] = OMIT, + expiration_seconds: typing.Optional[float] = OMIT, + assistant_id: typing.Optional[str] = OMIT, + assistant: typing.Optional[CreateAssistantDto] = OMIT, + assistant_overrides: typing.Optional[AssistantOverrides] = OMIT, + squad_id: typing.Optional[str] = OMIT, + squad: typing.Optional[CreateSquadDto] = OMIT, + messages: typing.Optional[typing.Sequence[CreateSessionDtoMessagesItem]] = OMIT, + customer: typing.Optional[CreateCustomerDto] = OMIT, + customer_id: typing.Optional[str] = OMIT, + phone_number_id: typing.Optional[str] = OMIT, + phone_number: typing.Optional[ImportTwilioPhoneNumberDto] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[Session]: + """ + Parameters + ---------- + name : typing.Optional[str] + This is a user-defined name for the session. Maximum length is 40 characters. + + status : typing.Optional[CreateSessionDtoStatus] + This is the current status of the session. Can be either 'active' or 'completed'. + + expiration_seconds : typing.Optional[float] + Session expiration time in seconds. Defaults to 24 hours (86400 seconds) if not set. + + assistant_id : typing.Optional[str] + This is the ID of the assistant associated with this session. Use this when referencing an existing assistant. + + assistant : typing.Optional[CreateAssistantDto] + This is the assistant configuration for this session. Use this when creating a new assistant configuration. + If assistantId is provided, this will be ignored. + + assistant_overrides : typing.Optional[AssistantOverrides] + These are the overrides for the assistant configuration. + Use this to provide variable values and other overrides when using assistantId. + Variable substitution will be applied to the assistant's messages and other text-based fields. + + squad_id : typing.Optional[str] + This is the squad ID associated with this session. Use this when referencing an existing squad. + + squad : typing.Optional[CreateSquadDto] + This is the squad configuration for this session. Use this when creating a new squad configuration. + If squadId is provided, this will be ignored. + + messages : typing.Optional[typing.Sequence[CreateSessionDtoMessagesItem]] + This is an array of chat messages in the session. + + customer : typing.Optional[CreateCustomerDto] + This is the customer information associated with this session. + + customer_id : typing.Optional[str] + This is the customerId of the customer associated with this session. + + phone_number_id : typing.Optional[str] + This is the ID of the phone number associated with this session. + + phone_number : typing.Optional[ImportTwilioPhoneNumberDto] + This is the phone number configuration for this session. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[Session] + + """ + _response = await self._client_wrapper.httpx_client.request( + "session", + method="POST", + json={ + "name": name, + "status": status, + "expirationSeconds": expiration_seconds, + "assistantId": assistant_id, + "assistant": convert_and_respect_annotation_metadata( + object_=assistant, annotation=CreateAssistantDto, direction="write" + ), + "assistantOverrides": convert_and_respect_annotation_metadata( + object_=assistant_overrides, annotation=AssistantOverrides, direction="write" + ), + "squadId": squad_id, + "squad": convert_and_respect_annotation_metadata( + object_=squad, annotation=CreateSquadDto, direction="write" + ), + "messages": convert_and_respect_annotation_metadata( + object_=messages, annotation=typing.Sequence[CreateSessionDtoMessagesItem], direction="write" + ), + "customer": convert_and_respect_annotation_metadata( + object_=customer, annotation=CreateCustomerDto, direction="write" + ), + "customerId": customer_id, + "phoneNumberId": phone_number_id, + "phoneNumber": convert_and_respect_annotation_metadata( + object_=phone_number, annotation=ImportTwilioPhoneNumberDto, direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Session, + construct_type( + type_=Session, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def get( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[Session]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[Session] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"session/{jsonable_encoder(id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Session, + construct_type( + type_=Session, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def delete( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[Session]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[Session] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"session/{jsonable_encoder(id)}", + method="DELETE", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Session, + construct_type( + type_=Session, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def update( + self, + id: str, + *, + name: typing.Optional[str] = OMIT, + status: typing.Optional[UpdateSessionDtoStatus] = OMIT, + expiration_seconds: typing.Optional[float] = OMIT, + messages: typing.Optional[typing.Sequence[UpdateSessionDtoMessagesItem]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[Session]: + """ + Parameters + ---------- + id : str + + name : typing.Optional[str] + This is the new name for the session. Maximum length is 40 characters. + + status : typing.Optional[UpdateSessionDtoStatus] + This is the new status for the session. + + expiration_seconds : typing.Optional[float] + Session expiration time in seconds. Defaults to 24 hours (86400 seconds) if not set. + + messages : typing.Optional[typing.Sequence[UpdateSessionDtoMessagesItem]] + This is the updated array of chat messages. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[Session] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"session/{jsonable_encoder(id)}", + method="PATCH", + json={ + "name": name, + "status": status, + "expirationSeconds": expiration_seconds, + "messages": convert_and_respect_annotation_metadata( + object_=messages, annotation=typing.Sequence[UpdateSessionDtoMessagesItem], direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Session, + construct_type( + type_=Session, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/vapi/sessions/types/__init__.py b/src/vapi/sessions/types/__init__.py new file mode 100644 index 00000000..e849c710 --- /dev/null +++ b/src/vapi/sessions/types/__init__.py @@ -0,0 +1,50 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .create_session_dto_messages_item import CreateSessionDtoMessagesItem + from .create_session_dto_status import CreateSessionDtoStatus + from .list_sessions_request_sort_order import ListSessionsRequestSortOrder + from .update_session_dto_messages_item import UpdateSessionDtoMessagesItem + from .update_session_dto_status import UpdateSessionDtoStatus +_dynamic_imports: typing.Dict[str, str] = { + "CreateSessionDtoMessagesItem": ".create_session_dto_messages_item", + "CreateSessionDtoStatus": ".create_session_dto_status", + "ListSessionsRequestSortOrder": ".list_sessions_request_sort_order", + "UpdateSessionDtoMessagesItem": ".update_session_dto_messages_item", + "UpdateSessionDtoStatus": ".update_session_dto_status", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = [ + "CreateSessionDtoMessagesItem", + "CreateSessionDtoStatus", + "ListSessionsRequestSortOrder", + "UpdateSessionDtoMessagesItem", + "UpdateSessionDtoStatus", +] diff --git a/src/vapi/sessions/types/create_session_dto_messages_item.py b/src/vapi/sessions/types/create_session_dto_messages_item.py new file mode 100644 index 00000000..83b9ed9e --- /dev/null +++ b/src/vapi/sessions/types/create_session_dto_messages_item.py @@ -0,0 +1,11 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from ...types.assistant_message import AssistantMessage +from ...types.developer_message import DeveloperMessage +from ...types.system_message import SystemMessage +from ...types.tool_message import ToolMessage +from ...types.user_message import UserMessage + +CreateSessionDtoMessagesItem = typing.Union[SystemMessage, UserMessage, AssistantMessage, ToolMessage, DeveloperMessage] diff --git a/src/vapi/sessions/types/create_session_dto_status.py b/src/vapi/sessions/types/create_session_dto_status.py new file mode 100644 index 00000000..e9944189 --- /dev/null +++ b/src/vapi/sessions/types/create_session_dto_status.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CreateSessionDtoStatus = typing.Union[typing.Literal["active", "completed"], typing.Any] diff --git a/src/vapi/sessions/types/list_sessions_request_sort_order.py b/src/vapi/sessions/types/list_sessions_request_sort_order.py new file mode 100644 index 00000000..906e6383 --- /dev/null +++ b/src/vapi/sessions/types/list_sessions_request_sort_order.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ListSessionsRequestSortOrder = typing.Union[typing.Literal["ASC", "DESC"], typing.Any] diff --git a/src/vapi/sessions/types/update_session_dto_messages_item.py b/src/vapi/sessions/types/update_session_dto_messages_item.py new file mode 100644 index 00000000..ff160892 --- /dev/null +++ b/src/vapi/sessions/types/update_session_dto_messages_item.py @@ -0,0 +1,11 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from ...types.assistant_message import AssistantMessage +from ...types.developer_message import DeveloperMessage +from ...types.system_message import SystemMessage +from ...types.tool_message import ToolMessage +from ...types.user_message import UserMessage + +UpdateSessionDtoMessagesItem = typing.Union[SystemMessage, UserMessage, AssistantMessage, ToolMessage, DeveloperMessage] diff --git a/src/vapi/sessions/types/update_session_dto_status.py b/src/vapi/sessions/types/update_session_dto_status.py new file mode 100644 index 00000000..6363377e --- /dev/null +++ b/src/vapi/sessions/types/update_session_dto_status.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +UpdateSessionDtoStatus = typing.Union[typing.Literal["active", "completed"], typing.Any] diff --git a/src/vapi/squads/__init__.py b/src/vapi/squads/__init__.py index f3ea2659..5cde0202 100644 --- a/src/vapi/squads/__init__.py +++ b/src/vapi/squads/__init__.py @@ -1,2 +1,4 @@ # This file was auto-generated by Fern from our API Definition. +# isort: skip_file + diff --git a/src/vapi/squads/client.py b/src/vapi/squads/client.py index 6908413d..206efd37 100644 --- a/src/vapi/squads/client.py +++ b/src/vapi/squads/client.py @@ -1,19 +1,14 @@ # This file was auto-generated by Fern from our API Definition. -import typing -from ..core.client_wrapper import SyncClientWrapper import datetime as dt +import typing + +from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ..core.request_options import RequestOptions +from ..types.assistant_overrides import AssistantOverrides from ..types.squad import Squad -from ..core.datetime_utils import serialize_datetime -from ..core.pydantic_utilities import parse_obj_as -from json.decoder import JSONDecodeError -from ..core.api_error import ApiError from ..types.squad_member_dto import SquadMemberDto -from ..types.assistant_overrides import AssistantOverrides -from ..core.serialization import convert_and_respect_annotation_metadata -from ..core.jsonable_encoder import jsonable_encoder -from ..core.client_wrapper import AsyncClientWrapper +from .raw_client import AsyncRawSquadsClient, RawSquadsClient # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -21,7 +16,18 @@ class SquadsClient: def __init__(self, *, client_wrapper: SyncClientWrapper): - self._client_wrapper = client_wrapper + self._raw_client = RawSquadsClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawSquadsClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawSquadsClient + """ + return self._raw_client def list( self, @@ -84,35 +90,19 @@ def list( ) client.squads.list() """ - _response = self._client_wrapper.httpx_client.request( - "squad", - method="GET", - params={ - "limit": limit, - "createdAtGt": serialize_datetime(created_at_gt) if created_at_gt is not None else None, - "createdAtLt": serialize_datetime(created_at_lt) if created_at_lt is not None else None, - "createdAtGe": serialize_datetime(created_at_ge) if created_at_ge is not None else None, - "createdAtLe": serialize_datetime(created_at_le) if created_at_le is not None else None, - "updatedAtGt": serialize_datetime(updated_at_gt) if updated_at_gt is not None else None, - "updatedAtLt": serialize_datetime(updated_at_lt) if updated_at_lt is not None else None, - "updatedAtGe": serialize_datetime(updated_at_ge) if updated_at_ge is not None else None, - "updatedAtLe": serialize_datetime(updated_at_le) if updated_at_le is not None else None, - }, + _response = self._raw_client.list( + limit=limit, + created_at_gt=created_at_gt, + created_at_lt=created_at_lt, + created_at_ge=created_at_ge, + created_at_le=created_at_le, + updated_at_gt=updated_at_gt, + updated_at_lt=updated_at_lt, + updated_at_ge=updated_at_ge, + updated_at_le=updated_at_le, request_options=request_options, ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - typing.List[Squad], - parse_obj_as( - type_=typing.List[Squad], # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + return _response.data def create( self, @@ -157,34 +147,10 @@ def create( members=[SquadMemberDto()], ) """ - _response = self._client_wrapper.httpx_client.request( - "squad", - method="POST", - json={ - "name": name, - "members": convert_and_respect_annotation_metadata( - object_=members, annotation=typing.Sequence[SquadMemberDto], direction="write" - ), - "membersOverrides": convert_and_respect_annotation_metadata( - object_=members_overrides, annotation=AssistantOverrides, direction="write" - ), - }, - request_options=request_options, - omit=OMIT, + _response = self._raw_client.create( + members=members, name=name, members_overrides=members_overrides, request_options=request_options ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - Squad, - parse_obj_as( - type_=Squad, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + return _response.data def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Squad: """ @@ -211,24 +177,8 @@ def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = Non id="id", ) """ - _response = self._client_wrapper.httpx_client.request( - f"squad/{jsonable_encoder(id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - Squad, - parse_obj_as( - type_=Squad, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = self._raw_client.get(id, request_options=request_options) + return _response.data def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Squad: """ @@ -255,24 +205,8 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = id="id", ) """ - _response = self._client_wrapper.httpx_client.request( - f"squad/{jsonable_encoder(id)}", - method="DELETE", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - Squad, - parse_obj_as( - type_=Squad, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = self._raw_client.delete(id, request_options=request_options) + return _response.data def update( self, @@ -321,39 +255,26 @@ def update( members=[SquadMemberDto()], ) """ - _response = self._client_wrapper.httpx_client.request( - f"squad/{jsonable_encoder(id)}", - method="PATCH", - json={ - "name": name, - "members": convert_and_respect_annotation_metadata( - object_=members, annotation=typing.Sequence[SquadMemberDto], direction="write" - ), - "membersOverrides": convert_and_respect_annotation_metadata( - object_=members_overrides, annotation=AssistantOverrides, direction="write" - ), - }, - request_options=request_options, - omit=OMIT, + _response = self._raw_client.update( + id, members=members, name=name, members_overrides=members_overrides, request_options=request_options ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - Squad, - parse_obj_as( - type_=Squad, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + return _response.data class AsyncSquadsClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper + self._raw_client = AsyncRawSquadsClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawSquadsClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawSquadsClient + """ + return self._raw_client async def list( self, @@ -424,35 +345,19 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - "squad", - method="GET", - params={ - "limit": limit, - "createdAtGt": serialize_datetime(created_at_gt) if created_at_gt is not None else None, - "createdAtLt": serialize_datetime(created_at_lt) if created_at_lt is not None else None, - "createdAtGe": serialize_datetime(created_at_ge) if created_at_ge is not None else None, - "createdAtLe": serialize_datetime(created_at_le) if created_at_le is not None else None, - "updatedAtGt": serialize_datetime(updated_at_gt) if updated_at_gt is not None else None, - "updatedAtLt": serialize_datetime(updated_at_lt) if updated_at_lt is not None else None, - "updatedAtGe": serialize_datetime(updated_at_ge) if updated_at_ge is not None else None, - "updatedAtLe": serialize_datetime(updated_at_le) if updated_at_le is not None else None, - }, + _response = await self._raw_client.list( + limit=limit, + created_at_gt=created_at_gt, + created_at_lt=created_at_lt, + created_at_ge=created_at_ge, + created_at_le=created_at_le, + updated_at_gt=updated_at_gt, + updated_at_lt=updated_at_lt, + updated_at_ge=updated_at_ge, + updated_at_le=updated_at_le, request_options=request_options, ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - typing.List[Squad], - parse_obj_as( - type_=typing.List[Squad], # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + return _response.data async def create( self, @@ -505,34 +410,10 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - "squad", - method="POST", - json={ - "name": name, - "members": convert_and_respect_annotation_metadata( - object_=members, annotation=typing.Sequence[SquadMemberDto], direction="write" - ), - "membersOverrides": convert_and_respect_annotation_metadata( - object_=members_overrides, annotation=AssistantOverrides, direction="write" - ), - }, - request_options=request_options, - omit=OMIT, + _response = await self._raw_client.create( + members=members, name=name, members_overrides=members_overrides, request_options=request_options ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - Squad, - parse_obj_as( - type_=Squad, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + return _response.data async def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Squad: """ @@ -567,24 +448,8 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - f"squad/{jsonable_encoder(id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - Squad, - parse_obj_as( - type_=Squad, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = await self._raw_client.get(id, request_options=request_options) + return _response.data async def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Squad: """ @@ -619,24 +484,8 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - f"squad/{jsonable_encoder(id)}", - method="DELETE", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - Squad, - parse_obj_as( - type_=Squad, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = await self._raw_client.delete(id, request_options=request_options) + return _response.data async def update( self, @@ -693,31 +542,7 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - f"squad/{jsonable_encoder(id)}", - method="PATCH", - json={ - "name": name, - "members": convert_and_respect_annotation_metadata( - object_=members, annotation=typing.Sequence[SquadMemberDto], direction="write" - ), - "membersOverrides": convert_and_respect_annotation_metadata( - object_=members_overrides, annotation=AssistantOverrides, direction="write" - ), - }, - request_options=request_options, - omit=OMIT, + _response = await self._raw_client.update( + id, members=members, name=name, members_overrides=members_overrides, request_options=request_options ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - Squad, - parse_obj_as( - type_=Squad, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + return _response.data diff --git a/src/vapi/squads/raw_client.py b/src/vapi/squads/raw_client.py new file mode 100644 index 00000000..85e0a6a5 --- /dev/null +++ b/src/vapi/squads/raw_client.py @@ -0,0 +1,638 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing +from json.decoder import JSONDecodeError + +from ..core.api_error import ApiError +from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.datetime_utils import serialize_datetime +from ..core.http_response import AsyncHttpResponse, HttpResponse +from ..core.jsonable_encoder import jsonable_encoder +from ..core.parse_error import ParsingError +from ..core.request_options import RequestOptions +from ..core.serialization import convert_and_respect_annotation_metadata +from ..core.unchecked_base_model import construct_type +from ..types.assistant_overrides import AssistantOverrides +from ..types.squad import Squad +from ..types.squad_member_dto import SquadMemberDto +from pydantic import ValidationError + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class RawSquadsClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def list( + self, + *, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[typing.List[Squad]]: + """ + Parameters + ---------- + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[typing.List[Squad]] + + """ + _response = self._client_wrapper.httpx_client.request( + "squad", + method="GET", + params={ + "limit": limit, + "createdAtGt": serialize_datetime(created_at_gt) if created_at_gt is not None else None, + "createdAtLt": serialize_datetime(created_at_lt) if created_at_lt is not None else None, + "createdAtGe": serialize_datetime(created_at_ge) if created_at_ge is not None else None, + "createdAtLe": serialize_datetime(created_at_le) if created_at_le is not None else None, + "updatedAtGt": serialize_datetime(updated_at_gt) if updated_at_gt is not None else None, + "updatedAtLt": serialize_datetime(updated_at_lt) if updated_at_lt is not None else None, + "updatedAtGe": serialize_datetime(updated_at_ge) if updated_at_ge is not None else None, + "updatedAtLe": serialize_datetime(updated_at_le) if updated_at_le is not None else None, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.List[Squad], + construct_type( + type_=typing.List[Squad], # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def create( + self, + *, + members: typing.Sequence[SquadMemberDto], + name: typing.Optional[str] = OMIT, + members_overrides: typing.Optional[AssistantOverrides] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[Squad]: + """ + Parameters + ---------- + members : typing.Sequence[SquadMemberDto] + This is the list of assistants that make up the squad. + + The call will start with the first assistant in the list. + + name : typing.Optional[str] + This is the name of the squad. + + members_overrides : typing.Optional[AssistantOverrides] + This can be used to override all the assistants' settings and provide values for their template variables. + + Both `membersOverrides` and `members[n].assistantOverrides` can be used together. First, `members[n].assistantOverrides` is applied. Then, `membersOverrides` is applied as a global override. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[Squad] + + """ + _response = self._client_wrapper.httpx_client.request( + "squad", + method="POST", + json={ + "name": name, + "members": convert_and_respect_annotation_metadata( + object_=members, annotation=typing.Sequence[SquadMemberDto], direction="write" + ), + "membersOverrides": convert_and_respect_annotation_metadata( + object_=members_overrides, annotation=AssistantOverrides, direction="write" + ), + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Squad, + construct_type( + type_=Squad, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[Squad]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[Squad] + + """ + _response = self._client_wrapper.httpx_client.request( + f"squad/{jsonable_encoder(id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Squad, + construct_type( + type_=Squad, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[Squad]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[Squad] + + """ + _response = self._client_wrapper.httpx_client.request( + f"squad/{jsonable_encoder(id)}", + method="DELETE", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Squad, + construct_type( + type_=Squad, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def update( + self, + id: str, + *, + members: typing.Sequence[SquadMemberDto], + name: typing.Optional[str] = OMIT, + members_overrides: typing.Optional[AssistantOverrides] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[Squad]: + """ + Parameters + ---------- + id : str + + members : typing.Sequence[SquadMemberDto] + This is the list of assistants that make up the squad. + + The call will start with the first assistant in the list. + + name : typing.Optional[str] + This is the name of the squad. + + members_overrides : typing.Optional[AssistantOverrides] + This can be used to override all the assistants' settings and provide values for their template variables. + + Both `membersOverrides` and `members[n].assistantOverrides` can be used together. First, `members[n].assistantOverrides` is applied. Then, `membersOverrides` is applied as a global override. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[Squad] + + """ + _response = self._client_wrapper.httpx_client.request( + f"squad/{jsonable_encoder(id)}", + method="PATCH", + json={ + "name": name, + "members": convert_and_respect_annotation_metadata( + object_=members, annotation=typing.Sequence[SquadMemberDto], direction="write" + ), + "membersOverrides": convert_and_respect_annotation_metadata( + object_=members_overrides, annotation=AssistantOverrides, direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Squad, + construct_type( + type_=Squad, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawSquadsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def list( + self, + *, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[typing.List[Squad]]: + """ + Parameters + ---------- + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[typing.List[Squad]] + + """ + _response = await self._client_wrapper.httpx_client.request( + "squad", + method="GET", + params={ + "limit": limit, + "createdAtGt": serialize_datetime(created_at_gt) if created_at_gt is not None else None, + "createdAtLt": serialize_datetime(created_at_lt) if created_at_lt is not None else None, + "createdAtGe": serialize_datetime(created_at_ge) if created_at_ge is not None else None, + "createdAtLe": serialize_datetime(created_at_le) if created_at_le is not None else None, + "updatedAtGt": serialize_datetime(updated_at_gt) if updated_at_gt is not None else None, + "updatedAtLt": serialize_datetime(updated_at_lt) if updated_at_lt is not None else None, + "updatedAtGe": serialize_datetime(updated_at_ge) if updated_at_ge is not None else None, + "updatedAtLe": serialize_datetime(updated_at_le) if updated_at_le is not None else None, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.List[Squad], + construct_type( + type_=typing.List[Squad], # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def create( + self, + *, + members: typing.Sequence[SquadMemberDto], + name: typing.Optional[str] = OMIT, + members_overrides: typing.Optional[AssistantOverrides] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[Squad]: + """ + Parameters + ---------- + members : typing.Sequence[SquadMemberDto] + This is the list of assistants that make up the squad. + + The call will start with the first assistant in the list. + + name : typing.Optional[str] + This is the name of the squad. + + members_overrides : typing.Optional[AssistantOverrides] + This can be used to override all the assistants' settings and provide values for their template variables. + + Both `membersOverrides` and `members[n].assistantOverrides` can be used together. First, `members[n].assistantOverrides` is applied. Then, `membersOverrides` is applied as a global override. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[Squad] + + """ + _response = await self._client_wrapper.httpx_client.request( + "squad", + method="POST", + json={ + "name": name, + "members": convert_and_respect_annotation_metadata( + object_=members, annotation=typing.Sequence[SquadMemberDto], direction="write" + ), + "membersOverrides": convert_and_respect_annotation_metadata( + object_=members_overrides, annotation=AssistantOverrides, direction="write" + ), + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Squad, + construct_type( + type_=Squad, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def get( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[Squad]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[Squad] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"squad/{jsonable_encoder(id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Squad, + construct_type( + type_=Squad, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def delete( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[Squad]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[Squad] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"squad/{jsonable_encoder(id)}", + method="DELETE", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Squad, + construct_type( + type_=Squad, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def update( + self, + id: str, + *, + members: typing.Sequence[SquadMemberDto], + name: typing.Optional[str] = OMIT, + members_overrides: typing.Optional[AssistantOverrides] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[Squad]: + """ + Parameters + ---------- + id : str + + members : typing.Sequence[SquadMemberDto] + This is the list of assistants that make up the squad. + + The call will start with the first assistant in the list. + + name : typing.Optional[str] + This is the name of the squad. + + members_overrides : typing.Optional[AssistantOverrides] + This can be used to override all the assistants' settings and provide values for their template variables. + + Both `membersOverrides` and `members[n].assistantOverrides` can be used together. First, `members[n].assistantOverrides` is applied. Then, `membersOverrides` is applied as a global override. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[Squad] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"squad/{jsonable_encoder(id)}", + method="PATCH", + json={ + "name": name, + "members": convert_and_respect_annotation_metadata( + object_=members, annotation=typing.Sequence[SquadMemberDto], direction="write" + ), + "membersOverrides": convert_and_respect_annotation_metadata( + object_=members_overrides, annotation=AssistantOverrides, direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Squad, + construct_type( + type_=Squad, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/vapi/structured_outputs/__init__.py b/src/vapi/structured_outputs/__init__.py new file mode 100644 index 00000000..f60dd08b --- /dev/null +++ b/src/vapi/structured_outputs/__init__.py @@ -0,0 +1,61 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ( + StructuredOutputControllerFindAllRequestSortOrder, + UpdateStructuredOutputDtoModel, + UpdateStructuredOutputDtoModel_Anthropic, + UpdateStructuredOutputDtoModel_AnthropicBedrock, + UpdateStructuredOutputDtoModel_CustomLlm, + UpdateStructuredOutputDtoModel_Google, + UpdateStructuredOutputDtoModel_Openai, + UpdateStructuredOutputDtoType, + ) +_dynamic_imports: typing.Dict[str, str] = { + "StructuredOutputControllerFindAllRequestSortOrder": ".types", + "UpdateStructuredOutputDtoModel": ".types", + "UpdateStructuredOutputDtoModel_Anthropic": ".types", + "UpdateStructuredOutputDtoModel_AnthropicBedrock": ".types", + "UpdateStructuredOutputDtoModel_CustomLlm": ".types", + "UpdateStructuredOutputDtoModel_Google": ".types", + "UpdateStructuredOutputDtoModel_Openai": ".types", + "UpdateStructuredOutputDtoType": ".types", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = [ + "StructuredOutputControllerFindAllRequestSortOrder", + "UpdateStructuredOutputDtoModel", + "UpdateStructuredOutputDtoModel_Anthropic", + "UpdateStructuredOutputDtoModel_AnthropicBedrock", + "UpdateStructuredOutputDtoModel_CustomLlm", + "UpdateStructuredOutputDtoModel_Google", + "UpdateStructuredOutputDtoModel_Openai", + "UpdateStructuredOutputDtoType", +] diff --git a/src/vapi/structured_outputs/client.py b/src/vapi/structured_outputs/client.py new file mode 100644 index 00000000..b6f98b3a --- /dev/null +++ b/src/vapi/structured_outputs/client.py @@ -0,0 +1,1013 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.request_options import RequestOptions +from ..types.compliance_override import ComplianceOverride +from ..types.create_structured_output_dto import CreateStructuredOutputDto +from ..types.create_structured_output_dto_model import CreateStructuredOutputDtoModel +from ..types.create_structured_output_dto_type import CreateStructuredOutputDtoType +from ..types.json_schema import JsonSchema +from ..types.structured_output import StructuredOutput +from ..types.structured_output_paginated_response import StructuredOutputPaginatedResponse +from .raw_client import AsyncRawStructuredOutputsClient, RawStructuredOutputsClient +from .types.structured_output_controller_find_all_request_sort_order import ( + StructuredOutputControllerFindAllRequestSortOrder, +) +from .types.update_structured_output_dto_model import UpdateStructuredOutputDtoModel +from .types.update_structured_output_dto_type import UpdateStructuredOutputDtoType + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class StructuredOutputsClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawStructuredOutputsClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawStructuredOutputsClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawStructuredOutputsClient + """ + return self._raw_client + + def structured_output_controller_find_all( + self, + *, + id: typing.Optional[str] = None, + name: typing.Optional[str] = None, + page: typing.Optional[float] = None, + sort_order: typing.Optional[StructuredOutputControllerFindAllRequestSortOrder] = None, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> StructuredOutputPaginatedResponse: + """ + Parameters + ---------- + id : typing.Optional[str] + This will return structured outputs where the id matches the specified value. + + name : typing.Optional[str] + This will return structured outputs where the name matches the specified value. + + page : typing.Optional[float] + This is the page number to return. Defaults to 1. + + sort_order : typing.Optional[StructuredOutputControllerFindAllRequestSortOrder] + This is the sort order for pagination. Defaults to 'DESC'. + + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + StructuredOutputPaginatedResponse + + + Examples + -------- + from vapi import Vapi + + client = Vapi( + token="YOUR_TOKEN", + ) + client.structured_outputs.structured_output_controller_find_all() + """ + _response = self._raw_client.structured_output_controller_find_all( + id=id, + name=name, + page=page, + sort_order=sort_order, + limit=limit, + created_at_gt=created_at_gt, + created_at_lt=created_at_lt, + created_at_ge=created_at_ge, + created_at_le=created_at_le, + updated_at_gt=updated_at_gt, + updated_at_lt=updated_at_lt, + updated_at_ge=updated_at_ge, + updated_at_le=updated_at_le, + request_options=request_options, + ) + return _response.data + + def structured_output_controller_create( + self, + *, + name: str, + schema: JsonSchema, + type: typing.Optional[CreateStructuredOutputDtoType] = OMIT, + regex: typing.Optional[str] = OMIT, + model: typing.Optional[CreateStructuredOutputDtoModel] = OMIT, + compliance_plan: typing.Optional[ComplianceOverride] = OMIT, + description: typing.Optional[str] = OMIT, + assistant_ids: typing.Optional[typing.Sequence[str]] = OMIT, + workflow_ids: typing.Optional[typing.Sequence[str]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> StructuredOutput: + """ + Parameters + ---------- + name : str + This is the name of the structured output. + + schema : JsonSchema + This is the JSON Schema definition for the structured output. + + This is required when creating a structured output. Defines the structure and validation rules for the data that will be extracted. Supports all JSON Schema features including: + - Objects and nested properties + - Arrays and array validation + - String, number, boolean, and null types + - Enums and const values + - Validation constraints (min/max, patterns, etc.) + - Composition with allOf, anyOf, oneOf + + type : typing.Optional[CreateStructuredOutputDtoType] + This is the type of structured output. + + - 'ai': Uses an LLM to extract structured data from the conversation (default). + - 'regex': Uses a regex pattern to extract data from the transcript without an LLM. + + Defaults to 'ai' if not specified. + + regex : typing.Optional[str] + This is the regex pattern to match against the transcript. + + Only used when type is 'regex'. Supports both raw patterns (e.g. '\\d+') and + regex literal format (e.g. '/\\d+/gi'). Uses RE2 syntax for safety. + + The result depends on the schema type: + - boolean: true if the pattern matches, false otherwise + - string: the first match or first capture group + - number/integer: the first match parsed as a number + - array: all matches + + model : typing.Optional[CreateStructuredOutputDtoModel] + This is the model that will be used to extract the structured output. + + To provide your own custom system and user prompts for structured output extraction, populate the messages array with your system and user messages. You can specify liquid templating in your system and user messages. + Between the system or user messages, you must reference either 'transcript' or 'messages' with the `{{}}` syntax to access the conversation history. + Between the system or user messages, you must reference a variation of the structured output with the `{{}}` syntax to access the structured output definition. + i.e.: + `{{structuredOutput}}` + `{{structuredOutput.name}}` + `{{structuredOutput.description}}` + `{{structuredOutput.schema}}` + + If model is not specified, GPT-4.1 will be used by default for extraction, utilizing default system and user prompts. + If messages or required fields are not specified, the default system and user prompts will be used. + + compliance_plan : typing.Optional[ComplianceOverride] + Compliance configuration for this output. Only enable overrides if no sensitive data will be stored. + + description : typing.Optional[str] + This is the description of what the structured output extracts. + + Use this to provide context about what data will be extracted and how it will be used. + + assistant_ids : typing.Optional[typing.Sequence[str]] + These are the assistant IDs that this structured output is linked to. + + When linked to assistants, this structured output will be available for extraction during those assistant's calls. + + workflow_ids : typing.Optional[typing.Sequence[str]] + These are the workflow IDs that this structured output is linked to. + + When linked to workflows, this structured output will be available for extraction during those workflow's execution. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + StructuredOutput + + + Examples + -------- + from vapi import JsonSchema, Vapi + + client = Vapi( + token="YOUR_TOKEN", + ) + client.structured_outputs.structured_output_controller_create( + name="name", + schema=JsonSchema( + type="string", + ), + ) + """ + _response = self._raw_client.structured_output_controller_create( + name=name, + schema=schema, + type=type, + regex=regex, + model=model, + compliance_plan=compliance_plan, + description=description, + assistant_ids=assistant_ids, + workflow_ids=workflow_ids, + request_options=request_options, + ) + return _response.data + + def structured_output_controller_find_one( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> StructuredOutput: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + StructuredOutput + + + Examples + -------- + from vapi import Vapi + + client = Vapi( + token="YOUR_TOKEN", + ) + client.structured_outputs.structured_output_controller_find_one( + id="id", + ) + """ + _response = self._raw_client.structured_output_controller_find_one(id, request_options=request_options) + return _response.data + + def structured_output_controller_remove( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> StructuredOutput: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + StructuredOutput + + + Examples + -------- + from vapi import Vapi + + client = Vapi( + token="YOUR_TOKEN", + ) + client.structured_outputs.structured_output_controller_remove( + id="id", + ) + """ + _response = self._raw_client.structured_output_controller_remove(id, request_options=request_options) + return _response.data + + def structured_output_controller_update( + self, + id: str, + *, + schema_override: str, + type: typing.Optional[UpdateStructuredOutputDtoType] = OMIT, + regex: typing.Optional[str] = OMIT, + model: typing.Optional[UpdateStructuredOutputDtoModel] = OMIT, + compliance_plan: typing.Optional[ComplianceOverride] = OMIT, + name: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + assistant_ids: typing.Optional[typing.Sequence[str]] = OMIT, + workflow_ids: typing.Optional[typing.Sequence[str]] = OMIT, + schema: typing.Optional[JsonSchema] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> StructuredOutput: + """ + Parameters + ---------- + id : str + + schema_override : str + + type : typing.Optional[UpdateStructuredOutputDtoType] + This is the type of structured output. + + - 'ai': Uses an LLM to extract structured data from the conversation (default). + - 'regex': Uses a regex pattern to extract data from the transcript without an LLM. + + regex : typing.Optional[str] + This is the regex pattern to match against the transcript. + + Only used when type is 'regex'. Supports both raw patterns (e.g. '\\d+') and + regex literal format (e.g. '/\\d+/gi'). Uses RE2 syntax for safety. + + The result depends on the schema type: + - boolean: true if the pattern matches, false otherwise + - string: the first match or first capture group + - number/integer: the first match parsed as a number + - array: all matches + + model : typing.Optional[UpdateStructuredOutputDtoModel] + This is the model that will be used to extract the structured output. + + To provide your own custom system and user prompts for structured output extraction, populate the messages array with your system and user messages. You can specify liquid templating in your system and user messages. + Between the system or user messages, you must reference either 'transcript' or 'messages' with the `{{}}` syntax to access the conversation history. + Between the system or user messages, you must reference a variation of the structured output with the `{{}}` syntax to access the structured output definition. + i.e.: + `{{structuredOutput}}` + `{{structuredOutput.name}}` + `{{structuredOutput.description}}` + `{{structuredOutput.schema}}` + + If model is not specified, GPT-4.1 will be used by default for extraction, utilizing default system and user prompts. + If messages or required fields are not specified, the default system and user prompts will be used. + + compliance_plan : typing.Optional[ComplianceOverride] + Compliance configuration for this output. Only enable overrides if no sensitive data will be stored. + + name : typing.Optional[str] + This is the name of the structured output. + + description : typing.Optional[str] + This is the description of what the structured output extracts. + + Use this to provide context about what data will be extracted and how it will be used. + + assistant_ids : typing.Optional[typing.Sequence[str]] + These are the assistant IDs that this structured output is linked to. + + When linked to assistants, this structured output will be available for extraction during those assistant's calls. + + workflow_ids : typing.Optional[typing.Sequence[str]] + These are the workflow IDs that this structured output is linked to. + + When linked to workflows, this structured output will be available for extraction during those workflow's execution. + + schema : typing.Optional[JsonSchema] + This is the JSON Schema definition for the structured output. + + Defines the structure and validation rules for the data that will be extracted. Supports all JSON Schema features including: + - Objects and nested properties + - Arrays and array validation + - String, number, boolean, and null types + - Enums and const values + - Validation constraints (min/max, patterns, etc.) + - Composition with allOf, anyOf, oneOf + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + StructuredOutput + + + Examples + -------- + from vapi import Vapi + + client = Vapi( + token="YOUR_TOKEN", + ) + client.structured_outputs.structured_output_controller_update( + id="id", + schema_override="schemaOverride", + ) + """ + _response = self._raw_client.structured_output_controller_update( + id, + schema_override=schema_override, + type=type, + regex=regex, + model=model, + compliance_plan=compliance_plan, + name=name, + description=description, + assistant_ids=assistant_ids, + workflow_ids=workflow_ids, + schema=schema, + request_options=request_options, + ) + return _response.data + + def structured_output_controller_run( + self, + *, + call_ids: typing.Sequence[str], + preview_enabled: typing.Optional[bool] = OMIT, + structured_output_id: typing.Optional[str] = OMIT, + structured_output: typing.Optional[CreateStructuredOutputDto] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> StructuredOutput: + """ + Parameters + ---------- + call_ids : typing.Sequence[str] + This is the array of callIds that will be updated with the new structured output value. If preview is true, this array must be provided and contain exactly 1 callId. + If preview is false, up to 100 callIds may be provided. + + preview_enabled : typing.Optional[bool] + This is the preview flag for the re-run. If true, the re-run will be executed and the response will be returned immediately and the call artifact will NOT be updated. + If false (default), the re-run will be executed and the response will be updated in the call artifact. + + structured_output_id : typing.Optional[str] + This is the ID of the structured output that will be run. This must be provided unless a transient structured output is provided. + When the re-run is executed, only the value of this structured output will be replaced with the new value, or added if not present. + + structured_output : typing.Optional[CreateStructuredOutputDto] + This is the transient structured output that will be run. This must be provided if a structured output ID is not provided. + When the re-run is executed, the structured output value will be added to the existing artifact. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + StructuredOutput + + + Examples + -------- + from vapi import Vapi + + client = Vapi( + token="YOUR_TOKEN", + ) + client.structured_outputs.structured_output_controller_run( + call_ids=["callIds"], + ) + """ + _response = self._raw_client.structured_output_controller_run( + call_ids=call_ids, + preview_enabled=preview_enabled, + structured_output_id=structured_output_id, + structured_output=structured_output, + request_options=request_options, + ) + return _response.data + + +class AsyncStructuredOutputsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawStructuredOutputsClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawStructuredOutputsClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawStructuredOutputsClient + """ + return self._raw_client + + async def structured_output_controller_find_all( + self, + *, + id: typing.Optional[str] = None, + name: typing.Optional[str] = None, + page: typing.Optional[float] = None, + sort_order: typing.Optional[StructuredOutputControllerFindAllRequestSortOrder] = None, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> StructuredOutputPaginatedResponse: + """ + Parameters + ---------- + id : typing.Optional[str] + This will return structured outputs where the id matches the specified value. + + name : typing.Optional[str] + This will return structured outputs where the name matches the specified value. + + page : typing.Optional[float] + This is the page number to return. Defaults to 1. + + sort_order : typing.Optional[StructuredOutputControllerFindAllRequestSortOrder] + This is the sort order for pagination. Defaults to 'DESC'. + + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + StructuredOutputPaginatedResponse + + + Examples + -------- + import asyncio + + from vapi import AsyncVapi + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.structured_outputs.structured_output_controller_find_all() + + + asyncio.run(main()) + """ + _response = await self._raw_client.structured_output_controller_find_all( + id=id, + name=name, + page=page, + sort_order=sort_order, + limit=limit, + created_at_gt=created_at_gt, + created_at_lt=created_at_lt, + created_at_ge=created_at_ge, + created_at_le=created_at_le, + updated_at_gt=updated_at_gt, + updated_at_lt=updated_at_lt, + updated_at_ge=updated_at_ge, + updated_at_le=updated_at_le, + request_options=request_options, + ) + return _response.data + + async def structured_output_controller_create( + self, + *, + name: str, + schema: JsonSchema, + type: typing.Optional[CreateStructuredOutputDtoType] = OMIT, + regex: typing.Optional[str] = OMIT, + model: typing.Optional[CreateStructuredOutputDtoModel] = OMIT, + compliance_plan: typing.Optional[ComplianceOverride] = OMIT, + description: typing.Optional[str] = OMIT, + assistant_ids: typing.Optional[typing.Sequence[str]] = OMIT, + workflow_ids: typing.Optional[typing.Sequence[str]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> StructuredOutput: + """ + Parameters + ---------- + name : str + This is the name of the structured output. + + schema : JsonSchema + This is the JSON Schema definition for the structured output. + + This is required when creating a structured output. Defines the structure and validation rules for the data that will be extracted. Supports all JSON Schema features including: + - Objects and nested properties + - Arrays and array validation + - String, number, boolean, and null types + - Enums and const values + - Validation constraints (min/max, patterns, etc.) + - Composition with allOf, anyOf, oneOf + + type : typing.Optional[CreateStructuredOutputDtoType] + This is the type of structured output. + + - 'ai': Uses an LLM to extract structured data from the conversation (default). + - 'regex': Uses a regex pattern to extract data from the transcript without an LLM. + + Defaults to 'ai' if not specified. + + regex : typing.Optional[str] + This is the regex pattern to match against the transcript. + + Only used when type is 'regex'. Supports both raw patterns (e.g. '\\d+') and + regex literal format (e.g. '/\\d+/gi'). Uses RE2 syntax for safety. + + The result depends on the schema type: + - boolean: true if the pattern matches, false otherwise + - string: the first match or first capture group + - number/integer: the first match parsed as a number + - array: all matches + + model : typing.Optional[CreateStructuredOutputDtoModel] + This is the model that will be used to extract the structured output. + + To provide your own custom system and user prompts for structured output extraction, populate the messages array with your system and user messages. You can specify liquid templating in your system and user messages. + Between the system or user messages, you must reference either 'transcript' or 'messages' with the `{{}}` syntax to access the conversation history. + Between the system or user messages, you must reference a variation of the structured output with the `{{}}` syntax to access the structured output definition. + i.e.: + `{{structuredOutput}}` + `{{structuredOutput.name}}` + `{{structuredOutput.description}}` + `{{structuredOutput.schema}}` + + If model is not specified, GPT-4.1 will be used by default for extraction, utilizing default system and user prompts. + If messages or required fields are not specified, the default system and user prompts will be used. + + compliance_plan : typing.Optional[ComplianceOverride] + Compliance configuration for this output. Only enable overrides if no sensitive data will be stored. + + description : typing.Optional[str] + This is the description of what the structured output extracts. + + Use this to provide context about what data will be extracted and how it will be used. + + assistant_ids : typing.Optional[typing.Sequence[str]] + These are the assistant IDs that this structured output is linked to. + + When linked to assistants, this structured output will be available for extraction during those assistant's calls. + + workflow_ids : typing.Optional[typing.Sequence[str]] + These are the workflow IDs that this structured output is linked to. + + When linked to workflows, this structured output will be available for extraction during those workflow's execution. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + StructuredOutput + + + Examples + -------- + import asyncio + + from vapi import AsyncVapi, JsonSchema + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.structured_outputs.structured_output_controller_create( + name="name", + schema=JsonSchema( + type="string", + ), + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.structured_output_controller_create( + name=name, + schema=schema, + type=type, + regex=regex, + model=model, + compliance_plan=compliance_plan, + description=description, + assistant_ids=assistant_ids, + workflow_ids=workflow_ids, + request_options=request_options, + ) + return _response.data + + async def structured_output_controller_find_one( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> StructuredOutput: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + StructuredOutput + + + Examples + -------- + import asyncio + + from vapi import AsyncVapi + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.structured_outputs.structured_output_controller_find_one( + id="id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.structured_output_controller_find_one(id, request_options=request_options) + return _response.data + + async def structured_output_controller_remove( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> StructuredOutput: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + StructuredOutput + + + Examples + -------- + import asyncio + + from vapi import AsyncVapi + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.structured_outputs.structured_output_controller_remove( + id="id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.structured_output_controller_remove(id, request_options=request_options) + return _response.data + + async def structured_output_controller_update( + self, + id: str, + *, + schema_override: str, + type: typing.Optional[UpdateStructuredOutputDtoType] = OMIT, + regex: typing.Optional[str] = OMIT, + model: typing.Optional[UpdateStructuredOutputDtoModel] = OMIT, + compliance_plan: typing.Optional[ComplianceOverride] = OMIT, + name: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + assistant_ids: typing.Optional[typing.Sequence[str]] = OMIT, + workflow_ids: typing.Optional[typing.Sequence[str]] = OMIT, + schema: typing.Optional[JsonSchema] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> StructuredOutput: + """ + Parameters + ---------- + id : str + + schema_override : str + + type : typing.Optional[UpdateStructuredOutputDtoType] + This is the type of structured output. + + - 'ai': Uses an LLM to extract structured data from the conversation (default). + - 'regex': Uses a regex pattern to extract data from the transcript without an LLM. + + regex : typing.Optional[str] + This is the regex pattern to match against the transcript. + + Only used when type is 'regex'. Supports both raw patterns (e.g. '\\d+') and + regex literal format (e.g. '/\\d+/gi'). Uses RE2 syntax for safety. + + The result depends on the schema type: + - boolean: true if the pattern matches, false otherwise + - string: the first match or first capture group + - number/integer: the first match parsed as a number + - array: all matches + + model : typing.Optional[UpdateStructuredOutputDtoModel] + This is the model that will be used to extract the structured output. + + To provide your own custom system and user prompts for structured output extraction, populate the messages array with your system and user messages. You can specify liquid templating in your system and user messages. + Between the system or user messages, you must reference either 'transcript' or 'messages' with the `{{}}` syntax to access the conversation history. + Between the system or user messages, you must reference a variation of the structured output with the `{{}}` syntax to access the structured output definition. + i.e.: + `{{structuredOutput}}` + `{{structuredOutput.name}}` + `{{structuredOutput.description}}` + `{{structuredOutput.schema}}` + + If model is not specified, GPT-4.1 will be used by default for extraction, utilizing default system and user prompts. + If messages or required fields are not specified, the default system and user prompts will be used. + + compliance_plan : typing.Optional[ComplianceOverride] + Compliance configuration for this output. Only enable overrides if no sensitive data will be stored. + + name : typing.Optional[str] + This is the name of the structured output. + + description : typing.Optional[str] + This is the description of what the structured output extracts. + + Use this to provide context about what data will be extracted and how it will be used. + + assistant_ids : typing.Optional[typing.Sequence[str]] + These are the assistant IDs that this structured output is linked to. + + When linked to assistants, this structured output will be available for extraction during those assistant's calls. + + workflow_ids : typing.Optional[typing.Sequence[str]] + These are the workflow IDs that this structured output is linked to. + + When linked to workflows, this structured output will be available for extraction during those workflow's execution. + + schema : typing.Optional[JsonSchema] + This is the JSON Schema definition for the structured output. + + Defines the structure and validation rules for the data that will be extracted. Supports all JSON Schema features including: + - Objects and nested properties + - Arrays and array validation + - String, number, boolean, and null types + - Enums and const values + - Validation constraints (min/max, patterns, etc.) + - Composition with allOf, anyOf, oneOf + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + StructuredOutput + + + Examples + -------- + import asyncio + + from vapi import AsyncVapi + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.structured_outputs.structured_output_controller_update( + id="id", + schema_override="schemaOverride", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.structured_output_controller_update( + id, + schema_override=schema_override, + type=type, + regex=regex, + model=model, + compliance_plan=compliance_plan, + name=name, + description=description, + assistant_ids=assistant_ids, + workflow_ids=workflow_ids, + schema=schema, + request_options=request_options, + ) + return _response.data + + async def structured_output_controller_run( + self, + *, + call_ids: typing.Sequence[str], + preview_enabled: typing.Optional[bool] = OMIT, + structured_output_id: typing.Optional[str] = OMIT, + structured_output: typing.Optional[CreateStructuredOutputDto] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> StructuredOutput: + """ + Parameters + ---------- + call_ids : typing.Sequence[str] + This is the array of callIds that will be updated with the new structured output value. If preview is true, this array must be provided and contain exactly 1 callId. + If preview is false, up to 100 callIds may be provided. + + preview_enabled : typing.Optional[bool] + This is the preview flag for the re-run. If true, the re-run will be executed and the response will be returned immediately and the call artifact will NOT be updated. + If false (default), the re-run will be executed and the response will be updated in the call artifact. + + structured_output_id : typing.Optional[str] + This is the ID of the structured output that will be run. This must be provided unless a transient structured output is provided. + When the re-run is executed, only the value of this structured output will be replaced with the new value, or added if not present. + + structured_output : typing.Optional[CreateStructuredOutputDto] + This is the transient structured output that will be run. This must be provided if a structured output ID is not provided. + When the re-run is executed, the structured output value will be added to the existing artifact. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + StructuredOutput + + + Examples + -------- + import asyncio + + from vapi import AsyncVapi + + client = AsyncVapi( + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.structured_outputs.structured_output_controller_run( + call_ids=["callIds"], + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.structured_output_controller_run( + call_ids=call_ids, + preview_enabled=preview_enabled, + structured_output_id=structured_output_id, + structured_output=structured_output, + request_options=request_options, + ) + return _response.data diff --git a/src/vapi/structured_outputs/raw_client.py b/src/vapi/structured_outputs/raw_client.py new file mode 100644 index 00000000..40871697 --- /dev/null +++ b/src/vapi/structured_outputs/raw_client.py @@ -0,0 +1,1115 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing +from json.decoder import JSONDecodeError + +from ..core.api_error import ApiError +from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.datetime_utils import serialize_datetime +from ..core.http_response import AsyncHttpResponse, HttpResponse +from ..core.jsonable_encoder import jsonable_encoder +from ..core.parse_error import ParsingError +from ..core.request_options import RequestOptions +from ..core.serialization import convert_and_respect_annotation_metadata +from ..core.unchecked_base_model import construct_type +from ..types.compliance_override import ComplianceOverride +from ..types.create_structured_output_dto import CreateStructuredOutputDto +from ..types.create_structured_output_dto_model import CreateStructuredOutputDtoModel +from ..types.create_structured_output_dto_type import CreateStructuredOutputDtoType +from ..types.json_schema import JsonSchema +from ..types.structured_output import StructuredOutput +from ..types.structured_output_paginated_response import StructuredOutputPaginatedResponse +from .types.structured_output_controller_find_all_request_sort_order import ( + StructuredOutputControllerFindAllRequestSortOrder, +) +from .types.update_structured_output_dto_model import UpdateStructuredOutputDtoModel +from .types.update_structured_output_dto_type import UpdateStructuredOutputDtoType +from pydantic import ValidationError + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class RawStructuredOutputsClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def structured_output_controller_find_all( + self, + *, + id: typing.Optional[str] = None, + name: typing.Optional[str] = None, + page: typing.Optional[float] = None, + sort_order: typing.Optional[StructuredOutputControllerFindAllRequestSortOrder] = None, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[StructuredOutputPaginatedResponse]: + """ + Parameters + ---------- + id : typing.Optional[str] + This will return structured outputs where the id matches the specified value. + + name : typing.Optional[str] + This will return structured outputs where the name matches the specified value. + + page : typing.Optional[float] + This is the page number to return. Defaults to 1. + + sort_order : typing.Optional[StructuredOutputControllerFindAllRequestSortOrder] + This is the sort order for pagination. Defaults to 'DESC'. + + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[StructuredOutputPaginatedResponse] + + """ + _response = self._client_wrapper.httpx_client.request( + "structured-output", + method="GET", + params={ + "id": id, + "name": name, + "page": page, + "sortOrder": sort_order, + "limit": limit, + "createdAtGt": serialize_datetime(created_at_gt) if created_at_gt is not None else None, + "createdAtLt": serialize_datetime(created_at_lt) if created_at_lt is not None else None, + "createdAtGe": serialize_datetime(created_at_ge) if created_at_ge is not None else None, + "createdAtLe": serialize_datetime(created_at_le) if created_at_le is not None else None, + "updatedAtGt": serialize_datetime(updated_at_gt) if updated_at_gt is not None else None, + "updatedAtLt": serialize_datetime(updated_at_lt) if updated_at_lt is not None else None, + "updatedAtGe": serialize_datetime(updated_at_ge) if updated_at_ge is not None else None, + "updatedAtLe": serialize_datetime(updated_at_le) if updated_at_le is not None else None, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + StructuredOutputPaginatedResponse, + construct_type( + type_=StructuredOutputPaginatedResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def structured_output_controller_create( + self, + *, + name: str, + schema: JsonSchema, + type: typing.Optional[CreateStructuredOutputDtoType] = OMIT, + regex: typing.Optional[str] = OMIT, + model: typing.Optional[CreateStructuredOutputDtoModel] = OMIT, + compliance_plan: typing.Optional[ComplianceOverride] = OMIT, + description: typing.Optional[str] = OMIT, + assistant_ids: typing.Optional[typing.Sequence[str]] = OMIT, + workflow_ids: typing.Optional[typing.Sequence[str]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[StructuredOutput]: + """ + Parameters + ---------- + name : str + This is the name of the structured output. + + schema : JsonSchema + This is the JSON Schema definition for the structured output. + + This is required when creating a structured output. Defines the structure and validation rules for the data that will be extracted. Supports all JSON Schema features including: + - Objects and nested properties + - Arrays and array validation + - String, number, boolean, and null types + - Enums and const values + - Validation constraints (min/max, patterns, etc.) + - Composition with allOf, anyOf, oneOf + + type : typing.Optional[CreateStructuredOutputDtoType] + This is the type of structured output. + + - 'ai': Uses an LLM to extract structured data from the conversation (default). + - 'regex': Uses a regex pattern to extract data from the transcript without an LLM. + + Defaults to 'ai' if not specified. + + regex : typing.Optional[str] + This is the regex pattern to match against the transcript. + + Only used when type is 'regex'. Supports both raw patterns (e.g. '\\d+') and + regex literal format (e.g. '/\\d+/gi'). Uses RE2 syntax for safety. + + The result depends on the schema type: + - boolean: true if the pattern matches, false otherwise + - string: the first match or first capture group + - number/integer: the first match parsed as a number + - array: all matches + + model : typing.Optional[CreateStructuredOutputDtoModel] + This is the model that will be used to extract the structured output. + + To provide your own custom system and user prompts for structured output extraction, populate the messages array with your system and user messages. You can specify liquid templating in your system and user messages. + Between the system or user messages, you must reference either 'transcript' or 'messages' with the `{{}}` syntax to access the conversation history. + Between the system or user messages, you must reference a variation of the structured output with the `{{}}` syntax to access the structured output definition. + i.e.: + `{{structuredOutput}}` + `{{structuredOutput.name}}` + `{{structuredOutput.description}}` + `{{structuredOutput.schema}}` + + If model is not specified, GPT-4.1 will be used by default for extraction, utilizing default system and user prompts. + If messages or required fields are not specified, the default system and user prompts will be used. + + compliance_plan : typing.Optional[ComplianceOverride] + Compliance configuration for this output. Only enable overrides if no sensitive data will be stored. + + description : typing.Optional[str] + This is the description of what the structured output extracts. + + Use this to provide context about what data will be extracted and how it will be used. + + assistant_ids : typing.Optional[typing.Sequence[str]] + These are the assistant IDs that this structured output is linked to. + + When linked to assistants, this structured output will be available for extraction during those assistant's calls. + + workflow_ids : typing.Optional[typing.Sequence[str]] + These are the workflow IDs that this structured output is linked to. + + When linked to workflows, this structured output will be available for extraction during those workflow's execution. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[StructuredOutput] + + """ + _response = self._client_wrapper.httpx_client.request( + "structured-output", + method="POST", + json={ + "type": type, + "regex": regex, + "model": convert_and_respect_annotation_metadata( + object_=model, annotation=CreateStructuredOutputDtoModel, direction="write" + ), + "compliancePlan": convert_and_respect_annotation_metadata( + object_=compliance_plan, annotation=ComplianceOverride, direction="write" + ), + "name": name, + "schema": convert_and_respect_annotation_metadata( + object_=schema, annotation=JsonSchema, direction="write" + ), + "description": description, + "assistantIds": assistant_ids, + "workflowIds": workflow_ids, + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + StructuredOutput, + construct_type( + type_=StructuredOutput, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def structured_output_controller_find_one( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[StructuredOutput]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[StructuredOutput] + + """ + _response = self._client_wrapper.httpx_client.request( + f"structured-output/{jsonable_encoder(id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + StructuredOutput, + construct_type( + type_=StructuredOutput, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def structured_output_controller_remove( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[StructuredOutput]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[StructuredOutput] + + """ + _response = self._client_wrapper.httpx_client.request( + f"structured-output/{jsonable_encoder(id)}", + method="DELETE", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + StructuredOutput, + construct_type( + type_=StructuredOutput, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def structured_output_controller_update( + self, + id: str, + *, + schema_override: str, + type: typing.Optional[UpdateStructuredOutputDtoType] = OMIT, + regex: typing.Optional[str] = OMIT, + model: typing.Optional[UpdateStructuredOutputDtoModel] = OMIT, + compliance_plan: typing.Optional[ComplianceOverride] = OMIT, + name: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + assistant_ids: typing.Optional[typing.Sequence[str]] = OMIT, + workflow_ids: typing.Optional[typing.Sequence[str]] = OMIT, + schema: typing.Optional[JsonSchema] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[StructuredOutput]: + """ + Parameters + ---------- + id : str + + schema_override : str + + type : typing.Optional[UpdateStructuredOutputDtoType] + This is the type of structured output. + + - 'ai': Uses an LLM to extract structured data from the conversation (default). + - 'regex': Uses a regex pattern to extract data from the transcript without an LLM. + + regex : typing.Optional[str] + This is the regex pattern to match against the transcript. + + Only used when type is 'regex'. Supports both raw patterns (e.g. '\\d+') and + regex literal format (e.g. '/\\d+/gi'). Uses RE2 syntax for safety. + + The result depends on the schema type: + - boolean: true if the pattern matches, false otherwise + - string: the first match or first capture group + - number/integer: the first match parsed as a number + - array: all matches + + model : typing.Optional[UpdateStructuredOutputDtoModel] + This is the model that will be used to extract the structured output. + + To provide your own custom system and user prompts for structured output extraction, populate the messages array with your system and user messages. You can specify liquid templating in your system and user messages. + Between the system or user messages, you must reference either 'transcript' or 'messages' with the `{{}}` syntax to access the conversation history. + Between the system or user messages, you must reference a variation of the structured output with the `{{}}` syntax to access the structured output definition. + i.e.: + `{{structuredOutput}}` + `{{structuredOutput.name}}` + `{{structuredOutput.description}}` + `{{structuredOutput.schema}}` + + If model is not specified, GPT-4.1 will be used by default for extraction, utilizing default system and user prompts. + If messages or required fields are not specified, the default system and user prompts will be used. + + compliance_plan : typing.Optional[ComplianceOverride] + Compliance configuration for this output. Only enable overrides if no sensitive data will be stored. + + name : typing.Optional[str] + This is the name of the structured output. + + description : typing.Optional[str] + This is the description of what the structured output extracts. + + Use this to provide context about what data will be extracted and how it will be used. + + assistant_ids : typing.Optional[typing.Sequence[str]] + These are the assistant IDs that this structured output is linked to. + + When linked to assistants, this structured output will be available for extraction during those assistant's calls. + + workflow_ids : typing.Optional[typing.Sequence[str]] + These are the workflow IDs that this structured output is linked to. + + When linked to workflows, this structured output will be available for extraction during those workflow's execution. + + schema : typing.Optional[JsonSchema] + This is the JSON Schema definition for the structured output. + + Defines the structure and validation rules for the data that will be extracted. Supports all JSON Schema features including: + - Objects and nested properties + - Arrays and array validation + - String, number, boolean, and null types + - Enums and const values + - Validation constraints (min/max, patterns, etc.) + - Composition with allOf, anyOf, oneOf + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[StructuredOutput] + + """ + _response = self._client_wrapper.httpx_client.request( + f"structured-output/{jsonable_encoder(id)}", + method="PATCH", + params={ + "schemaOverride": schema_override, + }, + json={ + "type": type, + "regex": regex, + "model": convert_and_respect_annotation_metadata( + object_=model, annotation=UpdateStructuredOutputDtoModel, direction="write" + ), + "compliancePlan": convert_and_respect_annotation_metadata( + object_=compliance_plan, annotation=ComplianceOverride, direction="write" + ), + "name": name, + "description": description, + "assistantIds": assistant_ids, + "workflowIds": workflow_ids, + "schema": convert_and_respect_annotation_metadata( + object_=schema, annotation=JsonSchema, direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + StructuredOutput, + construct_type( + type_=StructuredOutput, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def structured_output_controller_run( + self, + *, + call_ids: typing.Sequence[str], + preview_enabled: typing.Optional[bool] = OMIT, + structured_output_id: typing.Optional[str] = OMIT, + structured_output: typing.Optional[CreateStructuredOutputDto] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[StructuredOutput]: + """ + Parameters + ---------- + call_ids : typing.Sequence[str] + This is the array of callIds that will be updated with the new structured output value. If preview is true, this array must be provided and contain exactly 1 callId. + If preview is false, up to 100 callIds may be provided. + + preview_enabled : typing.Optional[bool] + This is the preview flag for the re-run. If true, the re-run will be executed and the response will be returned immediately and the call artifact will NOT be updated. + If false (default), the re-run will be executed and the response will be updated in the call artifact. + + structured_output_id : typing.Optional[str] + This is the ID of the structured output that will be run. This must be provided unless a transient structured output is provided. + When the re-run is executed, only the value of this structured output will be replaced with the new value, or added if not present. + + structured_output : typing.Optional[CreateStructuredOutputDto] + This is the transient structured output that will be run. This must be provided if a structured output ID is not provided. + When the re-run is executed, the structured output value will be added to the existing artifact. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[StructuredOutput] + + """ + _response = self._client_wrapper.httpx_client.request( + "structured-output/run", + method="POST", + json={ + "previewEnabled": preview_enabled, + "structuredOutputId": structured_output_id, + "structuredOutput": convert_and_respect_annotation_metadata( + object_=structured_output, annotation=CreateStructuredOutputDto, direction="write" + ), + "callIds": call_ids, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + StructuredOutput, + construct_type( + type_=StructuredOutput, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawStructuredOutputsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def structured_output_controller_find_all( + self, + *, + id: typing.Optional[str] = None, + name: typing.Optional[str] = None, + page: typing.Optional[float] = None, + sort_order: typing.Optional[StructuredOutputControllerFindAllRequestSortOrder] = None, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[StructuredOutputPaginatedResponse]: + """ + Parameters + ---------- + id : typing.Optional[str] + This will return structured outputs where the id matches the specified value. + + name : typing.Optional[str] + This will return structured outputs where the name matches the specified value. + + page : typing.Optional[float] + This is the page number to return. Defaults to 1. + + sort_order : typing.Optional[StructuredOutputControllerFindAllRequestSortOrder] + This is the sort order for pagination. Defaults to 'DESC'. + + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[StructuredOutputPaginatedResponse] + + """ + _response = await self._client_wrapper.httpx_client.request( + "structured-output", + method="GET", + params={ + "id": id, + "name": name, + "page": page, + "sortOrder": sort_order, + "limit": limit, + "createdAtGt": serialize_datetime(created_at_gt) if created_at_gt is not None else None, + "createdAtLt": serialize_datetime(created_at_lt) if created_at_lt is not None else None, + "createdAtGe": serialize_datetime(created_at_ge) if created_at_ge is not None else None, + "createdAtLe": serialize_datetime(created_at_le) if created_at_le is not None else None, + "updatedAtGt": serialize_datetime(updated_at_gt) if updated_at_gt is not None else None, + "updatedAtLt": serialize_datetime(updated_at_lt) if updated_at_lt is not None else None, + "updatedAtGe": serialize_datetime(updated_at_ge) if updated_at_ge is not None else None, + "updatedAtLe": serialize_datetime(updated_at_le) if updated_at_le is not None else None, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + StructuredOutputPaginatedResponse, + construct_type( + type_=StructuredOutputPaginatedResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def structured_output_controller_create( + self, + *, + name: str, + schema: JsonSchema, + type: typing.Optional[CreateStructuredOutputDtoType] = OMIT, + regex: typing.Optional[str] = OMIT, + model: typing.Optional[CreateStructuredOutputDtoModel] = OMIT, + compliance_plan: typing.Optional[ComplianceOverride] = OMIT, + description: typing.Optional[str] = OMIT, + assistant_ids: typing.Optional[typing.Sequence[str]] = OMIT, + workflow_ids: typing.Optional[typing.Sequence[str]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[StructuredOutput]: + """ + Parameters + ---------- + name : str + This is the name of the structured output. + + schema : JsonSchema + This is the JSON Schema definition for the structured output. + + This is required when creating a structured output. Defines the structure and validation rules for the data that will be extracted. Supports all JSON Schema features including: + - Objects and nested properties + - Arrays and array validation + - String, number, boolean, and null types + - Enums and const values + - Validation constraints (min/max, patterns, etc.) + - Composition with allOf, anyOf, oneOf + + type : typing.Optional[CreateStructuredOutputDtoType] + This is the type of structured output. + + - 'ai': Uses an LLM to extract structured data from the conversation (default). + - 'regex': Uses a regex pattern to extract data from the transcript without an LLM. + + Defaults to 'ai' if not specified. + + regex : typing.Optional[str] + This is the regex pattern to match against the transcript. + + Only used when type is 'regex'. Supports both raw patterns (e.g. '\\d+') and + regex literal format (e.g. '/\\d+/gi'). Uses RE2 syntax for safety. + + The result depends on the schema type: + - boolean: true if the pattern matches, false otherwise + - string: the first match or first capture group + - number/integer: the first match parsed as a number + - array: all matches + + model : typing.Optional[CreateStructuredOutputDtoModel] + This is the model that will be used to extract the structured output. + + To provide your own custom system and user prompts for structured output extraction, populate the messages array with your system and user messages. You can specify liquid templating in your system and user messages. + Between the system or user messages, you must reference either 'transcript' or 'messages' with the `{{}}` syntax to access the conversation history. + Between the system or user messages, you must reference a variation of the structured output with the `{{}}` syntax to access the structured output definition. + i.e.: + `{{structuredOutput}}` + `{{structuredOutput.name}}` + `{{structuredOutput.description}}` + `{{structuredOutput.schema}}` + + If model is not specified, GPT-4.1 will be used by default for extraction, utilizing default system and user prompts. + If messages or required fields are not specified, the default system and user prompts will be used. + + compliance_plan : typing.Optional[ComplianceOverride] + Compliance configuration for this output. Only enable overrides if no sensitive data will be stored. + + description : typing.Optional[str] + This is the description of what the structured output extracts. + + Use this to provide context about what data will be extracted and how it will be used. + + assistant_ids : typing.Optional[typing.Sequence[str]] + These are the assistant IDs that this structured output is linked to. + + When linked to assistants, this structured output will be available for extraction during those assistant's calls. + + workflow_ids : typing.Optional[typing.Sequence[str]] + These are the workflow IDs that this structured output is linked to. + + When linked to workflows, this structured output will be available for extraction during those workflow's execution. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[StructuredOutput] + + """ + _response = await self._client_wrapper.httpx_client.request( + "structured-output", + method="POST", + json={ + "type": type, + "regex": regex, + "model": convert_and_respect_annotation_metadata( + object_=model, annotation=CreateStructuredOutputDtoModel, direction="write" + ), + "compliancePlan": convert_and_respect_annotation_metadata( + object_=compliance_plan, annotation=ComplianceOverride, direction="write" + ), + "name": name, + "schema": convert_and_respect_annotation_metadata( + object_=schema, annotation=JsonSchema, direction="write" + ), + "description": description, + "assistantIds": assistant_ids, + "workflowIds": workflow_ids, + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + StructuredOutput, + construct_type( + type_=StructuredOutput, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def structured_output_controller_find_one( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[StructuredOutput]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[StructuredOutput] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"structured-output/{jsonable_encoder(id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + StructuredOutput, + construct_type( + type_=StructuredOutput, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def structured_output_controller_remove( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[StructuredOutput]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[StructuredOutput] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"structured-output/{jsonable_encoder(id)}", + method="DELETE", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + StructuredOutput, + construct_type( + type_=StructuredOutput, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def structured_output_controller_update( + self, + id: str, + *, + schema_override: str, + type: typing.Optional[UpdateStructuredOutputDtoType] = OMIT, + regex: typing.Optional[str] = OMIT, + model: typing.Optional[UpdateStructuredOutputDtoModel] = OMIT, + compliance_plan: typing.Optional[ComplianceOverride] = OMIT, + name: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + assistant_ids: typing.Optional[typing.Sequence[str]] = OMIT, + workflow_ids: typing.Optional[typing.Sequence[str]] = OMIT, + schema: typing.Optional[JsonSchema] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[StructuredOutput]: + """ + Parameters + ---------- + id : str + + schema_override : str + + type : typing.Optional[UpdateStructuredOutputDtoType] + This is the type of structured output. + + - 'ai': Uses an LLM to extract structured data from the conversation (default). + - 'regex': Uses a regex pattern to extract data from the transcript without an LLM. + + regex : typing.Optional[str] + This is the regex pattern to match against the transcript. + + Only used when type is 'regex'. Supports both raw patterns (e.g. '\\d+') and + regex literal format (e.g. '/\\d+/gi'). Uses RE2 syntax for safety. + + The result depends on the schema type: + - boolean: true if the pattern matches, false otherwise + - string: the first match or first capture group + - number/integer: the first match parsed as a number + - array: all matches + + model : typing.Optional[UpdateStructuredOutputDtoModel] + This is the model that will be used to extract the structured output. + + To provide your own custom system and user prompts for structured output extraction, populate the messages array with your system and user messages. You can specify liquid templating in your system and user messages. + Between the system or user messages, you must reference either 'transcript' or 'messages' with the `{{}}` syntax to access the conversation history. + Between the system or user messages, you must reference a variation of the structured output with the `{{}}` syntax to access the structured output definition. + i.e.: + `{{structuredOutput}}` + `{{structuredOutput.name}}` + `{{structuredOutput.description}}` + `{{structuredOutput.schema}}` + + If model is not specified, GPT-4.1 will be used by default for extraction, utilizing default system and user prompts. + If messages or required fields are not specified, the default system and user prompts will be used. + + compliance_plan : typing.Optional[ComplianceOverride] + Compliance configuration for this output. Only enable overrides if no sensitive data will be stored. + + name : typing.Optional[str] + This is the name of the structured output. + + description : typing.Optional[str] + This is the description of what the structured output extracts. + + Use this to provide context about what data will be extracted and how it will be used. + + assistant_ids : typing.Optional[typing.Sequence[str]] + These are the assistant IDs that this structured output is linked to. + + When linked to assistants, this structured output will be available for extraction during those assistant's calls. + + workflow_ids : typing.Optional[typing.Sequence[str]] + These are the workflow IDs that this structured output is linked to. + + When linked to workflows, this structured output will be available for extraction during those workflow's execution. + + schema : typing.Optional[JsonSchema] + This is the JSON Schema definition for the structured output. + + Defines the structure and validation rules for the data that will be extracted. Supports all JSON Schema features including: + - Objects and nested properties + - Arrays and array validation + - String, number, boolean, and null types + - Enums and const values + - Validation constraints (min/max, patterns, etc.) + - Composition with allOf, anyOf, oneOf + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[StructuredOutput] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"structured-output/{jsonable_encoder(id)}", + method="PATCH", + params={ + "schemaOverride": schema_override, + }, + json={ + "type": type, + "regex": regex, + "model": convert_and_respect_annotation_metadata( + object_=model, annotation=UpdateStructuredOutputDtoModel, direction="write" + ), + "compliancePlan": convert_and_respect_annotation_metadata( + object_=compliance_plan, annotation=ComplianceOverride, direction="write" + ), + "name": name, + "description": description, + "assistantIds": assistant_ids, + "workflowIds": workflow_ids, + "schema": convert_and_respect_annotation_metadata( + object_=schema, annotation=JsonSchema, direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + StructuredOutput, + construct_type( + type_=StructuredOutput, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def structured_output_controller_run( + self, + *, + call_ids: typing.Sequence[str], + preview_enabled: typing.Optional[bool] = OMIT, + structured_output_id: typing.Optional[str] = OMIT, + structured_output: typing.Optional[CreateStructuredOutputDto] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[StructuredOutput]: + """ + Parameters + ---------- + call_ids : typing.Sequence[str] + This is the array of callIds that will be updated with the new structured output value. If preview is true, this array must be provided and contain exactly 1 callId. + If preview is false, up to 100 callIds may be provided. + + preview_enabled : typing.Optional[bool] + This is the preview flag for the re-run. If true, the re-run will be executed and the response will be returned immediately and the call artifact will NOT be updated. + If false (default), the re-run will be executed and the response will be updated in the call artifact. + + structured_output_id : typing.Optional[str] + This is the ID of the structured output that will be run. This must be provided unless a transient structured output is provided. + When the re-run is executed, only the value of this structured output will be replaced with the new value, or added if not present. + + structured_output : typing.Optional[CreateStructuredOutputDto] + This is the transient structured output that will be run. This must be provided if a structured output ID is not provided. + When the re-run is executed, the structured output value will be added to the existing artifact. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[StructuredOutput] + + """ + _response = await self._client_wrapper.httpx_client.request( + "structured-output/run", + method="POST", + json={ + "previewEnabled": preview_enabled, + "structuredOutputId": structured_output_id, + "structuredOutput": convert_and_respect_annotation_metadata( + object_=structured_output, annotation=CreateStructuredOutputDto, direction="write" + ), + "callIds": call_ids, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + StructuredOutput, + construct_type( + type_=StructuredOutput, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/vapi/structured_outputs/types/__init__.py b/src/vapi/structured_outputs/types/__init__.py new file mode 100644 index 00000000..24fb49b7 --- /dev/null +++ b/src/vapi/structured_outputs/types/__init__.py @@ -0,0 +1,63 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .structured_output_controller_find_all_request_sort_order import ( + StructuredOutputControllerFindAllRequestSortOrder, + ) + from .update_structured_output_dto_model import ( + UpdateStructuredOutputDtoModel, + UpdateStructuredOutputDtoModel_Anthropic, + UpdateStructuredOutputDtoModel_AnthropicBedrock, + UpdateStructuredOutputDtoModel_CustomLlm, + UpdateStructuredOutputDtoModel_Google, + UpdateStructuredOutputDtoModel_Openai, + ) + from .update_structured_output_dto_type import UpdateStructuredOutputDtoType +_dynamic_imports: typing.Dict[str, str] = { + "StructuredOutputControllerFindAllRequestSortOrder": ".structured_output_controller_find_all_request_sort_order", + "UpdateStructuredOutputDtoModel": ".update_structured_output_dto_model", + "UpdateStructuredOutputDtoModel_Anthropic": ".update_structured_output_dto_model", + "UpdateStructuredOutputDtoModel_AnthropicBedrock": ".update_structured_output_dto_model", + "UpdateStructuredOutputDtoModel_CustomLlm": ".update_structured_output_dto_model", + "UpdateStructuredOutputDtoModel_Google": ".update_structured_output_dto_model", + "UpdateStructuredOutputDtoModel_Openai": ".update_structured_output_dto_model", + "UpdateStructuredOutputDtoType": ".update_structured_output_dto_type", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = [ + "StructuredOutputControllerFindAllRequestSortOrder", + "UpdateStructuredOutputDtoModel", + "UpdateStructuredOutputDtoModel_Anthropic", + "UpdateStructuredOutputDtoModel_AnthropicBedrock", + "UpdateStructuredOutputDtoModel_CustomLlm", + "UpdateStructuredOutputDtoModel_Google", + "UpdateStructuredOutputDtoModel_Openai", + "UpdateStructuredOutputDtoType", +] diff --git a/src/vapi/structured_outputs/types/structured_output_controller_find_all_request_sort_order.py b/src/vapi/structured_outputs/types/structured_output_controller_find_all_request_sort_order.py new file mode 100644 index 00000000..b714b17e --- /dev/null +++ b/src/vapi/structured_outputs/types/structured_output_controller_find_all_request_sort_order.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +StructuredOutputControllerFindAllRequestSortOrder = typing.Union[typing.Literal["ASC", "DESC"], typing.Any] diff --git a/src/vapi/structured_outputs/types/update_structured_output_dto_model.py b/src/vapi/structured_outputs/types/update_structured_output_dto_model.py new file mode 100644 index 00000000..f8850dfe --- /dev/null +++ b/src/vapi/structured_outputs/types/update_structured_output_dto_model.py @@ -0,0 +1,211 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ...core.pydantic_utilities import IS_PYDANTIC_V2 +from ...core.serialization import FieldMetadata +from ...core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from ...types.anthropic_thinking_config import AnthropicThinkingConfig +from ...types.workflow_anthropic_bedrock_model_model import WorkflowAnthropicBedrockModelModel +from ...types.workflow_anthropic_model_model import WorkflowAnthropicModelModel +from ...types.workflow_custom_model_metadata_send_mode import WorkflowCustomModelMetadataSendMode +from ...types.workflow_google_model_model import WorkflowGoogleModelModel +from ...types.workflow_open_ai_model_model import WorkflowOpenAiModelModel + + +class UpdateStructuredOutputDtoModel_Openai(UncheckedBaseModel): + """ + This is the model that will be used to extract the structured output. + + To provide your own custom system and user prompts for structured output extraction, populate the messages array with your system and user messages. You can specify liquid templating in your system and user messages. + Between the system or user messages, you must reference either 'transcript' or 'messages' with the `{{}}` syntax to access the conversation history. + Between the system or user messages, you must reference a variation of the structured output with the `{{}}` syntax to access the structured output definition. + i.e.: + `{{structuredOutput}}` + `{{structuredOutput.name}}` + `{{structuredOutput.description}}` + `{{structuredOutput.schema}}` + + If model is not specified, GPT-4.1 will be used by default for extraction, utilizing default system and user prompts. + If messages or required fields are not specified, the default system and user prompts will be used. + """ + + provider: typing.Literal["openai"] = "openai" + model: WorkflowOpenAiModelModel + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateStructuredOutputDtoModel_Anthropic(UncheckedBaseModel): + """ + This is the model that will be used to extract the structured output. + + To provide your own custom system and user prompts for structured output extraction, populate the messages array with your system and user messages. You can specify liquid templating in your system and user messages. + Between the system or user messages, you must reference either 'transcript' or 'messages' with the `{{}}` syntax to access the conversation history. + Between the system or user messages, you must reference a variation of the structured output with the `{{}}` syntax to access the structured output definition. + i.e.: + `{{structuredOutput}}` + `{{structuredOutput.name}}` + `{{structuredOutput.description}}` + `{{structuredOutput.schema}}` + + If model is not specified, GPT-4.1 will be used by default for extraction, utilizing default system and user prompts. + If messages or required fields are not specified, the default system and user prompts will be used. + """ + + provider: typing.Literal["anthropic"] = "anthropic" + model: WorkflowAnthropicModelModel + thinking: typing.Optional[AnthropicThinkingConfig] = None + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateStructuredOutputDtoModel_AnthropicBedrock(UncheckedBaseModel): + """ + This is the model that will be used to extract the structured output. + + To provide your own custom system and user prompts for structured output extraction, populate the messages array with your system and user messages. You can specify liquid templating in your system and user messages. + Between the system or user messages, you must reference either 'transcript' or 'messages' with the `{{}}` syntax to access the conversation history. + Between the system or user messages, you must reference a variation of the structured output with the `{{}}` syntax to access the structured output definition. + i.e.: + `{{structuredOutput}}` + `{{structuredOutput.name}}` + `{{structuredOutput.description}}` + `{{structuredOutput.schema}}` + + If model is not specified, GPT-4.1 will be used by default for extraction, utilizing default system and user prompts. + If messages or required fields are not specified, the default system and user prompts will be used. + """ + + provider: typing.Literal["anthropic-bedrock"] = "anthropic-bedrock" + model: WorkflowAnthropicBedrockModelModel + thinking: typing.Optional[AnthropicThinkingConfig] = None + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateStructuredOutputDtoModel_Google(UncheckedBaseModel): + """ + This is the model that will be used to extract the structured output. + + To provide your own custom system and user prompts for structured output extraction, populate the messages array with your system and user messages. You can specify liquid templating in your system and user messages. + Between the system or user messages, you must reference either 'transcript' or 'messages' with the `{{}}` syntax to access the conversation history. + Between the system or user messages, you must reference a variation of the structured output with the `{{}}` syntax to access the structured output definition. + i.e.: + `{{structuredOutput}}` + `{{structuredOutput.name}}` + `{{structuredOutput.description}}` + `{{structuredOutput.schema}}` + + If model is not specified, GPT-4.1 will be used by default for extraction, utilizing default system and user prompts. + If messages or required fields are not specified, the default system and user prompts will be used. + """ + + provider: typing.Literal["google"] = "google" + model: WorkflowGoogleModelModel + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateStructuredOutputDtoModel_CustomLlm(UncheckedBaseModel): + """ + This is the model that will be used to extract the structured output. + + To provide your own custom system and user prompts for structured output extraction, populate the messages array with your system and user messages. You can specify liquid templating in your system and user messages. + Between the system or user messages, you must reference either 'transcript' or 'messages' with the `{{}}` syntax to access the conversation history. + Between the system or user messages, you must reference a variation of the structured output with the `{{}}` syntax to access the structured output definition. + i.e.: + `{{structuredOutput}}` + `{{structuredOutput.name}}` + `{{structuredOutput.description}}` + `{{structuredOutput.schema}}` + + If model is not specified, GPT-4.1 will be used by default for extraction, utilizing default system and user prompts. + If messages or required fields are not specified, the default system and user prompts will be used. + """ + + provider: typing.Literal["custom-llm"] = "custom-llm" + metadata_send_mode: typing_extensions.Annotated[ + typing.Optional[WorkflowCustomModelMetadataSendMode], + FieldMetadata(alias="metadataSendMode"), + pydantic.Field(alias="metadataSendMode"), + ] = None + url: str + headers: typing.Optional[typing.Dict[str, typing.Any]] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + model: str + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateStructuredOutputDtoModel = typing_extensions.Annotated[ + typing.Union[ + UpdateStructuredOutputDtoModel_Openai, + UpdateStructuredOutputDtoModel_Anthropic, + UpdateStructuredOutputDtoModel_AnthropicBedrock, + UpdateStructuredOutputDtoModel_Google, + UpdateStructuredOutputDtoModel_CustomLlm, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/structured_outputs/types/update_structured_output_dto_type.py b/src/vapi/structured_outputs/types/update_structured_output_dto_type.py new file mode 100644 index 00000000..36281cac --- /dev/null +++ b/src/vapi/structured_outputs/types/update_structured_output_dto_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +UpdateStructuredOutputDtoType = typing.Union[typing.Literal["ai", "regex"], typing.Any] diff --git a/src/vapi/tools/__init__.py b/src/vapi/tools/__init__.py index ee3833ac..6687c9c3 100644 --- a/src/vapi/tools/__init__.py +++ b/src/vapi/tools/__init__.py @@ -1,21 +1,535 @@ # This file was auto-generated by Fern from our API Definition. -from .types import ( - ToolsCreateRequest, - ToolsCreateResponse, - ToolsDeleteResponse, - ToolsGetResponse, - ToolsListResponseItem, - ToolsUpdateResponse, - UpdateToolDtoMessagesItem, -) +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ( + CreateToolsRequest, + CreateToolsRequest_ApiRequest, + CreateToolsRequest_Bash, + CreateToolsRequest_Computer, + CreateToolsRequest_Dtmf, + CreateToolsRequest_EndCall, + CreateToolsRequest_Function, + CreateToolsRequest_GohighlevelCalendarAvailabilityCheck, + CreateToolsRequest_GohighlevelCalendarEventCreate, + CreateToolsRequest_GohighlevelContactCreate, + CreateToolsRequest_GohighlevelContactGet, + CreateToolsRequest_GoogleCalendarAvailabilityCheck, + CreateToolsRequest_GoogleCalendarEventCreate, + CreateToolsRequest_GoogleSheetsRowAppend, + CreateToolsRequest_Handoff, + CreateToolsRequest_Mcp, + CreateToolsRequest_Query, + CreateToolsRequest_SipRequest, + CreateToolsRequest_SlackMessageSend, + CreateToolsRequest_Sms, + CreateToolsRequest_TextEditor, + CreateToolsRequest_TransferCall, + CreateToolsRequest_Voicemail, + CreateToolsResponse, + CreateToolsResponse_ApiRequest, + CreateToolsResponse_Bash, + CreateToolsResponse_Code, + CreateToolsResponse_Computer, + CreateToolsResponse_Dtmf, + CreateToolsResponse_EndCall, + CreateToolsResponse_Function, + CreateToolsResponse_GohighlevelCalendarAvailabilityCheck, + CreateToolsResponse_GohighlevelCalendarEventCreate, + CreateToolsResponse_GohighlevelContactCreate, + CreateToolsResponse_GohighlevelContactGet, + CreateToolsResponse_GoogleCalendarAvailabilityCheck, + CreateToolsResponse_GoogleCalendarEventCreate, + CreateToolsResponse_GoogleSheetsRowAppend, + CreateToolsResponse_Handoff, + CreateToolsResponse_Mcp, + CreateToolsResponse_Query, + CreateToolsResponse_SipRequest, + CreateToolsResponse_SlackMessageSend, + CreateToolsResponse_Sms, + CreateToolsResponse_TextEditor, + CreateToolsResponse_TransferCall, + CreateToolsResponse_Voicemail, + DeleteToolsResponse, + DeleteToolsResponse_ApiRequest, + DeleteToolsResponse_Bash, + DeleteToolsResponse_Code, + DeleteToolsResponse_Computer, + DeleteToolsResponse_Dtmf, + DeleteToolsResponse_EndCall, + DeleteToolsResponse_Function, + DeleteToolsResponse_GohighlevelCalendarAvailabilityCheck, + DeleteToolsResponse_GohighlevelCalendarEventCreate, + DeleteToolsResponse_GohighlevelContactCreate, + DeleteToolsResponse_GohighlevelContactGet, + DeleteToolsResponse_GoogleCalendarAvailabilityCheck, + DeleteToolsResponse_GoogleCalendarEventCreate, + DeleteToolsResponse_GoogleSheetsRowAppend, + DeleteToolsResponse_Handoff, + DeleteToolsResponse_Mcp, + DeleteToolsResponse_Query, + DeleteToolsResponse_SipRequest, + DeleteToolsResponse_SlackMessageSend, + DeleteToolsResponse_Sms, + DeleteToolsResponse_TextEditor, + DeleteToolsResponse_TransferCall, + DeleteToolsResponse_Voicemail, + GetToolsResponse, + GetToolsResponse_ApiRequest, + GetToolsResponse_Bash, + GetToolsResponse_Code, + GetToolsResponse_Computer, + GetToolsResponse_Dtmf, + GetToolsResponse_EndCall, + GetToolsResponse_Function, + GetToolsResponse_GohighlevelCalendarAvailabilityCheck, + GetToolsResponse_GohighlevelCalendarEventCreate, + GetToolsResponse_GohighlevelContactCreate, + GetToolsResponse_GohighlevelContactGet, + GetToolsResponse_GoogleCalendarAvailabilityCheck, + GetToolsResponse_GoogleCalendarEventCreate, + GetToolsResponse_GoogleSheetsRowAppend, + GetToolsResponse_Handoff, + GetToolsResponse_Mcp, + GetToolsResponse_Query, + GetToolsResponse_SipRequest, + GetToolsResponse_SlackMessageSend, + GetToolsResponse_Sms, + GetToolsResponse_TextEditor, + GetToolsResponse_TransferCall, + GetToolsResponse_Voicemail, + ListToolsResponseItem, + ListToolsResponseItem_ApiRequest, + ListToolsResponseItem_Bash, + ListToolsResponseItem_Code, + ListToolsResponseItem_Computer, + ListToolsResponseItem_Dtmf, + ListToolsResponseItem_EndCall, + ListToolsResponseItem_Function, + ListToolsResponseItem_GohighlevelCalendarAvailabilityCheck, + ListToolsResponseItem_GohighlevelCalendarEventCreate, + ListToolsResponseItem_GohighlevelContactCreate, + ListToolsResponseItem_GohighlevelContactGet, + ListToolsResponseItem_GoogleCalendarAvailabilityCheck, + ListToolsResponseItem_GoogleCalendarEventCreate, + ListToolsResponseItem_GoogleSheetsRowAppend, + ListToolsResponseItem_Handoff, + ListToolsResponseItem_Mcp, + ListToolsResponseItem_Query, + ListToolsResponseItem_SipRequest, + ListToolsResponseItem_SlackMessageSend, + ListToolsResponseItem_Sms, + ListToolsResponseItem_TextEditor, + ListToolsResponseItem_TransferCall, + ListToolsResponseItem_Voicemail, + UpdateToolsRequestBody, + UpdateToolsRequestBody_ApiRequest, + UpdateToolsRequestBody_Bash, + UpdateToolsRequestBody_Computer, + UpdateToolsRequestBody_Dtmf, + UpdateToolsRequestBody_EndCall, + UpdateToolsRequestBody_Function, + UpdateToolsRequestBody_GohighlevelCalendarAvailabilityCheck, + UpdateToolsRequestBody_GohighlevelCalendarEventCreate, + UpdateToolsRequestBody_GohighlevelContactCreate, + UpdateToolsRequestBody_GohighlevelContactGet, + UpdateToolsRequestBody_GoogleCalendarAvailabilityCheck, + UpdateToolsRequestBody_GoogleCalendarEventCreate, + UpdateToolsRequestBody_GoogleSheetsRowAppend, + UpdateToolsRequestBody_Handoff, + UpdateToolsRequestBody_Mcp, + UpdateToolsRequestBody_Query, + UpdateToolsRequestBody_SipRequest, + UpdateToolsRequestBody_SlackMessageSend, + UpdateToolsRequestBody_Sms, + UpdateToolsRequestBody_TextEditor, + UpdateToolsRequestBody_TransferCall, + UpdateToolsRequestBody_Voicemail, + UpdateToolsResponse, + UpdateToolsResponse_ApiRequest, + UpdateToolsResponse_Bash, + UpdateToolsResponse_Code, + UpdateToolsResponse_Computer, + UpdateToolsResponse_Dtmf, + UpdateToolsResponse_EndCall, + UpdateToolsResponse_Function, + UpdateToolsResponse_GohighlevelCalendarAvailabilityCheck, + UpdateToolsResponse_GohighlevelCalendarEventCreate, + UpdateToolsResponse_GohighlevelContactCreate, + UpdateToolsResponse_GohighlevelContactGet, + UpdateToolsResponse_GoogleCalendarAvailabilityCheck, + UpdateToolsResponse_GoogleCalendarEventCreate, + UpdateToolsResponse_GoogleSheetsRowAppend, + UpdateToolsResponse_Handoff, + UpdateToolsResponse_Mcp, + UpdateToolsResponse_Query, + UpdateToolsResponse_SipRequest, + UpdateToolsResponse_SlackMessageSend, + UpdateToolsResponse_Sms, + UpdateToolsResponse_TextEditor, + UpdateToolsResponse_TransferCall, + UpdateToolsResponse_Voicemail, + ) +_dynamic_imports: typing.Dict[str, str] = { + "CreateToolsRequest": ".types", + "CreateToolsRequest_ApiRequest": ".types", + "CreateToolsRequest_Bash": ".types", + "CreateToolsRequest_Computer": ".types", + "CreateToolsRequest_Dtmf": ".types", + "CreateToolsRequest_EndCall": ".types", + "CreateToolsRequest_Function": ".types", + "CreateToolsRequest_GohighlevelCalendarAvailabilityCheck": ".types", + "CreateToolsRequest_GohighlevelCalendarEventCreate": ".types", + "CreateToolsRequest_GohighlevelContactCreate": ".types", + "CreateToolsRequest_GohighlevelContactGet": ".types", + "CreateToolsRequest_GoogleCalendarAvailabilityCheck": ".types", + "CreateToolsRequest_GoogleCalendarEventCreate": ".types", + "CreateToolsRequest_GoogleSheetsRowAppend": ".types", + "CreateToolsRequest_Handoff": ".types", + "CreateToolsRequest_Mcp": ".types", + "CreateToolsRequest_Query": ".types", + "CreateToolsRequest_SipRequest": ".types", + "CreateToolsRequest_SlackMessageSend": ".types", + "CreateToolsRequest_Sms": ".types", + "CreateToolsRequest_TextEditor": ".types", + "CreateToolsRequest_TransferCall": ".types", + "CreateToolsRequest_Voicemail": ".types", + "CreateToolsResponse": ".types", + "CreateToolsResponse_ApiRequest": ".types", + "CreateToolsResponse_Bash": ".types", + "CreateToolsResponse_Code": ".types", + "CreateToolsResponse_Computer": ".types", + "CreateToolsResponse_Dtmf": ".types", + "CreateToolsResponse_EndCall": ".types", + "CreateToolsResponse_Function": ".types", + "CreateToolsResponse_GohighlevelCalendarAvailabilityCheck": ".types", + "CreateToolsResponse_GohighlevelCalendarEventCreate": ".types", + "CreateToolsResponse_GohighlevelContactCreate": ".types", + "CreateToolsResponse_GohighlevelContactGet": ".types", + "CreateToolsResponse_GoogleCalendarAvailabilityCheck": ".types", + "CreateToolsResponse_GoogleCalendarEventCreate": ".types", + "CreateToolsResponse_GoogleSheetsRowAppend": ".types", + "CreateToolsResponse_Handoff": ".types", + "CreateToolsResponse_Mcp": ".types", + "CreateToolsResponse_Query": ".types", + "CreateToolsResponse_SipRequest": ".types", + "CreateToolsResponse_SlackMessageSend": ".types", + "CreateToolsResponse_Sms": ".types", + "CreateToolsResponse_TextEditor": ".types", + "CreateToolsResponse_TransferCall": ".types", + "CreateToolsResponse_Voicemail": ".types", + "DeleteToolsResponse": ".types", + "DeleteToolsResponse_ApiRequest": ".types", + "DeleteToolsResponse_Bash": ".types", + "DeleteToolsResponse_Code": ".types", + "DeleteToolsResponse_Computer": ".types", + "DeleteToolsResponse_Dtmf": ".types", + "DeleteToolsResponse_EndCall": ".types", + "DeleteToolsResponse_Function": ".types", + "DeleteToolsResponse_GohighlevelCalendarAvailabilityCheck": ".types", + "DeleteToolsResponse_GohighlevelCalendarEventCreate": ".types", + "DeleteToolsResponse_GohighlevelContactCreate": ".types", + "DeleteToolsResponse_GohighlevelContactGet": ".types", + "DeleteToolsResponse_GoogleCalendarAvailabilityCheck": ".types", + "DeleteToolsResponse_GoogleCalendarEventCreate": ".types", + "DeleteToolsResponse_GoogleSheetsRowAppend": ".types", + "DeleteToolsResponse_Handoff": ".types", + "DeleteToolsResponse_Mcp": ".types", + "DeleteToolsResponse_Query": ".types", + "DeleteToolsResponse_SipRequest": ".types", + "DeleteToolsResponse_SlackMessageSend": ".types", + "DeleteToolsResponse_Sms": ".types", + "DeleteToolsResponse_TextEditor": ".types", + "DeleteToolsResponse_TransferCall": ".types", + "DeleteToolsResponse_Voicemail": ".types", + "GetToolsResponse": ".types", + "GetToolsResponse_ApiRequest": ".types", + "GetToolsResponse_Bash": ".types", + "GetToolsResponse_Code": ".types", + "GetToolsResponse_Computer": ".types", + "GetToolsResponse_Dtmf": ".types", + "GetToolsResponse_EndCall": ".types", + "GetToolsResponse_Function": ".types", + "GetToolsResponse_GohighlevelCalendarAvailabilityCheck": ".types", + "GetToolsResponse_GohighlevelCalendarEventCreate": ".types", + "GetToolsResponse_GohighlevelContactCreate": ".types", + "GetToolsResponse_GohighlevelContactGet": ".types", + "GetToolsResponse_GoogleCalendarAvailabilityCheck": ".types", + "GetToolsResponse_GoogleCalendarEventCreate": ".types", + "GetToolsResponse_GoogleSheetsRowAppend": ".types", + "GetToolsResponse_Handoff": ".types", + "GetToolsResponse_Mcp": ".types", + "GetToolsResponse_Query": ".types", + "GetToolsResponse_SipRequest": ".types", + "GetToolsResponse_SlackMessageSend": ".types", + "GetToolsResponse_Sms": ".types", + "GetToolsResponse_TextEditor": ".types", + "GetToolsResponse_TransferCall": ".types", + "GetToolsResponse_Voicemail": ".types", + "ListToolsResponseItem": ".types", + "ListToolsResponseItem_ApiRequest": ".types", + "ListToolsResponseItem_Bash": ".types", + "ListToolsResponseItem_Code": ".types", + "ListToolsResponseItem_Computer": ".types", + "ListToolsResponseItem_Dtmf": ".types", + "ListToolsResponseItem_EndCall": ".types", + "ListToolsResponseItem_Function": ".types", + "ListToolsResponseItem_GohighlevelCalendarAvailabilityCheck": ".types", + "ListToolsResponseItem_GohighlevelCalendarEventCreate": ".types", + "ListToolsResponseItem_GohighlevelContactCreate": ".types", + "ListToolsResponseItem_GohighlevelContactGet": ".types", + "ListToolsResponseItem_GoogleCalendarAvailabilityCheck": ".types", + "ListToolsResponseItem_GoogleCalendarEventCreate": ".types", + "ListToolsResponseItem_GoogleSheetsRowAppend": ".types", + "ListToolsResponseItem_Handoff": ".types", + "ListToolsResponseItem_Mcp": ".types", + "ListToolsResponseItem_Query": ".types", + "ListToolsResponseItem_SipRequest": ".types", + "ListToolsResponseItem_SlackMessageSend": ".types", + "ListToolsResponseItem_Sms": ".types", + "ListToolsResponseItem_TextEditor": ".types", + "ListToolsResponseItem_TransferCall": ".types", + "ListToolsResponseItem_Voicemail": ".types", + "UpdateToolsRequestBody": ".types", + "UpdateToolsRequestBody_ApiRequest": ".types", + "UpdateToolsRequestBody_Bash": ".types", + "UpdateToolsRequestBody_Computer": ".types", + "UpdateToolsRequestBody_Dtmf": ".types", + "UpdateToolsRequestBody_EndCall": ".types", + "UpdateToolsRequestBody_Function": ".types", + "UpdateToolsRequestBody_GohighlevelCalendarAvailabilityCheck": ".types", + "UpdateToolsRequestBody_GohighlevelCalendarEventCreate": ".types", + "UpdateToolsRequestBody_GohighlevelContactCreate": ".types", + "UpdateToolsRequestBody_GohighlevelContactGet": ".types", + "UpdateToolsRequestBody_GoogleCalendarAvailabilityCheck": ".types", + "UpdateToolsRequestBody_GoogleCalendarEventCreate": ".types", + "UpdateToolsRequestBody_GoogleSheetsRowAppend": ".types", + "UpdateToolsRequestBody_Handoff": ".types", + "UpdateToolsRequestBody_Mcp": ".types", + "UpdateToolsRequestBody_Query": ".types", + "UpdateToolsRequestBody_SipRequest": ".types", + "UpdateToolsRequestBody_SlackMessageSend": ".types", + "UpdateToolsRequestBody_Sms": ".types", + "UpdateToolsRequestBody_TextEditor": ".types", + "UpdateToolsRequestBody_TransferCall": ".types", + "UpdateToolsRequestBody_Voicemail": ".types", + "UpdateToolsResponse": ".types", + "UpdateToolsResponse_ApiRequest": ".types", + "UpdateToolsResponse_Bash": ".types", + "UpdateToolsResponse_Code": ".types", + "UpdateToolsResponse_Computer": ".types", + "UpdateToolsResponse_Dtmf": ".types", + "UpdateToolsResponse_EndCall": ".types", + "UpdateToolsResponse_Function": ".types", + "UpdateToolsResponse_GohighlevelCalendarAvailabilityCheck": ".types", + "UpdateToolsResponse_GohighlevelCalendarEventCreate": ".types", + "UpdateToolsResponse_GohighlevelContactCreate": ".types", + "UpdateToolsResponse_GohighlevelContactGet": ".types", + "UpdateToolsResponse_GoogleCalendarAvailabilityCheck": ".types", + "UpdateToolsResponse_GoogleCalendarEventCreate": ".types", + "UpdateToolsResponse_GoogleSheetsRowAppend": ".types", + "UpdateToolsResponse_Handoff": ".types", + "UpdateToolsResponse_Mcp": ".types", + "UpdateToolsResponse_Query": ".types", + "UpdateToolsResponse_SipRequest": ".types", + "UpdateToolsResponse_SlackMessageSend": ".types", + "UpdateToolsResponse_Sms": ".types", + "UpdateToolsResponse_TextEditor": ".types", + "UpdateToolsResponse_TransferCall": ".types", + "UpdateToolsResponse_Voicemail": ".types", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ - "ToolsCreateRequest", - "ToolsCreateResponse", - "ToolsDeleteResponse", - "ToolsGetResponse", - "ToolsListResponseItem", - "ToolsUpdateResponse", - "UpdateToolDtoMessagesItem", + "CreateToolsRequest", + "CreateToolsRequest_ApiRequest", + "CreateToolsRequest_Bash", + "CreateToolsRequest_Computer", + "CreateToolsRequest_Dtmf", + "CreateToolsRequest_EndCall", + "CreateToolsRequest_Function", + "CreateToolsRequest_GohighlevelCalendarAvailabilityCheck", + "CreateToolsRequest_GohighlevelCalendarEventCreate", + "CreateToolsRequest_GohighlevelContactCreate", + "CreateToolsRequest_GohighlevelContactGet", + "CreateToolsRequest_GoogleCalendarAvailabilityCheck", + "CreateToolsRequest_GoogleCalendarEventCreate", + "CreateToolsRequest_GoogleSheetsRowAppend", + "CreateToolsRequest_Handoff", + "CreateToolsRequest_Mcp", + "CreateToolsRequest_Query", + "CreateToolsRequest_SipRequest", + "CreateToolsRequest_SlackMessageSend", + "CreateToolsRequest_Sms", + "CreateToolsRequest_TextEditor", + "CreateToolsRequest_TransferCall", + "CreateToolsRequest_Voicemail", + "CreateToolsResponse", + "CreateToolsResponse_ApiRequest", + "CreateToolsResponse_Bash", + "CreateToolsResponse_Code", + "CreateToolsResponse_Computer", + "CreateToolsResponse_Dtmf", + "CreateToolsResponse_EndCall", + "CreateToolsResponse_Function", + "CreateToolsResponse_GohighlevelCalendarAvailabilityCheck", + "CreateToolsResponse_GohighlevelCalendarEventCreate", + "CreateToolsResponse_GohighlevelContactCreate", + "CreateToolsResponse_GohighlevelContactGet", + "CreateToolsResponse_GoogleCalendarAvailabilityCheck", + "CreateToolsResponse_GoogleCalendarEventCreate", + "CreateToolsResponse_GoogleSheetsRowAppend", + "CreateToolsResponse_Handoff", + "CreateToolsResponse_Mcp", + "CreateToolsResponse_Query", + "CreateToolsResponse_SipRequest", + "CreateToolsResponse_SlackMessageSend", + "CreateToolsResponse_Sms", + "CreateToolsResponse_TextEditor", + "CreateToolsResponse_TransferCall", + "CreateToolsResponse_Voicemail", + "DeleteToolsResponse", + "DeleteToolsResponse_ApiRequest", + "DeleteToolsResponse_Bash", + "DeleteToolsResponse_Code", + "DeleteToolsResponse_Computer", + "DeleteToolsResponse_Dtmf", + "DeleteToolsResponse_EndCall", + "DeleteToolsResponse_Function", + "DeleteToolsResponse_GohighlevelCalendarAvailabilityCheck", + "DeleteToolsResponse_GohighlevelCalendarEventCreate", + "DeleteToolsResponse_GohighlevelContactCreate", + "DeleteToolsResponse_GohighlevelContactGet", + "DeleteToolsResponse_GoogleCalendarAvailabilityCheck", + "DeleteToolsResponse_GoogleCalendarEventCreate", + "DeleteToolsResponse_GoogleSheetsRowAppend", + "DeleteToolsResponse_Handoff", + "DeleteToolsResponse_Mcp", + "DeleteToolsResponse_Query", + "DeleteToolsResponse_SipRequest", + "DeleteToolsResponse_SlackMessageSend", + "DeleteToolsResponse_Sms", + "DeleteToolsResponse_TextEditor", + "DeleteToolsResponse_TransferCall", + "DeleteToolsResponse_Voicemail", + "GetToolsResponse", + "GetToolsResponse_ApiRequest", + "GetToolsResponse_Bash", + "GetToolsResponse_Code", + "GetToolsResponse_Computer", + "GetToolsResponse_Dtmf", + "GetToolsResponse_EndCall", + "GetToolsResponse_Function", + "GetToolsResponse_GohighlevelCalendarAvailabilityCheck", + "GetToolsResponse_GohighlevelCalendarEventCreate", + "GetToolsResponse_GohighlevelContactCreate", + "GetToolsResponse_GohighlevelContactGet", + "GetToolsResponse_GoogleCalendarAvailabilityCheck", + "GetToolsResponse_GoogleCalendarEventCreate", + "GetToolsResponse_GoogleSheetsRowAppend", + "GetToolsResponse_Handoff", + "GetToolsResponse_Mcp", + "GetToolsResponse_Query", + "GetToolsResponse_SipRequest", + "GetToolsResponse_SlackMessageSend", + "GetToolsResponse_Sms", + "GetToolsResponse_TextEditor", + "GetToolsResponse_TransferCall", + "GetToolsResponse_Voicemail", + "ListToolsResponseItem", + "ListToolsResponseItem_ApiRequest", + "ListToolsResponseItem_Bash", + "ListToolsResponseItem_Code", + "ListToolsResponseItem_Computer", + "ListToolsResponseItem_Dtmf", + "ListToolsResponseItem_EndCall", + "ListToolsResponseItem_Function", + "ListToolsResponseItem_GohighlevelCalendarAvailabilityCheck", + "ListToolsResponseItem_GohighlevelCalendarEventCreate", + "ListToolsResponseItem_GohighlevelContactCreate", + "ListToolsResponseItem_GohighlevelContactGet", + "ListToolsResponseItem_GoogleCalendarAvailabilityCheck", + "ListToolsResponseItem_GoogleCalendarEventCreate", + "ListToolsResponseItem_GoogleSheetsRowAppend", + "ListToolsResponseItem_Handoff", + "ListToolsResponseItem_Mcp", + "ListToolsResponseItem_Query", + "ListToolsResponseItem_SipRequest", + "ListToolsResponseItem_SlackMessageSend", + "ListToolsResponseItem_Sms", + "ListToolsResponseItem_TextEditor", + "ListToolsResponseItem_TransferCall", + "ListToolsResponseItem_Voicemail", + "UpdateToolsRequestBody", + "UpdateToolsRequestBody_ApiRequest", + "UpdateToolsRequestBody_Bash", + "UpdateToolsRequestBody_Computer", + "UpdateToolsRequestBody_Dtmf", + "UpdateToolsRequestBody_EndCall", + "UpdateToolsRequestBody_Function", + "UpdateToolsRequestBody_GohighlevelCalendarAvailabilityCheck", + "UpdateToolsRequestBody_GohighlevelCalendarEventCreate", + "UpdateToolsRequestBody_GohighlevelContactCreate", + "UpdateToolsRequestBody_GohighlevelContactGet", + "UpdateToolsRequestBody_GoogleCalendarAvailabilityCheck", + "UpdateToolsRequestBody_GoogleCalendarEventCreate", + "UpdateToolsRequestBody_GoogleSheetsRowAppend", + "UpdateToolsRequestBody_Handoff", + "UpdateToolsRequestBody_Mcp", + "UpdateToolsRequestBody_Query", + "UpdateToolsRequestBody_SipRequest", + "UpdateToolsRequestBody_SlackMessageSend", + "UpdateToolsRequestBody_Sms", + "UpdateToolsRequestBody_TextEditor", + "UpdateToolsRequestBody_TransferCall", + "UpdateToolsRequestBody_Voicemail", + "UpdateToolsResponse", + "UpdateToolsResponse_ApiRequest", + "UpdateToolsResponse_Bash", + "UpdateToolsResponse_Code", + "UpdateToolsResponse_Computer", + "UpdateToolsResponse_Dtmf", + "UpdateToolsResponse_EndCall", + "UpdateToolsResponse_Function", + "UpdateToolsResponse_GohighlevelCalendarAvailabilityCheck", + "UpdateToolsResponse_GohighlevelCalendarEventCreate", + "UpdateToolsResponse_GohighlevelContactCreate", + "UpdateToolsResponse_GohighlevelContactGet", + "UpdateToolsResponse_GoogleCalendarAvailabilityCheck", + "UpdateToolsResponse_GoogleCalendarEventCreate", + "UpdateToolsResponse_GoogleSheetsRowAppend", + "UpdateToolsResponse_Handoff", + "UpdateToolsResponse_Mcp", + "UpdateToolsResponse_Query", + "UpdateToolsResponse_SipRequest", + "UpdateToolsResponse_SlackMessageSend", + "UpdateToolsResponse_Sms", + "UpdateToolsResponse_TextEditor", + "UpdateToolsResponse_TransferCall", + "UpdateToolsResponse_Voicemail", ] diff --git a/src/vapi/tools/client.py b/src/vapi/tools/client.py index e83f794f..208314a1 100644 --- a/src/vapi/tools/client.py +++ b/src/vapi/tools/client.py @@ -1,25 +1,18 @@ # This file was auto-generated by Fern from our API Definition. -import typing -from ..core.client_wrapper import SyncClientWrapper import datetime as dt +import typing + +from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ..core.request_options import RequestOptions -from .types.tools_list_response_item import ToolsListResponseItem -from ..core.datetime_utils import serialize_datetime -from ..core.pydantic_utilities import parse_obj_as -from json.decoder import JSONDecodeError -from ..core.api_error import ApiError -from .types.tools_create_request import ToolsCreateRequest -from .types.tools_create_response import ToolsCreateResponse -from ..core.serialization import convert_and_respect_annotation_metadata -from .types.tools_get_response import ToolsGetResponse -from ..core.jsonable_encoder import jsonable_encoder -from .types.tools_delete_response import ToolsDeleteResponse -from .types.update_tool_dto_messages_item import UpdateToolDtoMessagesItem -from ..types.open_ai_function import OpenAiFunction -from ..types.server import Server -from .types.tools_update_response import ToolsUpdateResponse -from ..core.client_wrapper import AsyncClientWrapper +from .raw_client import AsyncRawToolsClient, RawToolsClient +from .types.create_tools_request import CreateToolsRequest +from .types.create_tools_response import CreateToolsResponse +from .types.delete_tools_response import DeleteToolsResponse +from .types.get_tools_response import GetToolsResponse +from .types.list_tools_response_item import ListToolsResponseItem +from .types.update_tools_request_body import UpdateToolsRequestBody +from .types.update_tools_response import UpdateToolsResponse # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -27,7 +20,18 @@ class ToolsClient: def __init__(self, *, client_wrapper: SyncClientWrapper): - self._client_wrapper = client_wrapper + self._raw_client = RawToolsClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawToolsClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawToolsClient + """ + return self._raw_client def list( self, @@ -42,7 +46,7 @@ def list( updated_at_ge: typing.Optional[dt.datetime] = None, updated_at_le: typing.Optional[dt.datetime] = None, request_options: typing.Optional[RequestOptions] = None, - ) -> typing.List[ToolsListResponseItem]: + ) -> typing.List[ListToolsResponseItem]: """ Parameters ---------- @@ -78,7 +82,7 @@ def list( Returns ------- - typing.List[ToolsListResponseItem] + typing.List[ListToolsResponseItem] Examples @@ -90,87 +94,55 @@ def list( ) client.tools.list() """ - _response = self._client_wrapper.httpx_client.request( - "tool", - method="GET", - params={ - "limit": limit, - "createdAtGt": serialize_datetime(created_at_gt) if created_at_gt is not None else None, - "createdAtLt": serialize_datetime(created_at_lt) if created_at_lt is not None else None, - "createdAtGe": serialize_datetime(created_at_ge) if created_at_ge is not None else None, - "createdAtLe": serialize_datetime(created_at_le) if created_at_le is not None else None, - "updatedAtGt": serialize_datetime(updated_at_gt) if updated_at_gt is not None else None, - "updatedAtLt": serialize_datetime(updated_at_lt) if updated_at_lt is not None else None, - "updatedAtGe": serialize_datetime(updated_at_ge) if updated_at_ge is not None else None, - "updatedAtLe": serialize_datetime(updated_at_le) if updated_at_le is not None else None, - }, + _response = self._raw_client.list( + limit=limit, + created_at_gt=created_at_gt, + created_at_lt=created_at_lt, + created_at_ge=created_at_ge, + created_at_le=created_at_le, + updated_at_gt=updated_at_gt, + updated_at_lt=updated_at_lt, + updated_at_ge=updated_at_ge, + updated_at_le=updated_at_le, request_options=request_options, ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - typing.List[ToolsListResponseItem], - parse_obj_as( - type_=typing.List[ToolsListResponseItem], # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + return _response.data def create( - self, *, request: ToolsCreateRequest, request_options: typing.Optional[RequestOptions] = None - ) -> ToolsCreateResponse: + self, *, request: CreateToolsRequest, request_options: typing.Optional[RequestOptions] = None + ) -> CreateToolsResponse: """ Parameters ---------- - request : ToolsCreateRequest + request : CreateToolsRequest request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - ToolsCreateResponse + CreateToolsResponse Examples -------- - from vapi import CreateDtmfToolDto, Vapi + from vapi import Vapi + from vapi.tools import CreateToolsRequest_ApiRequest client = Vapi( token="YOUR_TOKEN", ) client.tools.create( - request=CreateDtmfToolDto(), - ) - """ - _response = self._client_wrapper.httpx_client.request( - "tool", - method="POST", - json=convert_and_respect_annotation_metadata( - object_=request, annotation=ToolsCreateRequest, direction="write" + request=CreateToolsRequest_ApiRequest( + method="POST", + url="url", ), - request_options=request_options, - omit=OMIT, ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - ToolsCreateResponse, - parse_obj_as( - type_=ToolsCreateResponse, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> ToolsGetResponse: + """ + _response = self._raw_client.create(request=request, request_options=request_options) + return _response.data + + def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> GetToolsResponse: """ Parameters ---------- @@ -181,7 +153,7 @@ def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = Non Returns ------- - ToolsGetResponse + GetToolsResponse Examples @@ -195,26 +167,10 @@ def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = Non id="id", ) """ - _response = self._client_wrapper.httpx_client.request( - f"tool/{jsonable_encoder(id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - ToolsGetResponse, - parse_obj_as( - type_=ToolsGetResponse, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> ToolsDeleteResponse: + _response = self._raw_client.get(id, request_options=request_options) + return _response.data + + def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> DeleteToolsResponse: """ Parameters ---------- @@ -225,7 +181,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = Returns ------- - ToolsDeleteResponse + DeleteToolsResponse Examples @@ -239,121 +195,58 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = id="id", ) """ - _response = self._client_wrapper.httpx_client.request( - f"tool/{jsonable_encoder(id)}", - method="DELETE", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - ToolsDeleteResponse, - parse_obj_as( - type_=ToolsDeleteResponse, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = self._raw_client.delete(id, request_options=request_options) + return _response.data def update( - self, - id: str, - *, - async_: typing.Optional[bool] = OMIT, - messages: typing.Optional[typing.Sequence[UpdateToolDtoMessagesItem]] = OMIT, - function: typing.Optional[OpenAiFunction] = OMIT, - server: typing.Optional[Server] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> ToolsUpdateResponse: + self, id: str, *, request: UpdateToolsRequestBody, request_options: typing.Optional[RequestOptions] = None + ) -> UpdateToolsResponse: """ Parameters ---------- id : str - async_ : typing.Optional[bool] - This determines if the tool is async. - - If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server. - - If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server. - - Defaults to synchronous (`false`). - - messages : typing.Optional[typing.Sequence[UpdateToolDtoMessagesItem]] - These are the messages that will be spoken to the user as the tool is running. - - For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. - - function : typing.Optional[OpenAiFunction] - This is the function definition of the tool. - - For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on tool-specific fields like `tool.destinations`. But, even in those cases, you can provide a custom function definition for advanced use cases. - - An example of an advanced use case is if you want to customize the message that's spoken for `endCall` tool. You can specify a function where it returns an argument "reason". Then, in `messages` array, you can have many "request-complete" messages. One of these messages will be triggered if the `messages[].conditions` matches the "reason" argument. - - server : typing.Optional[Server] - This is the server that will be hit when this tool is requested by the model. - - All requests will be sent with the call object among other things. You can find more details in the Server URL documentation. - - This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: highest tool.server.url, then assistant.serverUrl, then phoneNumber.serverUrl, then org.serverUrl. + request : UpdateToolsRequestBody request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - ToolsUpdateResponse + UpdateToolsResponse Examples -------- from vapi import Vapi + from vapi.tools import UpdateToolsRequestBody_ApiRequest client = Vapi( token="YOUR_TOKEN", ) client.tools.update( id="id", + request=UpdateToolsRequestBody_ApiRequest(), ) """ - _response = self._client_wrapper.httpx_client.request( - f"tool/{jsonable_encoder(id)}", - method="PATCH", - json={ - "async": async_, - "messages": convert_and_respect_annotation_metadata( - object_=messages, annotation=typing.Sequence[UpdateToolDtoMessagesItem], direction="write" - ), - "function": convert_and_respect_annotation_metadata( - object_=function, annotation=OpenAiFunction, direction="write" - ), - "server": convert_and_respect_annotation_metadata(object_=server, annotation=Server, direction="write"), - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - ToolsUpdateResponse, - parse_obj_as( - type_=ToolsUpdateResponse, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = self._raw_client.update(id, request=request, request_options=request_options) + return _response.data class AsyncToolsClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper + self._raw_client = AsyncRawToolsClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawToolsClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawToolsClient + """ + return self._raw_client async def list( self, @@ -368,7 +261,7 @@ async def list( updated_at_ge: typing.Optional[dt.datetime] = None, updated_at_le: typing.Optional[dt.datetime] = None, request_options: typing.Optional[RequestOptions] = None, - ) -> typing.List[ToolsListResponseItem]: + ) -> typing.List[ListToolsResponseItem]: """ Parameters ---------- @@ -404,7 +297,7 @@ async def list( Returns ------- - typing.List[ToolsListResponseItem] + typing.List[ListToolsResponseItem] Examples @@ -424,57 +317,42 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - "tool", - method="GET", - params={ - "limit": limit, - "createdAtGt": serialize_datetime(created_at_gt) if created_at_gt is not None else None, - "createdAtLt": serialize_datetime(created_at_lt) if created_at_lt is not None else None, - "createdAtGe": serialize_datetime(created_at_ge) if created_at_ge is not None else None, - "createdAtLe": serialize_datetime(created_at_le) if created_at_le is not None else None, - "updatedAtGt": serialize_datetime(updated_at_gt) if updated_at_gt is not None else None, - "updatedAtLt": serialize_datetime(updated_at_lt) if updated_at_lt is not None else None, - "updatedAtGe": serialize_datetime(updated_at_ge) if updated_at_ge is not None else None, - "updatedAtLe": serialize_datetime(updated_at_le) if updated_at_le is not None else None, - }, + _response = await self._raw_client.list( + limit=limit, + created_at_gt=created_at_gt, + created_at_lt=created_at_lt, + created_at_ge=created_at_ge, + created_at_le=created_at_le, + updated_at_gt=updated_at_gt, + updated_at_lt=updated_at_lt, + updated_at_ge=updated_at_ge, + updated_at_le=updated_at_le, request_options=request_options, ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - typing.List[ToolsListResponseItem], - parse_obj_as( - type_=typing.List[ToolsListResponseItem], # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + return _response.data async def create( - self, *, request: ToolsCreateRequest, request_options: typing.Optional[RequestOptions] = None - ) -> ToolsCreateResponse: + self, *, request: CreateToolsRequest, request_options: typing.Optional[RequestOptions] = None + ) -> CreateToolsResponse: """ Parameters ---------- - request : ToolsCreateRequest + request : CreateToolsRequest request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - ToolsCreateResponse + CreateToolsResponse Examples -------- import asyncio - from vapi import AsyncVapi, CreateDtmfToolDto + from vapi import AsyncVapi + from vapi.tools import CreateToolsRequest_ApiRequest client = AsyncVapi( token="YOUR_TOKEN", @@ -483,36 +361,19 @@ async def create( async def main() -> None: await client.tools.create( - request=CreateDtmfToolDto(), + request=CreateToolsRequest_ApiRequest( + method="POST", + url="url", + ), ) asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - "tool", - method="POST", - json=convert_and_respect_annotation_metadata( - object_=request, annotation=ToolsCreateRequest, direction="write" - ), - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - ToolsCreateResponse, - parse_obj_as( - type_=ToolsCreateResponse, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - async def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> ToolsGetResponse: + _response = await self._raw_client.create(request=request, request_options=request_options) + return _response.data + + async def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> GetToolsResponse: """ Parameters ---------- @@ -523,7 +384,7 @@ async def get(self, id: str, *, request_options: typing.Optional[RequestOptions] Returns ------- - ToolsGetResponse + GetToolsResponse Examples @@ -545,26 +406,10 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - f"tool/{jsonable_encoder(id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - ToolsGetResponse, - parse_obj_as( - type_=ToolsGetResponse, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - async def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> ToolsDeleteResponse: + _response = await self._raw_client.get(id, request_options=request_options) + return _response.data + + async def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> DeleteToolsResponse: """ Parameters ---------- @@ -575,7 +420,7 @@ async def delete(self, id: str, *, request_options: typing.Optional[RequestOptio Returns ------- - ToolsDeleteResponse + DeleteToolsResponse Examples @@ -597,74 +442,25 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - f"tool/{jsonable_encoder(id)}", - method="DELETE", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - ToolsDeleteResponse, - parse_obj_as( - type_=ToolsDeleteResponse, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = await self._raw_client.delete(id, request_options=request_options) + return _response.data async def update( - self, - id: str, - *, - async_: typing.Optional[bool] = OMIT, - messages: typing.Optional[typing.Sequence[UpdateToolDtoMessagesItem]] = OMIT, - function: typing.Optional[OpenAiFunction] = OMIT, - server: typing.Optional[Server] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> ToolsUpdateResponse: + self, id: str, *, request: UpdateToolsRequestBody, request_options: typing.Optional[RequestOptions] = None + ) -> UpdateToolsResponse: """ Parameters ---------- id : str - async_ : typing.Optional[bool] - This determines if the tool is async. - - If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server. - - If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server. - - Defaults to synchronous (`false`). - - messages : typing.Optional[typing.Sequence[UpdateToolDtoMessagesItem]] - These are the messages that will be spoken to the user as the tool is running. - - For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. - - function : typing.Optional[OpenAiFunction] - This is the function definition of the tool. - - For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on tool-specific fields like `tool.destinations`. But, even in those cases, you can provide a custom function definition for advanced use cases. - - An example of an advanced use case is if you want to customize the message that's spoken for `endCall` tool. You can specify a function where it returns an argument "reason". Then, in `messages` array, you can have many "request-complete" messages. One of these messages will be triggered if the `messages[].conditions` matches the "reason" argument. - - server : typing.Optional[Server] - This is the server that will be hit when this tool is requested by the model. - - All requests will be sent with the call object among other things. You can find more details in the Server URL documentation. - - This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: highest tool.server.url, then assistant.serverUrl, then phoneNumber.serverUrl, then org.serverUrl. + request : UpdateToolsRequestBody request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - ToolsUpdateResponse + UpdateToolsResponse Examples @@ -672,6 +468,7 @@ async def update( import asyncio from vapi import AsyncVapi + from vapi.tools import UpdateToolsRequestBody_ApiRequest client = AsyncVapi( token="YOUR_TOKEN", @@ -681,37 +478,11 @@ async def update( async def main() -> None: await client.tools.update( id="id", + request=UpdateToolsRequestBody_ApiRequest(), ) asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - f"tool/{jsonable_encoder(id)}", - method="PATCH", - json={ - "async": async_, - "messages": convert_and_respect_annotation_metadata( - object_=messages, annotation=typing.Sequence[UpdateToolDtoMessagesItem], direction="write" - ), - "function": convert_and_respect_annotation_metadata( - object_=function, annotation=OpenAiFunction, direction="write" - ), - "server": convert_and_respect_annotation_metadata(object_=server, annotation=Server, direction="write"), - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - ToolsUpdateResponse, - parse_obj_as( - type_=ToolsUpdateResponse, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = await self._raw_client.update(id, request=request, request_options=request_options) + return _response.data diff --git a/src/vapi/tools/raw_client.py b/src/vapi/tools/raw_client.py new file mode 100644 index 00000000..7c3cc896 --- /dev/null +++ b/src/vapi/tools/raw_client.py @@ -0,0 +1,556 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing +from json.decoder import JSONDecodeError + +from ..core.api_error import ApiError +from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.datetime_utils import serialize_datetime +from ..core.http_response import AsyncHttpResponse, HttpResponse +from ..core.jsonable_encoder import jsonable_encoder +from ..core.parse_error import ParsingError +from ..core.request_options import RequestOptions +from ..core.serialization import convert_and_respect_annotation_metadata +from ..core.unchecked_base_model import construct_type +from .types.create_tools_request import CreateToolsRequest +from .types.create_tools_response import CreateToolsResponse +from .types.delete_tools_response import DeleteToolsResponse +from .types.get_tools_response import GetToolsResponse +from .types.list_tools_response_item import ListToolsResponseItem +from .types.update_tools_request_body import UpdateToolsRequestBody +from .types.update_tools_response import UpdateToolsResponse +from pydantic import ValidationError + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class RawToolsClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def list( + self, + *, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[typing.List[ListToolsResponseItem]]: + """ + Parameters + ---------- + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[typing.List[ListToolsResponseItem]] + + """ + _response = self._client_wrapper.httpx_client.request( + "tool", + method="GET", + params={ + "limit": limit, + "createdAtGt": serialize_datetime(created_at_gt) if created_at_gt is not None else None, + "createdAtLt": serialize_datetime(created_at_lt) if created_at_lt is not None else None, + "createdAtGe": serialize_datetime(created_at_ge) if created_at_ge is not None else None, + "createdAtLe": serialize_datetime(created_at_le) if created_at_le is not None else None, + "updatedAtGt": serialize_datetime(updated_at_gt) if updated_at_gt is not None else None, + "updatedAtLt": serialize_datetime(updated_at_lt) if updated_at_lt is not None else None, + "updatedAtGe": serialize_datetime(updated_at_ge) if updated_at_ge is not None else None, + "updatedAtLe": serialize_datetime(updated_at_le) if updated_at_le is not None else None, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.List[ListToolsResponseItem], + construct_type( + type_=typing.List[ListToolsResponseItem], # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def create( + self, *, request: CreateToolsRequest, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[CreateToolsResponse]: + """ + Parameters + ---------- + request : CreateToolsRequest + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[CreateToolsResponse] + + """ + _response = self._client_wrapper.httpx_client.request( + "tool", + method="POST", + json=convert_and_respect_annotation_metadata( + object_=request, annotation=CreateToolsRequest, direction="write" + ), + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + CreateToolsResponse, + construct_type( + type_=CreateToolsResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def get( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[GetToolsResponse]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[GetToolsResponse] + + """ + _response = self._client_wrapper.httpx_client.request( + f"tool/{jsonable_encoder(id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + GetToolsResponse, + construct_type( + type_=GetToolsResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def delete( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[DeleteToolsResponse]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[DeleteToolsResponse] + + """ + _response = self._client_wrapper.httpx_client.request( + f"tool/{jsonable_encoder(id)}", + method="DELETE", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + DeleteToolsResponse, + construct_type( + type_=DeleteToolsResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def update( + self, id: str, *, request: UpdateToolsRequestBody, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[UpdateToolsResponse]: + """ + Parameters + ---------- + id : str + + request : UpdateToolsRequestBody + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[UpdateToolsResponse] + + """ + _response = self._client_wrapper.httpx_client.request( + f"tool/{jsonable_encoder(id)}", + method="PATCH", + json=convert_and_respect_annotation_metadata( + object_=request, annotation=UpdateToolsRequestBody, direction="write" + ), + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + UpdateToolsResponse, + construct_type( + type_=UpdateToolsResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawToolsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def list( + self, + *, + limit: typing.Optional[float] = None, + created_at_gt: typing.Optional[dt.datetime] = None, + created_at_lt: typing.Optional[dt.datetime] = None, + created_at_ge: typing.Optional[dt.datetime] = None, + created_at_le: typing.Optional[dt.datetime] = None, + updated_at_gt: typing.Optional[dt.datetime] = None, + updated_at_lt: typing.Optional[dt.datetime] = None, + updated_at_ge: typing.Optional[dt.datetime] = None, + updated_at_le: typing.Optional[dt.datetime] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[typing.List[ListToolsResponseItem]]: + """ + Parameters + ---------- + limit : typing.Optional[float] + This is the maximum number of items to return. Defaults to 100. + + created_at_gt : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than the specified value. + + created_at_lt : typing.Optional[dt.datetime] + This will return items where the createdAt is less than the specified value. + + created_at_ge : typing.Optional[dt.datetime] + This will return items where the createdAt is greater than or equal to the specified value. + + created_at_le : typing.Optional[dt.datetime] + This will return items where the createdAt is less than or equal to the specified value. + + updated_at_gt : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than the specified value. + + updated_at_lt : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than the specified value. + + updated_at_ge : typing.Optional[dt.datetime] + This will return items where the updatedAt is greater than or equal to the specified value. + + updated_at_le : typing.Optional[dt.datetime] + This will return items where the updatedAt is less than or equal to the specified value. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[typing.List[ListToolsResponseItem]] + + """ + _response = await self._client_wrapper.httpx_client.request( + "tool", + method="GET", + params={ + "limit": limit, + "createdAtGt": serialize_datetime(created_at_gt) if created_at_gt is not None else None, + "createdAtLt": serialize_datetime(created_at_lt) if created_at_lt is not None else None, + "createdAtGe": serialize_datetime(created_at_ge) if created_at_ge is not None else None, + "createdAtLe": serialize_datetime(created_at_le) if created_at_le is not None else None, + "updatedAtGt": serialize_datetime(updated_at_gt) if updated_at_gt is not None else None, + "updatedAtLt": serialize_datetime(updated_at_lt) if updated_at_lt is not None else None, + "updatedAtGe": serialize_datetime(updated_at_ge) if updated_at_ge is not None else None, + "updatedAtLe": serialize_datetime(updated_at_le) if updated_at_le is not None else None, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.List[ListToolsResponseItem], + construct_type( + type_=typing.List[ListToolsResponseItem], # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def create( + self, *, request: CreateToolsRequest, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[CreateToolsResponse]: + """ + Parameters + ---------- + request : CreateToolsRequest + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[CreateToolsResponse] + + """ + _response = await self._client_wrapper.httpx_client.request( + "tool", + method="POST", + json=convert_and_respect_annotation_metadata( + object_=request, annotation=CreateToolsRequest, direction="write" + ), + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + CreateToolsResponse, + construct_type( + type_=CreateToolsResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def get( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[GetToolsResponse]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[GetToolsResponse] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"tool/{jsonable_encoder(id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + GetToolsResponse, + construct_type( + type_=GetToolsResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def delete( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[DeleteToolsResponse]: + """ + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[DeleteToolsResponse] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"tool/{jsonable_encoder(id)}", + method="DELETE", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + DeleteToolsResponse, + construct_type( + type_=DeleteToolsResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def update( + self, id: str, *, request: UpdateToolsRequestBody, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[UpdateToolsResponse]: + """ + Parameters + ---------- + id : str + + request : UpdateToolsRequestBody + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[UpdateToolsResponse] + + """ + _response = await self._client_wrapper.httpx_client.request( + f"tool/{jsonable_encoder(id)}", + method="PATCH", + json=convert_and_respect_annotation_metadata( + object_=request, annotation=UpdateToolsRequestBody, direction="write" + ), + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + UpdateToolsResponse, + construct_type( + type_=UpdateToolsResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/vapi/tools/types/__init__.py b/src/vapi/tools/types/__init__.py index cdeebd20..d43db2e2 100644 --- a/src/vapi/tools/types/__init__.py +++ b/src/vapi/tools/types/__init__.py @@ -1,19 +1,547 @@ # This file was auto-generated by Fern from our API Definition. -from .tools_create_request import ToolsCreateRequest -from .tools_create_response import ToolsCreateResponse -from .tools_delete_response import ToolsDeleteResponse -from .tools_get_response import ToolsGetResponse -from .tools_list_response_item import ToolsListResponseItem -from .tools_update_response import ToolsUpdateResponse -from .update_tool_dto_messages_item import UpdateToolDtoMessagesItem +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .create_tools_request import ( + CreateToolsRequest, + CreateToolsRequest_ApiRequest, + CreateToolsRequest_Bash, + CreateToolsRequest_Computer, + CreateToolsRequest_Dtmf, + CreateToolsRequest_EndCall, + CreateToolsRequest_Function, + CreateToolsRequest_GohighlevelCalendarAvailabilityCheck, + CreateToolsRequest_GohighlevelCalendarEventCreate, + CreateToolsRequest_GohighlevelContactCreate, + CreateToolsRequest_GohighlevelContactGet, + CreateToolsRequest_GoogleCalendarAvailabilityCheck, + CreateToolsRequest_GoogleCalendarEventCreate, + CreateToolsRequest_GoogleSheetsRowAppend, + CreateToolsRequest_Handoff, + CreateToolsRequest_Mcp, + CreateToolsRequest_Query, + CreateToolsRequest_SipRequest, + CreateToolsRequest_SlackMessageSend, + CreateToolsRequest_Sms, + CreateToolsRequest_TextEditor, + CreateToolsRequest_TransferCall, + CreateToolsRequest_Voicemail, + ) + from .create_tools_response import ( + CreateToolsResponse, + CreateToolsResponse_ApiRequest, + CreateToolsResponse_Bash, + CreateToolsResponse_Code, + CreateToolsResponse_Computer, + CreateToolsResponse_Dtmf, + CreateToolsResponse_EndCall, + CreateToolsResponse_Function, + CreateToolsResponse_GohighlevelCalendarAvailabilityCheck, + CreateToolsResponse_GohighlevelCalendarEventCreate, + CreateToolsResponse_GohighlevelContactCreate, + CreateToolsResponse_GohighlevelContactGet, + CreateToolsResponse_GoogleCalendarAvailabilityCheck, + CreateToolsResponse_GoogleCalendarEventCreate, + CreateToolsResponse_GoogleSheetsRowAppend, + CreateToolsResponse_Handoff, + CreateToolsResponse_Mcp, + CreateToolsResponse_Query, + CreateToolsResponse_SipRequest, + CreateToolsResponse_SlackMessageSend, + CreateToolsResponse_Sms, + CreateToolsResponse_TextEditor, + CreateToolsResponse_TransferCall, + CreateToolsResponse_Voicemail, + ) + from .delete_tools_response import ( + DeleteToolsResponse, + DeleteToolsResponse_ApiRequest, + DeleteToolsResponse_Bash, + DeleteToolsResponse_Code, + DeleteToolsResponse_Computer, + DeleteToolsResponse_Dtmf, + DeleteToolsResponse_EndCall, + DeleteToolsResponse_Function, + DeleteToolsResponse_GohighlevelCalendarAvailabilityCheck, + DeleteToolsResponse_GohighlevelCalendarEventCreate, + DeleteToolsResponse_GohighlevelContactCreate, + DeleteToolsResponse_GohighlevelContactGet, + DeleteToolsResponse_GoogleCalendarAvailabilityCheck, + DeleteToolsResponse_GoogleCalendarEventCreate, + DeleteToolsResponse_GoogleSheetsRowAppend, + DeleteToolsResponse_Handoff, + DeleteToolsResponse_Mcp, + DeleteToolsResponse_Query, + DeleteToolsResponse_SipRequest, + DeleteToolsResponse_SlackMessageSend, + DeleteToolsResponse_Sms, + DeleteToolsResponse_TextEditor, + DeleteToolsResponse_TransferCall, + DeleteToolsResponse_Voicemail, + ) + from .get_tools_response import ( + GetToolsResponse, + GetToolsResponse_ApiRequest, + GetToolsResponse_Bash, + GetToolsResponse_Code, + GetToolsResponse_Computer, + GetToolsResponse_Dtmf, + GetToolsResponse_EndCall, + GetToolsResponse_Function, + GetToolsResponse_GohighlevelCalendarAvailabilityCheck, + GetToolsResponse_GohighlevelCalendarEventCreate, + GetToolsResponse_GohighlevelContactCreate, + GetToolsResponse_GohighlevelContactGet, + GetToolsResponse_GoogleCalendarAvailabilityCheck, + GetToolsResponse_GoogleCalendarEventCreate, + GetToolsResponse_GoogleSheetsRowAppend, + GetToolsResponse_Handoff, + GetToolsResponse_Mcp, + GetToolsResponse_Query, + GetToolsResponse_SipRequest, + GetToolsResponse_SlackMessageSend, + GetToolsResponse_Sms, + GetToolsResponse_TextEditor, + GetToolsResponse_TransferCall, + GetToolsResponse_Voicemail, + ) + from .list_tools_response_item import ( + ListToolsResponseItem, + ListToolsResponseItem_ApiRequest, + ListToolsResponseItem_Bash, + ListToolsResponseItem_Code, + ListToolsResponseItem_Computer, + ListToolsResponseItem_Dtmf, + ListToolsResponseItem_EndCall, + ListToolsResponseItem_Function, + ListToolsResponseItem_GohighlevelCalendarAvailabilityCheck, + ListToolsResponseItem_GohighlevelCalendarEventCreate, + ListToolsResponseItem_GohighlevelContactCreate, + ListToolsResponseItem_GohighlevelContactGet, + ListToolsResponseItem_GoogleCalendarAvailabilityCheck, + ListToolsResponseItem_GoogleCalendarEventCreate, + ListToolsResponseItem_GoogleSheetsRowAppend, + ListToolsResponseItem_Handoff, + ListToolsResponseItem_Mcp, + ListToolsResponseItem_Query, + ListToolsResponseItem_SipRequest, + ListToolsResponseItem_SlackMessageSend, + ListToolsResponseItem_Sms, + ListToolsResponseItem_TextEditor, + ListToolsResponseItem_TransferCall, + ListToolsResponseItem_Voicemail, + ) + from .update_tools_request_body import ( + UpdateToolsRequestBody, + UpdateToolsRequestBody_ApiRequest, + UpdateToolsRequestBody_Bash, + UpdateToolsRequestBody_Computer, + UpdateToolsRequestBody_Dtmf, + UpdateToolsRequestBody_EndCall, + UpdateToolsRequestBody_Function, + UpdateToolsRequestBody_GohighlevelCalendarAvailabilityCheck, + UpdateToolsRequestBody_GohighlevelCalendarEventCreate, + UpdateToolsRequestBody_GohighlevelContactCreate, + UpdateToolsRequestBody_GohighlevelContactGet, + UpdateToolsRequestBody_GoogleCalendarAvailabilityCheck, + UpdateToolsRequestBody_GoogleCalendarEventCreate, + UpdateToolsRequestBody_GoogleSheetsRowAppend, + UpdateToolsRequestBody_Handoff, + UpdateToolsRequestBody_Mcp, + UpdateToolsRequestBody_Query, + UpdateToolsRequestBody_SipRequest, + UpdateToolsRequestBody_SlackMessageSend, + UpdateToolsRequestBody_Sms, + UpdateToolsRequestBody_TextEditor, + UpdateToolsRequestBody_TransferCall, + UpdateToolsRequestBody_Voicemail, + ) + from .update_tools_response import ( + UpdateToolsResponse, + UpdateToolsResponse_ApiRequest, + UpdateToolsResponse_Bash, + UpdateToolsResponse_Code, + UpdateToolsResponse_Computer, + UpdateToolsResponse_Dtmf, + UpdateToolsResponse_EndCall, + UpdateToolsResponse_Function, + UpdateToolsResponse_GohighlevelCalendarAvailabilityCheck, + UpdateToolsResponse_GohighlevelCalendarEventCreate, + UpdateToolsResponse_GohighlevelContactCreate, + UpdateToolsResponse_GohighlevelContactGet, + UpdateToolsResponse_GoogleCalendarAvailabilityCheck, + UpdateToolsResponse_GoogleCalendarEventCreate, + UpdateToolsResponse_GoogleSheetsRowAppend, + UpdateToolsResponse_Handoff, + UpdateToolsResponse_Mcp, + UpdateToolsResponse_Query, + UpdateToolsResponse_SipRequest, + UpdateToolsResponse_SlackMessageSend, + UpdateToolsResponse_Sms, + UpdateToolsResponse_TextEditor, + UpdateToolsResponse_TransferCall, + UpdateToolsResponse_Voicemail, + ) +_dynamic_imports: typing.Dict[str, str] = { + "CreateToolsRequest": ".create_tools_request", + "CreateToolsRequest_ApiRequest": ".create_tools_request", + "CreateToolsRequest_Bash": ".create_tools_request", + "CreateToolsRequest_Computer": ".create_tools_request", + "CreateToolsRequest_Dtmf": ".create_tools_request", + "CreateToolsRequest_EndCall": ".create_tools_request", + "CreateToolsRequest_Function": ".create_tools_request", + "CreateToolsRequest_GohighlevelCalendarAvailabilityCheck": ".create_tools_request", + "CreateToolsRequest_GohighlevelCalendarEventCreate": ".create_tools_request", + "CreateToolsRequest_GohighlevelContactCreate": ".create_tools_request", + "CreateToolsRequest_GohighlevelContactGet": ".create_tools_request", + "CreateToolsRequest_GoogleCalendarAvailabilityCheck": ".create_tools_request", + "CreateToolsRequest_GoogleCalendarEventCreate": ".create_tools_request", + "CreateToolsRequest_GoogleSheetsRowAppend": ".create_tools_request", + "CreateToolsRequest_Handoff": ".create_tools_request", + "CreateToolsRequest_Mcp": ".create_tools_request", + "CreateToolsRequest_Query": ".create_tools_request", + "CreateToolsRequest_SipRequest": ".create_tools_request", + "CreateToolsRequest_SlackMessageSend": ".create_tools_request", + "CreateToolsRequest_Sms": ".create_tools_request", + "CreateToolsRequest_TextEditor": ".create_tools_request", + "CreateToolsRequest_TransferCall": ".create_tools_request", + "CreateToolsRequest_Voicemail": ".create_tools_request", + "CreateToolsResponse": ".create_tools_response", + "CreateToolsResponse_ApiRequest": ".create_tools_response", + "CreateToolsResponse_Bash": ".create_tools_response", + "CreateToolsResponse_Code": ".create_tools_response", + "CreateToolsResponse_Computer": ".create_tools_response", + "CreateToolsResponse_Dtmf": ".create_tools_response", + "CreateToolsResponse_EndCall": ".create_tools_response", + "CreateToolsResponse_Function": ".create_tools_response", + "CreateToolsResponse_GohighlevelCalendarAvailabilityCheck": ".create_tools_response", + "CreateToolsResponse_GohighlevelCalendarEventCreate": ".create_tools_response", + "CreateToolsResponse_GohighlevelContactCreate": ".create_tools_response", + "CreateToolsResponse_GohighlevelContactGet": ".create_tools_response", + "CreateToolsResponse_GoogleCalendarAvailabilityCheck": ".create_tools_response", + "CreateToolsResponse_GoogleCalendarEventCreate": ".create_tools_response", + "CreateToolsResponse_GoogleSheetsRowAppend": ".create_tools_response", + "CreateToolsResponse_Handoff": ".create_tools_response", + "CreateToolsResponse_Mcp": ".create_tools_response", + "CreateToolsResponse_Query": ".create_tools_response", + "CreateToolsResponse_SipRequest": ".create_tools_response", + "CreateToolsResponse_SlackMessageSend": ".create_tools_response", + "CreateToolsResponse_Sms": ".create_tools_response", + "CreateToolsResponse_TextEditor": ".create_tools_response", + "CreateToolsResponse_TransferCall": ".create_tools_response", + "CreateToolsResponse_Voicemail": ".create_tools_response", + "DeleteToolsResponse": ".delete_tools_response", + "DeleteToolsResponse_ApiRequest": ".delete_tools_response", + "DeleteToolsResponse_Bash": ".delete_tools_response", + "DeleteToolsResponse_Code": ".delete_tools_response", + "DeleteToolsResponse_Computer": ".delete_tools_response", + "DeleteToolsResponse_Dtmf": ".delete_tools_response", + "DeleteToolsResponse_EndCall": ".delete_tools_response", + "DeleteToolsResponse_Function": ".delete_tools_response", + "DeleteToolsResponse_GohighlevelCalendarAvailabilityCheck": ".delete_tools_response", + "DeleteToolsResponse_GohighlevelCalendarEventCreate": ".delete_tools_response", + "DeleteToolsResponse_GohighlevelContactCreate": ".delete_tools_response", + "DeleteToolsResponse_GohighlevelContactGet": ".delete_tools_response", + "DeleteToolsResponse_GoogleCalendarAvailabilityCheck": ".delete_tools_response", + "DeleteToolsResponse_GoogleCalendarEventCreate": ".delete_tools_response", + "DeleteToolsResponse_GoogleSheetsRowAppend": ".delete_tools_response", + "DeleteToolsResponse_Handoff": ".delete_tools_response", + "DeleteToolsResponse_Mcp": ".delete_tools_response", + "DeleteToolsResponse_Query": ".delete_tools_response", + "DeleteToolsResponse_SipRequest": ".delete_tools_response", + "DeleteToolsResponse_SlackMessageSend": ".delete_tools_response", + "DeleteToolsResponse_Sms": ".delete_tools_response", + "DeleteToolsResponse_TextEditor": ".delete_tools_response", + "DeleteToolsResponse_TransferCall": ".delete_tools_response", + "DeleteToolsResponse_Voicemail": ".delete_tools_response", + "GetToolsResponse": ".get_tools_response", + "GetToolsResponse_ApiRequest": ".get_tools_response", + "GetToolsResponse_Bash": ".get_tools_response", + "GetToolsResponse_Code": ".get_tools_response", + "GetToolsResponse_Computer": ".get_tools_response", + "GetToolsResponse_Dtmf": ".get_tools_response", + "GetToolsResponse_EndCall": ".get_tools_response", + "GetToolsResponse_Function": ".get_tools_response", + "GetToolsResponse_GohighlevelCalendarAvailabilityCheck": ".get_tools_response", + "GetToolsResponse_GohighlevelCalendarEventCreate": ".get_tools_response", + "GetToolsResponse_GohighlevelContactCreate": ".get_tools_response", + "GetToolsResponse_GohighlevelContactGet": ".get_tools_response", + "GetToolsResponse_GoogleCalendarAvailabilityCheck": ".get_tools_response", + "GetToolsResponse_GoogleCalendarEventCreate": ".get_tools_response", + "GetToolsResponse_GoogleSheetsRowAppend": ".get_tools_response", + "GetToolsResponse_Handoff": ".get_tools_response", + "GetToolsResponse_Mcp": ".get_tools_response", + "GetToolsResponse_Query": ".get_tools_response", + "GetToolsResponse_SipRequest": ".get_tools_response", + "GetToolsResponse_SlackMessageSend": ".get_tools_response", + "GetToolsResponse_Sms": ".get_tools_response", + "GetToolsResponse_TextEditor": ".get_tools_response", + "GetToolsResponse_TransferCall": ".get_tools_response", + "GetToolsResponse_Voicemail": ".get_tools_response", + "ListToolsResponseItem": ".list_tools_response_item", + "ListToolsResponseItem_ApiRequest": ".list_tools_response_item", + "ListToolsResponseItem_Bash": ".list_tools_response_item", + "ListToolsResponseItem_Code": ".list_tools_response_item", + "ListToolsResponseItem_Computer": ".list_tools_response_item", + "ListToolsResponseItem_Dtmf": ".list_tools_response_item", + "ListToolsResponseItem_EndCall": ".list_tools_response_item", + "ListToolsResponseItem_Function": ".list_tools_response_item", + "ListToolsResponseItem_GohighlevelCalendarAvailabilityCheck": ".list_tools_response_item", + "ListToolsResponseItem_GohighlevelCalendarEventCreate": ".list_tools_response_item", + "ListToolsResponseItem_GohighlevelContactCreate": ".list_tools_response_item", + "ListToolsResponseItem_GohighlevelContactGet": ".list_tools_response_item", + "ListToolsResponseItem_GoogleCalendarAvailabilityCheck": ".list_tools_response_item", + "ListToolsResponseItem_GoogleCalendarEventCreate": ".list_tools_response_item", + "ListToolsResponseItem_GoogleSheetsRowAppend": ".list_tools_response_item", + "ListToolsResponseItem_Handoff": ".list_tools_response_item", + "ListToolsResponseItem_Mcp": ".list_tools_response_item", + "ListToolsResponseItem_Query": ".list_tools_response_item", + "ListToolsResponseItem_SipRequest": ".list_tools_response_item", + "ListToolsResponseItem_SlackMessageSend": ".list_tools_response_item", + "ListToolsResponseItem_Sms": ".list_tools_response_item", + "ListToolsResponseItem_TextEditor": ".list_tools_response_item", + "ListToolsResponseItem_TransferCall": ".list_tools_response_item", + "ListToolsResponseItem_Voicemail": ".list_tools_response_item", + "UpdateToolsRequestBody": ".update_tools_request_body", + "UpdateToolsRequestBody_ApiRequest": ".update_tools_request_body", + "UpdateToolsRequestBody_Bash": ".update_tools_request_body", + "UpdateToolsRequestBody_Computer": ".update_tools_request_body", + "UpdateToolsRequestBody_Dtmf": ".update_tools_request_body", + "UpdateToolsRequestBody_EndCall": ".update_tools_request_body", + "UpdateToolsRequestBody_Function": ".update_tools_request_body", + "UpdateToolsRequestBody_GohighlevelCalendarAvailabilityCheck": ".update_tools_request_body", + "UpdateToolsRequestBody_GohighlevelCalendarEventCreate": ".update_tools_request_body", + "UpdateToolsRequestBody_GohighlevelContactCreate": ".update_tools_request_body", + "UpdateToolsRequestBody_GohighlevelContactGet": ".update_tools_request_body", + "UpdateToolsRequestBody_GoogleCalendarAvailabilityCheck": ".update_tools_request_body", + "UpdateToolsRequestBody_GoogleCalendarEventCreate": ".update_tools_request_body", + "UpdateToolsRequestBody_GoogleSheetsRowAppend": ".update_tools_request_body", + "UpdateToolsRequestBody_Handoff": ".update_tools_request_body", + "UpdateToolsRequestBody_Mcp": ".update_tools_request_body", + "UpdateToolsRequestBody_Query": ".update_tools_request_body", + "UpdateToolsRequestBody_SipRequest": ".update_tools_request_body", + "UpdateToolsRequestBody_SlackMessageSend": ".update_tools_request_body", + "UpdateToolsRequestBody_Sms": ".update_tools_request_body", + "UpdateToolsRequestBody_TextEditor": ".update_tools_request_body", + "UpdateToolsRequestBody_TransferCall": ".update_tools_request_body", + "UpdateToolsRequestBody_Voicemail": ".update_tools_request_body", + "UpdateToolsResponse": ".update_tools_response", + "UpdateToolsResponse_ApiRequest": ".update_tools_response", + "UpdateToolsResponse_Bash": ".update_tools_response", + "UpdateToolsResponse_Code": ".update_tools_response", + "UpdateToolsResponse_Computer": ".update_tools_response", + "UpdateToolsResponse_Dtmf": ".update_tools_response", + "UpdateToolsResponse_EndCall": ".update_tools_response", + "UpdateToolsResponse_Function": ".update_tools_response", + "UpdateToolsResponse_GohighlevelCalendarAvailabilityCheck": ".update_tools_response", + "UpdateToolsResponse_GohighlevelCalendarEventCreate": ".update_tools_response", + "UpdateToolsResponse_GohighlevelContactCreate": ".update_tools_response", + "UpdateToolsResponse_GohighlevelContactGet": ".update_tools_response", + "UpdateToolsResponse_GoogleCalendarAvailabilityCheck": ".update_tools_response", + "UpdateToolsResponse_GoogleCalendarEventCreate": ".update_tools_response", + "UpdateToolsResponse_GoogleSheetsRowAppend": ".update_tools_response", + "UpdateToolsResponse_Handoff": ".update_tools_response", + "UpdateToolsResponse_Mcp": ".update_tools_response", + "UpdateToolsResponse_Query": ".update_tools_response", + "UpdateToolsResponse_SipRequest": ".update_tools_response", + "UpdateToolsResponse_SlackMessageSend": ".update_tools_response", + "UpdateToolsResponse_Sms": ".update_tools_response", + "UpdateToolsResponse_TextEditor": ".update_tools_response", + "UpdateToolsResponse_TransferCall": ".update_tools_response", + "UpdateToolsResponse_Voicemail": ".update_tools_response", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ - "ToolsCreateRequest", - "ToolsCreateResponse", - "ToolsDeleteResponse", - "ToolsGetResponse", - "ToolsListResponseItem", - "ToolsUpdateResponse", - "UpdateToolDtoMessagesItem", + "CreateToolsRequest", + "CreateToolsRequest_ApiRequest", + "CreateToolsRequest_Bash", + "CreateToolsRequest_Computer", + "CreateToolsRequest_Dtmf", + "CreateToolsRequest_EndCall", + "CreateToolsRequest_Function", + "CreateToolsRequest_GohighlevelCalendarAvailabilityCheck", + "CreateToolsRequest_GohighlevelCalendarEventCreate", + "CreateToolsRequest_GohighlevelContactCreate", + "CreateToolsRequest_GohighlevelContactGet", + "CreateToolsRequest_GoogleCalendarAvailabilityCheck", + "CreateToolsRequest_GoogleCalendarEventCreate", + "CreateToolsRequest_GoogleSheetsRowAppend", + "CreateToolsRequest_Handoff", + "CreateToolsRequest_Mcp", + "CreateToolsRequest_Query", + "CreateToolsRequest_SipRequest", + "CreateToolsRequest_SlackMessageSend", + "CreateToolsRequest_Sms", + "CreateToolsRequest_TextEditor", + "CreateToolsRequest_TransferCall", + "CreateToolsRequest_Voicemail", + "CreateToolsResponse", + "CreateToolsResponse_ApiRequest", + "CreateToolsResponse_Bash", + "CreateToolsResponse_Code", + "CreateToolsResponse_Computer", + "CreateToolsResponse_Dtmf", + "CreateToolsResponse_EndCall", + "CreateToolsResponse_Function", + "CreateToolsResponse_GohighlevelCalendarAvailabilityCheck", + "CreateToolsResponse_GohighlevelCalendarEventCreate", + "CreateToolsResponse_GohighlevelContactCreate", + "CreateToolsResponse_GohighlevelContactGet", + "CreateToolsResponse_GoogleCalendarAvailabilityCheck", + "CreateToolsResponse_GoogleCalendarEventCreate", + "CreateToolsResponse_GoogleSheetsRowAppend", + "CreateToolsResponse_Handoff", + "CreateToolsResponse_Mcp", + "CreateToolsResponse_Query", + "CreateToolsResponse_SipRequest", + "CreateToolsResponse_SlackMessageSend", + "CreateToolsResponse_Sms", + "CreateToolsResponse_TextEditor", + "CreateToolsResponse_TransferCall", + "CreateToolsResponse_Voicemail", + "DeleteToolsResponse", + "DeleteToolsResponse_ApiRequest", + "DeleteToolsResponse_Bash", + "DeleteToolsResponse_Code", + "DeleteToolsResponse_Computer", + "DeleteToolsResponse_Dtmf", + "DeleteToolsResponse_EndCall", + "DeleteToolsResponse_Function", + "DeleteToolsResponse_GohighlevelCalendarAvailabilityCheck", + "DeleteToolsResponse_GohighlevelCalendarEventCreate", + "DeleteToolsResponse_GohighlevelContactCreate", + "DeleteToolsResponse_GohighlevelContactGet", + "DeleteToolsResponse_GoogleCalendarAvailabilityCheck", + "DeleteToolsResponse_GoogleCalendarEventCreate", + "DeleteToolsResponse_GoogleSheetsRowAppend", + "DeleteToolsResponse_Handoff", + "DeleteToolsResponse_Mcp", + "DeleteToolsResponse_Query", + "DeleteToolsResponse_SipRequest", + "DeleteToolsResponse_SlackMessageSend", + "DeleteToolsResponse_Sms", + "DeleteToolsResponse_TextEditor", + "DeleteToolsResponse_TransferCall", + "DeleteToolsResponse_Voicemail", + "GetToolsResponse", + "GetToolsResponse_ApiRequest", + "GetToolsResponse_Bash", + "GetToolsResponse_Code", + "GetToolsResponse_Computer", + "GetToolsResponse_Dtmf", + "GetToolsResponse_EndCall", + "GetToolsResponse_Function", + "GetToolsResponse_GohighlevelCalendarAvailabilityCheck", + "GetToolsResponse_GohighlevelCalendarEventCreate", + "GetToolsResponse_GohighlevelContactCreate", + "GetToolsResponse_GohighlevelContactGet", + "GetToolsResponse_GoogleCalendarAvailabilityCheck", + "GetToolsResponse_GoogleCalendarEventCreate", + "GetToolsResponse_GoogleSheetsRowAppend", + "GetToolsResponse_Handoff", + "GetToolsResponse_Mcp", + "GetToolsResponse_Query", + "GetToolsResponse_SipRequest", + "GetToolsResponse_SlackMessageSend", + "GetToolsResponse_Sms", + "GetToolsResponse_TextEditor", + "GetToolsResponse_TransferCall", + "GetToolsResponse_Voicemail", + "ListToolsResponseItem", + "ListToolsResponseItem_ApiRequest", + "ListToolsResponseItem_Bash", + "ListToolsResponseItem_Code", + "ListToolsResponseItem_Computer", + "ListToolsResponseItem_Dtmf", + "ListToolsResponseItem_EndCall", + "ListToolsResponseItem_Function", + "ListToolsResponseItem_GohighlevelCalendarAvailabilityCheck", + "ListToolsResponseItem_GohighlevelCalendarEventCreate", + "ListToolsResponseItem_GohighlevelContactCreate", + "ListToolsResponseItem_GohighlevelContactGet", + "ListToolsResponseItem_GoogleCalendarAvailabilityCheck", + "ListToolsResponseItem_GoogleCalendarEventCreate", + "ListToolsResponseItem_GoogleSheetsRowAppend", + "ListToolsResponseItem_Handoff", + "ListToolsResponseItem_Mcp", + "ListToolsResponseItem_Query", + "ListToolsResponseItem_SipRequest", + "ListToolsResponseItem_SlackMessageSend", + "ListToolsResponseItem_Sms", + "ListToolsResponseItem_TextEditor", + "ListToolsResponseItem_TransferCall", + "ListToolsResponseItem_Voicemail", + "UpdateToolsRequestBody", + "UpdateToolsRequestBody_ApiRequest", + "UpdateToolsRequestBody_Bash", + "UpdateToolsRequestBody_Computer", + "UpdateToolsRequestBody_Dtmf", + "UpdateToolsRequestBody_EndCall", + "UpdateToolsRequestBody_Function", + "UpdateToolsRequestBody_GohighlevelCalendarAvailabilityCheck", + "UpdateToolsRequestBody_GohighlevelCalendarEventCreate", + "UpdateToolsRequestBody_GohighlevelContactCreate", + "UpdateToolsRequestBody_GohighlevelContactGet", + "UpdateToolsRequestBody_GoogleCalendarAvailabilityCheck", + "UpdateToolsRequestBody_GoogleCalendarEventCreate", + "UpdateToolsRequestBody_GoogleSheetsRowAppend", + "UpdateToolsRequestBody_Handoff", + "UpdateToolsRequestBody_Mcp", + "UpdateToolsRequestBody_Query", + "UpdateToolsRequestBody_SipRequest", + "UpdateToolsRequestBody_SlackMessageSend", + "UpdateToolsRequestBody_Sms", + "UpdateToolsRequestBody_TextEditor", + "UpdateToolsRequestBody_TransferCall", + "UpdateToolsRequestBody_Voicemail", + "UpdateToolsResponse", + "UpdateToolsResponse_ApiRequest", + "UpdateToolsResponse_Bash", + "UpdateToolsResponse_Code", + "UpdateToolsResponse_Computer", + "UpdateToolsResponse_Dtmf", + "UpdateToolsResponse_EndCall", + "UpdateToolsResponse_Function", + "UpdateToolsResponse_GohighlevelCalendarAvailabilityCheck", + "UpdateToolsResponse_GohighlevelCalendarEventCreate", + "UpdateToolsResponse_GohighlevelContactCreate", + "UpdateToolsResponse_GohighlevelContactGet", + "UpdateToolsResponse_GoogleCalendarAvailabilityCheck", + "UpdateToolsResponse_GoogleCalendarEventCreate", + "UpdateToolsResponse_GoogleSheetsRowAppend", + "UpdateToolsResponse_Handoff", + "UpdateToolsResponse_Mcp", + "UpdateToolsResponse_Query", + "UpdateToolsResponse_SipRequest", + "UpdateToolsResponse_SlackMessageSend", + "UpdateToolsResponse_Sms", + "UpdateToolsResponse_TextEditor", + "UpdateToolsResponse_TransferCall", + "UpdateToolsResponse_Voicemail", ] diff --git a/src/vapi/tools/types/create_tools_request.py b/src/vapi/tools/types/create_tools_request.py new file mode 100644 index 00000000..59f6b633 --- /dev/null +++ b/src/vapi/tools/types/create_tools_request.py @@ -0,0 +1,693 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ...core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ...core.serialization import FieldMetadata +from ...core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from ...types.backoff_plan import BackoffPlan +from ...types.create_api_request_tool_dto_messages_item import CreateApiRequestToolDtoMessagesItem +from ...types.create_api_request_tool_dto_method import CreateApiRequestToolDtoMethod +from ...types.create_bash_tool_dto_messages_item import CreateBashToolDtoMessagesItem +from ...types.create_bash_tool_dto_name import CreateBashToolDtoName +from ...types.create_bash_tool_dto_sub_type import CreateBashToolDtoSubType +from ...types.create_computer_tool_dto_messages_item import CreateComputerToolDtoMessagesItem +from ...types.create_computer_tool_dto_name import CreateComputerToolDtoName +from ...types.create_computer_tool_dto_sub_type import CreateComputerToolDtoSubType +from ...types.create_dtmf_tool_dto_messages_item import CreateDtmfToolDtoMessagesItem +from ...types.create_end_call_tool_dto_messages_item import CreateEndCallToolDtoMessagesItem +from ...types.create_function_tool_dto_messages_item import CreateFunctionToolDtoMessagesItem +from ...types.create_go_high_level_calendar_availability_tool_dto_messages_item import ( + CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem, +) +from ...types.create_go_high_level_calendar_event_create_tool_dto_messages_item import ( + CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem, +) +from ...types.create_go_high_level_contact_create_tool_dto_messages_item import ( + CreateGoHighLevelContactCreateToolDtoMessagesItem, +) +from ...types.create_go_high_level_contact_get_tool_dto_messages_item import ( + CreateGoHighLevelContactGetToolDtoMessagesItem, +) +from ...types.create_google_calendar_check_availability_tool_dto_messages_item import ( + CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem, +) +from ...types.create_google_calendar_create_event_tool_dto_messages_item import ( + CreateGoogleCalendarCreateEventToolDtoMessagesItem, +) +from ...types.create_google_sheets_row_append_tool_dto_messages_item import ( + CreateGoogleSheetsRowAppendToolDtoMessagesItem, +) +from ...types.create_handoff_tool_dto_messages_item import CreateHandoffToolDtoMessagesItem +from ...types.create_mcp_tool_dto_messages_item import CreateMcpToolDtoMessagesItem +from ...types.create_query_tool_dto_messages_item import CreateQueryToolDtoMessagesItem +from ...types.create_sip_request_tool_dto_body import CreateSipRequestToolDtoBody +from ...types.create_sip_request_tool_dto_messages_item import CreateSipRequestToolDtoMessagesItem +from ...types.create_sip_request_tool_dto_verb import CreateSipRequestToolDtoVerb +from ...types.create_slack_send_message_tool_dto_messages_item import CreateSlackSendMessageToolDtoMessagesItem +from ...types.create_sms_tool_dto_messages_item import CreateSmsToolDtoMessagesItem +from ...types.create_text_editor_tool_dto_messages_item import CreateTextEditorToolDtoMessagesItem +from ...types.create_text_editor_tool_dto_name import CreateTextEditorToolDtoName +from ...types.create_text_editor_tool_dto_sub_type import CreateTextEditorToolDtoSubType +from ...types.create_transfer_call_tool_dto_destinations_item import CreateTransferCallToolDtoDestinationsItem +from ...types.create_transfer_call_tool_dto_messages_item import CreateTransferCallToolDtoMessagesItem +from ...types.create_voicemail_tool_dto_messages_item import CreateVoicemailToolDtoMessagesItem +from ...types.knowledge_base import KnowledgeBase +from ...types.mcp_tool_messages import McpToolMessages +from ...types.mcp_tool_metadata import McpToolMetadata +from ...types.open_ai_function import OpenAiFunction +from ...types.server import Server +from ...types.tool_parameter import ToolParameter +from ...types.tool_rejection_plan import ToolRejectionPlan +from ...types.variable_extraction_plan import VariableExtractionPlan + + +class CreateToolsRequest_ApiRequest(UncheckedBaseModel): + type: typing.Literal["apiRequest"] = "apiRequest" + messages: typing.Optional[typing.List[CreateApiRequestToolDtoMessagesItem]] = None + method: CreateApiRequestToolDtoMethod + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + encrypted_paths: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="encryptedPaths"), pydantic.Field(alias="encryptedPaths") + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + name: typing.Optional[str] = None + description: typing.Optional[str] = None + url: str + body: typing.Optional["JsonSchema"] = None + headers: typing.Optional["JsonSchema"] = None + backoff_plan: typing_extensions.Annotated[ + typing.Optional[BackoffPlan], FieldMetadata(alias="backoffPlan"), pydantic.Field(alias="backoffPlan") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolsRequest_Dtmf(UncheckedBaseModel): + type: typing.Literal["dtmf"] = "dtmf" + messages: typing.Optional[typing.List[CreateDtmfToolDtoMessagesItem]] = None + sip_info_dtmf_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="sipInfoDtmfEnabled"), pydantic.Field(alias="sipInfoDtmfEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolsRequest_EndCall(UncheckedBaseModel): + type: typing.Literal["endCall"] = "endCall" + messages: typing.Optional[typing.List[CreateEndCallToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolsRequest_Function(UncheckedBaseModel): + type: typing.Literal["function"] = "function" + messages: typing.Optional[typing.List[CreateFunctionToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolsRequest_TransferCall(UncheckedBaseModel): + type: typing.Literal["transferCall"] = "transferCall" + messages: typing.Optional[typing.List[CreateTransferCallToolDtoMessagesItem]] = None + destinations: typing.Optional[typing.List[CreateTransferCallToolDtoDestinationsItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolsRequest_Handoff(UncheckedBaseModel): + type: typing.Literal["handoff"] = "handoff" + messages: typing.Optional[typing.List[CreateHandoffToolDtoMessagesItem]] = None + default_result: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="defaultResult"), pydantic.Field(alias="defaultResult") + ] = None + destinations: typing.Optional[typing.List["CreateHandoffToolDtoDestinationsItem"]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolsRequest_Bash(UncheckedBaseModel): + type: typing.Literal["bash"] = "bash" + messages: typing.Optional[typing.List[CreateBashToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateBashToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateBashToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolsRequest_Computer(UncheckedBaseModel): + type: typing.Literal["computer"] = "computer" + messages: typing.Optional[typing.List[CreateComputerToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateComputerToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateComputerToolDtoName + display_width_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayWidthPx"), pydantic.Field(alias="displayWidthPx") + ] + display_height_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayHeightPx"), pydantic.Field(alias="displayHeightPx") + ] + display_number: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="displayNumber"), pydantic.Field(alias="displayNumber") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolsRequest_TextEditor(UncheckedBaseModel): + type: typing.Literal["textEditor"] = "textEditor" + messages: typing.Optional[typing.List[CreateTextEditorToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateTextEditorToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateTextEditorToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolsRequest_Query(UncheckedBaseModel): + type: typing.Literal["query"] = "query" + messages: typing.Optional[typing.List[CreateQueryToolDtoMessagesItem]] = None + knowledge_bases: typing_extensions.Annotated[ + typing.Optional[typing.List[KnowledgeBase]], + FieldMetadata(alias="knowledgeBases"), + pydantic.Field(alias="knowledgeBases"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolsRequest_GoogleCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["google.calendar.event.create"] = "google.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoogleCalendarCreateEventToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolsRequest_GoogleSheetsRowAppend(UncheckedBaseModel): + type: typing.Literal["google.sheets.row.append"] = "google.sheets.row.append" + messages: typing.Optional[typing.List[CreateGoogleSheetsRowAppendToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolsRequest_GoogleCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["google.calendar.availability.check"] = "google.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolsRequest_SlackMessageSend(UncheckedBaseModel): + type: typing.Literal["slack.message.send"] = "slack.message.send" + messages: typing.Optional[typing.List[CreateSlackSendMessageToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolsRequest_Sms(UncheckedBaseModel): + type: typing.Literal["sms"] = "sms" + messages: typing.Optional[typing.List[CreateSmsToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolsRequest_Mcp(UncheckedBaseModel): + type: typing.Literal["mcp"] = "mcp" + messages: typing.Optional[typing.List[CreateMcpToolDtoMessagesItem]] = None + server: typing.Optional[Server] = None + tool_messages: typing_extensions.Annotated[ + typing.Optional[typing.List[McpToolMessages]], + FieldMetadata(alias="toolMessages"), + pydantic.Field(alias="toolMessages"), + ] = None + metadata: typing.Optional[McpToolMetadata] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolsRequest_GohighlevelCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.availability.check"] = "gohighlevel.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolsRequest_GohighlevelCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.event.create"] = "gohighlevel.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolsRequest_GohighlevelContactCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.create"] = "gohighlevel.contact.create" + messages: typing.Optional[typing.List[CreateGoHighLevelContactCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolsRequest_GohighlevelContactGet(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.get"] = "gohighlevel.contact.get" + messages: typing.Optional[typing.List[CreateGoHighLevelContactGetToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolsRequest_SipRequest(UncheckedBaseModel): + type: typing.Literal["sipRequest"] = "sipRequest" + messages: typing.Optional[typing.List[CreateSipRequestToolDtoMessagesItem]] = None + verb: CreateSipRequestToolDtoVerb + headers: typing.Optional["JsonSchema"] = None + body: typing.Optional[CreateSipRequestToolDtoBody] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolsRequest_Voicemail(UncheckedBaseModel): + type: typing.Literal["voicemail"] = "voicemail" + messages: typing.Optional[typing.List[CreateVoicemailToolDtoMessagesItem]] = None + beep_detection_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="beepDetectionEnabled"), pydantic.Field(alias="beepDetectionEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateToolsRequest = typing_extensions.Annotated[ + typing.Union[ + CreateToolsRequest_ApiRequest, + CreateToolsRequest_Dtmf, + CreateToolsRequest_EndCall, + CreateToolsRequest_Function, + CreateToolsRequest_TransferCall, + CreateToolsRequest_Handoff, + CreateToolsRequest_Bash, + CreateToolsRequest_Computer, + CreateToolsRequest_TextEditor, + CreateToolsRequest_Query, + CreateToolsRequest_GoogleCalendarEventCreate, + CreateToolsRequest_GoogleSheetsRowAppend, + CreateToolsRequest_GoogleCalendarAvailabilityCheck, + CreateToolsRequest_SlackMessageSend, + CreateToolsRequest_Sms, + CreateToolsRequest_Mcp, + CreateToolsRequest_GohighlevelCalendarAvailabilityCheck, + CreateToolsRequest_GohighlevelCalendarEventCreate, + CreateToolsRequest_GohighlevelContactCreate, + CreateToolsRequest_GohighlevelContactGet, + CreateToolsRequest_SipRequest, + CreateToolsRequest_Voicemail, + ], + UnionMetadata(discriminant="type"), +] +from ...types.json_schema import JsonSchema # noqa: E402, I001 +from ...types.anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from ...types.anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from ...types.anthropic_model import AnthropicModel # noqa: E402, I001 +from ...types.anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from ...types.anyscale_model import AnyscaleModel # noqa: E402, I001 +from ...types.anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from ...types.assistant_overrides import AssistantOverrides # noqa: E402, I001 +from ...types.assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from ...types.assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from ...types.assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from ...types.call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from ...types.call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from ...types.call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from ...types.call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from ...types.call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from ...types.call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from ...types.call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from ...types.call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from ...types.cerebras_model import CerebrasModel # noqa: E402, I001 +from ...types.cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from ...types.create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from ...types.create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from ...types.create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from ...types.create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from ...types.create_squad_dto import CreateSquadDto # noqa: E402, I001 +from ...types.custom_llm_model import CustomLlmModel # noqa: E402, I001 +from ...types.custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from ...types.deep_infra_model import DeepInfraModel # noqa: E402, I001 +from ...types.deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from ...types.deep_seek_model import DeepSeekModel # noqa: E402, I001 +from ...types.deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from ...types.google_model import GoogleModel # noqa: E402, I001 +from ...types.google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from ...types.groq_model import GroqModel # noqa: E402, I001 +from ...types.groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from ...types.handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from ...types.handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from ...types.inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from ...types.inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from ...types.minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from ...types.minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from ...types.open_ai_model import OpenAiModel # noqa: E402, I001 +from ...types.open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from ...types.open_router_model import OpenRouterModel # noqa: E402, I001 +from ...types.open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from ...types.perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from ...types.perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from ...types.session_created_hook import SessionCreatedHook # noqa: E402, I001 +from ...types.squad_member_dto import SquadMemberDto # noqa: E402, I001 +from ...types.squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from ...types.together_ai_model import TogetherAiModel # noqa: E402, I001 +from ...types.together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from ...types.tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from ...types.tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from ...types.xai_model import XaiModel # noqa: E402, I001 +from ...types.xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs(CreateToolsRequest_ApiRequest, JsonSchema=JsonSchema) +update_forward_refs(CreateToolsRequest_Dtmf) +update_forward_refs(CreateToolsRequest_EndCall) +update_forward_refs(CreateToolsRequest_Function) +update_forward_refs(CreateToolsRequest_TransferCall) +update_forward_refs( + CreateToolsRequest_Handoff, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs(CreateToolsRequest_Bash) +update_forward_refs(CreateToolsRequest_Computer) +update_forward_refs(CreateToolsRequest_TextEditor) +update_forward_refs(CreateToolsRequest_Query) +update_forward_refs(CreateToolsRequest_GoogleCalendarEventCreate) +update_forward_refs(CreateToolsRequest_GoogleSheetsRowAppend) +update_forward_refs(CreateToolsRequest_GoogleCalendarAvailabilityCheck) +update_forward_refs(CreateToolsRequest_SlackMessageSend) +update_forward_refs(CreateToolsRequest_Sms) +update_forward_refs(CreateToolsRequest_Mcp) +update_forward_refs(CreateToolsRequest_GohighlevelCalendarAvailabilityCheck) +update_forward_refs(CreateToolsRequest_GohighlevelCalendarEventCreate) +update_forward_refs(CreateToolsRequest_GohighlevelContactCreate) +update_forward_refs(CreateToolsRequest_GohighlevelContactGet) +update_forward_refs(CreateToolsRequest_SipRequest, JsonSchema=JsonSchema) +update_forward_refs(CreateToolsRequest_Voicemail) diff --git a/src/vapi/tools/types/create_tools_response.py b/src/vapi/tools/types/create_tools_response.py new file mode 100644 index 00000000..5b45014f --- /dev/null +++ b/src/vapi/tools/types/create_tools_response.py @@ -0,0 +1,800 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ...core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ...core.serialization import FieldMetadata +from ...core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from ...types.api_request_tool_messages_item import ApiRequestToolMessagesItem +from ...types.api_request_tool_method import ApiRequestToolMethod +from ...types.backoff_plan import BackoffPlan +from ...types.bash_tool_messages_item import BashToolMessagesItem +from ...types.bash_tool_name import BashToolName +from ...types.bash_tool_sub_type import BashToolSubType +from ...types.code_tool_environment_variable import CodeToolEnvironmentVariable +from ...types.code_tool_messages_item import CodeToolMessagesItem +from ...types.computer_tool_messages_item import ComputerToolMessagesItem +from ...types.computer_tool_name import ComputerToolName +from ...types.computer_tool_sub_type import ComputerToolSubType +from ...types.dtmf_tool_messages_item import DtmfToolMessagesItem +from ...types.end_call_tool_messages_item import EndCallToolMessagesItem +from ...types.function_tool_messages_item import FunctionToolMessagesItem +from ...types.go_high_level_calendar_availability_tool_messages_item import ( + GoHighLevelCalendarAvailabilityToolMessagesItem, +) +from ...types.go_high_level_calendar_event_create_tool_messages_item import ( + GoHighLevelCalendarEventCreateToolMessagesItem, +) +from ...types.go_high_level_contact_create_tool_messages_item import GoHighLevelContactCreateToolMessagesItem +from ...types.go_high_level_contact_get_tool_messages_item import GoHighLevelContactGetToolMessagesItem +from ...types.google_calendar_check_availability_tool_messages_item import ( + GoogleCalendarCheckAvailabilityToolMessagesItem, +) +from ...types.google_calendar_create_event_tool_messages_item import GoogleCalendarCreateEventToolMessagesItem +from ...types.google_sheets_row_append_tool_messages_item import GoogleSheetsRowAppendToolMessagesItem +from ...types.handoff_tool_destinations_item import HandoffToolDestinationsItem +from ...types.handoff_tool_messages_item import HandoffToolMessagesItem +from ...types.knowledge_base import KnowledgeBase +from ...types.mcp_tool_messages import McpToolMessages +from ...types.mcp_tool_messages_item import McpToolMessagesItem +from ...types.mcp_tool_metadata import McpToolMetadata +from ...types.open_ai_function import OpenAiFunction +from ...types.query_tool_messages_item import QueryToolMessagesItem +from ...types.server import Server +from ...types.sip_request_tool_body import SipRequestToolBody +from ...types.sip_request_tool_messages_item import SipRequestToolMessagesItem +from ...types.sip_request_tool_verb import SipRequestToolVerb +from ...types.slack_send_message_tool_messages_item import SlackSendMessageToolMessagesItem +from ...types.sms_tool_messages_item import SmsToolMessagesItem +from ...types.text_editor_tool_messages_item import TextEditorToolMessagesItem +from ...types.text_editor_tool_name import TextEditorToolName +from ...types.text_editor_tool_sub_type import TextEditorToolSubType +from ...types.tool_parameter import ToolParameter +from ...types.tool_rejection_plan import ToolRejectionPlan +from ...types.transfer_call_tool_destinations_item import TransferCallToolDestinationsItem +from ...types.transfer_call_tool_messages_item import TransferCallToolMessagesItem +from ...types.variable_extraction_plan import VariableExtractionPlan +from ...types.voicemail_tool_messages_item import VoicemailToolMessagesItem + + +class CreateToolsResponse_ApiRequest(UncheckedBaseModel): + type: typing.Literal["apiRequest"] = "apiRequest" + messages: typing.Optional[typing.List[ApiRequestToolMessagesItem]] = None + method: ApiRequestToolMethod + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + encrypted_paths: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="encryptedPaths"), pydantic.Field(alias="encryptedPaths") + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + name: typing.Optional[str] = None + description: typing.Optional[str] = None + url: str + body: typing.Optional["JsonSchema"] = None + headers: typing.Optional["JsonSchema"] = None + backoff_plan: typing_extensions.Annotated[ + typing.Optional[BackoffPlan], FieldMetadata(alias="backoffPlan"), pydantic.Field(alias="backoffPlan") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolsResponse_Code(UncheckedBaseModel): + type: typing.Literal["code"] = "code" + messages: typing.Optional[typing.List[CodeToolMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + code: str + environment_variables: typing_extensions.Annotated[ + typing.Optional[typing.List[CodeToolEnvironmentVariable]], + FieldMetadata(alias="environmentVariables"), + pydantic.Field(alias="environmentVariables"), + ] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + function: typing.Optional[OpenAiFunction] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolsResponse_Dtmf(UncheckedBaseModel): + type: typing.Literal["dtmf"] = "dtmf" + messages: typing.Optional[typing.List[DtmfToolMessagesItem]] = None + sip_info_dtmf_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="sipInfoDtmfEnabled"), pydantic.Field(alias="sipInfoDtmfEnabled") + ] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolsResponse_EndCall(UncheckedBaseModel): + type: typing.Literal["endCall"] = "endCall" + messages: typing.Optional[typing.List[EndCallToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolsResponse_Function(UncheckedBaseModel): + type: typing.Literal["function"] = "function" + messages: typing.Optional[typing.List[FunctionToolMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + function: typing.Optional[OpenAiFunction] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolsResponse_TransferCall(UncheckedBaseModel): + type: typing.Literal["transferCall"] = "transferCall" + messages: typing.Optional[typing.List[TransferCallToolMessagesItem]] = None + destinations: typing.Optional[typing.List[TransferCallToolDestinationsItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolsResponse_Handoff(UncheckedBaseModel): + type: typing.Literal["handoff"] = "handoff" + messages: typing.Optional[typing.List[HandoffToolMessagesItem]] = None + default_result: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="defaultResult"), pydantic.Field(alias="defaultResult") + ] = None + destinations: typing.Optional[typing.List[HandoffToolDestinationsItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + function: typing.Optional[OpenAiFunction] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolsResponse_Bash(UncheckedBaseModel): + type: typing.Literal["bash"] = "bash" + messages: typing.Optional[typing.List[BashToolMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + BashToolSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + name: BashToolName + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolsResponse_Computer(UncheckedBaseModel): + type: typing.Literal["computer"] = "computer" + messages: typing.Optional[typing.List[ComputerToolMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + ComputerToolSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + name: ComputerToolName + display_width_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayWidthPx"), pydantic.Field(alias="displayWidthPx") + ] + display_height_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayHeightPx"), pydantic.Field(alias="displayHeightPx") + ] + display_number: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="displayNumber"), pydantic.Field(alias="displayNumber") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolsResponse_TextEditor(UncheckedBaseModel): + type: typing.Literal["textEditor"] = "textEditor" + messages: typing.Optional[typing.List[TextEditorToolMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + TextEditorToolSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + name: TextEditorToolName + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolsResponse_Query(UncheckedBaseModel): + type: typing.Literal["query"] = "query" + messages: typing.Optional[typing.List[QueryToolMessagesItem]] = None + knowledge_bases: typing_extensions.Annotated[ + typing.Optional[typing.List[KnowledgeBase]], + FieldMetadata(alias="knowledgeBases"), + pydantic.Field(alias="knowledgeBases"), + ] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolsResponse_GoogleCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["google.calendar.event.create"] = "google.calendar.event.create" + messages: typing.Optional[typing.List[GoogleCalendarCreateEventToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolsResponse_GoogleSheetsRowAppend(UncheckedBaseModel): + type: typing.Literal["google.sheets.row.append"] = "google.sheets.row.append" + messages: typing.Optional[typing.List[GoogleSheetsRowAppendToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolsResponse_GoogleCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["google.calendar.availability.check"] = "google.calendar.availability.check" + messages: typing.Optional[typing.List[GoogleCalendarCheckAvailabilityToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolsResponse_SlackMessageSend(UncheckedBaseModel): + type: typing.Literal["slack.message.send"] = "slack.message.send" + messages: typing.Optional[typing.List[SlackSendMessageToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolsResponse_Sms(UncheckedBaseModel): + type: typing.Literal["sms"] = "sms" + messages: typing.Optional[typing.List[SmsToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolsResponse_Mcp(UncheckedBaseModel): + type: typing.Literal["mcp"] = "mcp" + messages: typing.Optional[typing.List[McpToolMessagesItem]] = None + server: typing.Optional[Server] = None + tool_messages: typing_extensions.Annotated[ + typing.Optional[typing.List[McpToolMessages]], + FieldMetadata(alias="toolMessages"), + pydantic.Field(alias="toolMessages"), + ] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + metadata: typing.Optional[McpToolMetadata] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolsResponse_GohighlevelCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.availability.check"] = "gohighlevel.calendar.availability.check" + messages: typing.Optional[typing.List[GoHighLevelCalendarAvailabilityToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolsResponse_GohighlevelCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.event.create"] = "gohighlevel.calendar.event.create" + messages: typing.Optional[typing.List[GoHighLevelCalendarEventCreateToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolsResponse_GohighlevelContactCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.create"] = "gohighlevel.contact.create" + messages: typing.Optional[typing.List[GoHighLevelContactCreateToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolsResponse_GohighlevelContactGet(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.get"] = "gohighlevel.contact.get" + messages: typing.Optional[typing.List[GoHighLevelContactGetToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolsResponse_SipRequest(UncheckedBaseModel): + type: typing.Literal["sipRequest"] = "sipRequest" + messages: typing.Optional[typing.List[SipRequestToolMessagesItem]] = None + verb: SipRequestToolVerb + headers: typing.Optional["JsonSchema"] = None + body: typing.Optional[SipRequestToolBody] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolsResponse_Voicemail(UncheckedBaseModel): + type: typing.Literal["voicemail"] = "voicemail" + messages: typing.Optional[typing.List[VoicemailToolMessagesItem]] = None + beep_detection_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="beepDetectionEnabled"), pydantic.Field(alias="beepDetectionEnabled") + ] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateToolsResponse = typing_extensions.Annotated[ + typing.Union[ + CreateToolsResponse_ApiRequest, + CreateToolsResponse_Code, + CreateToolsResponse_Dtmf, + CreateToolsResponse_EndCall, + CreateToolsResponse_Function, + CreateToolsResponse_TransferCall, + CreateToolsResponse_Handoff, + CreateToolsResponse_Bash, + CreateToolsResponse_Computer, + CreateToolsResponse_TextEditor, + CreateToolsResponse_Query, + CreateToolsResponse_GoogleCalendarEventCreate, + CreateToolsResponse_GoogleSheetsRowAppend, + CreateToolsResponse_GoogleCalendarAvailabilityCheck, + CreateToolsResponse_SlackMessageSend, + CreateToolsResponse_Sms, + CreateToolsResponse_Mcp, + CreateToolsResponse_GohighlevelCalendarAvailabilityCheck, + CreateToolsResponse_GohighlevelCalendarEventCreate, + CreateToolsResponse_GohighlevelContactCreate, + CreateToolsResponse_GohighlevelContactGet, + CreateToolsResponse_SipRequest, + CreateToolsResponse_Voicemail, + ], + UnionMetadata(discriminant="type"), +] +from ...types.json_schema import JsonSchema # noqa: E402, I001 + +update_forward_refs(CreateToolsResponse_ApiRequest, JsonSchema=JsonSchema) +update_forward_refs(CreateToolsResponse_Code) +update_forward_refs(CreateToolsResponse_Dtmf) +update_forward_refs(CreateToolsResponse_EndCall) +update_forward_refs(CreateToolsResponse_Function) +update_forward_refs(CreateToolsResponse_TransferCall) +update_forward_refs(CreateToolsResponse_Handoff) +update_forward_refs(CreateToolsResponse_Bash) +update_forward_refs(CreateToolsResponse_Computer) +update_forward_refs(CreateToolsResponse_TextEditor) +update_forward_refs(CreateToolsResponse_Query) +update_forward_refs(CreateToolsResponse_GoogleCalendarEventCreate) +update_forward_refs(CreateToolsResponse_GoogleSheetsRowAppend) +update_forward_refs(CreateToolsResponse_GoogleCalendarAvailabilityCheck) +update_forward_refs(CreateToolsResponse_SlackMessageSend) +update_forward_refs(CreateToolsResponse_Sms) +update_forward_refs(CreateToolsResponse_Mcp) +update_forward_refs(CreateToolsResponse_GohighlevelCalendarAvailabilityCheck) +update_forward_refs(CreateToolsResponse_GohighlevelCalendarEventCreate) +update_forward_refs(CreateToolsResponse_GohighlevelContactCreate) +update_forward_refs(CreateToolsResponse_GohighlevelContactGet) +update_forward_refs(CreateToolsResponse_SipRequest, JsonSchema=JsonSchema) +update_forward_refs(CreateToolsResponse_Voicemail) diff --git a/src/vapi/tools/types/delete_tools_response.py b/src/vapi/tools/types/delete_tools_response.py new file mode 100644 index 00000000..36bb9664 --- /dev/null +++ b/src/vapi/tools/types/delete_tools_response.py @@ -0,0 +1,800 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ...core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ...core.serialization import FieldMetadata +from ...core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from ...types.api_request_tool_messages_item import ApiRequestToolMessagesItem +from ...types.api_request_tool_method import ApiRequestToolMethod +from ...types.backoff_plan import BackoffPlan +from ...types.bash_tool_messages_item import BashToolMessagesItem +from ...types.bash_tool_name import BashToolName +from ...types.bash_tool_sub_type import BashToolSubType +from ...types.code_tool_environment_variable import CodeToolEnvironmentVariable +from ...types.code_tool_messages_item import CodeToolMessagesItem +from ...types.computer_tool_messages_item import ComputerToolMessagesItem +from ...types.computer_tool_name import ComputerToolName +from ...types.computer_tool_sub_type import ComputerToolSubType +from ...types.dtmf_tool_messages_item import DtmfToolMessagesItem +from ...types.end_call_tool_messages_item import EndCallToolMessagesItem +from ...types.function_tool_messages_item import FunctionToolMessagesItem +from ...types.go_high_level_calendar_availability_tool_messages_item import ( + GoHighLevelCalendarAvailabilityToolMessagesItem, +) +from ...types.go_high_level_calendar_event_create_tool_messages_item import ( + GoHighLevelCalendarEventCreateToolMessagesItem, +) +from ...types.go_high_level_contact_create_tool_messages_item import GoHighLevelContactCreateToolMessagesItem +from ...types.go_high_level_contact_get_tool_messages_item import GoHighLevelContactGetToolMessagesItem +from ...types.google_calendar_check_availability_tool_messages_item import ( + GoogleCalendarCheckAvailabilityToolMessagesItem, +) +from ...types.google_calendar_create_event_tool_messages_item import GoogleCalendarCreateEventToolMessagesItem +from ...types.google_sheets_row_append_tool_messages_item import GoogleSheetsRowAppendToolMessagesItem +from ...types.handoff_tool_destinations_item import HandoffToolDestinationsItem +from ...types.handoff_tool_messages_item import HandoffToolMessagesItem +from ...types.knowledge_base import KnowledgeBase +from ...types.mcp_tool_messages import McpToolMessages +from ...types.mcp_tool_messages_item import McpToolMessagesItem +from ...types.mcp_tool_metadata import McpToolMetadata +from ...types.open_ai_function import OpenAiFunction +from ...types.query_tool_messages_item import QueryToolMessagesItem +from ...types.server import Server +from ...types.sip_request_tool_body import SipRequestToolBody +from ...types.sip_request_tool_messages_item import SipRequestToolMessagesItem +from ...types.sip_request_tool_verb import SipRequestToolVerb +from ...types.slack_send_message_tool_messages_item import SlackSendMessageToolMessagesItem +from ...types.sms_tool_messages_item import SmsToolMessagesItem +from ...types.text_editor_tool_messages_item import TextEditorToolMessagesItem +from ...types.text_editor_tool_name import TextEditorToolName +from ...types.text_editor_tool_sub_type import TextEditorToolSubType +from ...types.tool_parameter import ToolParameter +from ...types.tool_rejection_plan import ToolRejectionPlan +from ...types.transfer_call_tool_destinations_item import TransferCallToolDestinationsItem +from ...types.transfer_call_tool_messages_item import TransferCallToolMessagesItem +from ...types.variable_extraction_plan import VariableExtractionPlan +from ...types.voicemail_tool_messages_item import VoicemailToolMessagesItem + + +class DeleteToolsResponse_ApiRequest(UncheckedBaseModel): + type: typing.Literal["apiRequest"] = "apiRequest" + messages: typing.Optional[typing.List[ApiRequestToolMessagesItem]] = None + method: ApiRequestToolMethod + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + encrypted_paths: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="encryptedPaths"), pydantic.Field(alias="encryptedPaths") + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + name: typing.Optional[str] = None + description: typing.Optional[str] = None + url: str + body: typing.Optional["JsonSchema"] = None + headers: typing.Optional["JsonSchema"] = None + backoff_plan: typing_extensions.Annotated[ + typing.Optional[BackoffPlan], FieldMetadata(alias="backoffPlan"), pydantic.Field(alias="backoffPlan") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeleteToolsResponse_Code(UncheckedBaseModel): + type: typing.Literal["code"] = "code" + messages: typing.Optional[typing.List[CodeToolMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + code: str + environment_variables: typing_extensions.Annotated[ + typing.Optional[typing.List[CodeToolEnvironmentVariable]], + FieldMetadata(alias="environmentVariables"), + pydantic.Field(alias="environmentVariables"), + ] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + function: typing.Optional[OpenAiFunction] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeleteToolsResponse_Dtmf(UncheckedBaseModel): + type: typing.Literal["dtmf"] = "dtmf" + messages: typing.Optional[typing.List[DtmfToolMessagesItem]] = None + sip_info_dtmf_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="sipInfoDtmfEnabled"), pydantic.Field(alias="sipInfoDtmfEnabled") + ] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeleteToolsResponse_EndCall(UncheckedBaseModel): + type: typing.Literal["endCall"] = "endCall" + messages: typing.Optional[typing.List[EndCallToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeleteToolsResponse_Function(UncheckedBaseModel): + type: typing.Literal["function"] = "function" + messages: typing.Optional[typing.List[FunctionToolMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + function: typing.Optional[OpenAiFunction] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeleteToolsResponse_TransferCall(UncheckedBaseModel): + type: typing.Literal["transferCall"] = "transferCall" + messages: typing.Optional[typing.List[TransferCallToolMessagesItem]] = None + destinations: typing.Optional[typing.List[TransferCallToolDestinationsItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeleteToolsResponse_Handoff(UncheckedBaseModel): + type: typing.Literal["handoff"] = "handoff" + messages: typing.Optional[typing.List[HandoffToolMessagesItem]] = None + default_result: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="defaultResult"), pydantic.Field(alias="defaultResult") + ] = None + destinations: typing.Optional[typing.List[HandoffToolDestinationsItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + function: typing.Optional[OpenAiFunction] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeleteToolsResponse_Bash(UncheckedBaseModel): + type: typing.Literal["bash"] = "bash" + messages: typing.Optional[typing.List[BashToolMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + BashToolSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + name: BashToolName + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeleteToolsResponse_Computer(UncheckedBaseModel): + type: typing.Literal["computer"] = "computer" + messages: typing.Optional[typing.List[ComputerToolMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + ComputerToolSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + name: ComputerToolName + display_width_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayWidthPx"), pydantic.Field(alias="displayWidthPx") + ] + display_height_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayHeightPx"), pydantic.Field(alias="displayHeightPx") + ] + display_number: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="displayNumber"), pydantic.Field(alias="displayNumber") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeleteToolsResponse_TextEditor(UncheckedBaseModel): + type: typing.Literal["textEditor"] = "textEditor" + messages: typing.Optional[typing.List[TextEditorToolMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + TextEditorToolSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + name: TextEditorToolName + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeleteToolsResponse_Query(UncheckedBaseModel): + type: typing.Literal["query"] = "query" + messages: typing.Optional[typing.List[QueryToolMessagesItem]] = None + knowledge_bases: typing_extensions.Annotated[ + typing.Optional[typing.List[KnowledgeBase]], + FieldMetadata(alias="knowledgeBases"), + pydantic.Field(alias="knowledgeBases"), + ] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeleteToolsResponse_GoogleCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["google.calendar.event.create"] = "google.calendar.event.create" + messages: typing.Optional[typing.List[GoogleCalendarCreateEventToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeleteToolsResponse_GoogleSheetsRowAppend(UncheckedBaseModel): + type: typing.Literal["google.sheets.row.append"] = "google.sheets.row.append" + messages: typing.Optional[typing.List[GoogleSheetsRowAppendToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeleteToolsResponse_GoogleCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["google.calendar.availability.check"] = "google.calendar.availability.check" + messages: typing.Optional[typing.List[GoogleCalendarCheckAvailabilityToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeleteToolsResponse_SlackMessageSend(UncheckedBaseModel): + type: typing.Literal["slack.message.send"] = "slack.message.send" + messages: typing.Optional[typing.List[SlackSendMessageToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeleteToolsResponse_Sms(UncheckedBaseModel): + type: typing.Literal["sms"] = "sms" + messages: typing.Optional[typing.List[SmsToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeleteToolsResponse_Mcp(UncheckedBaseModel): + type: typing.Literal["mcp"] = "mcp" + messages: typing.Optional[typing.List[McpToolMessagesItem]] = None + server: typing.Optional[Server] = None + tool_messages: typing_extensions.Annotated[ + typing.Optional[typing.List[McpToolMessages]], + FieldMetadata(alias="toolMessages"), + pydantic.Field(alias="toolMessages"), + ] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + metadata: typing.Optional[McpToolMetadata] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeleteToolsResponse_GohighlevelCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.availability.check"] = "gohighlevel.calendar.availability.check" + messages: typing.Optional[typing.List[GoHighLevelCalendarAvailabilityToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeleteToolsResponse_GohighlevelCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.event.create"] = "gohighlevel.calendar.event.create" + messages: typing.Optional[typing.List[GoHighLevelCalendarEventCreateToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeleteToolsResponse_GohighlevelContactCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.create"] = "gohighlevel.contact.create" + messages: typing.Optional[typing.List[GoHighLevelContactCreateToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeleteToolsResponse_GohighlevelContactGet(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.get"] = "gohighlevel.contact.get" + messages: typing.Optional[typing.List[GoHighLevelContactGetToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeleteToolsResponse_SipRequest(UncheckedBaseModel): + type: typing.Literal["sipRequest"] = "sipRequest" + messages: typing.Optional[typing.List[SipRequestToolMessagesItem]] = None + verb: SipRequestToolVerb + headers: typing.Optional["JsonSchema"] = None + body: typing.Optional[SipRequestToolBody] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeleteToolsResponse_Voicemail(UncheckedBaseModel): + type: typing.Literal["voicemail"] = "voicemail" + messages: typing.Optional[typing.List[VoicemailToolMessagesItem]] = None + beep_detection_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="beepDetectionEnabled"), pydantic.Field(alias="beepDetectionEnabled") + ] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +DeleteToolsResponse = typing_extensions.Annotated[ + typing.Union[ + DeleteToolsResponse_ApiRequest, + DeleteToolsResponse_Code, + DeleteToolsResponse_Dtmf, + DeleteToolsResponse_EndCall, + DeleteToolsResponse_Function, + DeleteToolsResponse_TransferCall, + DeleteToolsResponse_Handoff, + DeleteToolsResponse_Bash, + DeleteToolsResponse_Computer, + DeleteToolsResponse_TextEditor, + DeleteToolsResponse_Query, + DeleteToolsResponse_GoogleCalendarEventCreate, + DeleteToolsResponse_GoogleSheetsRowAppend, + DeleteToolsResponse_GoogleCalendarAvailabilityCheck, + DeleteToolsResponse_SlackMessageSend, + DeleteToolsResponse_Sms, + DeleteToolsResponse_Mcp, + DeleteToolsResponse_GohighlevelCalendarAvailabilityCheck, + DeleteToolsResponse_GohighlevelCalendarEventCreate, + DeleteToolsResponse_GohighlevelContactCreate, + DeleteToolsResponse_GohighlevelContactGet, + DeleteToolsResponse_SipRequest, + DeleteToolsResponse_Voicemail, + ], + UnionMetadata(discriminant="type"), +] +from ...types.json_schema import JsonSchema # noqa: E402, I001 + +update_forward_refs(DeleteToolsResponse_ApiRequest, JsonSchema=JsonSchema) +update_forward_refs(DeleteToolsResponse_Code) +update_forward_refs(DeleteToolsResponse_Dtmf) +update_forward_refs(DeleteToolsResponse_EndCall) +update_forward_refs(DeleteToolsResponse_Function) +update_forward_refs(DeleteToolsResponse_TransferCall) +update_forward_refs(DeleteToolsResponse_Handoff) +update_forward_refs(DeleteToolsResponse_Bash) +update_forward_refs(DeleteToolsResponse_Computer) +update_forward_refs(DeleteToolsResponse_TextEditor) +update_forward_refs(DeleteToolsResponse_Query) +update_forward_refs(DeleteToolsResponse_GoogleCalendarEventCreate) +update_forward_refs(DeleteToolsResponse_GoogleSheetsRowAppend) +update_forward_refs(DeleteToolsResponse_GoogleCalendarAvailabilityCheck) +update_forward_refs(DeleteToolsResponse_SlackMessageSend) +update_forward_refs(DeleteToolsResponse_Sms) +update_forward_refs(DeleteToolsResponse_Mcp) +update_forward_refs(DeleteToolsResponse_GohighlevelCalendarAvailabilityCheck) +update_forward_refs(DeleteToolsResponse_GohighlevelCalendarEventCreate) +update_forward_refs(DeleteToolsResponse_GohighlevelContactCreate) +update_forward_refs(DeleteToolsResponse_GohighlevelContactGet) +update_forward_refs(DeleteToolsResponse_SipRequest, JsonSchema=JsonSchema) +update_forward_refs(DeleteToolsResponse_Voicemail) diff --git a/src/vapi/tools/types/get_tools_response.py b/src/vapi/tools/types/get_tools_response.py new file mode 100644 index 00000000..58db2ed8 --- /dev/null +++ b/src/vapi/tools/types/get_tools_response.py @@ -0,0 +1,800 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ...core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ...core.serialization import FieldMetadata +from ...core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from ...types.api_request_tool_messages_item import ApiRequestToolMessagesItem +from ...types.api_request_tool_method import ApiRequestToolMethod +from ...types.backoff_plan import BackoffPlan +from ...types.bash_tool_messages_item import BashToolMessagesItem +from ...types.bash_tool_name import BashToolName +from ...types.bash_tool_sub_type import BashToolSubType +from ...types.code_tool_environment_variable import CodeToolEnvironmentVariable +from ...types.code_tool_messages_item import CodeToolMessagesItem +from ...types.computer_tool_messages_item import ComputerToolMessagesItem +from ...types.computer_tool_name import ComputerToolName +from ...types.computer_tool_sub_type import ComputerToolSubType +from ...types.dtmf_tool_messages_item import DtmfToolMessagesItem +from ...types.end_call_tool_messages_item import EndCallToolMessagesItem +from ...types.function_tool_messages_item import FunctionToolMessagesItem +from ...types.go_high_level_calendar_availability_tool_messages_item import ( + GoHighLevelCalendarAvailabilityToolMessagesItem, +) +from ...types.go_high_level_calendar_event_create_tool_messages_item import ( + GoHighLevelCalendarEventCreateToolMessagesItem, +) +from ...types.go_high_level_contact_create_tool_messages_item import GoHighLevelContactCreateToolMessagesItem +from ...types.go_high_level_contact_get_tool_messages_item import GoHighLevelContactGetToolMessagesItem +from ...types.google_calendar_check_availability_tool_messages_item import ( + GoogleCalendarCheckAvailabilityToolMessagesItem, +) +from ...types.google_calendar_create_event_tool_messages_item import GoogleCalendarCreateEventToolMessagesItem +from ...types.google_sheets_row_append_tool_messages_item import GoogleSheetsRowAppendToolMessagesItem +from ...types.handoff_tool_destinations_item import HandoffToolDestinationsItem +from ...types.handoff_tool_messages_item import HandoffToolMessagesItem +from ...types.knowledge_base import KnowledgeBase +from ...types.mcp_tool_messages import McpToolMessages +from ...types.mcp_tool_messages_item import McpToolMessagesItem +from ...types.mcp_tool_metadata import McpToolMetadata +from ...types.open_ai_function import OpenAiFunction +from ...types.query_tool_messages_item import QueryToolMessagesItem +from ...types.server import Server +from ...types.sip_request_tool_body import SipRequestToolBody +from ...types.sip_request_tool_messages_item import SipRequestToolMessagesItem +from ...types.sip_request_tool_verb import SipRequestToolVerb +from ...types.slack_send_message_tool_messages_item import SlackSendMessageToolMessagesItem +from ...types.sms_tool_messages_item import SmsToolMessagesItem +from ...types.text_editor_tool_messages_item import TextEditorToolMessagesItem +from ...types.text_editor_tool_name import TextEditorToolName +from ...types.text_editor_tool_sub_type import TextEditorToolSubType +from ...types.tool_parameter import ToolParameter +from ...types.tool_rejection_plan import ToolRejectionPlan +from ...types.transfer_call_tool_destinations_item import TransferCallToolDestinationsItem +from ...types.transfer_call_tool_messages_item import TransferCallToolMessagesItem +from ...types.variable_extraction_plan import VariableExtractionPlan +from ...types.voicemail_tool_messages_item import VoicemailToolMessagesItem + + +class GetToolsResponse_ApiRequest(UncheckedBaseModel): + type: typing.Literal["apiRequest"] = "apiRequest" + messages: typing.Optional[typing.List[ApiRequestToolMessagesItem]] = None + method: ApiRequestToolMethod + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + encrypted_paths: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="encryptedPaths"), pydantic.Field(alias="encryptedPaths") + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + name: typing.Optional[str] = None + description: typing.Optional[str] = None + url: str + body: typing.Optional["JsonSchema"] = None + headers: typing.Optional["JsonSchema"] = None + backoff_plan: typing_extensions.Annotated[ + typing.Optional[BackoffPlan], FieldMetadata(alias="backoffPlan"), pydantic.Field(alias="backoffPlan") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GetToolsResponse_Code(UncheckedBaseModel): + type: typing.Literal["code"] = "code" + messages: typing.Optional[typing.List[CodeToolMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + code: str + environment_variables: typing_extensions.Annotated[ + typing.Optional[typing.List[CodeToolEnvironmentVariable]], + FieldMetadata(alias="environmentVariables"), + pydantic.Field(alias="environmentVariables"), + ] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + function: typing.Optional[OpenAiFunction] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GetToolsResponse_Dtmf(UncheckedBaseModel): + type: typing.Literal["dtmf"] = "dtmf" + messages: typing.Optional[typing.List[DtmfToolMessagesItem]] = None + sip_info_dtmf_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="sipInfoDtmfEnabled"), pydantic.Field(alias="sipInfoDtmfEnabled") + ] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GetToolsResponse_EndCall(UncheckedBaseModel): + type: typing.Literal["endCall"] = "endCall" + messages: typing.Optional[typing.List[EndCallToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GetToolsResponse_Function(UncheckedBaseModel): + type: typing.Literal["function"] = "function" + messages: typing.Optional[typing.List[FunctionToolMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + function: typing.Optional[OpenAiFunction] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GetToolsResponse_TransferCall(UncheckedBaseModel): + type: typing.Literal["transferCall"] = "transferCall" + messages: typing.Optional[typing.List[TransferCallToolMessagesItem]] = None + destinations: typing.Optional[typing.List[TransferCallToolDestinationsItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GetToolsResponse_Handoff(UncheckedBaseModel): + type: typing.Literal["handoff"] = "handoff" + messages: typing.Optional[typing.List[HandoffToolMessagesItem]] = None + default_result: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="defaultResult"), pydantic.Field(alias="defaultResult") + ] = None + destinations: typing.Optional[typing.List[HandoffToolDestinationsItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + function: typing.Optional[OpenAiFunction] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GetToolsResponse_Bash(UncheckedBaseModel): + type: typing.Literal["bash"] = "bash" + messages: typing.Optional[typing.List[BashToolMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + BashToolSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + name: BashToolName + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GetToolsResponse_Computer(UncheckedBaseModel): + type: typing.Literal["computer"] = "computer" + messages: typing.Optional[typing.List[ComputerToolMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + ComputerToolSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + name: ComputerToolName + display_width_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayWidthPx"), pydantic.Field(alias="displayWidthPx") + ] + display_height_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayHeightPx"), pydantic.Field(alias="displayHeightPx") + ] + display_number: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="displayNumber"), pydantic.Field(alias="displayNumber") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GetToolsResponse_TextEditor(UncheckedBaseModel): + type: typing.Literal["textEditor"] = "textEditor" + messages: typing.Optional[typing.List[TextEditorToolMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + TextEditorToolSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + name: TextEditorToolName + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GetToolsResponse_Query(UncheckedBaseModel): + type: typing.Literal["query"] = "query" + messages: typing.Optional[typing.List[QueryToolMessagesItem]] = None + knowledge_bases: typing_extensions.Annotated[ + typing.Optional[typing.List[KnowledgeBase]], + FieldMetadata(alias="knowledgeBases"), + pydantic.Field(alias="knowledgeBases"), + ] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GetToolsResponse_GoogleCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["google.calendar.event.create"] = "google.calendar.event.create" + messages: typing.Optional[typing.List[GoogleCalendarCreateEventToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GetToolsResponse_GoogleSheetsRowAppend(UncheckedBaseModel): + type: typing.Literal["google.sheets.row.append"] = "google.sheets.row.append" + messages: typing.Optional[typing.List[GoogleSheetsRowAppendToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GetToolsResponse_GoogleCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["google.calendar.availability.check"] = "google.calendar.availability.check" + messages: typing.Optional[typing.List[GoogleCalendarCheckAvailabilityToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GetToolsResponse_SlackMessageSend(UncheckedBaseModel): + type: typing.Literal["slack.message.send"] = "slack.message.send" + messages: typing.Optional[typing.List[SlackSendMessageToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GetToolsResponse_Sms(UncheckedBaseModel): + type: typing.Literal["sms"] = "sms" + messages: typing.Optional[typing.List[SmsToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GetToolsResponse_Mcp(UncheckedBaseModel): + type: typing.Literal["mcp"] = "mcp" + messages: typing.Optional[typing.List[McpToolMessagesItem]] = None + server: typing.Optional[Server] = None + tool_messages: typing_extensions.Annotated[ + typing.Optional[typing.List[McpToolMessages]], + FieldMetadata(alias="toolMessages"), + pydantic.Field(alias="toolMessages"), + ] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + metadata: typing.Optional[McpToolMetadata] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GetToolsResponse_GohighlevelCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.availability.check"] = "gohighlevel.calendar.availability.check" + messages: typing.Optional[typing.List[GoHighLevelCalendarAvailabilityToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GetToolsResponse_GohighlevelCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.event.create"] = "gohighlevel.calendar.event.create" + messages: typing.Optional[typing.List[GoHighLevelCalendarEventCreateToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GetToolsResponse_GohighlevelContactCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.create"] = "gohighlevel.contact.create" + messages: typing.Optional[typing.List[GoHighLevelContactCreateToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GetToolsResponse_GohighlevelContactGet(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.get"] = "gohighlevel.contact.get" + messages: typing.Optional[typing.List[GoHighLevelContactGetToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GetToolsResponse_SipRequest(UncheckedBaseModel): + type: typing.Literal["sipRequest"] = "sipRequest" + messages: typing.Optional[typing.List[SipRequestToolMessagesItem]] = None + verb: SipRequestToolVerb + headers: typing.Optional["JsonSchema"] = None + body: typing.Optional[SipRequestToolBody] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GetToolsResponse_Voicemail(UncheckedBaseModel): + type: typing.Literal["voicemail"] = "voicemail" + messages: typing.Optional[typing.List[VoicemailToolMessagesItem]] = None + beep_detection_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="beepDetectionEnabled"), pydantic.Field(alias="beepDetectionEnabled") + ] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +GetToolsResponse = typing_extensions.Annotated[ + typing.Union[ + GetToolsResponse_ApiRequest, + GetToolsResponse_Code, + GetToolsResponse_Dtmf, + GetToolsResponse_EndCall, + GetToolsResponse_Function, + GetToolsResponse_TransferCall, + GetToolsResponse_Handoff, + GetToolsResponse_Bash, + GetToolsResponse_Computer, + GetToolsResponse_TextEditor, + GetToolsResponse_Query, + GetToolsResponse_GoogleCalendarEventCreate, + GetToolsResponse_GoogleSheetsRowAppend, + GetToolsResponse_GoogleCalendarAvailabilityCheck, + GetToolsResponse_SlackMessageSend, + GetToolsResponse_Sms, + GetToolsResponse_Mcp, + GetToolsResponse_GohighlevelCalendarAvailabilityCheck, + GetToolsResponse_GohighlevelCalendarEventCreate, + GetToolsResponse_GohighlevelContactCreate, + GetToolsResponse_GohighlevelContactGet, + GetToolsResponse_SipRequest, + GetToolsResponse_Voicemail, + ], + UnionMetadata(discriminant="type"), +] +from ...types.json_schema import JsonSchema # noqa: E402, I001 + +update_forward_refs(GetToolsResponse_ApiRequest, JsonSchema=JsonSchema) +update_forward_refs(GetToolsResponse_Code) +update_forward_refs(GetToolsResponse_Dtmf) +update_forward_refs(GetToolsResponse_EndCall) +update_forward_refs(GetToolsResponse_Function) +update_forward_refs(GetToolsResponse_TransferCall) +update_forward_refs(GetToolsResponse_Handoff) +update_forward_refs(GetToolsResponse_Bash) +update_forward_refs(GetToolsResponse_Computer) +update_forward_refs(GetToolsResponse_TextEditor) +update_forward_refs(GetToolsResponse_Query) +update_forward_refs(GetToolsResponse_GoogleCalendarEventCreate) +update_forward_refs(GetToolsResponse_GoogleSheetsRowAppend) +update_forward_refs(GetToolsResponse_GoogleCalendarAvailabilityCheck) +update_forward_refs(GetToolsResponse_SlackMessageSend) +update_forward_refs(GetToolsResponse_Sms) +update_forward_refs(GetToolsResponse_Mcp) +update_forward_refs(GetToolsResponse_GohighlevelCalendarAvailabilityCheck) +update_forward_refs(GetToolsResponse_GohighlevelCalendarEventCreate) +update_forward_refs(GetToolsResponse_GohighlevelContactCreate) +update_forward_refs(GetToolsResponse_GohighlevelContactGet) +update_forward_refs(GetToolsResponse_SipRequest, JsonSchema=JsonSchema) +update_forward_refs(GetToolsResponse_Voicemail) diff --git a/src/vapi/tools/types/list_tools_response_item.py b/src/vapi/tools/types/list_tools_response_item.py new file mode 100644 index 00000000..19ed179c --- /dev/null +++ b/src/vapi/tools/types/list_tools_response_item.py @@ -0,0 +1,800 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ...core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ...core.serialization import FieldMetadata +from ...core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from ...types.api_request_tool_messages_item import ApiRequestToolMessagesItem +from ...types.api_request_tool_method import ApiRequestToolMethod +from ...types.backoff_plan import BackoffPlan +from ...types.bash_tool_messages_item import BashToolMessagesItem +from ...types.bash_tool_name import BashToolName +from ...types.bash_tool_sub_type import BashToolSubType +from ...types.code_tool_environment_variable import CodeToolEnvironmentVariable +from ...types.code_tool_messages_item import CodeToolMessagesItem +from ...types.computer_tool_messages_item import ComputerToolMessagesItem +from ...types.computer_tool_name import ComputerToolName +from ...types.computer_tool_sub_type import ComputerToolSubType +from ...types.dtmf_tool_messages_item import DtmfToolMessagesItem +from ...types.end_call_tool_messages_item import EndCallToolMessagesItem +from ...types.function_tool_messages_item import FunctionToolMessagesItem +from ...types.go_high_level_calendar_availability_tool_messages_item import ( + GoHighLevelCalendarAvailabilityToolMessagesItem, +) +from ...types.go_high_level_calendar_event_create_tool_messages_item import ( + GoHighLevelCalendarEventCreateToolMessagesItem, +) +from ...types.go_high_level_contact_create_tool_messages_item import GoHighLevelContactCreateToolMessagesItem +from ...types.go_high_level_contact_get_tool_messages_item import GoHighLevelContactGetToolMessagesItem +from ...types.google_calendar_check_availability_tool_messages_item import ( + GoogleCalendarCheckAvailabilityToolMessagesItem, +) +from ...types.google_calendar_create_event_tool_messages_item import GoogleCalendarCreateEventToolMessagesItem +from ...types.google_sheets_row_append_tool_messages_item import GoogleSheetsRowAppendToolMessagesItem +from ...types.handoff_tool_destinations_item import HandoffToolDestinationsItem +from ...types.handoff_tool_messages_item import HandoffToolMessagesItem +from ...types.knowledge_base import KnowledgeBase +from ...types.mcp_tool_messages import McpToolMessages +from ...types.mcp_tool_messages_item import McpToolMessagesItem +from ...types.mcp_tool_metadata import McpToolMetadata +from ...types.open_ai_function import OpenAiFunction +from ...types.query_tool_messages_item import QueryToolMessagesItem +from ...types.server import Server +from ...types.sip_request_tool_body import SipRequestToolBody +from ...types.sip_request_tool_messages_item import SipRequestToolMessagesItem +from ...types.sip_request_tool_verb import SipRequestToolVerb +from ...types.slack_send_message_tool_messages_item import SlackSendMessageToolMessagesItem +from ...types.sms_tool_messages_item import SmsToolMessagesItem +from ...types.text_editor_tool_messages_item import TextEditorToolMessagesItem +from ...types.text_editor_tool_name import TextEditorToolName +from ...types.text_editor_tool_sub_type import TextEditorToolSubType +from ...types.tool_parameter import ToolParameter +from ...types.tool_rejection_plan import ToolRejectionPlan +from ...types.transfer_call_tool_destinations_item import TransferCallToolDestinationsItem +from ...types.transfer_call_tool_messages_item import TransferCallToolMessagesItem +from ...types.variable_extraction_plan import VariableExtractionPlan +from ...types.voicemail_tool_messages_item import VoicemailToolMessagesItem + + +class ListToolsResponseItem_ApiRequest(UncheckedBaseModel): + type: typing.Literal["apiRequest"] = "apiRequest" + messages: typing.Optional[typing.List[ApiRequestToolMessagesItem]] = None + method: ApiRequestToolMethod + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + encrypted_paths: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="encryptedPaths"), pydantic.Field(alias="encryptedPaths") + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + name: typing.Optional[str] = None + description: typing.Optional[str] = None + url: str + body: typing.Optional["JsonSchema"] = None + headers: typing.Optional["JsonSchema"] = None + backoff_plan: typing_extensions.Annotated[ + typing.Optional[BackoffPlan], FieldMetadata(alias="backoffPlan"), pydantic.Field(alias="backoffPlan") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ListToolsResponseItem_Code(UncheckedBaseModel): + type: typing.Literal["code"] = "code" + messages: typing.Optional[typing.List[CodeToolMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + code: str + environment_variables: typing_extensions.Annotated[ + typing.Optional[typing.List[CodeToolEnvironmentVariable]], + FieldMetadata(alias="environmentVariables"), + pydantic.Field(alias="environmentVariables"), + ] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + function: typing.Optional[OpenAiFunction] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ListToolsResponseItem_Dtmf(UncheckedBaseModel): + type: typing.Literal["dtmf"] = "dtmf" + messages: typing.Optional[typing.List[DtmfToolMessagesItem]] = None + sip_info_dtmf_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="sipInfoDtmfEnabled"), pydantic.Field(alias="sipInfoDtmfEnabled") + ] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ListToolsResponseItem_EndCall(UncheckedBaseModel): + type: typing.Literal["endCall"] = "endCall" + messages: typing.Optional[typing.List[EndCallToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ListToolsResponseItem_Function(UncheckedBaseModel): + type: typing.Literal["function"] = "function" + messages: typing.Optional[typing.List[FunctionToolMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + function: typing.Optional[OpenAiFunction] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ListToolsResponseItem_TransferCall(UncheckedBaseModel): + type: typing.Literal["transferCall"] = "transferCall" + messages: typing.Optional[typing.List[TransferCallToolMessagesItem]] = None + destinations: typing.Optional[typing.List[TransferCallToolDestinationsItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ListToolsResponseItem_Handoff(UncheckedBaseModel): + type: typing.Literal["handoff"] = "handoff" + messages: typing.Optional[typing.List[HandoffToolMessagesItem]] = None + default_result: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="defaultResult"), pydantic.Field(alias="defaultResult") + ] = None + destinations: typing.Optional[typing.List[HandoffToolDestinationsItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + function: typing.Optional[OpenAiFunction] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ListToolsResponseItem_Bash(UncheckedBaseModel): + type: typing.Literal["bash"] = "bash" + messages: typing.Optional[typing.List[BashToolMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + BashToolSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + name: BashToolName + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ListToolsResponseItem_Computer(UncheckedBaseModel): + type: typing.Literal["computer"] = "computer" + messages: typing.Optional[typing.List[ComputerToolMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + ComputerToolSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + name: ComputerToolName + display_width_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayWidthPx"), pydantic.Field(alias="displayWidthPx") + ] + display_height_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayHeightPx"), pydantic.Field(alias="displayHeightPx") + ] + display_number: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="displayNumber"), pydantic.Field(alias="displayNumber") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ListToolsResponseItem_TextEditor(UncheckedBaseModel): + type: typing.Literal["textEditor"] = "textEditor" + messages: typing.Optional[typing.List[TextEditorToolMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + TextEditorToolSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + name: TextEditorToolName + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ListToolsResponseItem_Query(UncheckedBaseModel): + type: typing.Literal["query"] = "query" + messages: typing.Optional[typing.List[QueryToolMessagesItem]] = None + knowledge_bases: typing_extensions.Annotated[ + typing.Optional[typing.List[KnowledgeBase]], + FieldMetadata(alias="knowledgeBases"), + pydantic.Field(alias="knowledgeBases"), + ] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ListToolsResponseItem_GoogleCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["google.calendar.event.create"] = "google.calendar.event.create" + messages: typing.Optional[typing.List[GoogleCalendarCreateEventToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ListToolsResponseItem_GoogleSheetsRowAppend(UncheckedBaseModel): + type: typing.Literal["google.sheets.row.append"] = "google.sheets.row.append" + messages: typing.Optional[typing.List[GoogleSheetsRowAppendToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ListToolsResponseItem_GoogleCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["google.calendar.availability.check"] = "google.calendar.availability.check" + messages: typing.Optional[typing.List[GoogleCalendarCheckAvailabilityToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ListToolsResponseItem_SlackMessageSend(UncheckedBaseModel): + type: typing.Literal["slack.message.send"] = "slack.message.send" + messages: typing.Optional[typing.List[SlackSendMessageToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ListToolsResponseItem_Sms(UncheckedBaseModel): + type: typing.Literal["sms"] = "sms" + messages: typing.Optional[typing.List[SmsToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ListToolsResponseItem_Mcp(UncheckedBaseModel): + type: typing.Literal["mcp"] = "mcp" + messages: typing.Optional[typing.List[McpToolMessagesItem]] = None + server: typing.Optional[Server] = None + tool_messages: typing_extensions.Annotated[ + typing.Optional[typing.List[McpToolMessages]], + FieldMetadata(alias="toolMessages"), + pydantic.Field(alias="toolMessages"), + ] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + metadata: typing.Optional[McpToolMetadata] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ListToolsResponseItem_GohighlevelCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.availability.check"] = "gohighlevel.calendar.availability.check" + messages: typing.Optional[typing.List[GoHighLevelCalendarAvailabilityToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ListToolsResponseItem_GohighlevelCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.event.create"] = "gohighlevel.calendar.event.create" + messages: typing.Optional[typing.List[GoHighLevelCalendarEventCreateToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ListToolsResponseItem_GohighlevelContactCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.create"] = "gohighlevel.contact.create" + messages: typing.Optional[typing.List[GoHighLevelContactCreateToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ListToolsResponseItem_GohighlevelContactGet(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.get"] = "gohighlevel.contact.get" + messages: typing.Optional[typing.List[GoHighLevelContactGetToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ListToolsResponseItem_SipRequest(UncheckedBaseModel): + type: typing.Literal["sipRequest"] = "sipRequest" + messages: typing.Optional[typing.List[SipRequestToolMessagesItem]] = None + verb: SipRequestToolVerb + headers: typing.Optional["JsonSchema"] = None + body: typing.Optional[SipRequestToolBody] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ListToolsResponseItem_Voicemail(UncheckedBaseModel): + type: typing.Literal["voicemail"] = "voicemail" + messages: typing.Optional[typing.List[VoicemailToolMessagesItem]] = None + beep_detection_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="beepDetectionEnabled"), pydantic.Field(alias="beepDetectionEnabled") + ] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ListToolsResponseItem = typing_extensions.Annotated[ + typing.Union[ + ListToolsResponseItem_ApiRequest, + ListToolsResponseItem_Code, + ListToolsResponseItem_Dtmf, + ListToolsResponseItem_EndCall, + ListToolsResponseItem_Function, + ListToolsResponseItem_TransferCall, + ListToolsResponseItem_Handoff, + ListToolsResponseItem_Bash, + ListToolsResponseItem_Computer, + ListToolsResponseItem_TextEditor, + ListToolsResponseItem_Query, + ListToolsResponseItem_GoogleCalendarEventCreate, + ListToolsResponseItem_GoogleSheetsRowAppend, + ListToolsResponseItem_GoogleCalendarAvailabilityCheck, + ListToolsResponseItem_SlackMessageSend, + ListToolsResponseItem_Sms, + ListToolsResponseItem_Mcp, + ListToolsResponseItem_GohighlevelCalendarAvailabilityCheck, + ListToolsResponseItem_GohighlevelCalendarEventCreate, + ListToolsResponseItem_GohighlevelContactCreate, + ListToolsResponseItem_GohighlevelContactGet, + ListToolsResponseItem_SipRequest, + ListToolsResponseItem_Voicemail, + ], + UnionMetadata(discriminant="type"), +] +from ...types.json_schema import JsonSchema # noqa: E402, I001 + +update_forward_refs(ListToolsResponseItem_ApiRequest, JsonSchema=JsonSchema) +update_forward_refs(ListToolsResponseItem_Code) +update_forward_refs(ListToolsResponseItem_Dtmf) +update_forward_refs(ListToolsResponseItem_EndCall) +update_forward_refs(ListToolsResponseItem_Function) +update_forward_refs(ListToolsResponseItem_TransferCall) +update_forward_refs(ListToolsResponseItem_Handoff) +update_forward_refs(ListToolsResponseItem_Bash) +update_forward_refs(ListToolsResponseItem_Computer) +update_forward_refs(ListToolsResponseItem_TextEditor) +update_forward_refs(ListToolsResponseItem_Query) +update_forward_refs(ListToolsResponseItem_GoogleCalendarEventCreate) +update_forward_refs(ListToolsResponseItem_GoogleSheetsRowAppend) +update_forward_refs(ListToolsResponseItem_GoogleCalendarAvailabilityCheck) +update_forward_refs(ListToolsResponseItem_SlackMessageSend) +update_forward_refs(ListToolsResponseItem_Sms) +update_forward_refs(ListToolsResponseItem_Mcp) +update_forward_refs(ListToolsResponseItem_GohighlevelCalendarAvailabilityCheck) +update_forward_refs(ListToolsResponseItem_GohighlevelCalendarEventCreate) +update_forward_refs(ListToolsResponseItem_GohighlevelContactCreate) +update_forward_refs(ListToolsResponseItem_GohighlevelContactGet) +update_forward_refs(ListToolsResponseItem_SipRequest, JsonSchema=JsonSchema) +update_forward_refs(ListToolsResponseItem_Voicemail) diff --git a/src/vapi/tools/types/tools_create_request.py b/src/vapi/tools/types/tools_create_request.py deleted file mode 100644 index e3a0d9eb..00000000 --- a/src/vapi/tools/types/tools_create_request.py +++ /dev/null @@ -1,20 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from ...types.create_dtmf_tool_dto import CreateDtmfToolDto -from ...types.create_end_call_tool_dto import CreateEndCallToolDto -from ...types.create_function_tool_dto import CreateFunctionToolDto -from ...types.create_ghl_tool_dto import CreateGhlToolDto -from ...types.create_make_tool_dto import CreateMakeToolDto -from ...types.create_transfer_call_tool_dto import CreateTransferCallToolDto -from ...types.create_output_tool_dto import CreateOutputToolDto - -ToolsCreateRequest = typing.Union[ - CreateDtmfToolDto, - CreateEndCallToolDto, - CreateFunctionToolDto, - CreateGhlToolDto, - CreateMakeToolDto, - CreateTransferCallToolDto, - CreateOutputToolDto, -] diff --git a/src/vapi/tools/types/tools_create_response.py b/src/vapi/tools/types/tools_create_response.py deleted file mode 100644 index ecbe21d3..00000000 --- a/src/vapi/tools/types/tools_create_response.py +++ /dev/null @@ -1,12 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from ...types.dtmf_tool import DtmfTool -from ...types.end_call_tool import EndCallTool -from ...types.function_tool import FunctionTool -from ...types.ghl_tool import GhlTool -from ...types.make_tool import MakeTool -from ...types.transfer_call_tool import TransferCallTool -from ...types.output_tool import OutputTool - -ToolsCreateResponse = typing.Union[DtmfTool, EndCallTool, FunctionTool, GhlTool, MakeTool, TransferCallTool, OutputTool] diff --git a/src/vapi/tools/types/tools_delete_response.py b/src/vapi/tools/types/tools_delete_response.py deleted file mode 100644 index 4fa7d731..00000000 --- a/src/vapi/tools/types/tools_delete_response.py +++ /dev/null @@ -1,12 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from ...types.dtmf_tool import DtmfTool -from ...types.end_call_tool import EndCallTool -from ...types.function_tool import FunctionTool -from ...types.ghl_tool import GhlTool -from ...types.make_tool import MakeTool -from ...types.transfer_call_tool import TransferCallTool -from ...types.output_tool import OutputTool - -ToolsDeleteResponse = typing.Union[DtmfTool, EndCallTool, FunctionTool, GhlTool, MakeTool, TransferCallTool, OutputTool] diff --git a/src/vapi/tools/types/tools_get_response.py b/src/vapi/tools/types/tools_get_response.py deleted file mode 100644 index 5ae89fb4..00000000 --- a/src/vapi/tools/types/tools_get_response.py +++ /dev/null @@ -1,12 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from ...types.dtmf_tool import DtmfTool -from ...types.end_call_tool import EndCallTool -from ...types.function_tool import FunctionTool -from ...types.ghl_tool import GhlTool -from ...types.make_tool import MakeTool -from ...types.transfer_call_tool import TransferCallTool -from ...types.output_tool import OutputTool - -ToolsGetResponse = typing.Union[DtmfTool, EndCallTool, FunctionTool, GhlTool, MakeTool, TransferCallTool, OutputTool] diff --git a/src/vapi/tools/types/tools_list_response_item.py b/src/vapi/tools/types/tools_list_response_item.py deleted file mode 100644 index 787807ae..00000000 --- a/src/vapi/tools/types/tools_list_response_item.py +++ /dev/null @@ -1,14 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from ...types.dtmf_tool import DtmfTool -from ...types.end_call_tool import EndCallTool -from ...types.function_tool import FunctionTool -from ...types.ghl_tool import GhlTool -from ...types.make_tool import MakeTool -from ...types.transfer_call_tool import TransferCallTool -from ...types.output_tool import OutputTool - -ToolsListResponseItem = typing.Union[ - DtmfTool, EndCallTool, FunctionTool, GhlTool, MakeTool, TransferCallTool, OutputTool -] diff --git a/src/vapi/tools/types/tools_update_response.py b/src/vapi/tools/types/tools_update_response.py deleted file mode 100644 index 61838668..00000000 --- a/src/vapi/tools/types/tools_update_response.py +++ /dev/null @@ -1,12 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from ...types.dtmf_tool import DtmfTool -from ...types.end_call_tool import EndCallTool -from ...types.function_tool import FunctionTool -from ...types.ghl_tool import GhlTool -from ...types.make_tool import MakeTool -from ...types.transfer_call_tool import TransferCallTool -from ...types.output_tool import OutputTool - -ToolsUpdateResponse = typing.Union[DtmfTool, EndCallTool, FunctionTool, GhlTool, MakeTool, TransferCallTool, OutputTool] diff --git a/src/vapi/tools/types/update_tool_dto_messages_item.py b/src/vapi/tools/types/update_tool_dto_messages_item.py deleted file mode 100644 index 099574ca..00000000 --- a/src/vapi/tools/types/update_tool_dto_messages_item.py +++ /dev/null @@ -1,9 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from ...types.tool_message_start import ToolMessageStart -from ...types.tool_message_complete import ToolMessageComplete -from ...types.tool_message_failed import ToolMessageFailed -from ...types.tool_message_delayed import ToolMessageDelayed - -UpdateToolDtoMessagesItem = typing.Union[ToolMessageStart, ToolMessageComplete, ToolMessageFailed, ToolMessageDelayed] diff --git a/src/vapi/tools/types/update_tools_request_body.py b/src/vapi/tools/types/update_tools_request_body.py new file mode 100644 index 00000000..1ac93327 --- /dev/null +++ b/src/vapi/tools/types/update_tools_request_body.py @@ -0,0 +1,580 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ...core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ...core.serialization import FieldMetadata +from ...core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from ...types.backoff_plan import BackoffPlan +from ...types.knowledge_base import KnowledgeBase +from ...types.mcp_tool_messages import McpToolMessages +from ...types.mcp_tool_metadata import McpToolMetadata +from ...types.open_ai_function import OpenAiFunction +from ...types.server import Server +from ...types.tool_parameter import ToolParameter +from ...types.tool_rejection_plan import ToolRejectionPlan +from ...types.update_api_request_tool_dto_messages_item import UpdateApiRequestToolDtoMessagesItem +from ...types.update_api_request_tool_dto_method import UpdateApiRequestToolDtoMethod +from ...types.update_bash_tool_dto_messages_item import UpdateBashToolDtoMessagesItem +from ...types.update_bash_tool_dto_name import UpdateBashToolDtoName +from ...types.update_bash_tool_dto_sub_type import UpdateBashToolDtoSubType +from ...types.update_computer_tool_dto_messages_item import UpdateComputerToolDtoMessagesItem +from ...types.update_computer_tool_dto_name import UpdateComputerToolDtoName +from ...types.update_computer_tool_dto_sub_type import UpdateComputerToolDtoSubType +from ...types.update_dtmf_tool_dto_messages_item import UpdateDtmfToolDtoMessagesItem +from ...types.update_end_call_tool_dto_messages_item import UpdateEndCallToolDtoMessagesItem +from ...types.update_function_tool_dto_messages_item import UpdateFunctionToolDtoMessagesItem +from ...types.update_go_high_level_calendar_availability_tool_dto_messages_item import ( + UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem, +) +from ...types.update_go_high_level_calendar_event_create_tool_dto_messages_item import ( + UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem, +) +from ...types.update_go_high_level_contact_create_tool_dto_messages_item import ( + UpdateGoHighLevelContactCreateToolDtoMessagesItem, +) +from ...types.update_go_high_level_contact_get_tool_dto_messages_item import ( + UpdateGoHighLevelContactGetToolDtoMessagesItem, +) +from ...types.update_google_calendar_check_availability_tool_dto_messages_item import ( + UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem, +) +from ...types.update_google_calendar_create_event_tool_dto_messages_item import ( + UpdateGoogleCalendarCreateEventToolDtoMessagesItem, +) +from ...types.update_google_sheets_row_append_tool_dto_messages_item import ( + UpdateGoogleSheetsRowAppendToolDtoMessagesItem, +) +from ...types.update_handoff_tool_dto_destinations_item import UpdateHandoffToolDtoDestinationsItem +from ...types.update_handoff_tool_dto_messages_item import UpdateHandoffToolDtoMessagesItem +from ...types.update_mcp_tool_dto_messages_item import UpdateMcpToolDtoMessagesItem +from ...types.update_query_tool_dto_messages_item import UpdateQueryToolDtoMessagesItem +from ...types.update_sip_request_tool_dto_body import UpdateSipRequestToolDtoBody +from ...types.update_sip_request_tool_dto_messages_item import UpdateSipRequestToolDtoMessagesItem +from ...types.update_sip_request_tool_dto_verb import UpdateSipRequestToolDtoVerb +from ...types.update_slack_send_message_tool_dto_messages_item import UpdateSlackSendMessageToolDtoMessagesItem +from ...types.update_sms_tool_dto_messages_item import UpdateSmsToolDtoMessagesItem +from ...types.update_text_editor_tool_dto_messages_item import UpdateTextEditorToolDtoMessagesItem +from ...types.update_text_editor_tool_dto_name import UpdateTextEditorToolDtoName +from ...types.update_text_editor_tool_dto_sub_type import UpdateTextEditorToolDtoSubType +from ...types.update_transfer_call_tool_dto_destinations_item import UpdateTransferCallToolDtoDestinationsItem +from ...types.update_transfer_call_tool_dto_messages_item import UpdateTransferCallToolDtoMessagesItem +from ...types.update_voicemail_tool_dto_messages_item import UpdateVoicemailToolDtoMessagesItem +from ...types.variable_extraction_plan import VariableExtractionPlan + + +class UpdateToolsRequestBody_ApiRequest(UncheckedBaseModel): + type: typing.Literal["apiRequest"] = "apiRequest" + messages: typing.Optional[typing.List[UpdateApiRequestToolDtoMessagesItem]] = None + method: typing.Optional[UpdateApiRequestToolDtoMethod] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + encrypted_paths: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="encryptedPaths"), pydantic.Field(alias="encryptedPaths") + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + name: typing.Optional[str] = None + description: typing.Optional[str] = None + url: typing.Optional[str] = None + body: typing.Optional["JsonSchema"] = None + headers: typing.Optional["JsonSchema"] = None + backoff_plan: typing_extensions.Annotated[ + typing.Optional[BackoffPlan], FieldMetadata(alias="backoffPlan"), pydantic.Field(alias="backoffPlan") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolsRequestBody_Dtmf(UncheckedBaseModel): + type: typing.Literal["dtmf"] = "dtmf" + messages: typing.Optional[typing.List[UpdateDtmfToolDtoMessagesItem]] = None + sip_info_dtmf_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="sipInfoDtmfEnabled"), pydantic.Field(alias="sipInfoDtmfEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolsRequestBody_EndCall(UncheckedBaseModel): + type: typing.Literal["endCall"] = "endCall" + messages: typing.Optional[typing.List[UpdateEndCallToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolsRequestBody_Function(UncheckedBaseModel): + type: typing.Literal["function"] = "function" + messages: typing.Optional[typing.List[UpdateFunctionToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + function: typing.Optional[OpenAiFunction] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolsRequestBody_TransferCall(UncheckedBaseModel): + type: typing.Literal["transferCall"] = "transferCall" + messages: typing.Optional[typing.List[UpdateTransferCallToolDtoMessagesItem]] = None + destinations: typing.Optional[typing.List[UpdateTransferCallToolDtoDestinationsItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolsRequestBody_Handoff(UncheckedBaseModel): + type: typing.Literal["handoff"] = "handoff" + messages: typing.Optional[typing.List[UpdateHandoffToolDtoMessagesItem]] = None + default_result: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="defaultResult"), pydantic.Field(alias="defaultResult") + ] = None + destinations: typing.Optional[typing.List[UpdateHandoffToolDtoDestinationsItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + function: typing.Optional[OpenAiFunction] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolsRequestBody_Bash(UncheckedBaseModel): + type: typing.Literal["bash"] = "bash" + messages: typing.Optional[typing.List[UpdateBashToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + typing.Optional[UpdateBashToolDtoSubType], FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] = None + server: typing.Optional[Server] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + name: typing.Optional[UpdateBashToolDtoName] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolsRequestBody_Computer(UncheckedBaseModel): + type: typing.Literal["computer"] = "computer" + messages: typing.Optional[typing.List[UpdateComputerToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + typing.Optional[UpdateComputerToolDtoSubType], FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] = None + server: typing.Optional[Server] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + name: typing.Optional[UpdateComputerToolDtoName] = None + display_width_px: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="displayWidthPx"), pydantic.Field(alias="displayWidthPx") + ] = None + display_height_px: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="displayHeightPx"), pydantic.Field(alias="displayHeightPx") + ] = None + display_number: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="displayNumber"), pydantic.Field(alias="displayNumber") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolsRequestBody_TextEditor(UncheckedBaseModel): + type: typing.Literal["textEditor"] = "textEditor" + messages: typing.Optional[typing.List[UpdateTextEditorToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + typing.Optional[UpdateTextEditorToolDtoSubType], FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] = None + server: typing.Optional[Server] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + name: typing.Optional[UpdateTextEditorToolDtoName] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolsRequestBody_Query(UncheckedBaseModel): + type: typing.Literal["query"] = "query" + messages: typing.Optional[typing.List[UpdateQueryToolDtoMessagesItem]] = None + knowledge_bases: typing_extensions.Annotated[ + typing.Optional[typing.List[KnowledgeBase]], + FieldMetadata(alias="knowledgeBases"), + pydantic.Field(alias="knowledgeBases"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolsRequestBody_GoogleCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["google.calendar.event.create"] = "google.calendar.event.create" + messages: typing.Optional[typing.List[UpdateGoogleCalendarCreateEventToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolsRequestBody_GoogleSheetsRowAppend(UncheckedBaseModel): + type: typing.Literal["google.sheets.row.append"] = "google.sheets.row.append" + messages: typing.Optional[typing.List[UpdateGoogleSheetsRowAppendToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolsRequestBody_GoogleCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["google.calendar.availability.check"] = "google.calendar.availability.check" + messages: typing.Optional[typing.List[UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolsRequestBody_SlackMessageSend(UncheckedBaseModel): + type: typing.Literal["slack.message.send"] = "slack.message.send" + messages: typing.Optional[typing.List[UpdateSlackSendMessageToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolsRequestBody_Sms(UncheckedBaseModel): + type: typing.Literal["sms"] = "sms" + messages: typing.Optional[typing.List[UpdateSmsToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolsRequestBody_Mcp(UncheckedBaseModel): + type: typing.Literal["mcp"] = "mcp" + messages: typing.Optional[typing.List[UpdateMcpToolDtoMessagesItem]] = None + server: typing.Optional[Server] = None + tool_messages: typing_extensions.Annotated[ + typing.Optional[typing.List[McpToolMessages]], + FieldMetadata(alias="toolMessages"), + pydantic.Field(alias="toolMessages"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + metadata: typing.Optional[McpToolMetadata] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolsRequestBody_GohighlevelCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.availability.check"] = "gohighlevel.calendar.availability.check" + messages: typing.Optional[typing.List[UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolsRequestBody_GohighlevelCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.event.create"] = "gohighlevel.calendar.event.create" + messages: typing.Optional[typing.List[UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolsRequestBody_GohighlevelContactCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.create"] = "gohighlevel.contact.create" + messages: typing.Optional[typing.List[UpdateGoHighLevelContactCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolsRequestBody_GohighlevelContactGet(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.get"] = "gohighlevel.contact.get" + messages: typing.Optional[typing.List[UpdateGoHighLevelContactGetToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolsRequestBody_SipRequest(UncheckedBaseModel): + type: typing.Literal["sipRequest"] = "sipRequest" + messages: typing.Optional[typing.List[UpdateSipRequestToolDtoMessagesItem]] = None + verb: typing.Optional[UpdateSipRequestToolDtoVerb] = None + headers: typing.Optional["JsonSchema"] = None + body: typing.Optional[UpdateSipRequestToolDtoBody] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolsRequestBody_Voicemail(UncheckedBaseModel): + type: typing.Literal["voicemail"] = "voicemail" + messages: typing.Optional[typing.List[UpdateVoicemailToolDtoMessagesItem]] = None + beep_detection_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="beepDetectionEnabled"), pydantic.Field(alias="beepDetectionEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateToolsRequestBody = typing_extensions.Annotated[ + typing.Union[ + UpdateToolsRequestBody_ApiRequest, + UpdateToolsRequestBody_Dtmf, + UpdateToolsRequestBody_EndCall, + UpdateToolsRequestBody_Function, + UpdateToolsRequestBody_TransferCall, + UpdateToolsRequestBody_Handoff, + UpdateToolsRequestBody_Bash, + UpdateToolsRequestBody_Computer, + UpdateToolsRequestBody_TextEditor, + UpdateToolsRequestBody_Query, + UpdateToolsRequestBody_GoogleCalendarEventCreate, + UpdateToolsRequestBody_GoogleSheetsRowAppend, + UpdateToolsRequestBody_GoogleCalendarAvailabilityCheck, + UpdateToolsRequestBody_SlackMessageSend, + UpdateToolsRequestBody_Sms, + UpdateToolsRequestBody_Mcp, + UpdateToolsRequestBody_GohighlevelCalendarAvailabilityCheck, + UpdateToolsRequestBody_GohighlevelCalendarEventCreate, + UpdateToolsRequestBody_GohighlevelContactCreate, + UpdateToolsRequestBody_GohighlevelContactGet, + UpdateToolsRequestBody_SipRequest, + UpdateToolsRequestBody_Voicemail, + ], + UnionMetadata(discriminant="type"), +] +from ...types.json_schema import JsonSchema # noqa: E402, I001 + +update_forward_refs(UpdateToolsRequestBody_ApiRequest, JsonSchema=JsonSchema) +update_forward_refs(UpdateToolsRequestBody_Dtmf) +update_forward_refs(UpdateToolsRequestBody_EndCall) +update_forward_refs(UpdateToolsRequestBody_Function) +update_forward_refs(UpdateToolsRequestBody_TransferCall) +update_forward_refs(UpdateToolsRequestBody_Handoff) +update_forward_refs(UpdateToolsRequestBody_Bash) +update_forward_refs(UpdateToolsRequestBody_Computer) +update_forward_refs(UpdateToolsRequestBody_TextEditor) +update_forward_refs(UpdateToolsRequestBody_Query) +update_forward_refs(UpdateToolsRequestBody_GoogleCalendarEventCreate) +update_forward_refs(UpdateToolsRequestBody_GoogleSheetsRowAppend) +update_forward_refs(UpdateToolsRequestBody_GoogleCalendarAvailabilityCheck) +update_forward_refs(UpdateToolsRequestBody_SlackMessageSend) +update_forward_refs(UpdateToolsRequestBody_Sms) +update_forward_refs(UpdateToolsRequestBody_Mcp) +update_forward_refs(UpdateToolsRequestBody_GohighlevelCalendarAvailabilityCheck) +update_forward_refs(UpdateToolsRequestBody_GohighlevelCalendarEventCreate) +update_forward_refs(UpdateToolsRequestBody_GohighlevelContactCreate) +update_forward_refs(UpdateToolsRequestBody_GohighlevelContactGet) +update_forward_refs(UpdateToolsRequestBody_SipRequest, JsonSchema=JsonSchema) +update_forward_refs(UpdateToolsRequestBody_Voicemail) diff --git a/src/vapi/tools/types/update_tools_response.py b/src/vapi/tools/types/update_tools_response.py new file mode 100644 index 00000000..5fb34d95 --- /dev/null +++ b/src/vapi/tools/types/update_tools_response.py @@ -0,0 +1,800 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ...core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ...core.serialization import FieldMetadata +from ...core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from ...types.api_request_tool_messages_item import ApiRequestToolMessagesItem +from ...types.api_request_tool_method import ApiRequestToolMethod +from ...types.backoff_plan import BackoffPlan +from ...types.bash_tool_messages_item import BashToolMessagesItem +from ...types.bash_tool_name import BashToolName +from ...types.bash_tool_sub_type import BashToolSubType +from ...types.code_tool_environment_variable import CodeToolEnvironmentVariable +from ...types.code_tool_messages_item import CodeToolMessagesItem +from ...types.computer_tool_messages_item import ComputerToolMessagesItem +from ...types.computer_tool_name import ComputerToolName +from ...types.computer_tool_sub_type import ComputerToolSubType +from ...types.dtmf_tool_messages_item import DtmfToolMessagesItem +from ...types.end_call_tool_messages_item import EndCallToolMessagesItem +from ...types.function_tool_messages_item import FunctionToolMessagesItem +from ...types.go_high_level_calendar_availability_tool_messages_item import ( + GoHighLevelCalendarAvailabilityToolMessagesItem, +) +from ...types.go_high_level_calendar_event_create_tool_messages_item import ( + GoHighLevelCalendarEventCreateToolMessagesItem, +) +from ...types.go_high_level_contact_create_tool_messages_item import GoHighLevelContactCreateToolMessagesItem +from ...types.go_high_level_contact_get_tool_messages_item import GoHighLevelContactGetToolMessagesItem +from ...types.google_calendar_check_availability_tool_messages_item import ( + GoogleCalendarCheckAvailabilityToolMessagesItem, +) +from ...types.google_calendar_create_event_tool_messages_item import GoogleCalendarCreateEventToolMessagesItem +from ...types.google_sheets_row_append_tool_messages_item import GoogleSheetsRowAppendToolMessagesItem +from ...types.handoff_tool_destinations_item import HandoffToolDestinationsItem +from ...types.handoff_tool_messages_item import HandoffToolMessagesItem +from ...types.knowledge_base import KnowledgeBase +from ...types.mcp_tool_messages import McpToolMessages +from ...types.mcp_tool_messages_item import McpToolMessagesItem +from ...types.mcp_tool_metadata import McpToolMetadata +from ...types.open_ai_function import OpenAiFunction +from ...types.query_tool_messages_item import QueryToolMessagesItem +from ...types.server import Server +from ...types.sip_request_tool_body import SipRequestToolBody +from ...types.sip_request_tool_messages_item import SipRequestToolMessagesItem +from ...types.sip_request_tool_verb import SipRequestToolVerb +from ...types.slack_send_message_tool_messages_item import SlackSendMessageToolMessagesItem +from ...types.sms_tool_messages_item import SmsToolMessagesItem +from ...types.text_editor_tool_messages_item import TextEditorToolMessagesItem +from ...types.text_editor_tool_name import TextEditorToolName +from ...types.text_editor_tool_sub_type import TextEditorToolSubType +from ...types.tool_parameter import ToolParameter +from ...types.tool_rejection_plan import ToolRejectionPlan +from ...types.transfer_call_tool_destinations_item import TransferCallToolDestinationsItem +from ...types.transfer_call_tool_messages_item import TransferCallToolMessagesItem +from ...types.variable_extraction_plan import VariableExtractionPlan +from ...types.voicemail_tool_messages_item import VoicemailToolMessagesItem + + +class UpdateToolsResponse_ApiRequest(UncheckedBaseModel): + type: typing.Literal["apiRequest"] = "apiRequest" + messages: typing.Optional[typing.List[ApiRequestToolMessagesItem]] = None + method: ApiRequestToolMethod + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + encrypted_paths: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="encryptedPaths"), pydantic.Field(alias="encryptedPaths") + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + name: typing.Optional[str] = None + description: typing.Optional[str] = None + url: str + body: typing.Optional["JsonSchema"] = None + headers: typing.Optional["JsonSchema"] = None + backoff_plan: typing_extensions.Annotated[ + typing.Optional[BackoffPlan], FieldMetadata(alias="backoffPlan"), pydantic.Field(alias="backoffPlan") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolsResponse_Code(UncheckedBaseModel): + type: typing.Literal["code"] = "code" + messages: typing.Optional[typing.List[CodeToolMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + code: str + environment_variables: typing_extensions.Annotated[ + typing.Optional[typing.List[CodeToolEnvironmentVariable]], + FieldMetadata(alias="environmentVariables"), + pydantic.Field(alias="environmentVariables"), + ] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + function: typing.Optional[OpenAiFunction] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolsResponse_Dtmf(UncheckedBaseModel): + type: typing.Literal["dtmf"] = "dtmf" + messages: typing.Optional[typing.List[DtmfToolMessagesItem]] = None + sip_info_dtmf_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="sipInfoDtmfEnabled"), pydantic.Field(alias="sipInfoDtmfEnabled") + ] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolsResponse_EndCall(UncheckedBaseModel): + type: typing.Literal["endCall"] = "endCall" + messages: typing.Optional[typing.List[EndCallToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolsResponse_Function(UncheckedBaseModel): + type: typing.Literal["function"] = "function" + messages: typing.Optional[typing.List[FunctionToolMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + function: typing.Optional[OpenAiFunction] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolsResponse_TransferCall(UncheckedBaseModel): + type: typing.Literal["transferCall"] = "transferCall" + messages: typing.Optional[typing.List[TransferCallToolMessagesItem]] = None + destinations: typing.Optional[typing.List[TransferCallToolDestinationsItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolsResponse_Handoff(UncheckedBaseModel): + type: typing.Literal["handoff"] = "handoff" + messages: typing.Optional[typing.List[HandoffToolMessagesItem]] = None + default_result: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="defaultResult"), pydantic.Field(alias="defaultResult") + ] = None + destinations: typing.Optional[typing.List[HandoffToolDestinationsItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + function: typing.Optional[OpenAiFunction] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolsResponse_Bash(UncheckedBaseModel): + type: typing.Literal["bash"] = "bash" + messages: typing.Optional[typing.List[BashToolMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + BashToolSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + name: BashToolName + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolsResponse_Computer(UncheckedBaseModel): + type: typing.Literal["computer"] = "computer" + messages: typing.Optional[typing.List[ComputerToolMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + ComputerToolSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + name: ComputerToolName + display_width_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayWidthPx"), pydantic.Field(alias="displayWidthPx") + ] + display_height_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayHeightPx"), pydantic.Field(alias="displayHeightPx") + ] + display_number: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="displayNumber"), pydantic.Field(alias="displayNumber") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolsResponse_TextEditor(UncheckedBaseModel): + type: typing.Literal["textEditor"] = "textEditor" + messages: typing.Optional[typing.List[TextEditorToolMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + TextEditorToolSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + name: TextEditorToolName + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolsResponse_Query(UncheckedBaseModel): + type: typing.Literal["query"] = "query" + messages: typing.Optional[typing.List[QueryToolMessagesItem]] = None + knowledge_bases: typing_extensions.Annotated[ + typing.Optional[typing.List[KnowledgeBase]], + FieldMetadata(alias="knowledgeBases"), + pydantic.Field(alias="knowledgeBases"), + ] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolsResponse_GoogleCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["google.calendar.event.create"] = "google.calendar.event.create" + messages: typing.Optional[typing.List[GoogleCalendarCreateEventToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolsResponse_GoogleSheetsRowAppend(UncheckedBaseModel): + type: typing.Literal["google.sheets.row.append"] = "google.sheets.row.append" + messages: typing.Optional[typing.List[GoogleSheetsRowAppendToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolsResponse_GoogleCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["google.calendar.availability.check"] = "google.calendar.availability.check" + messages: typing.Optional[typing.List[GoogleCalendarCheckAvailabilityToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolsResponse_SlackMessageSend(UncheckedBaseModel): + type: typing.Literal["slack.message.send"] = "slack.message.send" + messages: typing.Optional[typing.List[SlackSendMessageToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolsResponse_Sms(UncheckedBaseModel): + type: typing.Literal["sms"] = "sms" + messages: typing.Optional[typing.List[SmsToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolsResponse_Mcp(UncheckedBaseModel): + type: typing.Literal["mcp"] = "mcp" + messages: typing.Optional[typing.List[McpToolMessagesItem]] = None + server: typing.Optional[Server] = None + tool_messages: typing_extensions.Annotated[ + typing.Optional[typing.List[McpToolMessages]], + FieldMetadata(alias="toolMessages"), + pydantic.Field(alias="toolMessages"), + ] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + metadata: typing.Optional[McpToolMetadata] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolsResponse_GohighlevelCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.availability.check"] = "gohighlevel.calendar.availability.check" + messages: typing.Optional[typing.List[GoHighLevelCalendarAvailabilityToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolsResponse_GohighlevelCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.event.create"] = "gohighlevel.calendar.event.create" + messages: typing.Optional[typing.List[GoHighLevelCalendarEventCreateToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolsResponse_GohighlevelContactCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.create"] = "gohighlevel.contact.create" + messages: typing.Optional[typing.List[GoHighLevelContactCreateToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolsResponse_GohighlevelContactGet(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.get"] = "gohighlevel.contact.get" + messages: typing.Optional[typing.List[GoHighLevelContactGetToolMessagesItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolsResponse_SipRequest(UncheckedBaseModel): + type: typing.Literal["sipRequest"] = "sipRequest" + messages: typing.Optional[typing.List[SipRequestToolMessagesItem]] = None + verb: SipRequestToolVerb + headers: typing.Optional["JsonSchema"] = None + body: typing.Optional[SipRequestToolBody] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolsResponse_Voicemail(UncheckedBaseModel): + type: typing.Literal["voicemail"] = "voicemail" + messages: typing.Optional[typing.List[VoicemailToolMessagesItem]] = None + beep_detection_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="beepDetectionEnabled"), pydantic.Field(alias="beepDetectionEnabled") + ] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateToolsResponse = typing_extensions.Annotated[ + typing.Union[ + UpdateToolsResponse_ApiRequest, + UpdateToolsResponse_Code, + UpdateToolsResponse_Dtmf, + UpdateToolsResponse_EndCall, + UpdateToolsResponse_Function, + UpdateToolsResponse_TransferCall, + UpdateToolsResponse_Handoff, + UpdateToolsResponse_Bash, + UpdateToolsResponse_Computer, + UpdateToolsResponse_TextEditor, + UpdateToolsResponse_Query, + UpdateToolsResponse_GoogleCalendarEventCreate, + UpdateToolsResponse_GoogleSheetsRowAppend, + UpdateToolsResponse_GoogleCalendarAvailabilityCheck, + UpdateToolsResponse_SlackMessageSend, + UpdateToolsResponse_Sms, + UpdateToolsResponse_Mcp, + UpdateToolsResponse_GohighlevelCalendarAvailabilityCheck, + UpdateToolsResponse_GohighlevelCalendarEventCreate, + UpdateToolsResponse_GohighlevelContactCreate, + UpdateToolsResponse_GohighlevelContactGet, + UpdateToolsResponse_SipRequest, + UpdateToolsResponse_Voicemail, + ], + UnionMetadata(discriminant="type"), +] +from ...types.json_schema import JsonSchema # noqa: E402, I001 + +update_forward_refs(UpdateToolsResponse_ApiRequest, JsonSchema=JsonSchema) +update_forward_refs(UpdateToolsResponse_Code) +update_forward_refs(UpdateToolsResponse_Dtmf) +update_forward_refs(UpdateToolsResponse_EndCall) +update_forward_refs(UpdateToolsResponse_Function) +update_forward_refs(UpdateToolsResponse_TransferCall) +update_forward_refs(UpdateToolsResponse_Handoff) +update_forward_refs(UpdateToolsResponse_Bash) +update_forward_refs(UpdateToolsResponse_Computer) +update_forward_refs(UpdateToolsResponse_TextEditor) +update_forward_refs(UpdateToolsResponse_Query) +update_forward_refs(UpdateToolsResponse_GoogleCalendarEventCreate) +update_forward_refs(UpdateToolsResponse_GoogleSheetsRowAppend) +update_forward_refs(UpdateToolsResponse_GoogleCalendarAvailabilityCheck) +update_forward_refs(UpdateToolsResponse_SlackMessageSend) +update_forward_refs(UpdateToolsResponse_Sms) +update_forward_refs(UpdateToolsResponse_Mcp) +update_forward_refs(UpdateToolsResponse_GohighlevelCalendarAvailabilityCheck) +update_forward_refs(UpdateToolsResponse_GohighlevelCalendarEventCreate) +update_forward_refs(UpdateToolsResponse_GohighlevelContactCreate) +update_forward_refs(UpdateToolsResponse_GohighlevelContactGet) +update_forward_refs(UpdateToolsResponse_SipRequest, JsonSchema=JsonSchema) +update_forward_refs(UpdateToolsResponse_Voicemail) diff --git a/src/vapi/types/__init__.py b/src/vapi/types/__init__.py index 65f41cde..d2268c25 100644 --- a/src/vapi/types/__init__.py +++ b/src/vapi/types/__init__.py @@ -1,504 +1,9076 @@ # This file was auto-generated by Fern from our API Definition. -from .add_voice_to_provider_dto import AddVoiceToProviderDto -from .analysis import Analysis -from .analysis_cost import AnalysisCost -from .analysis_cost_analysis_type import AnalysisCostAnalysisType -from .analysis_cost_breakdown import AnalysisCostBreakdown -from .analysis_plan import AnalysisPlan -from .analytics_operation import AnalyticsOperation -from .analytics_operation_column import AnalyticsOperationColumn -from .analytics_operation_operation import AnalyticsOperationOperation -from .analytics_query import AnalyticsQuery -from .analytics_query_group_by_item import AnalyticsQueryGroupByItem -from .analytics_query_result import AnalyticsQueryResult -from .anthropic_credential import AnthropicCredential -from .anthropic_model import AnthropicModel -from .anthropic_model_model import AnthropicModelModel -from .anthropic_model_tools_item import AnthropicModelToolsItem -from .anyscale_credential import AnyscaleCredential -from .anyscale_model import AnyscaleModel -from .anyscale_model_tools_item import AnyscaleModelToolsItem -from .artifact import Artifact -from .artifact_messages_item import ArtifactMessagesItem -from .artifact_plan import ArtifactPlan -from .assignment_mutation import AssignmentMutation -from .assignment_mutation_conditions_item import AssignmentMutationConditionsItem -from .assistant import Assistant -from .assistant_background_sound import AssistantBackgroundSound -from .assistant_client_messages_item import AssistantClientMessagesItem -from .assistant_first_message_mode import AssistantFirstMessageMode -from .assistant_model import AssistantModel -from .assistant_overrides import AssistantOverrides -from .assistant_overrides_background_sound import AssistantOverridesBackgroundSound -from .assistant_overrides_client_messages_item import AssistantOverridesClientMessagesItem -from .assistant_overrides_first_message_mode import AssistantOverridesFirstMessageMode -from .assistant_overrides_model import AssistantOverridesModel -from .assistant_overrides_server_messages_item import AssistantOverridesServerMessagesItem -from .assistant_overrides_transcriber import AssistantOverridesTranscriber -from .assistant_overrides_voice import AssistantOverridesVoice -from .assistant_server_messages_item import AssistantServerMessagesItem -from .assistant_transcriber import AssistantTranscriber -from .assistant_voice import AssistantVoice -from .azure_open_ai_credential import AzureOpenAiCredential -from .azure_open_ai_credential_models_item import AzureOpenAiCredentialModelsItem -from .azure_open_ai_credential_region import AzureOpenAiCredentialRegion -from .azure_voice import AzureVoice -from .azure_voice_id import AzureVoiceId -from .azure_voice_id_enum import AzureVoiceIdEnum -from .block_complete_message import BlockCompleteMessage -from .block_complete_message_conditions_item import BlockCompleteMessageConditionsItem -from .block_start_message import BlockStartMessage -from .block_start_message_conditions_item import BlockStartMessageConditionsItem -from .bot_message import BotMessage -from .bucket_plan import BucketPlan -from .buy_phone_number_dto import BuyPhoneNumberDto -from .buy_phone_number_dto_fallback_destination import BuyPhoneNumberDtoFallbackDestination -from .byo_phone_number import ByoPhoneNumber -from .byo_phone_number_fallback_destination import ByoPhoneNumberFallbackDestination -from .byo_sip_trunk_credential import ByoSipTrunkCredential -from .call import Call -from .call_costs_item import CallCostsItem -from .call_destination import CallDestination -from .call_ended_reason import CallEndedReason -from .call_messages_item import CallMessagesItem -from .call_paginated_response import CallPaginatedResponse -from .call_phone_call_provider import CallPhoneCallProvider -from .call_phone_call_transport import CallPhoneCallTransport -from .call_status import CallStatus -from .call_type import CallType -from .callback_step import CallbackStep -from .callback_step_block import CallbackStepBlock -from .cartesia_credential import CartesiaCredential -from .cartesia_voice import CartesiaVoice -from .cartesia_voice_language import CartesiaVoiceLanguage -from .cartesia_voice_model import CartesiaVoiceModel -from .chunk_plan import ChunkPlan -from .client_inbound_message import ClientInboundMessage -from .client_inbound_message_add_message import ClientInboundMessageAddMessage -from .client_inbound_message_control import ClientInboundMessageControl -from .client_inbound_message_control_control import ClientInboundMessageControlControl -from .client_inbound_message_message import ClientInboundMessageMessage -from .client_inbound_message_say import ClientInboundMessageSay -from .client_message import ClientMessage -from .client_message_conversation_update import ClientMessageConversationUpdate -from .client_message_conversation_update_messages_item import ClientMessageConversationUpdateMessagesItem -from .client_message_hang import ClientMessageHang -from .client_message_language_changed import ClientMessageLanguageChanged -from .client_message_message import ClientMessageMessage -from .client_message_metadata import ClientMessageMetadata -from .client_message_model_output import ClientMessageModelOutput -from .client_message_speech_update import ClientMessageSpeechUpdate -from .client_message_speech_update_role import ClientMessageSpeechUpdateRole -from .client_message_speech_update_status import ClientMessageSpeechUpdateStatus -from .client_message_tool_calls import ClientMessageToolCalls -from .client_message_tool_calls_result import ClientMessageToolCallsResult -from .client_message_tool_calls_tool_with_tool_call_list_item import ClientMessageToolCallsToolWithToolCallListItem -from .client_message_transcript import ClientMessageTranscript -from .client_message_transcript_role import ClientMessageTranscriptRole -from .client_message_transcript_transcript_type import ClientMessageTranscriptTranscriptType -from .client_message_user_interrupted import ClientMessageUserInterrupted -from .client_message_voice_input import ClientMessageVoiceInput -from .clone_voice_dto import CloneVoiceDto -from .condition import Condition -from .condition_operator import ConditionOperator -from .conversation_block import ConversationBlock -from .conversation_block_messages_item import ConversationBlockMessagesItem -from .cost_breakdown import CostBreakdown -from .create_anthropic_credential_dto import CreateAnthropicCredentialDto -from .create_anyscale_credential_dto import CreateAnyscaleCredentialDto -from .create_assistant_dto import CreateAssistantDto -from .create_assistant_dto_background_sound import CreateAssistantDtoBackgroundSound -from .create_assistant_dto_client_messages_item import CreateAssistantDtoClientMessagesItem -from .create_assistant_dto_first_message_mode import CreateAssistantDtoFirstMessageMode -from .create_assistant_dto_model import CreateAssistantDtoModel -from .create_assistant_dto_server_messages_item import CreateAssistantDtoServerMessagesItem -from .create_assistant_dto_transcriber import CreateAssistantDtoTranscriber -from .create_assistant_dto_voice import CreateAssistantDtoVoice -from .create_azure_open_ai_credential_dto import CreateAzureOpenAiCredentialDto -from .create_azure_open_ai_credential_dto_models_item import CreateAzureOpenAiCredentialDtoModelsItem -from .create_azure_open_ai_credential_dto_region import CreateAzureOpenAiCredentialDtoRegion -from .create_byo_phone_number_dto import CreateByoPhoneNumberDto -from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination -from .create_byo_sip_trunk_credential_dto import CreateByoSipTrunkCredentialDto -from .create_cartesia_credential_dto import CreateCartesiaCredentialDto -from .create_conversation_block_dto import CreateConversationBlockDto -from .create_conversation_block_dto_messages_item import CreateConversationBlockDtoMessagesItem -from .create_custom_llm_credential_dto import CreateCustomLlmCredentialDto -from .create_customer_dto import CreateCustomerDto -from .create_deep_infra_credential_dto import CreateDeepInfraCredentialDto -from .create_deepgram_credential_dto import CreateDeepgramCredentialDto -from .create_dtmf_tool_dto import CreateDtmfToolDto -from .create_dtmf_tool_dto_messages_item import CreateDtmfToolDtoMessagesItem -from .create_eleven_labs_credential_dto import CreateElevenLabsCredentialDto -from .create_end_call_tool_dto import CreateEndCallToolDto -from .create_end_call_tool_dto_messages_item import CreateEndCallToolDtoMessagesItem -from .create_function_tool_dto import CreateFunctionToolDto -from .create_function_tool_dto_messages_item import CreateFunctionToolDtoMessagesItem -from .create_gcp_credential_dto import CreateGcpCredentialDto -from .create_ghl_tool_dto import CreateGhlToolDto -from .create_ghl_tool_dto_messages_item import CreateGhlToolDtoMessagesItem -from .create_gladia_credential_dto import CreateGladiaCredentialDto -from .create_go_high_level_credential_dto import CreateGoHighLevelCredentialDto -from .create_groq_credential_dto import CreateGroqCredentialDto -from .create_lmnt_credential_dto import CreateLmntCredentialDto -from .create_make_credential_dto import CreateMakeCredentialDto -from .create_make_tool_dto import CreateMakeToolDto -from .create_make_tool_dto_messages_item import CreateMakeToolDtoMessagesItem -from .create_open_ai_credential_dto import CreateOpenAiCredentialDto -from .create_open_router_credential_dto import CreateOpenRouterCredentialDto -from .create_org_dto import CreateOrgDto -from .create_outbound_call_dto import CreateOutboundCallDto -from .create_output_tool_dto import CreateOutputToolDto -from .create_output_tool_dto_messages_item import CreateOutputToolDtoMessagesItem -from .create_perplexity_ai_credential_dto import CreatePerplexityAiCredentialDto -from .create_play_ht_credential_dto import CreatePlayHtCredentialDto -from .create_rime_ai_credential_dto import CreateRimeAiCredentialDto -from .create_runpod_credential_dto import CreateRunpodCredentialDto -from .create_s_3_credential_dto import CreateS3CredentialDto -from .create_squad_dto import CreateSquadDto -from .create_together_ai_credential_dto import CreateTogetherAiCredentialDto -from .create_token_dto import CreateTokenDto -from .create_token_dto_tag import CreateTokenDtoTag -from .create_tool_call_block_dto import CreateToolCallBlockDto -from .create_tool_call_block_dto_messages_item import CreateToolCallBlockDtoMessagesItem -from .create_tool_call_block_dto_tool import CreateToolCallBlockDtoTool -from .create_tool_template_dto import CreateToolTemplateDto -from .create_tool_template_dto_details import CreateToolTemplateDtoDetails -from .create_tool_template_dto_provider import CreateToolTemplateDtoProvider -from .create_tool_template_dto_provider_details import CreateToolTemplateDtoProviderDetails -from .create_tool_template_dto_visibility import CreateToolTemplateDtoVisibility -from .create_transfer_call_tool_dto import CreateTransferCallToolDto -from .create_transfer_call_tool_dto_destinations_item import CreateTransferCallToolDtoDestinationsItem -from .create_transfer_call_tool_dto_messages_item import CreateTransferCallToolDtoMessagesItem -from .create_twilio_credential_dto import CreateTwilioCredentialDto -from .create_twilio_phone_number_dto import CreateTwilioPhoneNumberDto -from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination -from .create_vapi_phone_number_dto import CreateVapiPhoneNumberDto -from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination -from .create_voicemail_tool_dto import CreateVoicemailToolDto -from .create_voicemail_tool_dto_messages_item import CreateVoicemailToolDtoMessagesItem -from .create_vonage_credential_dto import CreateVonageCredentialDto -from .create_vonage_phone_number_dto import CreateVonagePhoneNumberDto -from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination -from .create_web_call_dto import CreateWebCallDto -from .create_workflow_block_dto import CreateWorkflowBlockDto -from .create_workflow_block_dto_messages_item import CreateWorkflowBlockDtoMessagesItem -from .create_workflow_block_dto_steps_item import CreateWorkflowBlockDtoStepsItem -from .custom_llm_credential import CustomLlmCredential -from .custom_llm_model import CustomLlmModel -from .custom_llm_model_metadata_send_mode import CustomLlmModelMetadataSendMode -from .custom_llm_model_tools_item import CustomLlmModelToolsItem -from .deep_infra_credential import DeepInfraCredential -from .deep_infra_model import DeepInfraModel -from .deep_infra_model_tools_item import DeepInfraModelToolsItem -from .deepgram_credential import DeepgramCredential -from .deepgram_transcriber import DeepgramTranscriber -from .deepgram_transcriber_language import DeepgramTranscriberLanguage -from .deepgram_transcriber_model import DeepgramTranscriberModel -from .deepgram_voice import DeepgramVoice -from .deepgram_voice_id import DeepgramVoiceId -from .deepgram_voice_id_enum import DeepgramVoiceIdEnum -from .dtmf_tool import DtmfTool -from .dtmf_tool_messages_item import DtmfToolMessagesItem -from .eleven_labs_credential import ElevenLabsCredential -from .eleven_labs_voice import ElevenLabsVoice -from .eleven_labs_voice_id import ElevenLabsVoiceId -from .eleven_labs_voice_id_enum import ElevenLabsVoiceIdEnum -from .eleven_labs_voice_model import ElevenLabsVoiceModel -from .end_call_tool import EndCallTool -from .end_call_tool_messages_item import EndCallToolMessagesItem -from .error import Error -from .exact_replacement import ExactReplacement -from .file import File -from .file_status import FileStatus -from .format_plan import FormatPlan -from .format_plan_replacements_item import FormatPlanReplacementsItem -from .function_tool import FunctionTool -from .function_tool_messages_item import FunctionToolMessagesItem -from .function_tool_provider_details import FunctionToolProviderDetails -from .function_tool_with_tool_call import FunctionToolWithToolCall -from .function_tool_with_tool_call_messages_item import FunctionToolWithToolCallMessagesItem -from .gcp_credential import GcpCredential -from .gcp_key import GcpKey -from .ghl_tool import GhlTool -from .ghl_tool_messages_item import GhlToolMessagesItem -from .ghl_tool_metadata import GhlToolMetadata -from .ghl_tool_provider_details import GhlToolProviderDetails -from .ghl_tool_with_tool_call import GhlToolWithToolCall -from .ghl_tool_with_tool_call_messages_item import GhlToolWithToolCallMessagesItem -from .gladia_credential import GladiaCredential -from .gladia_transcriber import GladiaTranscriber -from .gladia_transcriber_language import GladiaTranscriberLanguage -from .gladia_transcriber_language_behaviour import GladiaTranscriberLanguageBehaviour -from .gladia_transcriber_model import GladiaTranscriberModel -from .go_high_level_credential import GoHighLevelCredential -from .groq_credential import GroqCredential -from .groq_model import GroqModel -from .groq_model_model import GroqModelModel -from .groq_model_tools_item import GroqModelToolsItem -from .handoff_step import HandoffStep -from .handoff_step_block import HandoffStepBlock -from .import_twilio_phone_number_dto import ImportTwilioPhoneNumberDto -from .import_twilio_phone_number_dto_fallback_destination import ImportTwilioPhoneNumberDtoFallbackDestination -from .import_vonage_phone_number_dto import ImportVonagePhoneNumberDto -from .import_vonage_phone_number_dto_fallback_destination import ImportVonagePhoneNumberDtoFallbackDestination -from .invite_user_dto import InviteUserDto -from .invite_user_dto_role import InviteUserDtoRole -from .json_schema import JsonSchema -from .json_schema_type import JsonSchemaType -from .knowledge_base import KnowledgeBase -from .lmnt_credential import LmntCredential -from .lmnt_voice import LmntVoice -from .lmnt_voice_id import LmntVoiceId -from .lmnt_voice_id_enum import LmntVoiceIdEnum -from .log import Log -from .log_request_http_method import LogRequestHttpMethod -from .log_resource import LogResource -from .log_type import LogType -from .logs_paginated_response import LogsPaginatedResponse -from .make_credential import MakeCredential -from .make_tool import MakeTool -from .make_tool_messages_item import MakeToolMessagesItem -from .make_tool_metadata import MakeToolMetadata -from .make_tool_provider_details import MakeToolProviderDetails -from .make_tool_with_tool_call import MakeToolWithToolCall -from .make_tool_with_tool_call_messages_item import MakeToolWithToolCallMessagesItem -from .message_plan import MessagePlan -from .metrics import Metrics -from .model_based_condition import ModelBasedCondition -from .model_cost import ModelCost -from .monitor import Monitor -from .monitor_plan import MonitorPlan -from .neets_voice import NeetsVoice -from .neets_voice_id import NeetsVoiceId -from .neets_voice_id_enum import NeetsVoiceIdEnum -from .open_ai_credential import OpenAiCredential -from .open_ai_function import OpenAiFunction -from .open_ai_function_parameters import OpenAiFunctionParameters -from .open_ai_message import OpenAiMessage -from .open_ai_message_role import OpenAiMessageRole -from .open_ai_model import OpenAiModel -from .open_ai_model_fallback_models_item import OpenAiModelFallbackModelsItem -from .open_ai_model_model import OpenAiModelModel -from .open_ai_model_tools_item import OpenAiModelToolsItem -from .open_ai_voice import OpenAiVoice -from .open_ai_voice_id import OpenAiVoiceId -from .open_router_credential import OpenRouterCredential -from .open_router_model import OpenRouterModel -from .open_router_model_tools_item import OpenRouterModelToolsItem -from .org import Org -from .org_plan import OrgPlan -from .output_tool import OutputTool -from .output_tool_messages_item import OutputToolMessagesItem -from .pagination_meta import PaginationMeta -from .perplexity_ai_credential import PerplexityAiCredential -from .perplexity_ai_model import PerplexityAiModel -from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem -from .play_ht_credential import PlayHtCredential -from .play_ht_voice import PlayHtVoice -from .play_ht_voice_emotion import PlayHtVoiceEmotion -from .play_ht_voice_id import PlayHtVoiceId -from .play_ht_voice_id_enum import PlayHtVoiceIdEnum -from .punctuation_boundary import PunctuationBoundary -from .regex_option import RegexOption -from .regex_option_type import RegexOptionType -from .regex_replacement import RegexReplacement -from .rime_ai_credential import RimeAiCredential -from .rime_ai_voice import RimeAiVoice -from .rime_ai_voice_id import RimeAiVoiceId -from .rime_ai_voice_id_enum import RimeAiVoiceIdEnum -from .rime_ai_voice_model import RimeAiVoiceModel -from .rule_based_condition import RuleBasedCondition -from .rule_based_condition_operator import RuleBasedConditionOperator -from .runpod_credential import RunpodCredential -from .s_3_credential import S3Credential -from .sbc_configuration import SbcConfiguration -from .server import Server -from .server_message import ServerMessage -from .server_message_assistant_request import ServerMessageAssistantRequest -from .server_message_assistant_request_phone_number import ServerMessageAssistantRequestPhoneNumber -from .server_message_conversation_update import ServerMessageConversationUpdate -from .server_message_conversation_update_messages_item import ServerMessageConversationUpdateMessagesItem -from .server_message_conversation_update_phone_number import ServerMessageConversationUpdatePhoneNumber -from .server_message_end_of_call_report import ServerMessageEndOfCallReport -from .server_message_end_of_call_report_costs_item import ServerMessageEndOfCallReportCostsItem -from .server_message_end_of_call_report_ended_reason import ServerMessageEndOfCallReportEndedReason -from .server_message_end_of_call_report_phone_number import ServerMessageEndOfCallReportPhoneNumber -from .server_message_hang import ServerMessageHang -from .server_message_hang_phone_number import ServerMessageHangPhoneNumber -from .server_message_language_changed import ServerMessageLanguageChanged -from .server_message_language_changed_phone_number import ServerMessageLanguageChangedPhoneNumber -from .server_message_message import ServerMessageMessage -from .server_message_model_output import ServerMessageModelOutput -from .server_message_model_output_phone_number import ServerMessageModelOutputPhoneNumber -from .server_message_phone_call_control import ServerMessagePhoneCallControl -from .server_message_phone_call_control_destination import ServerMessagePhoneCallControlDestination -from .server_message_phone_call_control_phone_number import ServerMessagePhoneCallControlPhoneNumber -from .server_message_phone_call_control_request import ServerMessagePhoneCallControlRequest -from .server_message_response import ServerMessageResponse -from .server_message_response_assistant_request import ServerMessageResponseAssistantRequest -from .server_message_response_assistant_request_destination import ServerMessageResponseAssistantRequestDestination -from .server_message_response_message_response import ServerMessageResponseMessageResponse -from .server_message_response_tool_calls import ServerMessageResponseToolCalls -from .server_message_response_transfer_destination_request import ServerMessageResponseTransferDestinationRequest -from .server_message_response_transfer_destination_request_destination import ( - ServerMessageResponseTransferDestinationRequestDestination, -) -from .server_message_response_voice_request import ServerMessageResponseVoiceRequest -from .server_message_speech_update import ServerMessageSpeechUpdate -from .server_message_speech_update_phone_number import ServerMessageSpeechUpdatePhoneNumber -from .server_message_speech_update_role import ServerMessageSpeechUpdateRole -from .server_message_speech_update_status import ServerMessageSpeechUpdateStatus -from .server_message_status_update import ServerMessageStatusUpdate -from .server_message_status_update_destination import ServerMessageStatusUpdateDestination -from .server_message_status_update_ended_reason import ServerMessageStatusUpdateEndedReason -from .server_message_status_update_messages_item import ServerMessageStatusUpdateMessagesItem -from .server_message_status_update_phone_number import ServerMessageStatusUpdatePhoneNumber -from .server_message_status_update_status import ServerMessageStatusUpdateStatus -from .server_message_tool_calls import ServerMessageToolCalls -from .server_message_tool_calls_phone_number import ServerMessageToolCallsPhoneNumber -from .server_message_tool_calls_tool_with_tool_call_list_item import ServerMessageToolCallsToolWithToolCallListItem -from .server_message_transcript import ServerMessageTranscript -from .server_message_transcript_phone_number import ServerMessageTranscriptPhoneNumber -from .server_message_transcript_role import ServerMessageTranscriptRole -from .server_message_transcript_transcript_type import ServerMessageTranscriptTranscriptType -from .server_message_transfer_destination_request import ServerMessageTransferDestinationRequest -from .server_message_transfer_destination_request_phone_number import ServerMessageTransferDestinationRequestPhoneNumber -from .server_message_transfer_update import ServerMessageTransferUpdate -from .server_message_transfer_update_destination import ServerMessageTransferUpdateDestination -from .server_message_transfer_update_phone_number import ServerMessageTransferUpdatePhoneNumber -from .server_message_user_interrupted import ServerMessageUserInterrupted -from .server_message_user_interrupted_phone_number import ServerMessageUserInterruptedPhoneNumber -from .server_message_voice_input import ServerMessageVoiceInput -from .server_message_voice_input_phone_number import ServerMessageVoiceInputPhoneNumber -from .server_message_voice_request import ServerMessageVoiceRequest -from .server_message_voice_request_phone_number import ServerMessageVoiceRequestPhoneNumber -from .sip_trunk_gateway import SipTrunkGateway -from .sip_trunk_gateway_outbound_protocol import SipTrunkGatewayOutboundProtocol -from .sip_trunk_outbound_authentication_plan import SipTrunkOutboundAuthenticationPlan -from .sip_trunk_outbound_sip_register_plan import SipTrunkOutboundSipRegisterPlan -from .squad import Squad -from .squad_member_dto import SquadMemberDto -from .start_speaking_plan import StartSpeakingPlan -from .step_destination import StepDestination -from .step_destination_conditions_item import StepDestinationConditionsItem -from .stop_speaking_plan import StopSpeakingPlan -from .structured_data_plan import StructuredDataPlan -from .success_evaluation_plan import SuccessEvaluationPlan -from .success_evaluation_plan_rubric import SuccessEvaluationPlanRubric -from .summary_plan import SummaryPlan -from .sync_voice_library_dto import SyncVoiceLibraryDto -from .sync_voice_library_dto_providers_item import SyncVoiceLibraryDtoProvidersItem -from .system_message import SystemMessage -from .talkscriber_transcriber import TalkscriberTranscriber -from .talkscriber_transcriber_language import TalkscriberTranscriberLanguage -from .template import Template -from .template_details import TemplateDetails -from .template_provider import TemplateProvider -from .template_provider_details import TemplateProviderDetails -from .template_visibility import TemplateVisibility -from .time_range import TimeRange -from .time_range_step import TimeRangeStep -from .together_ai_credential import TogetherAiCredential -from .together_ai_model import TogetherAiModel -from .together_ai_model_tools_item import TogetherAiModelToolsItem -from .token import Token -from .token_restrictions import TokenRestrictions -from .token_tag import TokenTag -from .tool_call import ToolCall -from .tool_call_block import ToolCallBlock -from .tool_call_block_messages_item import ToolCallBlockMessagesItem -from .tool_call_block_tool import ToolCallBlockTool -from .tool_call_function import ToolCallFunction -from .tool_call_message import ToolCallMessage -from .tool_call_result import ToolCallResult -from .tool_call_result_message import ToolCallResultMessage -from .tool_call_result_message_item import ToolCallResultMessageItem -from .tool_message_complete import ToolMessageComplete -from .tool_message_complete_role import ToolMessageCompleteRole -from .tool_message_delayed import ToolMessageDelayed -from .tool_message_failed import ToolMessageFailed -from .tool_message_start import ToolMessageStart -from .tool_template_metadata import ToolTemplateMetadata -from .tool_template_setup import ToolTemplateSetup -from .transcriber_cost import TranscriberCost -from .transcript_plan import TranscriptPlan -from .transcription_endpointing_plan import TranscriptionEndpointingPlan -from .transfer_call_tool import TransferCallTool -from .transfer_call_tool_destinations_item import TransferCallToolDestinationsItem -from .transfer_call_tool_messages_item import TransferCallToolMessagesItem -from .transfer_destination_assistant import TransferDestinationAssistant -from .transfer_destination_number import TransferDestinationNumber -from .transfer_destination_sip import TransferDestinationSip -from .transfer_destination_step import TransferDestinationStep -from .transfer_mode import TransferMode -from .transport_configuration_twilio import TransportConfigurationTwilio -from .transport_configuration_twilio_recording_channels import TransportConfigurationTwilioRecordingChannels -from .transport_cost import TransportCost -from .twilio_credential import TwilioCredential -from .twilio_phone_number import TwilioPhoneNumber -from .twilio_phone_number_fallback_destination import TwilioPhoneNumberFallbackDestination -from .twilio_voicemail_detection import TwilioVoicemailDetection -from .twilio_voicemail_detection_voicemail_detection_types_item import ( - TwilioVoicemailDetectionVoicemailDetectionTypesItem, -) -from .update_anthropic_credential_dto import UpdateAnthropicCredentialDto -from .update_anyscale_credential_dto import UpdateAnyscaleCredentialDto -from .update_azure_open_ai_credential_dto import UpdateAzureOpenAiCredentialDto -from .update_azure_open_ai_credential_dto_models_item import UpdateAzureOpenAiCredentialDtoModelsItem -from .update_azure_open_ai_credential_dto_region import UpdateAzureOpenAiCredentialDtoRegion -from .update_byo_sip_trunk_credential_dto import UpdateByoSipTrunkCredentialDto -from .update_cartesia_credential_dto import UpdateCartesiaCredentialDto -from .update_custom_llm_credential_dto import UpdateCustomLlmCredentialDto -from .update_deep_infra_credential_dto import UpdateDeepInfraCredentialDto -from .update_deepgram_credential_dto import UpdateDeepgramCredentialDto -from .update_eleven_labs_credential_dto import UpdateElevenLabsCredentialDto -from .update_gcp_credential_dto import UpdateGcpCredentialDto -from .update_gladia_credential_dto import UpdateGladiaCredentialDto -from .update_go_high_level_credential_dto import UpdateGoHighLevelCredentialDto -from .update_groq_credential_dto import UpdateGroqCredentialDto -from .update_lmnt_credential_dto import UpdateLmntCredentialDto -from .update_make_credential_dto import UpdateMakeCredentialDto -from .update_open_ai_credential_dto import UpdateOpenAiCredentialDto -from .update_open_router_credential_dto import UpdateOpenRouterCredentialDto -from .update_org_dto import UpdateOrgDto -from .update_perplexity_ai_credential_dto import UpdatePerplexityAiCredentialDto -from .update_play_ht_credential_dto import UpdatePlayHtCredentialDto -from .update_rime_ai_credential_dto import UpdateRimeAiCredentialDto -from .update_runpod_credential_dto import UpdateRunpodCredentialDto -from .update_s_3_credential_dto import UpdateS3CredentialDto -from .update_together_ai_credential_dto import UpdateTogetherAiCredentialDto -from .update_tool_template_dto import UpdateToolTemplateDto -from .update_tool_template_dto_details import UpdateToolTemplateDtoDetails -from .update_tool_template_dto_provider import UpdateToolTemplateDtoProvider -from .update_tool_template_dto_provider_details import UpdateToolTemplateDtoProviderDetails -from .update_tool_template_dto_visibility import UpdateToolTemplateDtoVisibility -from .update_twilio_credential_dto import UpdateTwilioCredentialDto -from .update_user_role_dto import UpdateUserRoleDto -from .update_user_role_dto_role import UpdateUserRoleDtoRole -from .update_vonage_credential_dto import UpdateVonageCredentialDto -from .user import User -from .user_message import UserMessage -from .vapi_cost import VapiCost -from .vapi_model import VapiModel -from .vapi_model_steps_item import VapiModelStepsItem -from .vapi_model_tools_item import VapiModelToolsItem -from .vapi_phone_number import VapiPhoneNumber -from .vapi_phone_number_fallback_destination import VapiPhoneNumberFallbackDestination -from .voice_cost import VoiceCost -from .voice_library import VoiceLibrary -from .voice_library_gender import VoiceLibraryGender -from .voice_library_voice_response import VoiceLibraryVoiceResponse -from .vonage_credential import VonageCredential -from .vonage_phone_number import VonagePhoneNumber -from .vonage_phone_number_fallback_destination import VonagePhoneNumberFallbackDestination -from .workflow_block import WorkflowBlock -from .workflow_block_messages_item import WorkflowBlockMessagesItem -from .workflow_block_steps_item import WorkflowBlockStepsItem +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .add_voice_to_provider_dto import AddVoiceToProviderDto + from .ai_edge_condition import AiEdgeCondition + from .ai_edge_condition_type import AiEdgeConditionType + from .analysis import Analysis + from .analysis_cost import AnalysisCost + from .analysis_cost_analysis_type import AnalysisCostAnalysisType + from .analysis_cost_breakdown import AnalysisCostBreakdown + from .analysis_plan import AnalysisPlan + from .analytics_operation import AnalyticsOperation + from .analytics_operation_column import AnalyticsOperationColumn + from .analytics_operation_operation import AnalyticsOperationOperation + from .analytics_query import AnalyticsQuery + from .analytics_query_group_by_item import AnalyticsQueryGroupByItem + from .analytics_query_result import AnalyticsQueryResult + from .analytics_query_table import AnalyticsQueryTable + from .anthropic_bedrock_credential import AnthropicBedrockCredential + from .anthropic_bedrock_credential_authentication_plan import ( + AnthropicBedrockCredentialAuthenticationPlan, + AnthropicBedrockCredentialAuthenticationPlan_AwsIam, + AnthropicBedrockCredentialAuthenticationPlan_AwsSts, + ) + from .anthropic_bedrock_credential_provider import AnthropicBedrockCredentialProvider + from .anthropic_bedrock_credential_region import AnthropicBedrockCredentialRegion + from .anthropic_bedrock_model import AnthropicBedrockModel + from .anthropic_bedrock_model_model import AnthropicBedrockModelModel + from .anthropic_bedrock_model_tools_item import ( + AnthropicBedrockModelToolsItem, + AnthropicBedrockModelToolsItem_ApiRequest, + AnthropicBedrockModelToolsItem_Bash, + AnthropicBedrockModelToolsItem_Code, + AnthropicBedrockModelToolsItem_Computer, + AnthropicBedrockModelToolsItem_Dtmf, + AnthropicBedrockModelToolsItem_EndCall, + AnthropicBedrockModelToolsItem_Function, + AnthropicBedrockModelToolsItem_GohighlevelCalendarAvailabilityCheck, + AnthropicBedrockModelToolsItem_GohighlevelCalendarEventCreate, + AnthropicBedrockModelToolsItem_GohighlevelContactCreate, + AnthropicBedrockModelToolsItem_GohighlevelContactGet, + AnthropicBedrockModelToolsItem_GoogleCalendarAvailabilityCheck, + AnthropicBedrockModelToolsItem_GoogleCalendarEventCreate, + AnthropicBedrockModelToolsItem_GoogleSheetsRowAppend, + AnthropicBedrockModelToolsItem_Handoff, + AnthropicBedrockModelToolsItem_Mcp, + AnthropicBedrockModelToolsItem_Query, + AnthropicBedrockModelToolsItem_SipRequest, + AnthropicBedrockModelToolsItem_SlackMessageSend, + AnthropicBedrockModelToolsItem_Sms, + AnthropicBedrockModelToolsItem_TextEditor, + AnthropicBedrockModelToolsItem_TransferCall, + AnthropicBedrockModelToolsItem_Voicemail, + ) + from .anthropic_credential import AnthropicCredential + from .anthropic_credential_provider import AnthropicCredentialProvider + from .anthropic_model import AnthropicModel + from .anthropic_model_model import AnthropicModelModel + from .anthropic_model_tools_item import ( + AnthropicModelToolsItem, + AnthropicModelToolsItem_ApiRequest, + AnthropicModelToolsItem_Bash, + AnthropicModelToolsItem_Code, + AnthropicModelToolsItem_Computer, + AnthropicModelToolsItem_Dtmf, + AnthropicModelToolsItem_EndCall, + AnthropicModelToolsItem_Function, + AnthropicModelToolsItem_GohighlevelCalendarAvailabilityCheck, + AnthropicModelToolsItem_GohighlevelCalendarEventCreate, + AnthropicModelToolsItem_GohighlevelContactCreate, + AnthropicModelToolsItem_GohighlevelContactGet, + AnthropicModelToolsItem_GoogleCalendarAvailabilityCheck, + AnthropicModelToolsItem_GoogleCalendarEventCreate, + AnthropicModelToolsItem_GoogleSheetsRowAppend, + AnthropicModelToolsItem_Handoff, + AnthropicModelToolsItem_Mcp, + AnthropicModelToolsItem_Query, + AnthropicModelToolsItem_SipRequest, + AnthropicModelToolsItem_SlackMessageSend, + AnthropicModelToolsItem_Sms, + AnthropicModelToolsItem_TextEditor, + AnthropicModelToolsItem_TransferCall, + AnthropicModelToolsItem_Voicemail, + ) + from .anthropic_thinking_config import AnthropicThinkingConfig + from .anthropic_thinking_config_type import AnthropicThinkingConfigType + from .anyscale_credential import AnyscaleCredential + from .anyscale_credential_provider import AnyscaleCredentialProvider + from .anyscale_model import AnyscaleModel + from .anyscale_model_tools_item import ( + AnyscaleModelToolsItem, + AnyscaleModelToolsItem_ApiRequest, + AnyscaleModelToolsItem_Bash, + AnyscaleModelToolsItem_Code, + AnyscaleModelToolsItem_Computer, + AnyscaleModelToolsItem_Dtmf, + AnyscaleModelToolsItem_EndCall, + AnyscaleModelToolsItem_Function, + AnyscaleModelToolsItem_GohighlevelCalendarAvailabilityCheck, + AnyscaleModelToolsItem_GohighlevelCalendarEventCreate, + AnyscaleModelToolsItem_GohighlevelContactCreate, + AnyscaleModelToolsItem_GohighlevelContactGet, + AnyscaleModelToolsItem_GoogleCalendarAvailabilityCheck, + AnyscaleModelToolsItem_GoogleCalendarEventCreate, + AnyscaleModelToolsItem_GoogleSheetsRowAppend, + AnyscaleModelToolsItem_Handoff, + AnyscaleModelToolsItem_Mcp, + AnyscaleModelToolsItem_Query, + AnyscaleModelToolsItem_SipRequest, + AnyscaleModelToolsItem_SlackMessageSend, + AnyscaleModelToolsItem_Sms, + AnyscaleModelToolsItem_TextEditor, + AnyscaleModelToolsItem_TransferCall, + AnyscaleModelToolsItem_Voicemail, + ) + from .api_request_tool import ApiRequestTool + from .api_request_tool_messages_item import ( + ApiRequestToolMessagesItem, + ApiRequestToolMessagesItem_RequestComplete, + ApiRequestToolMessagesItem_RequestFailed, + ApiRequestToolMessagesItem_RequestResponseDelayed, + ApiRequestToolMessagesItem_RequestStart, + ) + from .api_request_tool_method import ApiRequestToolMethod + from .artifact import Artifact + from .artifact_messages_item import ArtifactMessagesItem + from .artifact_plan import ArtifactPlan + from .artifact_plan_recording_format import ArtifactPlanRecordingFormat + from .assembly_ai_credential import AssemblyAiCredential + from .assembly_ai_credential_provider import AssemblyAiCredentialProvider + from .assembly_ai_transcriber import AssemblyAiTranscriber + from .assembly_ai_transcriber_language import AssemblyAiTranscriberLanguage + from .assembly_ai_transcriber_speech_model import AssemblyAiTranscriberSpeechModel + from .assistant import Assistant + from .assistant_activation import AssistantActivation + from .assistant_background_sound import AssistantBackgroundSound + from .assistant_background_sound_zero import AssistantBackgroundSoundZero + from .assistant_client_messages_item import AssistantClientMessagesItem + from .assistant_credentials_item import ( + AssistantCredentialsItem, + AssistantCredentialsItem_11Labs, + AssistantCredentialsItem_Anthropic, + AssistantCredentialsItem_AnthropicBedrock, + AssistantCredentialsItem_Anyscale, + AssistantCredentialsItem_AssemblyAi, + AssistantCredentialsItem_Azure, + AssistantCredentialsItem_AzureOpenai, + AssistantCredentialsItem_ByoSipTrunk, + AssistantCredentialsItem_Cartesia, + AssistantCredentialsItem_Cerebras, + AssistantCredentialsItem_Cloudflare, + AssistantCredentialsItem_CustomCredential, + AssistantCredentialsItem_CustomLlm, + AssistantCredentialsItem_DeepSeek, + AssistantCredentialsItem_Deepgram, + AssistantCredentialsItem_Deepinfra, + AssistantCredentialsItem_Email, + AssistantCredentialsItem_Gcp, + AssistantCredentialsItem_GhlOauth2Authorization, + AssistantCredentialsItem_Gladia, + AssistantCredentialsItem_Gohighlevel, + AssistantCredentialsItem_Google, + AssistantCredentialsItem_GoogleCalendarOauth2Authorization, + AssistantCredentialsItem_GoogleCalendarOauth2Client, + AssistantCredentialsItem_GoogleSheetsOauth2Authorization, + AssistantCredentialsItem_Groq, + AssistantCredentialsItem_Hume, + AssistantCredentialsItem_InflectionAi, + AssistantCredentialsItem_Inworld, + AssistantCredentialsItem_Langfuse, + AssistantCredentialsItem_Lmnt, + AssistantCredentialsItem_Make, + AssistantCredentialsItem_Minimax, + AssistantCredentialsItem_Mistral, + AssistantCredentialsItem_Neuphonic, + AssistantCredentialsItem_Openai, + AssistantCredentialsItem_Openrouter, + AssistantCredentialsItem_PerplexityAi, + AssistantCredentialsItem_Playht, + AssistantCredentialsItem_RimeAi, + AssistantCredentialsItem_Runpod, + AssistantCredentialsItem_S3, + AssistantCredentialsItem_SlackOauth2Authorization, + AssistantCredentialsItem_SlackWebhook, + AssistantCredentialsItem_SmallestAi, + AssistantCredentialsItem_Soniox, + AssistantCredentialsItem_Speechmatics, + AssistantCredentialsItem_Supabase, + AssistantCredentialsItem_Tavus, + AssistantCredentialsItem_TogetherAi, + AssistantCredentialsItem_Trieve, + AssistantCredentialsItem_Twilio, + AssistantCredentialsItem_Vonage, + AssistantCredentialsItem_Webhook, + AssistantCredentialsItem_Wellsaid, + AssistantCredentialsItem_Xai, + ) + from .assistant_custom_endpointing_rule import AssistantCustomEndpointingRule + from .assistant_first_message_mode import AssistantFirstMessageMode + from .assistant_hook_assistant_speech_interrupted import AssistantHookAssistantSpeechInterrupted + from .assistant_hook_call_ending import AssistantHookCallEnding + from .assistant_hook_customer_speech_interrupted import AssistantHookCustomerSpeechInterrupted + from .assistant_hooks_item import AssistantHooksItem + from .assistant_message import AssistantMessage + from .assistant_message_evaluation_continue_plan import AssistantMessageEvaluationContinuePlan + from .assistant_message_judge_plan_ai import AssistantMessageJudgePlanAi + from .assistant_message_judge_plan_ai_model import ( + AssistantMessageJudgePlanAiModel, + AssistantMessageJudgePlanAiModel_Anthropic, + AssistantMessageJudgePlanAiModel_CustomLlm, + AssistantMessageJudgePlanAiModel_Google, + AssistantMessageJudgePlanAiModel_Openai, + ) + from .assistant_message_judge_plan_ai_type import AssistantMessageJudgePlanAiType + from .assistant_message_judge_plan_exact import AssistantMessageJudgePlanExact + from .assistant_message_judge_plan_regex import AssistantMessageJudgePlanRegex + from .assistant_message_role import AssistantMessageRole + from .assistant_model import ( + AssistantModel, + AssistantModel_Anthropic, + AssistantModel_AnthropicBedrock, + AssistantModel_Anyscale, + AssistantModel_Cerebras, + AssistantModel_CustomLlm, + AssistantModel_DeepSeek, + AssistantModel_Deepinfra, + AssistantModel_Google, + AssistantModel_Groq, + AssistantModel_InflectionAi, + AssistantModel_Minimax, + AssistantModel_Openai, + AssistantModel_Openrouter, + AssistantModel_PerplexityAi, + AssistantModel_TogetherAi, + AssistantModel_Xai, + ) + from .assistant_overrides import AssistantOverrides + from .assistant_overrides_background_sound import AssistantOverridesBackgroundSound + from .assistant_overrides_background_sound_zero import AssistantOverridesBackgroundSoundZero + from .assistant_overrides_client_messages_item import AssistantOverridesClientMessagesItem + from .assistant_overrides_credentials_item import ( + AssistantOverridesCredentialsItem, + AssistantOverridesCredentialsItem_11Labs, + AssistantOverridesCredentialsItem_Anthropic, + AssistantOverridesCredentialsItem_AnthropicBedrock, + AssistantOverridesCredentialsItem_Anyscale, + AssistantOverridesCredentialsItem_AssemblyAi, + AssistantOverridesCredentialsItem_Azure, + AssistantOverridesCredentialsItem_AzureOpenai, + AssistantOverridesCredentialsItem_ByoSipTrunk, + AssistantOverridesCredentialsItem_Cartesia, + AssistantOverridesCredentialsItem_Cerebras, + AssistantOverridesCredentialsItem_Cloudflare, + AssistantOverridesCredentialsItem_CustomCredential, + AssistantOverridesCredentialsItem_CustomLlm, + AssistantOverridesCredentialsItem_DeepSeek, + AssistantOverridesCredentialsItem_Deepgram, + AssistantOverridesCredentialsItem_Deepinfra, + AssistantOverridesCredentialsItem_Email, + AssistantOverridesCredentialsItem_Gcp, + AssistantOverridesCredentialsItem_GhlOauth2Authorization, + AssistantOverridesCredentialsItem_Gladia, + AssistantOverridesCredentialsItem_Gohighlevel, + AssistantOverridesCredentialsItem_Google, + AssistantOverridesCredentialsItem_GoogleCalendarOauth2Authorization, + AssistantOverridesCredentialsItem_GoogleCalendarOauth2Client, + AssistantOverridesCredentialsItem_GoogleSheetsOauth2Authorization, + AssistantOverridesCredentialsItem_Groq, + AssistantOverridesCredentialsItem_Hume, + AssistantOverridesCredentialsItem_InflectionAi, + AssistantOverridesCredentialsItem_Inworld, + AssistantOverridesCredentialsItem_Langfuse, + AssistantOverridesCredentialsItem_Lmnt, + AssistantOverridesCredentialsItem_Make, + AssistantOverridesCredentialsItem_Minimax, + AssistantOverridesCredentialsItem_Mistral, + AssistantOverridesCredentialsItem_Neuphonic, + AssistantOverridesCredentialsItem_Openai, + AssistantOverridesCredentialsItem_Openrouter, + AssistantOverridesCredentialsItem_PerplexityAi, + AssistantOverridesCredentialsItem_Playht, + AssistantOverridesCredentialsItem_RimeAi, + AssistantOverridesCredentialsItem_Runpod, + AssistantOverridesCredentialsItem_S3, + AssistantOverridesCredentialsItem_SlackOauth2Authorization, + AssistantOverridesCredentialsItem_SlackWebhook, + AssistantOverridesCredentialsItem_SmallestAi, + AssistantOverridesCredentialsItem_Soniox, + AssistantOverridesCredentialsItem_Speechmatics, + AssistantOverridesCredentialsItem_Supabase, + AssistantOverridesCredentialsItem_Tavus, + AssistantOverridesCredentialsItem_TogetherAi, + AssistantOverridesCredentialsItem_Trieve, + AssistantOverridesCredentialsItem_Twilio, + AssistantOverridesCredentialsItem_Vonage, + AssistantOverridesCredentialsItem_Webhook, + AssistantOverridesCredentialsItem_Wellsaid, + AssistantOverridesCredentialsItem_Xai, + ) + from .assistant_overrides_first_message_mode import AssistantOverridesFirstMessageMode + from .assistant_overrides_hooks_item import AssistantOverridesHooksItem + from .assistant_overrides_model import ( + AssistantOverridesModel, + AssistantOverridesModel_Anthropic, + AssistantOverridesModel_AnthropicBedrock, + AssistantOverridesModel_Anyscale, + AssistantOverridesModel_Cerebras, + AssistantOverridesModel_CustomLlm, + AssistantOverridesModel_DeepSeek, + AssistantOverridesModel_Deepinfra, + AssistantOverridesModel_Google, + AssistantOverridesModel_Groq, + AssistantOverridesModel_InflectionAi, + AssistantOverridesModel_Minimax, + AssistantOverridesModel_Openai, + AssistantOverridesModel_Openrouter, + AssistantOverridesModel_PerplexityAi, + AssistantOverridesModel_TogetherAi, + AssistantOverridesModel_Xai, + ) + from .assistant_overrides_server_messages_item import AssistantOverridesServerMessagesItem + from .assistant_overrides_tools_append_item import ( + AssistantOverridesToolsAppendItem, + AssistantOverridesToolsAppendItem_ApiRequest, + AssistantOverridesToolsAppendItem_Bash, + AssistantOverridesToolsAppendItem_Code, + AssistantOverridesToolsAppendItem_Computer, + AssistantOverridesToolsAppendItem_Dtmf, + AssistantOverridesToolsAppendItem_EndCall, + AssistantOverridesToolsAppendItem_Function, + AssistantOverridesToolsAppendItem_GohighlevelCalendarAvailabilityCheck, + AssistantOverridesToolsAppendItem_GohighlevelCalendarEventCreate, + AssistantOverridesToolsAppendItem_GohighlevelContactCreate, + AssistantOverridesToolsAppendItem_GohighlevelContactGet, + AssistantOverridesToolsAppendItem_GoogleCalendarAvailabilityCheck, + AssistantOverridesToolsAppendItem_GoogleCalendarEventCreate, + AssistantOverridesToolsAppendItem_GoogleSheetsRowAppend, + AssistantOverridesToolsAppendItem_Handoff, + AssistantOverridesToolsAppendItem_Mcp, + AssistantOverridesToolsAppendItem_Query, + AssistantOverridesToolsAppendItem_SipRequest, + AssistantOverridesToolsAppendItem_SlackMessageSend, + AssistantOverridesToolsAppendItem_Sms, + AssistantOverridesToolsAppendItem_TextEditor, + AssistantOverridesToolsAppendItem_TransferCall, + AssistantOverridesToolsAppendItem_Voicemail, + ) + from .assistant_overrides_transcriber import ( + AssistantOverridesTranscriber, + AssistantOverridesTranscriber_11Labs, + AssistantOverridesTranscriber_AssemblyAi, + AssistantOverridesTranscriber_Azure, + AssistantOverridesTranscriber_Cartesia, + AssistantOverridesTranscriber_CustomTranscriber, + AssistantOverridesTranscriber_Deepgram, + AssistantOverridesTranscriber_Gladia, + AssistantOverridesTranscriber_Google, + AssistantOverridesTranscriber_Openai, + AssistantOverridesTranscriber_Soniox, + AssistantOverridesTranscriber_Speechmatics, + AssistantOverridesTranscriber_Talkscriber, + ) + from .assistant_overrides_voice import ( + AssistantOverridesVoice, + AssistantOverridesVoice_11Labs, + AssistantOverridesVoice_Azure, + AssistantOverridesVoice_Cartesia, + AssistantOverridesVoice_CustomVoice, + AssistantOverridesVoice_Deepgram, + AssistantOverridesVoice_Hume, + AssistantOverridesVoice_Inworld, + AssistantOverridesVoice_Lmnt, + AssistantOverridesVoice_Minimax, + AssistantOverridesVoice_Neuphonic, + AssistantOverridesVoice_Openai, + AssistantOverridesVoice_Playht, + AssistantOverridesVoice_RimeAi, + AssistantOverridesVoice_Sesame, + AssistantOverridesVoice_SmallestAi, + AssistantOverridesVoice_Tavus, + AssistantOverridesVoice_Vapi, + AssistantOverridesVoice_Wellsaid, + ) + from .assistant_overrides_voicemail_detection import AssistantOverridesVoicemailDetection + from .assistant_overrides_voicemail_detection_zero import AssistantOverridesVoicemailDetectionZero + from .assistant_paginated_response import AssistantPaginatedResponse + from .assistant_server_messages_item import AssistantServerMessagesItem + from .assistant_speech_word_alignment_timing import AssistantSpeechWordAlignmentTiming + from .assistant_speech_word_progress_timing import AssistantSpeechWordProgressTiming + from .assistant_speech_word_timestamp import AssistantSpeechWordTimestamp + from .assistant_transcriber import ( + AssistantTranscriber, + AssistantTranscriber_11Labs, + AssistantTranscriber_AssemblyAi, + AssistantTranscriber_Azure, + AssistantTranscriber_Cartesia, + AssistantTranscriber_CustomTranscriber, + AssistantTranscriber_Deepgram, + AssistantTranscriber_Gladia, + AssistantTranscriber_Google, + AssistantTranscriber_Openai, + AssistantTranscriber_Soniox, + AssistantTranscriber_Speechmatics, + AssistantTranscriber_Talkscriber, + ) + from .assistant_user_editable import AssistantUserEditable + from .assistant_version_paginated_response import AssistantVersionPaginatedResponse + from .assistant_voice import ( + AssistantVoice, + AssistantVoice_11Labs, + AssistantVoice_Azure, + AssistantVoice_Cartesia, + AssistantVoice_CustomVoice, + AssistantVoice_Deepgram, + AssistantVoice_Hume, + AssistantVoice_Inworld, + AssistantVoice_Lmnt, + AssistantVoice_Minimax, + AssistantVoice_Neuphonic, + AssistantVoice_Openai, + AssistantVoice_Playht, + AssistantVoice_RimeAi, + AssistantVoice_Sesame, + AssistantVoice_SmallestAi, + AssistantVoice_Tavus, + AssistantVoice_Vapi, + AssistantVoice_Wellsaid, + ) + from .assistant_voicemail_detection import AssistantVoicemailDetection + from .assistant_voicemail_detection_zero import AssistantVoicemailDetectionZero + from .auto_reload_plan import AutoReloadPlan + from .aws_sts_assume_role_user import AwsStsAssumeRoleUser + from .aws_sts_authentication_artifact import AwsStsAuthenticationArtifact + from .aws_sts_authentication_plan import AwsStsAuthenticationPlan + from .aws_sts_authentication_session import AwsStsAuthenticationSession + from .aws_sts_credentials import AwsStsCredentials + from .awsiam_credentials_authentication_plan import AwsiamCredentialsAuthenticationPlan + from .azure_blob_storage_bucket_plan import AzureBlobStorageBucketPlan + from .azure_credential import AzureCredential + from .azure_credential_provider import AzureCredentialProvider + from .azure_credential_region import AzureCredentialRegion + from .azure_credential_service import AzureCredentialService + from .azure_open_ai_credential import AzureOpenAiCredential + from .azure_open_ai_credential_models_item import AzureOpenAiCredentialModelsItem + from .azure_open_ai_credential_provider import AzureOpenAiCredentialProvider + from .azure_open_ai_credential_region import AzureOpenAiCredentialRegion + from .azure_speech_transcriber import AzureSpeechTranscriber + from .azure_speech_transcriber_language import AzureSpeechTranscriberLanguage + from .azure_speech_transcriber_segmentation_strategy import AzureSpeechTranscriberSegmentationStrategy + from .azure_voice import AzureVoice + from .azure_voice_id import AzureVoiceId + from .azure_voice_id_enum import AzureVoiceIdEnum + from .background_speech_denoising_plan import BackgroundSpeechDenoisingPlan + from .backoff_plan import BackoffPlan + from .bar_insight import BarInsight + from .bar_insight_from_call_table import BarInsightFromCallTable + from .bar_insight_from_call_table_group_by import BarInsightFromCallTableGroupBy + from .bar_insight_from_call_table_queries_item import BarInsightFromCallTableQueriesItem + from .bar_insight_from_call_table_type import BarInsightFromCallTableType + from .bar_insight_group_by import BarInsightGroupBy + from .bar_insight_metadata import BarInsightMetadata + from .bar_insight_queries_item import BarInsightQueriesItem + from .bash_tool import BashTool + from .bash_tool_messages_item import ( + BashToolMessagesItem, + BashToolMessagesItem_RequestComplete, + BashToolMessagesItem_RequestFailed, + BashToolMessagesItem_RequestResponseDelayed, + BashToolMessagesItem_RequestStart, + ) + from .bash_tool_name import BashToolName + from .bash_tool_sub_type import BashToolSubType + from .bash_tool_with_tool_call import BashToolWithToolCall + from .bash_tool_with_tool_call_messages_item import ( + BashToolWithToolCallMessagesItem, + BashToolWithToolCallMessagesItem_RequestComplete, + BashToolWithToolCallMessagesItem_RequestFailed, + BashToolWithToolCallMessagesItem_RequestResponseDelayed, + BashToolWithToolCallMessagesItem_RequestStart, + ) + from .bash_tool_with_tool_call_name import BashToolWithToolCallName + from .bash_tool_with_tool_call_sub_type import BashToolWithToolCallSubType + from .bearer_authentication_plan import BearerAuthenticationPlan + from .bot_message import BotMessage + from .both_custom_endpointing_rule import BothCustomEndpointingRule + from .bucket_plan import BucketPlan + from .byo_phone_number import ByoPhoneNumber + from .byo_phone_number_fallback_destination import ( + ByoPhoneNumberFallbackDestination, + ByoPhoneNumberFallbackDestination_Number, + ByoPhoneNumberFallbackDestination_Sip, + ) + from .byo_phone_number_hooks_item import ( + ByoPhoneNumberHooksItem, + ByoPhoneNumberHooksItem_CallEnding, + ByoPhoneNumberHooksItem_CallRinging, + ) + from .byo_phone_number_status import ByoPhoneNumberStatus + from .byo_sip_trunk_credential import ByoSipTrunkCredential + from .byo_sip_trunk_credential_provider import ByoSipTrunkCredentialProvider + from .call import Call + from .call_batch_error import CallBatchError + from .call_batch_response import CallBatchResponse + from .call_costs_item import ( + CallCostsItem, + CallCostsItem_Analysis, + CallCostsItem_KnowledgeBase, + CallCostsItem_Model, + CallCostsItem_Transcriber, + CallCostsItem_Transport, + CallCostsItem_Vapi, + CallCostsItem_Voice, + CallCostsItem_VoicemailDetection, + ) + from .call_destination import CallDestination, CallDestination_Number, CallDestination_Sip + from .call_ended_reason import CallEndedReason + from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted + from .call_hook_assistant_speech_interrupted_do_item import ( + CallHookAssistantSpeechInterruptedDoItem, + CallHookAssistantSpeechInterruptedDoItem_MessageAdd, + CallHookAssistantSpeechInterruptedDoItem_Say, + CallHookAssistantSpeechInterruptedDoItem_Tool, + ) + from .call_hook_assistant_speech_interrupted_on import CallHookAssistantSpeechInterruptedOn + from .call_hook_call_ending import CallHookCallEnding + from .call_hook_call_ending_do_item import ( + CallHookCallEndingDoItem, + CallHookCallEndingDoItem_MessageAdd, + CallHookCallEndingDoItem_Tool, + ) + from .call_hook_call_ending_on import CallHookCallEndingOn + from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted + from .call_hook_customer_speech_interrupted_do_item import ( + CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechInterruptedDoItem_MessageAdd, + CallHookCustomerSpeechInterruptedDoItem_Say, + CallHookCustomerSpeechInterruptedDoItem_Tool, + ) + from .call_hook_customer_speech_interrupted_on import CallHookCustomerSpeechInterruptedOn + from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout + from .call_hook_customer_speech_timeout_do_item import ( + CallHookCustomerSpeechTimeoutDoItem, + CallHookCustomerSpeechTimeoutDoItem_MessageAdd, + CallHookCustomerSpeechTimeoutDoItem_Say, + CallHookCustomerSpeechTimeoutDoItem_Tool, + ) + from .call_hook_filter import CallHookFilter + from .call_hook_filter_type import CallHookFilterType + from .call_hook_model_response_timeout import CallHookModelResponseTimeout + from .call_hook_model_response_timeout_do_item import ( + CallHookModelResponseTimeoutDoItem, + CallHookModelResponseTimeoutDoItem_MessageAdd, + CallHookModelResponseTimeoutDoItem_Say, + CallHookModelResponseTimeoutDoItem_Tool, + ) + from .call_hook_model_response_timeout_on import CallHookModelResponseTimeoutOn + from .call_hook_transcriber_endpointed_speech_low_confidence import CallHookTranscriberEndpointedSpeechLowConfidence + from .call_hook_transcriber_endpointed_speech_low_confidence_do_item import ( + CallHookTranscriberEndpointedSpeechLowConfidenceDoItem, + CallHookTranscriberEndpointedSpeechLowConfidenceDoItem_MessageAdd, + CallHookTranscriberEndpointedSpeechLowConfidenceDoItem_Say, + CallHookTranscriberEndpointedSpeechLowConfidenceDoItem_Tool, + ) + from .call_messages_item import CallMessagesItem + from .call_paginated_response import CallPaginatedResponse + from .call_phone_call_provider import CallPhoneCallProvider + from .call_phone_call_transport import CallPhoneCallTransport + from .call_status import CallStatus + from .call_type import CallType + from .campaign import Campaign + from .campaign_ended_reason import CampaignEndedReason + from .campaign_paginated_response import CampaignPaginatedResponse + from .campaign_status import CampaignStatus + from .cartesia_credential import CartesiaCredential + from .cartesia_credential_provider import CartesiaCredentialProvider + from .cartesia_experimental_controls import CartesiaExperimentalControls + from .cartesia_experimental_controls_emotion import CartesiaExperimentalControlsEmotion + from .cartesia_generation_config import CartesiaGenerationConfig + from .cartesia_generation_config_experimental import CartesiaGenerationConfigExperimental + from .cartesia_pronunciation_dict_item import CartesiaPronunciationDictItem + from .cartesia_pronunciation_dictionary import CartesiaPronunciationDictionary + from .cartesia_speed_control import CartesiaSpeedControl + from .cartesia_speed_control_zero import CartesiaSpeedControlZero + from .cartesia_transcriber import CartesiaTranscriber + from .cartesia_transcriber_language import CartesiaTranscriberLanguage + from .cartesia_transcriber_model import CartesiaTranscriberModel + from .cartesia_voice import CartesiaVoice + from .cartesia_voice_language import CartesiaVoiceLanguage + from .cartesia_voice_model import CartesiaVoiceModel + from .cerebras_credential import CerebrasCredential + from .cerebras_credential_provider import CerebrasCredentialProvider + from .cerebras_model import CerebrasModel + from .cerebras_model_model import CerebrasModelModel + from .cerebras_model_tools_item import ( + CerebrasModelToolsItem, + CerebrasModelToolsItem_ApiRequest, + CerebrasModelToolsItem_Bash, + CerebrasModelToolsItem_Code, + CerebrasModelToolsItem_Computer, + CerebrasModelToolsItem_Dtmf, + CerebrasModelToolsItem_EndCall, + CerebrasModelToolsItem_Function, + CerebrasModelToolsItem_GohighlevelCalendarAvailabilityCheck, + CerebrasModelToolsItem_GohighlevelCalendarEventCreate, + CerebrasModelToolsItem_GohighlevelContactCreate, + CerebrasModelToolsItem_GohighlevelContactGet, + CerebrasModelToolsItem_GoogleCalendarAvailabilityCheck, + CerebrasModelToolsItem_GoogleCalendarEventCreate, + CerebrasModelToolsItem_GoogleSheetsRowAppend, + CerebrasModelToolsItem_Handoff, + CerebrasModelToolsItem_Mcp, + CerebrasModelToolsItem_Query, + CerebrasModelToolsItem_SipRequest, + CerebrasModelToolsItem_SlackMessageSend, + CerebrasModelToolsItem_Sms, + CerebrasModelToolsItem_TextEditor, + CerebrasModelToolsItem_TransferCall, + CerebrasModelToolsItem_Voicemail, + ) + from .chat import Chat + from .chat_assistant_overrides import ChatAssistantOverrides + from .chat_cost import ChatCost + from .chat_costs_item import ChatCostsItem, ChatCostsItem_Chat, ChatCostsItem_Model + from .chat_eval_assistant_message_evaluation import ChatEvalAssistantMessageEvaluation + from .chat_eval_assistant_message_evaluation_judge_plan import ( + ChatEvalAssistantMessageEvaluationJudgePlan, + ChatEvalAssistantMessageEvaluationJudgePlan_Ai, + ChatEvalAssistantMessageEvaluationJudgePlan_Exact, + ChatEvalAssistantMessageEvaluationJudgePlan_Regex, + ) + from .chat_eval_assistant_message_evaluation_role import ChatEvalAssistantMessageEvaluationRole + from .chat_eval_assistant_message_mock import ChatEvalAssistantMessageMock + from .chat_eval_assistant_message_mock_role import ChatEvalAssistantMessageMockRole + from .chat_eval_assistant_message_mock_tool_call import ChatEvalAssistantMessageMockToolCall + from .chat_eval_system_message_mock import ChatEvalSystemMessageMock + from .chat_eval_system_message_mock_role import ChatEvalSystemMessageMockRole + from .chat_eval_tool_response_message_evaluation import ChatEvalToolResponseMessageEvaluation + from .chat_eval_tool_response_message_evaluation_role import ChatEvalToolResponseMessageEvaluationRole + from .chat_eval_tool_response_message_mock import ChatEvalToolResponseMessageMock + from .chat_eval_tool_response_message_mock_role import ChatEvalToolResponseMessageMockRole + from .chat_eval_user_message_mock import ChatEvalUserMessageMock + from .chat_eval_user_message_mock_role import ChatEvalUserMessageMockRole + from .chat_input import ChatInput + from .chat_input_one_item import ChatInputOneItem + from .chat_messages_item import ChatMessagesItem + from .chat_output_item import ChatOutputItem + from .chat_paginated_response import ChatPaginatedResponse + from .chunk_plan import ChunkPlan + from .client_inbound_message import ClientInboundMessage + from .client_inbound_message_add_message import ClientInboundMessageAddMessage + from .client_inbound_message_control import ClientInboundMessageControl + from .client_inbound_message_control_control import ClientInboundMessageControlControl + from .client_inbound_message_end_call import ClientInboundMessageEndCall + from .client_inbound_message_message import ( + ClientInboundMessageMessage, + ClientInboundMessageMessage_AddMessage, + ClientInboundMessageMessage_Control, + ClientInboundMessageMessage_EndCall, + ClientInboundMessageMessage_Say, + ClientInboundMessageMessage_SendTransportMessage, + ClientInboundMessageMessage_Transfer, + ) + from .client_inbound_message_say import ClientInboundMessageSay + from .client_inbound_message_send_transport_message import ClientInboundMessageSendTransportMessage + from .client_inbound_message_send_transport_message_message import ( + ClientInboundMessageSendTransportMessageMessage, + ClientInboundMessageSendTransportMessageMessage_Twilio, + ClientInboundMessageSendTransportMessageMessage_VapiSip, + ) + from .client_inbound_message_transfer import ClientInboundMessageTransfer + from .client_inbound_message_transfer_destination import ( + ClientInboundMessageTransferDestination, + ClientInboundMessageTransferDestination_Number, + ClientInboundMessageTransferDestination_Sip, + ) + from .client_message import ClientMessage + from .client_message_assistant_speech import ClientMessageAssistantSpeech + from .client_message_assistant_speech_phone_number import ( + ClientMessageAssistantSpeechPhoneNumber, + ClientMessageAssistantSpeechPhoneNumber_ByoPhoneNumber, + ClientMessageAssistantSpeechPhoneNumber_Telnyx, + ClientMessageAssistantSpeechPhoneNumber_Twilio, + ClientMessageAssistantSpeechPhoneNumber_Vapi, + ClientMessageAssistantSpeechPhoneNumber_Vonage, + ) + from .client_message_assistant_speech_source import ClientMessageAssistantSpeechSource + from .client_message_assistant_speech_timing import ( + ClientMessageAssistantSpeechTiming, + ClientMessageAssistantSpeechTiming_WordAlignment, + ClientMessageAssistantSpeechTiming_WordProgress, + ) + from .client_message_assistant_speech_type import ClientMessageAssistantSpeechType + from .client_message_assistant_started import ClientMessageAssistantStarted + from .client_message_assistant_started_phone_number import ( + ClientMessageAssistantStartedPhoneNumber, + ClientMessageAssistantStartedPhoneNumber_ByoPhoneNumber, + ClientMessageAssistantStartedPhoneNumber_Telnyx, + ClientMessageAssistantStartedPhoneNumber_Twilio, + ClientMessageAssistantStartedPhoneNumber_Vapi, + ClientMessageAssistantStartedPhoneNumber_Vonage, + ) + from .client_message_assistant_started_type import ClientMessageAssistantStartedType + from .client_message_call_delete_failed import ClientMessageCallDeleteFailed + from .client_message_call_delete_failed_phone_number import ( + ClientMessageCallDeleteFailedPhoneNumber, + ClientMessageCallDeleteFailedPhoneNumber_ByoPhoneNumber, + ClientMessageCallDeleteFailedPhoneNumber_Telnyx, + ClientMessageCallDeleteFailedPhoneNumber_Twilio, + ClientMessageCallDeleteFailedPhoneNumber_Vapi, + ClientMessageCallDeleteFailedPhoneNumber_Vonage, + ) + from .client_message_call_delete_failed_type import ClientMessageCallDeleteFailedType + from .client_message_call_deleted import ClientMessageCallDeleted + from .client_message_call_deleted_phone_number import ( + ClientMessageCallDeletedPhoneNumber, + ClientMessageCallDeletedPhoneNumber_ByoPhoneNumber, + ClientMessageCallDeletedPhoneNumber_Telnyx, + ClientMessageCallDeletedPhoneNumber_Twilio, + ClientMessageCallDeletedPhoneNumber_Vapi, + ClientMessageCallDeletedPhoneNumber_Vonage, + ) + from .client_message_call_deleted_type import ClientMessageCallDeletedType + from .client_message_chat_created import ClientMessageChatCreated + from .client_message_chat_created_phone_number import ( + ClientMessageChatCreatedPhoneNumber, + ClientMessageChatCreatedPhoneNumber_ByoPhoneNumber, + ClientMessageChatCreatedPhoneNumber_Telnyx, + ClientMessageChatCreatedPhoneNumber_Twilio, + ClientMessageChatCreatedPhoneNumber_Vapi, + ClientMessageChatCreatedPhoneNumber_Vonage, + ) + from .client_message_chat_created_type import ClientMessageChatCreatedType + from .client_message_chat_deleted import ClientMessageChatDeleted + from .client_message_chat_deleted_phone_number import ( + ClientMessageChatDeletedPhoneNumber, + ClientMessageChatDeletedPhoneNumber_ByoPhoneNumber, + ClientMessageChatDeletedPhoneNumber_Telnyx, + ClientMessageChatDeletedPhoneNumber_Twilio, + ClientMessageChatDeletedPhoneNumber_Vapi, + ClientMessageChatDeletedPhoneNumber_Vonage, + ) + from .client_message_chat_deleted_type import ClientMessageChatDeletedType + from .client_message_conversation_update import ClientMessageConversationUpdate + from .client_message_conversation_update_messages_item import ClientMessageConversationUpdateMessagesItem + from .client_message_conversation_update_phone_number import ( + ClientMessageConversationUpdatePhoneNumber, + ClientMessageConversationUpdatePhoneNumber_ByoPhoneNumber, + ClientMessageConversationUpdatePhoneNumber_Telnyx, + ClientMessageConversationUpdatePhoneNumber_Twilio, + ClientMessageConversationUpdatePhoneNumber_Vapi, + ClientMessageConversationUpdatePhoneNumber_Vonage, + ) + from .client_message_conversation_update_type import ClientMessageConversationUpdateType + from .client_message_hang import ClientMessageHang + from .client_message_hang_phone_number import ( + ClientMessageHangPhoneNumber, + ClientMessageHangPhoneNumber_ByoPhoneNumber, + ClientMessageHangPhoneNumber_Telnyx, + ClientMessageHangPhoneNumber_Twilio, + ClientMessageHangPhoneNumber_Vapi, + ClientMessageHangPhoneNumber_Vonage, + ) + from .client_message_hang_type import ClientMessageHangType + from .client_message_language_change_detected import ClientMessageLanguageChangeDetected + from .client_message_language_change_detected_phone_number import ( + ClientMessageLanguageChangeDetectedPhoneNumber, + ClientMessageLanguageChangeDetectedPhoneNumber_ByoPhoneNumber, + ClientMessageLanguageChangeDetectedPhoneNumber_Telnyx, + ClientMessageLanguageChangeDetectedPhoneNumber_Twilio, + ClientMessageLanguageChangeDetectedPhoneNumber_Vapi, + ClientMessageLanguageChangeDetectedPhoneNumber_Vonage, + ) + from .client_message_language_change_detected_type import ClientMessageLanguageChangeDetectedType + from .client_message_message import ClientMessageMessage + from .client_message_metadata import ClientMessageMetadata + from .client_message_metadata_phone_number import ( + ClientMessageMetadataPhoneNumber, + ClientMessageMetadataPhoneNumber_ByoPhoneNumber, + ClientMessageMetadataPhoneNumber_Telnyx, + ClientMessageMetadataPhoneNumber_Twilio, + ClientMessageMetadataPhoneNumber_Vapi, + ClientMessageMetadataPhoneNumber_Vonage, + ) + from .client_message_metadata_type import ClientMessageMetadataType + from .client_message_model_output import ClientMessageModelOutput + from .client_message_model_output_phone_number import ( + ClientMessageModelOutputPhoneNumber, + ClientMessageModelOutputPhoneNumber_ByoPhoneNumber, + ClientMessageModelOutputPhoneNumber_Telnyx, + ClientMessageModelOutputPhoneNumber_Twilio, + ClientMessageModelOutputPhoneNumber_Vapi, + ClientMessageModelOutputPhoneNumber_Vonage, + ) + from .client_message_model_output_type import ClientMessageModelOutputType + from .client_message_session_created import ClientMessageSessionCreated + from .client_message_session_created_phone_number import ( + ClientMessageSessionCreatedPhoneNumber, + ClientMessageSessionCreatedPhoneNumber_ByoPhoneNumber, + ClientMessageSessionCreatedPhoneNumber_Telnyx, + ClientMessageSessionCreatedPhoneNumber_Twilio, + ClientMessageSessionCreatedPhoneNumber_Vapi, + ClientMessageSessionCreatedPhoneNumber_Vonage, + ) + from .client_message_session_created_type import ClientMessageSessionCreatedType + from .client_message_session_deleted import ClientMessageSessionDeleted + from .client_message_session_deleted_phone_number import ( + ClientMessageSessionDeletedPhoneNumber, + ClientMessageSessionDeletedPhoneNumber_ByoPhoneNumber, + ClientMessageSessionDeletedPhoneNumber_Telnyx, + ClientMessageSessionDeletedPhoneNumber_Twilio, + ClientMessageSessionDeletedPhoneNumber_Vapi, + ClientMessageSessionDeletedPhoneNumber_Vonage, + ) + from .client_message_session_deleted_type import ClientMessageSessionDeletedType + from .client_message_session_updated import ClientMessageSessionUpdated + from .client_message_session_updated_phone_number import ( + ClientMessageSessionUpdatedPhoneNumber, + ClientMessageSessionUpdatedPhoneNumber_ByoPhoneNumber, + ClientMessageSessionUpdatedPhoneNumber_Telnyx, + ClientMessageSessionUpdatedPhoneNumber_Twilio, + ClientMessageSessionUpdatedPhoneNumber_Vapi, + ClientMessageSessionUpdatedPhoneNumber_Vonage, + ) + from .client_message_session_updated_type import ClientMessageSessionUpdatedType + from .client_message_speech_update import ClientMessageSpeechUpdate + from .client_message_speech_update_phone_number import ( + ClientMessageSpeechUpdatePhoneNumber, + ClientMessageSpeechUpdatePhoneNumber_ByoPhoneNumber, + ClientMessageSpeechUpdatePhoneNumber_Telnyx, + ClientMessageSpeechUpdatePhoneNumber_Twilio, + ClientMessageSpeechUpdatePhoneNumber_Vapi, + ClientMessageSpeechUpdatePhoneNumber_Vonage, + ) + from .client_message_speech_update_role import ClientMessageSpeechUpdateRole + from .client_message_speech_update_status import ClientMessageSpeechUpdateStatus + from .client_message_speech_update_type import ClientMessageSpeechUpdateType + from .client_message_tool_calls import ClientMessageToolCalls + from .client_message_tool_calls_phone_number import ( + ClientMessageToolCallsPhoneNumber, + ClientMessageToolCallsPhoneNumber_ByoPhoneNumber, + ClientMessageToolCallsPhoneNumber_Telnyx, + ClientMessageToolCallsPhoneNumber_Twilio, + ClientMessageToolCallsPhoneNumber_Vapi, + ClientMessageToolCallsPhoneNumber_Vonage, + ) + from .client_message_tool_calls_result import ClientMessageToolCallsResult + from .client_message_tool_calls_result_phone_number import ( + ClientMessageToolCallsResultPhoneNumber, + ClientMessageToolCallsResultPhoneNumber_ByoPhoneNumber, + ClientMessageToolCallsResultPhoneNumber_Telnyx, + ClientMessageToolCallsResultPhoneNumber_Twilio, + ClientMessageToolCallsResultPhoneNumber_Vapi, + ClientMessageToolCallsResultPhoneNumber_Vonage, + ) + from .client_message_tool_calls_result_type import ClientMessageToolCallsResultType + from .client_message_tool_calls_tool_with_tool_call_list_item import ( + ClientMessageToolCallsToolWithToolCallListItem, + ClientMessageToolCallsToolWithToolCallListItem_Bash, + ClientMessageToolCallsToolWithToolCallListItem_Computer, + ClientMessageToolCallsToolWithToolCallListItem_Function, + ClientMessageToolCallsToolWithToolCallListItem_Ghl, + ClientMessageToolCallsToolWithToolCallListItem_GoogleCalendarEventCreate, + ClientMessageToolCallsToolWithToolCallListItem_Make, + ClientMessageToolCallsToolWithToolCallListItem_TextEditor, + ) + from .client_message_tool_calls_type import ClientMessageToolCallsType + from .client_message_transcript import ClientMessageTranscript + from .client_message_transcript_phone_number import ( + ClientMessageTranscriptPhoneNumber, + ClientMessageTranscriptPhoneNumber_ByoPhoneNumber, + ClientMessageTranscriptPhoneNumber_Telnyx, + ClientMessageTranscriptPhoneNumber_Twilio, + ClientMessageTranscriptPhoneNumber_Vapi, + ClientMessageTranscriptPhoneNumber_Vonage, + ) + from .client_message_transcript_role import ClientMessageTranscriptRole + from .client_message_transcript_transcript_type import ClientMessageTranscriptTranscriptType + from .client_message_transcript_type import ClientMessageTranscriptType + from .client_message_transfer_update import ClientMessageTransferUpdate + from .client_message_transfer_update_destination import ( + ClientMessageTransferUpdateDestination, + ClientMessageTransferUpdateDestination_Assistant, + ClientMessageTransferUpdateDestination_Number, + ClientMessageTransferUpdateDestination_Sip, + ) + from .client_message_transfer_update_phone_number import ( + ClientMessageTransferUpdatePhoneNumber, + ClientMessageTransferUpdatePhoneNumber_ByoPhoneNumber, + ClientMessageTransferUpdatePhoneNumber_Telnyx, + ClientMessageTransferUpdatePhoneNumber_Twilio, + ClientMessageTransferUpdatePhoneNumber_Vapi, + ClientMessageTransferUpdatePhoneNumber_Vonage, + ) + from .client_message_transfer_update_type import ClientMessageTransferUpdateType + from .client_message_user_interrupted import ClientMessageUserInterrupted + from .client_message_user_interrupted_phone_number import ( + ClientMessageUserInterruptedPhoneNumber, + ClientMessageUserInterruptedPhoneNumber_ByoPhoneNumber, + ClientMessageUserInterruptedPhoneNumber_Telnyx, + ClientMessageUserInterruptedPhoneNumber_Twilio, + ClientMessageUserInterruptedPhoneNumber_Vapi, + ClientMessageUserInterruptedPhoneNumber_Vonage, + ) + from .client_message_user_interrupted_type import ClientMessageUserInterruptedType + from .client_message_voice_input import ClientMessageVoiceInput + from .client_message_voice_input_phone_number import ( + ClientMessageVoiceInputPhoneNumber, + ClientMessageVoiceInputPhoneNumber_ByoPhoneNumber, + ClientMessageVoiceInputPhoneNumber_Telnyx, + ClientMessageVoiceInputPhoneNumber_Twilio, + ClientMessageVoiceInputPhoneNumber_Vapi, + ClientMessageVoiceInputPhoneNumber_Vonage, + ) + from .client_message_voice_input_type import ClientMessageVoiceInputType + from .client_message_workflow_node_started import ClientMessageWorkflowNodeStarted + from .client_message_workflow_node_started_phone_number import ( + ClientMessageWorkflowNodeStartedPhoneNumber, + ClientMessageWorkflowNodeStartedPhoneNumber_ByoPhoneNumber, + ClientMessageWorkflowNodeStartedPhoneNumber_Telnyx, + ClientMessageWorkflowNodeStartedPhoneNumber_Twilio, + ClientMessageWorkflowNodeStartedPhoneNumber_Vapi, + ClientMessageWorkflowNodeStartedPhoneNumber_Vonage, + ) + from .client_message_workflow_node_started_type import ClientMessageWorkflowNodeStartedType + from .clone_voice_dto import CloneVoiceDto + from .cloudflare_credential import CloudflareCredential + from .cloudflare_credential_provider import CloudflareCredentialProvider + from .cloudflare_r_2_bucket_plan import CloudflareR2BucketPlan + from .code_tool import CodeTool + from .code_tool_environment_variable import CodeToolEnvironmentVariable + from .code_tool_messages_item import ( + CodeToolMessagesItem, + CodeToolMessagesItem_RequestComplete, + CodeToolMessagesItem_RequestFailed, + CodeToolMessagesItem_RequestResponseDelayed, + CodeToolMessagesItem_RequestStart, + ) + from .compliance import Compliance + from .compliance_override import ComplianceOverride + from .compliance_plan import CompliancePlan + from .compliance_plan_recording_consent_plan import ( + CompliancePlanRecordingConsentPlan, + CompliancePlanRecordingConsentPlan_StayOnLine, + CompliancePlanRecordingConsentPlan_Verbal, + ) + from .computer_tool import ComputerTool + from .computer_tool_messages_item import ( + ComputerToolMessagesItem, + ComputerToolMessagesItem_RequestComplete, + ComputerToolMessagesItem_RequestFailed, + ComputerToolMessagesItem_RequestResponseDelayed, + ComputerToolMessagesItem_RequestStart, + ) + from .computer_tool_name import ComputerToolName + from .computer_tool_sub_type import ComputerToolSubType + from .computer_tool_with_tool_call import ComputerToolWithToolCall + from .computer_tool_with_tool_call_messages_item import ( + ComputerToolWithToolCallMessagesItem, + ComputerToolWithToolCallMessagesItem_RequestComplete, + ComputerToolWithToolCallMessagesItem_RequestFailed, + ComputerToolWithToolCallMessagesItem_RequestResponseDelayed, + ComputerToolWithToolCallMessagesItem_RequestStart, + ) + from .computer_tool_with_tool_call_name import ComputerToolWithToolCallName + from .computer_tool_with_tool_call_sub_type import ComputerToolWithToolCallSubType + from .condition import Condition + from .condition_operator import ConditionOperator + from .context_engineering_plan_all import ContextEngineeringPlanAll + from .context_engineering_plan_last_n_messages import ContextEngineeringPlanLastNMessages + from .context_engineering_plan_none import ContextEngineeringPlanNone + from .context_engineering_plan_user_and_assistant_messages import ContextEngineeringPlanUserAndAssistantMessages + from .conversation_node import ConversationNode + from .conversation_node_model import ( + ConversationNodeModel, + ConversationNodeModel_Anthropic, + ConversationNodeModel_AnthropicBedrock, + ConversationNodeModel_CustomLlm, + ConversationNodeModel_Google, + ConversationNodeModel_Openai, + ) + from .conversation_node_tools_item import ( + ConversationNodeToolsItem, + ConversationNodeToolsItem_ApiRequest, + ConversationNodeToolsItem_Bash, + ConversationNodeToolsItem_Code, + ConversationNodeToolsItem_Computer, + ConversationNodeToolsItem_Dtmf, + ConversationNodeToolsItem_EndCall, + ConversationNodeToolsItem_Function, + ConversationNodeToolsItem_GohighlevelCalendarAvailabilityCheck, + ConversationNodeToolsItem_GohighlevelCalendarEventCreate, + ConversationNodeToolsItem_GohighlevelContactCreate, + ConversationNodeToolsItem_GohighlevelContactGet, + ConversationNodeToolsItem_GoogleCalendarAvailabilityCheck, + ConversationNodeToolsItem_GoogleCalendarEventCreate, + ConversationNodeToolsItem_GoogleSheetsRowAppend, + ConversationNodeToolsItem_Handoff, + ConversationNodeToolsItem_Mcp, + ConversationNodeToolsItem_Query, + ConversationNodeToolsItem_SipRequest, + ConversationNodeToolsItem_SlackMessageSend, + ConversationNodeToolsItem_Sms, + ConversationNodeToolsItem_TextEditor, + ConversationNodeToolsItem_TransferCall, + ConversationNodeToolsItem_Voicemail, + ) + from .conversation_node_transcriber import ( + ConversationNodeTranscriber, + ConversationNodeTranscriber_11Labs, + ConversationNodeTranscriber_AssemblyAi, + ConversationNodeTranscriber_Azure, + ConversationNodeTranscriber_Cartesia, + ConversationNodeTranscriber_CustomTranscriber, + ConversationNodeTranscriber_Deepgram, + ConversationNodeTranscriber_Gladia, + ConversationNodeTranscriber_Google, + ConversationNodeTranscriber_Openai, + ConversationNodeTranscriber_Soniox, + ConversationNodeTranscriber_Speechmatics, + ConversationNodeTranscriber_Talkscriber, + ) + from .conversation_node_voice import ( + ConversationNodeVoice, + ConversationNodeVoice_11Labs, + ConversationNodeVoice_Azure, + ConversationNodeVoice_Cartesia, + ConversationNodeVoice_CustomVoice, + ConversationNodeVoice_Deepgram, + ConversationNodeVoice_Hume, + ConversationNodeVoice_Inworld, + ConversationNodeVoice_Lmnt, + ConversationNodeVoice_Minimax, + ConversationNodeVoice_Neuphonic, + ConversationNodeVoice_Openai, + ConversationNodeVoice_Playht, + ConversationNodeVoice_RimeAi, + ConversationNodeVoice_Sesame, + ConversationNodeVoice_SmallestAi, + ConversationNodeVoice_Tavus, + ConversationNodeVoice_Vapi, + ConversationNodeVoice_Wellsaid, + ) + from .cost_breakdown import CostBreakdown + from .create_anthropic_bedrock_credential_dto import CreateAnthropicBedrockCredentialDto + from .create_anthropic_bedrock_credential_dto_authentication_plan import ( + CreateAnthropicBedrockCredentialDtoAuthenticationPlan, + CreateAnthropicBedrockCredentialDtoAuthenticationPlan_AwsIam, + CreateAnthropicBedrockCredentialDtoAuthenticationPlan_AwsSts, + ) + from .create_anthropic_bedrock_credential_dto_region import CreateAnthropicBedrockCredentialDtoRegion + from .create_anthropic_credential_dto import CreateAnthropicCredentialDto + from .create_anyscale_credential_dto import CreateAnyscaleCredentialDto + from .create_api_request_tool_dto import CreateApiRequestToolDto + from .create_api_request_tool_dto_messages_item import ( + CreateApiRequestToolDtoMessagesItem, + CreateApiRequestToolDtoMessagesItem_RequestComplete, + CreateApiRequestToolDtoMessagesItem_RequestFailed, + CreateApiRequestToolDtoMessagesItem_RequestResponseDelayed, + CreateApiRequestToolDtoMessagesItem_RequestStart, + ) + from .create_api_request_tool_dto_method import CreateApiRequestToolDtoMethod + from .create_assembly_ai_credential_dto import CreateAssemblyAiCredentialDto + from .create_assistant_dto import CreateAssistantDto + from .create_assistant_dto_background_sound import CreateAssistantDtoBackgroundSound + from .create_assistant_dto_background_sound_zero import CreateAssistantDtoBackgroundSoundZero + from .create_assistant_dto_client_messages_item import CreateAssistantDtoClientMessagesItem + from .create_assistant_dto_credentials_item import ( + CreateAssistantDtoCredentialsItem, + CreateAssistantDtoCredentialsItem_11Labs, + CreateAssistantDtoCredentialsItem_Anthropic, + CreateAssistantDtoCredentialsItem_AnthropicBedrock, + CreateAssistantDtoCredentialsItem_Anyscale, + CreateAssistantDtoCredentialsItem_AssemblyAi, + CreateAssistantDtoCredentialsItem_Azure, + CreateAssistantDtoCredentialsItem_AzureOpenai, + CreateAssistantDtoCredentialsItem_ByoSipTrunk, + CreateAssistantDtoCredentialsItem_Cartesia, + CreateAssistantDtoCredentialsItem_Cerebras, + CreateAssistantDtoCredentialsItem_Cloudflare, + CreateAssistantDtoCredentialsItem_CustomCredential, + CreateAssistantDtoCredentialsItem_CustomLlm, + CreateAssistantDtoCredentialsItem_DeepSeek, + CreateAssistantDtoCredentialsItem_Deepgram, + CreateAssistantDtoCredentialsItem_Deepinfra, + CreateAssistantDtoCredentialsItem_Email, + CreateAssistantDtoCredentialsItem_Gcp, + CreateAssistantDtoCredentialsItem_GhlOauth2Authorization, + CreateAssistantDtoCredentialsItem_Gladia, + CreateAssistantDtoCredentialsItem_Gohighlevel, + CreateAssistantDtoCredentialsItem_Google, + CreateAssistantDtoCredentialsItem_GoogleCalendarOauth2Authorization, + CreateAssistantDtoCredentialsItem_GoogleCalendarOauth2Client, + CreateAssistantDtoCredentialsItem_GoogleSheetsOauth2Authorization, + CreateAssistantDtoCredentialsItem_Groq, + CreateAssistantDtoCredentialsItem_Hume, + CreateAssistantDtoCredentialsItem_InflectionAi, + CreateAssistantDtoCredentialsItem_Inworld, + CreateAssistantDtoCredentialsItem_Langfuse, + CreateAssistantDtoCredentialsItem_Lmnt, + CreateAssistantDtoCredentialsItem_Make, + CreateAssistantDtoCredentialsItem_Minimax, + CreateAssistantDtoCredentialsItem_Mistral, + CreateAssistantDtoCredentialsItem_Neuphonic, + CreateAssistantDtoCredentialsItem_Openai, + CreateAssistantDtoCredentialsItem_Openrouter, + CreateAssistantDtoCredentialsItem_PerplexityAi, + CreateAssistantDtoCredentialsItem_Playht, + CreateAssistantDtoCredentialsItem_RimeAi, + CreateAssistantDtoCredentialsItem_Runpod, + CreateAssistantDtoCredentialsItem_S3, + CreateAssistantDtoCredentialsItem_SlackOauth2Authorization, + CreateAssistantDtoCredentialsItem_SlackWebhook, + CreateAssistantDtoCredentialsItem_SmallestAi, + CreateAssistantDtoCredentialsItem_Soniox, + CreateAssistantDtoCredentialsItem_Speechmatics, + CreateAssistantDtoCredentialsItem_Supabase, + CreateAssistantDtoCredentialsItem_Tavus, + CreateAssistantDtoCredentialsItem_TogetherAi, + CreateAssistantDtoCredentialsItem_Trieve, + CreateAssistantDtoCredentialsItem_Twilio, + CreateAssistantDtoCredentialsItem_Vonage, + CreateAssistantDtoCredentialsItem_Webhook, + CreateAssistantDtoCredentialsItem_Wellsaid, + CreateAssistantDtoCredentialsItem_Xai, + ) + from .create_assistant_dto_first_message_mode import CreateAssistantDtoFirstMessageMode + from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem + from .create_assistant_dto_model import ( + CreateAssistantDtoModel, + CreateAssistantDtoModel_Anthropic, + CreateAssistantDtoModel_AnthropicBedrock, + CreateAssistantDtoModel_Anyscale, + CreateAssistantDtoModel_Cerebras, + CreateAssistantDtoModel_CustomLlm, + CreateAssistantDtoModel_DeepSeek, + CreateAssistantDtoModel_Deepinfra, + CreateAssistantDtoModel_Google, + CreateAssistantDtoModel_Groq, + CreateAssistantDtoModel_InflectionAi, + CreateAssistantDtoModel_Minimax, + CreateAssistantDtoModel_Openai, + CreateAssistantDtoModel_Openrouter, + CreateAssistantDtoModel_PerplexityAi, + CreateAssistantDtoModel_TogetherAi, + CreateAssistantDtoModel_Xai, + ) + from .create_assistant_dto_server_messages_item import CreateAssistantDtoServerMessagesItem + from .create_assistant_dto_transcriber import ( + CreateAssistantDtoTranscriber, + CreateAssistantDtoTranscriber_11Labs, + CreateAssistantDtoTranscriber_AssemblyAi, + CreateAssistantDtoTranscriber_Azure, + CreateAssistantDtoTranscriber_Cartesia, + CreateAssistantDtoTranscriber_CustomTranscriber, + CreateAssistantDtoTranscriber_Deepgram, + CreateAssistantDtoTranscriber_Gladia, + CreateAssistantDtoTranscriber_Google, + CreateAssistantDtoTranscriber_Openai, + CreateAssistantDtoTranscriber_Soniox, + CreateAssistantDtoTranscriber_Speechmatics, + CreateAssistantDtoTranscriber_Talkscriber, + ) + from .create_assistant_dto_voice import ( + CreateAssistantDtoVoice, + CreateAssistantDtoVoice_11Labs, + CreateAssistantDtoVoice_Azure, + CreateAssistantDtoVoice_Cartesia, + CreateAssistantDtoVoice_CustomVoice, + CreateAssistantDtoVoice_Deepgram, + CreateAssistantDtoVoice_Hume, + CreateAssistantDtoVoice_Inworld, + CreateAssistantDtoVoice_Lmnt, + CreateAssistantDtoVoice_Minimax, + CreateAssistantDtoVoice_Neuphonic, + CreateAssistantDtoVoice_Openai, + CreateAssistantDtoVoice_Playht, + CreateAssistantDtoVoice_RimeAi, + CreateAssistantDtoVoice_Sesame, + CreateAssistantDtoVoice_SmallestAi, + CreateAssistantDtoVoice_Tavus, + CreateAssistantDtoVoice_Vapi, + CreateAssistantDtoVoice_Wellsaid, + ) + from .create_assistant_dto_voicemail_detection import CreateAssistantDtoVoicemailDetection + from .create_assistant_dto_voicemail_detection_zero import CreateAssistantDtoVoicemailDetectionZero + from .create_azure_credential_dto import CreateAzureCredentialDto + from .create_azure_credential_dto_region import CreateAzureCredentialDtoRegion + from .create_azure_credential_dto_service import CreateAzureCredentialDtoService + from .create_azure_open_ai_credential_dto import CreateAzureOpenAiCredentialDto + from .create_azure_open_ai_credential_dto_models_item import CreateAzureOpenAiCredentialDtoModelsItem + from .create_azure_open_ai_credential_dto_region import CreateAzureOpenAiCredentialDtoRegion + from .create_bar_insight_from_call_table_dto import CreateBarInsightFromCallTableDto + from .create_bar_insight_from_call_table_dto_group_by import CreateBarInsightFromCallTableDtoGroupBy + from .create_bar_insight_from_call_table_dto_queries_item import CreateBarInsightFromCallTableDtoQueriesItem + from .create_bash_tool_dto import CreateBashToolDto + from .create_bash_tool_dto_messages_item import ( + CreateBashToolDtoMessagesItem, + CreateBashToolDtoMessagesItem_RequestComplete, + CreateBashToolDtoMessagesItem_RequestFailed, + CreateBashToolDtoMessagesItem_RequestResponseDelayed, + CreateBashToolDtoMessagesItem_RequestStart, + ) + from .create_bash_tool_dto_name import CreateBashToolDtoName + from .create_bash_tool_dto_sub_type import CreateBashToolDtoSubType + from .create_byo_phone_number_dto import CreateByoPhoneNumberDto + from .create_byo_phone_number_dto_fallback_destination import ( + CreateByoPhoneNumberDtoFallbackDestination, + CreateByoPhoneNumberDtoFallbackDestination_Number, + CreateByoPhoneNumberDtoFallbackDestination_Sip, + ) + from .create_byo_phone_number_dto_hooks_item import ( + CreateByoPhoneNumberDtoHooksItem, + CreateByoPhoneNumberDtoHooksItem_CallEnding, + CreateByoPhoneNumberDtoHooksItem_CallRinging, + ) + from .create_byo_sip_trunk_credential_dto import CreateByoSipTrunkCredentialDto + from .create_cartesia_credential_dto import CreateCartesiaCredentialDto + from .create_cerebras_credential_dto import CreateCerebrasCredentialDto + from .create_chat_stream_response import CreateChatStreamResponse + from .create_cloudflare_credential_dto import CreateCloudflareCredentialDto + from .create_code_tool_dto import CreateCodeToolDto + from .create_code_tool_dto_messages_item import ( + CreateCodeToolDtoMessagesItem, + CreateCodeToolDtoMessagesItem_RequestComplete, + CreateCodeToolDtoMessagesItem_RequestFailed, + CreateCodeToolDtoMessagesItem_RequestResponseDelayed, + CreateCodeToolDtoMessagesItem_RequestStart, + ) + from .create_computer_tool_dto import CreateComputerToolDto + from .create_computer_tool_dto_messages_item import ( + CreateComputerToolDtoMessagesItem, + CreateComputerToolDtoMessagesItem_RequestComplete, + CreateComputerToolDtoMessagesItem_RequestFailed, + CreateComputerToolDtoMessagesItem_RequestResponseDelayed, + CreateComputerToolDtoMessagesItem_RequestStart, + ) + from .create_computer_tool_dto_name import CreateComputerToolDtoName + from .create_computer_tool_dto_sub_type import CreateComputerToolDtoSubType + from .create_custom_credential_dto import CreateCustomCredentialDto + from .create_custom_credential_dto_authentication_plan import ( + CreateCustomCredentialDtoAuthenticationPlan, + CreateCustomCredentialDtoAuthenticationPlan_Bearer, + CreateCustomCredentialDtoAuthenticationPlan_Hmac, + CreateCustomCredentialDtoAuthenticationPlan_Oauth2, + ) + from .create_custom_credential_dto_encryption_plan import ( + CreateCustomCredentialDtoEncryptionPlan, + CreateCustomCredentialDtoEncryptionPlan_PublicKey, + ) + from .create_custom_knowledge_base_dto import CreateCustomKnowledgeBaseDto + from .create_custom_knowledge_base_dto_provider import CreateCustomKnowledgeBaseDtoProvider + from .create_custom_llm_credential_dto import CreateCustomLlmCredentialDto + from .create_customer_dto import CreateCustomerDto + from .create_deep_infra_credential_dto import CreateDeepInfraCredentialDto + from .create_deep_seek_credential_dto import CreateDeepSeekCredentialDto + from .create_deepgram_credential_dto import CreateDeepgramCredentialDto + from .create_dtmf_tool_dto import CreateDtmfToolDto + from .create_dtmf_tool_dto_messages_item import ( + CreateDtmfToolDtoMessagesItem, + CreateDtmfToolDtoMessagesItem_RequestComplete, + CreateDtmfToolDtoMessagesItem_RequestFailed, + CreateDtmfToolDtoMessagesItem_RequestResponseDelayed, + CreateDtmfToolDtoMessagesItem_RequestStart, + ) + from .create_eleven_labs_credential_dto import CreateElevenLabsCredentialDto + from .create_email_credential_dto import CreateEmailCredentialDto + from .create_end_call_tool_dto import CreateEndCallToolDto + from .create_end_call_tool_dto_messages_item import ( + CreateEndCallToolDtoMessagesItem, + CreateEndCallToolDtoMessagesItem_RequestComplete, + CreateEndCallToolDtoMessagesItem_RequestFailed, + CreateEndCallToolDtoMessagesItem_RequestResponseDelayed, + CreateEndCallToolDtoMessagesItem_RequestStart, + ) + from .create_eval_dto import CreateEvalDto + from .create_eval_dto_messages_item import CreateEvalDtoMessagesItem + from .create_eval_dto_type import CreateEvalDtoType + from .create_function_tool_dto import CreateFunctionToolDto + from .create_function_tool_dto_messages_item import ( + CreateFunctionToolDtoMessagesItem, + CreateFunctionToolDtoMessagesItem_RequestComplete, + CreateFunctionToolDtoMessagesItem_RequestFailed, + CreateFunctionToolDtoMessagesItem_RequestResponseDelayed, + CreateFunctionToolDtoMessagesItem_RequestStart, + ) + from .create_gcp_credential_dto import CreateGcpCredentialDto + from .create_ghl_tool_dto import CreateGhlToolDto + from .create_ghl_tool_dto_messages_item import ( + CreateGhlToolDtoMessagesItem, + CreateGhlToolDtoMessagesItem_RequestComplete, + CreateGhlToolDtoMessagesItem_RequestFailed, + CreateGhlToolDtoMessagesItem_RequestResponseDelayed, + CreateGhlToolDtoMessagesItem_RequestStart, + ) + from .create_ghl_tool_dto_type import CreateGhlToolDtoType + from .create_gladia_credential_dto import CreateGladiaCredentialDto + from .create_go_high_level_calendar_availability_tool_dto import CreateGoHighLevelCalendarAvailabilityToolDto + from .create_go_high_level_calendar_availability_tool_dto_messages_item import ( + CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem, + CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestComplete, + CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestFailed, + CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestResponseDelayed, + CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestStart, + ) + from .create_go_high_level_calendar_event_create_tool_dto import CreateGoHighLevelCalendarEventCreateToolDto + from .create_go_high_level_calendar_event_create_tool_dto_messages_item import ( + CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem, + CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestComplete, + CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestFailed, + CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestResponseDelayed, + CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestStart, + ) + from .create_go_high_level_contact_create_tool_dto import CreateGoHighLevelContactCreateToolDto + from .create_go_high_level_contact_create_tool_dto_messages_item import ( + CreateGoHighLevelContactCreateToolDtoMessagesItem, + CreateGoHighLevelContactCreateToolDtoMessagesItem_RequestComplete, + CreateGoHighLevelContactCreateToolDtoMessagesItem_RequestFailed, + CreateGoHighLevelContactCreateToolDtoMessagesItem_RequestResponseDelayed, + CreateGoHighLevelContactCreateToolDtoMessagesItem_RequestStart, + ) + from .create_go_high_level_contact_get_tool_dto import CreateGoHighLevelContactGetToolDto + from .create_go_high_level_contact_get_tool_dto_messages_item import ( + CreateGoHighLevelContactGetToolDtoMessagesItem, + CreateGoHighLevelContactGetToolDtoMessagesItem_RequestComplete, + CreateGoHighLevelContactGetToolDtoMessagesItem_RequestFailed, + CreateGoHighLevelContactGetToolDtoMessagesItem_RequestResponseDelayed, + CreateGoHighLevelContactGetToolDtoMessagesItem_RequestStart, + ) + from .create_go_high_level_credential_dto import CreateGoHighLevelCredentialDto + from .create_go_high_level_mcp_credential_dto import CreateGoHighLevelMcpCredentialDto + from .create_google_calendar_check_availability_tool_dto import CreateGoogleCalendarCheckAvailabilityToolDto + from .create_google_calendar_check_availability_tool_dto_messages_item import ( + CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem, + CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestComplete, + CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestFailed, + CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestResponseDelayed, + CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestStart, + ) + from .create_google_calendar_create_event_tool_dto import CreateGoogleCalendarCreateEventToolDto + from .create_google_calendar_create_event_tool_dto_messages_item import ( + CreateGoogleCalendarCreateEventToolDtoMessagesItem, + CreateGoogleCalendarCreateEventToolDtoMessagesItem_RequestComplete, + CreateGoogleCalendarCreateEventToolDtoMessagesItem_RequestFailed, + CreateGoogleCalendarCreateEventToolDtoMessagesItem_RequestResponseDelayed, + CreateGoogleCalendarCreateEventToolDtoMessagesItem_RequestStart, + ) + from .create_google_calendar_o_auth_2_authorization_credential_dto import ( + CreateGoogleCalendarOAuth2AuthorizationCredentialDto, + ) + from .create_google_calendar_o_auth_2_client_credential_dto import CreateGoogleCalendarOAuth2ClientCredentialDto + from .create_google_credential_dto import CreateGoogleCredentialDto + from .create_google_sheets_o_auth_2_authorization_credential_dto import ( + CreateGoogleSheetsOAuth2AuthorizationCredentialDto, + ) + from .create_google_sheets_row_append_tool_dto import CreateGoogleSheetsRowAppendToolDto + from .create_google_sheets_row_append_tool_dto_messages_item import ( + CreateGoogleSheetsRowAppendToolDtoMessagesItem, + CreateGoogleSheetsRowAppendToolDtoMessagesItem_RequestComplete, + CreateGoogleSheetsRowAppendToolDtoMessagesItem_RequestFailed, + CreateGoogleSheetsRowAppendToolDtoMessagesItem_RequestResponseDelayed, + CreateGoogleSheetsRowAppendToolDtoMessagesItem_RequestStart, + ) + from .create_groq_credential_dto import CreateGroqCredentialDto + from .create_handoff_tool_dto import CreateHandoffToolDto + from .create_handoff_tool_dto_destinations_item import ( + CreateHandoffToolDtoDestinationsItem, + CreateHandoffToolDtoDestinationsItem_Assistant, + CreateHandoffToolDtoDestinationsItem_Dynamic, + CreateHandoffToolDtoDestinationsItem_Squad, + ) + from .create_handoff_tool_dto_messages_item import ( + CreateHandoffToolDtoMessagesItem, + CreateHandoffToolDtoMessagesItem_RequestComplete, + CreateHandoffToolDtoMessagesItem_RequestFailed, + CreateHandoffToolDtoMessagesItem_RequestResponseDelayed, + CreateHandoffToolDtoMessagesItem_RequestStart, + ) + from .create_hume_credential_dto import CreateHumeCredentialDto + from .create_inflection_ai_credential_dto import CreateInflectionAiCredentialDto + from .create_inworld_credential_dto import CreateInworldCredentialDto + from .create_langfuse_credential_dto import CreateLangfuseCredentialDto + from .create_line_insight_from_call_table_dto import CreateLineInsightFromCallTableDto + from .create_line_insight_from_call_table_dto_group_by import CreateLineInsightFromCallTableDtoGroupBy + from .create_line_insight_from_call_table_dto_queries_item import CreateLineInsightFromCallTableDtoQueriesItem + from .create_lmnt_credential_dto import CreateLmntCredentialDto + from .create_make_credential_dto import CreateMakeCredentialDto + from .create_make_tool_dto import CreateMakeToolDto + from .create_make_tool_dto_messages_item import ( + CreateMakeToolDtoMessagesItem, + CreateMakeToolDtoMessagesItem_RequestComplete, + CreateMakeToolDtoMessagesItem_RequestFailed, + CreateMakeToolDtoMessagesItem_RequestResponseDelayed, + CreateMakeToolDtoMessagesItem_RequestStart, + ) + from .create_make_tool_dto_type import CreateMakeToolDtoType + from .create_mcp_tool_dto import CreateMcpToolDto + from .create_mcp_tool_dto_messages_item import ( + CreateMcpToolDtoMessagesItem, + CreateMcpToolDtoMessagesItem_RequestComplete, + CreateMcpToolDtoMessagesItem_RequestFailed, + CreateMcpToolDtoMessagesItem_RequestResponseDelayed, + CreateMcpToolDtoMessagesItem_RequestStart, + ) + from .create_minimax_credential_dto import CreateMinimaxCredentialDto + from .create_mistral_credential_dto import CreateMistralCredentialDto + from .create_neuphonic_credential_dto import CreateNeuphonicCredentialDto + from .create_open_ai_credential_dto import CreateOpenAiCredentialDto + from .create_open_router_credential_dto import CreateOpenRouterCredentialDto + from .create_org_dto import CreateOrgDto + from .create_org_dto_channel import CreateOrgDtoChannel + from .create_outbound_call_dto import CreateOutboundCallDto + from .create_output_tool_dto import CreateOutputToolDto + from .create_output_tool_dto_messages_item import ( + CreateOutputToolDtoMessagesItem, + CreateOutputToolDtoMessagesItem_RequestComplete, + CreateOutputToolDtoMessagesItem_RequestFailed, + CreateOutputToolDtoMessagesItem_RequestResponseDelayed, + CreateOutputToolDtoMessagesItem_RequestStart, + ) + from .create_output_tool_dto_type import CreateOutputToolDtoType + from .create_perplexity_ai_credential_dto import CreatePerplexityAiCredentialDto + from .create_personality_dto import CreatePersonalityDto + from .create_pie_insight_from_call_table_dto import CreatePieInsightFromCallTableDto + from .create_pie_insight_from_call_table_dto_group_by import CreatePieInsightFromCallTableDtoGroupBy + from .create_pie_insight_from_call_table_dto_queries_item import CreatePieInsightFromCallTableDtoQueriesItem + from .create_play_ht_credential_dto import CreatePlayHtCredentialDto + from .create_query_tool_dto import CreateQueryToolDto + from .create_query_tool_dto_messages_item import ( + CreateQueryToolDtoMessagesItem, + CreateQueryToolDtoMessagesItem_RequestComplete, + CreateQueryToolDtoMessagesItem_RequestFailed, + CreateQueryToolDtoMessagesItem_RequestResponseDelayed, + CreateQueryToolDtoMessagesItem_RequestStart, + ) + from .create_rime_ai_credential_dto import CreateRimeAiCredentialDto + from .create_runpod_credential_dto import CreateRunpodCredentialDto + from .create_s_3_credential_dto import CreateS3CredentialDto + from .create_scenario_dto import CreateScenarioDto + from .create_scenario_dto_hooks_item import ( + CreateScenarioDtoHooksItem, + CreateScenarioDtoHooksItem_SimulationRunEnded, + CreateScenarioDtoHooksItem_SimulationRunStarted, + ) + from .create_scorecard_dto import CreateScorecardDto + from .create_sesame_voice_dto import CreateSesameVoiceDto + from .create_simulation_dto import CreateSimulationDto + from .create_simulation_run_dto import CreateSimulationRunDto + from .create_simulation_run_dto_simulations_item import ( + CreateSimulationRunDtoSimulationsItem, + CreateSimulationRunDtoSimulationsItem_Simulation, + CreateSimulationRunDtoSimulationsItem_SimulationSuite, + ) + from .create_simulation_run_dto_target import ( + CreateSimulationRunDtoTarget, + CreateSimulationRunDtoTarget_Assistant, + CreateSimulationRunDtoTarget_Squad, + ) + from .create_simulation_suite_dto import CreateSimulationSuiteDto + from .create_sip_request_tool_dto import CreateSipRequestToolDto + from .create_sip_request_tool_dto_body import CreateSipRequestToolDtoBody + from .create_sip_request_tool_dto_messages_item import ( + CreateSipRequestToolDtoMessagesItem, + CreateSipRequestToolDtoMessagesItem_RequestComplete, + CreateSipRequestToolDtoMessagesItem_RequestFailed, + CreateSipRequestToolDtoMessagesItem_RequestResponseDelayed, + CreateSipRequestToolDtoMessagesItem_RequestStart, + ) + from .create_sip_request_tool_dto_verb import CreateSipRequestToolDtoVerb + from .create_slack_o_auth_2_authorization_credential_dto import CreateSlackOAuth2AuthorizationCredentialDto + from .create_slack_send_message_tool_dto import CreateSlackSendMessageToolDto + from .create_slack_send_message_tool_dto_messages_item import ( + CreateSlackSendMessageToolDtoMessagesItem, + CreateSlackSendMessageToolDtoMessagesItem_RequestComplete, + CreateSlackSendMessageToolDtoMessagesItem_RequestFailed, + CreateSlackSendMessageToolDtoMessagesItem_RequestResponseDelayed, + CreateSlackSendMessageToolDtoMessagesItem_RequestStart, + ) + from .create_slack_webhook_credential_dto import CreateSlackWebhookCredentialDto + from .create_smallest_ai_credential_dto import CreateSmallestAiCredentialDto + from .create_sms_tool_dto import CreateSmsToolDto + from .create_sms_tool_dto_messages_item import ( + CreateSmsToolDtoMessagesItem, + CreateSmsToolDtoMessagesItem_RequestComplete, + CreateSmsToolDtoMessagesItem_RequestFailed, + CreateSmsToolDtoMessagesItem_RequestResponseDelayed, + CreateSmsToolDtoMessagesItem_RequestStart, + ) + from .create_soniox_credential_dto import CreateSonioxCredentialDto + from .create_speechmatics_credential_dto import CreateSpeechmaticsCredentialDto + from .create_squad_dto import CreateSquadDto + from .create_structured_output_dto import CreateStructuredOutputDto + from .create_structured_output_dto_model import ( + CreateStructuredOutputDtoModel, + CreateStructuredOutputDtoModel_Anthropic, + CreateStructuredOutputDtoModel_AnthropicBedrock, + CreateStructuredOutputDtoModel_CustomLlm, + CreateStructuredOutputDtoModel_Google, + CreateStructuredOutputDtoModel_Openai, + ) + from .create_structured_output_dto_type import CreateStructuredOutputDtoType + from .create_supabase_credential_dto import CreateSupabaseCredentialDto + from .create_tavus_credential_dto import CreateTavusCredentialDto + from .create_telnyx_phone_number_dto import CreateTelnyxPhoneNumberDto + from .create_telnyx_phone_number_dto_fallback_destination import ( + CreateTelnyxPhoneNumberDtoFallbackDestination, + CreateTelnyxPhoneNumberDtoFallbackDestination_Number, + CreateTelnyxPhoneNumberDtoFallbackDestination_Sip, + ) + from .create_telnyx_phone_number_dto_hooks_item import ( + CreateTelnyxPhoneNumberDtoHooksItem, + CreateTelnyxPhoneNumberDtoHooksItem_CallEnding, + CreateTelnyxPhoneNumberDtoHooksItem_CallRinging, + ) + from .create_test_suite_dto import CreateTestSuiteDto + from .create_test_suite_run_dto import CreateTestSuiteRunDto + from .create_test_suite_test_chat_dto import CreateTestSuiteTestChatDto + from .create_test_suite_test_chat_dto_type import CreateTestSuiteTestChatDtoType + from .create_test_suite_test_voice_dto import CreateTestSuiteTestVoiceDto + from .create_test_suite_test_voice_dto_type import CreateTestSuiteTestVoiceDtoType + from .create_text_editor_tool_dto import CreateTextEditorToolDto + from .create_text_editor_tool_dto_messages_item import ( + CreateTextEditorToolDtoMessagesItem, + CreateTextEditorToolDtoMessagesItem_RequestComplete, + CreateTextEditorToolDtoMessagesItem_RequestFailed, + CreateTextEditorToolDtoMessagesItem_RequestResponseDelayed, + CreateTextEditorToolDtoMessagesItem_RequestStart, + ) + from .create_text_editor_tool_dto_name import CreateTextEditorToolDtoName + from .create_text_editor_tool_dto_sub_type import CreateTextEditorToolDtoSubType + from .create_text_insight_from_call_table_dto import CreateTextInsightFromCallTableDto + from .create_text_insight_from_call_table_dto_queries_item import CreateTextInsightFromCallTableDtoQueriesItem + from .create_together_ai_credential_dto import CreateTogetherAiCredentialDto + from .create_token_dto import CreateTokenDto + from .create_token_dto_tag import CreateTokenDtoTag + from .create_tool_template_dto import CreateToolTemplateDto + from .create_tool_template_dto_details import ( + CreateToolTemplateDtoDetails, + CreateToolTemplateDtoDetails_ApiRequest, + CreateToolTemplateDtoDetails_Bash, + CreateToolTemplateDtoDetails_Code, + CreateToolTemplateDtoDetails_Computer, + CreateToolTemplateDtoDetails_Dtmf, + CreateToolTemplateDtoDetails_EndCall, + CreateToolTemplateDtoDetails_Function, + CreateToolTemplateDtoDetails_GohighlevelCalendarAvailabilityCheck, + CreateToolTemplateDtoDetails_GohighlevelCalendarEventCreate, + CreateToolTemplateDtoDetails_GohighlevelContactCreate, + CreateToolTemplateDtoDetails_GohighlevelContactGet, + CreateToolTemplateDtoDetails_GoogleCalendarAvailabilityCheck, + CreateToolTemplateDtoDetails_GoogleCalendarEventCreate, + CreateToolTemplateDtoDetails_GoogleSheetsRowAppend, + CreateToolTemplateDtoDetails_Handoff, + CreateToolTemplateDtoDetails_Mcp, + CreateToolTemplateDtoDetails_Query, + CreateToolTemplateDtoDetails_SipRequest, + CreateToolTemplateDtoDetails_SlackMessageSend, + CreateToolTemplateDtoDetails_Sms, + CreateToolTemplateDtoDetails_TextEditor, + CreateToolTemplateDtoDetails_TransferCall, + CreateToolTemplateDtoDetails_Voicemail, + ) + from .create_tool_template_dto_provider import CreateToolTemplateDtoProvider + from .create_tool_template_dto_provider_details import ( + CreateToolTemplateDtoProviderDetails, + CreateToolTemplateDtoProviderDetails_Function, + CreateToolTemplateDtoProviderDetails_Ghl, + CreateToolTemplateDtoProviderDetails_GohighlevelCalendarAvailabilityCheck, + CreateToolTemplateDtoProviderDetails_GohighlevelCalendarEventCreate, + CreateToolTemplateDtoProviderDetails_GohighlevelContactCreate, + CreateToolTemplateDtoProviderDetails_GohighlevelContactGet, + CreateToolTemplateDtoProviderDetails_GoogleCalendarEventCreate, + CreateToolTemplateDtoProviderDetails_GoogleSheetsRowAppend, + CreateToolTemplateDtoProviderDetails_Make, + ) + from .create_tool_template_dto_type import CreateToolTemplateDtoType + from .create_tool_template_dto_visibility import CreateToolTemplateDtoVisibility + from .create_transfer_call_tool_dto import CreateTransferCallToolDto + from .create_transfer_call_tool_dto_destinations_item import ( + CreateTransferCallToolDtoDestinationsItem, + CreateTransferCallToolDtoDestinationsItem_Assistant, + CreateTransferCallToolDtoDestinationsItem_Number, + CreateTransferCallToolDtoDestinationsItem_Sip, + ) + from .create_transfer_call_tool_dto_messages_item import ( + CreateTransferCallToolDtoMessagesItem, + CreateTransferCallToolDtoMessagesItem_RequestComplete, + CreateTransferCallToolDtoMessagesItem_RequestFailed, + CreateTransferCallToolDtoMessagesItem_RequestResponseDelayed, + CreateTransferCallToolDtoMessagesItem_RequestStart, + ) + from .create_trieve_credential_dto import CreateTrieveCredentialDto + from .create_trieve_knowledge_base_dto import CreateTrieveKnowledgeBaseDto + from .create_trieve_knowledge_base_dto_provider import CreateTrieveKnowledgeBaseDtoProvider + from .create_twilio_credential_dto import CreateTwilioCredentialDto + from .create_twilio_phone_number_dto import CreateTwilioPhoneNumberDto + from .create_twilio_phone_number_dto_fallback_destination import ( + CreateTwilioPhoneNumberDtoFallbackDestination, + CreateTwilioPhoneNumberDtoFallbackDestination_Number, + CreateTwilioPhoneNumberDtoFallbackDestination_Sip, + ) + from .create_twilio_phone_number_dto_hooks_item import ( + CreateTwilioPhoneNumberDtoHooksItem, + CreateTwilioPhoneNumberDtoHooksItem_CallEnding, + CreateTwilioPhoneNumberDtoHooksItem_CallRinging, + ) + from .create_vapi_phone_number_dto import CreateVapiPhoneNumberDto + from .create_vapi_phone_number_dto_fallback_destination import ( + CreateVapiPhoneNumberDtoFallbackDestination, + CreateVapiPhoneNumberDtoFallbackDestination_Number, + CreateVapiPhoneNumberDtoFallbackDestination_Sip, + ) + from .create_vapi_phone_number_dto_hooks_item import ( + CreateVapiPhoneNumberDtoHooksItem, + CreateVapiPhoneNumberDtoHooksItem_CallEnding, + CreateVapiPhoneNumberDtoHooksItem_CallRinging, + ) + from .create_voicemail_tool_dto import CreateVoicemailToolDto + from .create_voicemail_tool_dto_messages_item import ( + CreateVoicemailToolDtoMessagesItem, + CreateVoicemailToolDtoMessagesItem_RequestComplete, + CreateVoicemailToolDtoMessagesItem_RequestFailed, + CreateVoicemailToolDtoMessagesItem_RequestResponseDelayed, + CreateVoicemailToolDtoMessagesItem_RequestStart, + ) + from .create_vonage_credential_dto import CreateVonageCredentialDto + from .create_vonage_phone_number_dto import CreateVonagePhoneNumberDto + from .create_vonage_phone_number_dto_fallback_destination import ( + CreateVonagePhoneNumberDtoFallbackDestination, + CreateVonagePhoneNumberDtoFallbackDestination_Number, + CreateVonagePhoneNumberDtoFallbackDestination_Sip, + ) + from .create_vonage_phone_number_dto_hooks_item import ( + CreateVonagePhoneNumberDtoHooksItem, + CreateVonagePhoneNumberDtoHooksItem_CallEnding, + CreateVonagePhoneNumberDtoHooksItem_CallRinging, + ) + from .create_web_call_dto import CreateWebCallDto + from .create_web_chat_dto import CreateWebChatDto + from .create_web_chat_dto_input import CreateWebChatDtoInput + from .create_web_chat_dto_input_one_item import CreateWebChatDtoInputOneItem + from .create_web_customer_dto import CreateWebCustomerDto + from .create_webhook_credential_dto import CreateWebhookCredentialDto + from .create_webhook_credential_dto_authentication_plan import ( + CreateWebhookCredentialDtoAuthenticationPlan, + CreateWebhookCredentialDtoAuthenticationPlan_Bearer, + CreateWebhookCredentialDtoAuthenticationPlan_Hmac, + CreateWebhookCredentialDtoAuthenticationPlan_Oauth2, + ) + from .create_well_said_credential_dto import CreateWellSaidCredentialDto + from .create_workflow_dto import CreateWorkflowDto + from .create_workflow_dto_background_sound import CreateWorkflowDtoBackgroundSound + from .create_workflow_dto_background_sound_zero import CreateWorkflowDtoBackgroundSoundZero + from .create_workflow_dto_credentials_item import ( + CreateWorkflowDtoCredentialsItem, + CreateWorkflowDtoCredentialsItem_11Labs, + CreateWorkflowDtoCredentialsItem_Anthropic, + CreateWorkflowDtoCredentialsItem_AnthropicBedrock, + CreateWorkflowDtoCredentialsItem_Anyscale, + CreateWorkflowDtoCredentialsItem_AssemblyAi, + CreateWorkflowDtoCredentialsItem_Azure, + CreateWorkflowDtoCredentialsItem_AzureOpenai, + CreateWorkflowDtoCredentialsItem_ByoSipTrunk, + CreateWorkflowDtoCredentialsItem_Cartesia, + CreateWorkflowDtoCredentialsItem_Cerebras, + CreateWorkflowDtoCredentialsItem_Cloudflare, + CreateWorkflowDtoCredentialsItem_CustomCredential, + CreateWorkflowDtoCredentialsItem_CustomLlm, + CreateWorkflowDtoCredentialsItem_DeepSeek, + CreateWorkflowDtoCredentialsItem_Deepgram, + CreateWorkflowDtoCredentialsItem_Deepinfra, + CreateWorkflowDtoCredentialsItem_Email, + CreateWorkflowDtoCredentialsItem_Gcp, + CreateWorkflowDtoCredentialsItem_GhlOauth2Authorization, + CreateWorkflowDtoCredentialsItem_Gladia, + CreateWorkflowDtoCredentialsItem_Gohighlevel, + CreateWorkflowDtoCredentialsItem_Google, + CreateWorkflowDtoCredentialsItem_GoogleCalendarOauth2Authorization, + CreateWorkflowDtoCredentialsItem_GoogleCalendarOauth2Client, + CreateWorkflowDtoCredentialsItem_GoogleSheetsOauth2Authorization, + CreateWorkflowDtoCredentialsItem_Groq, + CreateWorkflowDtoCredentialsItem_Hume, + CreateWorkflowDtoCredentialsItem_InflectionAi, + CreateWorkflowDtoCredentialsItem_Inworld, + CreateWorkflowDtoCredentialsItem_Langfuse, + CreateWorkflowDtoCredentialsItem_Lmnt, + CreateWorkflowDtoCredentialsItem_Make, + CreateWorkflowDtoCredentialsItem_Minimax, + CreateWorkflowDtoCredentialsItem_Mistral, + CreateWorkflowDtoCredentialsItem_Neuphonic, + CreateWorkflowDtoCredentialsItem_Openai, + CreateWorkflowDtoCredentialsItem_Openrouter, + CreateWorkflowDtoCredentialsItem_PerplexityAi, + CreateWorkflowDtoCredentialsItem_Playht, + CreateWorkflowDtoCredentialsItem_RimeAi, + CreateWorkflowDtoCredentialsItem_Runpod, + CreateWorkflowDtoCredentialsItem_S3, + CreateWorkflowDtoCredentialsItem_SlackOauth2Authorization, + CreateWorkflowDtoCredentialsItem_SlackWebhook, + CreateWorkflowDtoCredentialsItem_SmallestAi, + CreateWorkflowDtoCredentialsItem_Soniox, + CreateWorkflowDtoCredentialsItem_Speechmatics, + CreateWorkflowDtoCredentialsItem_Supabase, + CreateWorkflowDtoCredentialsItem_Tavus, + CreateWorkflowDtoCredentialsItem_TogetherAi, + CreateWorkflowDtoCredentialsItem_Trieve, + CreateWorkflowDtoCredentialsItem_Twilio, + CreateWorkflowDtoCredentialsItem_Vonage, + CreateWorkflowDtoCredentialsItem_Webhook, + CreateWorkflowDtoCredentialsItem_Wellsaid, + CreateWorkflowDtoCredentialsItem_Xai, + ) + from .create_workflow_dto_hooks_item import CreateWorkflowDtoHooksItem + from .create_workflow_dto_model import ( + CreateWorkflowDtoModel, + CreateWorkflowDtoModel_Anthropic, + CreateWorkflowDtoModel_AnthropicBedrock, + CreateWorkflowDtoModel_CustomLlm, + CreateWorkflowDtoModel_Google, + CreateWorkflowDtoModel_Openai, + ) + from .create_workflow_dto_nodes_item import ( + CreateWorkflowDtoNodesItem, + CreateWorkflowDtoNodesItem_Conversation, + CreateWorkflowDtoNodesItem_Tool, + ) + from .create_workflow_dto_transcriber import ( + CreateWorkflowDtoTranscriber, + CreateWorkflowDtoTranscriber_11Labs, + CreateWorkflowDtoTranscriber_AssemblyAi, + CreateWorkflowDtoTranscriber_Azure, + CreateWorkflowDtoTranscriber_Cartesia, + CreateWorkflowDtoTranscriber_CustomTranscriber, + CreateWorkflowDtoTranscriber_Deepgram, + CreateWorkflowDtoTranscriber_Gladia, + CreateWorkflowDtoTranscriber_Google, + CreateWorkflowDtoTranscriber_Openai, + CreateWorkflowDtoTranscriber_Soniox, + CreateWorkflowDtoTranscriber_Speechmatics, + CreateWorkflowDtoTranscriber_Talkscriber, + ) + from .create_workflow_dto_voice import ( + CreateWorkflowDtoVoice, + CreateWorkflowDtoVoice_11Labs, + CreateWorkflowDtoVoice_Azure, + CreateWorkflowDtoVoice_Cartesia, + CreateWorkflowDtoVoice_CustomVoice, + CreateWorkflowDtoVoice_Deepgram, + CreateWorkflowDtoVoice_Hume, + CreateWorkflowDtoVoice_Inworld, + CreateWorkflowDtoVoice_Lmnt, + CreateWorkflowDtoVoice_Minimax, + CreateWorkflowDtoVoice_Neuphonic, + CreateWorkflowDtoVoice_Openai, + CreateWorkflowDtoVoice_Playht, + CreateWorkflowDtoVoice_RimeAi, + CreateWorkflowDtoVoice_Sesame, + CreateWorkflowDtoVoice_SmallestAi, + CreateWorkflowDtoVoice_Tavus, + CreateWorkflowDtoVoice_Vapi, + CreateWorkflowDtoVoice_Wellsaid, + ) + from .create_workflow_dto_voicemail_detection import CreateWorkflowDtoVoicemailDetection + from .create_workflow_dto_voicemail_detection_zero import CreateWorkflowDtoVoicemailDetectionZero + from .create_x_ai_credential_dto import CreateXAiCredentialDto + from .credential_action_request import CredentialActionRequest + from .credential_end_user import CredentialEndUser + from .credential_session_error import CredentialSessionError + from .credential_session_response import CredentialSessionResponse + from .credential_webhook_dto import CredentialWebhookDto + from .credential_webhook_dto_auth_mode import CredentialWebhookDtoAuthMode + from .credential_webhook_dto_operation import CredentialWebhookDtoOperation + from .credential_webhook_dto_type import CredentialWebhookDtoType + from .custom_credential import CustomCredential + from .custom_credential_authentication_plan import ( + CustomCredentialAuthenticationPlan, + CustomCredentialAuthenticationPlan_Bearer, + CustomCredentialAuthenticationPlan_Hmac, + CustomCredentialAuthenticationPlan_Oauth2, + ) + from .custom_credential_encryption_plan import ( + CustomCredentialEncryptionPlan, + CustomCredentialEncryptionPlan_PublicKey, + ) + from .custom_credential_provider import CustomCredentialProvider + from .custom_endpointing_model_smart_endpointing_plan import CustomEndpointingModelSmartEndpointingPlan + from .custom_endpointing_model_smart_endpointing_plan_provider import ( + CustomEndpointingModelSmartEndpointingPlanProvider, + ) + from .custom_knowledge_base import CustomKnowledgeBase + from .custom_knowledge_base_provider import CustomKnowledgeBaseProvider + from .custom_llm_credential import CustomLlmCredential + from .custom_llm_credential_provider import CustomLlmCredentialProvider + from .custom_llm_model import CustomLlmModel + from .custom_llm_model_metadata_send_mode import CustomLlmModelMetadataSendMode + from .custom_llm_model_tools_item import ( + CustomLlmModelToolsItem, + CustomLlmModelToolsItem_ApiRequest, + CustomLlmModelToolsItem_Bash, + CustomLlmModelToolsItem_Code, + CustomLlmModelToolsItem_Computer, + CustomLlmModelToolsItem_Dtmf, + CustomLlmModelToolsItem_EndCall, + CustomLlmModelToolsItem_Function, + CustomLlmModelToolsItem_GohighlevelCalendarAvailabilityCheck, + CustomLlmModelToolsItem_GohighlevelCalendarEventCreate, + CustomLlmModelToolsItem_GohighlevelContactCreate, + CustomLlmModelToolsItem_GohighlevelContactGet, + CustomLlmModelToolsItem_GoogleCalendarAvailabilityCheck, + CustomLlmModelToolsItem_GoogleCalendarEventCreate, + CustomLlmModelToolsItem_GoogleSheetsRowAppend, + CustomLlmModelToolsItem_Handoff, + CustomLlmModelToolsItem_Mcp, + CustomLlmModelToolsItem_Query, + CustomLlmModelToolsItem_SipRequest, + CustomLlmModelToolsItem_SlackMessageSend, + CustomLlmModelToolsItem_Sms, + CustomLlmModelToolsItem_TextEditor, + CustomLlmModelToolsItem_TransferCall, + CustomLlmModelToolsItem_Voicemail, + ) + from .custom_message import CustomMessage + from .custom_message_type import CustomMessageType + from .custom_transcriber import CustomTranscriber + from .custom_voice import CustomVoice + from .customer_custom_endpointing_rule import CustomerCustomEndpointingRule + from .customer_speech_timeout_options import CustomerSpeechTimeoutOptions + from .deep_infra_credential import DeepInfraCredential + from .deep_infra_credential_provider import DeepInfraCredentialProvider + from .deep_infra_model import DeepInfraModel + from .deep_infra_model_tools_item import ( + DeepInfraModelToolsItem, + DeepInfraModelToolsItem_ApiRequest, + DeepInfraModelToolsItem_Bash, + DeepInfraModelToolsItem_Code, + DeepInfraModelToolsItem_Computer, + DeepInfraModelToolsItem_Dtmf, + DeepInfraModelToolsItem_EndCall, + DeepInfraModelToolsItem_Function, + DeepInfraModelToolsItem_GohighlevelCalendarAvailabilityCheck, + DeepInfraModelToolsItem_GohighlevelCalendarEventCreate, + DeepInfraModelToolsItem_GohighlevelContactCreate, + DeepInfraModelToolsItem_GohighlevelContactGet, + DeepInfraModelToolsItem_GoogleCalendarAvailabilityCheck, + DeepInfraModelToolsItem_GoogleCalendarEventCreate, + DeepInfraModelToolsItem_GoogleSheetsRowAppend, + DeepInfraModelToolsItem_Handoff, + DeepInfraModelToolsItem_Mcp, + DeepInfraModelToolsItem_Query, + DeepInfraModelToolsItem_SipRequest, + DeepInfraModelToolsItem_SlackMessageSend, + DeepInfraModelToolsItem_Sms, + DeepInfraModelToolsItem_TextEditor, + DeepInfraModelToolsItem_TransferCall, + DeepInfraModelToolsItem_Voicemail, + ) + from .deep_seek_credential import DeepSeekCredential + from .deep_seek_credential_provider import DeepSeekCredentialProvider + from .deep_seek_model import DeepSeekModel + from .deep_seek_model_model import DeepSeekModelModel + from .deep_seek_model_tools_item import ( + DeepSeekModelToolsItem, + DeepSeekModelToolsItem_ApiRequest, + DeepSeekModelToolsItem_Bash, + DeepSeekModelToolsItem_Code, + DeepSeekModelToolsItem_Computer, + DeepSeekModelToolsItem_Dtmf, + DeepSeekModelToolsItem_EndCall, + DeepSeekModelToolsItem_Function, + DeepSeekModelToolsItem_GohighlevelCalendarAvailabilityCheck, + DeepSeekModelToolsItem_GohighlevelCalendarEventCreate, + DeepSeekModelToolsItem_GohighlevelContactCreate, + DeepSeekModelToolsItem_GohighlevelContactGet, + DeepSeekModelToolsItem_GoogleCalendarAvailabilityCheck, + DeepSeekModelToolsItem_GoogleCalendarEventCreate, + DeepSeekModelToolsItem_GoogleSheetsRowAppend, + DeepSeekModelToolsItem_Handoff, + DeepSeekModelToolsItem_Mcp, + DeepSeekModelToolsItem_Query, + DeepSeekModelToolsItem_SipRequest, + DeepSeekModelToolsItem_SlackMessageSend, + DeepSeekModelToolsItem_Sms, + DeepSeekModelToolsItem_TextEditor, + DeepSeekModelToolsItem_TransferCall, + DeepSeekModelToolsItem_Voicemail, + ) + from .deepgram_credential import DeepgramCredential + from .deepgram_credential_provider import DeepgramCredentialProvider + from .deepgram_transcriber import DeepgramTranscriber + from .deepgram_transcriber_language import DeepgramTranscriberLanguage + from .deepgram_transcriber_model import DeepgramTranscriberModel + from .deepgram_voice import DeepgramVoice + from .deepgram_voice_id import DeepgramVoiceId + from .deepgram_voice_model import DeepgramVoiceModel + from .developer_message import DeveloperMessage + from .developer_message_role import DeveloperMessageRole + from .dial_plan_entry import DialPlanEntry + from .dtmf_tool import DtmfTool + from .dtmf_tool_messages_item import ( + DtmfToolMessagesItem, + DtmfToolMessagesItem_RequestComplete, + DtmfToolMessagesItem_RequestFailed, + DtmfToolMessagesItem_RequestResponseDelayed, + DtmfToolMessagesItem_RequestStart, + ) + from .edge import Edge + from .eleven_labs_credential import ElevenLabsCredential + from .eleven_labs_pronunciation_dictionary import ElevenLabsPronunciationDictionary + from .eleven_labs_pronunciation_dictionary_locator import ElevenLabsPronunciationDictionaryLocator + from .eleven_labs_pronunciation_dictionary_permission_on_resource import ( + ElevenLabsPronunciationDictionaryPermissionOnResource, + ) + from .eleven_labs_transcriber import ElevenLabsTranscriber + from .eleven_labs_transcriber_language import ElevenLabsTranscriberLanguage + from .eleven_labs_transcriber_model import ElevenLabsTranscriberModel + from .eleven_labs_voice import ElevenLabsVoice + from .eleven_labs_voice_id import ElevenLabsVoiceId + from .eleven_labs_voice_id_enum import ElevenLabsVoiceIdEnum + from .eleven_labs_voice_model import ElevenLabsVoiceModel + from .email_credential import EmailCredential + from .email_credential_provider import EmailCredentialProvider + from .end_call_tool import EndCallTool + from .end_call_tool_messages_item import ( + EndCallToolMessagesItem, + EndCallToolMessagesItem_RequestComplete, + EndCallToolMessagesItem_RequestFailed, + EndCallToolMessagesItem_RequestResponseDelayed, + EndCallToolMessagesItem_RequestStart, + ) + from .endpointed_speech_low_confidence_options import EndpointedSpeechLowConfidenceOptions + from .eval import Eval + from .eval_anthropic_model import EvalAnthropicModel + from .eval_anthropic_model_model import EvalAnthropicModelModel + from .eval_custom_model import EvalCustomModel + from .eval_google_model import EvalGoogleModel + from .eval_google_model_model import EvalGoogleModelModel + from .eval_groq_model import EvalGroqModel + from .eval_groq_model_model import EvalGroqModelModel + from .eval_groq_model_provider import EvalGroqModelProvider + from .eval_messages_item import EvalMessagesItem + from .eval_model_list_options import EvalModelListOptions + from .eval_model_list_options_provider import EvalModelListOptionsProvider + from .eval_open_ai_model import EvalOpenAiModel + from .eval_open_ai_model_model import EvalOpenAiModelModel + from .eval_paginated_response import EvalPaginatedResponse + from .eval_run import EvalRun + from .eval_run_ended_reason import EvalRunEndedReason + from .eval_run_paginated_response import EvalRunPaginatedResponse + from .eval_run_result import EvalRunResult + from .eval_run_result_messages_item import ( + EvalRunResultMessagesItem, + EvalRunResultMessagesItem_Assistant, + EvalRunResultMessagesItem_System, + EvalRunResultMessagesItem_Tool, + EvalRunResultMessagesItem_User, + ) + from .eval_run_result_status import EvalRunResultStatus + from .eval_run_status import EvalRunStatus + from .eval_run_target import EvalRunTarget, EvalRunTarget_Assistant, EvalRunTarget_Squad + from .eval_run_target_assistant import EvalRunTargetAssistant + from .eval_run_target_squad import EvalRunTargetSquad + from .eval_run_type import EvalRunType + from .eval_type import EvalType + from .eval_user_editable import EvalUserEditable + from .eval_user_editable_messages_item import EvalUserEditableMessagesItem + from .eval_user_editable_type import EvalUserEditableType + from .evaluation_plan_item import EvaluationPlanItem + from .evaluation_plan_item_comparator import EvaluationPlanItemComparator + from .evaluation_plan_item_value import EvaluationPlanItemValue + from .events_table_boolean_condition import EventsTableBooleanCondition + from .events_table_boolean_condition_operator import EventsTableBooleanConditionOperator + from .events_table_number_condition import EventsTableNumberCondition + from .events_table_number_condition_operator import EventsTableNumberConditionOperator + from .events_table_string_condition import EventsTableStringCondition + from .events_table_string_condition_operator import EventsTableStringConditionOperator + from .exact_replacement import ExactReplacement + from .export_chat_dto import ExportChatDto + from .export_chat_dto_columns import ExportChatDtoColumns + from .export_chat_dto_format import ExportChatDtoFormat + from .export_chat_dto_sort_order import ExportChatDtoSortOrder + from .export_session_dto import ExportSessionDto + from .export_session_dto_columns import ExportSessionDtoColumns + from .export_session_dto_format import ExportSessionDtoFormat + from .export_session_dto_sort_order import ExportSessionDtoSortOrder + from .failed_edge_condition import FailedEdgeCondition + from .fallback_assembly_ai_transcriber import FallbackAssemblyAiTranscriber + from .fallback_assembly_ai_transcriber_language import FallbackAssemblyAiTranscriberLanguage + from .fallback_assembly_ai_transcriber_speech_model import FallbackAssemblyAiTranscriberSpeechModel + from .fallback_azure_speech_transcriber import FallbackAzureSpeechTranscriber + from .fallback_azure_speech_transcriber_language import FallbackAzureSpeechTranscriberLanguage + from .fallback_azure_speech_transcriber_segmentation_strategy import ( + FallbackAzureSpeechTranscriberSegmentationStrategy, + ) + from .fallback_azure_voice import FallbackAzureVoice + from .fallback_azure_voice_id import FallbackAzureVoiceId + from .fallback_azure_voice_id_zero import FallbackAzureVoiceIdZero + from .fallback_cartesia_transcriber import FallbackCartesiaTranscriber + from .fallback_cartesia_transcriber_language import FallbackCartesiaTranscriberLanguage + from .fallback_cartesia_transcriber_model import FallbackCartesiaTranscriberModel + from .fallback_cartesia_voice import FallbackCartesiaVoice + from .fallback_cartesia_voice_language import FallbackCartesiaVoiceLanguage + from .fallback_cartesia_voice_model import FallbackCartesiaVoiceModel + from .fallback_custom_transcriber import FallbackCustomTranscriber + from .fallback_custom_voice import FallbackCustomVoice + from .fallback_deepgram_transcriber import FallbackDeepgramTranscriber + from .fallback_deepgram_transcriber_language import FallbackDeepgramTranscriberLanguage + from .fallback_deepgram_transcriber_model import FallbackDeepgramTranscriberModel + from .fallback_deepgram_voice import FallbackDeepgramVoice + from .fallback_deepgram_voice_id import FallbackDeepgramVoiceId + from .fallback_deepgram_voice_model import FallbackDeepgramVoiceModel + from .fallback_eleven_labs_transcriber import FallbackElevenLabsTranscriber + from .fallback_eleven_labs_transcriber_language import FallbackElevenLabsTranscriberLanguage + from .fallback_eleven_labs_transcriber_model import FallbackElevenLabsTranscriberModel + from .fallback_eleven_labs_voice import FallbackElevenLabsVoice + from .fallback_eleven_labs_voice_id import FallbackElevenLabsVoiceId + from .fallback_eleven_labs_voice_id_enum import FallbackElevenLabsVoiceIdEnum + from .fallback_eleven_labs_voice_model import FallbackElevenLabsVoiceModel + from .fallback_gladia_transcriber import FallbackGladiaTranscriber + from .fallback_gladia_transcriber_language import FallbackGladiaTranscriberLanguage + from .fallback_gladia_transcriber_language_behaviour import FallbackGladiaTranscriberLanguageBehaviour + from .fallback_gladia_transcriber_languages import FallbackGladiaTranscriberLanguages + from .fallback_gladia_transcriber_model import FallbackGladiaTranscriberModel + from .fallback_gladia_transcriber_region import FallbackGladiaTranscriberRegion + from .fallback_google_transcriber import FallbackGoogleTranscriber + from .fallback_google_transcriber_language import FallbackGoogleTranscriberLanguage + from .fallback_google_transcriber_model import FallbackGoogleTranscriberModel + from .fallback_hume_voice import FallbackHumeVoice + from .fallback_hume_voice_model import FallbackHumeVoiceModel + from .fallback_inworld_voice import FallbackInworldVoice + from .fallback_inworld_voice_language_code import FallbackInworldVoiceLanguageCode + from .fallback_inworld_voice_model import FallbackInworldVoiceModel + from .fallback_inworld_voice_voice_id import FallbackInworldVoiceVoiceId + from .fallback_lmnt_voice import FallbackLmntVoice + from .fallback_lmnt_voice_id import FallbackLmntVoiceId + from .fallback_lmnt_voice_id_enum import FallbackLmntVoiceIdEnum + from .fallback_lmnt_voice_language import FallbackLmntVoiceLanguage + from .fallback_minimax_voice import FallbackMinimaxVoice + from .fallback_minimax_voice_language_boost import FallbackMinimaxVoiceLanguageBoost + from .fallback_minimax_voice_model import FallbackMinimaxVoiceModel + from .fallback_minimax_voice_provider import FallbackMinimaxVoiceProvider + from .fallback_minimax_voice_region import FallbackMinimaxVoiceRegion + from .fallback_minimax_voice_subtitle_type import FallbackMinimaxVoiceSubtitleType + from .fallback_neets_voice import FallbackNeetsVoice + from .fallback_neuphonic_voice import FallbackNeuphonicVoice + from .fallback_neuphonic_voice_model import FallbackNeuphonicVoiceModel + from .fallback_open_ai_transcriber import FallbackOpenAiTranscriber + from .fallback_open_ai_transcriber_language import FallbackOpenAiTranscriberLanguage + from .fallback_open_ai_transcriber_model import FallbackOpenAiTranscriberModel + from .fallback_open_ai_voice import FallbackOpenAiVoice + from .fallback_open_ai_voice_id import FallbackOpenAiVoiceId + from .fallback_open_ai_voice_id_enum import FallbackOpenAiVoiceIdEnum + from .fallback_open_ai_voice_model import FallbackOpenAiVoiceModel + from .fallback_plan import FallbackPlan + from .fallback_plan_voices_item import ( + FallbackPlanVoicesItem, + FallbackPlanVoicesItem_11Labs, + FallbackPlanVoicesItem_Azure, + FallbackPlanVoicesItem_Cartesia, + FallbackPlanVoicesItem_CustomVoice, + FallbackPlanVoicesItem_Deepgram, + FallbackPlanVoicesItem_Hume, + FallbackPlanVoicesItem_Inworld, + FallbackPlanVoicesItem_Lmnt, + FallbackPlanVoicesItem_Neuphonic, + FallbackPlanVoicesItem_Openai, + FallbackPlanVoicesItem_Playht, + FallbackPlanVoicesItem_RimeAi, + FallbackPlanVoicesItem_Sesame, + FallbackPlanVoicesItem_SmallestAi, + FallbackPlanVoicesItem_Tavus, + FallbackPlanVoicesItem_Vapi, + FallbackPlanVoicesItem_Wellsaid, + ) + from .fallback_play_ht_voice import FallbackPlayHtVoice + from .fallback_play_ht_voice_emotion import FallbackPlayHtVoiceEmotion + from .fallback_play_ht_voice_id import FallbackPlayHtVoiceId + from .fallback_play_ht_voice_id_enum import FallbackPlayHtVoiceIdEnum + from .fallback_play_ht_voice_language import FallbackPlayHtVoiceLanguage + from .fallback_play_ht_voice_model import FallbackPlayHtVoiceModel + from .fallback_rime_ai_voice import FallbackRimeAiVoice + from .fallback_rime_ai_voice_id import FallbackRimeAiVoiceId + from .fallback_rime_ai_voice_id_enum import FallbackRimeAiVoiceIdEnum + from .fallback_rime_ai_voice_language import FallbackRimeAiVoiceLanguage + from .fallback_rime_ai_voice_model import FallbackRimeAiVoiceModel + from .fallback_sesame_voice import FallbackSesameVoice + from .fallback_sesame_voice_model import FallbackSesameVoiceModel + from .fallback_smallest_ai_voice import FallbackSmallestAiVoice + from .fallback_smallest_ai_voice_id import FallbackSmallestAiVoiceId + from .fallback_smallest_ai_voice_id_enum import FallbackSmallestAiVoiceIdEnum + from .fallback_smallest_ai_voice_model import FallbackSmallestAiVoiceModel + from .fallback_soniox_transcriber import FallbackSonioxTranscriber + from .fallback_soniox_transcriber_language import FallbackSonioxTranscriberLanguage + from .fallback_soniox_transcriber_model import FallbackSonioxTranscriberModel + from .fallback_speechmatics_transcriber import FallbackSpeechmaticsTranscriber + from .fallback_speechmatics_transcriber_language import FallbackSpeechmaticsTranscriberLanguage + from .fallback_speechmatics_transcriber_model import FallbackSpeechmaticsTranscriberModel + from .fallback_speechmatics_transcriber_numeral_style import FallbackSpeechmaticsTranscriberNumeralStyle + from .fallback_speechmatics_transcriber_operating_point import FallbackSpeechmaticsTranscriberOperatingPoint + from .fallback_speechmatics_transcriber_region import FallbackSpeechmaticsTranscriberRegion + from .fallback_talkscriber_transcriber import FallbackTalkscriberTranscriber + from .fallback_talkscriber_transcriber_language import FallbackTalkscriberTranscriberLanguage + from .fallback_talkscriber_transcriber_model import FallbackTalkscriberTranscriberModel + from .fallback_tavus_voice import FallbackTavusVoice + from .fallback_tavus_voice_voice_id import FallbackTavusVoiceVoiceId + from .fallback_tavus_voice_voice_id_zero import FallbackTavusVoiceVoiceIdZero + from .fallback_transcriber_plan import FallbackTranscriberPlan + from .fallback_transcriber_plan_transcribers_item import ( + FallbackTranscriberPlanTranscribersItem, + FallbackTranscriberPlanTranscribersItem_11Labs, + FallbackTranscriberPlanTranscribersItem_AssemblyAi, + FallbackTranscriberPlanTranscribersItem_Azure, + FallbackTranscriberPlanTranscribersItem_Cartesia, + FallbackTranscriberPlanTranscribersItem_CustomTranscriber, + FallbackTranscriberPlanTranscribersItem_Deepgram, + FallbackTranscriberPlanTranscribersItem_Gladia, + FallbackTranscriberPlanTranscribersItem_Google, + FallbackTranscriberPlanTranscribersItem_Openai, + FallbackTranscriberPlanTranscribersItem_Soniox, + FallbackTranscriberPlanTranscribersItem_Speechmatics, + FallbackTranscriberPlanTranscribersItem_Talkscriber, + ) + from .fallback_vapi_voice import FallbackVapiVoice + from .fallback_vapi_voice_voice_id import FallbackVapiVoiceVoiceId + from .fallback_well_said_voice import FallbackWellSaidVoice + from .fallback_well_said_voice_model import FallbackWellSaidVoiceModel + from .file import File + from .file_object import FileObject + from .file_status import FileStatus + from .filter_date_type_column_on_call_table import FilterDateTypeColumnOnCallTable + from .filter_date_type_column_on_call_table_column import FilterDateTypeColumnOnCallTableColumn + from .filter_date_type_column_on_call_table_operator import FilterDateTypeColumnOnCallTableOperator + from .filter_number_array_type_column_on_call_table import FilterNumberArrayTypeColumnOnCallTable + from .filter_number_array_type_column_on_call_table_column import FilterNumberArrayTypeColumnOnCallTableColumn + from .filter_number_array_type_column_on_call_table_operator import FilterNumberArrayTypeColumnOnCallTableOperator + from .filter_number_type_column_on_call_table import FilterNumberTypeColumnOnCallTable + from .filter_number_type_column_on_call_table_column import FilterNumberTypeColumnOnCallTableColumn + from .filter_number_type_column_on_call_table_operator import FilterNumberTypeColumnOnCallTableOperator + from .filter_string_array_type_column_on_call_table import FilterStringArrayTypeColumnOnCallTable + from .filter_string_array_type_column_on_call_table_column import FilterStringArrayTypeColumnOnCallTableColumn + from .filter_string_array_type_column_on_call_table_operator import FilterStringArrayTypeColumnOnCallTableOperator + from .filter_string_type_column_on_call_table import FilterStringTypeColumnOnCallTable + from .filter_string_type_column_on_call_table_column import FilterStringTypeColumnOnCallTableColumn + from .filter_string_type_column_on_call_table_operator import FilterStringTypeColumnOnCallTableOperator + from .filter_structured_output_column_on_call_table import FilterStructuredOutputColumnOnCallTable + from .filter_structured_output_column_on_call_table_column import FilterStructuredOutputColumnOnCallTableColumn + from .filter_structured_output_column_on_call_table_operator import FilterStructuredOutputColumnOnCallTableOperator + from .format_plan import FormatPlan + from .format_plan_formatters_enabled_item import FormatPlanFormattersEnabledItem + from .format_plan_replacements_item import ( + FormatPlanReplacementsItem, + FormatPlanReplacementsItem_Exact, + FormatPlanReplacementsItem_Regex, + ) + from .fourier_denoising_plan import FourierDenoisingPlan + from .function_call import FunctionCall + from .function_call_assistant_hook_action import FunctionCallAssistantHookAction + from .function_call_hook_action import FunctionCallHookAction + from .function_call_hook_action_messages_item import ( + FunctionCallHookActionMessagesItem, + FunctionCallHookActionMessagesItem_RequestComplete, + FunctionCallHookActionMessagesItem_RequestFailed, + FunctionCallHookActionMessagesItem_RequestResponseDelayed, + FunctionCallHookActionMessagesItem_RequestStart, + ) + from .function_call_hook_action_type import FunctionCallHookActionType + from .function_tool import FunctionTool + from .function_tool_messages_item import ( + FunctionToolMessagesItem, + FunctionToolMessagesItem_RequestComplete, + FunctionToolMessagesItem_RequestFailed, + FunctionToolMessagesItem_RequestResponseDelayed, + FunctionToolMessagesItem_RequestStart, + ) + from .function_tool_provider_details import FunctionToolProviderDetails + from .function_tool_with_tool_call import FunctionToolWithToolCall + from .function_tool_with_tool_call_messages_item import ( + FunctionToolWithToolCallMessagesItem, + FunctionToolWithToolCallMessagesItem_RequestComplete, + FunctionToolWithToolCallMessagesItem_RequestFailed, + FunctionToolWithToolCallMessagesItem_RequestResponseDelayed, + FunctionToolWithToolCallMessagesItem_RequestStart, + ) + from .gcp_credential import GcpCredential + from .gcp_credential_provider import GcpCredentialProvider + from .gcp_key import GcpKey + from .gemini_multimodal_live_prebuilt_voice_config import GeminiMultimodalLivePrebuiltVoiceConfig + from .gemini_multimodal_live_prebuilt_voice_config_voice_name import ( + GeminiMultimodalLivePrebuiltVoiceConfigVoiceName, + ) + from .gemini_multimodal_live_speech_config import GeminiMultimodalLiveSpeechConfig + from .gemini_multimodal_live_voice_config import GeminiMultimodalLiveVoiceConfig + from .generate_scenarios_dto import GenerateScenariosDto + from .generate_scenarios_response import GenerateScenariosResponse + from .generated_scenario import GeneratedScenario + from .generated_scenario_category import GeneratedScenarioCategory + from .get_chat_paginated_dto import GetChatPaginatedDto + from .get_chat_paginated_dto_sort_order import GetChatPaginatedDtoSortOrder + from .get_eval_paginated_dto import GetEvalPaginatedDto + from .get_eval_paginated_dto_sort_order import GetEvalPaginatedDtoSortOrder + from .get_eval_run_paginated_dto import GetEvalRunPaginatedDto + from .get_eval_run_paginated_dto_sort_order import GetEvalRunPaginatedDtoSortOrder + from .get_session_paginated_dto import GetSessionPaginatedDto + from .get_session_paginated_dto_sort_order import GetSessionPaginatedDtoSortOrder + from .ghl_tool import GhlTool + from .ghl_tool_messages_item import ( + GhlToolMessagesItem, + GhlToolMessagesItem_RequestComplete, + GhlToolMessagesItem_RequestFailed, + GhlToolMessagesItem_RequestResponseDelayed, + GhlToolMessagesItem_RequestStart, + ) + from .ghl_tool_metadata import GhlToolMetadata + from .ghl_tool_provider_details import GhlToolProviderDetails + from .ghl_tool_type import GhlToolType + from .ghl_tool_with_tool_call import GhlToolWithToolCall + from .ghl_tool_with_tool_call_messages_item import ( + GhlToolWithToolCallMessagesItem, + GhlToolWithToolCallMessagesItem_RequestComplete, + GhlToolWithToolCallMessagesItem_RequestFailed, + GhlToolWithToolCallMessagesItem_RequestResponseDelayed, + GhlToolWithToolCallMessagesItem_RequestStart, + ) + from .gladia_credential import GladiaCredential + from .gladia_credential_provider import GladiaCredentialProvider + from .gladia_custom_vocabulary_config_dto import GladiaCustomVocabularyConfigDto + from .gladia_custom_vocabulary_config_dto_vocabulary_item import GladiaCustomVocabularyConfigDtoVocabularyItem + from .gladia_transcriber import GladiaTranscriber + from .gladia_transcriber_language import GladiaTranscriberLanguage + from .gladia_transcriber_language_behaviour import GladiaTranscriberLanguageBehaviour + from .gladia_transcriber_languages import GladiaTranscriberLanguages + from .gladia_transcriber_model import GladiaTranscriberModel + from .gladia_transcriber_region import GladiaTranscriberRegion + from .gladia_vocabulary_item_dto import GladiaVocabularyItemDto + from .global_node_plan import GlobalNodePlan + from .go_high_level_calendar_availability_tool import GoHighLevelCalendarAvailabilityTool + from .go_high_level_calendar_availability_tool_messages_item import ( + GoHighLevelCalendarAvailabilityToolMessagesItem, + GoHighLevelCalendarAvailabilityToolMessagesItem_RequestComplete, + GoHighLevelCalendarAvailabilityToolMessagesItem_RequestFailed, + GoHighLevelCalendarAvailabilityToolMessagesItem_RequestResponseDelayed, + GoHighLevelCalendarAvailabilityToolMessagesItem_RequestStart, + ) + from .go_high_level_calendar_availability_tool_provider_details import ( + GoHighLevelCalendarAvailabilityToolProviderDetails, + ) + from .go_high_level_calendar_availability_tool_with_tool_call import GoHighLevelCalendarAvailabilityToolWithToolCall + from .go_high_level_calendar_availability_tool_with_tool_call_messages_item import ( + GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem, + GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem_RequestComplete, + GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem_RequestFailed, + GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem_RequestResponseDelayed, + GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem_RequestStart, + ) + from .go_high_level_calendar_availability_tool_with_tool_call_type import ( + GoHighLevelCalendarAvailabilityToolWithToolCallType, + ) + from .go_high_level_calendar_event_create_tool import GoHighLevelCalendarEventCreateTool + from .go_high_level_calendar_event_create_tool_messages_item import ( + GoHighLevelCalendarEventCreateToolMessagesItem, + GoHighLevelCalendarEventCreateToolMessagesItem_RequestComplete, + GoHighLevelCalendarEventCreateToolMessagesItem_RequestFailed, + GoHighLevelCalendarEventCreateToolMessagesItem_RequestResponseDelayed, + GoHighLevelCalendarEventCreateToolMessagesItem_RequestStart, + ) + from .go_high_level_calendar_event_create_tool_provider_details import ( + GoHighLevelCalendarEventCreateToolProviderDetails, + ) + from .go_high_level_calendar_event_create_tool_with_tool_call import GoHighLevelCalendarEventCreateToolWithToolCall + from .go_high_level_calendar_event_create_tool_with_tool_call_messages_item import ( + GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem, + GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem_RequestComplete, + GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem_RequestFailed, + GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem_RequestResponseDelayed, + GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem_RequestStart, + ) + from .go_high_level_calendar_event_create_tool_with_tool_call_type import ( + GoHighLevelCalendarEventCreateToolWithToolCallType, + ) + from .go_high_level_contact_create_tool import GoHighLevelContactCreateTool + from .go_high_level_contact_create_tool_messages_item import ( + GoHighLevelContactCreateToolMessagesItem, + GoHighLevelContactCreateToolMessagesItem_RequestComplete, + GoHighLevelContactCreateToolMessagesItem_RequestFailed, + GoHighLevelContactCreateToolMessagesItem_RequestResponseDelayed, + GoHighLevelContactCreateToolMessagesItem_RequestStart, + ) + from .go_high_level_contact_create_tool_provider_details import GoHighLevelContactCreateToolProviderDetails + from .go_high_level_contact_create_tool_with_tool_call import GoHighLevelContactCreateToolWithToolCall + from .go_high_level_contact_create_tool_with_tool_call_messages_item import ( + GoHighLevelContactCreateToolWithToolCallMessagesItem, + GoHighLevelContactCreateToolWithToolCallMessagesItem_RequestComplete, + GoHighLevelContactCreateToolWithToolCallMessagesItem_RequestFailed, + GoHighLevelContactCreateToolWithToolCallMessagesItem_RequestResponseDelayed, + GoHighLevelContactCreateToolWithToolCallMessagesItem_RequestStart, + ) + from .go_high_level_contact_create_tool_with_tool_call_type import GoHighLevelContactCreateToolWithToolCallType + from .go_high_level_contact_get_tool import GoHighLevelContactGetTool + from .go_high_level_contact_get_tool_messages_item import ( + GoHighLevelContactGetToolMessagesItem, + GoHighLevelContactGetToolMessagesItem_RequestComplete, + GoHighLevelContactGetToolMessagesItem_RequestFailed, + GoHighLevelContactGetToolMessagesItem_RequestResponseDelayed, + GoHighLevelContactGetToolMessagesItem_RequestStart, + ) + from .go_high_level_contact_get_tool_provider_details import GoHighLevelContactGetToolProviderDetails + from .go_high_level_contact_get_tool_with_tool_call import GoHighLevelContactGetToolWithToolCall + from .go_high_level_contact_get_tool_with_tool_call_messages_item import ( + GoHighLevelContactGetToolWithToolCallMessagesItem, + GoHighLevelContactGetToolWithToolCallMessagesItem_RequestComplete, + GoHighLevelContactGetToolWithToolCallMessagesItem_RequestFailed, + GoHighLevelContactGetToolWithToolCallMessagesItem_RequestResponseDelayed, + GoHighLevelContactGetToolWithToolCallMessagesItem_RequestStart, + ) + from .go_high_level_contact_get_tool_with_tool_call_type import GoHighLevelContactGetToolWithToolCallType + from .go_high_level_credential import GoHighLevelCredential + from .go_high_level_credential_provider import GoHighLevelCredentialProvider + from .go_high_level_mcp_credential import GoHighLevelMcpCredential + from .go_high_level_mcp_credential_provider import GoHighLevelMcpCredentialProvider + from .google_calendar_check_availability_tool import GoogleCalendarCheckAvailabilityTool + from .google_calendar_check_availability_tool_messages_item import ( + GoogleCalendarCheckAvailabilityToolMessagesItem, + GoogleCalendarCheckAvailabilityToolMessagesItem_RequestComplete, + GoogleCalendarCheckAvailabilityToolMessagesItem_RequestFailed, + GoogleCalendarCheckAvailabilityToolMessagesItem_RequestResponseDelayed, + GoogleCalendarCheckAvailabilityToolMessagesItem_RequestStart, + ) + from .google_calendar_create_event_tool import GoogleCalendarCreateEventTool + from .google_calendar_create_event_tool_messages_item import ( + GoogleCalendarCreateEventToolMessagesItem, + GoogleCalendarCreateEventToolMessagesItem_RequestComplete, + GoogleCalendarCreateEventToolMessagesItem_RequestFailed, + GoogleCalendarCreateEventToolMessagesItem_RequestResponseDelayed, + GoogleCalendarCreateEventToolMessagesItem_RequestStart, + ) + from .google_calendar_create_event_tool_provider_details import GoogleCalendarCreateEventToolProviderDetails + from .google_calendar_create_event_tool_with_tool_call import GoogleCalendarCreateEventToolWithToolCall + from .google_calendar_create_event_tool_with_tool_call_messages_item import ( + GoogleCalendarCreateEventToolWithToolCallMessagesItem, + GoogleCalendarCreateEventToolWithToolCallMessagesItem_RequestComplete, + GoogleCalendarCreateEventToolWithToolCallMessagesItem_RequestFailed, + GoogleCalendarCreateEventToolWithToolCallMessagesItem_RequestResponseDelayed, + GoogleCalendarCreateEventToolWithToolCallMessagesItem_RequestStart, + ) + from .google_calendar_o_auth_2_authorization_credential import GoogleCalendarOAuth2AuthorizationCredential + from .google_calendar_o_auth_2_authorization_credential_provider import ( + GoogleCalendarOAuth2AuthorizationCredentialProvider, + ) + from .google_calendar_o_auth_2_client_credential import GoogleCalendarOAuth2ClientCredential + from .google_calendar_o_auth_2_client_credential_provider import GoogleCalendarOAuth2ClientCredentialProvider + from .google_credential import GoogleCredential + from .google_credential_provider import GoogleCredentialProvider + from .google_model import GoogleModel + from .google_model_model import GoogleModelModel + from .google_model_tools_item import ( + GoogleModelToolsItem, + GoogleModelToolsItem_ApiRequest, + GoogleModelToolsItem_Bash, + GoogleModelToolsItem_Code, + GoogleModelToolsItem_Computer, + GoogleModelToolsItem_Dtmf, + GoogleModelToolsItem_EndCall, + GoogleModelToolsItem_Function, + GoogleModelToolsItem_GohighlevelCalendarAvailabilityCheck, + GoogleModelToolsItem_GohighlevelCalendarEventCreate, + GoogleModelToolsItem_GohighlevelContactCreate, + GoogleModelToolsItem_GohighlevelContactGet, + GoogleModelToolsItem_GoogleCalendarAvailabilityCheck, + GoogleModelToolsItem_GoogleCalendarEventCreate, + GoogleModelToolsItem_GoogleSheetsRowAppend, + GoogleModelToolsItem_Handoff, + GoogleModelToolsItem_Mcp, + GoogleModelToolsItem_Query, + GoogleModelToolsItem_SipRequest, + GoogleModelToolsItem_SlackMessageSend, + GoogleModelToolsItem_Sms, + GoogleModelToolsItem_TextEditor, + GoogleModelToolsItem_TransferCall, + GoogleModelToolsItem_Voicemail, + ) + from .google_realtime_config import GoogleRealtimeConfig + from .google_sheets_o_auth_2_authorization_credential import GoogleSheetsOAuth2AuthorizationCredential + from .google_sheets_o_auth_2_authorization_credential_provider import ( + GoogleSheetsOAuth2AuthorizationCredentialProvider, + ) + from .google_sheets_row_append_tool import GoogleSheetsRowAppendTool + from .google_sheets_row_append_tool_messages_item import ( + GoogleSheetsRowAppendToolMessagesItem, + GoogleSheetsRowAppendToolMessagesItem_RequestComplete, + GoogleSheetsRowAppendToolMessagesItem_RequestFailed, + GoogleSheetsRowAppendToolMessagesItem_RequestResponseDelayed, + GoogleSheetsRowAppendToolMessagesItem_RequestStart, + ) + from .google_sheets_row_append_tool_provider_details import GoogleSheetsRowAppendToolProviderDetails + from .google_sheets_row_append_tool_with_tool_call import GoogleSheetsRowAppendToolWithToolCall + from .google_sheets_row_append_tool_with_tool_call_messages_item import ( + GoogleSheetsRowAppendToolWithToolCallMessagesItem, + GoogleSheetsRowAppendToolWithToolCallMessagesItem_RequestComplete, + GoogleSheetsRowAppendToolWithToolCallMessagesItem_RequestFailed, + GoogleSheetsRowAppendToolWithToolCallMessagesItem_RequestResponseDelayed, + GoogleSheetsRowAppendToolWithToolCallMessagesItem_RequestStart, + ) + from .google_sheets_row_append_tool_with_tool_call_type import GoogleSheetsRowAppendToolWithToolCallType + from .google_transcriber import GoogleTranscriber + from .google_transcriber_language import GoogleTranscriberLanguage + from .google_transcriber_model import GoogleTranscriberModel + from .google_voicemail_detection_plan import GoogleVoicemailDetectionPlan + from .google_voicemail_detection_plan_provider import GoogleVoicemailDetectionPlanProvider + from .google_voicemail_detection_plan_type import GoogleVoicemailDetectionPlanType + from .groq_credential import GroqCredential + from .groq_credential_provider import GroqCredentialProvider + from .groq_model import GroqModel + from .groq_model_model import GroqModelModel + from .groq_model_tools_item import ( + GroqModelToolsItem, + GroqModelToolsItem_ApiRequest, + GroqModelToolsItem_Bash, + GroqModelToolsItem_Code, + GroqModelToolsItem_Computer, + GroqModelToolsItem_Dtmf, + GroqModelToolsItem_EndCall, + GroqModelToolsItem_Function, + GroqModelToolsItem_GohighlevelCalendarAvailabilityCheck, + GroqModelToolsItem_GohighlevelCalendarEventCreate, + GroqModelToolsItem_GohighlevelContactCreate, + GroqModelToolsItem_GohighlevelContactGet, + GroqModelToolsItem_GoogleCalendarAvailabilityCheck, + GroqModelToolsItem_GoogleCalendarEventCreate, + GroqModelToolsItem_GoogleSheetsRowAppend, + GroqModelToolsItem_Handoff, + GroqModelToolsItem_Mcp, + GroqModelToolsItem_Query, + GroqModelToolsItem_SipRequest, + GroqModelToolsItem_SlackMessageSend, + GroqModelToolsItem_Sms, + GroqModelToolsItem_TextEditor, + GroqModelToolsItem_TransferCall, + GroqModelToolsItem_Voicemail, + ) + from .group_condition import GroupCondition + from .group_condition_conditions_item import ( + GroupConditionConditionsItem, + GroupConditionConditionsItem_Group, + GroupConditionConditionsItem_Liquid, + GroupConditionConditionsItem_Regex, + ) + from .group_condition_operator import GroupConditionOperator + from .handoff_destination_assistant import HandoffDestinationAssistant + from .handoff_destination_assistant_context_engineering_plan import ( + HandoffDestinationAssistantContextEngineeringPlan, + HandoffDestinationAssistantContextEngineeringPlan_All, + HandoffDestinationAssistantContextEngineeringPlan_LastNMessages, + HandoffDestinationAssistantContextEngineeringPlan_None, + HandoffDestinationAssistantContextEngineeringPlan_UserAndAssistantMessages, + ) + from .handoff_destination_assistant_type import HandoffDestinationAssistantType + from .handoff_destination_dynamic import HandoffDestinationDynamic + from .handoff_destination_squad import HandoffDestinationSquad + from .handoff_destination_squad_context_engineering_plan import ( + HandoffDestinationSquadContextEngineeringPlan, + HandoffDestinationSquadContextEngineeringPlan_All, + HandoffDestinationSquadContextEngineeringPlan_LastNMessages, + HandoffDestinationSquadContextEngineeringPlan_None, + HandoffDestinationSquadContextEngineeringPlan_UserAndAssistantMessages, + ) + from .handoff_tool import HandoffTool + from .handoff_tool_destinations_item import ( + HandoffToolDestinationsItem, + HandoffToolDestinationsItem_Assistant, + HandoffToolDestinationsItem_Dynamic, + HandoffToolDestinationsItem_Squad, + ) + from .handoff_tool_messages_item import ( + HandoffToolMessagesItem, + HandoffToolMessagesItem_RequestComplete, + HandoffToolMessagesItem_RequestFailed, + HandoffToolMessagesItem_RequestResponseDelayed, + HandoffToolMessagesItem_RequestStart, + ) + from .hangup_node import HangupNode + from .hangup_node_type import HangupNodeType + from .hmac_authentication_plan import HmacAuthenticationPlan + from .hmac_authentication_plan_algorithm import HmacAuthenticationPlanAlgorithm + from .hmac_authentication_plan_signature_encoding import HmacAuthenticationPlanSignatureEncoding + from .hume_credential import HumeCredential + from .hume_credential_provider import HumeCredentialProvider + from .hume_voice import HumeVoice + from .hume_voice_model import HumeVoiceModel + from .import_twilio_phone_number_dto import ImportTwilioPhoneNumberDto + from .import_twilio_phone_number_dto_fallback_destination import ( + ImportTwilioPhoneNumberDtoFallbackDestination, + ImportTwilioPhoneNumberDtoFallbackDestination_Number, + ImportTwilioPhoneNumberDtoFallbackDestination_Sip, + ) + from .import_twilio_phone_number_dto_hooks_item import ( + ImportTwilioPhoneNumberDtoHooksItem, + ImportTwilioPhoneNumberDtoHooksItem_CallEnding, + ImportTwilioPhoneNumberDtoHooksItem_CallRinging, + ) + from .import_vonage_phone_number_dto import ImportVonagePhoneNumberDto + from .import_vonage_phone_number_dto_fallback_destination import ( + ImportVonagePhoneNumberDtoFallbackDestination, + ImportVonagePhoneNumberDtoFallbackDestination_Number, + ImportVonagePhoneNumberDtoFallbackDestination_Sip, + ) + from .import_vonage_phone_number_dto_hooks_item import ( + ImportVonagePhoneNumberDtoHooksItem, + ImportVonagePhoneNumberDtoHooksItem_CallEnding, + ImportVonagePhoneNumberDtoHooksItem_CallRinging, + ) + from .inflection_ai_credential import InflectionAiCredential + from .inflection_ai_credential_provider import InflectionAiCredentialProvider + from .inflection_ai_model import InflectionAiModel + from .inflection_ai_model_model import InflectionAiModelModel + from .inflection_ai_model_tools_item import ( + InflectionAiModelToolsItem, + InflectionAiModelToolsItem_ApiRequest, + InflectionAiModelToolsItem_Bash, + InflectionAiModelToolsItem_Code, + InflectionAiModelToolsItem_Computer, + InflectionAiModelToolsItem_Dtmf, + InflectionAiModelToolsItem_EndCall, + InflectionAiModelToolsItem_Function, + InflectionAiModelToolsItem_GohighlevelCalendarAvailabilityCheck, + InflectionAiModelToolsItem_GohighlevelCalendarEventCreate, + InflectionAiModelToolsItem_GohighlevelContactCreate, + InflectionAiModelToolsItem_GohighlevelContactGet, + InflectionAiModelToolsItem_GoogleCalendarAvailabilityCheck, + InflectionAiModelToolsItem_GoogleCalendarEventCreate, + InflectionAiModelToolsItem_GoogleSheetsRowAppend, + InflectionAiModelToolsItem_Handoff, + InflectionAiModelToolsItem_Mcp, + InflectionAiModelToolsItem_Query, + InflectionAiModelToolsItem_SipRequest, + InflectionAiModelToolsItem_SlackMessageSend, + InflectionAiModelToolsItem_Sms, + InflectionAiModelToolsItem_TextEditor, + InflectionAiModelToolsItem_TransferCall, + InflectionAiModelToolsItem_Voicemail, + ) + from .insight import Insight + from .insight_formula import InsightFormula + from .insight_paginated_response import InsightPaginatedResponse + from .insight_run_format_plan import InsightRunFormatPlan + from .insight_run_format_plan_format import InsightRunFormatPlanFormat + from .insight_run_response import InsightRunResponse + from .insight_time_range import InsightTimeRange + from .insight_time_range_with_step import InsightTimeRangeWithStep + from .insight_time_range_with_step_step import InsightTimeRangeWithStepStep + from .insight_type import InsightType + from .invite_user_dto import InviteUserDto + from .invite_user_dto_role import InviteUserDtoRole + from .invoice_plan import InvoicePlan + from .inworld_credential import InworldCredential + from .inworld_credential_provider import InworldCredentialProvider + from .inworld_voice import InworldVoice + from .inworld_voice_language_code import InworldVoiceLanguageCode + from .inworld_voice_model import InworldVoiceModel + from .inworld_voice_voice_id import InworldVoiceVoiceId + from .json_query_on_call_table_with_number_type_column import JsonQueryOnCallTableWithNumberTypeColumn + from .json_query_on_call_table_with_number_type_column_column import JsonQueryOnCallTableWithNumberTypeColumnColumn + from .json_query_on_call_table_with_number_type_column_filters_item import ( + JsonQueryOnCallTableWithNumberTypeColumnFiltersItem, + ) + from .json_query_on_call_table_with_number_type_column_operation import ( + JsonQueryOnCallTableWithNumberTypeColumnOperation, + ) + from .json_query_on_call_table_with_number_type_column_table import JsonQueryOnCallTableWithNumberTypeColumnTable + from .json_query_on_call_table_with_number_type_column_type import JsonQueryOnCallTableWithNumberTypeColumnType + from .json_query_on_call_table_with_string_type_column import JsonQueryOnCallTableWithStringTypeColumn + from .json_query_on_call_table_with_string_type_column_column import JsonQueryOnCallTableWithStringTypeColumnColumn + from .json_query_on_call_table_with_string_type_column_filters_item import ( + JsonQueryOnCallTableWithStringTypeColumnFiltersItem, + ) + from .json_query_on_call_table_with_string_type_column_operation import ( + JsonQueryOnCallTableWithStringTypeColumnOperation, + ) + from .json_query_on_call_table_with_string_type_column_table import JsonQueryOnCallTableWithStringTypeColumnTable + from .json_query_on_call_table_with_string_type_column_type import JsonQueryOnCallTableWithStringTypeColumnType + from .json_query_on_call_table_with_structured_output_column import JsonQueryOnCallTableWithStructuredOutputColumn + from .json_query_on_call_table_with_structured_output_column_column import ( + JsonQueryOnCallTableWithStructuredOutputColumnColumn, + ) + from .json_query_on_call_table_with_structured_output_column_filters_item import ( + JsonQueryOnCallTableWithStructuredOutputColumnFiltersItem, + ) + from .json_query_on_call_table_with_structured_output_column_operation import ( + JsonQueryOnCallTableWithStructuredOutputColumnOperation, + ) + from .json_query_on_call_table_with_structured_output_column_table import ( + JsonQueryOnCallTableWithStructuredOutputColumnTable, + ) + from .json_query_on_call_table_with_structured_output_column_type import ( + JsonQueryOnCallTableWithStructuredOutputColumnType, + ) + from .json_query_on_events_table import JsonQueryOnEventsTable + from .json_query_on_events_table_filters_item import JsonQueryOnEventsTableFiltersItem + from .json_query_on_events_table_on import JsonQueryOnEventsTableOn + from .json_query_on_events_table_operation import JsonQueryOnEventsTableOperation + from .json_query_on_events_table_table import JsonQueryOnEventsTableTable + from .json_query_on_events_table_type import JsonQueryOnEventsTableType + from .json_schema import JsonSchema + from .json_schema_format import JsonSchemaFormat + from .json_schema_type import JsonSchemaType + from .jwt_response import JwtResponse + from .keypad_input_plan import KeypadInputPlan + from .keypad_input_plan_delimiters import KeypadInputPlanDelimiters + from .knowledge_base import KnowledgeBase + from .knowledge_base_cost import KnowledgeBaseCost + from .knowledge_base_model import KnowledgeBaseModel + from .knowledge_base_provider import KnowledgeBaseProvider + from .knowledge_base_response_document import KnowledgeBaseResponseDocument + from .langfuse_credential import LangfuseCredential + from .langfuse_credential_provider import LangfuseCredentialProvider + from .langfuse_observability_plan import LangfuseObservabilityPlan + from .langfuse_observability_plan_provider import LangfuseObservabilityPlanProvider + from .latency_metrics import LatencyMetrics + from .line_insight import LineInsight + from .line_insight_from_call_table import LineInsightFromCallTable + from .line_insight_from_call_table_group_by import LineInsightFromCallTableGroupBy + from .line_insight_from_call_table_queries_item import LineInsightFromCallTableQueriesItem + from .line_insight_from_call_table_type import LineInsightFromCallTableType + from .line_insight_group_by import LineInsightGroupBy + from .line_insight_metadata import LineInsightMetadata + from .line_insight_queries_item import LineInsightQueriesItem + from .liquid_condition import LiquidCondition + from .livekit_smart_endpointing_plan import LivekitSmartEndpointingPlan + from .livekit_smart_endpointing_plan_provider import LivekitSmartEndpointingPlanProvider + from .lmnt_credential import LmntCredential + from .lmnt_credential_provider import LmntCredentialProvider + from .lmnt_voice import LmntVoice + from .lmnt_voice_id import LmntVoiceId + from .lmnt_voice_id_enum import LmntVoiceIdEnum + from .lmnt_voice_language import LmntVoiceLanguage + from .logic_edge_condition import LogicEdgeCondition + from .make_credential import MakeCredential + from .make_credential_provider import MakeCredentialProvider + from .make_tool import MakeTool + from .make_tool_messages_item import ( + MakeToolMessagesItem, + MakeToolMessagesItem_RequestComplete, + MakeToolMessagesItem_RequestFailed, + MakeToolMessagesItem_RequestResponseDelayed, + MakeToolMessagesItem_RequestStart, + ) + from .make_tool_metadata import MakeToolMetadata + from .make_tool_provider_details import MakeToolProviderDetails + from .make_tool_type import MakeToolType + from .make_tool_with_tool_call import MakeToolWithToolCall + from .make_tool_with_tool_call_messages_item import ( + MakeToolWithToolCallMessagesItem, + MakeToolWithToolCallMessagesItem_RequestComplete, + MakeToolWithToolCallMessagesItem_RequestFailed, + MakeToolWithToolCallMessagesItem_RequestResponseDelayed, + MakeToolWithToolCallMessagesItem_RequestStart, + ) + from .mcp_tool import McpTool + from .mcp_tool_messages import McpToolMessages + from .mcp_tool_messages_item import ( + McpToolMessagesItem, + McpToolMessagesItem_RequestComplete, + McpToolMessagesItem_RequestFailed, + McpToolMessagesItem_RequestResponseDelayed, + McpToolMessagesItem_RequestStart, + ) + from .mcp_tool_messages_messages_item import ( + McpToolMessagesMessagesItem, + McpToolMessagesMessagesItem_RequestComplete, + McpToolMessagesMessagesItem_RequestFailed, + McpToolMessagesMessagesItem_RequestResponseDelayed, + McpToolMessagesMessagesItem_RequestStart, + ) + from .mcp_tool_metadata import McpToolMetadata + from .mcp_tool_metadata_protocol import McpToolMetadataProtocol + from .message_add_hook_action import MessageAddHookAction + from .message_target import MessageTarget + from .message_target_role import MessageTargetRole + from .minimax_llm_model import MinimaxLlmModel + from .minimax_llm_model_model import MinimaxLlmModelModel + from .minimax_llm_model_tools_item import ( + MinimaxLlmModelToolsItem, + MinimaxLlmModelToolsItem_ApiRequest, + MinimaxLlmModelToolsItem_Bash, + MinimaxLlmModelToolsItem_Code, + MinimaxLlmModelToolsItem_Computer, + MinimaxLlmModelToolsItem_Dtmf, + MinimaxLlmModelToolsItem_EndCall, + MinimaxLlmModelToolsItem_Function, + MinimaxLlmModelToolsItem_GohighlevelCalendarAvailabilityCheck, + MinimaxLlmModelToolsItem_GohighlevelCalendarEventCreate, + MinimaxLlmModelToolsItem_GohighlevelContactCreate, + MinimaxLlmModelToolsItem_GohighlevelContactGet, + MinimaxLlmModelToolsItem_GoogleCalendarAvailabilityCheck, + MinimaxLlmModelToolsItem_GoogleCalendarEventCreate, + MinimaxLlmModelToolsItem_GoogleSheetsRowAppend, + MinimaxLlmModelToolsItem_Handoff, + MinimaxLlmModelToolsItem_Mcp, + MinimaxLlmModelToolsItem_Query, + MinimaxLlmModelToolsItem_SipRequest, + MinimaxLlmModelToolsItem_SlackMessageSend, + MinimaxLlmModelToolsItem_Sms, + MinimaxLlmModelToolsItem_TextEditor, + MinimaxLlmModelToolsItem_TransferCall, + MinimaxLlmModelToolsItem_Voicemail, + ) + from .minimax_voice import MinimaxVoice + from .minimax_voice_language_boost import MinimaxVoiceLanguageBoost + from .minimax_voice_model import MinimaxVoiceModel + from .minimax_voice_region import MinimaxVoiceRegion + from .minimax_voice_subtitle_type import MinimaxVoiceSubtitleType + from .mistral_credential import MistralCredential + from .mistral_credential_provider import MistralCredentialProvider + from .model_cost import ModelCost + from .monitor import Monitor + from .monitor_plan import MonitorPlan + from .monitor_result import MonitorResult + from .mono import Mono + from .neets_voice import NeetsVoice + from .neuphonic_credential import NeuphonicCredential + from .neuphonic_credential_provider import NeuphonicCredentialProvider + from .neuphonic_voice import NeuphonicVoice + from .neuphonic_voice_model import NeuphonicVoiceModel + from .node_artifact import NodeArtifact + from .node_artifact_messages_item import NodeArtifactMessagesItem + from .o_auth_2_authentication_plan import OAuth2AuthenticationPlan + from .o_auth_2_authentication_plan_type import OAuth2AuthenticationPlanType + from .oauth_2_authentication_session import Oauth2AuthenticationSession + from .open_ai_credential import OpenAiCredential + from .open_ai_credential_provider import OpenAiCredentialProvider + from .open_ai_function import OpenAiFunction + from .open_ai_function_parameters import OpenAiFunctionParameters + from .open_ai_function_parameters_type import OpenAiFunctionParametersType + from .open_ai_message import OpenAiMessage + from .open_ai_message_role import OpenAiMessageRole + from .open_ai_model import OpenAiModel + from .open_ai_model_fallback_models_item import OpenAiModelFallbackModelsItem + from .open_ai_model_model import OpenAiModelModel + from .open_ai_model_prompt_cache_retention import OpenAiModelPromptCacheRetention + from .open_ai_model_tool_strict_compatibility_mode import OpenAiModelToolStrictCompatibilityMode + from .open_ai_model_tools_item import ( + OpenAiModelToolsItem, + OpenAiModelToolsItem_ApiRequest, + OpenAiModelToolsItem_Bash, + OpenAiModelToolsItem_Code, + OpenAiModelToolsItem_Computer, + OpenAiModelToolsItem_Dtmf, + OpenAiModelToolsItem_EndCall, + OpenAiModelToolsItem_Function, + OpenAiModelToolsItem_GohighlevelCalendarAvailabilityCheck, + OpenAiModelToolsItem_GohighlevelCalendarEventCreate, + OpenAiModelToolsItem_GohighlevelContactCreate, + OpenAiModelToolsItem_GohighlevelContactGet, + OpenAiModelToolsItem_GoogleCalendarAvailabilityCheck, + OpenAiModelToolsItem_GoogleCalendarEventCreate, + OpenAiModelToolsItem_GoogleSheetsRowAppend, + OpenAiModelToolsItem_Handoff, + OpenAiModelToolsItem_Mcp, + OpenAiModelToolsItem_Query, + OpenAiModelToolsItem_SipRequest, + OpenAiModelToolsItem_SlackMessageSend, + OpenAiModelToolsItem_Sms, + OpenAiModelToolsItem_TextEditor, + OpenAiModelToolsItem_TransferCall, + OpenAiModelToolsItem_Voicemail, + ) + from .open_ai_transcriber import OpenAiTranscriber + from .open_ai_transcriber_language import OpenAiTranscriberLanguage + from .open_ai_transcriber_model import OpenAiTranscriberModel + from .open_ai_voice import OpenAiVoice + from .open_ai_voice_id import OpenAiVoiceId + from .open_ai_voice_id_enum import OpenAiVoiceIdEnum + from .open_ai_voice_model import OpenAiVoiceModel + from .open_ai_voicemail_detection_plan import OpenAiVoicemailDetectionPlan + from .open_ai_voicemail_detection_plan_provider import OpenAiVoicemailDetectionPlanProvider + from .open_ai_voicemail_detection_plan_type import OpenAiVoicemailDetectionPlanType + from .open_ai_web_chat_request import OpenAiWebChatRequest + from .open_ai_web_chat_request_input import OpenAiWebChatRequestInput + from .open_ai_web_chat_request_input_one_item import OpenAiWebChatRequestInputOneItem + from .open_router_credential import OpenRouterCredential + from .open_router_credential_provider import OpenRouterCredentialProvider + from .open_router_model import OpenRouterModel + from .open_router_model_tools_item import ( + OpenRouterModelToolsItem, + OpenRouterModelToolsItem_ApiRequest, + OpenRouterModelToolsItem_Bash, + OpenRouterModelToolsItem_Code, + OpenRouterModelToolsItem_Computer, + OpenRouterModelToolsItem_Dtmf, + OpenRouterModelToolsItem_EndCall, + OpenRouterModelToolsItem_Function, + OpenRouterModelToolsItem_GohighlevelCalendarAvailabilityCheck, + OpenRouterModelToolsItem_GohighlevelCalendarEventCreate, + OpenRouterModelToolsItem_GohighlevelContactCreate, + OpenRouterModelToolsItem_GohighlevelContactGet, + OpenRouterModelToolsItem_GoogleCalendarAvailabilityCheck, + OpenRouterModelToolsItem_GoogleCalendarEventCreate, + OpenRouterModelToolsItem_GoogleSheetsRowAppend, + OpenRouterModelToolsItem_Handoff, + OpenRouterModelToolsItem_Mcp, + OpenRouterModelToolsItem_Query, + OpenRouterModelToolsItem_SipRequest, + OpenRouterModelToolsItem_SlackMessageSend, + OpenRouterModelToolsItem_Sms, + OpenRouterModelToolsItem_TextEditor, + OpenRouterModelToolsItem_TransferCall, + OpenRouterModelToolsItem_Voicemail, + ) + from .org import Org + from .org_channel import OrgChannel + from .output_tool import OutputTool + from .output_tool_messages_item import ( + OutputToolMessagesItem, + OutputToolMessagesItem_RequestComplete, + OutputToolMessagesItem_RequestFailed, + OutputToolMessagesItem_RequestResponseDelayed, + OutputToolMessagesItem_RequestStart, + ) + from .output_tool_type import OutputToolType + from .pagination_meta import PaginationMeta + from .performance_metrics import PerformanceMetrics + from .perplexity_ai_credential import PerplexityAiCredential + from .perplexity_ai_credential_provider import PerplexityAiCredentialProvider + from .perplexity_ai_model import PerplexityAiModel + from .perplexity_ai_model_tools_item import ( + PerplexityAiModelToolsItem, + PerplexityAiModelToolsItem_ApiRequest, + PerplexityAiModelToolsItem_Bash, + PerplexityAiModelToolsItem_Code, + PerplexityAiModelToolsItem_Computer, + PerplexityAiModelToolsItem_Dtmf, + PerplexityAiModelToolsItem_EndCall, + PerplexityAiModelToolsItem_Function, + PerplexityAiModelToolsItem_GohighlevelCalendarAvailabilityCheck, + PerplexityAiModelToolsItem_GohighlevelCalendarEventCreate, + PerplexityAiModelToolsItem_GohighlevelContactCreate, + PerplexityAiModelToolsItem_GohighlevelContactGet, + PerplexityAiModelToolsItem_GoogleCalendarAvailabilityCheck, + PerplexityAiModelToolsItem_GoogleCalendarEventCreate, + PerplexityAiModelToolsItem_GoogleSheetsRowAppend, + PerplexityAiModelToolsItem_Handoff, + PerplexityAiModelToolsItem_Mcp, + PerplexityAiModelToolsItem_Query, + PerplexityAiModelToolsItem_SipRequest, + PerplexityAiModelToolsItem_SlackMessageSend, + PerplexityAiModelToolsItem_Sms, + PerplexityAiModelToolsItem_TextEditor, + PerplexityAiModelToolsItem_TransferCall, + PerplexityAiModelToolsItem_Voicemail, + ) + from .personality import Personality + from .phone_number_call_ending_hook_filter import PhoneNumberCallEndingHookFilter + from .phone_number_call_ending_hook_filter_key import PhoneNumberCallEndingHookFilterKey + from .phone_number_call_ending_hook_filter_one_of_item import PhoneNumberCallEndingHookFilterOneOfItem + from .phone_number_call_ending_hook_filter_type import PhoneNumberCallEndingHookFilterType + from .phone_number_call_ringing_hook_filter import PhoneNumberCallRingingHookFilter + from .phone_number_call_ringing_hook_filter_key import PhoneNumberCallRingingHookFilterKey + from .phone_number_call_ringing_hook_filter_type import PhoneNumberCallRingingHookFilterType + from .phone_number_hook_call_ending import PhoneNumberHookCallEnding + from .phone_number_hook_call_ending_do import ( + PhoneNumberHookCallEndingDo, + PhoneNumberHookCallEndingDo_Say, + PhoneNumberHookCallEndingDo_Transfer, + ) + from .phone_number_hook_call_ringing import PhoneNumberHookCallRinging + from .phone_number_hook_call_ringing_do_item import ( + PhoneNumberHookCallRingingDoItem, + PhoneNumberHookCallRingingDoItem_Say, + PhoneNumberHookCallRingingDoItem_Transfer, + ) + from .phone_number_paginated_response import PhoneNumberPaginatedResponse + from .phone_number_paginated_response_results_item import ( + PhoneNumberPaginatedResponseResultsItem, + PhoneNumberPaginatedResponseResultsItem_ByoPhoneNumber, + PhoneNumberPaginatedResponseResultsItem_Telnyx, + PhoneNumberPaginatedResponseResultsItem_Twilio, + PhoneNumberPaginatedResponseResultsItem_Vapi, + PhoneNumberPaginatedResponseResultsItem_Vonage, + ) + from .pie_insight import PieInsight + from .pie_insight_from_call_table import PieInsightFromCallTable + from .pie_insight_from_call_table_group_by import PieInsightFromCallTableGroupBy + from .pie_insight_from_call_table_queries_item import PieInsightFromCallTableQueriesItem + from .pie_insight_from_call_table_type import PieInsightFromCallTableType + from .pie_insight_group_by import PieInsightGroupBy + from .pie_insight_queries_item import PieInsightQueriesItem + from .play_ht_credential import PlayHtCredential + from .play_ht_credential_provider import PlayHtCredentialProvider + from .play_ht_voice import PlayHtVoice + from .play_ht_voice_emotion import PlayHtVoiceEmotion + from .play_ht_voice_id import PlayHtVoiceId + from .play_ht_voice_id_enum import PlayHtVoiceIdEnum + from .play_ht_voice_language import PlayHtVoiceLanguage + from .play_ht_voice_model import PlayHtVoiceModel + from .prompt_injection_security_filter import PromptInjectionSecurityFilter + from .prompt_injection_security_filter_type import PromptInjectionSecurityFilterType + from .provider_resource import ProviderResource + from .provider_resource_paginated_response import ProviderResourcePaginatedResponse + from .provider_resource_provider import ProviderResourceProvider + from .provider_resource_resource_name import ProviderResourceResourceName + from .public_key_encryption_plan import PublicKeyEncryptionPlan + from .public_key_encryption_plan_algorithm import PublicKeyEncryptionPlanAlgorithm + from .public_key_encryption_plan_public_key import ( + PublicKeyEncryptionPlanPublicKey, + PublicKeyEncryptionPlanPublicKey_SpkiPem, + ) + from .punctuation_boundary import PunctuationBoundary + from .query_tool import QueryTool + from .query_tool_messages_item import ( + QueryToolMessagesItem, + QueryToolMessagesItem_RequestComplete, + QueryToolMessagesItem_RequestFailed, + QueryToolMessagesItem_RequestResponseDelayed, + QueryToolMessagesItem_RequestStart, + ) + from .rce_security_filter import RceSecurityFilter + from .rce_security_filter_type import RceSecurityFilterType + from .recording import Recording + from .recording_consent import RecordingConsent + from .recording_consent_plan_stay_on_line import RecordingConsentPlanStayOnLine + from .recording_consent_plan_stay_on_line_voice import ( + RecordingConsentPlanStayOnLineVoice, + RecordingConsentPlanStayOnLineVoice_11Labs, + RecordingConsentPlanStayOnLineVoice_Azure, + RecordingConsentPlanStayOnLineVoice_Cartesia, + RecordingConsentPlanStayOnLineVoice_CustomVoice, + RecordingConsentPlanStayOnLineVoice_Deepgram, + RecordingConsentPlanStayOnLineVoice_Hume, + RecordingConsentPlanStayOnLineVoice_Inworld, + RecordingConsentPlanStayOnLineVoice_Lmnt, + RecordingConsentPlanStayOnLineVoice_Minimax, + RecordingConsentPlanStayOnLineVoice_Neuphonic, + RecordingConsentPlanStayOnLineVoice_Openai, + RecordingConsentPlanStayOnLineVoice_Playht, + RecordingConsentPlanStayOnLineVoice_RimeAi, + RecordingConsentPlanStayOnLineVoice_Sesame, + RecordingConsentPlanStayOnLineVoice_SmallestAi, + RecordingConsentPlanStayOnLineVoice_Tavus, + RecordingConsentPlanStayOnLineVoice_Vapi, + RecordingConsentPlanStayOnLineVoice_Wellsaid, + ) + from .recording_consent_plan_verbal import RecordingConsentPlanVerbal + from .recording_consent_plan_verbal_voice import ( + RecordingConsentPlanVerbalVoice, + RecordingConsentPlanVerbalVoice_11Labs, + RecordingConsentPlanVerbalVoice_Azure, + RecordingConsentPlanVerbalVoice_Cartesia, + RecordingConsentPlanVerbalVoice_CustomVoice, + RecordingConsentPlanVerbalVoice_Deepgram, + RecordingConsentPlanVerbalVoice_Hume, + RecordingConsentPlanVerbalVoice_Inworld, + RecordingConsentPlanVerbalVoice_Lmnt, + RecordingConsentPlanVerbalVoice_Minimax, + RecordingConsentPlanVerbalVoice_Neuphonic, + RecordingConsentPlanVerbalVoice_Openai, + RecordingConsentPlanVerbalVoice_Playht, + RecordingConsentPlanVerbalVoice_RimeAi, + RecordingConsentPlanVerbalVoice_Sesame, + RecordingConsentPlanVerbalVoice_SmallestAi, + RecordingConsentPlanVerbalVoice_Tavus, + RecordingConsentPlanVerbalVoice_Vapi, + RecordingConsentPlanVerbalVoice_Wellsaid, + ) + from .regex_condition import RegexCondition + from .regex_option import RegexOption + from .regex_option_type import RegexOptionType + from .regex_replacement import RegexReplacement + from .regex_security_filter import RegexSecurityFilter + from .regex_security_filter_type import RegexSecurityFilterType + from .relay_command_note import RelayCommandNote + from .relay_command_options import RelayCommandOptions + from .relay_command_options_type import RelayCommandOptionsType + from .relay_command_say import RelayCommandSay + from .relay_request import RelayRequest + from .relay_request_commands_item import ( + RelayRequestCommandsItem, + RelayRequestCommandsItem_MessageAdd, + RelayRequestCommandsItem_Say, + ) + from .relay_request_target import RelayRequestTarget, RelayRequestTarget_Assistant, RelayRequestTarget_Squad + from .relay_response import RelayResponse + from .relay_response_status import RelayResponseStatus + from .relay_target_assistant import RelayTargetAssistant + from .relay_target_options import RelayTargetOptions + from .relay_target_options_type import RelayTargetOptionsType + from .relay_target_squad import RelayTargetSquad + from .response_completed_event import ResponseCompletedEvent + from .response_completed_event_type import ResponseCompletedEventType + from .response_error_event import ResponseErrorEvent + from .response_error_event_type import ResponseErrorEventType + from .response_object import ResponseObject + from .response_object_object import ResponseObjectObject + from .response_object_status import ResponseObjectStatus + from .response_output_message import ResponseOutputMessage + from .response_output_message_role import ResponseOutputMessageRole + from .response_output_message_status import ResponseOutputMessageStatus + from .response_output_message_type import ResponseOutputMessageType + from .response_output_text import ResponseOutputText + from .response_output_text_type import ResponseOutputTextType + from .response_text_delta_event import ResponseTextDeltaEvent + from .response_text_delta_event_type import ResponseTextDeltaEventType + from .response_text_done_event import ResponseTextDoneEvent + from .response_text_done_event_type import ResponseTextDoneEventType + from .rime_ai_credential import RimeAiCredential + from .rime_ai_credential_provider import RimeAiCredentialProvider + from .rime_ai_voice import RimeAiVoice + from .rime_ai_voice_id import RimeAiVoiceId + from .rime_ai_voice_id_enum import RimeAiVoiceIdEnum + from .rime_ai_voice_language import RimeAiVoiceLanguage + from .rime_ai_voice_model import RimeAiVoiceModel + from .runpod_credential import RunpodCredential + from .runpod_credential_provider import RunpodCredentialProvider + from .s_3_credential import S3Credential + from .s_3_credential_provider import S3CredentialProvider + from .say_assistant_hook_action import SayAssistantHookAction + from .say_hook_action import SayHookAction + from .say_hook_action_prompt import SayHookActionPrompt + from .say_hook_action_prompt_one_item import SayHookActionPromptOneItem + from .say_phone_number_hook_action import SayPhoneNumberHookAction + from .sbc_configuration import SbcConfiguration + from .scenario import Scenario + from .scenario_hooks_item import ( + ScenarioHooksItem, + ScenarioHooksItem_SimulationRunEnded, + ScenarioHooksItem_SimulationRunStarted, + ) + from .scenario_tool_mock import ScenarioToolMock + from .schedule_plan import SchedulePlan + from .scorecard import Scorecard + from .scorecard_metric import ScorecardMetric + from .scorecard_paginated_response import ScorecardPaginatedResponse + from .security_filter_base import SecurityFilterBase + from .security_filter_plan import SecurityFilterPlan + from .security_filter_plan_mode import SecurityFilterPlanMode + from .server import Server + from .server_message import ServerMessage + from .server_message_assistant_request import ServerMessageAssistantRequest + from .server_message_assistant_request_phone_number import ( + ServerMessageAssistantRequestPhoneNumber, + ServerMessageAssistantRequestPhoneNumber_ByoPhoneNumber, + ServerMessageAssistantRequestPhoneNumber_Telnyx, + ServerMessageAssistantRequestPhoneNumber_Twilio, + ServerMessageAssistantRequestPhoneNumber_Vapi, + ServerMessageAssistantRequestPhoneNumber_Vonage, + ) + from .server_message_assistant_request_type import ServerMessageAssistantRequestType + from .server_message_assistant_speech import ServerMessageAssistantSpeech + from .server_message_assistant_speech_phone_number import ( + ServerMessageAssistantSpeechPhoneNumber, + ServerMessageAssistantSpeechPhoneNumber_ByoPhoneNumber, + ServerMessageAssistantSpeechPhoneNumber_Telnyx, + ServerMessageAssistantSpeechPhoneNumber_Twilio, + ServerMessageAssistantSpeechPhoneNumber_Vapi, + ServerMessageAssistantSpeechPhoneNumber_Vonage, + ) + from .server_message_assistant_speech_source import ServerMessageAssistantSpeechSource + from .server_message_assistant_speech_timing import ( + ServerMessageAssistantSpeechTiming, + ServerMessageAssistantSpeechTiming_WordAlignment, + ServerMessageAssistantSpeechTiming_WordProgress, + ) + from .server_message_assistant_speech_type import ServerMessageAssistantSpeechType + from .server_message_call_delete_failed import ServerMessageCallDeleteFailed + from .server_message_call_delete_failed_phone_number import ( + ServerMessageCallDeleteFailedPhoneNumber, + ServerMessageCallDeleteFailedPhoneNumber_ByoPhoneNumber, + ServerMessageCallDeleteFailedPhoneNumber_Telnyx, + ServerMessageCallDeleteFailedPhoneNumber_Twilio, + ServerMessageCallDeleteFailedPhoneNumber_Vapi, + ServerMessageCallDeleteFailedPhoneNumber_Vonage, + ) + from .server_message_call_delete_failed_type import ServerMessageCallDeleteFailedType + from .server_message_call_deleted import ServerMessageCallDeleted + from .server_message_call_deleted_phone_number import ( + ServerMessageCallDeletedPhoneNumber, + ServerMessageCallDeletedPhoneNumber_ByoPhoneNumber, + ServerMessageCallDeletedPhoneNumber_Telnyx, + ServerMessageCallDeletedPhoneNumber_Twilio, + ServerMessageCallDeletedPhoneNumber_Vapi, + ServerMessageCallDeletedPhoneNumber_Vonage, + ) + from .server_message_call_deleted_type import ServerMessageCallDeletedType + from .server_message_call_endpointing_request import ServerMessageCallEndpointingRequest + from .server_message_call_endpointing_request_messages_item import ServerMessageCallEndpointingRequestMessagesItem + from .server_message_call_endpointing_request_phone_number import ( + ServerMessageCallEndpointingRequestPhoneNumber, + ServerMessageCallEndpointingRequestPhoneNumber_ByoPhoneNumber, + ServerMessageCallEndpointingRequestPhoneNumber_Telnyx, + ServerMessageCallEndpointingRequestPhoneNumber_Twilio, + ServerMessageCallEndpointingRequestPhoneNumber_Vapi, + ServerMessageCallEndpointingRequestPhoneNumber_Vonage, + ) + from .server_message_call_endpointing_request_type import ServerMessageCallEndpointingRequestType + from .server_message_chat_created import ServerMessageChatCreated + from .server_message_chat_created_phone_number import ( + ServerMessageChatCreatedPhoneNumber, + ServerMessageChatCreatedPhoneNumber_ByoPhoneNumber, + ServerMessageChatCreatedPhoneNumber_Telnyx, + ServerMessageChatCreatedPhoneNumber_Twilio, + ServerMessageChatCreatedPhoneNumber_Vapi, + ServerMessageChatCreatedPhoneNumber_Vonage, + ) + from .server_message_chat_created_type import ServerMessageChatCreatedType + from .server_message_chat_deleted import ServerMessageChatDeleted + from .server_message_chat_deleted_phone_number import ( + ServerMessageChatDeletedPhoneNumber, + ServerMessageChatDeletedPhoneNumber_ByoPhoneNumber, + ServerMessageChatDeletedPhoneNumber_Telnyx, + ServerMessageChatDeletedPhoneNumber_Twilio, + ServerMessageChatDeletedPhoneNumber_Vapi, + ServerMessageChatDeletedPhoneNumber_Vonage, + ) + from .server_message_chat_deleted_type import ServerMessageChatDeletedType + from .server_message_conversation_update import ServerMessageConversationUpdate + from .server_message_conversation_update_messages_item import ServerMessageConversationUpdateMessagesItem + from .server_message_conversation_update_phone_number import ( + ServerMessageConversationUpdatePhoneNumber, + ServerMessageConversationUpdatePhoneNumber_ByoPhoneNumber, + ServerMessageConversationUpdatePhoneNumber_Telnyx, + ServerMessageConversationUpdatePhoneNumber_Twilio, + ServerMessageConversationUpdatePhoneNumber_Vapi, + ServerMessageConversationUpdatePhoneNumber_Vonage, + ) + from .server_message_conversation_update_type import ServerMessageConversationUpdateType + from .server_message_end_of_call_report import ServerMessageEndOfCallReport + from .server_message_end_of_call_report_costs_item import ( + ServerMessageEndOfCallReportCostsItem, + ServerMessageEndOfCallReportCostsItem_Analysis, + ServerMessageEndOfCallReportCostsItem_KnowledgeBase, + ServerMessageEndOfCallReportCostsItem_Model, + ServerMessageEndOfCallReportCostsItem_Transcriber, + ServerMessageEndOfCallReportCostsItem_Transport, + ServerMessageEndOfCallReportCostsItem_Vapi, + ServerMessageEndOfCallReportCostsItem_Voice, + ServerMessageEndOfCallReportCostsItem_VoicemailDetection, + ) + from .server_message_end_of_call_report_destination import ( + ServerMessageEndOfCallReportDestination, + ServerMessageEndOfCallReportDestination_Number, + ServerMessageEndOfCallReportDestination_Sip, + ) + from .server_message_end_of_call_report_ended_reason import ServerMessageEndOfCallReportEndedReason + from .server_message_end_of_call_report_phone_number import ( + ServerMessageEndOfCallReportPhoneNumber, + ServerMessageEndOfCallReportPhoneNumber_ByoPhoneNumber, + ServerMessageEndOfCallReportPhoneNumber_Telnyx, + ServerMessageEndOfCallReportPhoneNumber_Twilio, + ServerMessageEndOfCallReportPhoneNumber_Vapi, + ServerMessageEndOfCallReportPhoneNumber_Vonage, + ) + from .server_message_end_of_call_report_type import ServerMessageEndOfCallReportType + from .server_message_handoff_destination_request import ServerMessageHandoffDestinationRequest + from .server_message_handoff_destination_request_phone_number import ( + ServerMessageHandoffDestinationRequestPhoneNumber, + ServerMessageHandoffDestinationRequestPhoneNumber_ByoPhoneNumber, + ServerMessageHandoffDestinationRequestPhoneNumber_Telnyx, + ServerMessageHandoffDestinationRequestPhoneNumber_Twilio, + ServerMessageHandoffDestinationRequestPhoneNumber_Vapi, + ServerMessageHandoffDestinationRequestPhoneNumber_Vonage, + ) + from .server_message_handoff_destination_request_type import ServerMessageHandoffDestinationRequestType + from .server_message_hang import ServerMessageHang + from .server_message_hang_phone_number import ( + ServerMessageHangPhoneNumber, + ServerMessageHangPhoneNumber_ByoPhoneNumber, + ServerMessageHangPhoneNumber_Telnyx, + ServerMessageHangPhoneNumber_Twilio, + ServerMessageHangPhoneNumber_Vapi, + ServerMessageHangPhoneNumber_Vonage, + ) + from .server_message_hang_type import ServerMessageHangType + from .server_message_knowledge_base_request import ServerMessageKnowledgeBaseRequest + from .server_message_knowledge_base_request_messages_item import ServerMessageKnowledgeBaseRequestMessagesItem + from .server_message_knowledge_base_request_phone_number import ( + ServerMessageKnowledgeBaseRequestPhoneNumber, + ServerMessageKnowledgeBaseRequestPhoneNumber_ByoPhoneNumber, + ServerMessageKnowledgeBaseRequestPhoneNumber_Telnyx, + ServerMessageKnowledgeBaseRequestPhoneNumber_Twilio, + ServerMessageKnowledgeBaseRequestPhoneNumber_Vapi, + ServerMessageKnowledgeBaseRequestPhoneNumber_Vonage, + ) + from .server_message_knowledge_base_request_type import ServerMessageKnowledgeBaseRequestType + from .server_message_language_change_detected import ServerMessageLanguageChangeDetected + from .server_message_language_change_detected_phone_number import ( + ServerMessageLanguageChangeDetectedPhoneNumber, + ServerMessageLanguageChangeDetectedPhoneNumber_ByoPhoneNumber, + ServerMessageLanguageChangeDetectedPhoneNumber_Telnyx, + ServerMessageLanguageChangeDetectedPhoneNumber_Twilio, + ServerMessageLanguageChangeDetectedPhoneNumber_Vapi, + ServerMessageLanguageChangeDetectedPhoneNumber_Vonage, + ) + from .server_message_language_change_detected_type import ServerMessageLanguageChangeDetectedType + from .server_message_message import ServerMessageMessage + from .server_message_model_output import ServerMessageModelOutput + from .server_message_model_output_phone_number import ( + ServerMessageModelOutputPhoneNumber, + ServerMessageModelOutputPhoneNumber_ByoPhoneNumber, + ServerMessageModelOutputPhoneNumber_Telnyx, + ServerMessageModelOutputPhoneNumber_Twilio, + ServerMessageModelOutputPhoneNumber_Vapi, + ServerMessageModelOutputPhoneNumber_Vonage, + ) + from .server_message_model_output_type import ServerMessageModelOutputType + from .server_message_phone_call_control import ServerMessagePhoneCallControl + from .server_message_phone_call_control_destination import ( + ServerMessagePhoneCallControlDestination, + ServerMessagePhoneCallControlDestination_Number, + ServerMessagePhoneCallControlDestination_Sip, + ) + from .server_message_phone_call_control_phone_number import ( + ServerMessagePhoneCallControlPhoneNumber, + ServerMessagePhoneCallControlPhoneNumber_ByoPhoneNumber, + ServerMessagePhoneCallControlPhoneNumber_Telnyx, + ServerMessagePhoneCallControlPhoneNumber_Twilio, + ServerMessagePhoneCallControlPhoneNumber_Vapi, + ServerMessagePhoneCallControlPhoneNumber_Vonage, + ) + from .server_message_phone_call_control_request import ServerMessagePhoneCallControlRequest + from .server_message_phone_call_control_type import ServerMessagePhoneCallControlType + from .server_message_response import ServerMessageResponse + from .server_message_response_assistant_request import ServerMessageResponseAssistantRequest + from .server_message_response_assistant_request_destination import ( + ServerMessageResponseAssistantRequestDestination, + ServerMessageResponseAssistantRequestDestination_Number, + ServerMessageResponseAssistantRequestDestination_Sip, + ) + from .server_message_response_call_endpointing_request import ServerMessageResponseCallEndpointingRequest + from .server_message_response_handoff_destination_request import ServerMessageResponseHandoffDestinationRequest + from .server_message_response_knowledge_base_request import ServerMessageResponseKnowledgeBaseRequest + from .server_message_response_message_response import ServerMessageResponseMessageResponse + from .server_message_response_tool_calls import ServerMessageResponseToolCalls + from .server_message_response_transfer_destination_request import ServerMessageResponseTransferDestinationRequest + from .server_message_response_transfer_destination_request_destination import ( + ServerMessageResponseTransferDestinationRequestDestination, + ServerMessageResponseTransferDestinationRequestDestination_Assistant, + ServerMessageResponseTransferDestinationRequestDestination_Number, + ServerMessageResponseTransferDestinationRequestDestination_Sip, + ) + from .server_message_response_transfer_destination_request_message import ( + ServerMessageResponseTransferDestinationRequestMessage, + ServerMessageResponseTransferDestinationRequestMessage_RequestComplete, + ServerMessageResponseTransferDestinationRequestMessage_RequestFailed, + ServerMessageResponseTransferDestinationRequestMessage_RequestResponseDelayed, + ServerMessageResponseTransferDestinationRequestMessage_RequestStart, + ) + from .server_message_response_voice_request import ServerMessageResponseVoiceRequest + from .server_message_session_created import ServerMessageSessionCreated + from .server_message_session_created_phone_number import ( + ServerMessageSessionCreatedPhoneNumber, + ServerMessageSessionCreatedPhoneNumber_ByoPhoneNumber, + ServerMessageSessionCreatedPhoneNumber_Telnyx, + ServerMessageSessionCreatedPhoneNumber_Twilio, + ServerMessageSessionCreatedPhoneNumber_Vapi, + ServerMessageSessionCreatedPhoneNumber_Vonage, + ) + from .server_message_session_created_type import ServerMessageSessionCreatedType + from .server_message_session_deleted import ServerMessageSessionDeleted + from .server_message_session_deleted_phone_number import ( + ServerMessageSessionDeletedPhoneNumber, + ServerMessageSessionDeletedPhoneNumber_ByoPhoneNumber, + ServerMessageSessionDeletedPhoneNumber_Telnyx, + ServerMessageSessionDeletedPhoneNumber_Twilio, + ServerMessageSessionDeletedPhoneNumber_Vapi, + ServerMessageSessionDeletedPhoneNumber_Vonage, + ) + from .server_message_session_deleted_type import ServerMessageSessionDeletedType + from .server_message_session_updated import ServerMessageSessionUpdated + from .server_message_session_updated_phone_number import ( + ServerMessageSessionUpdatedPhoneNumber, + ServerMessageSessionUpdatedPhoneNumber_ByoPhoneNumber, + ServerMessageSessionUpdatedPhoneNumber_Telnyx, + ServerMessageSessionUpdatedPhoneNumber_Twilio, + ServerMessageSessionUpdatedPhoneNumber_Vapi, + ServerMessageSessionUpdatedPhoneNumber_Vonage, + ) + from .server_message_session_updated_type import ServerMessageSessionUpdatedType + from .server_message_speech_update import ServerMessageSpeechUpdate + from .server_message_speech_update_phone_number import ( + ServerMessageSpeechUpdatePhoneNumber, + ServerMessageSpeechUpdatePhoneNumber_ByoPhoneNumber, + ServerMessageSpeechUpdatePhoneNumber_Telnyx, + ServerMessageSpeechUpdatePhoneNumber_Twilio, + ServerMessageSpeechUpdatePhoneNumber_Vapi, + ServerMessageSpeechUpdatePhoneNumber_Vonage, + ) + from .server_message_speech_update_role import ServerMessageSpeechUpdateRole + from .server_message_speech_update_status import ServerMessageSpeechUpdateStatus + from .server_message_speech_update_type import ServerMessageSpeechUpdateType + from .server_message_status_update import ServerMessageStatusUpdate + from .server_message_status_update_destination import ( + ServerMessageStatusUpdateDestination, + ServerMessageStatusUpdateDestination_Number, + ServerMessageStatusUpdateDestination_Sip, + ) + from .server_message_status_update_ended_reason import ServerMessageStatusUpdateEndedReason + from .server_message_status_update_messages_item import ServerMessageStatusUpdateMessagesItem + from .server_message_status_update_phone_number import ( + ServerMessageStatusUpdatePhoneNumber, + ServerMessageStatusUpdatePhoneNumber_ByoPhoneNumber, + ServerMessageStatusUpdatePhoneNumber_Telnyx, + ServerMessageStatusUpdatePhoneNumber_Twilio, + ServerMessageStatusUpdatePhoneNumber_Vapi, + ServerMessageStatusUpdatePhoneNumber_Vonage, + ) + from .server_message_status_update_status import ServerMessageStatusUpdateStatus + from .server_message_status_update_type import ServerMessageStatusUpdateType + from .server_message_tool_calls import ServerMessageToolCalls + from .server_message_tool_calls_phone_number import ( + ServerMessageToolCallsPhoneNumber, + ServerMessageToolCallsPhoneNumber_ByoPhoneNumber, + ServerMessageToolCallsPhoneNumber_Telnyx, + ServerMessageToolCallsPhoneNumber_Twilio, + ServerMessageToolCallsPhoneNumber_Vapi, + ServerMessageToolCallsPhoneNumber_Vonage, + ) + from .server_message_tool_calls_tool_with_tool_call_list_item import ( + ServerMessageToolCallsToolWithToolCallListItem, + ServerMessageToolCallsToolWithToolCallListItem_Bash, + ServerMessageToolCallsToolWithToolCallListItem_Computer, + ServerMessageToolCallsToolWithToolCallListItem_Function, + ServerMessageToolCallsToolWithToolCallListItem_Ghl, + ServerMessageToolCallsToolWithToolCallListItem_GoogleCalendarEventCreate, + ServerMessageToolCallsToolWithToolCallListItem_Make, + ServerMessageToolCallsToolWithToolCallListItem_TextEditor, + ) + from .server_message_tool_calls_type import ServerMessageToolCallsType + from .server_message_transcript import ServerMessageTranscript + from .server_message_transcript_phone_number import ( + ServerMessageTranscriptPhoneNumber, + ServerMessageTranscriptPhoneNumber_ByoPhoneNumber, + ServerMessageTranscriptPhoneNumber_Telnyx, + ServerMessageTranscriptPhoneNumber_Twilio, + ServerMessageTranscriptPhoneNumber_Vapi, + ServerMessageTranscriptPhoneNumber_Vonage, + ) + from .server_message_transcript_role import ServerMessageTranscriptRole + from .server_message_transcript_transcript_type import ServerMessageTranscriptTranscriptType + from .server_message_transcript_type import ServerMessageTranscriptType + from .server_message_transfer_destination_request import ServerMessageTransferDestinationRequest + from .server_message_transfer_destination_request_phone_number import ( + ServerMessageTransferDestinationRequestPhoneNumber, + ServerMessageTransferDestinationRequestPhoneNumber_ByoPhoneNumber, + ServerMessageTransferDestinationRequestPhoneNumber_Telnyx, + ServerMessageTransferDestinationRequestPhoneNumber_Twilio, + ServerMessageTransferDestinationRequestPhoneNumber_Vapi, + ServerMessageTransferDestinationRequestPhoneNumber_Vonage, + ) + from .server_message_transfer_destination_request_type import ServerMessageTransferDestinationRequestType + from .server_message_transfer_update import ServerMessageTransferUpdate + from .server_message_transfer_update_destination import ( + ServerMessageTransferUpdateDestination, + ServerMessageTransferUpdateDestination_Assistant, + ServerMessageTransferUpdateDestination_Number, + ServerMessageTransferUpdateDestination_Sip, + ) + from .server_message_transfer_update_phone_number import ( + ServerMessageTransferUpdatePhoneNumber, + ServerMessageTransferUpdatePhoneNumber_ByoPhoneNumber, + ServerMessageTransferUpdatePhoneNumber_Telnyx, + ServerMessageTransferUpdatePhoneNumber_Twilio, + ServerMessageTransferUpdatePhoneNumber_Vapi, + ServerMessageTransferUpdatePhoneNumber_Vonage, + ) + from .server_message_transfer_update_type import ServerMessageTransferUpdateType + from .server_message_user_interrupted import ServerMessageUserInterrupted + from .server_message_user_interrupted_phone_number import ( + ServerMessageUserInterruptedPhoneNumber, + ServerMessageUserInterruptedPhoneNumber_ByoPhoneNumber, + ServerMessageUserInterruptedPhoneNumber_Telnyx, + ServerMessageUserInterruptedPhoneNumber_Twilio, + ServerMessageUserInterruptedPhoneNumber_Vapi, + ServerMessageUserInterruptedPhoneNumber_Vonage, + ) + from .server_message_user_interrupted_type import ServerMessageUserInterruptedType + from .server_message_voice_input import ServerMessageVoiceInput + from .server_message_voice_input_phone_number import ( + ServerMessageVoiceInputPhoneNumber, + ServerMessageVoiceInputPhoneNumber_ByoPhoneNumber, + ServerMessageVoiceInputPhoneNumber_Telnyx, + ServerMessageVoiceInputPhoneNumber_Twilio, + ServerMessageVoiceInputPhoneNumber_Vapi, + ServerMessageVoiceInputPhoneNumber_Vonage, + ) + from .server_message_voice_input_type import ServerMessageVoiceInputType + from .server_message_voice_request import ServerMessageVoiceRequest + from .server_message_voice_request_phone_number import ( + ServerMessageVoiceRequestPhoneNumber, + ServerMessageVoiceRequestPhoneNumber_ByoPhoneNumber, + ServerMessageVoiceRequestPhoneNumber_Telnyx, + ServerMessageVoiceRequestPhoneNumber_Twilio, + ServerMessageVoiceRequestPhoneNumber_Vapi, + ServerMessageVoiceRequestPhoneNumber_Vonage, + ) + from .server_message_voice_request_type import ServerMessageVoiceRequestType + from .sesame_voice import SesameVoice + from .sesame_voice_model import SesameVoiceModel + from .session import Session + from .session_cost import SessionCost + from .session_costs_item import ( + SessionCostsItem, + SessionCostsItem_Analysis, + SessionCostsItem_Model, + SessionCostsItem_Session, + ) + from .session_created_hook import SessionCreatedHook + from .session_created_hook_on import SessionCreatedHookOn + from .session_messages_item import SessionMessagesItem + from .session_paginated_response import SessionPaginatedResponse + from .session_status import SessionStatus + from .simulation import Simulation + from .simulation_concurrency_response import SimulationConcurrencyResponse + from .simulation_hook_call_ended import SimulationHookCallEnded + from .simulation_hook_call_started import SimulationHookCallStarted + from .simulation_hook_include import SimulationHookInclude + from .simulation_hook_webhook_action import SimulationHookWebhookAction + from .simulation_hook_webhook_action_type import SimulationHookWebhookActionType + from .simulation_run import SimulationRun + from .simulation_run_configuration import SimulationRunConfiguration + from .simulation_run_item import SimulationRunItem + from .simulation_run_item_call_metadata import SimulationRunItemCallMetadata + from .simulation_run_item_call_monitor import SimulationRunItemCallMonitor + from .simulation_run_item_counts import SimulationRunItemCounts + from .simulation_run_item_hooks_item import ( + SimulationRunItemHooksItem, + SimulationRunItemHooksItem_SimulationRunEnded, + SimulationRunItemHooksItem_SimulationRunStarted, + ) + from .simulation_run_item_improvement_suggestion import SimulationRunItemImprovementSuggestion + from .simulation_run_item_improvements import SimulationRunItemImprovements + from .simulation_run_item_metadata import SimulationRunItemMetadata + from .simulation_run_item_results import SimulationRunItemResults + from .simulation_run_item_status import SimulationRunItemStatus + from .simulation_run_simulation_entry import SimulationRunSimulationEntry + from .simulation_run_simulations_item import ( + SimulationRunSimulationsItem, + SimulationRunSimulationsItem_Simulation, + SimulationRunSimulationsItem_SimulationSuite, + ) + from .simulation_run_status import SimulationRunStatus + from .simulation_run_suite_entry import SimulationRunSuiteEntry + from .simulation_run_target import SimulationRunTarget, SimulationRunTarget_Assistant, SimulationRunTarget_Squad + from .simulation_run_target_assistant import SimulationRunTargetAssistant + from .simulation_run_target_squad import SimulationRunTargetSquad + from .simulation_run_transport_configuration import SimulationRunTransportConfiguration + from .simulation_run_transport_configuration_provider import SimulationRunTransportConfigurationProvider + from .simulation_suite import SimulationSuite + from .sip_authentication import SipAuthentication + from .sip_request_tool import SipRequestTool + from .sip_request_tool_body import SipRequestToolBody + from .sip_request_tool_messages_item import ( + SipRequestToolMessagesItem, + SipRequestToolMessagesItem_RequestComplete, + SipRequestToolMessagesItem_RequestFailed, + SipRequestToolMessagesItem_RequestResponseDelayed, + SipRequestToolMessagesItem_RequestStart, + ) + from .sip_request_tool_verb import SipRequestToolVerb + from .sip_trunk_gateway import SipTrunkGateway + from .sip_trunk_gateway_outbound_protocol import SipTrunkGatewayOutboundProtocol + from .sip_trunk_outbound_authentication_plan import SipTrunkOutboundAuthenticationPlan + from .sip_trunk_outbound_sip_register_plan import SipTrunkOutboundSipRegisterPlan + from .slack_o_auth_2_authorization_credential import SlackOAuth2AuthorizationCredential + from .slack_o_auth_2_authorization_credential_provider import SlackOAuth2AuthorizationCredentialProvider + from .slack_send_message_tool import SlackSendMessageTool + from .slack_send_message_tool_messages_item import ( + SlackSendMessageToolMessagesItem, + SlackSendMessageToolMessagesItem_RequestComplete, + SlackSendMessageToolMessagesItem_RequestFailed, + SlackSendMessageToolMessagesItem_RequestResponseDelayed, + SlackSendMessageToolMessagesItem_RequestStart, + ) + from .slack_webhook_credential import SlackWebhookCredential + from .slack_webhook_credential_provider import SlackWebhookCredentialProvider + from .smallest_ai_credential import SmallestAiCredential + from .smallest_ai_credential_provider import SmallestAiCredentialProvider + from .smallest_ai_voice import SmallestAiVoice + from .smallest_ai_voice_id import SmallestAiVoiceId + from .smallest_ai_voice_id_enum import SmallestAiVoiceIdEnum + from .smallest_ai_voice_model import SmallestAiVoiceModel + from .smart_denoising_plan import SmartDenoisingPlan + from .sms_tool import SmsTool + from .sms_tool_messages_item import ( + SmsToolMessagesItem, + SmsToolMessagesItem_RequestComplete, + SmsToolMessagesItem_RequestFailed, + SmsToolMessagesItem_RequestResponseDelayed, + SmsToolMessagesItem_RequestStart, + ) + from .soniox_credential import SonioxCredential + from .soniox_credential_provider import SonioxCredentialProvider + from .soniox_transcriber import SonioxTranscriber + from .soniox_transcriber_language import SonioxTranscriberLanguage + from .soniox_transcriber_model import SonioxTranscriberModel + from .speechmatics_credential import SpeechmaticsCredential + from .speechmatics_credential_provider import SpeechmaticsCredentialProvider + from .speechmatics_custom_vocabulary_item import SpeechmaticsCustomVocabularyItem + from .speechmatics_transcriber import SpeechmaticsTranscriber + from .speechmatics_transcriber_language import SpeechmaticsTranscriberLanguage + from .speechmatics_transcriber_model import SpeechmaticsTranscriberModel + from .speechmatics_transcriber_numeral_style import SpeechmaticsTranscriberNumeralStyle + from .speechmatics_transcriber_operating_point import SpeechmaticsTranscriberOperatingPoint + from .speechmatics_transcriber_region import SpeechmaticsTranscriberRegion + from .spki_pem_public_key_config import SpkiPemPublicKeyConfig + from .sql_injection_security_filter import SqlInjectionSecurityFilter + from .sql_injection_security_filter_type import SqlInjectionSecurityFilterType + from .squad import Squad + from .squad_member_dto import SquadMemberDto + from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem + from .ssrf_security_filter import SsrfSecurityFilter + from .ssrf_security_filter_type import SsrfSecurityFilterType + from .start_speaking_plan import StartSpeakingPlan + from .start_speaking_plan_custom_endpointing_rules_item import ( + StartSpeakingPlanCustomEndpointingRulesItem, + StartSpeakingPlanCustomEndpointingRulesItem_Assistant, + StartSpeakingPlanCustomEndpointingRulesItem_Both, + StartSpeakingPlanCustomEndpointingRulesItem_Customer, + ) + from .start_speaking_plan_smart_endpointing_enabled import StartSpeakingPlanSmartEndpointingEnabled + from .start_speaking_plan_smart_endpointing_enabled_one import StartSpeakingPlanSmartEndpointingEnabledOne + from .start_speaking_plan_smart_endpointing_plan import StartSpeakingPlanSmartEndpointingPlan + from .stop_speaking_plan import StopSpeakingPlan + from .structured_data_multi_plan import StructuredDataMultiPlan + from .structured_data_plan import StructuredDataPlan + from .structured_output import StructuredOutput + from .structured_output_evaluation_result import StructuredOutputEvaluationResult + from .structured_output_evaluation_result_comparator import StructuredOutputEvaluationResultComparator + from .structured_output_evaluation_result_expected_value import StructuredOutputEvaluationResultExpectedValue + from .structured_output_evaluation_result_extracted_value import StructuredOutputEvaluationResultExtractedValue + from .structured_output_filter_dto import StructuredOutputFilterDto + from .structured_output_model import ( + StructuredOutputModel, + StructuredOutputModel_Anthropic, + StructuredOutputModel_AnthropicBedrock, + StructuredOutputModel_CustomLlm, + StructuredOutputModel_Google, + StructuredOutputModel_Openai, + ) + from .structured_output_paginated_response import StructuredOutputPaginatedResponse + from .structured_output_type import StructuredOutputType + from .subscription import Subscription + from .subscription_limits import SubscriptionLimits + from .subscription_minutes_included_reset_frequency import SubscriptionMinutesIncludedResetFrequency + from .subscription_status import SubscriptionStatus + from .subscription_type import SubscriptionType + from .success_evaluation_plan import SuccessEvaluationPlan + from .success_evaluation_plan_rubric import SuccessEvaluationPlanRubric + from .summary_plan import SummaryPlan + from .supabase_bucket_plan import SupabaseBucketPlan + from .supabase_bucket_plan_region import SupabaseBucketPlanRegion + from .supabase_credential import SupabaseCredential + from .supabase_credential_provider import SupabaseCredentialProvider + from .sync_voice_library_dto import SyncVoiceLibraryDto + from .sync_voice_library_dto_providers_item import SyncVoiceLibraryDtoProvidersItem + from .system_message import SystemMessage + from .talkscriber_transcriber import TalkscriberTranscriber + from .talkscriber_transcriber_language import TalkscriberTranscriberLanguage + from .talkscriber_transcriber_model import TalkscriberTranscriberModel + from .target_plan import TargetPlan + from .tavus_conversation_properties import TavusConversationProperties + from .tavus_credential import TavusCredential + from .tavus_credential_provider import TavusCredentialProvider + from .tavus_voice import TavusVoice + from .tavus_voice_voice_id import TavusVoiceVoiceId + from .tavus_voice_voice_id_zero import TavusVoiceVoiceIdZero + from .telnyx_phone_number import TelnyxPhoneNumber + from .telnyx_phone_number_fallback_destination import ( + TelnyxPhoneNumberFallbackDestination, + TelnyxPhoneNumberFallbackDestination_Number, + TelnyxPhoneNumberFallbackDestination_Sip, + ) + from .telnyx_phone_number_hooks_item import ( + TelnyxPhoneNumberHooksItem, + TelnyxPhoneNumberHooksItem_CallEnding, + TelnyxPhoneNumberHooksItem_CallRinging, + ) + from .telnyx_phone_number_status import TelnyxPhoneNumberStatus + from .template import Template + from .template_details import ( + TemplateDetails, + TemplateDetails_ApiRequest, + TemplateDetails_Bash, + TemplateDetails_Code, + TemplateDetails_Computer, + TemplateDetails_Dtmf, + TemplateDetails_EndCall, + TemplateDetails_Function, + TemplateDetails_GohighlevelCalendarAvailabilityCheck, + TemplateDetails_GohighlevelCalendarEventCreate, + TemplateDetails_GohighlevelContactCreate, + TemplateDetails_GohighlevelContactGet, + TemplateDetails_GoogleCalendarAvailabilityCheck, + TemplateDetails_GoogleCalendarEventCreate, + TemplateDetails_GoogleSheetsRowAppend, + TemplateDetails_Handoff, + TemplateDetails_Mcp, + TemplateDetails_Query, + TemplateDetails_SipRequest, + TemplateDetails_SlackMessageSend, + TemplateDetails_Sms, + TemplateDetails_TextEditor, + TemplateDetails_TransferCall, + TemplateDetails_Voicemail, + ) + from .template_provider import TemplateProvider + from .template_provider_details import ( + TemplateProviderDetails, + TemplateProviderDetails_Function, + TemplateProviderDetails_Ghl, + TemplateProviderDetails_GohighlevelCalendarAvailabilityCheck, + TemplateProviderDetails_GohighlevelCalendarEventCreate, + TemplateProviderDetails_GohighlevelContactCreate, + TemplateProviderDetails_GohighlevelContactGet, + TemplateProviderDetails_GoogleCalendarEventCreate, + TemplateProviderDetails_GoogleSheetsRowAppend, + TemplateProviderDetails_Make, + ) + from .template_type import TemplateType + from .template_visibility import TemplateVisibility + from .test_suite import TestSuite + from .test_suite_phone_number import TestSuitePhoneNumber + from .test_suite_phone_number_provider import TestSuitePhoneNumberProvider + from .test_suite_run import TestSuiteRun + from .test_suite_run_scorer_ai import TestSuiteRunScorerAi + from .test_suite_run_scorer_ai_result import TestSuiteRunScorerAiResult + from .test_suite_run_scorer_ai_type import TestSuiteRunScorerAiType + from .test_suite_run_status import TestSuiteRunStatus + from .test_suite_run_test_attempt import TestSuiteRunTestAttempt + from .test_suite_run_test_attempt_call import TestSuiteRunTestAttemptCall + from .test_suite_run_test_attempt_metadata import TestSuiteRunTestAttemptMetadata + from .test_suite_run_test_result import TestSuiteRunTestResult + from .test_suite_runs_paginated_response import TestSuiteRunsPaginatedResponse + from .test_suite_test_chat import TestSuiteTestChat + from .test_suite_test_scorer_ai import TestSuiteTestScorerAi + from .test_suite_test_scorer_ai_type import TestSuiteTestScorerAiType + from .test_suite_test_voice import TestSuiteTestVoice + from .test_suite_test_voice_type import TestSuiteTestVoiceType + from .test_suite_tests_paginated_response import TestSuiteTestsPaginatedResponse + from .test_suite_tests_paginated_response_results_item import ( + TestSuiteTestsPaginatedResponseResultsItem, + TestSuiteTestsPaginatedResponseResultsItem_Chat, + TestSuiteTestsPaginatedResponseResultsItem_Voice, + ) + from .test_suites_paginated_response import TestSuitesPaginatedResponse + from .tester_plan import TesterPlan + from .text_content import TextContent + from .text_content_language import TextContentLanguage + from .text_content_type import TextContentType + from .text_editor_tool import TextEditorTool + from .text_editor_tool_messages_item import ( + TextEditorToolMessagesItem, + TextEditorToolMessagesItem_RequestComplete, + TextEditorToolMessagesItem_RequestFailed, + TextEditorToolMessagesItem_RequestResponseDelayed, + TextEditorToolMessagesItem_RequestStart, + ) + from .text_editor_tool_name import TextEditorToolName + from .text_editor_tool_sub_type import TextEditorToolSubType + from .text_editor_tool_with_tool_call import TextEditorToolWithToolCall + from .text_editor_tool_with_tool_call_messages_item import ( + TextEditorToolWithToolCallMessagesItem, + TextEditorToolWithToolCallMessagesItem_RequestComplete, + TextEditorToolWithToolCallMessagesItem_RequestFailed, + TextEditorToolWithToolCallMessagesItem_RequestResponseDelayed, + TextEditorToolWithToolCallMessagesItem_RequestStart, + ) + from .text_editor_tool_with_tool_call_name import TextEditorToolWithToolCallName + from .text_editor_tool_with_tool_call_sub_type import TextEditorToolWithToolCallSubType + from .text_insight import TextInsight + from .text_insight_from_call_table import TextInsightFromCallTable + from .text_insight_from_call_table_queries_item import TextInsightFromCallTableQueriesItem + from .text_insight_from_call_table_type import TextInsightFromCallTableType + from .text_insight_queries_item import TextInsightQueriesItem + from .time_range import TimeRange + from .time_range_step import TimeRangeStep + from .together_ai_credential import TogetherAiCredential + from .together_ai_credential_provider import TogetherAiCredentialProvider + from .together_ai_model import TogetherAiModel + from .together_ai_model_tools_item import ( + TogetherAiModelToolsItem, + TogetherAiModelToolsItem_ApiRequest, + TogetherAiModelToolsItem_Bash, + TogetherAiModelToolsItem_Code, + TogetherAiModelToolsItem_Computer, + TogetherAiModelToolsItem_Dtmf, + TogetherAiModelToolsItem_EndCall, + TogetherAiModelToolsItem_Function, + TogetherAiModelToolsItem_GohighlevelCalendarAvailabilityCheck, + TogetherAiModelToolsItem_GohighlevelCalendarEventCreate, + TogetherAiModelToolsItem_GohighlevelContactCreate, + TogetherAiModelToolsItem_GohighlevelContactGet, + TogetherAiModelToolsItem_GoogleCalendarAvailabilityCheck, + TogetherAiModelToolsItem_GoogleCalendarEventCreate, + TogetherAiModelToolsItem_GoogleSheetsRowAppend, + TogetherAiModelToolsItem_Handoff, + TogetherAiModelToolsItem_Mcp, + TogetherAiModelToolsItem_Query, + TogetherAiModelToolsItem_SipRequest, + TogetherAiModelToolsItem_SlackMessageSend, + TogetherAiModelToolsItem_Sms, + TogetherAiModelToolsItem_TextEditor, + TogetherAiModelToolsItem_TransferCall, + TogetherAiModelToolsItem_Voicemail, + ) + from .token import Token + from .token_restrictions import TokenRestrictions + from .token_tag import TokenTag + from .tool_call import ToolCall + from .tool_call_function import ToolCallFunction + from .tool_call_hook_action import ToolCallHookAction + from .tool_call_hook_action_tool import ( + ToolCallHookActionTool, + ToolCallHookActionTool_ApiRequest, + ToolCallHookActionTool_Bash, + ToolCallHookActionTool_Code, + ToolCallHookActionTool_Computer, + ToolCallHookActionTool_Dtmf, + ToolCallHookActionTool_EndCall, + ToolCallHookActionTool_Function, + ToolCallHookActionTool_GohighlevelCalendarAvailabilityCheck, + ToolCallHookActionTool_GohighlevelCalendarEventCreate, + ToolCallHookActionTool_GohighlevelContactCreate, + ToolCallHookActionTool_GohighlevelContactGet, + ToolCallHookActionTool_GoogleCalendarAvailabilityCheck, + ToolCallHookActionTool_GoogleCalendarEventCreate, + ToolCallHookActionTool_GoogleSheetsRowAppend, + ToolCallHookActionTool_Handoff, + ToolCallHookActionTool_Mcp, + ToolCallHookActionTool_Query, + ToolCallHookActionTool_SipRequest, + ToolCallHookActionTool_SlackMessageSend, + ToolCallHookActionTool_Sms, + ToolCallHookActionTool_TextEditor, + ToolCallHookActionTool_TransferCall, + ToolCallHookActionTool_Voicemail, + ) + from .tool_call_hook_action_type import ToolCallHookActionType + from .tool_call_message import ToolCallMessage + from .tool_call_result import ToolCallResult + from .tool_call_result_message import ToolCallResultMessage + from .tool_message import ToolMessage + from .tool_message_complete import ToolMessageComplete + from .tool_message_complete_role import ToolMessageCompleteRole + from .tool_message_delayed import ToolMessageDelayed + from .tool_message_failed import ToolMessageFailed + from .tool_message_role import ToolMessageRole + from .tool_message_start import ToolMessageStart + from .tool_node import ToolNode + from .tool_node_tool import ( + ToolNodeTool, + ToolNodeTool_ApiRequest, + ToolNodeTool_Bash, + ToolNodeTool_Code, + ToolNodeTool_Computer, + ToolNodeTool_Dtmf, + ToolNodeTool_EndCall, + ToolNodeTool_Function, + ToolNodeTool_GohighlevelCalendarAvailabilityCheck, + ToolNodeTool_GohighlevelCalendarEventCreate, + ToolNodeTool_GohighlevelContactCreate, + ToolNodeTool_GohighlevelContactGet, + ToolNodeTool_GoogleCalendarAvailabilityCheck, + ToolNodeTool_GoogleCalendarEventCreate, + ToolNodeTool_GoogleSheetsRowAppend, + ToolNodeTool_Handoff, + ToolNodeTool_Mcp, + ToolNodeTool_Query, + ToolNodeTool_SipRequest, + ToolNodeTool_SlackMessageSend, + ToolNodeTool_Sms, + ToolNodeTool_TextEditor, + ToolNodeTool_TransferCall, + ToolNodeTool_Voicemail, + ) + from .tool_parameter import ToolParameter + from .tool_parameter_value import ToolParameterValue + from .tool_rejection_plan import ToolRejectionPlan + from .tool_rejection_plan_conditions_item import ( + ToolRejectionPlanConditionsItem, + ToolRejectionPlanConditionsItem_Group, + ToolRejectionPlanConditionsItem_Liquid, + ToolRejectionPlanConditionsItem_Regex, + ) + from .tool_template_metadata import ToolTemplateMetadata + from .tool_template_setup import ToolTemplateSetup + from .transcriber_cost import TranscriberCost + from .transcript_plan import TranscriptPlan + from .transcription_endpointing_plan import TranscriptionEndpointingPlan + from .transfer_assistant import TransferAssistant + from .transfer_assistant_background_sound import TransferAssistantBackgroundSound + from .transfer_assistant_background_sound_zero import TransferAssistantBackgroundSoundZero + from .transfer_assistant_first_message_mode import TransferAssistantFirstMessageMode + from .transfer_assistant_hook_action import TransferAssistantHookAction + from .transfer_assistant_model import TransferAssistantModel + from .transfer_assistant_model_provider import TransferAssistantModelProvider + from .transfer_assistant_transcriber import ( + TransferAssistantTranscriber, + TransferAssistantTranscriber_11Labs, + TransferAssistantTranscriber_AssemblyAi, + TransferAssistantTranscriber_Azure, + TransferAssistantTranscriber_Cartesia, + TransferAssistantTranscriber_CustomTranscriber, + TransferAssistantTranscriber_Deepgram, + TransferAssistantTranscriber_Gladia, + TransferAssistantTranscriber_Google, + TransferAssistantTranscriber_Openai, + TransferAssistantTranscriber_Soniox, + TransferAssistantTranscriber_Speechmatics, + TransferAssistantTranscriber_Talkscriber, + ) + from .transfer_assistant_voice import ( + TransferAssistantVoice, + TransferAssistantVoice_11Labs, + TransferAssistantVoice_Azure, + TransferAssistantVoice_Cartesia, + TransferAssistantVoice_CustomVoice, + TransferAssistantVoice_Deepgram, + TransferAssistantVoice_Hume, + TransferAssistantVoice_Inworld, + TransferAssistantVoice_Lmnt, + TransferAssistantVoice_Minimax, + TransferAssistantVoice_Neuphonic, + TransferAssistantVoice_Openai, + TransferAssistantVoice_Playht, + TransferAssistantVoice_RimeAi, + TransferAssistantVoice_Sesame, + TransferAssistantVoice_SmallestAi, + TransferAssistantVoice_Tavus, + TransferAssistantVoice_Vapi, + TransferAssistantVoice_Wellsaid, + ) + from .transfer_call_tool import TransferCallTool + from .transfer_call_tool_destinations_item import ( + TransferCallToolDestinationsItem, + TransferCallToolDestinationsItem_Assistant, + TransferCallToolDestinationsItem_Number, + TransferCallToolDestinationsItem_Sip, + ) + from .transfer_call_tool_messages_item import ( + TransferCallToolMessagesItem, + TransferCallToolMessagesItem_RequestComplete, + TransferCallToolMessagesItem_RequestFailed, + TransferCallToolMessagesItem_RequestResponseDelayed, + TransferCallToolMessagesItem_RequestStart, + ) + from .transfer_cancel_tool_user_editable import TransferCancelToolUserEditable + from .transfer_cancel_tool_user_editable_messages_item import ( + TransferCancelToolUserEditableMessagesItem, + TransferCancelToolUserEditableMessagesItem_RequestComplete, + TransferCancelToolUserEditableMessagesItem_RequestFailed, + TransferCancelToolUserEditableMessagesItem_RequestResponseDelayed, + TransferCancelToolUserEditableMessagesItem_RequestStart, + ) + from .transfer_cancel_tool_user_editable_type import TransferCancelToolUserEditableType + from .transfer_destination_assistant import TransferDestinationAssistant + from .transfer_destination_assistant_message import TransferDestinationAssistantMessage + from .transfer_destination_assistant_type import TransferDestinationAssistantType + from .transfer_destination_number import TransferDestinationNumber + from .transfer_destination_number_message import TransferDestinationNumberMessage + from .transfer_destination_sip import TransferDestinationSip + from .transfer_destination_sip_message import TransferDestinationSipMessage + from .transfer_fallback_plan import TransferFallbackPlan + from .transfer_fallback_plan_message import TransferFallbackPlanMessage + from .transfer_hook_action import TransferHookAction + from .transfer_hook_action_destination import ( + TransferHookActionDestination, + TransferHookActionDestination_Number, + TransferHookActionDestination_Sip, + ) + from .transfer_hook_action_type import TransferHookActionType + from .transfer_mode import TransferMode + from .transfer_phone_number_hook_action import TransferPhoneNumberHookAction + from .transfer_phone_number_hook_action_destination import ( + TransferPhoneNumberHookActionDestination, + TransferPhoneNumberHookActionDestination_Number, + TransferPhoneNumberHookActionDestination_Sip, + ) + from .transfer_plan import TransferPlan + from .transfer_plan_context_engineering_plan import ( + TransferPlanContextEngineeringPlan, + TransferPlanContextEngineeringPlan_All, + TransferPlanContextEngineeringPlan_LastNMessages, + TransferPlanContextEngineeringPlan_None, + ) + from .transfer_plan_message import TransferPlanMessage + from .transfer_plan_mode import TransferPlanMode + from .transfer_successful_tool_user_editable import TransferSuccessfulToolUserEditable + from .transfer_successful_tool_user_editable_messages_item import ( + TransferSuccessfulToolUserEditableMessagesItem, + TransferSuccessfulToolUserEditableMessagesItem_RequestComplete, + TransferSuccessfulToolUserEditableMessagesItem_RequestFailed, + TransferSuccessfulToolUserEditableMessagesItem_RequestResponseDelayed, + TransferSuccessfulToolUserEditableMessagesItem_RequestStart, + ) + from .transfer_successful_tool_user_editable_type import TransferSuccessfulToolUserEditableType + from .transport_configuration_twilio import TransportConfigurationTwilio + from .transport_configuration_twilio_provider import TransportConfigurationTwilioProvider + from .transport_configuration_twilio_recording_channels import TransportConfigurationTwilioRecordingChannels + from .transport_cost import TransportCost + from .transport_cost_provider import TransportCostProvider + from .trieve_credential import TrieveCredential + from .trieve_credential_provider import TrieveCredentialProvider + from .trieve_knowledge_base import TrieveKnowledgeBase + from .trieve_knowledge_base_chunk_plan import TrieveKnowledgeBaseChunkPlan + from .trieve_knowledge_base_create import TrieveKnowledgeBaseCreate + from .trieve_knowledge_base_create_type import TrieveKnowledgeBaseCreateType + from .trieve_knowledge_base_import import TrieveKnowledgeBaseImport + from .trieve_knowledge_base_import_type import TrieveKnowledgeBaseImportType + from .trieve_knowledge_base_provider import TrieveKnowledgeBaseProvider + from .trieve_knowledge_base_search_plan import TrieveKnowledgeBaseSearchPlan + from .trieve_knowledge_base_search_plan_search_type import TrieveKnowledgeBaseSearchPlanSearchType + from .turn_latency import TurnLatency + from .twilio_credential import TwilioCredential + from .twilio_credential_provider import TwilioCredentialProvider + from .twilio_phone_number import TwilioPhoneNumber + from .twilio_phone_number_fallback_destination import ( + TwilioPhoneNumberFallbackDestination, + TwilioPhoneNumberFallbackDestination_Number, + TwilioPhoneNumberFallbackDestination_Sip, + ) + from .twilio_phone_number_hooks_item import ( + TwilioPhoneNumberHooksItem, + TwilioPhoneNumberHooksItem_CallEnding, + TwilioPhoneNumberHooksItem_CallRinging, + ) + from .twilio_phone_number_status import TwilioPhoneNumberStatus + from .twilio_sms_chat_transport import TwilioSmsChatTransport + from .twilio_sms_chat_transport_conversation_type import TwilioSmsChatTransportConversationType + from .twilio_sms_chat_transport_type import TwilioSmsChatTransportType + from .twilio_transport_message import TwilioTransportMessage + from .twilio_voicemail_detection_plan import TwilioVoicemailDetectionPlan + from .twilio_voicemail_detection_plan_provider import TwilioVoicemailDetectionPlanProvider + from .twilio_voicemail_detection_plan_voicemail_detection_types_item import ( + TwilioVoicemailDetectionPlanVoicemailDetectionTypesItem, + ) + from .update_anthropic_bedrock_credential_dto import UpdateAnthropicBedrockCredentialDto + from .update_anthropic_bedrock_credential_dto_authentication_plan import ( + UpdateAnthropicBedrockCredentialDtoAuthenticationPlan, + UpdateAnthropicBedrockCredentialDtoAuthenticationPlan_AwsIam, + UpdateAnthropicBedrockCredentialDtoAuthenticationPlan_AwsSts, + ) + from .update_anthropic_bedrock_credential_dto_region import UpdateAnthropicBedrockCredentialDtoRegion + from .update_anthropic_credential_dto import UpdateAnthropicCredentialDto + from .update_anyscale_credential_dto import UpdateAnyscaleCredentialDto + from .update_api_request_tool_dto import UpdateApiRequestToolDto + from .update_api_request_tool_dto_messages_item import ( + UpdateApiRequestToolDtoMessagesItem, + UpdateApiRequestToolDtoMessagesItem_RequestComplete, + UpdateApiRequestToolDtoMessagesItem_RequestFailed, + UpdateApiRequestToolDtoMessagesItem_RequestResponseDelayed, + UpdateApiRequestToolDtoMessagesItem_RequestStart, + ) + from .update_api_request_tool_dto_method import UpdateApiRequestToolDtoMethod + from .update_assembly_ai_credential_dto import UpdateAssemblyAiCredentialDto + from .update_azure_credential_dto import UpdateAzureCredentialDto + from .update_azure_credential_dto_region import UpdateAzureCredentialDtoRegion + from .update_azure_credential_dto_service import UpdateAzureCredentialDtoService + from .update_azure_open_ai_credential_dto import UpdateAzureOpenAiCredentialDto + from .update_azure_open_ai_credential_dto_models_item import UpdateAzureOpenAiCredentialDtoModelsItem + from .update_azure_open_ai_credential_dto_region import UpdateAzureOpenAiCredentialDtoRegion + from .update_bar_insight_from_call_table_dto import UpdateBarInsightFromCallTableDto + from .update_bar_insight_from_call_table_dto_group_by import UpdateBarInsightFromCallTableDtoGroupBy + from .update_bar_insight_from_call_table_dto_queries_item import UpdateBarInsightFromCallTableDtoQueriesItem + from .update_bash_tool_dto import UpdateBashToolDto + from .update_bash_tool_dto_messages_item import ( + UpdateBashToolDtoMessagesItem, + UpdateBashToolDtoMessagesItem_RequestComplete, + UpdateBashToolDtoMessagesItem_RequestFailed, + UpdateBashToolDtoMessagesItem_RequestResponseDelayed, + UpdateBashToolDtoMessagesItem_RequestStart, + ) + from .update_bash_tool_dto_name import UpdateBashToolDtoName + from .update_bash_tool_dto_sub_type import UpdateBashToolDtoSubType + from .update_byo_phone_number_dto import UpdateByoPhoneNumberDto + from .update_byo_phone_number_dto_fallback_destination import ( + UpdateByoPhoneNumberDtoFallbackDestination, + UpdateByoPhoneNumberDtoFallbackDestination_Number, + UpdateByoPhoneNumberDtoFallbackDestination_Sip, + ) + from .update_byo_phone_number_dto_hooks_item import ( + UpdateByoPhoneNumberDtoHooksItem, + UpdateByoPhoneNumberDtoHooksItem_CallEnding, + UpdateByoPhoneNumberDtoHooksItem_CallRinging, + ) + from .update_byo_sip_trunk_credential_dto import UpdateByoSipTrunkCredentialDto + from .update_cartesia_credential_dto import UpdateCartesiaCredentialDto + from .update_cerebras_credential_dto import UpdateCerebrasCredentialDto + from .update_cloudflare_credential_dto import UpdateCloudflareCredentialDto + from .update_code_tool_dto import UpdateCodeToolDto + from .update_code_tool_dto_messages_item import ( + UpdateCodeToolDtoMessagesItem, + UpdateCodeToolDtoMessagesItem_RequestComplete, + UpdateCodeToolDtoMessagesItem_RequestFailed, + UpdateCodeToolDtoMessagesItem_RequestResponseDelayed, + UpdateCodeToolDtoMessagesItem_RequestStart, + ) + from .update_computer_tool_dto import UpdateComputerToolDto + from .update_computer_tool_dto_messages_item import ( + UpdateComputerToolDtoMessagesItem, + UpdateComputerToolDtoMessagesItem_RequestComplete, + UpdateComputerToolDtoMessagesItem_RequestFailed, + UpdateComputerToolDtoMessagesItem_RequestResponseDelayed, + UpdateComputerToolDtoMessagesItem_RequestStart, + ) + from .update_computer_tool_dto_name import UpdateComputerToolDtoName + from .update_computer_tool_dto_sub_type import UpdateComputerToolDtoSubType + from .update_custom_credential_dto import UpdateCustomCredentialDto + from .update_custom_credential_dto_authentication_plan import ( + UpdateCustomCredentialDtoAuthenticationPlan, + UpdateCustomCredentialDtoAuthenticationPlan_Bearer, + UpdateCustomCredentialDtoAuthenticationPlan_Hmac, + UpdateCustomCredentialDtoAuthenticationPlan_Oauth2, + ) + from .update_custom_credential_dto_encryption_plan import ( + UpdateCustomCredentialDtoEncryptionPlan, + UpdateCustomCredentialDtoEncryptionPlan_PublicKey, + ) + from .update_custom_knowledge_base_dto import UpdateCustomKnowledgeBaseDto + from .update_custom_llm_credential_dto import UpdateCustomLlmCredentialDto + from .update_deep_infra_credential_dto import UpdateDeepInfraCredentialDto + from .update_deep_seek_credential_dto import UpdateDeepSeekCredentialDto + from .update_deepgram_credential_dto import UpdateDeepgramCredentialDto + from .update_dtmf_tool_dto import UpdateDtmfToolDto + from .update_dtmf_tool_dto_messages_item import ( + UpdateDtmfToolDtoMessagesItem, + UpdateDtmfToolDtoMessagesItem_RequestComplete, + UpdateDtmfToolDtoMessagesItem_RequestFailed, + UpdateDtmfToolDtoMessagesItem_RequestResponseDelayed, + UpdateDtmfToolDtoMessagesItem_RequestStart, + ) + from .update_eleven_labs_credential_dto import UpdateElevenLabsCredentialDto + from .update_email_credential_dto import UpdateEmailCredentialDto + from .update_end_call_tool_dto import UpdateEndCallToolDto + from .update_end_call_tool_dto_messages_item import ( + UpdateEndCallToolDtoMessagesItem, + UpdateEndCallToolDtoMessagesItem_RequestComplete, + UpdateEndCallToolDtoMessagesItem_RequestFailed, + UpdateEndCallToolDtoMessagesItem_RequestResponseDelayed, + UpdateEndCallToolDtoMessagesItem_RequestStart, + ) + from .update_function_tool_dto import UpdateFunctionToolDto + from .update_function_tool_dto_messages_item import ( + UpdateFunctionToolDtoMessagesItem, + UpdateFunctionToolDtoMessagesItem_RequestComplete, + UpdateFunctionToolDtoMessagesItem_RequestFailed, + UpdateFunctionToolDtoMessagesItem_RequestResponseDelayed, + UpdateFunctionToolDtoMessagesItem_RequestStart, + ) + from .update_gcp_credential_dto import UpdateGcpCredentialDto + from .update_ghl_tool_dto import UpdateGhlToolDto + from .update_ghl_tool_dto_messages_item import ( + UpdateGhlToolDtoMessagesItem, + UpdateGhlToolDtoMessagesItem_RequestComplete, + UpdateGhlToolDtoMessagesItem_RequestFailed, + UpdateGhlToolDtoMessagesItem_RequestResponseDelayed, + UpdateGhlToolDtoMessagesItem_RequestStart, + ) + from .update_gladia_credential_dto import UpdateGladiaCredentialDto + from .update_go_high_level_calendar_availability_tool_dto import UpdateGoHighLevelCalendarAvailabilityToolDto + from .update_go_high_level_calendar_availability_tool_dto_messages_item import ( + UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem, + UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestComplete, + UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestFailed, + UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestResponseDelayed, + UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestStart, + ) + from .update_go_high_level_calendar_event_create_tool_dto import UpdateGoHighLevelCalendarEventCreateToolDto + from .update_go_high_level_calendar_event_create_tool_dto_messages_item import ( + UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem, + UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestComplete, + UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestFailed, + UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestResponseDelayed, + UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestStart, + ) + from .update_go_high_level_contact_create_tool_dto import UpdateGoHighLevelContactCreateToolDto + from .update_go_high_level_contact_create_tool_dto_messages_item import ( + UpdateGoHighLevelContactCreateToolDtoMessagesItem, + UpdateGoHighLevelContactCreateToolDtoMessagesItem_RequestComplete, + UpdateGoHighLevelContactCreateToolDtoMessagesItem_RequestFailed, + UpdateGoHighLevelContactCreateToolDtoMessagesItem_RequestResponseDelayed, + UpdateGoHighLevelContactCreateToolDtoMessagesItem_RequestStart, + ) + from .update_go_high_level_contact_get_tool_dto import UpdateGoHighLevelContactGetToolDto + from .update_go_high_level_contact_get_tool_dto_messages_item import ( + UpdateGoHighLevelContactGetToolDtoMessagesItem, + UpdateGoHighLevelContactGetToolDtoMessagesItem_RequestComplete, + UpdateGoHighLevelContactGetToolDtoMessagesItem_RequestFailed, + UpdateGoHighLevelContactGetToolDtoMessagesItem_RequestResponseDelayed, + UpdateGoHighLevelContactGetToolDtoMessagesItem_RequestStart, + ) + from .update_go_high_level_credential_dto import UpdateGoHighLevelCredentialDto + from .update_go_high_level_mcp_credential_dto import UpdateGoHighLevelMcpCredentialDto + from .update_google_calendar_check_availability_tool_dto import UpdateGoogleCalendarCheckAvailabilityToolDto + from .update_google_calendar_check_availability_tool_dto_messages_item import ( + UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem, + UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestComplete, + UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestFailed, + UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestResponseDelayed, + UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestStart, + ) + from .update_google_calendar_create_event_tool_dto import UpdateGoogleCalendarCreateEventToolDto + from .update_google_calendar_create_event_tool_dto_messages_item import ( + UpdateGoogleCalendarCreateEventToolDtoMessagesItem, + UpdateGoogleCalendarCreateEventToolDtoMessagesItem_RequestComplete, + UpdateGoogleCalendarCreateEventToolDtoMessagesItem_RequestFailed, + UpdateGoogleCalendarCreateEventToolDtoMessagesItem_RequestResponseDelayed, + UpdateGoogleCalendarCreateEventToolDtoMessagesItem_RequestStart, + ) + from .update_google_calendar_o_auth_2_authorization_credential_dto import ( + UpdateGoogleCalendarOAuth2AuthorizationCredentialDto, + ) + from .update_google_calendar_o_auth_2_client_credential_dto import UpdateGoogleCalendarOAuth2ClientCredentialDto + from .update_google_credential_dto import UpdateGoogleCredentialDto + from .update_google_sheets_o_auth_2_authorization_credential_dto import ( + UpdateGoogleSheetsOAuth2AuthorizationCredentialDto, + ) + from .update_google_sheets_row_append_tool_dto import UpdateGoogleSheetsRowAppendToolDto + from .update_google_sheets_row_append_tool_dto_messages_item import ( + UpdateGoogleSheetsRowAppendToolDtoMessagesItem, + UpdateGoogleSheetsRowAppendToolDtoMessagesItem_RequestComplete, + UpdateGoogleSheetsRowAppendToolDtoMessagesItem_RequestFailed, + UpdateGoogleSheetsRowAppendToolDtoMessagesItem_RequestResponseDelayed, + UpdateGoogleSheetsRowAppendToolDtoMessagesItem_RequestStart, + ) + from .update_groq_credential_dto import UpdateGroqCredentialDto + from .update_handoff_tool_dto import UpdateHandoffToolDto + from .update_handoff_tool_dto_destinations_item import ( + UpdateHandoffToolDtoDestinationsItem, + UpdateHandoffToolDtoDestinationsItem_Assistant, + UpdateHandoffToolDtoDestinationsItem_Dynamic, + UpdateHandoffToolDtoDestinationsItem_Squad, + ) + from .update_handoff_tool_dto_messages_item import ( + UpdateHandoffToolDtoMessagesItem, + UpdateHandoffToolDtoMessagesItem_RequestComplete, + UpdateHandoffToolDtoMessagesItem_RequestFailed, + UpdateHandoffToolDtoMessagesItem_RequestResponseDelayed, + UpdateHandoffToolDtoMessagesItem_RequestStart, + ) + from .update_hume_credential_dto import UpdateHumeCredentialDto + from .update_inflection_ai_credential_dto import UpdateInflectionAiCredentialDto + from .update_inworld_credential_dto import UpdateInworldCredentialDto + from .update_langfuse_credential_dto import UpdateLangfuseCredentialDto + from .update_line_insight_from_call_table_dto import UpdateLineInsightFromCallTableDto + from .update_line_insight_from_call_table_dto_group_by import UpdateLineInsightFromCallTableDtoGroupBy + from .update_line_insight_from_call_table_dto_queries_item import UpdateLineInsightFromCallTableDtoQueriesItem + from .update_lmnt_credential_dto import UpdateLmntCredentialDto + from .update_make_credential_dto import UpdateMakeCredentialDto + from .update_make_tool_dto import UpdateMakeToolDto + from .update_make_tool_dto_messages_item import ( + UpdateMakeToolDtoMessagesItem, + UpdateMakeToolDtoMessagesItem_RequestComplete, + UpdateMakeToolDtoMessagesItem_RequestFailed, + UpdateMakeToolDtoMessagesItem_RequestResponseDelayed, + UpdateMakeToolDtoMessagesItem_RequestStart, + ) + from .update_mcp_tool_dto import UpdateMcpToolDto + from .update_mcp_tool_dto_messages_item import ( + UpdateMcpToolDtoMessagesItem, + UpdateMcpToolDtoMessagesItem_RequestComplete, + UpdateMcpToolDtoMessagesItem_RequestFailed, + UpdateMcpToolDtoMessagesItem_RequestResponseDelayed, + UpdateMcpToolDtoMessagesItem_RequestStart, + ) + from .update_mistral_credential_dto import UpdateMistralCredentialDto + from .update_neuphonic_credential_dto import UpdateNeuphonicCredentialDto + from .update_open_ai_credential_dto import UpdateOpenAiCredentialDto + from .update_open_router_credential_dto import UpdateOpenRouterCredentialDto + from .update_org_dto import UpdateOrgDto + from .update_org_dto_channel import UpdateOrgDtoChannel + from .update_output_tool_dto import UpdateOutputToolDto + from .update_output_tool_dto_messages_item import ( + UpdateOutputToolDtoMessagesItem, + UpdateOutputToolDtoMessagesItem_RequestComplete, + UpdateOutputToolDtoMessagesItem_RequestFailed, + UpdateOutputToolDtoMessagesItem_RequestResponseDelayed, + UpdateOutputToolDtoMessagesItem_RequestStart, + ) + from .update_perplexity_ai_credential_dto import UpdatePerplexityAiCredentialDto + from .update_personality_dto import UpdatePersonalityDto + from .update_pie_insight_from_call_table_dto import UpdatePieInsightFromCallTableDto + from .update_pie_insight_from_call_table_dto_group_by import UpdatePieInsightFromCallTableDtoGroupBy + from .update_pie_insight_from_call_table_dto_queries_item import UpdatePieInsightFromCallTableDtoQueriesItem + from .update_play_ht_credential_dto import UpdatePlayHtCredentialDto + from .update_query_tool_dto import UpdateQueryToolDto + from .update_query_tool_dto_messages_item import ( + UpdateQueryToolDtoMessagesItem, + UpdateQueryToolDtoMessagesItem_RequestComplete, + UpdateQueryToolDtoMessagesItem_RequestFailed, + UpdateQueryToolDtoMessagesItem_RequestResponseDelayed, + UpdateQueryToolDtoMessagesItem_RequestStart, + ) + from .update_rime_ai_credential_dto import UpdateRimeAiCredentialDto + from .update_runpod_credential_dto import UpdateRunpodCredentialDto + from .update_s_3_credential_dto import UpdateS3CredentialDto + from .update_scenario_dto import UpdateScenarioDto + from .update_scenario_dto_hooks_item import ( + UpdateScenarioDtoHooksItem, + UpdateScenarioDtoHooksItem_SimulationRunEnded, + UpdateScenarioDtoHooksItem_SimulationRunStarted, + ) + from .update_simulation_dto import UpdateSimulationDto + from .update_simulation_suite_dto import UpdateSimulationSuiteDto + from .update_sip_request_tool_dto import UpdateSipRequestToolDto + from .update_sip_request_tool_dto_body import UpdateSipRequestToolDtoBody + from .update_sip_request_tool_dto_messages_item import ( + UpdateSipRequestToolDtoMessagesItem, + UpdateSipRequestToolDtoMessagesItem_RequestComplete, + UpdateSipRequestToolDtoMessagesItem_RequestFailed, + UpdateSipRequestToolDtoMessagesItem_RequestResponseDelayed, + UpdateSipRequestToolDtoMessagesItem_RequestStart, + ) + from .update_sip_request_tool_dto_verb import UpdateSipRequestToolDtoVerb + from .update_slack_o_auth_2_authorization_credential_dto import UpdateSlackOAuth2AuthorizationCredentialDto + from .update_slack_send_message_tool_dto import UpdateSlackSendMessageToolDto + from .update_slack_send_message_tool_dto_messages_item import ( + UpdateSlackSendMessageToolDtoMessagesItem, + UpdateSlackSendMessageToolDtoMessagesItem_RequestComplete, + UpdateSlackSendMessageToolDtoMessagesItem_RequestFailed, + UpdateSlackSendMessageToolDtoMessagesItem_RequestResponseDelayed, + UpdateSlackSendMessageToolDtoMessagesItem_RequestStart, + ) + from .update_slack_webhook_credential_dto import UpdateSlackWebhookCredentialDto + from .update_sms_tool_dto import UpdateSmsToolDto + from .update_sms_tool_dto_messages_item import ( + UpdateSmsToolDtoMessagesItem, + UpdateSmsToolDtoMessagesItem_RequestComplete, + UpdateSmsToolDtoMessagesItem_RequestFailed, + UpdateSmsToolDtoMessagesItem_RequestResponseDelayed, + UpdateSmsToolDtoMessagesItem_RequestStart, + ) + from .update_soniox_credential_dto import UpdateSonioxCredentialDto + from .update_telnyx_phone_number_dto import UpdateTelnyxPhoneNumberDto + from .update_telnyx_phone_number_dto_fallback_destination import ( + UpdateTelnyxPhoneNumberDtoFallbackDestination, + UpdateTelnyxPhoneNumberDtoFallbackDestination_Number, + UpdateTelnyxPhoneNumberDtoFallbackDestination_Sip, + ) + from .update_telnyx_phone_number_dto_hooks_item import ( + UpdateTelnyxPhoneNumberDtoHooksItem, + UpdateTelnyxPhoneNumberDtoHooksItem_CallEnding, + UpdateTelnyxPhoneNumberDtoHooksItem_CallRinging, + ) + from .update_test_suite_dto import UpdateTestSuiteDto + from .update_test_suite_run_dto import UpdateTestSuiteRunDto + from .update_test_suite_test_chat_dto import UpdateTestSuiteTestChatDto + from .update_test_suite_test_chat_dto_type import UpdateTestSuiteTestChatDtoType + from .update_test_suite_test_voice_dto import UpdateTestSuiteTestVoiceDto + from .update_test_suite_test_voice_dto_type import UpdateTestSuiteTestVoiceDtoType + from .update_text_editor_tool_dto import UpdateTextEditorToolDto + from .update_text_editor_tool_dto_messages_item import ( + UpdateTextEditorToolDtoMessagesItem, + UpdateTextEditorToolDtoMessagesItem_RequestComplete, + UpdateTextEditorToolDtoMessagesItem_RequestFailed, + UpdateTextEditorToolDtoMessagesItem_RequestResponseDelayed, + UpdateTextEditorToolDtoMessagesItem_RequestStart, + ) + from .update_text_editor_tool_dto_name import UpdateTextEditorToolDtoName + from .update_text_editor_tool_dto_sub_type import UpdateTextEditorToolDtoSubType + from .update_text_insight_from_call_table_dto import UpdateTextInsightFromCallTableDto + from .update_text_insight_from_call_table_dto_queries_item import UpdateTextInsightFromCallTableDtoQueriesItem + from .update_together_ai_credential_dto import UpdateTogetherAiCredentialDto + from .update_token_dto import UpdateTokenDto + from .update_token_dto_tag import UpdateTokenDtoTag + from .update_tool_template_dto import UpdateToolTemplateDto + from .update_tool_template_dto_details import ( + UpdateToolTemplateDtoDetails, + UpdateToolTemplateDtoDetails_ApiRequest, + UpdateToolTemplateDtoDetails_Bash, + UpdateToolTemplateDtoDetails_Code, + UpdateToolTemplateDtoDetails_Computer, + UpdateToolTemplateDtoDetails_Dtmf, + UpdateToolTemplateDtoDetails_EndCall, + UpdateToolTemplateDtoDetails_Function, + UpdateToolTemplateDtoDetails_GohighlevelCalendarAvailabilityCheck, + UpdateToolTemplateDtoDetails_GohighlevelCalendarEventCreate, + UpdateToolTemplateDtoDetails_GohighlevelContactCreate, + UpdateToolTemplateDtoDetails_GohighlevelContactGet, + UpdateToolTemplateDtoDetails_GoogleCalendarAvailabilityCheck, + UpdateToolTemplateDtoDetails_GoogleCalendarEventCreate, + UpdateToolTemplateDtoDetails_GoogleSheetsRowAppend, + UpdateToolTemplateDtoDetails_Handoff, + UpdateToolTemplateDtoDetails_Mcp, + UpdateToolTemplateDtoDetails_Query, + UpdateToolTemplateDtoDetails_SipRequest, + UpdateToolTemplateDtoDetails_SlackMessageSend, + UpdateToolTemplateDtoDetails_Sms, + UpdateToolTemplateDtoDetails_TextEditor, + UpdateToolTemplateDtoDetails_TransferCall, + UpdateToolTemplateDtoDetails_Voicemail, + ) + from .update_tool_template_dto_provider import UpdateToolTemplateDtoProvider + from .update_tool_template_dto_provider_details import ( + UpdateToolTemplateDtoProviderDetails, + UpdateToolTemplateDtoProviderDetails_Function, + UpdateToolTemplateDtoProviderDetails_Ghl, + UpdateToolTemplateDtoProviderDetails_GohighlevelCalendarAvailabilityCheck, + UpdateToolTemplateDtoProviderDetails_GohighlevelCalendarEventCreate, + UpdateToolTemplateDtoProviderDetails_GohighlevelContactCreate, + UpdateToolTemplateDtoProviderDetails_GohighlevelContactGet, + UpdateToolTemplateDtoProviderDetails_GoogleCalendarEventCreate, + UpdateToolTemplateDtoProviderDetails_GoogleSheetsRowAppend, + UpdateToolTemplateDtoProviderDetails_Make, + ) + from .update_tool_template_dto_type import UpdateToolTemplateDtoType + from .update_tool_template_dto_visibility import UpdateToolTemplateDtoVisibility + from .update_transfer_call_tool_dto import UpdateTransferCallToolDto + from .update_transfer_call_tool_dto_destinations_item import ( + UpdateTransferCallToolDtoDestinationsItem, + UpdateTransferCallToolDtoDestinationsItem_Assistant, + UpdateTransferCallToolDtoDestinationsItem_Number, + UpdateTransferCallToolDtoDestinationsItem_Sip, + ) + from .update_transfer_call_tool_dto_messages_item import ( + UpdateTransferCallToolDtoMessagesItem, + UpdateTransferCallToolDtoMessagesItem_RequestComplete, + UpdateTransferCallToolDtoMessagesItem_RequestFailed, + UpdateTransferCallToolDtoMessagesItem_RequestResponseDelayed, + UpdateTransferCallToolDtoMessagesItem_RequestStart, + ) + from .update_trieve_credential_dto import UpdateTrieveCredentialDto + from .update_trieve_knowledge_base_dto import UpdateTrieveKnowledgeBaseDto + from .update_twilio_credential_dto import UpdateTwilioCredentialDto + from .update_twilio_phone_number_dto import UpdateTwilioPhoneNumberDto + from .update_twilio_phone_number_dto_fallback_destination import ( + UpdateTwilioPhoneNumberDtoFallbackDestination, + UpdateTwilioPhoneNumberDtoFallbackDestination_Number, + UpdateTwilioPhoneNumberDtoFallbackDestination_Sip, + ) + from .update_twilio_phone_number_dto_hooks_item import ( + UpdateTwilioPhoneNumberDtoHooksItem, + UpdateTwilioPhoneNumberDtoHooksItem_CallEnding, + UpdateTwilioPhoneNumberDtoHooksItem_CallRinging, + ) + from .update_user_role_dto import UpdateUserRoleDto + from .update_user_role_dto_role import UpdateUserRoleDtoRole + from .update_vapi_phone_number_dto import UpdateVapiPhoneNumberDto + from .update_vapi_phone_number_dto_fallback_destination import ( + UpdateVapiPhoneNumberDtoFallbackDestination, + UpdateVapiPhoneNumberDtoFallbackDestination_Number, + UpdateVapiPhoneNumberDtoFallbackDestination_Sip, + ) + from .update_vapi_phone_number_dto_hooks_item import ( + UpdateVapiPhoneNumberDtoHooksItem, + UpdateVapiPhoneNumberDtoHooksItem_CallEnding, + UpdateVapiPhoneNumberDtoHooksItem_CallRinging, + ) + from .update_voicemail_tool_dto import UpdateVoicemailToolDto + from .update_voicemail_tool_dto_messages_item import ( + UpdateVoicemailToolDtoMessagesItem, + UpdateVoicemailToolDtoMessagesItem_RequestComplete, + UpdateVoicemailToolDtoMessagesItem_RequestFailed, + UpdateVoicemailToolDtoMessagesItem_RequestResponseDelayed, + UpdateVoicemailToolDtoMessagesItem_RequestStart, + ) + from .update_vonage_credential_dto import UpdateVonageCredentialDto + from .update_vonage_phone_number_dto import UpdateVonagePhoneNumberDto + from .update_vonage_phone_number_dto_fallback_destination import ( + UpdateVonagePhoneNumberDtoFallbackDestination, + UpdateVonagePhoneNumberDtoFallbackDestination_Number, + UpdateVonagePhoneNumberDtoFallbackDestination_Sip, + ) + from .update_vonage_phone_number_dto_hooks_item import ( + UpdateVonagePhoneNumberDtoHooksItem, + UpdateVonagePhoneNumberDtoHooksItem_CallEnding, + UpdateVonagePhoneNumberDtoHooksItem_CallRinging, + ) + from .update_webhook_credential_dto import UpdateWebhookCredentialDto + from .update_webhook_credential_dto_authentication_plan import ( + UpdateWebhookCredentialDtoAuthenticationPlan, + UpdateWebhookCredentialDtoAuthenticationPlan_Bearer, + UpdateWebhookCredentialDtoAuthenticationPlan_Hmac, + UpdateWebhookCredentialDtoAuthenticationPlan_Oauth2, + ) + from .update_well_said_credential_dto import UpdateWellSaidCredentialDto + from .update_workflow_dto import UpdateWorkflowDto + from .update_workflow_dto_background_sound import UpdateWorkflowDtoBackgroundSound + from .update_workflow_dto_background_sound_zero import UpdateWorkflowDtoBackgroundSoundZero + from .update_workflow_dto_credentials_item import ( + UpdateWorkflowDtoCredentialsItem, + UpdateWorkflowDtoCredentialsItem_11Labs, + UpdateWorkflowDtoCredentialsItem_Anthropic, + UpdateWorkflowDtoCredentialsItem_AnthropicBedrock, + UpdateWorkflowDtoCredentialsItem_Anyscale, + UpdateWorkflowDtoCredentialsItem_AssemblyAi, + UpdateWorkflowDtoCredentialsItem_Azure, + UpdateWorkflowDtoCredentialsItem_AzureOpenai, + UpdateWorkflowDtoCredentialsItem_ByoSipTrunk, + UpdateWorkflowDtoCredentialsItem_Cartesia, + UpdateWorkflowDtoCredentialsItem_Cerebras, + UpdateWorkflowDtoCredentialsItem_Cloudflare, + UpdateWorkflowDtoCredentialsItem_CustomCredential, + UpdateWorkflowDtoCredentialsItem_CustomLlm, + UpdateWorkflowDtoCredentialsItem_DeepSeek, + UpdateWorkflowDtoCredentialsItem_Deepgram, + UpdateWorkflowDtoCredentialsItem_Deepinfra, + UpdateWorkflowDtoCredentialsItem_Email, + UpdateWorkflowDtoCredentialsItem_Gcp, + UpdateWorkflowDtoCredentialsItem_GhlOauth2Authorization, + UpdateWorkflowDtoCredentialsItem_Gladia, + UpdateWorkflowDtoCredentialsItem_Gohighlevel, + UpdateWorkflowDtoCredentialsItem_Google, + UpdateWorkflowDtoCredentialsItem_GoogleCalendarOauth2Authorization, + UpdateWorkflowDtoCredentialsItem_GoogleCalendarOauth2Client, + UpdateWorkflowDtoCredentialsItem_GoogleSheetsOauth2Authorization, + UpdateWorkflowDtoCredentialsItem_Groq, + UpdateWorkflowDtoCredentialsItem_Hume, + UpdateWorkflowDtoCredentialsItem_InflectionAi, + UpdateWorkflowDtoCredentialsItem_Inworld, + UpdateWorkflowDtoCredentialsItem_Langfuse, + UpdateWorkflowDtoCredentialsItem_Lmnt, + UpdateWorkflowDtoCredentialsItem_Make, + UpdateWorkflowDtoCredentialsItem_Minimax, + UpdateWorkflowDtoCredentialsItem_Mistral, + UpdateWorkflowDtoCredentialsItem_Neuphonic, + UpdateWorkflowDtoCredentialsItem_Openai, + UpdateWorkflowDtoCredentialsItem_Openrouter, + UpdateWorkflowDtoCredentialsItem_PerplexityAi, + UpdateWorkflowDtoCredentialsItem_Playht, + UpdateWorkflowDtoCredentialsItem_RimeAi, + UpdateWorkflowDtoCredentialsItem_Runpod, + UpdateWorkflowDtoCredentialsItem_S3, + UpdateWorkflowDtoCredentialsItem_SlackOauth2Authorization, + UpdateWorkflowDtoCredentialsItem_SlackWebhook, + UpdateWorkflowDtoCredentialsItem_SmallestAi, + UpdateWorkflowDtoCredentialsItem_Soniox, + UpdateWorkflowDtoCredentialsItem_Speechmatics, + UpdateWorkflowDtoCredentialsItem_Supabase, + UpdateWorkflowDtoCredentialsItem_Tavus, + UpdateWorkflowDtoCredentialsItem_TogetherAi, + UpdateWorkflowDtoCredentialsItem_Trieve, + UpdateWorkflowDtoCredentialsItem_Twilio, + UpdateWorkflowDtoCredentialsItem_Vonage, + UpdateWorkflowDtoCredentialsItem_Webhook, + UpdateWorkflowDtoCredentialsItem_Wellsaid, + UpdateWorkflowDtoCredentialsItem_Xai, + ) + from .update_workflow_dto_hooks_item import UpdateWorkflowDtoHooksItem + from .update_workflow_dto_model import ( + UpdateWorkflowDtoModel, + UpdateWorkflowDtoModel_Anthropic, + UpdateWorkflowDtoModel_AnthropicBedrock, + UpdateWorkflowDtoModel_CustomLlm, + UpdateWorkflowDtoModel_Google, + UpdateWorkflowDtoModel_Openai, + ) + from .update_workflow_dto_nodes_item import ( + UpdateWorkflowDtoNodesItem, + UpdateWorkflowDtoNodesItem_Conversation, + UpdateWorkflowDtoNodesItem_Tool, + ) + from .update_workflow_dto_transcriber import ( + UpdateWorkflowDtoTranscriber, + UpdateWorkflowDtoTranscriber_11Labs, + UpdateWorkflowDtoTranscriber_AssemblyAi, + UpdateWorkflowDtoTranscriber_Azure, + UpdateWorkflowDtoTranscriber_Cartesia, + UpdateWorkflowDtoTranscriber_CustomTranscriber, + UpdateWorkflowDtoTranscriber_Deepgram, + UpdateWorkflowDtoTranscriber_Gladia, + UpdateWorkflowDtoTranscriber_Google, + UpdateWorkflowDtoTranscriber_Openai, + UpdateWorkflowDtoTranscriber_Soniox, + UpdateWorkflowDtoTranscriber_Speechmatics, + UpdateWorkflowDtoTranscriber_Talkscriber, + ) + from .update_workflow_dto_voice import ( + UpdateWorkflowDtoVoice, + UpdateWorkflowDtoVoice_11Labs, + UpdateWorkflowDtoVoice_Azure, + UpdateWorkflowDtoVoice_Cartesia, + UpdateWorkflowDtoVoice_CustomVoice, + UpdateWorkflowDtoVoice_Deepgram, + UpdateWorkflowDtoVoice_Hume, + UpdateWorkflowDtoVoice_Inworld, + UpdateWorkflowDtoVoice_Lmnt, + UpdateWorkflowDtoVoice_Minimax, + UpdateWorkflowDtoVoice_Neuphonic, + UpdateWorkflowDtoVoice_Openai, + UpdateWorkflowDtoVoice_Playht, + UpdateWorkflowDtoVoice_RimeAi, + UpdateWorkflowDtoVoice_Sesame, + UpdateWorkflowDtoVoice_SmallestAi, + UpdateWorkflowDtoVoice_Tavus, + UpdateWorkflowDtoVoice_Vapi, + UpdateWorkflowDtoVoice_Wellsaid, + ) + from .update_workflow_dto_voicemail_detection import UpdateWorkflowDtoVoicemailDetection + from .update_workflow_dto_voicemail_detection_zero import UpdateWorkflowDtoVoicemailDetectionZero + from .update_x_ai_credential_dto import UpdateXAiCredentialDto + from .user import User + from .user_message import UserMessage + from .vapi_cost import VapiCost + from .vapi_cost_sub_type import VapiCostSubType + from .vapi_model import VapiModel + from .vapi_model_provider import VapiModelProvider + from .vapi_model_tools_item import ( + VapiModelToolsItem, + VapiModelToolsItem_ApiRequest, + VapiModelToolsItem_Bash, + VapiModelToolsItem_Code, + VapiModelToolsItem_Computer, + VapiModelToolsItem_Dtmf, + VapiModelToolsItem_EndCall, + VapiModelToolsItem_Function, + VapiModelToolsItem_GohighlevelCalendarAvailabilityCheck, + VapiModelToolsItem_GohighlevelCalendarEventCreate, + VapiModelToolsItem_GohighlevelContactCreate, + VapiModelToolsItem_GohighlevelContactGet, + VapiModelToolsItem_GoogleCalendarAvailabilityCheck, + VapiModelToolsItem_GoogleCalendarEventCreate, + VapiModelToolsItem_GoogleSheetsRowAppend, + VapiModelToolsItem_Handoff, + VapiModelToolsItem_Mcp, + VapiModelToolsItem_Query, + VapiModelToolsItem_SipRequest, + VapiModelToolsItem_SlackMessageSend, + VapiModelToolsItem_Sms, + VapiModelToolsItem_TextEditor, + VapiModelToolsItem_TransferCall, + VapiModelToolsItem_Voicemail, + ) + from .vapi_phone_number import VapiPhoneNumber + from .vapi_phone_number_fallback_destination import ( + VapiPhoneNumberFallbackDestination, + VapiPhoneNumberFallbackDestination_Number, + VapiPhoneNumberFallbackDestination_Sip, + ) + from .vapi_phone_number_hooks_item import ( + VapiPhoneNumberHooksItem, + VapiPhoneNumberHooksItem_CallEnding, + VapiPhoneNumberHooksItem_CallRinging, + ) + from .vapi_phone_number_status import VapiPhoneNumberStatus + from .vapi_pronunciation_dictionary_locator import VapiPronunciationDictionaryLocator + from .vapi_sip_transport_message import VapiSipTransportMessage + from .vapi_sip_transport_message_sip_verb import VapiSipTransportMessageSipVerb + from .vapi_smart_endpointing_plan import VapiSmartEndpointingPlan + from .vapi_smart_endpointing_plan_provider import VapiSmartEndpointingPlanProvider + from .vapi_voice import VapiVoice + from .vapi_voice_voice_id import VapiVoiceVoiceId + from .vapi_voicemail_detection_plan import VapiVoicemailDetectionPlan + from .vapi_voicemail_detection_plan_provider import VapiVoicemailDetectionPlanProvider + from .vapi_voicemail_detection_plan_type import VapiVoicemailDetectionPlanType + from .variable_extraction_alias import VariableExtractionAlias + from .variable_extraction_plan import VariableExtractionPlan + from .variable_value_group_by import VariableValueGroupBy + from .voice_cost import VoiceCost + from .voice_library import VoiceLibrary + from .voice_library_gender import VoiceLibraryGender + from .voice_library_voice_response import VoiceLibraryVoiceResponse + from .voicemail_detection_backoff_plan import VoicemailDetectionBackoffPlan + from .voicemail_detection_cost import VoicemailDetectionCost + from .voicemail_detection_cost_provider import VoicemailDetectionCostProvider + from .voicemail_tool import VoicemailTool + from .voicemail_tool_messages_item import ( + VoicemailToolMessagesItem, + VoicemailToolMessagesItem_RequestComplete, + VoicemailToolMessagesItem_RequestFailed, + VoicemailToolMessagesItem_RequestResponseDelayed, + VoicemailToolMessagesItem_RequestStart, + ) + from .vonage_credential import VonageCredential + from .vonage_credential_provider import VonageCredentialProvider + from .vonage_phone_number import VonagePhoneNumber + from .vonage_phone_number_fallback_destination import ( + VonagePhoneNumberFallbackDestination, + VonagePhoneNumberFallbackDestination_Number, + VonagePhoneNumberFallbackDestination_Sip, + ) + from .vonage_phone_number_hooks_item import ( + VonagePhoneNumberHooksItem, + VonagePhoneNumberHooksItem_CallEnding, + VonagePhoneNumberHooksItem_CallRinging, + ) + from .vonage_phone_number_status import VonagePhoneNumberStatus + from .web_chat import WebChat + from .web_chat_output_item import WebChatOutputItem + from .webhook_credential import WebhookCredential + from .webhook_credential_authentication_plan import ( + WebhookCredentialAuthenticationPlan, + WebhookCredentialAuthenticationPlan_Bearer, + WebhookCredentialAuthenticationPlan_Hmac, + WebhookCredentialAuthenticationPlan_Oauth2, + ) + from .webhook_credential_provider import WebhookCredentialProvider + from .well_said_credential import WellSaidCredential + from .well_said_credential_provider import WellSaidCredentialProvider + from .well_said_voice import WellSaidVoice + from .well_said_voice_model import WellSaidVoiceModel + from .workflow import Workflow + from .workflow_anthropic_bedrock_model import WorkflowAnthropicBedrockModel + from .workflow_anthropic_bedrock_model_model import WorkflowAnthropicBedrockModelModel + from .workflow_anthropic_model import WorkflowAnthropicModel + from .workflow_anthropic_model_model import WorkflowAnthropicModelModel + from .workflow_background_sound import WorkflowBackgroundSound + from .workflow_background_sound_zero import WorkflowBackgroundSoundZero + from .workflow_credentials_item import ( + WorkflowCredentialsItem, + WorkflowCredentialsItem_11Labs, + WorkflowCredentialsItem_Anthropic, + WorkflowCredentialsItem_AnthropicBedrock, + WorkflowCredentialsItem_Anyscale, + WorkflowCredentialsItem_AssemblyAi, + WorkflowCredentialsItem_Azure, + WorkflowCredentialsItem_AzureOpenai, + WorkflowCredentialsItem_ByoSipTrunk, + WorkflowCredentialsItem_Cartesia, + WorkflowCredentialsItem_Cerebras, + WorkflowCredentialsItem_Cloudflare, + WorkflowCredentialsItem_CustomCredential, + WorkflowCredentialsItem_CustomLlm, + WorkflowCredentialsItem_DeepSeek, + WorkflowCredentialsItem_Deepgram, + WorkflowCredentialsItem_Deepinfra, + WorkflowCredentialsItem_Email, + WorkflowCredentialsItem_Gcp, + WorkflowCredentialsItem_GhlOauth2Authorization, + WorkflowCredentialsItem_Gladia, + WorkflowCredentialsItem_Gohighlevel, + WorkflowCredentialsItem_Google, + WorkflowCredentialsItem_GoogleCalendarOauth2Authorization, + WorkflowCredentialsItem_GoogleCalendarOauth2Client, + WorkflowCredentialsItem_GoogleSheetsOauth2Authorization, + WorkflowCredentialsItem_Groq, + WorkflowCredentialsItem_Hume, + WorkflowCredentialsItem_InflectionAi, + WorkflowCredentialsItem_Inworld, + WorkflowCredentialsItem_Langfuse, + WorkflowCredentialsItem_Lmnt, + WorkflowCredentialsItem_Make, + WorkflowCredentialsItem_Minimax, + WorkflowCredentialsItem_Mistral, + WorkflowCredentialsItem_Neuphonic, + WorkflowCredentialsItem_Openai, + WorkflowCredentialsItem_Openrouter, + WorkflowCredentialsItem_PerplexityAi, + WorkflowCredentialsItem_Playht, + WorkflowCredentialsItem_RimeAi, + WorkflowCredentialsItem_Runpod, + WorkflowCredentialsItem_S3, + WorkflowCredentialsItem_SlackOauth2Authorization, + WorkflowCredentialsItem_SlackWebhook, + WorkflowCredentialsItem_SmallestAi, + WorkflowCredentialsItem_Soniox, + WorkflowCredentialsItem_Speechmatics, + WorkflowCredentialsItem_Supabase, + WorkflowCredentialsItem_Tavus, + WorkflowCredentialsItem_TogetherAi, + WorkflowCredentialsItem_Trieve, + WorkflowCredentialsItem_Twilio, + WorkflowCredentialsItem_Vonage, + WorkflowCredentialsItem_Webhook, + WorkflowCredentialsItem_Wellsaid, + WorkflowCredentialsItem_Xai, + ) + from .workflow_custom_model import WorkflowCustomModel + from .workflow_custom_model_metadata_send_mode import WorkflowCustomModelMetadataSendMode + from .workflow_google_model import WorkflowGoogleModel + from .workflow_google_model_model import WorkflowGoogleModelModel + from .workflow_hooks_item import WorkflowHooksItem + from .workflow_model import ( + WorkflowModel, + WorkflowModel_Anthropic, + WorkflowModel_AnthropicBedrock, + WorkflowModel_CustomLlm, + WorkflowModel_Google, + WorkflowModel_Openai, + ) + from .workflow_nodes_item import WorkflowNodesItem, WorkflowNodesItem_Conversation, WorkflowNodesItem_Tool + from .workflow_open_ai_model import WorkflowOpenAiModel + from .workflow_open_ai_model_model import WorkflowOpenAiModelModel + from .workflow_overrides import WorkflowOverrides + from .workflow_transcriber import ( + WorkflowTranscriber, + WorkflowTranscriber_11Labs, + WorkflowTranscriber_AssemblyAi, + WorkflowTranscriber_Azure, + WorkflowTranscriber_Cartesia, + WorkflowTranscriber_CustomTranscriber, + WorkflowTranscriber_Deepgram, + WorkflowTranscriber_Gladia, + WorkflowTranscriber_Google, + WorkflowTranscriber_Openai, + WorkflowTranscriber_Soniox, + WorkflowTranscriber_Speechmatics, + WorkflowTranscriber_Talkscriber, + ) + from .workflow_user_editable import WorkflowUserEditable + from .workflow_user_editable_background_sound import WorkflowUserEditableBackgroundSound + from .workflow_user_editable_background_sound_zero import WorkflowUserEditableBackgroundSoundZero + from .workflow_user_editable_credentials_item import ( + WorkflowUserEditableCredentialsItem, + WorkflowUserEditableCredentialsItem_11Labs, + WorkflowUserEditableCredentialsItem_Anthropic, + WorkflowUserEditableCredentialsItem_AnthropicBedrock, + WorkflowUserEditableCredentialsItem_Anyscale, + WorkflowUserEditableCredentialsItem_AssemblyAi, + WorkflowUserEditableCredentialsItem_Azure, + WorkflowUserEditableCredentialsItem_AzureOpenai, + WorkflowUserEditableCredentialsItem_ByoSipTrunk, + WorkflowUserEditableCredentialsItem_Cartesia, + WorkflowUserEditableCredentialsItem_Cerebras, + WorkflowUserEditableCredentialsItem_Cloudflare, + WorkflowUserEditableCredentialsItem_CustomCredential, + WorkflowUserEditableCredentialsItem_CustomLlm, + WorkflowUserEditableCredentialsItem_DeepSeek, + WorkflowUserEditableCredentialsItem_Deepgram, + WorkflowUserEditableCredentialsItem_Deepinfra, + WorkflowUserEditableCredentialsItem_Email, + WorkflowUserEditableCredentialsItem_Gcp, + WorkflowUserEditableCredentialsItem_GhlOauth2Authorization, + WorkflowUserEditableCredentialsItem_Gladia, + WorkflowUserEditableCredentialsItem_Gohighlevel, + WorkflowUserEditableCredentialsItem_Google, + WorkflowUserEditableCredentialsItem_GoogleCalendarOauth2Authorization, + WorkflowUserEditableCredentialsItem_GoogleCalendarOauth2Client, + WorkflowUserEditableCredentialsItem_GoogleSheetsOauth2Authorization, + WorkflowUserEditableCredentialsItem_Groq, + WorkflowUserEditableCredentialsItem_Hume, + WorkflowUserEditableCredentialsItem_InflectionAi, + WorkflowUserEditableCredentialsItem_Inworld, + WorkflowUserEditableCredentialsItem_Langfuse, + WorkflowUserEditableCredentialsItem_Lmnt, + WorkflowUserEditableCredentialsItem_Make, + WorkflowUserEditableCredentialsItem_Minimax, + WorkflowUserEditableCredentialsItem_Mistral, + WorkflowUserEditableCredentialsItem_Neuphonic, + WorkflowUserEditableCredentialsItem_Openai, + WorkflowUserEditableCredentialsItem_Openrouter, + WorkflowUserEditableCredentialsItem_PerplexityAi, + WorkflowUserEditableCredentialsItem_Playht, + WorkflowUserEditableCredentialsItem_RimeAi, + WorkflowUserEditableCredentialsItem_Runpod, + WorkflowUserEditableCredentialsItem_S3, + WorkflowUserEditableCredentialsItem_SlackOauth2Authorization, + WorkflowUserEditableCredentialsItem_SlackWebhook, + WorkflowUserEditableCredentialsItem_SmallestAi, + WorkflowUserEditableCredentialsItem_Soniox, + WorkflowUserEditableCredentialsItem_Speechmatics, + WorkflowUserEditableCredentialsItem_Supabase, + WorkflowUserEditableCredentialsItem_Tavus, + WorkflowUserEditableCredentialsItem_TogetherAi, + WorkflowUserEditableCredentialsItem_Trieve, + WorkflowUserEditableCredentialsItem_Twilio, + WorkflowUserEditableCredentialsItem_Vonage, + WorkflowUserEditableCredentialsItem_Webhook, + WorkflowUserEditableCredentialsItem_Wellsaid, + WorkflowUserEditableCredentialsItem_Xai, + ) + from .workflow_user_editable_hooks_item import WorkflowUserEditableHooksItem + from .workflow_user_editable_model import ( + WorkflowUserEditableModel, + WorkflowUserEditableModel_Anthropic, + WorkflowUserEditableModel_AnthropicBedrock, + WorkflowUserEditableModel_CustomLlm, + WorkflowUserEditableModel_Google, + WorkflowUserEditableModel_Openai, + ) + from .workflow_user_editable_nodes_item import ( + WorkflowUserEditableNodesItem, + WorkflowUserEditableNodesItem_Conversation, + WorkflowUserEditableNodesItem_Tool, + ) + from .workflow_user_editable_transcriber import ( + WorkflowUserEditableTranscriber, + WorkflowUserEditableTranscriber_11Labs, + WorkflowUserEditableTranscriber_AssemblyAi, + WorkflowUserEditableTranscriber_Azure, + WorkflowUserEditableTranscriber_Cartesia, + WorkflowUserEditableTranscriber_CustomTranscriber, + WorkflowUserEditableTranscriber_Deepgram, + WorkflowUserEditableTranscriber_Gladia, + WorkflowUserEditableTranscriber_Google, + WorkflowUserEditableTranscriber_Openai, + WorkflowUserEditableTranscriber_Soniox, + WorkflowUserEditableTranscriber_Speechmatics, + WorkflowUserEditableTranscriber_Talkscriber, + ) + from .workflow_user_editable_voice import ( + WorkflowUserEditableVoice, + WorkflowUserEditableVoice_11Labs, + WorkflowUserEditableVoice_Azure, + WorkflowUserEditableVoice_Cartesia, + WorkflowUserEditableVoice_CustomVoice, + WorkflowUserEditableVoice_Deepgram, + WorkflowUserEditableVoice_Hume, + WorkflowUserEditableVoice_Inworld, + WorkflowUserEditableVoice_Lmnt, + WorkflowUserEditableVoice_Minimax, + WorkflowUserEditableVoice_Neuphonic, + WorkflowUserEditableVoice_Openai, + WorkflowUserEditableVoice_Playht, + WorkflowUserEditableVoice_RimeAi, + WorkflowUserEditableVoice_Sesame, + WorkflowUserEditableVoice_SmallestAi, + WorkflowUserEditableVoice_Tavus, + WorkflowUserEditableVoice_Vapi, + WorkflowUserEditableVoice_Wellsaid, + ) + from .workflow_user_editable_voicemail_detection import WorkflowUserEditableVoicemailDetection + from .workflow_user_editable_voicemail_detection_zero import WorkflowUserEditableVoicemailDetectionZero + from .workflow_voice import ( + WorkflowVoice, + WorkflowVoice_11Labs, + WorkflowVoice_Azure, + WorkflowVoice_Cartesia, + WorkflowVoice_CustomVoice, + WorkflowVoice_Deepgram, + WorkflowVoice_Hume, + WorkflowVoice_Inworld, + WorkflowVoice_Lmnt, + WorkflowVoice_Minimax, + WorkflowVoice_Neuphonic, + WorkflowVoice_Openai, + WorkflowVoice_Playht, + WorkflowVoice_RimeAi, + WorkflowVoice_Sesame, + WorkflowVoice_SmallestAi, + WorkflowVoice_Tavus, + WorkflowVoice_Vapi, + WorkflowVoice_Wellsaid, + ) + from .workflow_voicemail_detection import WorkflowVoicemailDetection + from .workflow_voicemail_detection_zero import WorkflowVoicemailDetectionZero + from .x_ai_credential import XAiCredential + from .x_ai_credential_provider import XAiCredentialProvider + from .xai_model import XaiModel + from .xai_model_model import XaiModelModel + from .xai_model_tools_item import ( + XaiModelToolsItem, + XaiModelToolsItem_ApiRequest, + XaiModelToolsItem_Bash, + XaiModelToolsItem_Code, + XaiModelToolsItem_Computer, + XaiModelToolsItem_Dtmf, + XaiModelToolsItem_EndCall, + XaiModelToolsItem_Function, + XaiModelToolsItem_GohighlevelCalendarAvailabilityCheck, + XaiModelToolsItem_GohighlevelCalendarEventCreate, + XaiModelToolsItem_GohighlevelContactCreate, + XaiModelToolsItem_GohighlevelContactGet, + XaiModelToolsItem_GoogleCalendarAvailabilityCheck, + XaiModelToolsItem_GoogleCalendarEventCreate, + XaiModelToolsItem_GoogleSheetsRowAppend, + XaiModelToolsItem_Handoff, + XaiModelToolsItem_Mcp, + XaiModelToolsItem_Query, + XaiModelToolsItem_SipRequest, + XaiModelToolsItem_SlackMessageSend, + XaiModelToolsItem_Sms, + XaiModelToolsItem_TextEditor, + XaiModelToolsItem_TransferCall, + XaiModelToolsItem_Voicemail, + ) + from .xss_security_filter import XssSecurityFilter + from .xss_security_filter_type import XssSecurityFilterType +_dynamic_imports: typing.Dict[str, str] = { + "AddVoiceToProviderDto": ".add_voice_to_provider_dto", + "AiEdgeCondition": ".ai_edge_condition", + "AiEdgeConditionType": ".ai_edge_condition_type", + "Analysis": ".analysis", + "AnalysisCost": ".analysis_cost", + "AnalysisCostAnalysisType": ".analysis_cost_analysis_type", + "AnalysisCostBreakdown": ".analysis_cost_breakdown", + "AnalysisPlan": ".analysis_plan", + "AnalyticsOperation": ".analytics_operation", + "AnalyticsOperationColumn": ".analytics_operation_column", + "AnalyticsOperationOperation": ".analytics_operation_operation", + "AnalyticsQuery": ".analytics_query", + "AnalyticsQueryGroupByItem": ".analytics_query_group_by_item", + "AnalyticsQueryResult": ".analytics_query_result", + "AnalyticsQueryTable": ".analytics_query_table", + "AnthropicBedrockCredential": ".anthropic_bedrock_credential", + "AnthropicBedrockCredentialAuthenticationPlan": ".anthropic_bedrock_credential_authentication_plan", + "AnthropicBedrockCredentialAuthenticationPlan_AwsIam": ".anthropic_bedrock_credential_authentication_plan", + "AnthropicBedrockCredentialAuthenticationPlan_AwsSts": ".anthropic_bedrock_credential_authentication_plan", + "AnthropicBedrockCredentialProvider": ".anthropic_bedrock_credential_provider", + "AnthropicBedrockCredentialRegion": ".anthropic_bedrock_credential_region", + "AnthropicBedrockModel": ".anthropic_bedrock_model", + "AnthropicBedrockModelModel": ".anthropic_bedrock_model_model", + "AnthropicBedrockModelToolsItem": ".anthropic_bedrock_model_tools_item", + "AnthropicBedrockModelToolsItem_ApiRequest": ".anthropic_bedrock_model_tools_item", + "AnthropicBedrockModelToolsItem_Bash": ".anthropic_bedrock_model_tools_item", + "AnthropicBedrockModelToolsItem_Code": ".anthropic_bedrock_model_tools_item", + "AnthropicBedrockModelToolsItem_Computer": ".anthropic_bedrock_model_tools_item", + "AnthropicBedrockModelToolsItem_Dtmf": ".anthropic_bedrock_model_tools_item", + "AnthropicBedrockModelToolsItem_EndCall": ".anthropic_bedrock_model_tools_item", + "AnthropicBedrockModelToolsItem_Function": ".anthropic_bedrock_model_tools_item", + "AnthropicBedrockModelToolsItem_GohighlevelCalendarAvailabilityCheck": ".anthropic_bedrock_model_tools_item", + "AnthropicBedrockModelToolsItem_GohighlevelCalendarEventCreate": ".anthropic_bedrock_model_tools_item", + "AnthropicBedrockModelToolsItem_GohighlevelContactCreate": ".anthropic_bedrock_model_tools_item", + "AnthropicBedrockModelToolsItem_GohighlevelContactGet": ".anthropic_bedrock_model_tools_item", + "AnthropicBedrockModelToolsItem_GoogleCalendarAvailabilityCheck": ".anthropic_bedrock_model_tools_item", + "AnthropicBedrockModelToolsItem_GoogleCalendarEventCreate": ".anthropic_bedrock_model_tools_item", + "AnthropicBedrockModelToolsItem_GoogleSheetsRowAppend": ".anthropic_bedrock_model_tools_item", + "AnthropicBedrockModelToolsItem_Handoff": ".anthropic_bedrock_model_tools_item", + "AnthropicBedrockModelToolsItem_Mcp": ".anthropic_bedrock_model_tools_item", + "AnthropicBedrockModelToolsItem_Query": ".anthropic_bedrock_model_tools_item", + "AnthropicBedrockModelToolsItem_SipRequest": ".anthropic_bedrock_model_tools_item", + "AnthropicBedrockModelToolsItem_SlackMessageSend": ".anthropic_bedrock_model_tools_item", + "AnthropicBedrockModelToolsItem_Sms": ".anthropic_bedrock_model_tools_item", + "AnthropicBedrockModelToolsItem_TextEditor": ".anthropic_bedrock_model_tools_item", + "AnthropicBedrockModelToolsItem_TransferCall": ".anthropic_bedrock_model_tools_item", + "AnthropicBedrockModelToolsItem_Voicemail": ".anthropic_bedrock_model_tools_item", + "AnthropicCredential": ".anthropic_credential", + "AnthropicCredentialProvider": ".anthropic_credential_provider", + "AnthropicModel": ".anthropic_model", + "AnthropicModelModel": ".anthropic_model_model", + "AnthropicModelToolsItem": ".anthropic_model_tools_item", + "AnthropicModelToolsItem_ApiRequest": ".anthropic_model_tools_item", + "AnthropicModelToolsItem_Bash": ".anthropic_model_tools_item", + "AnthropicModelToolsItem_Code": ".anthropic_model_tools_item", + "AnthropicModelToolsItem_Computer": ".anthropic_model_tools_item", + "AnthropicModelToolsItem_Dtmf": ".anthropic_model_tools_item", + "AnthropicModelToolsItem_EndCall": ".anthropic_model_tools_item", + "AnthropicModelToolsItem_Function": ".anthropic_model_tools_item", + "AnthropicModelToolsItem_GohighlevelCalendarAvailabilityCheck": ".anthropic_model_tools_item", + "AnthropicModelToolsItem_GohighlevelCalendarEventCreate": ".anthropic_model_tools_item", + "AnthropicModelToolsItem_GohighlevelContactCreate": ".anthropic_model_tools_item", + "AnthropicModelToolsItem_GohighlevelContactGet": ".anthropic_model_tools_item", + "AnthropicModelToolsItem_GoogleCalendarAvailabilityCheck": ".anthropic_model_tools_item", + "AnthropicModelToolsItem_GoogleCalendarEventCreate": ".anthropic_model_tools_item", + "AnthropicModelToolsItem_GoogleSheetsRowAppend": ".anthropic_model_tools_item", + "AnthropicModelToolsItem_Handoff": ".anthropic_model_tools_item", + "AnthropicModelToolsItem_Mcp": ".anthropic_model_tools_item", + "AnthropicModelToolsItem_Query": ".anthropic_model_tools_item", + "AnthropicModelToolsItem_SipRequest": ".anthropic_model_tools_item", + "AnthropicModelToolsItem_SlackMessageSend": ".anthropic_model_tools_item", + "AnthropicModelToolsItem_Sms": ".anthropic_model_tools_item", + "AnthropicModelToolsItem_TextEditor": ".anthropic_model_tools_item", + "AnthropicModelToolsItem_TransferCall": ".anthropic_model_tools_item", + "AnthropicModelToolsItem_Voicemail": ".anthropic_model_tools_item", + "AnthropicThinkingConfig": ".anthropic_thinking_config", + "AnthropicThinkingConfigType": ".anthropic_thinking_config_type", + "AnyscaleCredential": ".anyscale_credential", + "AnyscaleCredentialProvider": ".anyscale_credential_provider", + "AnyscaleModel": ".anyscale_model", + "AnyscaleModelToolsItem": ".anyscale_model_tools_item", + "AnyscaleModelToolsItem_ApiRequest": ".anyscale_model_tools_item", + "AnyscaleModelToolsItem_Bash": ".anyscale_model_tools_item", + "AnyscaleModelToolsItem_Code": ".anyscale_model_tools_item", + "AnyscaleModelToolsItem_Computer": ".anyscale_model_tools_item", + "AnyscaleModelToolsItem_Dtmf": ".anyscale_model_tools_item", + "AnyscaleModelToolsItem_EndCall": ".anyscale_model_tools_item", + "AnyscaleModelToolsItem_Function": ".anyscale_model_tools_item", + "AnyscaleModelToolsItem_GohighlevelCalendarAvailabilityCheck": ".anyscale_model_tools_item", + "AnyscaleModelToolsItem_GohighlevelCalendarEventCreate": ".anyscale_model_tools_item", + "AnyscaleModelToolsItem_GohighlevelContactCreate": ".anyscale_model_tools_item", + "AnyscaleModelToolsItem_GohighlevelContactGet": ".anyscale_model_tools_item", + "AnyscaleModelToolsItem_GoogleCalendarAvailabilityCheck": ".anyscale_model_tools_item", + "AnyscaleModelToolsItem_GoogleCalendarEventCreate": ".anyscale_model_tools_item", + "AnyscaleModelToolsItem_GoogleSheetsRowAppend": ".anyscale_model_tools_item", + "AnyscaleModelToolsItem_Handoff": ".anyscale_model_tools_item", + "AnyscaleModelToolsItem_Mcp": ".anyscale_model_tools_item", + "AnyscaleModelToolsItem_Query": ".anyscale_model_tools_item", + "AnyscaleModelToolsItem_SipRequest": ".anyscale_model_tools_item", + "AnyscaleModelToolsItem_SlackMessageSend": ".anyscale_model_tools_item", + "AnyscaleModelToolsItem_Sms": ".anyscale_model_tools_item", + "AnyscaleModelToolsItem_TextEditor": ".anyscale_model_tools_item", + "AnyscaleModelToolsItem_TransferCall": ".anyscale_model_tools_item", + "AnyscaleModelToolsItem_Voicemail": ".anyscale_model_tools_item", + "ApiRequestTool": ".api_request_tool", + "ApiRequestToolMessagesItem": ".api_request_tool_messages_item", + "ApiRequestToolMessagesItem_RequestComplete": ".api_request_tool_messages_item", + "ApiRequestToolMessagesItem_RequestFailed": ".api_request_tool_messages_item", + "ApiRequestToolMessagesItem_RequestResponseDelayed": ".api_request_tool_messages_item", + "ApiRequestToolMessagesItem_RequestStart": ".api_request_tool_messages_item", + "ApiRequestToolMethod": ".api_request_tool_method", + "Artifact": ".artifact", + "ArtifactMessagesItem": ".artifact_messages_item", + "ArtifactPlan": ".artifact_plan", + "ArtifactPlanRecordingFormat": ".artifact_plan_recording_format", + "AssemblyAiCredential": ".assembly_ai_credential", + "AssemblyAiCredentialProvider": ".assembly_ai_credential_provider", + "AssemblyAiTranscriber": ".assembly_ai_transcriber", + "AssemblyAiTranscriberLanguage": ".assembly_ai_transcriber_language", + "AssemblyAiTranscriberSpeechModel": ".assembly_ai_transcriber_speech_model", + "Assistant": ".assistant", + "AssistantActivation": ".assistant_activation", + "AssistantBackgroundSound": ".assistant_background_sound", + "AssistantBackgroundSoundZero": ".assistant_background_sound_zero", + "AssistantClientMessagesItem": ".assistant_client_messages_item", + "AssistantCredentialsItem": ".assistant_credentials_item", + "AssistantCredentialsItem_11Labs": ".assistant_credentials_item", + "AssistantCredentialsItem_Anthropic": ".assistant_credentials_item", + "AssistantCredentialsItem_AnthropicBedrock": ".assistant_credentials_item", + "AssistantCredentialsItem_Anyscale": ".assistant_credentials_item", + "AssistantCredentialsItem_AssemblyAi": ".assistant_credentials_item", + "AssistantCredentialsItem_Azure": ".assistant_credentials_item", + "AssistantCredentialsItem_AzureOpenai": ".assistant_credentials_item", + "AssistantCredentialsItem_ByoSipTrunk": ".assistant_credentials_item", + "AssistantCredentialsItem_Cartesia": ".assistant_credentials_item", + "AssistantCredentialsItem_Cerebras": ".assistant_credentials_item", + "AssistantCredentialsItem_Cloudflare": ".assistant_credentials_item", + "AssistantCredentialsItem_CustomCredential": ".assistant_credentials_item", + "AssistantCredentialsItem_CustomLlm": ".assistant_credentials_item", + "AssistantCredentialsItem_DeepSeek": ".assistant_credentials_item", + "AssistantCredentialsItem_Deepgram": ".assistant_credentials_item", + "AssistantCredentialsItem_Deepinfra": ".assistant_credentials_item", + "AssistantCredentialsItem_Email": ".assistant_credentials_item", + "AssistantCredentialsItem_Gcp": ".assistant_credentials_item", + "AssistantCredentialsItem_GhlOauth2Authorization": ".assistant_credentials_item", + "AssistantCredentialsItem_Gladia": ".assistant_credentials_item", + "AssistantCredentialsItem_Gohighlevel": ".assistant_credentials_item", + "AssistantCredentialsItem_Google": ".assistant_credentials_item", + "AssistantCredentialsItem_GoogleCalendarOauth2Authorization": ".assistant_credentials_item", + "AssistantCredentialsItem_GoogleCalendarOauth2Client": ".assistant_credentials_item", + "AssistantCredentialsItem_GoogleSheetsOauth2Authorization": ".assistant_credentials_item", + "AssistantCredentialsItem_Groq": ".assistant_credentials_item", + "AssistantCredentialsItem_Hume": ".assistant_credentials_item", + "AssistantCredentialsItem_InflectionAi": ".assistant_credentials_item", + "AssistantCredentialsItem_Inworld": ".assistant_credentials_item", + "AssistantCredentialsItem_Langfuse": ".assistant_credentials_item", + "AssistantCredentialsItem_Lmnt": ".assistant_credentials_item", + "AssistantCredentialsItem_Make": ".assistant_credentials_item", + "AssistantCredentialsItem_Minimax": ".assistant_credentials_item", + "AssistantCredentialsItem_Mistral": ".assistant_credentials_item", + "AssistantCredentialsItem_Neuphonic": ".assistant_credentials_item", + "AssistantCredentialsItem_Openai": ".assistant_credentials_item", + "AssistantCredentialsItem_Openrouter": ".assistant_credentials_item", + "AssistantCredentialsItem_PerplexityAi": ".assistant_credentials_item", + "AssistantCredentialsItem_Playht": ".assistant_credentials_item", + "AssistantCredentialsItem_RimeAi": ".assistant_credentials_item", + "AssistantCredentialsItem_Runpod": ".assistant_credentials_item", + "AssistantCredentialsItem_S3": ".assistant_credentials_item", + "AssistantCredentialsItem_SlackOauth2Authorization": ".assistant_credentials_item", + "AssistantCredentialsItem_SlackWebhook": ".assistant_credentials_item", + "AssistantCredentialsItem_SmallestAi": ".assistant_credentials_item", + "AssistantCredentialsItem_Soniox": ".assistant_credentials_item", + "AssistantCredentialsItem_Speechmatics": ".assistant_credentials_item", + "AssistantCredentialsItem_Supabase": ".assistant_credentials_item", + "AssistantCredentialsItem_Tavus": ".assistant_credentials_item", + "AssistantCredentialsItem_TogetherAi": ".assistant_credentials_item", + "AssistantCredentialsItem_Trieve": ".assistant_credentials_item", + "AssistantCredentialsItem_Twilio": ".assistant_credentials_item", + "AssistantCredentialsItem_Vonage": ".assistant_credentials_item", + "AssistantCredentialsItem_Webhook": ".assistant_credentials_item", + "AssistantCredentialsItem_Wellsaid": ".assistant_credentials_item", + "AssistantCredentialsItem_Xai": ".assistant_credentials_item", + "AssistantCustomEndpointingRule": ".assistant_custom_endpointing_rule", + "AssistantFirstMessageMode": ".assistant_first_message_mode", + "AssistantHookAssistantSpeechInterrupted": ".assistant_hook_assistant_speech_interrupted", + "AssistantHookCallEnding": ".assistant_hook_call_ending", + "AssistantHookCustomerSpeechInterrupted": ".assistant_hook_customer_speech_interrupted", + "AssistantHooksItem": ".assistant_hooks_item", + "AssistantMessage": ".assistant_message", + "AssistantMessageEvaluationContinuePlan": ".assistant_message_evaluation_continue_plan", + "AssistantMessageJudgePlanAi": ".assistant_message_judge_plan_ai", + "AssistantMessageJudgePlanAiModel": ".assistant_message_judge_plan_ai_model", + "AssistantMessageJudgePlanAiModel_Anthropic": ".assistant_message_judge_plan_ai_model", + "AssistantMessageJudgePlanAiModel_CustomLlm": ".assistant_message_judge_plan_ai_model", + "AssistantMessageJudgePlanAiModel_Google": ".assistant_message_judge_plan_ai_model", + "AssistantMessageJudgePlanAiModel_Openai": ".assistant_message_judge_plan_ai_model", + "AssistantMessageJudgePlanAiType": ".assistant_message_judge_plan_ai_type", + "AssistantMessageJudgePlanExact": ".assistant_message_judge_plan_exact", + "AssistantMessageJudgePlanRegex": ".assistant_message_judge_plan_regex", + "AssistantMessageRole": ".assistant_message_role", + "AssistantModel": ".assistant_model", + "AssistantModel_Anthropic": ".assistant_model", + "AssistantModel_AnthropicBedrock": ".assistant_model", + "AssistantModel_Anyscale": ".assistant_model", + "AssistantModel_Cerebras": ".assistant_model", + "AssistantModel_CustomLlm": ".assistant_model", + "AssistantModel_DeepSeek": ".assistant_model", + "AssistantModel_Deepinfra": ".assistant_model", + "AssistantModel_Google": ".assistant_model", + "AssistantModel_Groq": ".assistant_model", + "AssistantModel_InflectionAi": ".assistant_model", + "AssistantModel_Minimax": ".assistant_model", + "AssistantModel_Openai": ".assistant_model", + "AssistantModel_Openrouter": ".assistant_model", + "AssistantModel_PerplexityAi": ".assistant_model", + "AssistantModel_TogetherAi": ".assistant_model", + "AssistantModel_Xai": ".assistant_model", + "AssistantOverrides": ".assistant_overrides", + "AssistantOverridesBackgroundSound": ".assistant_overrides_background_sound", + "AssistantOverridesBackgroundSoundZero": ".assistant_overrides_background_sound_zero", + "AssistantOverridesClientMessagesItem": ".assistant_overrides_client_messages_item", + "AssistantOverridesCredentialsItem": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_11Labs": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_Anthropic": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_AnthropicBedrock": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_Anyscale": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_AssemblyAi": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_Azure": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_AzureOpenai": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_ByoSipTrunk": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_Cartesia": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_Cerebras": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_Cloudflare": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_CustomCredential": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_CustomLlm": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_DeepSeek": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_Deepgram": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_Deepinfra": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_Email": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_Gcp": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_GhlOauth2Authorization": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_Gladia": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_Gohighlevel": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_Google": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_GoogleCalendarOauth2Authorization": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_GoogleCalendarOauth2Client": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_GoogleSheetsOauth2Authorization": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_Groq": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_Hume": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_InflectionAi": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_Inworld": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_Langfuse": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_Lmnt": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_Make": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_Minimax": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_Mistral": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_Neuphonic": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_Openai": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_Openrouter": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_PerplexityAi": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_Playht": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_RimeAi": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_Runpod": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_S3": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_SlackOauth2Authorization": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_SlackWebhook": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_SmallestAi": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_Soniox": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_Speechmatics": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_Supabase": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_Tavus": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_TogetherAi": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_Trieve": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_Twilio": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_Vonage": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_Webhook": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_Wellsaid": ".assistant_overrides_credentials_item", + "AssistantOverridesCredentialsItem_Xai": ".assistant_overrides_credentials_item", + "AssistantOverridesFirstMessageMode": ".assistant_overrides_first_message_mode", + "AssistantOverridesHooksItem": ".assistant_overrides_hooks_item", + "AssistantOverridesModel": ".assistant_overrides_model", + "AssistantOverridesModel_Anthropic": ".assistant_overrides_model", + "AssistantOverridesModel_AnthropicBedrock": ".assistant_overrides_model", + "AssistantOverridesModel_Anyscale": ".assistant_overrides_model", + "AssistantOverridesModel_Cerebras": ".assistant_overrides_model", + "AssistantOverridesModel_CustomLlm": ".assistant_overrides_model", + "AssistantOverridesModel_DeepSeek": ".assistant_overrides_model", + "AssistantOverridesModel_Deepinfra": ".assistant_overrides_model", + "AssistantOverridesModel_Google": ".assistant_overrides_model", + "AssistantOverridesModel_Groq": ".assistant_overrides_model", + "AssistantOverridesModel_InflectionAi": ".assistant_overrides_model", + "AssistantOverridesModel_Minimax": ".assistant_overrides_model", + "AssistantOverridesModel_Openai": ".assistant_overrides_model", + "AssistantOverridesModel_Openrouter": ".assistant_overrides_model", + "AssistantOverridesModel_PerplexityAi": ".assistant_overrides_model", + "AssistantOverridesModel_TogetherAi": ".assistant_overrides_model", + "AssistantOverridesModel_Xai": ".assistant_overrides_model", + "AssistantOverridesServerMessagesItem": ".assistant_overrides_server_messages_item", + "AssistantOverridesToolsAppendItem": ".assistant_overrides_tools_append_item", + "AssistantOverridesToolsAppendItem_ApiRequest": ".assistant_overrides_tools_append_item", + "AssistantOverridesToolsAppendItem_Bash": ".assistant_overrides_tools_append_item", + "AssistantOverridesToolsAppendItem_Code": ".assistant_overrides_tools_append_item", + "AssistantOverridesToolsAppendItem_Computer": ".assistant_overrides_tools_append_item", + "AssistantOverridesToolsAppendItem_Dtmf": ".assistant_overrides_tools_append_item", + "AssistantOverridesToolsAppendItem_EndCall": ".assistant_overrides_tools_append_item", + "AssistantOverridesToolsAppendItem_Function": ".assistant_overrides_tools_append_item", + "AssistantOverridesToolsAppendItem_GohighlevelCalendarAvailabilityCheck": ".assistant_overrides_tools_append_item", + "AssistantOverridesToolsAppendItem_GohighlevelCalendarEventCreate": ".assistant_overrides_tools_append_item", + "AssistantOverridesToolsAppendItem_GohighlevelContactCreate": ".assistant_overrides_tools_append_item", + "AssistantOverridesToolsAppendItem_GohighlevelContactGet": ".assistant_overrides_tools_append_item", + "AssistantOverridesToolsAppendItem_GoogleCalendarAvailabilityCheck": ".assistant_overrides_tools_append_item", + "AssistantOverridesToolsAppendItem_GoogleCalendarEventCreate": ".assistant_overrides_tools_append_item", + "AssistantOverridesToolsAppendItem_GoogleSheetsRowAppend": ".assistant_overrides_tools_append_item", + "AssistantOverridesToolsAppendItem_Handoff": ".assistant_overrides_tools_append_item", + "AssistantOverridesToolsAppendItem_Mcp": ".assistant_overrides_tools_append_item", + "AssistantOverridesToolsAppendItem_Query": ".assistant_overrides_tools_append_item", + "AssistantOverridesToolsAppendItem_SipRequest": ".assistant_overrides_tools_append_item", + "AssistantOverridesToolsAppendItem_SlackMessageSend": ".assistant_overrides_tools_append_item", + "AssistantOverridesToolsAppendItem_Sms": ".assistant_overrides_tools_append_item", + "AssistantOverridesToolsAppendItem_TextEditor": ".assistant_overrides_tools_append_item", + "AssistantOverridesToolsAppendItem_TransferCall": ".assistant_overrides_tools_append_item", + "AssistantOverridesToolsAppendItem_Voicemail": ".assistant_overrides_tools_append_item", + "AssistantOverridesTranscriber": ".assistant_overrides_transcriber", + "AssistantOverridesTranscriber_11Labs": ".assistant_overrides_transcriber", + "AssistantOverridesTranscriber_AssemblyAi": ".assistant_overrides_transcriber", + "AssistantOverridesTranscriber_Azure": ".assistant_overrides_transcriber", + "AssistantOverridesTranscriber_Cartesia": ".assistant_overrides_transcriber", + "AssistantOverridesTranscriber_CustomTranscriber": ".assistant_overrides_transcriber", + "AssistantOverridesTranscriber_Deepgram": ".assistant_overrides_transcriber", + "AssistantOverridesTranscriber_Gladia": ".assistant_overrides_transcriber", + "AssistantOverridesTranscriber_Google": ".assistant_overrides_transcriber", + "AssistantOverridesTranscriber_Openai": ".assistant_overrides_transcriber", + "AssistantOverridesTranscriber_Soniox": ".assistant_overrides_transcriber", + "AssistantOverridesTranscriber_Speechmatics": ".assistant_overrides_transcriber", + "AssistantOverridesTranscriber_Talkscriber": ".assistant_overrides_transcriber", + "AssistantOverridesVoice": ".assistant_overrides_voice", + "AssistantOverridesVoice_11Labs": ".assistant_overrides_voice", + "AssistantOverridesVoice_Azure": ".assistant_overrides_voice", + "AssistantOverridesVoice_Cartesia": ".assistant_overrides_voice", + "AssistantOverridesVoice_CustomVoice": ".assistant_overrides_voice", + "AssistantOverridesVoice_Deepgram": ".assistant_overrides_voice", + "AssistantOverridesVoice_Hume": ".assistant_overrides_voice", + "AssistantOverridesVoice_Inworld": ".assistant_overrides_voice", + "AssistantOverridesVoice_Lmnt": ".assistant_overrides_voice", + "AssistantOverridesVoice_Minimax": ".assistant_overrides_voice", + "AssistantOverridesVoice_Neuphonic": ".assistant_overrides_voice", + "AssistantOverridesVoice_Openai": ".assistant_overrides_voice", + "AssistantOverridesVoice_Playht": ".assistant_overrides_voice", + "AssistantOverridesVoice_RimeAi": ".assistant_overrides_voice", + "AssistantOverridesVoice_Sesame": ".assistant_overrides_voice", + "AssistantOverridesVoice_SmallestAi": ".assistant_overrides_voice", + "AssistantOverridesVoice_Tavus": ".assistant_overrides_voice", + "AssistantOverridesVoice_Vapi": ".assistant_overrides_voice", + "AssistantOverridesVoice_Wellsaid": ".assistant_overrides_voice", + "AssistantOverridesVoicemailDetection": ".assistant_overrides_voicemail_detection", + "AssistantOverridesVoicemailDetectionZero": ".assistant_overrides_voicemail_detection_zero", + "AssistantPaginatedResponse": ".assistant_paginated_response", + "AssistantServerMessagesItem": ".assistant_server_messages_item", + "AssistantSpeechWordAlignmentTiming": ".assistant_speech_word_alignment_timing", + "AssistantSpeechWordProgressTiming": ".assistant_speech_word_progress_timing", + "AssistantSpeechWordTimestamp": ".assistant_speech_word_timestamp", + "AssistantTranscriber": ".assistant_transcriber", + "AssistantTranscriber_11Labs": ".assistant_transcriber", + "AssistantTranscriber_AssemblyAi": ".assistant_transcriber", + "AssistantTranscriber_Azure": ".assistant_transcriber", + "AssistantTranscriber_Cartesia": ".assistant_transcriber", + "AssistantTranscriber_CustomTranscriber": ".assistant_transcriber", + "AssistantTranscriber_Deepgram": ".assistant_transcriber", + "AssistantTranscriber_Gladia": ".assistant_transcriber", + "AssistantTranscriber_Google": ".assistant_transcriber", + "AssistantTranscriber_Openai": ".assistant_transcriber", + "AssistantTranscriber_Soniox": ".assistant_transcriber", + "AssistantTranscriber_Speechmatics": ".assistant_transcriber", + "AssistantTranscriber_Talkscriber": ".assistant_transcriber", + "AssistantUserEditable": ".assistant_user_editable", + "AssistantVersionPaginatedResponse": ".assistant_version_paginated_response", + "AssistantVoice": ".assistant_voice", + "AssistantVoice_11Labs": ".assistant_voice", + "AssistantVoice_Azure": ".assistant_voice", + "AssistantVoice_Cartesia": ".assistant_voice", + "AssistantVoice_CustomVoice": ".assistant_voice", + "AssistantVoice_Deepgram": ".assistant_voice", + "AssistantVoice_Hume": ".assistant_voice", + "AssistantVoice_Inworld": ".assistant_voice", + "AssistantVoice_Lmnt": ".assistant_voice", + "AssistantVoice_Minimax": ".assistant_voice", + "AssistantVoice_Neuphonic": ".assistant_voice", + "AssistantVoice_Openai": ".assistant_voice", + "AssistantVoice_Playht": ".assistant_voice", + "AssistantVoice_RimeAi": ".assistant_voice", + "AssistantVoice_Sesame": ".assistant_voice", + "AssistantVoice_SmallestAi": ".assistant_voice", + "AssistantVoice_Tavus": ".assistant_voice", + "AssistantVoice_Vapi": ".assistant_voice", + "AssistantVoice_Wellsaid": ".assistant_voice", + "AssistantVoicemailDetection": ".assistant_voicemail_detection", + "AssistantVoicemailDetectionZero": ".assistant_voicemail_detection_zero", + "AutoReloadPlan": ".auto_reload_plan", + "AwsStsAssumeRoleUser": ".aws_sts_assume_role_user", + "AwsStsAuthenticationArtifact": ".aws_sts_authentication_artifact", + "AwsStsAuthenticationPlan": ".aws_sts_authentication_plan", + "AwsStsAuthenticationSession": ".aws_sts_authentication_session", + "AwsStsCredentials": ".aws_sts_credentials", + "AwsiamCredentialsAuthenticationPlan": ".awsiam_credentials_authentication_plan", + "AzureBlobStorageBucketPlan": ".azure_blob_storage_bucket_plan", + "AzureCredential": ".azure_credential", + "AzureCredentialProvider": ".azure_credential_provider", + "AzureCredentialRegion": ".azure_credential_region", + "AzureCredentialService": ".azure_credential_service", + "AzureOpenAiCredential": ".azure_open_ai_credential", + "AzureOpenAiCredentialModelsItem": ".azure_open_ai_credential_models_item", + "AzureOpenAiCredentialProvider": ".azure_open_ai_credential_provider", + "AzureOpenAiCredentialRegion": ".azure_open_ai_credential_region", + "AzureSpeechTranscriber": ".azure_speech_transcriber", + "AzureSpeechTranscriberLanguage": ".azure_speech_transcriber_language", + "AzureSpeechTranscriberSegmentationStrategy": ".azure_speech_transcriber_segmentation_strategy", + "AzureVoice": ".azure_voice", + "AzureVoiceId": ".azure_voice_id", + "AzureVoiceIdEnum": ".azure_voice_id_enum", + "BackgroundSpeechDenoisingPlan": ".background_speech_denoising_plan", + "BackoffPlan": ".backoff_plan", + "BarInsight": ".bar_insight", + "BarInsightFromCallTable": ".bar_insight_from_call_table", + "BarInsightFromCallTableGroupBy": ".bar_insight_from_call_table_group_by", + "BarInsightFromCallTableQueriesItem": ".bar_insight_from_call_table_queries_item", + "BarInsightFromCallTableType": ".bar_insight_from_call_table_type", + "BarInsightGroupBy": ".bar_insight_group_by", + "BarInsightMetadata": ".bar_insight_metadata", + "BarInsightQueriesItem": ".bar_insight_queries_item", + "BashTool": ".bash_tool", + "BashToolMessagesItem": ".bash_tool_messages_item", + "BashToolMessagesItem_RequestComplete": ".bash_tool_messages_item", + "BashToolMessagesItem_RequestFailed": ".bash_tool_messages_item", + "BashToolMessagesItem_RequestResponseDelayed": ".bash_tool_messages_item", + "BashToolMessagesItem_RequestStart": ".bash_tool_messages_item", + "BashToolName": ".bash_tool_name", + "BashToolSubType": ".bash_tool_sub_type", + "BashToolWithToolCall": ".bash_tool_with_tool_call", + "BashToolWithToolCallMessagesItem": ".bash_tool_with_tool_call_messages_item", + "BashToolWithToolCallMessagesItem_RequestComplete": ".bash_tool_with_tool_call_messages_item", + "BashToolWithToolCallMessagesItem_RequestFailed": ".bash_tool_with_tool_call_messages_item", + "BashToolWithToolCallMessagesItem_RequestResponseDelayed": ".bash_tool_with_tool_call_messages_item", + "BashToolWithToolCallMessagesItem_RequestStart": ".bash_tool_with_tool_call_messages_item", + "BashToolWithToolCallName": ".bash_tool_with_tool_call_name", + "BashToolWithToolCallSubType": ".bash_tool_with_tool_call_sub_type", + "BearerAuthenticationPlan": ".bearer_authentication_plan", + "BotMessage": ".bot_message", + "BothCustomEndpointingRule": ".both_custom_endpointing_rule", + "BucketPlan": ".bucket_plan", + "ByoPhoneNumber": ".byo_phone_number", + "ByoPhoneNumberFallbackDestination": ".byo_phone_number_fallback_destination", + "ByoPhoneNumberFallbackDestination_Number": ".byo_phone_number_fallback_destination", + "ByoPhoneNumberFallbackDestination_Sip": ".byo_phone_number_fallback_destination", + "ByoPhoneNumberHooksItem": ".byo_phone_number_hooks_item", + "ByoPhoneNumberHooksItem_CallEnding": ".byo_phone_number_hooks_item", + "ByoPhoneNumberHooksItem_CallRinging": ".byo_phone_number_hooks_item", + "ByoPhoneNumberStatus": ".byo_phone_number_status", + "ByoSipTrunkCredential": ".byo_sip_trunk_credential", + "ByoSipTrunkCredentialProvider": ".byo_sip_trunk_credential_provider", + "Call": ".call", + "CallBatchError": ".call_batch_error", + "CallBatchResponse": ".call_batch_response", + "CallCostsItem": ".call_costs_item", + "CallCostsItem_Analysis": ".call_costs_item", + "CallCostsItem_KnowledgeBase": ".call_costs_item", + "CallCostsItem_Model": ".call_costs_item", + "CallCostsItem_Transcriber": ".call_costs_item", + "CallCostsItem_Transport": ".call_costs_item", + "CallCostsItem_Vapi": ".call_costs_item", + "CallCostsItem_Voice": ".call_costs_item", + "CallCostsItem_VoicemailDetection": ".call_costs_item", + "CallDestination": ".call_destination", + "CallDestination_Number": ".call_destination", + "CallDestination_Sip": ".call_destination", + "CallEndedReason": ".call_ended_reason", + "CallHookAssistantSpeechInterrupted": ".call_hook_assistant_speech_interrupted", + "CallHookAssistantSpeechInterruptedDoItem": ".call_hook_assistant_speech_interrupted_do_item", + "CallHookAssistantSpeechInterruptedDoItem_MessageAdd": ".call_hook_assistant_speech_interrupted_do_item", + "CallHookAssistantSpeechInterruptedDoItem_Say": ".call_hook_assistant_speech_interrupted_do_item", + "CallHookAssistantSpeechInterruptedDoItem_Tool": ".call_hook_assistant_speech_interrupted_do_item", + "CallHookAssistantSpeechInterruptedOn": ".call_hook_assistant_speech_interrupted_on", + "CallHookCallEnding": ".call_hook_call_ending", + "CallHookCallEndingDoItem": ".call_hook_call_ending_do_item", + "CallHookCallEndingDoItem_MessageAdd": ".call_hook_call_ending_do_item", + "CallHookCallEndingDoItem_Tool": ".call_hook_call_ending_do_item", + "CallHookCallEndingOn": ".call_hook_call_ending_on", + "CallHookCustomerSpeechInterrupted": ".call_hook_customer_speech_interrupted", + "CallHookCustomerSpeechInterruptedDoItem": ".call_hook_customer_speech_interrupted_do_item", + "CallHookCustomerSpeechInterruptedDoItem_MessageAdd": ".call_hook_customer_speech_interrupted_do_item", + "CallHookCustomerSpeechInterruptedDoItem_Say": ".call_hook_customer_speech_interrupted_do_item", + "CallHookCustomerSpeechInterruptedDoItem_Tool": ".call_hook_customer_speech_interrupted_do_item", + "CallHookCustomerSpeechInterruptedOn": ".call_hook_customer_speech_interrupted_on", + "CallHookCustomerSpeechTimeout": ".call_hook_customer_speech_timeout", + "CallHookCustomerSpeechTimeoutDoItem": ".call_hook_customer_speech_timeout_do_item", + "CallHookCustomerSpeechTimeoutDoItem_MessageAdd": ".call_hook_customer_speech_timeout_do_item", + "CallHookCustomerSpeechTimeoutDoItem_Say": ".call_hook_customer_speech_timeout_do_item", + "CallHookCustomerSpeechTimeoutDoItem_Tool": ".call_hook_customer_speech_timeout_do_item", + "CallHookFilter": ".call_hook_filter", + "CallHookFilterType": ".call_hook_filter_type", + "CallHookModelResponseTimeout": ".call_hook_model_response_timeout", + "CallHookModelResponseTimeoutDoItem": ".call_hook_model_response_timeout_do_item", + "CallHookModelResponseTimeoutDoItem_MessageAdd": ".call_hook_model_response_timeout_do_item", + "CallHookModelResponseTimeoutDoItem_Say": ".call_hook_model_response_timeout_do_item", + "CallHookModelResponseTimeoutDoItem_Tool": ".call_hook_model_response_timeout_do_item", + "CallHookModelResponseTimeoutOn": ".call_hook_model_response_timeout_on", + "CallHookTranscriberEndpointedSpeechLowConfidence": ".call_hook_transcriber_endpointed_speech_low_confidence", + "CallHookTranscriberEndpointedSpeechLowConfidenceDoItem": ".call_hook_transcriber_endpointed_speech_low_confidence_do_item", + "CallHookTranscriberEndpointedSpeechLowConfidenceDoItem_MessageAdd": ".call_hook_transcriber_endpointed_speech_low_confidence_do_item", + "CallHookTranscriberEndpointedSpeechLowConfidenceDoItem_Say": ".call_hook_transcriber_endpointed_speech_low_confidence_do_item", + "CallHookTranscriberEndpointedSpeechLowConfidenceDoItem_Tool": ".call_hook_transcriber_endpointed_speech_low_confidence_do_item", + "CallMessagesItem": ".call_messages_item", + "CallPaginatedResponse": ".call_paginated_response", + "CallPhoneCallProvider": ".call_phone_call_provider", + "CallPhoneCallTransport": ".call_phone_call_transport", + "CallStatus": ".call_status", + "CallType": ".call_type", + "Campaign": ".campaign", + "CampaignEndedReason": ".campaign_ended_reason", + "CampaignPaginatedResponse": ".campaign_paginated_response", + "CampaignStatus": ".campaign_status", + "CartesiaCredential": ".cartesia_credential", + "CartesiaCredentialProvider": ".cartesia_credential_provider", + "CartesiaExperimentalControls": ".cartesia_experimental_controls", + "CartesiaExperimentalControlsEmotion": ".cartesia_experimental_controls_emotion", + "CartesiaGenerationConfig": ".cartesia_generation_config", + "CartesiaGenerationConfigExperimental": ".cartesia_generation_config_experimental", + "CartesiaPronunciationDictItem": ".cartesia_pronunciation_dict_item", + "CartesiaPronunciationDictionary": ".cartesia_pronunciation_dictionary", + "CartesiaSpeedControl": ".cartesia_speed_control", + "CartesiaSpeedControlZero": ".cartesia_speed_control_zero", + "CartesiaTranscriber": ".cartesia_transcriber", + "CartesiaTranscriberLanguage": ".cartesia_transcriber_language", + "CartesiaTranscriberModel": ".cartesia_transcriber_model", + "CartesiaVoice": ".cartesia_voice", + "CartesiaVoiceLanguage": ".cartesia_voice_language", + "CartesiaVoiceModel": ".cartesia_voice_model", + "CerebrasCredential": ".cerebras_credential", + "CerebrasCredentialProvider": ".cerebras_credential_provider", + "CerebrasModel": ".cerebras_model", + "CerebrasModelModel": ".cerebras_model_model", + "CerebrasModelToolsItem": ".cerebras_model_tools_item", + "CerebrasModelToolsItem_ApiRequest": ".cerebras_model_tools_item", + "CerebrasModelToolsItem_Bash": ".cerebras_model_tools_item", + "CerebrasModelToolsItem_Code": ".cerebras_model_tools_item", + "CerebrasModelToolsItem_Computer": ".cerebras_model_tools_item", + "CerebrasModelToolsItem_Dtmf": ".cerebras_model_tools_item", + "CerebrasModelToolsItem_EndCall": ".cerebras_model_tools_item", + "CerebrasModelToolsItem_Function": ".cerebras_model_tools_item", + "CerebrasModelToolsItem_GohighlevelCalendarAvailabilityCheck": ".cerebras_model_tools_item", + "CerebrasModelToolsItem_GohighlevelCalendarEventCreate": ".cerebras_model_tools_item", + "CerebrasModelToolsItem_GohighlevelContactCreate": ".cerebras_model_tools_item", + "CerebrasModelToolsItem_GohighlevelContactGet": ".cerebras_model_tools_item", + "CerebrasModelToolsItem_GoogleCalendarAvailabilityCheck": ".cerebras_model_tools_item", + "CerebrasModelToolsItem_GoogleCalendarEventCreate": ".cerebras_model_tools_item", + "CerebrasModelToolsItem_GoogleSheetsRowAppend": ".cerebras_model_tools_item", + "CerebrasModelToolsItem_Handoff": ".cerebras_model_tools_item", + "CerebrasModelToolsItem_Mcp": ".cerebras_model_tools_item", + "CerebrasModelToolsItem_Query": ".cerebras_model_tools_item", + "CerebrasModelToolsItem_SipRequest": ".cerebras_model_tools_item", + "CerebrasModelToolsItem_SlackMessageSend": ".cerebras_model_tools_item", + "CerebrasModelToolsItem_Sms": ".cerebras_model_tools_item", + "CerebrasModelToolsItem_TextEditor": ".cerebras_model_tools_item", + "CerebrasModelToolsItem_TransferCall": ".cerebras_model_tools_item", + "CerebrasModelToolsItem_Voicemail": ".cerebras_model_tools_item", + "Chat": ".chat", + "ChatAssistantOverrides": ".chat_assistant_overrides", + "ChatCost": ".chat_cost", + "ChatCostsItem": ".chat_costs_item", + "ChatCostsItem_Chat": ".chat_costs_item", + "ChatCostsItem_Model": ".chat_costs_item", + "ChatEvalAssistantMessageEvaluation": ".chat_eval_assistant_message_evaluation", + "ChatEvalAssistantMessageEvaluationJudgePlan": ".chat_eval_assistant_message_evaluation_judge_plan", + "ChatEvalAssistantMessageEvaluationJudgePlan_Ai": ".chat_eval_assistant_message_evaluation_judge_plan", + "ChatEvalAssistantMessageEvaluationJudgePlan_Exact": ".chat_eval_assistant_message_evaluation_judge_plan", + "ChatEvalAssistantMessageEvaluationJudgePlan_Regex": ".chat_eval_assistant_message_evaluation_judge_plan", + "ChatEvalAssistantMessageEvaluationRole": ".chat_eval_assistant_message_evaluation_role", + "ChatEvalAssistantMessageMock": ".chat_eval_assistant_message_mock", + "ChatEvalAssistantMessageMockRole": ".chat_eval_assistant_message_mock_role", + "ChatEvalAssistantMessageMockToolCall": ".chat_eval_assistant_message_mock_tool_call", + "ChatEvalSystemMessageMock": ".chat_eval_system_message_mock", + "ChatEvalSystemMessageMockRole": ".chat_eval_system_message_mock_role", + "ChatEvalToolResponseMessageEvaluation": ".chat_eval_tool_response_message_evaluation", + "ChatEvalToolResponseMessageEvaluationRole": ".chat_eval_tool_response_message_evaluation_role", + "ChatEvalToolResponseMessageMock": ".chat_eval_tool_response_message_mock", + "ChatEvalToolResponseMessageMockRole": ".chat_eval_tool_response_message_mock_role", + "ChatEvalUserMessageMock": ".chat_eval_user_message_mock", + "ChatEvalUserMessageMockRole": ".chat_eval_user_message_mock_role", + "ChatInput": ".chat_input", + "ChatInputOneItem": ".chat_input_one_item", + "ChatMessagesItem": ".chat_messages_item", + "ChatOutputItem": ".chat_output_item", + "ChatPaginatedResponse": ".chat_paginated_response", + "ChunkPlan": ".chunk_plan", + "ClientInboundMessage": ".client_inbound_message", + "ClientInboundMessageAddMessage": ".client_inbound_message_add_message", + "ClientInboundMessageControl": ".client_inbound_message_control", + "ClientInboundMessageControlControl": ".client_inbound_message_control_control", + "ClientInboundMessageEndCall": ".client_inbound_message_end_call", + "ClientInboundMessageMessage": ".client_inbound_message_message", + "ClientInboundMessageMessage_AddMessage": ".client_inbound_message_message", + "ClientInboundMessageMessage_Control": ".client_inbound_message_message", + "ClientInboundMessageMessage_EndCall": ".client_inbound_message_message", + "ClientInboundMessageMessage_Say": ".client_inbound_message_message", + "ClientInboundMessageMessage_SendTransportMessage": ".client_inbound_message_message", + "ClientInboundMessageMessage_Transfer": ".client_inbound_message_message", + "ClientInboundMessageSay": ".client_inbound_message_say", + "ClientInboundMessageSendTransportMessage": ".client_inbound_message_send_transport_message", + "ClientInboundMessageSendTransportMessageMessage": ".client_inbound_message_send_transport_message_message", + "ClientInboundMessageSendTransportMessageMessage_Twilio": ".client_inbound_message_send_transport_message_message", + "ClientInboundMessageSendTransportMessageMessage_VapiSip": ".client_inbound_message_send_transport_message_message", + "ClientInboundMessageTransfer": ".client_inbound_message_transfer", + "ClientInboundMessageTransferDestination": ".client_inbound_message_transfer_destination", + "ClientInboundMessageTransferDestination_Number": ".client_inbound_message_transfer_destination", + "ClientInboundMessageTransferDestination_Sip": ".client_inbound_message_transfer_destination", + "ClientMessage": ".client_message", + "ClientMessageAssistantSpeech": ".client_message_assistant_speech", + "ClientMessageAssistantSpeechPhoneNumber": ".client_message_assistant_speech_phone_number", + "ClientMessageAssistantSpeechPhoneNumber_ByoPhoneNumber": ".client_message_assistant_speech_phone_number", + "ClientMessageAssistantSpeechPhoneNumber_Telnyx": ".client_message_assistant_speech_phone_number", + "ClientMessageAssistantSpeechPhoneNumber_Twilio": ".client_message_assistant_speech_phone_number", + "ClientMessageAssistantSpeechPhoneNumber_Vapi": ".client_message_assistant_speech_phone_number", + "ClientMessageAssistantSpeechPhoneNumber_Vonage": ".client_message_assistant_speech_phone_number", + "ClientMessageAssistantSpeechSource": ".client_message_assistant_speech_source", + "ClientMessageAssistantSpeechTiming": ".client_message_assistant_speech_timing", + "ClientMessageAssistantSpeechTiming_WordAlignment": ".client_message_assistant_speech_timing", + "ClientMessageAssistantSpeechTiming_WordProgress": ".client_message_assistant_speech_timing", + "ClientMessageAssistantSpeechType": ".client_message_assistant_speech_type", + "ClientMessageAssistantStarted": ".client_message_assistant_started", + "ClientMessageAssistantStartedPhoneNumber": ".client_message_assistant_started_phone_number", + "ClientMessageAssistantStartedPhoneNumber_ByoPhoneNumber": ".client_message_assistant_started_phone_number", + "ClientMessageAssistantStartedPhoneNumber_Telnyx": ".client_message_assistant_started_phone_number", + "ClientMessageAssistantStartedPhoneNumber_Twilio": ".client_message_assistant_started_phone_number", + "ClientMessageAssistantStartedPhoneNumber_Vapi": ".client_message_assistant_started_phone_number", + "ClientMessageAssistantStartedPhoneNumber_Vonage": ".client_message_assistant_started_phone_number", + "ClientMessageAssistantStartedType": ".client_message_assistant_started_type", + "ClientMessageCallDeleteFailed": ".client_message_call_delete_failed", + "ClientMessageCallDeleteFailedPhoneNumber": ".client_message_call_delete_failed_phone_number", + "ClientMessageCallDeleteFailedPhoneNumber_ByoPhoneNumber": ".client_message_call_delete_failed_phone_number", + "ClientMessageCallDeleteFailedPhoneNumber_Telnyx": ".client_message_call_delete_failed_phone_number", + "ClientMessageCallDeleteFailedPhoneNumber_Twilio": ".client_message_call_delete_failed_phone_number", + "ClientMessageCallDeleteFailedPhoneNumber_Vapi": ".client_message_call_delete_failed_phone_number", + "ClientMessageCallDeleteFailedPhoneNumber_Vonage": ".client_message_call_delete_failed_phone_number", + "ClientMessageCallDeleteFailedType": ".client_message_call_delete_failed_type", + "ClientMessageCallDeleted": ".client_message_call_deleted", + "ClientMessageCallDeletedPhoneNumber": ".client_message_call_deleted_phone_number", + "ClientMessageCallDeletedPhoneNumber_ByoPhoneNumber": ".client_message_call_deleted_phone_number", + "ClientMessageCallDeletedPhoneNumber_Telnyx": ".client_message_call_deleted_phone_number", + "ClientMessageCallDeletedPhoneNumber_Twilio": ".client_message_call_deleted_phone_number", + "ClientMessageCallDeletedPhoneNumber_Vapi": ".client_message_call_deleted_phone_number", + "ClientMessageCallDeletedPhoneNumber_Vonage": ".client_message_call_deleted_phone_number", + "ClientMessageCallDeletedType": ".client_message_call_deleted_type", + "ClientMessageChatCreated": ".client_message_chat_created", + "ClientMessageChatCreatedPhoneNumber": ".client_message_chat_created_phone_number", + "ClientMessageChatCreatedPhoneNumber_ByoPhoneNumber": ".client_message_chat_created_phone_number", + "ClientMessageChatCreatedPhoneNumber_Telnyx": ".client_message_chat_created_phone_number", + "ClientMessageChatCreatedPhoneNumber_Twilio": ".client_message_chat_created_phone_number", + "ClientMessageChatCreatedPhoneNumber_Vapi": ".client_message_chat_created_phone_number", + "ClientMessageChatCreatedPhoneNumber_Vonage": ".client_message_chat_created_phone_number", + "ClientMessageChatCreatedType": ".client_message_chat_created_type", + "ClientMessageChatDeleted": ".client_message_chat_deleted", + "ClientMessageChatDeletedPhoneNumber": ".client_message_chat_deleted_phone_number", + "ClientMessageChatDeletedPhoneNumber_ByoPhoneNumber": ".client_message_chat_deleted_phone_number", + "ClientMessageChatDeletedPhoneNumber_Telnyx": ".client_message_chat_deleted_phone_number", + "ClientMessageChatDeletedPhoneNumber_Twilio": ".client_message_chat_deleted_phone_number", + "ClientMessageChatDeletedPhoneNumber_Vapi": ".client_message_chat_deleted_phone_number", + "ClientMessageChatDeletedPhoneNumber_Vonage": ".client_message_chat_deleted_phone_number", + "ClientMessageChatDeletedType": ".client_message_chat_deleted_type", + "ClientMessageConversationUpdate": ".client_message_conversation_update", + "ClientMessageConversationUpdateMessagesItem": ".client_message_conversation_update_messages_item", + "ClientMessageConversationUpdatePhoneNumber": ".client_message_conversation_update_phone_number", + "ClientMessageConversationUpdatePhoneNumber_ByoPhoneNumber": ".client_message_conversation_update_phone_number", + "ClientMessageConversationUpdatePhoneNumber_Telnyx": ".client_message_conversation_update_phone_number", + "ClientMessageConversationUpdatePhoneNumber_Twilio": ".client_message_conversation_update_phone_number", + "ClientMessageConversationUpdatePhoneNumber_Vapi": ".client_message_conversation_update_phone_number", + "ClientMessageConversationUpdatePhoneNumber_Vonage": ".client_message_conversation_update_phone_number", + "ClientMessageConversationUpdateType": ".client_message_conversation_update_type", + "ClientMessageHang": ".client_message_hang", + "ClientMessageHangPhoneNumber": ".client_message_hang_phone_number", + "ClientMessageHangPhoneNumber_ByoPhoneNumber": ".client_message_hang_phone_number", + "ClientMessageHangPhoneNumber_Telnyx": ".client_message_hang_phone_number", + "ClientMessageHangPhoneNumber_Twilio": ".client_message_hang_phone_number", + "ClientMessageHangPhoneNumber_Vapi": ".client_message_hang_phone_number", + "ClientMessageHangPhoneNumber_Vonage": ".client_message_hang_phone_number", + "ClientMessageHangType": ".client_message_hang_type", + "ClientMessageLanguageChangeDetected": ".client_message_language_change_detected", + "ClientMessageLanguageChangeDetectedPhoneNumber": ".client_message_language_change_detected_phone_number", + "ClientMessageLanguageChangeDetectedPhoneNumber_ByoPhoneNumber": ".client_message_language_change_detected_phone_number", + "ClientMessageLanguageChangeDetectedPhoneNumber_Telnyx": ".client_message_language_change_detected_phone_number", + "ClientMessageLanguageChangeDetectedPhoneNumber_Twilio": ".client_message_language_change_detected_phone_number", + "ClientMessageLanguageChangeDetectedPhoneNumber_Vapi": ".client_message_language_change_detected_phone_number", + "ClientMessageLanguageChangeDetectedPhoneNumber_Vonage": ".client_message_language_change_detected_phone_number", + "ClientMessageLanguageChangeDetectedType": ".client_message_language_change_detected_type", + "ClientMessageMessage": ".client_message_message", + "ClientMessageMetadata": ".client_message_metadata", + "ClientMessageMetadataPhoneNumber": ".client_message_metadata_phone_number", + "ClientMessageMetadataPhoneNumber_ByoPhoneNumber": ".client_message_metadata_phone_number", + "ClientMessageMetadataPhoneNumber_Telnyx": ".client_message_metadata_phone_number", + "ClientMessageMetadataPhoneNumber_Twilio": ".client_message_metadata_phone_number", + "ClientMessageMetadataPhoneNumber_Vapi": ".client_message_metadata_phone_number", + "ClientMessageMetadataPhoneNumber_Vonage": ".client_message_metadata_phone_number", + "ClientMessageMetadataType": ".client_message_metadata_type", + "ClientMessageModelOutput": ".client_message_model_output", + "ClientMessageModelOutputPhoneNumber": ".client_message_model_output_phone_number", + "ClientMessageModelOutputPhoneNumber_ByoPhoneNumber": ".client_message_model_output_phone_number", + "ClientMessageModelOutputPhoneNumber_Telnyx": ".client_message_model_output_phone_number", + "ClientMessageModelOutputPhoneNumber_Twilio": ".client_message_model_output_phone_number", + "ClientMessageModelOutputPhoneNumber_Vapi": ".client_message_model_output_phone_number", + "ClientMessageModelOutputPhoneNumber_Vonage": ".client_message_model_output_phone_number", + "ClientMessageModelOutputType": ".client_message_model_output_type", + "ClientMessageSessionCreated": ".client_message_session_created", + "ClientMessageSessionCreatedPhoneNumber": ".client_message_session_created_phone_number", + "ClientMessageSessionCreatedPhoneNumber_ByoPhoneNumber": ".client_message_session_created_phone_number", + "ClientMessageSessionCreatedPhoneNumber_Telnyx": ".client_message_session_created_phone_number", + "ClientMessageSessionCreatedPhoneNumber_Twilio": ".client_message_session_created_phone_number", + "ClientMessageSessionCreatedPhoneNumber_Vapi": ".client_message_session_created_phone_number", + "ClientMessageSessionCreatedPhoneNumber_Vonage": ".client_message_session_created_phone_number", + "ClientMessageSessionCreatedType": ".client_message_session_created_type", + "ClientMessageSessionDeleted": ".client_message_session_deleted", + "ClientMessageSessionDeletedPhoneNumber": ".client_message_session_deleted_phone_number", + "ClientMessageSessionDeletedPhoneNumber_ByoPhoneNumber": ".client_message_session_deleted_phone_number", + "ClientMessageSessionDeletedPhoneNumber_Telnyx": ".client_message_session_deleted_phone_number", + "ClientMessageSessionDeletedPhoneNumber_Twilio": ".client_message_session_deleted_phone_number", + "ClientMessageSessionDeletedPhoneNumber_Vapi": ".client_message_session_deleted_phone_number", + "ClientMessageSessionDeletedPhoneNumber_Vonage": ".client_message_session_deleted_phone_number", + "ClientMessageSessionDeletedType": ".client_message_session_deleted_type", + "ClientMessageSessionUpdated": ".client_message_session_updated", + "ClientMessageSessionUpdatedPhoneNumber": ".client_message_session_updated_phone_number", + "ClientMessageSessionUpdatedPhoneNumber_ByoPhoneNumber": ".client_message_session_updated_phone_number", + "ClientMessageSessionUpdatedPhoneNumber_Telnyx": ".client_message_session_updated_phone_number", + "ClientMessageSessionUpdatedPhoneNumber_Twilio": ".client_message_session_updated_phone_number", + "ClientMessageSessionUpdatedPhoneNumber_Vapi": ".client_message_session_updated_phone_number", + "ClientMessageSessionUpdatedPhoneNumber_Vonage": ".client_message_session_updated_phone_number", + "ClientMessageSessionUpdatedType": ".client_message_session_updated_type", + "ClientMessageSpeechUpdate": ".client_message_speech_update", + "ClientMessageSpeechUpdatePhoneNumber": ".client_message_speech_update_phone_number", + "ClientMessageSpeechUpdatePhoneNumber_ByoPhoneNumber": ".client_message_speech_update_phone_number", + "ClientMessageSpeechUpdatePhoneNumber_Telnyx": ".client_message_speech_update_phone_number", + "ClientMessageSpeechUpdatePhoneNumber_Twilio": ".client_message_speech_update_phone_number", + "ClientMessageSpeechUpdatePhoneNumber_Vapi": ".client_message_speech_update_phone_number", + "ClientMessageSpeechUpdatePhoneNumber_Vonage": ".client_message_speech_update_phone_number", + "ClientMessageSpeechUpdateRole": ".client_message_speech_update_role", + "ClientMessageSpeechUpdateStatus": ".client_message_speech_update_status", + "ClientMessageSpeechUpdateType": ".client_message_speech_update_type", + "ClientMessageToolCalls": ".client_message_tool_calls", + "ClientMessageToolCallsPhoneNumber": ".client_message_tool_calls_phone_number", + "ClientMessageToolCallsPhoneNumber_ByoPhoneNumber": ".client_message_tool_calls_phone_number", + "ClientMessageToolCallsPhoneNumber_Telnyx": ".client_message_tool_calls_phone_number", + "ClientMessageToolCallsPhoneNumber_Twilio": ".client_message_tool_calls_phone_number", + "ClientMessageToolCallsPhoneNumber_Vapi": ".client_message_tool_calls_phone_number", + "ClientMessageToolCallsPhoneNumber_Vonage": ".client_message_tool_calls_phone_number", + "ClientMessageToolCallsResult": ".client_message_tool_calls_result", + "ClientMessageToolCallsResultPhoneNumber": ".client_message_tool_calls_result_phone_number", + "ClientMessageToolCallsResultPhoneNumber_ByoPhoneNumber": ".client_message_tool_calls_result_phone_number", + "ClientMessageToolCallsResultPhoneNumber_Telnyx": ".client_message_tool_calls_result_phone_number", + "ClientMessageToolCallsResultPhoneNumber_Twilio": ".client_message_tool_calls_result_phone_number", + "ClientMessageToolCallsResultPhoneNumber_Vapi": ".client_message_tool_calls_result_phone_number", + "ClientMessageToolCallsResultPhoneNumber_Vonage": ".client_message_tool_calls_result_phone_number", + "ClientMessageToolCallsResultType": ".client_message_tool_calls_result_type", + "ClientMessageToolCallsToolWithToolCallListItem": ".client_message_tool_calls_tool_with_tool_call_list_item", + "ClientMessageToolCallsToolWithToolCallListItem_Bash": ".client_message_tool_calls_tool_with_tool_call_list_item", + "ClientMessageToolCallsToolWithToolCallListItem_Computer": ".client_message_tool_calls_tool_with_tool_call_list_item", + "ClientMessageToolCallsToolWithToolCallListItem_Function": ".client_message_tool_calls_tool_with_tool_call_list_item", + "ClientMessageToolCallsToolWithToolCallListItem_Ghl": ".client_message_tool_calls_tool_with_tool_call_list_item", + "ClientMessageToolCallsToolWithToolCallListItem_GoogleCalendarEventCreate": ".client_message_tool_calls_tool_with_tool_call_list_item", + "ClientMessageToolCallsToolWithToolCallListItem_Make": ".client_message_tool_calls_tool_with_tool_call_list_item", + "ClientMessageToolCallsToolWithToolCallListItem_TextEditor": ".client_message_tool_calls_tool_with_tool_call_list_item", + "ClientMessageToolCallsType": ".client_message_tool_calls_type", + "ClientMessageTranscript": ".client_message_transcript", + "ClientMessageTranscriptPhoneNumber": ".client_message_transcript_phone_number", + "ClientMessageTranscriptPhoneNumber_ByoPhoneNumber": ".client_message_transcript_phone_number", + "ClientMessageTranscriptPhoneNumber_Telnyx": ".client_message_transcript_phone_number", + "ClientMessageTranscriptPhoneNumber_Twilio": ".client_message_transcript_phone_number", + "ClientMessageTranscriptPhoneNumber_Vapi": ".client_message_transcript_phone_number", + "ClientMessageTranscriptPhoneNumber_Vonage": ".client_message_transcript_phone_number", + "ClientMessageTranscriptRole": ".client_message_transcript_role", + "ClientMessageTranscriptTranscriptType": ".client_message_transcript_transcript_type", + "ClientMessageTranscriptType": ".client_message_transcript_type", + "ClientMessageTransferUpdate": ".client_message_transfer_update", + "ClientMessageTransferUpdateDestination": ".client_message_transfer_update_destination", + "ClientMessageTransferUpdateDestination_Assistant": ".client_message_transfer_update_destination", + "ClientMessageTransferUpdateDestination_Number": ".client_message_transfer_update_destination", + "ClientMessageTransferUpdateDestination_Sip": ".client_message_transfer_update_destination", + "ClientMessageTransferUpdatePhoneNumber": ".client_message_transfer_update_phone_number", + "ClientMessageTransferUpdatePhoneNumber_ByoPhoneNumber": ".client_message_transfer_update_phone_number", + "ClientMessageTransferUpdatePhoneNumber_Telnyx": ".client_message_transfer_update_phone_number", + "ClientMessageTransferUpdatePhoneNumber_Twilio": ".client_message_transfer_update_phone_number", + "ClientMessageTransferUpdatePhoneNumber_Vapi": ".client_message_transfer_update_phone_number", + "ClientMessageTransferUpdatePhoneNumber_Vonage": ".client_message_transfer_update_phone_number", + "ClientMessageTransferUpdateType": ".client_message_transfer_update_type", + "ClientMessageUserInterrupted": ".client_message_user_interrupted", + "ClientMessageUserInterruptedPhoneNumber": ".client_message_user_interrupted_phone_number", + "ClientMessageUserInterruptedPhoneNumber_ByoPhoneNumber": ".client_message_user_interrupted_phone_number", + "ClientMessageUserInterruptedPhoneNumber_Telnyx": ".client_message_user_interrupted_phone_number", + "ClientMessageUserInterruptedPhoneNumber_Twilio": ".client_message_user_interrupted_phone_number", + "ClientMessageUserInterruptedPhoneNumber_Vapi": ".client_message_user_interrupted_phone_number", + "ClientMessageUserInterruptedPhoneNumber_Vonage": ".client_message_user_interrupted_phone_number", + "ClientMessageUserInterruptedType": ".client_message_user_interrupted_type", + "ClientMessageVoiceInput": ".client_message_voice_input", + "ClientMessageVoiceInputPhoneNumber": ".client_message_voice_input_phone_number", + "ClientMessageVoiceInputPhoneNumber_ByoPhoneNumber": ".client_message_voice_input_phone_number", + "ClientMessageVoiceInputPhoneNumber_Telnyx": ".client_message_voice_input_phone_number", + "ClientMessageVoiceInputPhoneNumber_Twilio": ".client_message_voice_input_phone_number", + "ClientMessageVoiceInputPhoneNumber_Vapi": ".client_message_voice_input_phone_number", + "ClientMessageVoiceInputPhoneNumber_Vonage": ".client_message_voice_input_phone_number", + "ClientMessageVoiceInputType": ".client_message_voice_input_type", + "ClientMessageWorkflowNodeStarted": ".client_message_workflow_node_started", + "ClientMessageWorkflowNodeStartedPhoneNumber": ".client_message_workflow_node_started_phone_number", + "ClientMessageWorkflowNodeStartedPhoneNumber_ByoPhoneNumber": ".client_message_workflow_node_started_phone_number", + "ClientMessageWorkflowNodeStartedPhoneNumber_Telnyx": ".client_message_workflow_node_started_phone_number", + "ClientMessageWorkflowNodeStartedPhoneNumber_Twilio": ".client_message_workflow_node_started_phone_number", + "ClientMessageWorkflowNodeStartedPhoneNumber_Vapi": ".client_message_workflow_node_started_phone_number", + "ClientMessageWorkflowNodeStartedPhoneNumber_Vonage": ".client_message_workflow_node_started_phone_number", + "ClientMessageWorkflowNodeStartedType": ".client_message_workflow_node_started_type", + "CloneVoiceDto": ".clone_voice_dto", + "CloudflareCredential": ".cloudflare_credential", + "CloudflareCredentialProvider": ".cloudflare_credential_provider", + "CloudflareR2BucketPlan": ".cloudflare_r_2_bucket_plan", + "CodeTool": ".code_tool", + "CodeToolEnvironmentVariable": ".code_tool_environment_variable", + "CodeToolMessagesItem": ".code_tool_messages_item", + "CodeToolMessagesItem_RequestComplete": ".code_tool_messages_item", + "CodeToolMessagesItem_RequestFailed": ".code_tool_messages_item", + "CodeToolMessagesItem_RequestResponseDelayed": ".code_tool_messages_item", + "CodeToolMessagesItem_RequestStart": ".code_tool_messages_item", + "Compliance": ".compliance", + "ComplianceOverride": ".compliance_override", + "CompliancePlan": ".compliance_plan", + "CompliancePlanRecordingConsentPlan": ".compliance_plan_recording_consent_plan", + "CompliancePlanRecordingConsentPlan_StayOnLine": ".compliance_plan_recording_consent_plan", + "CompliancePlanRecordingConsentPlan_Verbal": ".compliance_plan_recording_consent_plan", + "ComputerTool": ".computer_tool", + "ComputerToolMessagesItem": ".computer_tool_messages_item", + "ComputerToolMessagesItem_RequestComplete": ".computer_tool_messages_item", + "ComputerToolMessagesItem_RequestFailed": ".computer_tool_messages_item", + "ComputerToolMessagesItem_RequestResponseDelayed": ".computer_tool_messages_item", + "ComputerToolMessagesItem_RequestStart": ".computer_tool_messages_item", + "ComputerToolName": ".computer_tool_name", + "ComputerToolSubType": ".computer_tool_sub_type", + "ComputerToolWithToolCall": ".computer_tool_with_tool_call", + "ComputerToolWithToolCallMessagesItem": ".computer_tool_with_tool_call_messages_item", + "ComputerToolWithToolCallMessagesItem_RequestComplete": ".computer_tool_with_tool_call_messages_item", + "ComputerToolWithToolCallMessagesItem_RequestFailed": ".computer_tool_with_tool_call_messages_item", + "ComputerToolWithToolCallMessagesItem_RequestResponseDelayed": ".computer_tool_with_tool_call_messages_item", + "ComputerToolWithToolCallMessagesItem_RequestStart": ".computer_tool_with_tool_call_messages_item", + "ComputerToolWithToolCallName": ".computer_tool_with_tool_call_name", + "ComputerToolWithToolCallSubType": ".computer_tool_with_tool_call_sub_type", + "Condition": ".condition", + "ConditionOperator": ".condition_operator", + "ContextEngineeringPlanAll": ".context_engineering_plan_all", + "ContextEngineeringPlanLastNMessages": ".context_engineering_plan_last_n_messages", + "ContextEngineeringPlanNone": ".context_engineering_plan_none", + "ContextEngineeringPlanUserAndAssistantMessages": ".context_engineering_plan_user_and_assistant_messages", + "ConversationNode": ".conversation_node", + "ConversationNodeModel": ".conversation_node_model", + "ConversationNodeModel_Anthropic": ".conversation_node_model", + "ConversationNodeModel_AnthropicBedrock": ".conversation_node_model", + "ConversationNodeModel_CustomLlm": ".conversation_node_model", + "ConversationNodeModel_Google": ".conversation_node_model", + "ConversationNodeModel_Openai": ".conversation_node_model", + "ConversationNodeToolsItem": ".conversation_node_tools_item", + "ConversationNodeToolsItem_ApiRequest": ".conversation_node_tools_item", + "ConversationNodeToolsItem_Bash": ".conversation_node_tools_item", + "ConversationNodeToolsItem_Code": ".conversation_node_tools_item", + "ConversationNodeToolsItem_Computer": ".conversation_node_tools_item", + "ConversationNodeToolsItem_Dtmf": ".conversation_node_tools_item", + "ConversationNodeToolsItem_EndCall": ".conversation_node_tools_item", + "ConversationNodeToolsItem_Function": ".conversation_node_tools_item", + "ConversationNodeToolsItem_GohighlevelCalendarAvailabilityCheck": ".conversation_node_tools_item", + "ConversationNodeToolsItem_GohighlevelCalendarEventCreate": ".conversation_node_tools_item", + "ConversationNodeToolsItem_GohighlevelContactCreate": ".conversation_node_tools_item", + "ConversationNodeToolsItem_GohighlevelContactGet": ".conversation_node_tools_item", + "ConversationNodeToolsItem_GoogleCalendarAvailabilityCheck": ".conversation_node_tools_item", + "ConversationNodeToolsItem_GoogleCalendarEventCreate": ".conversation_node_tools_item", + "ConversationNodeToolsItem_GoogleSheetsRowAppend": ".conversation_node_tools_item", + "ConversationNodeToolsItem_Handoff": ".conversation_node_tools_item", + "ConversationNodeToolsItem_Mcp": ".conversation_node_tools_item", + "ConversationNodeToolsItem_Query": ".conversation_node_tools_item", + "ConversationNodeToolsItem_SipRequest": ".conversation_node_tools_item", + "ConversationNodeToolsItem_SlackMessageSend": ".conversation_node_tools_item", + "ConversationNodeToolsItem_Sms": ".conversation_node_tools_item", + "ConversationNodeToolsItem_TextEditor": ".conversation_node_tools_item", + "ConversationNodeToolsItem_TransferCall": ".conversation_node_tools_item", + "ConversationNodeToolsItem_Voicemail": ".conversation_node_tools_item", + "ConversationNodeTranscriber": ".conversation_node_transcriber", + "ConversationNodeTranscriber_11Labs": ".conversation_node_transcriber", + "ConversationNodeTranscriber_AssemblyAi": ".conversation_node_transcriber", + "ConversationNodeTranscriber_Azure": ".conversation_node_transcriber", + "ConversationNodeTranscriber_Cartesia": ".conversation_node_transcriber", + "ConversationNodeTranscriber_CustomTranscriber": ".conversation_node_transcriber", + "ConversationNodeTranscriber_Deepgram": ".conversation_node_transcriber", + "ConversationNodeTranscriber_Gladia": ".conversation_node_transcriber", + "ConversationNodeTranscriber_Google": ".conversation_node_transcriber", + "ConversationNodeTranscriber_Openai": ".conversation_node_transcriber", + "ConversationNodeTranscriber_Soniox": ".conversation_node_transcriber", + "ConversationNodeTranscriber_Speechmatics": ".conversation_node_transcriber", + "ConversationNodeTranscriber_Talkscriber": ".conversation_node_transcriber", + "ConversationNodeVoice": ".conversation_node_voice", + "ConversationNodeVoice_11Labs": ".conversation_node_voice", + "ConversationNodeVoice_Azure": ".conversation_node_voice", + "ConversationNodeVoice_Cartesia": ".conversation_node_voice", + "ConversationNodeVoice_CustomVoice": ".conversation_node_voice", + "ConversationNodeVoice_Deepgram": ".conversation_node_voice", + "ConversationNodeVoice_Hume": ".conversation_node_voice", + "ConversationNodeVoice_Inworld": ".conversation_node_voice", + "ConversationNodeVoice_Lmnt": ".conversation_node_voice", + "ConversationNodeVoice_Minimax": ".conversation_node_voice", + "ConversationNodeVoice_Neuphonic": ".conversation_node_voice", + "ConversationNodeVoice_Openai": ".conversation_node_voice", + "ConversationNodeVoice_Playht": ".conversation_node_voice", + "ConversationNodeVoice_RimeAi": ".conversation_node_voice", + "ConversationNodeVoice_Sesame": ".conversation_node_voice", + "ConversationNodeVoice_SmallestAi": ".conversation_node_voice", + "ConversationNodeVoice_Tavus": ".conversation_node_voice", + "ConversationNodeVoice_Vapi": ".conversation_node_voice", + "ConversationNodeVoice_Wellsaid": ".conversation_node_voice", + "CostBreakdown": ".cost_breakdown", + "CreateAnthropicBedrockCredentialDto": ".create_anthropic_bedrock_credential_dto", + "CreateAnthropicBedrockCredentialDtoAuthenticationPlan": ".create_anthropic_bedrock_credential_dto_authentication_plan", + "CreateAnthropicBedrockCredentialDtoAuthenticationPlan_AwsIam": ".create_anthropic_bedrock_credential_dto_authentication_plan", + "CreateAnthropicBedrockCredentialDtoAuthenticationPlan_AwsSts": ".create_anthropic_bedrock_credential_dto_authentication_plan", + "CreateAnthropicBedrockCredentialDtoRegion": ".create_anthropic_bedrock_credential_dto_region", + "CreateAnthropicCredentialDto": ".create_anthropic_credential_dto", + "CreateAnyscaleCredentialDto": ".create_anyscale_credential_dto", + "CreateApiRequestToolDto": ".create_api_request_tool_dto", + "CreateApiRequestToolDtoMessagesItem": ".create_api_request_tool_dto_messages_item", + "CreateApiRequestToolDtoMessagesItem_RequestComplete": ".create_api_request_tool_dto_messages_item", + "CreateApiRequestToolDtoMessagesItem_RequestFailed": ".create_api_request_tool_dto_messages_item", + "CreateApiRequestToolDtoMessagesItem_RequestResponseDelayed": ".create_api_request_tool_dto_messages_item", + "CreateApiRequestToolDtoMessagesItem_RequestStart": ".create_api_request_tool_dto_messages_item", + "CreateApiRequestToolDtoMethod": ".create_api_request_tool_dto_method", + "CreateAssemblyAiCredentialDto": ".create_assembly_ai_credential_dto", + "CreateAssistantDto": ".create_assistant_dto", + "CreateAssistantDtoBackgroundSound": ".create_assistant_dto_background_sound", + "CreateAssistantDtoBackgroundSoundZero": ".create_assistant_dto_background_sound_zero", + "CreateAssistantDtoClientMessagesItem": ".create_assistant_dto_client_messages_item", + "CreateAssistantDtoCredentialsItem": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_11Labs": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_Anthropic": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_AnthropicBedrock": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_Anyscale": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_AssemblyAi": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_Azure": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_AzureOpenai": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_ByoSipTrunk": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_Cartesia": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_Cerebras": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_Cloudflare": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_CustomCredential": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_CustomLlm": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_DeepSeek": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_Deepgram": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_Deepinfra": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_Email": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_Gcp": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_GhlOauth2Authorization": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_Gladia": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_Gohighlevel": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_Google": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_GoogleCalendarOauth2Authorization": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_GoogleCalendarOauth2Client": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_GoogleSheetsOauth2Authorization": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_Groq": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_Hume": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_InflectionAi": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_Inworld": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_Langfuse": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_Lmnt": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_Make": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_Minimax": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_Mistral": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_Neuphonic": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_Openai": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_Openrouter": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_PerplexityAi": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_Playht": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_RimeAi": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_Runpod": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_S3": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_SlackOauth2Authorization": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_SlackWebhook": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_SmallestAi": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_Soniox": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_Speechmatics": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_Supabase": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_Tavus": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_TogetherAi": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_Trieve": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_Twilio": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_Vonage": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_Webhook": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_Wellsaid": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoCredentialsItem_Xai": ".create_assistant_dto_credentials_item", + "CreateAssistantDtoFirstMessageMode": ".create_assistant_dto_first_message_mode", + "CreateAssistantDtoHooksItem": ".create_assistant_dto_hooks_item", + "CreateAssistantDtoModel": ".create_assistant_dto_model", + "CreateAssistantDtoModel_Anthropic": ".create_assistant_dto_model", + "CreateAssistantDtoModel_AnthropicBedrock": ".create_assistant_dto_model", + "CreateAssistantDtoModel_Anyscale": ".create_assistant_dto_model", + "CreateAssistantDtoModel_Cerebras": ".create_assistant_dto_model", + "CreateAssistantDtoModel_CustomLlm": ".create_assistant_dto_model", + "CreateAssistantDtoModel_DeepSeek": ".create_assistant_dto_model", + "CreateAssistantDtoModel_Deepinfra": ".create_assistant_dto_model", + "CreateAssistantDtoModel_Google": ".create_assistant_dto_model", + "CreateAssistantDtoModel_Groq": ".create_assistant_dto_model", + "CreateAssistantDtoModel_InflectionAi": ".create_assistant_dto_model", + "CreateAssistantDtoModel_Minimax": ".create_assistant_dto_model", + "CreateAssistantDtoModel_Openai": ".create_assistant_dto_model", + "CreateAssistantDtoModel_Openrouter": ".create_assistant_dto_model", + "CreateAssistantDtoModel_PerplexityAi": ".create_assistant_dto_model", + "CreateAssistantDtoModel_TogetherAi": ".create_assistant_dto_model", + "CreateAssistantDtoModel_Xai": ".create_assistant_dto_model", + "CreateAssistantDtoServerMessagesItem": ".create_assistant_dto_server_messages_item", + "CreateAssistantDtoTranscriber": ".create_assistant_dto_transcriber", + "CreateAssistantDtoTranscriber_11Labs": ".create_assistant_dto_transcriber", + "CreateAssistantDtoTranscriber_AssemblyAi": ".create_assistant_dto_transcriber", + "CreateAssistantDtoTranscriber_Azure": ".create_assistant_dto_transcriber", + "CreateAssistantDtoTranscriber_Cartesia": ".create_assistant_dto_transcriber", + "CreateAssistantDtoTranscriber_CustomTranscriber": ".create_assistant_dto_transcriber", + "CreateAssistantDtoTranscriber_Deepgram": ".create_assistant_dto_transcriber", + "CreateAssistantDtoTranscriber_Gladia": ".create_assistant_dto_transcriber", + "CreateAssistantDtoTranscriber_Google": ".create_assistant_dto_transcriber", + "CreateAssistantDtoTranscriber_Openai": ".create_assistant_dto_transcriber", + "CreateAssistantDtoTranscriber_Soniox": ".create_assistant_dto_transcriber", + "CreateAssistantDtoTranscriber_Speechmatics": ".create_assistant_dto_transcriber", + "CreateAssistantDtoTranscriber_Talkscriber": ".create_assistant_dto_transcriber", + "CreateAssistantDtoVoice": ".create_assistant_dto_voice", + "CreateAssistantDtoVoice_11Labs": ".create_assistant_dto_voice", + "CreateAssistantDtoVoice_Azure": ".create_assistant_dto_voice", + "CreateAssistantDtoVoice_Cartesia": ".create_assistant_dto_voice", + "CreateAssistantDtoVoice_CustomVoice": ".create_assistant_dto_voice", + "CreateAssistantDtoVoice_Deepgram": ".create_assistant_dto_voice", + "CreateAssistantDtoVoice_Hume": ".create_assistant_dto_voice", + "CreateAssistantDtoVoice_Inworld": ".create_assistant_dto_voice", + "CreateAssistantDtoVoice_Lmnt": ".create_assistant_dto_voice", + "CreateAssistantDtoVoice_Minimax": ".create_assistant_dto_voice", + "CreateAssistantDtoVoice_Neuphonic": ".create_assistant_dto_voice", + "CreateAssistantDtoVoice_Openai": ".create_assistant_dto_voice", + "CreateAssistantDtoVoice_Playht": ".create_assistant_dto_voice", + "CreateAssistantDtoVoice_RimeAi": ".create_assistant_dto_voice", + "CreateAssistantDtoVoice_Sesame": ".create_assistant_dto_voice", + "CreateAssistantDtoVoice_SmallestAi": ".create_assistant_dto_voice", + "CreateAssistantDtoVoice_Tavus": ".create_assistant_dto_voice", + "CreateAssistantDtoVoice_Vapi": ".create_assistant_dto_voice", + "CreateAssistantDtoVoice_Wellsaid": ".create_assistant_dto_voice", + "CreateAssistantDtoVoicemailDetection": ".create_assistant_dto_voicemail_detection", + "CreateAssistantDtoVoicemailDetectionZero": ".create_assistant_dto_voicemail_detection_zero", + "CreateAzureCredentialDto": ".create_azure_credential_dto", + "CreateAzureCredentialDtoRegion": ".create_azure_credential_dto_region", + "CreateAzureCredentialDtoService": ".create_azure_credential_dto_service", + "CreateAzureOpenAiCredentialDto": ".create_azure_open_ai_credential_dto", + "CreateAzureOpenAiCredentialDtoModelsItem": ".create_azure_open_ai_credential_dto_models_item", + "CreateAzureOpenAiCredentialDtoRegion": ".create_azure_open_ai_credential_dto_region", + "CreateBarInsightFromCallTableDto": ".create_bar_insight_from_call_table_dto", + "CreateBarInsightFromCallTableDtoGroupBy": ".create_bar_insight_from_call_table_dto_group_by", + "CreateBarInsightFromCallTableDtoQueriesItem": ".create_bar_insight_from_call_table_dto_queries_item", + "CreateBashToolDto": ".create_bash_tool_dto", + "CreateBashToolDtoMessagesItem": ".create_bash_tool_dto_messages_item", + "CreateBashToolDtoMessagesItem_RequestComplete": ".create_bash_tool_dto_messages_item", + "CreateBashToolDtoMessagesItem_RequestFailed": ".create_bash_tool_dto_messages_item", + "CreateBashToolDtoMessagesItem_RequestResponseDelayed": ".create_bash_tool_dto_messages_item", + "CreateBashToolDtoMessagesItem_RequestStart": ".create_bash_tool_dto_messages_item", + "CreateBashToolDtoName": ".create_bash_tool_dto_name", + "CreateBashToolDtoSubType": ".create_bash_tool_dto_sub_type", + "CreateByoPhoneNumberDto": ".create_byo_phone_number_dto", + "CreateByoPhoneNumberDtoFallbackDestination": ".create_byo_phone_number_dto_fallback_destination", + "CreateByoPhoneNumberDtoFallbackDestination_Number": ".create_byo_phone_number_dto_fallback_destination", + "CreateByoPhoneNumberDtoFallbackDestination_Sip": ".create_byo_phone_number_dto_fallback_destination", + "CreateByoPhoneNumberDtoHooksItem": ".create_byo_phone_number_dto_hooks_item", + "CreateByoPhoneNumberDtoHooksItem_CallEnding": ".create_byo_phone_number_dto_hooks_item", + "CreateByoPhoneNumberDtoHooksItem_CallRinging": ".create_byo_phone_number_dto_hooks_item", + "CreateByoSipTrunkCredentialDto": ".create_byo_sip_trunk_credential_dto", + "CreateCartesiaCredentialDto": ".create_cartesia_credential_dto", + "CreateCerebrasCredentialDto": ".create_cerebras_credential_dto", + "CreateChatStreamResponse": ".create_chat_stream_response", + "CreateCloudflareCredentialDto": ".create_cloudflare_credential_dto", + "CreateCodeToolDto": ".create_code_tool_dto", + "CreateCodeToolDtoMessagesItem": ".create_code_tool_dto_messages_item", + "CreateCodeToolDtoMessagesItem_RequestComplete": ".create_code_tool_dto_messages_item", + "CreateCodeToolDtoMessagesItem_RequestFailed": ".create_code_tool_dto_messages_item", + "CreateCodeToolDtoMessagesItem_RequestResponseDelayed": ".create_code_tool_dto_messages_item", + "CreateCodeToolDtoMessagesItem_RequestStart": ".create_code_tool_dto_messages_item", + "CreateComputerToolDto": ".create_computer_tool_dto", + "CreateComputerToolDtoMessagesItem": ".create_computer_tool_dto_messages_item", + "CreateComputerToolDtoMessagesItem_RequestComplete": ".create_computer_tool_dto_messages_item", + "CreateComputerToolDtoMessagesItem_RequestFailed": ".create_computer_tool_dto_messages_item", + "CreateComputerToolDtoMessagesItem_RequestResponseDelayed": ".create_computer_tool_dto_messages_item", + "CreateComputerToolDtoMessagesItem_RequestStart": ".create_computer_tool_dto_messages_item", + "CreateComputerToolDtoName": ".create_computer_tool_dto_name", + "CreateComputerToolDtoSubType": ".create_computer_tool_dto_sub_type", + "CreateCustomCredentialDto": ".create_custom_credential_dto", + "CreateCustomCredentialDtoAuthenticationPlan": ".create_custom_credential_dto_authentication_plan", + "CreateCustomCredentialDtoAuthenticationPlan_Bearer": ".create_custom_credential_dto_authentication_plan", + "CreateCustomCredentialDtoAuthenticationPlan_Hmac": ".create_custom_credential_dto_authentication_plan", + "CreateCustomCredentialDtoAuthenticationPlan_Oauth2": ".create_custom_credential_dto_authentication_plan", + "CreateCustomCredentialDtoEncryptionPlan": ".create_custom_credential_dto_encryption_plan", + "CreateCustomCredentialDtoEncryptionPlan_PublicKey": ".create_custom_credential_dto_encryption_plan", + "CreateCustomKnowledgeBaseDto": ".create_custom_knowledge_base_dto", + "CreateCustomKnowledgeBaseDtoProvider": ".create_custom_knowledge_base_dto_provider", + "CreateCustomLlmCredentialDto": ".create_custom_llm_credential_dto", + "CreateCustomerDto": ".create_customer_dto", + "CreateDeepInfraCredentialDto": ".create_deep_infra_credential_dto", + "CreateDeepSeekCredentialDto": ".create_deep_seek_credential_dto", + "CreateDeepgramCredentialDto": ".create_deepgram_credential_dto", + "CreateDtmfToolDto": ".create_dtmf_tool_dto", + "CreateDtmfToolDtoMessagesItem": ".create_dtmf_tool_dto_messages_item", + "CreateDtmfToolDtoMessagesItem_RequestComplete": ".create_dtmf_tool_dto_messages_item", + "CreateDtmfToolDtoMessagesItem_RequestFailed": ".create_dtmf_tool_dto_messages_item", + "CreateDtmfToolDtoMessagesItem_RequestResponseDelayed": ".create_dtmf_tool_dto_messages_item", + "CreateDtmfToolDtoMessagesItem_RequestStart": ".create_dtmf_tool_dto_messages_item", + "CreateElevenLabsCredentialDto": ".create_eleven_labs_credential_dto", + "CreateEmailCredentialDto": ".create_email_credential_dto", + "CreateEndCallToolDto": ".create_end_call_tool_dto", + "CreateEndCallToolDtoMessagesItem": ".create_end_call_tool_dto_messages_item", + "CreateEndCallToolDtoMessagesItem_RequestComplete": ".create_end_call_tool_dto_messages_item", + "CreateEndCallToolDtoMessagesItem_RequestFailed": ".create_end_call_tool_dto_messages_item", + "CreateEndCallToolDtoMessagesItem_RequestResponseDelayed": ".create_end_call_tool_dto_messages_item", + "CreateEndCallToolDtoMessagesItem_RequestStart": ".create_end_call_tool_dto_messages_item", + "CreateEvalDto": ".create_eval_dto", + "CreateEvalDtoMessagesItem": ".create_eval_dto_messages_item", + "CreateEvalDtoType": ".create_eval_dto_type", + "CreateFunctionToolDto": ".create_function_tool_dto", + "CreateFunctionToolDtoMessagesItem": ".create_function_tool_dto_messages_item", + "CreateFunctionToolDtoMessagesItem_RequestComplete": ".create_function_tool_dto_messages_item", + "CreateFunctionToolDtoMessagesItem_RequestFailed": ".create_function_tool_dto_messages_item", + "CreateFunctionToolDtoMessagesItem_RequestResponseDelayed": ".create_function_tool_dto_messages_item", + "CreateFunctionToolDtoMessagesItem_RequestStart": ".create_function_tool_dto_messages_item", + "CreateGcpCredentialDto": ".create_gcp_credential_dto", + "CreateGhlToolDto": ".create_ghl_tool_dto", + "CreateGhlToolDtoMessagesItem": ".create_ghl_tool_dto_messages_item", + "CreateGhlToolDtoMessagesItem_RequestComplete": ".create_ghl_tool_dto_messages_item", + "CreateGhlToolDtoMessagesItem_RequestFailed": ".create_ghl_tool_dto_messages_item", + "CreateGhlToolDtoMessagesItem_RequestResponseDelayed": ".create_ghl_tool_dto_messages_item", + "CreateGhlToolDtoMessagesItem_RequestStart": ".create_ghl_tool_dto_messages_item", + "CreateGhlToolDtoType": ".create_ghl_tool_dto_type", + "CreateGladiaCredentialDto": ".create_gladia_credential_dto", + "CreateGoHighLevelCalendarAvailabilityToolDto": ".create_go_high_level_calendar_availability_tool_dto", + "CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem": ".create_go_high_level_calendar_availability_tool_dto_messages_item", + "CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestComplete": ".create_go_high_level_calendar_availability_tool_dto_messages_item", + "CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestFailed": ".create_go_high_level_calendar_availability_tool_dto_messages_item", + "CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestResponseDelayed": ".create_go_high_level_calendar_availability_tool_dto_messages_item", + "CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestStart": ".create_go_high_level_calendar_availability_tool_dto_messages_item", + "CreateGoHighLevelCalendarEventCreateToolDto": ".create_go_high_level_calendar_event_create_tool_dto", + "CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem": ".create_go_high_level_calendar_event_create_tool_dto_messages_item", + "CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestComplete": ".create_go_high_level_calendar_event_create_tool_dto_messages_item", + "CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestFailed": ".create_go_high_level_calendar_event_create_tool_dto_messages_item", + "CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestResponseDelayed": ".create_go_high_level_calendar_event_create_tool_dto_messages_item", + "CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestStart": ".create_go_high_level_calendar_event_create_tool_dto_messages_item", + "CreateGoHighLevelContactCreateToolDto": ".create_go_high_level_contact_create_tool_dto", + "CreateGoHighLevelContactCreateToolDtoMessagesItem": ".create_go_high_level_contact_create_tool_dto_messages_item", + "CreateGoHighLevelContactCreateToolDtoMessagesItem_RequestComplete": ".create_go_high_level_contact_create_tool_dto_messages_item", + "CreateGoHighLevelContactCreateToolDtoMessagesItem_RequestFailed": ".create_go_high_level_contact_create_tool_dto_messages_item", + "CreateGoHighLevelContactCreateToolDtoMessagesItem_RequestResponseDelayed": ".create_go_high_level_contact_create_tool_dto_messages_item", + "CreateGoHighLevelContactCreateToolDtoMessagesItem_RequestStart": ".create_go_high_level_contact_create_tool_dto_messages_item", + "CreateGoHighLevelContactGetToolDto": ".create_go_high_level_contact_get_tool_dto", + "CreateGoHighLevelContactGetToolDtoMessagesItem": ".create_go_high_level_contact_get_tool_dto_messages_item", + "CreateGoHighLevelContactGetToolDtoMessagesItem_RequestComplete": ".create_go_high_level_contact_get_tool_dto_messages_item", + "CreateGoHighLevelContactGetToolDtoMessagesItem_RequestFailed": ".create_go_high_level_contact_get_tool_dto_messages_item", + "CreateGoHighLevelContactGetToolDtoMessagesItem_RequestResponseDelayed": ".create_go_high_level_contact_get_tool_dto_messages_item", + "CreateGoHighLevelContactGetToolDtoMessagesItem_RequestStart": ".create_go_high_level_contact_get_tool_dto_messages_item", + "CreateGoHighLevelCredentialDto": ".create_go_high_level_credential_dto", + "CreateGoHighLevelMcpCredentialDto": ".create_go_high_level_mcp_credential_dto", + "CreateGoogleCalendarCheckAvailabilityToolDto": ".create_google_calendar_check_availability_tool_dto", + "CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem": ".create_google_calendar_check_availability_tool_dto_messages_item", + "CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestComplete": ".create_google_calendar_check_availability_tool_dto_messages_item", + "CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestFailed": ".create_google_calendar_check_availability_tool_dto_messages_item", + "CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestResponseDelayed": ".create_google_calendar_check_availability_tool_dto_messages_item", + "CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestStart": ".create_google_calendar_check_availability_tool_dto_messages_item", + "CreateGoogleCalendarCreateEventToolDto": ".create_google_calendar_create_event_tool_dto", + "CreateGoogleCalendarCreateEventToolDtoMessagesItem": ".create_google_calendar_create_event_tool_dto_messages_item", + "CreateGoogleCalendarCreateEventToolDtoMessagesItem_RequestComplete": ".create_google_calendar_create_event_tool_dto_messages_item", + "CreateGoogleCalendarCreateEventToolDtoMessagesItem_RequestFailed": ".create_google_calendar_create_event_tool_dto_messages_item", + "CreateGoogleCalendarCreateEventToolDtoMessagesItem_RequestResponseDelayed": ".create_google_calendar_create_event_tool_dto_messages_item", + "CreateGoogleCalendarCreateEventToolDtoMessagesItem_RequestStart": ".create_google_calendar_create_event_tool_dto_messages_item", + "CreateGoogleCalendarOAuth2AuthorizationCredentialDto": ".create_google_calendar_o_auth_2_authorization_credential_dto", + "CreateGoogleCalendarOAuth2ClientCredentialDto": ".create_google_calendar_o_auth_2_client_credential_dto", + "CreateGoogleCredentialDto": ".create_google_credential_dto", + "CreateGoogleSheetsOAuth2AuthorizationCredentialDto": ".create_google_sheets_o_auth_2_authorization_credential_dto", + "CreateGoogleSheetsRowAppendToolDto": ".create_google_sheets_row_append_tool_dto", + "CreateGoogleSheetsRowAppendToolDtoMessagesItem": ".create_google_sheets_row_append_tool_dto_messages_item", + "CreateGoogleSheetsRowAppendToolDtoMessagesItem_RequestComplete": ".create_google_sheets_row_append_tool_dto_messages_item", + "CreateGoogleSheetsRowAppendToolDtoMessagesItem_RequestFailed": ".create_google_sheets_row_append_tool_dto_messages_item", + "CreateGoogleSheetsRowAppendToolDtoMessagesItem_RequestResponseDelayed": ".create_google_sheets_row_append_tool_dto_messages_item", + "CreateGoogleSheetsRowAppendToolDtoMessagesItem_RequestStart": ".create_google_sheets_row_append_tool_dto_messages_item", + "CreateGroqCredentialDto": ".create_groq_credential_dto", + "CreateHandoffToolDto": ".create_handoff_tool_dto", + "CreateHandoffToolDtoDestinationsItem": ".create_handoff_tool_dto_destinations_item", + "CreateHandoffToolDtoDestinationsItem_Assistant": ".create_handoff_tool_dto_destinations_item", + "CreateHandoffToolDtoDestinationsItem_Dynamic": ".create_handoff_tool_dto_destinations_item", + "CreateHandoffToolDtoDestinationsItem_Squad": ".create_handoff_tool_dto_destinations_item", + "CreateHandoffToolDtoMessagesItem": ".create_handoff_tool_dto_messages_item", + "CreateHandoffToolDtoMessagesItem_RequestComplete": ".create_handoff_tool_dto_messages_item", + "CreateHandoffToolDtoMessagesItem_RequestFailed": ".create_handoff_tool_dto_messages_item", + "CreateHandoffToolDtoMessagesItem_RequestResponseDelayed": ".create_handoff_tool_dto_messages_item", + "CreateHandoffToolDtoMessagesItem_RequestStart": ".create_handoff_tool_dto_messages_item", + "CreateHumeCredentialDto": ".create_hume_credential_dto", + "CreateInflectionAiCredentialDto": ".create_inflection_ai_credential_dto", + "CreateInworldCredentialDto": ".create_inworld_credential_dto", + "CreateLangfuseCredentialDto": ".create_langfuse_credential_dto", + "CreateLineInsightFromCallTableDto": ".create_line_insight_from_call_table_dto", + "CreateLineInsightFromCallTableDtoGroupBy": ".create_line_insight_from_call_table_dto_group_by", + "CreateLineInsightFromCallTableDtoQueriesItem": ".create_line_insight_from_call_table_dto_queries_item", + "CreateLmntCredentialDto": ".create_lmnt_credential_dto", + "CreateMakeCredentialDto": ".create_make_credential_dto", + "CreateMakeToolDto": ".create_make_tool_dto", + "CreateMakeToolDtoMessagesItem": ".create_make_tool_dto_messages_item", + "CreateMakeToolDtoMessagesItem_RequestComplete": ".create_make_tool_dto_messages_item", + "CreateMakeToolDtoMessagesItem_RequestFailed": ".create_make_tool_dto_messages_item", + "CreateMakeToolDtoMessagesItem_RequestResponseDelayed": ".create_make_tool_dto_messages_item", + "CreateMakeToolDtoMessagesItem_RequestStart": ".create_make_tool_dto_messages_item", + "CreateMakeToolDtoType": ".create_make_tool_dto_type", + "CreateMcpToolDto": ".create_mcp_tool_dto", + "CreateMcpToolDtoMessagesItem": ".create_mcp_tool_dto_messages_item", + "CreateMcpToolDtoMessagesItem_RequestComplete": ".create_mcp_tool_dto_messages_item", + "CreateMcpToolDtoMessagesItem_RequestFailed": ".create_mcp_tool_dto_messages_item", + "CreateMcpToolDtoMessagesItem_RequestResponseDelayed": ".create_mcp_tool_dto_messages_item", + "CreateMcpToolDtoMessagesItem_RequestStart": ".create_mcp_tool_dto_messages_item", + "CreateMinimaxCredentialDto": ".create_minimax_credential_dto", + "CreateMistralCredentialDto": ".create_mistral_credential_dto", + "CreateNeuphonicCredentialDto": ".create_neuphonic_credential_dto", + "CreateOpenAiCredentialDto": ".create_open_ai_credential_dto", + "CreateOpenRouterCredentialDto": ".create_open_router_credential_dto", + "CreateOrgDto": ".create_org_dto", + "CreateOrgDtoChannel": ".create_org_dto_channel", + "CreateOutboundCallDto": ".create_outbound_call_dto", + "CreateOutputToolDto": ".create_output_tool_dto", + "CreateOutputToolDtoMessagesItem": ".create_output_tool_dto_messages_item", + "CreateOutputToolDtoMessagesItem_RequestComplete": ".create_output_tool_dto_messages_item", + "CreateOutputToolDtoMessagesItem_RequestFailed": ".create_output_tool_dto_messages_item", + "CreateOutputToolDtoMessagesItem_RequestResponseDelayed": ".create_output_tool_dto_messages_item", + "CreateOutputToolDtoMessagesItem_RequestStart": ".create_output_tool_dto_messages_item", + "CreateOutputToolDtoType": ".create_output_tool_dto_type", + "CreatePerplexityAiCredentialDto": ".create_perplexity_ai_credential_dto", + "CreatePersonalityDto": ".create_personality_dto", + "CreatePieInsightFromCallTableDto": ".create_pie_insight_from_call_table_dto", + "CreatePieInsightFromCallTableDtoGroupBy": ".create_pie_insight_from_call_table_dto_group_by", + "CreatePieInsightFromCallTableDtoQueriesItem": ".create_pie_insight_from_call_table_dto_queries_item", + "CreatePlayHtCredentialDto": ".create_play_ht_credential_dto", + "CreateQueryToolDto": ".create_query_tool_dto", + "CreateQueryToolDtoMessagesItem": ".create_query_tool_dto_messages_item", + "CreateQueryToolDtoMessagesItem_RequestComplete": ".create_query_tool_dto_messages_item", + "CreateQueryToolDtoMessagesItem_RequestFailed": ".create_query_tool_dto_messages_item", + "CreateQueryToolDtoMessagesItem_RequestResponseDelayed": ".create_query_tool_dto_messages_item", + "CreateQueryToolDtoMessagesItem_RequestStart": ".create_query_tool_dto_messages_item", + "CreateRimeAiCredentialDto": ".create_rime_ai_credential_dto", + "CreateRunpodCredentialDto": ".create_runpod_credential_dto", + "CreateS3CredentialDto": ".create_s_3_credential_dto", + "CreateScenarioDto": ".create_scenario_dto", + "CreateScenarioDtoHooksItem": ".create_scenario_dto_hooks_item", + "CreateScenarioDtoHooksItem_SimulationRunEnded": ".create_scenario_dto_hooks_item", + "CreateScenarioDtoHooksItem_SimulationRunStarted": ".create_scenario_dto_hooks_item", + "CreateScorecardDto": ".create_scorecard_dto", + "CreateSesameVoiceDto": ".create_sesame_voice_dto", + "CreateSimulationDto": ".create_simulation_dto", + "CreateSimulationRunDto": ".create_simulation_run_dto", + "CreateSimulationRunDtoSimulationsItem": ".create_simulation_run_dto_simulations_item", + "CreateSimulationRunDtoSimulationsItem_Simulation": ".create_simulation_run_dto_simulations_item", + "CreateSimulationRunDtoSimulationsItem_SimulationSuite": ".create_simulation_run_dto_simulations_item", + "CreateSimulationRunDtoTarget": ".create_simulation_run_dto_target", + "CreateSimulationRunDtoTarget_Assistant": ".create_simulation_run_dto_target", + "CreateSimulationRunDtoTarget_Squad": ".create_simulation_run_dto_target", + "CreateSimulationSuiteDto": ".create_simulation_suite_dto", + "CreateSipRequestToolDto": ".create_sip_request_tool_dto", + "CreateSipRequestToolDtoBody": ".create_sip_request_tool_dto_body", + "CreateSipRequestToolDtoMessagesItem": ".create_sip_request_tool_dto_messages_item", + "CreateSipRequestToolDtoMessagesItem_RequestComplete": ".create_sip_request_tool_dto_messages_item", + "CreateSipRequestToolDtoMessagesItem_RequestFailed": ".create_sip_request_tool_dto_messages_item", + "CreateSipRequestToolDtoMessagesItem_RequestResponseDelayed": ".create_sip_request_tool_dto_messages_item", + "CreateSipRequestToolDtoMessagesItem_RequestStart": ".create_sip_request_tool_dto_messages_item", + "CreateSipRequestToolDtoVerb": ".create_sip_request_tool_dto_verb", + "CreateSlackOAuth2AuthorizationCredentialDto": ".create_slack_o_auth_2_authorization_credential_dto", + "CreateSlackSendMessageToolDto": ".create_slack_send_message_tool_dto", + "CreateSlackSendMessageToolDtoMessagesItem": ".create_slack_send_message_tool_dto_messages_item", + "CreateSlackSendMessageToolDtoMessagesItem_RequestComplete": ".create_slack_send_message_tool_dto_messages_item", + "CreateSlackSendMessageToolDtoMessagesItem_RequestFailed": ".create_slack_send_message_tool_dto_messages_item", + "CreateSlackSendMessageToolDtoMessagesItem_RequestResponseDelayed": ".create_slack_send_message_tool_dto_messages_item", + "CreateSlackSendMessageToolDtoMessagesItem_RequestStart": ".create_slack_send_message_tool_dto_messages_item", + "CreateSlackWebhookCredentialDto": ".create_slack_webhook_credential_dto", + "CreateSmallestAiCredentialDto": ".create_smallest_ai_credential_dto", + "CreateSmsToolDto": ".create_sms_tool_dto", + "CreateSmsToolDtoMessagesItem": ".create_sms_tool_dto_messages_item", + "CreateSmsToolDtoMessagesItem_RequestComplete": ".create_sms_tool_dto_messages_item", + "CreateSmsToolDtoMessagesItem_RequestFailed": ".create_sms_tool_dto_messages_item", + "CreateSmsToolDtoMessagesItem_RequestResponseDelayed": ".create_sms_tool_dto_messages_item", + "CreateSmsToolDtoMessagesItem_RequestStart": ".create_sms_tool_dto_messages_item", + "CreateSonioxCredentialDto": ".create_soniox_credential_dto", + "CreateSpeechmaticsCredentialDto": ".create_speechmatics_credential_dto", + "CreateSquadDto": ".create_squad_dto", + "CreateStructuredOutputDto": ".create_structured_output_dto", + "CreateStructuredOutputDtoModel": ".create_structured_output_dto_model", + "CreateStructuredOutputDtoModel_Anthropic": ".create_structured_output_dto_model", + "CreateStructuredOutputDtoModel_AnthropicBedrock": ".create_structured_output_dto_model", + "CreateStructuredOutputDtoModel_CustomLlm": ".create_structured_output_dto_model", + "CreateStructuredOutputDtoModel_Google": ".create_structured_output_dto_model", + "CreateStructuredOutputDtoModel_Openai": ".create_structured_output_dto_model", + "CreateStructuredOutputDtoType": ".create_structured_output_dto_type", + "CreateSupabaseCredentialDto": ".create_supabase_credential_dto", + "CreateTavusCredentialDto": ".create_tavus_credential_dto", + "CreateTelnyxPhoneNumberDto": ".create_telnyx_phone_number_dto", + "CreateTelnyxPhoneNumberDtoFallbackDestination": ".create_telnyx_phone_number_dto_fallback_destination", + "CreateTelnyxPhoneNumberDtoFallbackDestination_Number": ".create_telnyx_phone_number_dto_fallback_destination", + "CreateTelnyxPhoneNumberDtoFallbackDestination_Sip": ".create_telnyx_phone_number_dto_fallback_destination", + "CreateTelnyxPhoneNumberDtoHooksItem": ".create_telnyx_phone_number_dto_hooks_item", + "CreateTelnyxPhoneNumberDtoHooksItem_CallEnding": ".create_telnyx_phone_number_dto_hooks_item", + "CreateTelnyxPhoneNumberDtoHooksItem_CallRinging": ".create_telnyx_phone_number_dto_hooks_item", + "CreateTestSuiteDto": ".create_test_suite_dto", + "CreateTestSuiteRunDto": ".create_test_suite_run_dto", + "CreateTestSuiteTestChatDto": ".create_test_suite_test_chat_dto", + "CreateTestSuiteTestChatDtoType": ".create_test_suite_test_chat_dto_type", + "CreateTestSuiteTestVoiceDto": ".create_test_suite_test_voice_dto", + "CreateTestSuiteTestVoiceDtoType": ".create_test_suite_test_voice_dto_type", + "CreateTextEditorToolDto": ".create_text_editor_tool_dto", + "CreateTextEditorToolDtoMessagesItem": ".create_text_editor_tool_dto_messages_item", + "CreateTextEditorToolDtoMessagesItem_RequestComplete": ".create_text_editor_tool_dto_messages_item", + "CreateTextEditorToolDtoMessagesItem_RequestFailed": ".create_text_editor_tool_dto_messages_item", + "CreateTextEditorToolDtoMessagesItem_RequestResponseDelayed": ".create_text_editor_tool_dto_messages_item", + "CreateTextEditorToolDtoMessagesItem_RequestStart": ".create_text_editor_tool_dto_messages_item", + "CreateTextEditorToolDtoName": ".create_text_editor_tool_dto_name", + "CreateTextEditorToolDtoSubType": ".create_text_editor_tool_dto_sub_type", + "CreateTextInsightFromCallTableDto": ".create_text_insight_from_call_table_dto", + "CreateTextInsightFromCallTableDtoQueriesItem": ".create_text_insight_from_call_table_dto_queries_item", + "CreateTogetherAiCredentialDto": ".create_together_ai_credential_dto", + "CreateTokenDto": ".create_token_dto", + "CreateTokenDtoTag": ".create_token_dto_tag", + "CreateToolTemplateDto": ".create_tool_template_dto", + "CreateToolTemplateDtoDetails": ".create_tool_template_dto_details", + "CreateToolTemplateDtoDetails_ApiRequest": ".create_tool_template_dto_details", + "CreateToolTemplateDtoDetails_Bash": ".create_tool_template_dto_details", + "CreateToolTemplateDtoDetails_Code": ".create_tool_template_dto_details", + "CreateToolTemplateDtoDetails_Computer": ".create_tool_template_dto_details", + "CreateToolTemplateDtoDetails_Dtmf": ".create_tool_template_dto_details", + "CreateToolTemplateDtoDetails_EndCall": ".create_tool_template_dto_details", + "CreateToolTemplateDtoDetails_Function": ".create_tool_template_dto_details", + "CreateToolTemplateDtoDetails_GohighlevelCalendarAvailabilityCheck": ".create_tool_template_dto_details", + "CreateToolTemplateDtoDetails_GohighlevelCalendarEventCreate": ".create_tool_template_dto_details", + "CreateToolTemplateDtoDetails_GohighlevelContactCreate": ".create_tool_template_dto_details", + "CreateToolTemplateDtoDetails_GohighlevelContactGet": ".create_tool_template_dto_details", + "CreateToolTemplateDtoDetails_GoogleCalendarAvailabilityCheck": ".create_tool_template_dto_details", + "CreateToolTemplateDtoDetails_GoogleCalendarEventCreate": ".create_tool_template_dto_details", + "CreateToolTemplateDtoDetails_GoogleSheetsRowAppend": ".create_tool_template_dto_details", + "CreateToolTemplateDtoDetails_Handoff": ".create_tool_template_dto_details", + "CreateToolTemplateDtoDetails_Mcp": ".create_tool_template_dto_details", + "CreateToolTemplateDtoDetails_Query": ".create_tool_template_dto_details", + "CreateToolTemplateDtoDetails_SipRequest": ".create_tool_template_dto_details", + "CreateToolTemplateDtoDetails_SlackMessageSend": ".create_tool_template_dto_details", + "CreateToolTemplateDtoDetails_Sms": ".create_tool_template_dto_details", + "CreateToolTemplateDtoDetails_TextEditor": ".create_tool_template_dto_details", + "CreateToolTemplateDtoDetails_TransferCall": ".create_tool_template_dto_details", + "CreateToolTemplateDtoDetails_Voicemail": ".create_tool_template_dto_details", + "CreateToolTemplateDtoProvider": ".create_tool_template_dto_provider", + "CreateToolTemplateDtoProviderDetails": ".create_tool_template_dto_provider_details", + "CreateToolTemplateDtoProviderDetails_Function": ".create_tool_template_dto_provider_details", + "CreateToolTemplateDtoProviderDetails_Ghl": ".create_tool_template_dto_provider_details", + "CreateToolTemplateDtoProviderDetails_GohighlevelCalendarAvailabilityCheck": ".create_tool_template_dto_provider_details", + "CreateToolTemplateDtoProviderDetails_GohighlevelCalendarEventCreate": ".create_tool_template_dto_provider_details", + "CreateToolTemplateDtoProviderDetails_GohighlevelContactCreate": ".create_tool_template_dto_provider_details", + "CreateToolTemplateDtoProviderDetails_GohighlevelContactGet": ".create_tool_template_dto_provider_details", + "CreateToolTemplateDtoProviderDetails_GoogleCalendarEventCreate": ".create_tool_template_dto_provider_details", + "CreateToolTemplateDtoProviderDetails_GoogleSheetsRowAppend": ".create_tool_template_dto_provider_details", + "CreateToolTemplateDtoProviderDetails_Make": ".create_tool_template_dto_provider_details", + "CreateToolTemplateDtoType": ".create_tool_template_dto_type", + "CreateToolTemplateDtoVisibility": ".create_tool_template_dto_visibility", + "CreateTransferCallToolDto": ".create_transfer_call_tool_dto", + "CreateTransferCallToolDtoDestinationsItem": ".create_transfer_call_tool_dto_destinations_item", + "CreateTransferCallToolDtoDestinationsItem_Assistant": ".create_transfer_call_tool_dto_destinations_item", + "CreateTransferCallToolDtoDestinationsItem_Number": ".create_transfer_call_tool_dto_destinations_item", + "CreateTransferCallToolDtoDestinationsItem_Sip": ".create_transfer_call_tool_dto_destinations_item", + "CreateTransferCallToolDtoMessagesItem": ".create_transfer_call_tool_dto_messages_item", + "CreateTransferCallToolDtoMessagesItem_RequestComplete": ".create_transfer_call_tool_dto_messages_item", + "CreateTransferCallToolDtoMessagesItem_RequestFailed": ".create_transfer_call_tool_dto_messages_item", + "CreateTransferCallToolDtoMessagesItem_RequestResponseDelayed": ".create_transfer_call_tool_dto_messages_item", + "CreateTransferCallToolDtoMessagesItem_RequestStart": ".create_transfer_call_tool_dto_messages_item", + "CreateTrieveCredentialDto": ".create_trieve_credential_dto", + "CreateTrieveKnowledgeBaseDto": ".create_trieve_knowledge_base_dto", + "CreateTrieveKnowledgeBaseDtoProvider": ".create_trieve_knowledge_base_dto_provider", + "CreateTwilioCredentialDto": ".create_twilio_credential_dto", + "CreateTwilioPhoneNumberDto": ".create_twilio_phone_number_dto", + "CreateTwilioPhoneNumberDtoFallbackDestination": ".create_twilio_phone_number_dto_fallback_destination", + "CreateTwilioPhoneNumberDtoFallbackDestination_Number": ".create_twilio_phone_number_dto_fallback_destination", + "CreateTwilioPhoneNumberDtoFallbackDestination_Sip": ".create_twilio_phone_number_dto_fallback_destination", + "CreateTwilioPhoneNumberDtoHooksItem": ".create_twilio_phone_number_dto_hooks_item", + "CreateTwilioPhoneNumberDtoHooksItem_CallEnding": ".create_twilio_phone_number_dto_hooks_item", + "CreateTwilioPhoneNumberDtoHooksItem_CallRinging": ".create_twilio_phone_number_dto_hooks_item", + "CreateVapiPhoneNumberDto": ".create_vapi_phone_number_dto", + "CreateVapiPhoneNumberDtoFallbackDestination": ".create_vapi_phone_number_dto_fallback_destination", + "CreateVapiPhoneNumberDtoFallbackDestination_Number": ".create_vapi_phone_number_dto_fallback_destination", + "CreateVapiPhoneNumberDtoFallbackDestination_Sip": ".create_vapi_phone_number_dto_fallback_destination", + "CreateVapiPhoneNumberDtoHooksItem": ".create_vapi_phone_number_dto_hooks_item", + "CreateVapiPhoneNumberDtoHooksItem_CallEnding": ".create_vapi_phone_number_dto_hooks_item", + "CreateVapiPhoneNumberDtoHooksItem_CallRinging": ".create_vapi_phone_number_dto_hooks_item", + "CreateVoicemailToolDto": ".create_voicemail_tool_dto", + "CreateVoicemailToolDtoMessagesItem": ".create_voicemail_tool_dto_messages_item", + "CreateVoicemailToolDtoMessagesItem_RequestComplete": ".create_voicemail_tool_dto_messages_item", + "CreateVoicemailToolDtoMessagesItem_RequestFailed": ".create_voicemail_tool_dto_messages_item", + "CreateVoicemailToolDtoMessagesItem_RequestResponseDelayed": ".create_voicemail_tool_dto_messages_item", + "CreateVoicemailToolDtoMessagesItem_RequestStart": ".create_voicemail_tool_dto_messages_item", + "CreateVonageCredentialDto": ".create_vonage_credential_dto", + "CreateVonagePhoneNumberDto": ".create_vonage_phone_number_dto", + "CreateVonagePhoneNumberDtoFallbackDestination": ".create_vonage_phone_number_dto_fallback_destination", + "CreateVonagePhoneNumberDtoFallbackDestination_Number": ".create_vonage_phone_number_dto_fallback_destination", + "CreateVonagePhoneNumberDtoFallbackDestination_Sip": ".create_vonage_phone_number_dto_fallback_destination", + "CreateVonagePhoneNumberDtoHooksItem": ".create_vonage_phone_number_dto_hooks_item", + "CreateVonagePhoneNumberDtoHooksItem_CallEnding": ".create_vonage_phone_number_dto_hooks_item", + "CreateVonagePhoneNumberDtoHooksItem_CallRinging": ".create_vonage_phone_number_dto_hooks_item", + "CreateWebCallDto": ".create_web_call_dto", + "CreateWebChatDto": ".create_web_chat_dto", + "CreateWebChatDtoInput": ".create_web_chat_dto_input", + "CreateWebChatDtoInputOneItem": ".create_web_chat_dto_input_one_item", + "CreateWebCustomerDto": ".create_web_customer_dto", + "CreateWebhookCredentialDto": ".create_webhook_credential_dto", + "CreateWebhookCredentialDtoAuthenticationPlan": ".create_webhook_credential_dto_authentication_plan", + "CreateWebhookCredentialDtoAuthenticationPlan_Bearer": ".create_webhook_credential_dto_authentication_plan", + "CreateWebhookCredentialDtoAuthenticationPlan_Hmac": ".create_webhook_credential_dto_authentication_plan", + "CreateWebhookCredentialDtoAuthenticationPlan_Oauth2": ".create_webhook_credential_dto_authentication_plan", + "CreateWellSaidCredentialDto": ".create_well_said_credential_dto", + "CreateWorkflowDto": ".create_workflow_dto", + "CreateWorkflowDtoBackgroundSound": ".create_workflow_dto_background_sound", + "CreateWorkflowDtoBackgroundSoundZero": ".create_workflow_dto_background_sound_zero", + "CreateWorkflowDtoCredentialsItem": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_11Labs": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_Anthropic": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_AnthropicBedrock": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_Anyscale": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_AssemblyAi": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_Azure": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_AzureOpenai": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_ByoSipTrunk": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_Cartesia": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_Cerebras": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_Cloudflare": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_CustomCredential": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_CustomLlm": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_DeepSeek": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_Deepgram": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_Deepinfra": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_Email": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_Gcp": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_GhlOauth2Authorization": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_Gladia": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_Gohighlevel": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_Google": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_GoogleCalendarOauth2Authorization": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_GoogleCalendarOauth2Client": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_GoogleSheetsOauth2Authorization": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_Groq": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_Hume": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_InflectionAi": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_Inworld": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_Langfuse": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_Lmnt": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_Make": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_Minimax": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_Mistral": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_Neuphonic": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_Openai": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_Openrouter": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_PerplexityAi": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_Playht": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_RimeAi": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_Runpod": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_S3": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_SlackOauth2Authorization": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_SlackWebhook": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_SmallestAi": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_Soniox": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_Speechmatics": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_Supabase": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_Tavus": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_TogetherAi": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_Trieve": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_Twilio": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_Vonage": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_Webhook": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_Wellsaid": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoCredentialsItem_Xai": ".create_workflow_dto_credentials_item", + "CreateWorkflowDtoHooksItem": ".create_workflow_dto_hooks_item", + "CreateWorkflowDtoModel": ".create_workflow_dto_model", + "CreateWorkflowDtoModel_Anthropic": ".create_workflow_dto_model", + "CreateWorkflowDtoModel_AnthropicBedrock": ".create_workflow_dto_model", + "CreateWorkflowDtoModel_CustomLlm": ".create_workflow_dto_model", + "CreateWorkflowDtoModel_Google": ".create_workflow_dto_model", + "CreateWorkflowDtoModel_Openai": ".create_workflow_dto_model", + "CreateWorkflowDtoNodesItem": ".create_workflow_dto_nodes_item", + "CreateWorkflowDtoNodesItem_Conversation": ".create_workflow_dto_nodes_item", + "CreateWorkflowDtoNodesItem_Tool": ".create_workflow_dto_nodes_item", + "CreateWorkflowDtoTranscriber": ".create_workflow_dto_transcriber", + "CreateWorkflowDtoTranscriber_11Labs": ".create_workflow_dto_transcriber", + "CreateWorkflowDtoTranscriber_AssemblyAi": ".create_workflow_dto_transcriber", + "CreateWorkflowDtoTranscriber_Azure": ".create_workflow_dto_transcriber", + "CreateWorkflowDtoTranscriber_Cartesia": ".create_workflow_dto_transcriber", + "CreateWorkflowDtoTranscriber_CustomTranscriber": ".create_workflow_dto_transcriber", + "CreateWorkflowDtoTranscriber_Deepgram": ".create_workflow_dto_transcriber", + "CreateWorkflowDtoTranscriber_Gladia": ".create_workflow_dto_transcriber", + "CreateWorkflowDtoTranscriber_Google": ".create_workflow_dto_transcriber", + "CreateWorkflowDtoTranscriber_Openai": ".create_workflow_dto_transcriber", + "CreateWorkflowDtoTranscriber_Soniox": ".create_workflow_dto_transcriber", + "CreateWorkflowDtoTranscriber_Speechmatics": ".create_workflow_dto_transcriber", + "CreateWorkflowDtoTranscriber_Talkscriber": ".create_workflow_dto_transcriber", + "CreateWorkflowDtoVoice": ".create_workflow_dto_voice", + "CreateWorkflowDtoVoice_11Labs": ".create_workflow_dto_voice", + "CreateWorkflowDtoVoice_Azure": ".create_workflow_dto_voice", + "CreateWorkflowDtoVoice_Cartesia": ".create_workflow_dto_voice", + "CreateWorkflowDtoVoice_CustomVoice": ".create_workflow_dto_voice", + "CreateWorkflowDtoVoice_Deepgram": ".create_workflow_dto_voice", + "CreateWorkflowDtoVoice_Hume": ".create_workflow_dto_voice", + "CreateWorkflowDtoVoice_Inworld": ".create_workflow_dto_voice", + "CreateWorkflowDtoVoice_Lmnt": ".create_workflow_dto_voice", + "CreateWorkflowDtoVoice_Minimax": ".create_workflow_dto_voice", + "CreateWorkflowDtoVoice_Neuphonic": ".create_workflow_dto_voice", + "CreateWorkflowDtoVoice_Openai": ".create_workflow_dto_voice", + "CreateWorkflowDtoVoice_Playht": ".create_workflow_dto_voice", + "CreateWorkflowDtoVoice_RimeAi": ".create_workflow_dto_voice", + "CreateWorkflowDtoVoice_Sesame": ".create_workflow_dto_voice", + "CreateWorkflowDtoVoice_SmallestAi": ".create_workflow_dto_voice", + "CreateWorkflowDtoVoice_Tavus": ".create_workflow_dto_voice", + "CreateWorkflowDtoVoice_Vapi": ".create_workflow_dto_voice", + "CreateWorkflowDtoVoice_Wellsaid": ".create_workflow_dto_voice", + "CreateWorkflowDtoVoicemailDetection": ".create_workflow_dto_voicemail_detection", + "CreateWorkflowDtoVoicemailDetectionZero": ".create_workflow_dto_voicemail_detection_zero", + "CreateXAiCredentialDto": ".create_x_ai_credential_dto", + "CredentialActionRequest": ".credential_action_request", + "CredentialEndUser": ".credential_end_user", + "CredentialSessionError": ".credential_session_error", + "CredentialSessionResponse": ".credential_session_response", + "CredentialWebhookDto": ".credential_webhook_dto", + "CredentialWebhookDtoAuthMode": ".credential_webhook_dto_auth_mode", + "CredentialWebhookDtoOperation": ".credential_webhook_dto_operation", + "CredentialWebhookDtoType": ".credential_webhook_dto_type", + "CustomCredential": ".custom_credential", + "CustomCredentialAuthenticationPlan": ".custom_credential_authentication_plan", + "CustomCredentialAuthenticationPlan_Bearer": ".custom_credential_authentication_plan", + "CustomCredentialAuthenticationPlan_Hmac": ".custom_credential_authentication_plan", + "CustomCredentialAuthenticationPlan_Oauth2": ".custom_credential_authentication_plan", + "CustomCredentialEncryptionPlan": ".custom_credential_encryption_plan", + "CustomCredentialEncryptionPlan_PublicKey": ".custom_credential_encryption_plan", + "CustomCredentialProvider": ".custom_credential_provider", + "CustomEndpointingModelSmartEndpointingPlan": ".custom_endpointing_model_smart_endpointing_plan", + "CustomEndpointingModelSmartEndpointingPlanProvider": ".custom_endpointing_model_smart_endpointing_plan_provider", + "CustomKnowledgeBase": ".custom_knowledge_base", + "CustomKnowledgeBaseProvider": ".custom_knowledge_base_provider", + "CustomLlmCredential": ".custom_llm_credential", + "CustomLlmCredentialProvider": ".custom_llm_credential_provider", + "CustomLlmModel": ".custom_llm_model", + "CustomLlmModelMetadataSendMode": ".custom_llm_model_metadata_send_mode", + "CustomLlmModelToolsItem": ".custom_llm_model_tools_item", + "CustomLlmModelToolsItem_ApiRequest": ".custom_llm_model_tools_item", + "CustomLlmModelToolsItem_Bash": ".custom_llm_model_tools_item", + "CustomLlmModelToolsItem_Code": ".custom_llm_model_tools_item", + "CustomLlmModelToolsItem_Computer": ".custom_llm_model_tools_item", + "CustomLlmModelToolsItem_Dtmf": ".custom_llm_model_tools_item", + "CustomLlmModelToolsItem_EndCall": ".custom_llm_model_tools_item", + "CustomLlmModelToolsItem_Function": ".custom_llm_model_tools_item", + "CustomLlmModelToolsItem_GohighlevelCalendarAvailabilityCheck": ".custom_llm_model_tools_item", + "CustomLlmModelToolsItem_GohighlevelCalendarEventCreate": ".custom_llm_model_tools_item", + "CustomLlmModelToolsItem_GohighlevelContactCreate": ".custom_llm_model_tools_item", + "CustomLlmModelToolsItem_GohighlevelContactGet": ".custom_llm_model_tools_item", + "CustomLlmModelToolsItem_GoogleCalendarAvailabilityCheck": ".custom_llm_model_tools_item", + "CustomLlmModelToolsItem_GoogleCalendarEventCreate": ".custom_llm_model_tools_item", + "CustomLlmModelToolsItem_GoogleSheetsRowAppend": ".custom_llm_model_tools_item", + "CustomLlmModelToolsItem_Handoff": ".custom_llm_model_tools_item", + "CustomLlmModelToolsItem_Mcp": ".custom_llm_model_tools_item", + "CustomLlmModelToolsItem_Query": ".custom_llm_model_tools_item", + "CustomLlmModelToolsItem_SipRequest": ".custom_llm_model_tools_item", + "CustomLlmModelToolsItem_SlackMessageSend": ".custom_llm_model_tools_item", + "CustomLlmModelToolsItem_Sms": ".custom_llm_model_tools_item", + "CustomLlmModelToolsItem_TextEditor": ".custom_llm_model_tools_item", + "CustomLlmModelToolsItem_TransferCall": ".custom_llm_model_tools_item", + "CustomLlmModelToolsItem_Voicemail": ".custom_llm_model_tools_item", + "CustomMessage": ".custom_message", + "CustomMessageType": ".custom_message_type", + "CustomTranscriber": ".custom_transcriber", + "CustomVoice": ".custom_voice", + "CustomerCustomEndpointingRule": ".customer_custom_endpointing_rule", + "CustomerSpeechTimeoutOptions": ".customer_speech_timeout_options", + "DeepInfraCredential": ".deep_infra_credential", + "DeepInfraCredentialProvider": ".deep_infra_credential_provider", + "DeepInfraModel": ".deep_infra_model", + "DeepInfraModelToolsItem": ".deep_infra_model_tools_item", + "DeepInfraModelToolsItem_ApiRequest": ".deep_infra_model_tools_item", + "DeepInfraModelToolsItem_Bash": ".deep_infra_model_tools_item", + "DeepInfraModelToolsItem_Code": ".deep_infra_model_tools_item", + "DeepInfraModelToolsItem_Computer": ".deep_infra_model_tools_item", + "DeepInfraModelToolsItem_Dtmf": ".deep_infra_model_tools_item", + "DeepInfraModelToolsItem_EndCall": ".deep_infra_model_tools_item", + "DeepInfraModelToolsItem_Function": ".deep_infra_model_tools_item", + "DeepInfraModelToolsItem_GohighlevelCalendarAvailabilityCheck": ".deep_infra_model_tools_item", + "DeepInfraModelToolsItem_GohighlevelCalendarEventCreate": ".deep_infra_model_tools_item", + "DeepInfraModelToolsItem_GohighlevelContactCreate": ".deep_infra_model_tools_item", + "DeepInfraModelToolsItem_GohighlevelContactGet": ".deep_infra_model_tools_item", + "DeepInfraModelToolsItem_GoogleCalendarAvailabilityCheck": ".deep_infra_model_tools_item", + "DeepInfraModelToolsItem_GoogleCalendarEventCreate": ".deep_infra_model_tools_item", + "DeepInfraModelToolsItem_GoogleSheetsRowAppend": ".deep_infra_model_tools_item", + "DeepInfraModelToolsItem_Handoff": ".deep_infra_model_tools_item", + "DeepInfraModelToolsItem_Mcp": ".deep_infra_model_tools_item", + "DeepInfraModelToolsItem_Query": ".deep_infra_model_tools_item", + "DeepInfraModelToolsItem_SipRequest": ".deep_infra_model_tools_item", + "DeepInfraModelToolsItem_SlackMessageSend": ".deep_infra_model_tools_item", + "DeepInfraModelToolsItem_Sms": ".deep_infra_model_tools_item", + "DeepInfraModelToolsItem_TextEditor": ".deep_infra_model_tools_item", + "DeepInfraModelToolsItem_TransferCall": ".deep_infra_model_tools_item", + "DeepInfraModelToolsItem_Voicemail": ".deep_infra_model_tools_item", + "DeepSeekCredential": ".deep_seek_credential", + "DeepSeekCredentialProvider": ".deep_seek_credential_provider", + "DeepSeekModel": ".deep_seek_model", + "DeepSeekModelModel": ".deep_seek_model_model", + "DeepSeekModelToolsItem": ".deep_seek_model_tools_item", + "DeepSeekModelToolsItem_ApiRequest": ".deep_seek_model_tools_item", + "DeepSeekModelToolsItem_Bash": ".deep_seek_model_tools_item", + "DeepSeekModelToolsItem_Code": ".deep_seek_model_tools_item", + "DeepSeekModelToolsItem_Computer": ".deep_seek_model_tools_item", + "DeepSeekModelToolsItem_Dtmf": ".deep_seek_model_tools_item", + "DeepSeekModelToolsItem_EndCall": ".deep_seek_model_tools_item", + "DeepSeekModelToolsItem_Function": ".deep_seek_model_tools_item", + "DeepSeekModelToolsItem_GohighlevelCalendarAvailabilityCheck": ".deep_seek_model_tools_item", + "DeepSeekModelToolsItem_GohighlevelCalendarEventCreate": ".deep_seek_model_tools_item", + "DeepSeekModelToolsItem_GohighlevelContactCreate": ".deep_seek_model_tools_item", + "DeepSeekModelToolsItem_GohighlevelContactGet": ".deep_seek_model_tools_item", + "DeepSeekModelToolsItem_GoogleCalendarAvailabilityCheck": ".deep_seek_model_tools_item", + "DeepSeekModelToolsItem_GoogleCalendarEventCreate": ".deep_seek_model_tools_item", + "DeepSeekModelToolsItem_GoogleSheetsRowAppend": ".deep_seek_model_tools_item", + "DeepSeekModelToolsItem_Handoff": ".deep_seek_model_tools_item", + "DeepSeekModelToolsItem_Mcp": ".deep_seek_model_tools_item", + "DeepSeekModelToolsItem_Query": ".deep_seek_model_tools_item", + "DeepSeekModelToolsItem_SipRequest": ".deep_seek_model_tools_item", + "DeepSeekModelToolsItem_SlackMessageSend": ".deep_seek_model_tools_item", + "DeepSeekModelToolsItem_Sms": ".deep_seek_model_tools_item", + "DeepSeekModelToolsItem_TextEditor": ".deep_seek_model_tools_item", + "DeepSeekModelToolsItem_TransferCall": ".deep_seek_model_tools_item", + "DeepSeekModelToolsItem_Voicemail": ".deep_seek_model_tools_item", + "DeepgramCredential": ".deepgram_credential", + "DeepgramCredentialProvider": ".deepgram_credential_provider", + "DeepgramTranscriber": ".deepgram_transcriber", + "DeepgramTranscriberLanguage": ".deepgram_transcriber_language", + "DeepgramTranscriberModel": ".deepgram_transcriber_model", + "DeepgramVoice": ".deepgram_voice", + "DeepgramVoiceId": ".deepgram_voice_id", + "DeepgramVoiceModel": ".deepgram_voice_model", + "DeveloperMessage": ".developer_message", + "DeveloperMessageRole": ".developer_message_role", + "DialPlanEntry": ".dial_plan_entry", + "DtmfTool": ".dtmf_tool", + "DtmfToolMessagesItem": ".dtmf_tool_messages_item", + "DtmfToolMessagesItem_RequestComplete": ".dtmf_tool_messages_item", + "DtmfToolMessagesItem_RequestFailed": ".dtmf_tool_messages_item", + "DtmfToolMessagesItem_RequestResponseDelayed": ".dtmf_tool_messages_item", + "DtmfToolMessagesItem_RequestStart": ".dtmf_tool_messages_item", + "Edge": ".edge", + "ElevenLabsCredential": ".eleven_labs_credential", + "ElevenLabsPronunciationDictionary": ".eleven_labs_pronunciation_dictionary", + "ElevenLabsPronunciationDictionaryLocator": ".eleven_labs_pronunciation_dictionary_locator", + "ElevenLabsPronunciationDictionaryPermissionOnResource": ".eleven_labs_pronunciation_dictionary_permission_on_resource", + "ElevenLabsTranscriber": ".eleven_labs_transcriber", + "ElevenLabsTranscriberLanguage": ".eleven_labs_transcriber_language", + "ElevenLabsTranscriberModel": ".eleven_labs_transcriber_model", + "ElevenLabsVoice": ".eleven_labs_voice", + "ElevenLabsVoiceId": ".eleven_labs_voice_id", + "ElevenLabsVoiceIdEnum": ".eleven_labs_voice_id_enum", + "ElevenLabsVoiceModel": ".eleven_labs_voice_model", + "EmailCredential": ".email_credential", + "EmailCredentialProvider": ".email_credential_provider", + "EndCallTool": ".end_call_tool", + "EndCallToolMessagesItem": ".end_call_tool_messages_item", + "EndCallToolMessagesItem_RequestComplete": ".end_call_tool_messages_item", + "EndCallToolMessagesItem_RequestFailed": ".end_call_tool_messages_item", + "EndCallToolMessagesItem_RequestResponseDelayed": ".end_call_tool_messages_item", + "EndCallToolMessagesItem_RequestStart": ".end_call_tool_messages_item", + "EndpointedSpeechLowConfidenceOptions": ".endpointed_speech_low_confidence_options", + "Eval": ".eval", + "EvalAnthropicModel": ".eval_anthropic_model", + "EvalAnthropicModelModel": ".eval_anthropic_model_model", + "EvalCustomModel": ".eval_custom_model", + "EvalGoogleModel": ".eval_google_model", + "EvalGoogleModelModel": ".eval_google_model_model", + "EvalGroqModel": ".eval_groq_model", + "EvalGroqModelModel": ".eval_groq_model_model", + "EvalGroqModelProvider": ".eval_groq_model_provider", + "EvalMessagesItem": ".eval_messages_item", + "EvalModelListOptions": ".eval_model_list_options", + "EvalModelListOptionsProvider": ".eval_model_list_options_provider", + "EvalOpenAiModel": ".eval_open_ai_model", + "EvalOpenAiModelModel": ".eval_open_ai_model_model", + "EvalPaginatedResponse": ".eval_paginated_response", + "EvalRun": ".eval_run", + "EvalRunEndedReason": ".eval_run_ended_reason", + "EvalRunPaginatedResponse": ".eval_run_paginated_response", + "EvalRunResult": ".eval_run_result", + "EvalRunResultMessagesItem": ".eval_run_result_messages_item", + "EvalRunResultMessagesItem_Assistant": ".eval_run_result_messages_item", + "EvalRunResultMessagesItem_System": ".eval_run_result_messages_item", + "EvalRunResultMessagesItem_Tool": ".eval_run_result_messages_item", + "EvalRunResultMessagesItem_User": ".eval_run_result_messages_item", + "EvalRunResultStatus": ".eval_run_result_status", + "EvalRunStatus": ".eval_run_status", + "EvalRunTarget": ".eval_run_target", + "EvalRunTargetAssistant": ".eval_run_target_assistant", + "EvalRunTargetSquad": ".eval_run_target_squad", + "EvalRunTarget_Assistant": ".eval_run_target", + "EvalRunTarget_Squad": ".eval_run_target", + "EvalRunType": ".eval_run_type", + "EvalType": ".eval_type", + "EvalUserEditable": ".eval_user_editable", + "EvalUserEditableMessagesItem": ".eval_user_editable_messages_item", + "EvalUserEditableType": ".eval_user_editable_type", + "EvaluationPlanItem": ".evaluation_plan_item", + "EvaluationPlanItemComparator": ".evaluation_plan_item_comparator", + "EvaluationPlanItemValue": ".evaluation_plan_item_value", + "EventsTableBooleanCondition": ".events_table_boolean_condition", + "EventsTableBooleanConditionOperator": ".events_table_boolean_condition_operator", + "EventsTableNumberCondition": ".events_table_number_condition", + "EventsTableNumberConditionOperator": ".events_table_number_condition_operator", + "EventsTableStringCondition": ".events_table_string_condition", + "EventsTableStringConditionOperator": ".events_table_string_condition_operator", + "ExactReplacement": ".exact_replacement", + "ExportChatDto": ".export_chat_dto", + "ExportChatDtoColumns": ".export_chat_dto_columns", + "ExportChatDtoFormat": ".export_chat_dto_format", + "ExportChatDtoSortOrder": ".export_chat_dto_sort_order", + "ExportSessionDto": ".export_session_dto", + "ExportSessionDtoColumns": ".export_session_dto_columns", + "ExportSessionDtoFormat": ".export_session_dto_format", + "ExportSessionDtoSortOrder": ".export_session_dto_sort_order", + "FailedEdgeCondition": ".failed_edge_condition", + "FallbackAssemblyAiTranscriber": ".fallback_assembly_ai_transcriber", + "FallbackAssemblyAiTranscriberLanguage": ".fallback_assembly_ai_transcriber_language", + "FallbackAssemblyAiTranscriberSpeechModel": ".fallback_assembly_ai_transcriber_speech_model", + "FallbackAzureSpeechTranscriber": ".fallback_azure_speech_transcriber", + "FallbackAzureSpeechTranscriberLanguage": ".fallback_azure_speech_transcriber_language", + "FallbackAzureSpeechTranscriberSegmentationStrategy": ".fallback_azure_speech_transcriber_segmentation_strategy", + "FallbackAzureVoice": ".fallback_azure_voice", + "FallbackAzureVoiceId": ".fallback_azure_voice_id", + "FallbackAzureVoiceIdZero": ".fallback_azure_voice_id_zero", + "FallbackCartesiaTranscriber": ".fallback_cartesia_transcriber", + "FallbackCartesiaTranscriberLanguage": ".fallback_cartesia_transcriber_language", + "FallbackCartesiaTranscriberModel": ".fallback_cartesia_transcriber_model", + "FallbackCartesiaVoice": ".fallback_cartesia_voice", + "FallbackCartesiaVoiceLanguage": ".fallback_cartesia_voice_language", + "FallbackCartesiaVoiceModel": ".fallback_cartesia_voice_model", + "FallbackCustomTranscriber": ".fallback_custom_transcriber", + "FallbackCustomVoice": ".fallback_custom_voice", + "FallbackDeepgramTranscriber": ".fallback_deepgram_transcriber", + "FallbackDeepgramTranscriberLanguage": ".fallback_deepgram_transcriber_language", + "FallbackDeepgramTranscriberModel": ".fallback_deepgram_transcriber_model", + "FallbackDeepgramVoice": ".fallback_deepgram_voice", + "FallbackDeepgramVoiceId": ".fallback_deepgram_voice_id", + "FallbackDeepgramVoiceModel": ".fallback_deepgram_voice_model", + "FallbackElevenLabsTranscriber": ".fallback_eleven_labs_transcriber", + "FallbackElevenLabsTranscriberLanguage": ".fallback_eleven_labs_transcriber_language", + "FallbackElevenLabsTranscriberModel": ".fallback_eleven_labs_transcriber_model", + "FallbackElevenLabsVoice": ".fallback_eleven_labs_voice", + "FallbackElevenLabsVoiceId": ".fallback_eleven_labs_voice_id", + "FallbackElevenLabsVoiceIdEnum": ".fallback_eleven_labs_voice_id_enum", + "FallbackElevenLabsVoiceModel": ".fallback_eleven_labs_voice_model", + "FallbackGladiaTranscriber": ".fallback_gladia_transcriber", + "FallbackGladiaTranscriberLanguage": ".fallback_gladia_transcriber_language", + "FallbackGladiaTranscriberLanguageBehaviour": ".fallback_gladia_transcriber_language_behaviour", + "FallbackGladiaTranscriberLanguages": ".fallback_gladia_transcriber_languages", + "FallbackGladiaTranscriberModel": ".fallback_gladia_transcriber_model", + "FallbackGladiaTranscriberRegion": ".fallback_gladia_transcriber_region", + "FallbackGoogleTranscriber": ".fallback_google_transcriber", + "FallbackGoogleTranscriberLanguage": ".fallback_google_transcriber_language", + "FallbackGoogleTranscriberModel": ".fallback_google_transcriber_model", + "FallbackHumeVoice": ".fallback_hume_voice", + "FallbackHumeVoiceModel": ".fallback_hume_voice_model", + "FallbackInworldVoice": ".fallback_inworld_voice", + "FallbackInworldVoiceLanguageCode": ".fallback_inworld_voice_language_code", + "FallbackInworldVoiceModel": ".fallback_inworld_voice_model", + "FallbackInworldVoiceVoiceId": ".fallback_inworld_voice_voice_id", + "FallbackLmntVoice": ".fallback_lmnt_voice", + "FallbackLmntVoiceId": ".fallback_lmnt_voice_id", + "FallbackLmntVoiceIdEnum": ".fallback_lmnt_voice_id_enum", + "FallbackLmntVoiceLanguage": ".fallback_lmnt_voice_language", + "FallbackMinimaxVoice": ".fallback_minimax_voice", + "FallbackMinimaxVoiceLanguageBoost": ".fallback_minimax_voice_language_boost", + "FallbackMinimaxVoiceModel": ".fallback_minimax_voice_model", + "FallbackMinimaxVoiceProvider": ".fallback_minimax_voice_provider", + "FallbackMinimaxVoiceRegion": ".fallback_minimax_voice_region", + "FallbackMinimaxVoiceSubtitleType": ".fallback_minimax_voice_subtitle_type", + "FallbackNeetsVoice": ".fallback_neets_voice", + "FallbackNeuphonicVoice": ".fallback_neuphonic_voice", + "FallbackNeuphonicVoiceModel": ".fallback_neuphonic_voice_model", + "FallbackOpenAiTranscriber": ".fallback_open_ai_transcriber", + "FallbackOpenAiTranscriberLanguage": ".fallback_open_ai_transcriber_language", + "FallbackOpenAiTranscriberModel": ".fallback_open_ai_transcriber_model", + "FallbackOpenAiVoice": ".fallback_open_ai_voice", + "FallbackOpenAiVoiceId": ".fallback_open_ai_voice_id", + "FallbackOpenAiVoiceIdEnum": ".fallback_open_ai_voice_id_enum", + "FallbackOpenAiVoiceModel": ".fallback_open_ai_voice_model", + "FallbackPlan": ".fallback_plan", + "FallbackPlanVoicesItem": ".fallback_plan_voices_item", + "FallbackPlanVoicesItem_11Labs": ".fallback_plan_voices_item", + "FallbackPlanVoicesItem_Azure": ".fallback_plan_voices_item", + "FallbackPlanVoicesItem_Cartesia": ".fallback_plan_voices_item", + "FallbackPlanVoicesItem_CustomVoice": ".fallback_plan_voices_item", + "FallbackPlanVoicesItem_Deepgram": ".fallback_plan_voices_item", + "FallbackPlanVoicesItem_Hume": ".fallback_plan_voices_item", + "FallbackPlanVoicesItem_Inworld": ".fallback_plan_voices_item", + "FallbackPlanVoicesItem_Lmnt": ".fallback_plan_voices_item", + "FallbackPlanVoicesItem_Neuphonic": ".fallback_plan_voices_item", + "FallbackPlanVoicesItem_Openai": ".fallback_plan_voices_item", + "FallbackPlanVoicesItem_Playht": ".fallback_plan_voices_item", + "FallbackPlanVoicesItem_RimeAi": ".fallback_plan_voices_item", + "FallbackPlanVoicesItem_Sesame": ".fallback_plan_voices_item", + "FallbackPlanVoicesItem_SmallestAi": ".fallback_plan_voices_item", + "FallbackPlanVoicesItem_Tavus": ".fallback_plan_voices_item", + "FallbackPlanVoicesItem_Vapi": ".fallback_plan_voices_item", + "FallbackPlanVoicesItem_Wellsaid": ".fallback_plan_voices_item", + "FallbackPlayHtVoice": ".fallback_play_ht_voice", + "FallbackPlayHtVoiceEmotion": ".fallback_play_ht_voice_emotion", + "FallbackPlayHtVoiceId": ".fallback_play_ht_voice_id", + "FallbackPlayHtVoiceIdEnum": ".fallback_play_ht_voice_id_enum", + "FallbackPlayHtVoiceLanguage": ".fallback_play_ht_voice_language", + "FallbackPlayHtVoiceModel": ".fallback_play_ht_voice_model", + "FallbackRimeAiVoice": ".fallback_rime_ai_voice", + "FallbackRimeAiVoiceId": ".fallback_rime_ai_voice_id", + "FallbackRimeAiVoiceIdEnum": ".fallback_rime_ai_voice_id_enum", + "FallbackRimeAiVoiceLanguage": ".fallback_rime_ai_voice_language", + "FallbackRimeAiVoiceModel": ".fallback_rime_ai_voice_model", + "FallbackSesameVoice": ".fallback_sesame_voice", + "FallbackSesameVoiceModel": ".fallback_sesame_voice_model", + "FallbackSmallestAiVoice": ".fallback_smallest_ai_voice", + "FallbackSmallestAiVoiceId": ".fallback_smallest_ai_voice_id", + "FallbackSmallestAiVoiceIdEnum": ".fallback_smallest_ai_voice_id_enum", + "FallbackSmallestAiVoiceModel": ".fallback_smallest_ai_voice_model", + "FallbackSonioxTranscriber": ".fallback_soniox_transcriber", + "FallbackSonioxTranscriberLanguage": ".fallback_soniox_transcriber_language", + "FallbackSonioxTranscriberModel": ".fallback_soniox_transcriber_model", + "FallbackSpeechmaticsTranscriber": ".fallback_speechmatics_transcriber", + "FallbackSpeechmaticsTranscriberLanguage": ".fallback_speechmatics_transcriber_language", + "FallbackSpeechmaticsTranscriberModel": ".fallback_speechmatics_transcriber_model", + "FallbackSpeechmaticsTranscriberNumeralStyle": ".fallback_speechmatics_transcriber_numeral_style", + "FallbackSpeechmaticsTranscriberOperatingPoint": ".fallback_speechmatics_transcriber_operating_point", + "FallbackSpeechmaticsTranscriberRegion": ".fallback_speechmatics_transcriber_region", + "FallbackTalkscriberTranscriber": ".fallback_talkscriber_transcriber", + "FallbackTalkscriberTranscriberLanguage": ".fallback_talkscriber_transcriber_language", + "FallbackTalkscriberTranscriberModel": ".fallback_talkscriber_transcriber_model", + "FallbackTavusVoice": ".fallback_tavus_voice", + "FallbackTavusVoiceVoiceId": ".fallback_tavus_voice_voice_id", + "FallbackTavusVoiceVoiceIdZero": ".fallback_tavus_voice_voice_id_zero", + "FallbackTranscriberPlan": ".fallback_transcriber_plan", + "FallbackTranscriberPlanTranscribersItem": ".fallback_transcriber_plan_transcribers_item", + "FallbackTranscriberPlanTranscribersItem_11Labs": ".fallback_transcriber_plan_transcribers_item", + "FallbackTranscriberPlanTranscribersItem_AssemblyAi": ".fallback_transcriber_plan_transcribers_item", + "FallbackTranscriberPlanTranscribersItem_Azure": ".fallback_transcriber_plan_transcribers_item", + "FallbackTranscriberPlanTranscribersItem_Cartesia": ".fallback_transcriber_plan_transcribers_item", + "FallbackTranscriberPlanTranscribersItem_CustomTranscriber": ".fallback_transcriber_plan_transcribers_item", + "FallbackTranscriberPlanTranscribersItem_Deepgram": ".fallback_transcriber_plan_transcribers_item", + "FallbackTranscriberPlanTranscribersItem_Gladia": ".fallback_transcriber_plan_transcribers_item", + "FallbackTranscriberPlanTranscribersItem_Google": ".fallback_transcriber_plan_transcribers_item", + "FallbackTranscriberPlanTranscribersItem_Openai": ".fallback_transcriber_plan_transcribers_item", + "FallbackTranscriberPlanTranscribersItem_Soniox": ".fallback_transcriber_plan_transcribers_item", + "FallbackTranscriberPlanTranscribersItem_Speechmatics": ".fallback_transcriber_plan_transcribers_item", + "FallbackTranscriberPlanTranscribersItem_Talkscriber": ".fallback_transcriber_plan_transcribers_item", + "FallbackVapiVoice": ".fallback_vapi_voice", + "FallbackVapiVoiceVoiceId": ".fallback_vapi_voice_voice_id", + "FallbackWellSaidVoice": ".fallback_well_said_voice", + "FallbackWellSaidVoiceModel": ".fallback_well_said_voice_model", + "File": ".file", + "FileObject": ".file_object", + "FileStatus": ".file_status", + "FilterDateTypeColumnOnCallTable": ".filter_date_type_column_on_call_table", + "FilterDateTypeColumnOnCallTableColumn": ".filter_date_type_column_on_call_table_column", + "FilterDateTypeColumnOnCallTableOperator": ".filter_date_type_column_on_call_table_operator", + "FilterNumberArrayTypeColumnOnCallTable": ".filter_number_array_type_column_on_call_table", + "FilterNumberArrayTypeColumnOnCallTableColumn": ".filter_number_array_type_column_on_call_table_column", + "FilterNumberArrayTypeColumnOnCallTableOperator": ".filter_number_array_type_column_on_call_table_operator", + "FilterNumberTypeColumnOnCallTable": ".filter_number_type_column_on_call_table", + "FilterNumberTypeColumnOnCallTableColumn": ".filter_number_type_column_on_call_table_column", + "FilterNumberTypeColumnOnCallTableOperator": ".filter_number_type_column_on_call_table_operator", + "FilterStringArrayTypeColumnOnCallTable": ".filter_string_array_type_column_on_call_table", + "FilterStringArrayTypeColumnOnCallTableColumn": ".filter_string_array_type_column_on_call_table_column", + "FilterStringArrayTypeColumnOnCallTableOperator": ".filter_string_array_type_column_on_call_table_operator", + "FilterStringTypeColumnOnCallTable": ".filter_string_type_column_on_call_table", + "FilterStringTypeColumnOnCallTableColumn": ".filter_string_type_column_on_call_table_column", + "FilterStringTypeColumnOnCallTableOperator": ".filter_string_type_column_on_call_table_operator", + "FilterStructuredOutputColumnOnCallTable": ".filter_structured_output_column_on_call_table", + "FilterStructuredOutputColumnOnCallTableColumn": ".filter_structured_output_column_on_call_table_column", + "FilterStructuredOutputColumnOnCallTableOperator": ".filter_structured_output_column_on_call_table_operator", + "FormatPlan": ".format_plan", + "FormatPlanFormattersEnabledItem": ".format_plan_formatters_enabled_item", + "FormatPlanReplacementsItem": ".format_plan_replacements_item", + "FormatPlanReplacementsItem_Exact": ".format_plan_replacements_item", + "FormatPlanReplacementsItem_Regex": ".format_plan_replacements_item", + "FourierDenoisingPlan": ".fourier_denoising_plan", + "FunctionCall": ".function_call", + "FunctionCallAssistantHookAction": ".function_call_assistant_hook_action", + "FunctionCallHookAction": ".function_call_hook_action", + "FunctionCallHookActionMessagesItem": ".function_call_hook_action_messages_item", + "FunctionCallHookActionMessagesItem_RequestComplete": ".function_call_hook_action_messages_item", + "FunctionCallHookActionMessagesItem_RequestFailed": ".function_call_hook_action_messages_item", + "FunctionCallHookActionMessagesItem_RequestResponseDelayed": ".function_call_hook_action_messages_item", + "FunctionCallHookActionMessagesItem_RequestStart": ".function_call_hook_action_messages_item", + "FunctionCallHookActionType": ".function_call_hook_action_type", + "FunctionTool": ".function_tool", + "FunctionToolMessagesItem": ".function_tool_messages_item", + "FunctionToolMessagesItem_RequestComplete": ".function_tool_messages_item", + "FunctionToolMessagesItem_RequestFailed": ".function_tool_messages_item", + "FunctionToolMessagesItem_RequestResponseDelayed": ".function_tool_messages_item", + "FunctionToolMessagesItem_RequestStart": ".function_tool_messages_item", + "FunctionToolProviderDetails": ".function_tool_provider_details", + "FunctionToolWithToolCall": ".function_tool_with_tool_call", + "FunctionToolWithToolCallMessagesItem": ".function_tool_with_tool_call_messages_item", + "FunctionToolWithToolCallMessagesItem_RequestComplete": ".function_tool_with_tool_call_messages_item", + "FunctionToolWithToolCallMessagesItem_RequestFailed": ".function_tool_with_tool_call_messages_item", + "FunctionToolWithToolCallMessagesItem_RequestResponseDelayed": ".function_tool_with_tool_call_messages_item", + "FunctionToolWithToolCallMessagesItem_RequestStart": ".function_tool_with_tool_call_messages_item", + "GcpCredential": ".gcp_credential", + "GcpCredentialProvider": ".gcp_credential_provider", + "GcpKey": ".gcp_key", + "GeminiMultimodalLivePrebuiltVoiceConfig": ".gemini_multimodal_live_prebuilt_voice_config", + "GeminiMultimodalLivePrebuiltVoiceConfigVoiceName": ".gemini_multimodal_live_prebuilt_voice_config_voice_name", + "GeminiMultimodalLiveSpeechConfig": ".gemini_multimodal_live_speech_config", + "GeminiMultimodalLiveVoiceConfig": ".gemini_multimodal_live_voice_config", + "GenerateScenariosDto": ".generate_scenarios_dto", + "GenerateScenariosResponse": ".generate_scenarios_response", + "GeneratedScenario": ".generated_scenario", + "GeneratedScenarioCategory": ".generated_scenario_category", + "GetChatPaginatedDto": ".get_chat_paginated_dto", + "GetChatPaginatedDtoSortOrder": ".get_chat_paginated_dto_sort_order", + "GetEvalPaginatedDto": ".get_eval_paginated_dto", + "GetEvalPaginatedDtoSortOrder": ".get_eval_paginated_dto_sort_order", + "GetEvalRunPaginatedDto": ".get_eval_run_paginated_dto", + "GetEvalRunPaginatedDtoSortOrder": ".get_eval_run_paginated_dto_sort_order", + "GetSessionPaginatedDto": ".get_session_paginated_dto", + "GetSessionPaginatedDtoSortOrder": ".get_session_paginated_dto_sort_order", + "GhlTool": ".ghl_tool", + "GhlToolMessagesItem": ".ghl_tool_messages_item", + "GhlToolMessagesItem_RequestComplete": ".ghl_tool_messages_item", + "GhlToolMessagesItem_RequestFailed": ".ghl_tool_messages_item", + "GhlToolMessagesItem_RequestResponseDelayed": ".ghl_tool_messages_item", + "GhlToolMessagesItem_RequestStart": ".ghl_tool_messages_item", + "GhlToolMetadata": ".ghl_tool_metadata", + "GhlToolProviderDetails": ".ghl_tool_provider_details", + "GhlToolType": ".ghl_tool_type", + "GhlToolWithToolCall": ".ghl_tool_with_tool_call", + "GhlToolWithToolCallMessagesItem": ".ghl_tool_with_tool_call_messages_item", + "GhlToolWithToolCallMessagesItem_RequestComplete": ".ghl_tool_with_tool_call_messages_item", + "GhlToolWithToolCallMessagesItem_RequestFailed": ".ghl_tool_with_tool_call_messages_item", + "GhlToolWithToolCallMessagesItem_RequestResponseDelayed": ".ghl_tool_with_tool_call_messages_item", + "GhlToolWithToolCallMessagesItem_RequestStart": ".ghl_tool_with_tool_call_messages_item", + "GladiaCredential": ".gladia_credential", + "GladiaCredentialProvider": ".gladia_credential_provider", + "GladiaCustomVocabularyConfigDto": ".gladia_custom_vocabulary_config_dto", + "GladiaCustomVocabularyConfigDtoVocabularyItem": ".gladia_custom_vocabulary_config_dto_vocabulary_item", + "GladiaTranscriber": ".gladia_transcriber", + "GladiaTranscriberLanguage": ".gladia_transcriber_language", + "GladiaTranscriberLanguageBehaviour": ".gladia_transcriber_language_behaviour", + "GladiaTranscriberLanguages": ".gladia_transcriber_languages", + "GladiaTranscriberModel": ".gladia_transcriber_model", + "GladiaTranscriberRegion": ".gladia_transcriber_region", + "GladiaVocabularyItemDto": ".gladia_vocabulary_item_dto", + "GlobalNodePlan": ".global_node_plan", + "GoHighLevelCalendarAvailabilityTool": ".go_high_level_calendar_availability_tool", + "GoHighLevelCalendarAvailabilityToolMessagesItem": ".go_high_level_calendar_availability_tool_messages_item", + "GoHighLevelCalendarAvailabilityToolMessagesItem_RequestComplete": ".go_high_level_calendar_availability_tool_messages_item", + "GoHighLevelCalendarAvailabilityToolMessagesItem_RequestFailed": ".go_high_level_calendar_availability_tool_messages_item", + "GoHighLevelCalendarAvailabilityToolMessagesItem_RequestResponseDelayed": ".go_high_level_calendar_availability_tool_messages_item", + "GoHighLevelCalendarAvailabilityToolMessagesItem_RequestStart": ".go_high_level_calendar_availability_tool_messages_item", + "GoHighLevelCalendarAvailabilityToolProviderDetails": ".go_high_level_calendar_availability_tool_provider_details", + "GoHighLevelCalendarAvailabilityToolWithToolCall": ".go_high_level_calendar_availability_tool_with_tool_call", + "GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem": ".go_high_level_calendar_availability_tool_with_tool_call_messages_item", + "GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem_RequestComplete": ".go_high_level_calendar_availability_tool_with_tool_call_messages_item", + "GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem_RequestFailed": ".go_high_level_calendar_availability_tool_with_tool_call_messages_item", + "GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem_RequestResponseDelayed": ".go_high_level_calendar_availability_tool_with_tool_call_messages_item", + "GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem_RequestStart": ".go_high_level_calendar_availability_tool_with_tool_call_messages_item", + "GoHighLevelCalendarAvailabilityToolWithToolCallType": ".go_high_level_calendar_availability_tool_with_tool_call_type", + "GoHighLevelCalendarEventCreateTool": ".go_high_level_calendar_event_create_tool", + "GoHighLevelCalendarEventCreateToolMessagesItem": ".go_high_level_calendar_event_create_tool_messages_item", + "GoHighLevelCalendarEventCreateToolMessagesItem_RequestComplete": ".go_high_level_calendar_event_create_tool_messages_item", + "GoHighLevelCalendarEventCreateToolMessagesItem_RequestFailed": ".go_high_level_calendar_event_create_tool_messages_item", + "GoHighLevelCalendarEventCreateToolMessagesItem_RequestResponseDelayed": ".go_high_level_calendar_event_create_tool_messages_item", + "GoHighLevelCalendarEventCreateToolMessagesItem_RequestStart": ".go_high_level_calendar_event_create_tool_messages_item", + "GoHighLevelCalendarEventCreateToolProviderDetails": ".go_high_level_calendar_event_create_tool_provider_details", + "GoHighLevelCalendarEventCreateToolWithToolCall": ".go_high_level_calendar_event_create_tool_with_tool_call", + "GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem": ".go_high_level_calendar_event_create_tool_with_tool_call_messages_item", + "GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem_RequestComplete": ".go_high_level_calendar_event_create_tool_with_tool_call_messages_item", + "GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem_RequestFailed": ".go_high_level_calendar_event_create_tool_with_tool_call_messages_item", + "GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem_RequestResponseDelayed": ".go_high_level_calendar_event_create_tool_with_tool_call_messages_item", + "GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem_RequestStart": ".go_high_level_calendar_event_create_tool_with_tool_call_messages_item", + "GoHighLevelCalendarEventCreateToolWithToolCallType": ".go_high_level_calendar_event_create_tool_with_tool_call_type", + "GoHighLevelContactCreateTool": ".go_high_level_contact_create_tool", + "GoHighLevelContactCreateToolMessagesItem": ".go_high_level_contact_create_tool_messages_item", + "GoHighLevelContactCreateToolMessagesItem_RequestComplete": ".go_high_level_contact_create_tool_messages_item", + "GoHighLevelContactCreateToolMessagesItem_RequestFailed": ".go_high_level_contact_create_tool_messages_item", + "GoHighLevelContactCreateToolMessagesItem_RequestResponseDelayed": ".go_high_level_contact_create_tool_messages_item", + "GoHighLevelContactCreateToolMessagesItem_RequestStart": ".go_high_level_contact_create_tool_messages_item", + "GoHighLevelContactCreateToolProviderDetails": ".go_high_level_contact_create_tool_provider_details", + "GoHighLevelContactCreateToolWithToolCall": ".go_high_level_contact_create_tool_with_tool_call", + "GoHighLevelContactCreateToolWithToolCallMessagesItem": ".go_high_level_contact_create_tool_with_tool_call_messages_item", + "GoHighLevelContactCreateToolWithToolCallMessagesItem_RequestComplete": ".go_high_level_contact_create_tool_with_tool_call_messages_item", + "GoHighLevelContactCreateToolWithToolCallMessagesItem_RequestFailed": ".go_high_level_contact_create_tool_with_tool_call_messages_item", + "GoHighLevelContactCreateToolWithToolCallMessagesItem_RequestResponseDelayed": ".go_high_level_contact_create_tool_with_tool_call_messages_item", + "GoHighLevelContactCreateToolWithToolCallMessagesItem_RequestStart": ".go_high_level_contact_create_tool_with_tool_call_messages_item", + "GoHighLevelContactCreateToolWithToolCallType": ".go_high_level_contact_create_tool_with_tool_call_type", + "GoHighLevelContactGetTool": ".go_high_level_contact_get_tool", + "GoHighLevelContactGetToolMessagesItem": ".go_high_level_contact_get_tool_messages_item", + "GoHighLevelContactGetToolMessagesItem_RequestComplete": ".go_high_level_contact_get_tool_messages_item", + "GoHighLevelContactGetToolMessagesItem_RequestFailed": ".go_high_level_contact_get_tool_messages_item", + "GoHighLevelContactGetToolMessagesItem_RequestResponseDelayed": ".go_high_level_contact_get_tool_messages_item", + "GoHighLevelContactGetToolMessagesItem_RequestStart": ".go_high_level_contact_get_tool_messages_item", + "GoHighLevelContactGetToolProviderDetails": ".go_high_level_contact_get_tool_provider_details", + "GoHighLevelContactGetToolWithToolCall": ".go_high_level_contact_get_tool_with_tool_call", + "GoHighLevelContactGetToolWithToolCallMessagesItem": ".go_high_level_contact_get_tool_with_tool_call_messages_item", + "GoHighLevelContactGetToolWithToolCallMessagesItem_RequestComplete": ".go_high_level_contact_get_tool_with_tool_call_messages_item", + "GoHighLevelContactGetToolWithToolCallMessagesItem_RequestFailed": ".go_high_level_contact_get_tool_with_tool_call_messages_item", + "GoHighLevelContactGetToolWithToolCallMessagesItem_RequestResponseDelayed": ".go_high_level_contact_get_tool_with_tool_call_messages_item", + "GoHighLevelContactGetToolWithToolCallMessagesItem_RequestStart": ".go_high_level_contact_get_tool_with_tool_call_messages_item", + "GoHighLevelContactGetToolWithToolCallType": ".go_high_level_contact_get_tool_with_tool_call_type", + "GoHighLevelCredential": ".go_high_level_credential", + "GoHighLevelCredentialProvider": ".go_high_level_credential_provider", + "GoHighLevelMcpCredential": ".go_high_level_mcp_credential", + "GoHighLevelMcpCredentialProvider": ".go_high_level_mcp_credential_provider", + "GoogleCalendarCheckAvailabilityTool": ".google_calendar_check_availability_tool", + "GoogleCalendarCheckAvailabilityToolMessagesItem": ".google_calendar_check_availability_tool_messages_item", + "GoogleCalendarCheckAvailabilityToolMessagesItem_RequestComplete": ".google_calendar_check_availability_tool_messages_item", + "GoogleCalendarCheckAvailabilityToolMessagesItem_RequestFailed": ".google_calendar_check_availability_tool_messages_item", + "GoogleCalendarCheckAvailabilityToolMessagesItem_RequestResponseDelayed": ".google_calendar_check_availability_tool_messages_item", + "GoogleCalendarCheckAvailabilityToolMessagesItem_RequestStart": ".google_calendar_check_availability_tool_messages_item", + "GoogleCalendarCreateEventTool": ".google_calendar_create_event_tool", + "GoogleCalendarCreateEventToolMessagesItem": ".google_calendar_create_event_tool_messages_item", + "GoogleCalendarCreateEventToolMessagesItem_RequestComplete": ".google_calendar_create_event_tool_messages_item", + "GoogleCalendarCreateEventToolMessagesItem_RequestFailed": ".google_calendar_create_event_tool_messages_item", + "GoogleCalendarCreateEventToolMessagesItem_RequestResponseDelayed": ".google_calendar_create_event_tool_messages_item", + "GoogleCalendarCreateEventToolMessagesItem_RequestStart": ".google_calendar_create_event_tool_messages_item", + "GoogleCalendarCreateEventToolProviderDetails": ".google_calendar_create_event_tool_provider_details", + "GoogleCalendarCreateEventToolWithToolCall": ".google_calendar_create_event_tool_with_tool_call", + "GoogleCalendarCreateEventToolWithToolCallMessagesItem": ".google_calendar_create_event_tool_with_tool_call_messages_item", + "GoogleCalendarCreateEventToolWithToolCallMessagesItem_RequestComplete": ".google_calendar_create_event_tool_with_tool_call_messages_item", + "GoogleCalendarCreateEventToolWithToolCallMessagesItem_RequestFailed": ".google_calendar_create_event_tool_with_tool_call_messages_item", + "GoogleCalendarCreateEventToolWithToolCallMessagesItem_RequestResponseDelayed": ".google_calendar_create_event_tool_with_tool_call_messages_item", + "GoogleCalendarCreateEventToolWithToolCallMessagesItem_RequestStart": ".google_calendar_create_event_tool_with_tool_call_messages_item", + "GoogleCalendarOAuth2AuthorizationCredential": ".google_calendar_o_auth_2_authorization_credential", + "GoogleCalendarOAuth2AuthorizationCredentialProvider": ".google_calendar_o_auth_2_authorization_credential_provider", + "GoogleCalendarOAuth2ClientCredential": ".google_calendar_o_auth_2_client_credential", + "GoogleCalendarOAuth2ClientCredentialProvider": ".google_calendar_o_auth_2_client_credential_provider", + "GoogleCredential": ".google_credential", + "GoogleCredentialProvider": ".google_credential_provider", + "GoogleModel": ".google_model", + "GoogleModelModel": ".google_model_model", + "GoogleModelToolsItem": ".google_model_tools_item", + "GoogleModelToolsItem_ApiRequest": ".google_model_tools_item", + "GoogleModelToolsItem_Bash": ".google_model_tools_item", + "GoogleModelToolsItem_Code": ".google_model_tools_item", + "GoogleModelToolsItem_Computer": ".google_model_tools_item", + "GoogleModelToolsItem_Dtmf": ".google_model_tools_item", + "GoogleModelToolsItem_EndCall": ".google_model_tools_item", + "GoogleModelToolsItem_Function": ".google_model_tools_item", + "GoogleModelToolsItem_GohighlevelCalendarAvailabilityCheck": ".google_model_tools_item", + "GoogleModelToolsItem_GohighlevelCalendarEventCreate": ".google_model_tools_item", + "GoogleModelToolsItem_GohighlevelContactCreate": ".google_model_tools_item", + "GoogleModelToolsItem_GohighlevelContactGet": ".google_model_tools_item", + "GoogleModelToolsItem_GoogleCalendarAvailabilityCheck": ".google_model_tools_item", + "GoogleModelToolsItem_GoogleCalendarEventCreate": ".google_model_tools_item", + "GoogleModelToolsItem_GoogleSheetsRowAppend": ".google_model_tools_item", + "GoogleModelToolsItem_Handoff": ".google_model_tools_item", + "GoogleModelToolsItem_Mcp": ".google_model_tools_item", + "GoogleModelToolsItem_Query": ".google_model_tools_item", + "GoogleModelToolsItem_SipRequest": ".google_model_tools_item", + "GoogleModelToolsItem_SlackMessageSend": ".google_model_tools_item", + "GoogleModelToolsItem_Sms": ".google_model_tools_item", + "GoogleModelToolsItem_TextEditor": ".google_model_tools_item", + "GoogleModelToolsItem_TransferCall": ".google_model_tools_item", + "GoogleModelToolsItem_Voicemail": ".google_model_tools_item", + "GoogleRealtimeConfig": ".google_realtime_config", + "GoogleSheetsOAuth2AuthorizationCredential": ".google_sheets_o_auth_2_authorization_credential", + "GoogleSheetsOAuth2AuthorizationCredentialProvider": ".google_sheets_o_auth_2_authorization_credential_provider", + "GoogleSheetsRowAppendTool": ".google_sheets_row_append_tool", + "GoogleSheetsRowAppendToolMessagesItem": ".google_sheets_row_append_tool_messages_item", + "GoogleSheetsRowAppendToolMessagesItem_RequestComplete": ".google_sheets_row_append_tool_messages_item", + "GoogleSheetsRowAppendToolMessagesItem_RequestFailed": ".google_sheets_row_append_tool_messages_item", + "GoogleSheetsRowAppendToolMessagesItem_RequestResponseDelayed": ".google_sheets_row_append_tool_messages_item", + "GoogleSheetsRowAppendToolMessagesItem_RequestStart": ".google_sheets_row_append_tool_messages_item", + "GoogleSheetsRowAppendToolProviderDetails": ".google_sheets_row_append_tool_provider_details", + "GoogleSheetsRowAppendToolWithToolCall": ".google_sheets_row_append_tool_with_tool_call", + "GoogleSheetsRowAppendToolWithToolCallMessagesItem": ".google_sheets_row_append_tool_with_tool_call_messages_item", + "GoogleSheetsRowAppendToolWithToolCallMessagesItem_RequestComplete": ".google_sheets_row_append_tool_with_tool_call_messages_item", + "GoogleSheetsRowAppendToolWithToolCallMessagesItem_RequestFailed": ".google_sheets_row_append_tool_with_tool_call_messages_item", + "GoogleSheetsRowAppendToolWithToolCallMessagesItem_RequestResponseDelayed": ".google_sheets_row_append_tool_with_tool_call_messages_item", + "GoogleSheetsRowAppendToolWithToolCallMessagesItem_RequestStart": ".google_sheets_row_append_tool_with_tool_call_messages_item", + "GoogleSheetsRowAppendToolWithToolCallType": ".google_sheets_row_append_tool_with_tool_call_type", + "GoogleTranscriber": ".google_transcriber", + "GoogleTranscriberLanguage": ".google_transcriber_language", + "GoogleTranscriberModel": ".google_transcriber_model", + "GoogleVoicemailDetectionPlan": ".google_voicemail_detection_plan", + "GoogleVoicemailDetectionPlanProvider": ".google_voicemail_detection_plan_provider", + "GoogleVoicemailDetectionPlanType": ".google_voicemail_detection_plan_type", + "GroqCredential": ".groq_credential", + "GroqCredentialProvider": ".groq_credential_provider", + "GroqModel": ".groq_model", + "GroqModelModel": ".groq_model_model", + "GroqModelToolsItem": ".groq_model_tools_item", + "GroqModelToolsItem_ApiRequest": ".groq_model_tools_item", + "GroqModelToolsItem_Bash": ".groq_model_tools_item", + "GroqModelToolsItem_Code": ".groq_model_tools_item", + "GroqModelToolsItem_Computer": ".groq_model_tools_item", + "GroqModelToolsItem_Dtmf": ".groq_model_tools_item", + "GroqModelToolsItem_EndCall": ".groq_model_tools_item", + "GroqModelToolsItem_Function": ".groq_model_tools_item", + "GroqModelToolsItem_GohighlevelCalendarAvailabilityCheck": ".groq_model_tools_item", + "GroqModelToolsItem_GohighlevelCalendarEventCreate": ".groq_model_tools_item", + "GroqModelToolsItem_GohighlevelContactCreate": ".groq_model_tools_item", + "GroqModelToolsItem_GohighlevelContactGet": ".groq_model_tools_item", + "GroqModelToolsItem_GoogleCalendarAvailabilityCheck": ".groq_model_tools_item", + "GroqModelToolsItem_GoogleCalendarEventCreate": ".groq_model_tools_item", + "GroqModelToolsItem_GoogleSheetsRowAppend": ".groq_model_tools_item", + "GroqModelToolsItem_Handoff": ".groq_model_tools_item", + "GroqModelToolsItem_Mcp": ".groq_model_tools_item", + "GroqModelToolsItem_Query": ".groq_model_tools_item", + "GroqModelToolsItem_SipRequest": ".groq_model_tools_item", + "GroqModelToolsItem_SlackMessageSend": ".groq_model_tools_item", + "GroqModelToolsItem_Sms": ".groq_model_tools_item", + "GroqModelToolsItem_TextEditor": ".groq_model_tools_item", + "GroqModelToolsItem_TransferCall": ".groq_model_tools_item", + "GroqModelToolsItem_Voicemail": ".groq_model_tools_item", + "GroupCondition": ".group_condition", + "GroupConditionConditionsItem": ".group_condition_conditions_item", + "GroupConditionConditionsItem_Group": ".group_condition_conditions_item", + "GroupConditionConditionsItem_Liquid": ".group_condition_conditions_item", + "GroupConditionConditionsItem_Regex": ".group_condition_conditions_item", + "GroupConditionOperator": ".group_condition_operator", + "HandoffDestinationAssistant": ".handoff_destination_assistant", + "HandoffDestinationAssistantContextEngineeringPlan": ".handoff_destination_assistant_context_engineering_plan", + "HandoffDestinationAssistantContextEngineeringPlan_All": ".handoff_destination_assistant_context_engineering_plan", + "HandoffDestinationAssistantContextEngineeringPlan_LastNMessages": ".handoff_destination_assistant_context_engineering_plan", + "HandoffDestinationAssistantContextEngineeringPlan_None": ".handoff_destination_assistant_context_engineering_plan", + "HandoffDestinationAssistantContextEngineeringPlan_UserAndAssistantMessages": ".handoff_destination_assistant_context_engineering_plan", + "HandoffDestinationAssistantType": ".handoff_destination_assistant_type", + "HandoffDestinationDynamic": ".handoff_destination_dynamic", + "HandoffDestinationSquad": ".handoff_destination_squad", + "HandoffDestinationSquadContextEngineeringPlan": ".handoff_destination_squad_context_engineering_plan", + "HandoffDestinationSquadContextEngineeringPlan_All": ".handoff_destination_squad_context_engineering_plan", + "HandoffDestinationSquadContextEngineeringPlan_LastNMessages": ".handoff_destination_squad_context_engineering_plan", + "HandoffDestinationSquadContextEngineeringPlan_None": ".handoff_destination_squad_context_engineering_plan", + "HandoffDestinationSquadContextEngineeringPlan_UserAndAssistantMessages": ".handoff_destination_squad_context_engineering_plan", + "HandoffTool": ".handoff_tool", + "HandoffToolDestinationsItem": ".handoff_tool_destinations_item", + "HandoffToolDestinationsItem_Assistant": ".handoff_tool_destinations_item", + "HandoffToolDestinationsItem_Dynamic": ".handoff_tool_destinations_item", + "HandoffToolDestinationsItem_Squad": ".handoff_tool_destinations_item", + "HandoffToolMessagesItem": ".handoff_tool_messages_item", + "HandoffToolMessagesItem_RequestComplete": ".handoff_tool_messages_item", + "HandoffToolMessagesItem_RequestFailed": ".handoff_tool_messages_item", + "HandoffToolMessagesItem_RequestResponseDelayed": ".handoff_tool_messages_item", + "HandoffToolMessagesItem_RequestStart": ".handoff_tool_messages_item", + "HangupNode": ".hangup_node", + "HangupNodeType": ".hangup_node_type", + "HmacAuthenticationPlan": ".hmac_authentication_plan", + "HmacAuthenticationPlanAlgorithm": ".hmac_authentication_plan_algorithm", + "HmacAuthenticationPlanSignatureEncoding": ".hmac_authentication_plan_signature_encoding", + "HumeCredential": ".hume_credential", + "HumeCredentialProvider": ".hume_credential_provider", + "HumeVoice": ".hume_voice", + "HumeVoiceModel": ".hume_voice_model", + "ImportTwilioPhoneNumberDto": ".import_twilio_phone_number_dto", + "ImportTwilioPhoneNumberDtoFallbackDestination": ".import_twilio_phone_number_dto_fallback_destination", + "ImportTwilioPhoneNumberDtoFallbackDestination_Number": ".import_twilio_phone_number_dto_fallback_destination", + "ImportTwilioPhoneNumberDtoFallbackDestination_Sip": ".import_twilio_phone_number_dto_fallback_destination", + "ImportTwilioPhoneNumberDtoHooksItem": ".import_twilio_phone_number_dto_hooks_item", + "ImportTwilioPhoneNumberDtoHooksItem_CallEnding": ".import_twilio_phone_number_dto_hooks_item", + "ImportTwilioPhoneNumberDtoHooksItem_CallRinging": ".import_twilio_phone_number_dto_hooks_item", + "ImportVonagePhoneNumberDto": ".import_vonage_phone_number_dto", + "ImportVonagePhoneNumberDtoFallbackDestination": ".import_vonage_phone_number_dto_fallback_destination", + "ImportVonagePhoneNumberDtoFallbackDestination_Number": ".import_vonage_phone_number_dto_fallback_destination", + "ImportVonagePhoneNumberDtoFallbackDestination_Sip": ".import_vonage_phone_number_dto_fallback_destination", + "ImportVonagePhoneNumberDtoHooksItem": ".import_vonage_phone_number_dto_hooks_item", + "ImportVonagePhoneNumberDtoHooksItem_CallEnding": ".import_vonage_phone_number_dto_hooks_item", + "ImportVonagePhoneNumberDtoHooksItem_CallRinging": ".import_vonage_phone_number_dto_hooks_item", + "InflectionAiCredential": ".inflection_ai_credential", + "InflectionAiCredentialProvider": ".inflection_ai_credential_provider", + "InflectionAiModel": ".inflection_ai_model", + "InflectionAiModelModel": ".inflection_ai_model_model", + "InflectionAiModelToolsItem": ".inflection_ai_model_tools_item", + "InflectionAiModelToolsItem_ApiRequest": ".inflection_ai_model_tools_item", + "InflectionAiModelToolsItem_Bash": ".inflection_ai_model_tools_item", + "InflectionAiModelToolsItem_Code": ".inflection_ai_model_tools_item", + "InflectionAiModelToolsItem_Computer": ".inflection_ai_model_tools_item", + "InflectionAiModelToolsItem_Dtmf": ".inflection_ai_model_tools_item", + "InflectionAiModelToolsItem_EndCall": ".inflection_ai_model_tools_item", + "InflectionAiModelToolsItem_Function": ".inflection_ai_model_tools_item", + "InflectionAiModelToolsItem_GohighlevelCalendarAvailabilityCheck": ".inflection_ai_model_tools_item", + "InflectionAiModelToolsItem_GohighlevelCalendarEventCreate": ".inflection_ai_model_tools_item", + "InflectionAiModelToolsItem_GohighlevelContactCreate": ".inflection_ai_model_tools_item", + "InflectionAiModelToolsItem_GohighlevelContactGet": ".inflection_ai_model_tools_item", + "InflectionAiModelToolsItem_GoogleCalendarAvailabilityCheck": ".inflection_ai_model_tools_item", + "InflectionAiModelToolsItem_GoogleCalendarEventCreate": ".inflection_ai_model_tools_item", + "InflectionAiModelToolsItem_GoogleSheetsRowAppend": ".inflection_ai_model_tools_item", + "InflectionAiModelToolsItem_Handoff": ".inflection_ai_model_tools_item", + "InflectionAiModelToolsItem_Mcp": ".inflection_ai_model_tools_item", + "InflectionAiModelToolsItem_Query": ".inflection_ai_model_tools_item", + "InflectionAiModelToolsItem_SipRequest": ".inflection_ai_model_tools_item", + "InflectionAiModelToolsItem_SlackMessageSend": ".inflection_ai_model_tools_item", + "InflectionAiModelToolsItem_Sms": ".inflection_ai_model_tools_item", + "InflectionAiModelToolsItem_TextEditor": ".inflection_ai_model_tools_item", + "InflectionAiModelToolsItem_TransferCall": ".inflection_ai_model_tools_item", + "InflectionAiModelToolsItem_Voicemail": ".inflection_ai_model_tools_item", + "Insight": ".insight", + "InsightFormula": ".insight_formula", + "InsightPaginatedResponse": ".insight_paginated_response", + "InsightRunFormatPlan": ".insight_run_format_plan", + "InsightRunFormatPlanFormat": ".insight_run_format_plan_format", + "InsightRunResponse": ".insight_run_response", + "InsightTimeRange": ".insight_time_range", + "InsightTimeRangeWithStep": ".insight_time_range_with_step", + "InsightTimeRangeWithStepStep": ".insight_time_range_with_step_step", + "InsightType": ".insight_type", + "InviteUserDto": ".invite_user_dto", + "InviteUserDtoRole": ".invite_user_dto_role", + "InvoicePlan": ".invoice_plan", + "InworldCredential": ".inworld_credential", + "InworldCredentialProvider": ".inworld_credential_provider", + "InworldVoice": ".inworld_voice", + "InworldVoiceLanguageCode": ".inworld_voice_language_code", + "InworldVoiceModel": ".inworld_voice_model", + "InworldVoiceVoiceId": ".inworld_voice_voice_id", + "JsonQueryOnCallTableWithNumberTypeColumn": ".json_query_on_call_table_with_number_type_column", + "JsonQueryOnCallTableWithNumberTypeColumnColumn": ".json_query_on_call_table_with_number_type_column_column", + "JsonQueryOnCallTableWithNumberTypeColumnFiltersItem": ".json_query_on_call_table_with_number_type_column_filters_item", + "JsonQueryOnCallTableWithNumberTypeColumnOperation": ".json_query_on_call_table_with_number_type_column_operation", + "JsonQueryOnCallTableWithNumberTypeColumnTable": ".json_query_on_call_table_with_number_type_column_table", + "JsonQueryOnCallTableWithNumberTypeColumnType": ".json_query_on_call_table_with_number_type_column_type", + "JsonQueryOnCallTableWithStringTypeColumn": ".json_query_on_call_table_with_string_type_column", + "JsonQueryOnCallTableWithStringTypeColumnColumn": ".json_query_on_call_table_with_string_type_column_column", + "JsonQueryOnCallTableWithStringTypeColumnFiltersItem": ".json_query_on_call_table_with_string_type_column_filters_item", + "JsonQueryOnCallTableWithStringTypeColumnOperation": ".json_query_on_call_table_with_string_type_column_operation", + "JsonQueryOnCallTableWithStringTypeColumnTable": ".json_query_on_call_table_with_string_type_column_table", + "JsonQueryOnCallTableWithStringTypeColumnType": ".json_query_on_call_table_with_string_type_column_type", + "JsonQueryOnCallTableWithStructuredOutputColumn": ".json_query_on_call_table_with_structured_output_column", + "JsonQueryOnCallTableWithStructuredOutputColumnColumn": ".json_query_on_call_table_with_structured_output_column_column", + "JsonQueryOnCallTableWithStructuredOutputColumnFiltersItem": ".json_query_on_call_table_with_structured_output_column_filters_item", + "JsonQueryOnCallTableWithStructuredOutputColumnOperation": ".json_query_on_call_table_with_structured_output_column_operation", + "JsonQueryOnCallTableWithStructuredOutputColumnTable": ".json_query_on_call_table_with_structured_output_column_table", + "JsonQueryOnCallTableWithStructuredOutputColumnType": ".json_query_on_call_table_with_structured_output_column_type", + "JsonQueryOnEventsTable": ".json_query_on_events_table", + "JsonQueryOnEventsTableFiltersItem": ".json_query_on_events_table_filters_item", + "JsonQueryOnEventsTableOn": ".json_query_on_events_table_on", + "JsonQueryOnEventsTableOperation": ".json_query_on_events_table_operation", + "JsonQueryOnEventsTableTable": ".json_query_on_events_table_table", + "JsonQueryOnEventsTableType": ".json_query_on_events_table_type", + "JsonSchema": ".json_schema", + "JsonSchemaFormat": ".json_schema_format", + "JsonSchemaType": ".json_schema_type", + "JwtResponse": ".jwt_response", + "KeypadInputPlan": ".keypad_input_plan", + "KeypadInputPlanDelimiters": ".keypad_input_plan_delimiters", + "KnowledgeBase": ".knowledge_base", + "KnowledgeBaseCost": ".knowledge_base_cost", + "KnowledgeBaseModel": ".knowledge_base_model", + "KnowledgeBaseProvider": ".knowledge_base_provider", + "KnowledgeBaseResponseDocument": ".knowledge_base_response_document", + "LangfuseCredential": ".langfuse_credential", + "LangfuseCredentialProvider": ".langfuse_credential_provider", + "LangfuseObservabilityPlan": ".langfuse_observability_plan", + "LangfuseObservabilityPlanProvider": ".langfuse_observability_plan_provider", + "LatencyMetrics": ".latency_metrics", + "LineInsight": ".line_insight", + "LineInsightFromCallTable": ".line_insight_from_call_table", + "LineInsightFromCallTableGroupBy": ".line_insight_from_call_table_group_by", + "LineInsightFromCallTableQueriesItem": ".line_insight_from_call_table_queries_item", + "LineInsightFromCallTableType": ".line_insight_from_call_table_type", + "LineInsightGroupBy": ".line_insight_group_by", + "LineInsightMetadata": ".line_insight_metadata", + "LineInsightQueriesItem": ".line_insight_queries_item", + "LiquidCondition": ".liquid_condition", + "LivekitSmartEndpointingPlan": ".livekit_smart_endpointing_plan", + "LivekitSmartEndpointingPlanProvider": ".livekit_smart_endpointing_plan_provider", + "LmntCredential": ".lmnt_credential", + "LmntCredentialProvider": ".lmnt_credential_provider", + "LmntVoice": ".lmnt_voice", + "LmntVoiceId": ".lmnt_voice_id", + "LmntVoiceIdEnum": ".lmnt_voice_id_enum", + "LmntVoiceLanguage": ".lmnt_voice_language", + "LogicEdgeCondition": ".logic_edge_condition", + "MakeCredential": ".make_credential", + "MakeCredentialProvider": ".make_credential_provider", + "MakeTool": ".make_tool", + "MakeToolMessagesItem": ".make_tool_messages_item", + "MakeToolMessagesItem_RequestComplete": ".make_tool_messages_item", + "MakeToolMessagesItem_RequestFailed": ".make_tool_messages_item", + "MakeToolMessagesItem_RequestResponseDelayed": ".make_tool_messages_item", + "MakeToolMessagesItem_RequestStart": ".make_tool_messages_item", + "MakeToolMetadata": ".make_tool_metadata", + "MakeToolProviderDetails": ".make_tool_provider_details", + "MakeToolType": ".make_tool_type", + "MakeToolWithToolCall": ".make_tool_with_tool_call", + "MakeToolWithToolCallMessagesItem": ".make_tool_with_tool_call_messages_item", + "MakeToolWithToolCallMessagesItem_RequestComplete": ".make_tool_with_tool_call_messages_item", + "MakeToolWithToolCallMessagesItem_RequestFailed": ".make_tool_with_tool_call_messages_item", + "MakeToolWithToolCallMessagesItem_RequestResponseDelayed": ".make_tool_with_tool_call_messages_item", + "MakeToolWithToolCallMessagesItem_RequestStart": ".make_tool_with_tool_call_messages_item", + "McpTool": ".mcp_tool", + "McpToolMessages": ".mcp_tool_messages", + "McpToolMessagesItem": ".mcp_tool_messages_item", + "McpToolMessagesItem_RequestComplete": ".mcp_tool_messages_item", + "McpToolMessagesItem_RequestFailed": ".mcp_tool_messages_item", + "McpToolMessagesItem_RequestResponseDelayed": ".mcp_tool_messages_item", + "McpToolMessagesItem_RequestStart": ".mcp_tool_messages_item", + "McpToolMessagesMessagesItem": ".mcp_tool_messages_messages_item", + "McpToolMessagesMessagesItem_RequestComplete": ".mcp_tool_messages_messages_item", + "McpToolMessagesMessagesItem_RequestFailed": ".mcp_tool_messages_messages_item", + "McpToolMessagesMessagesItem_RequestResponseDelayed": ".mcp_tool_messages_messages_item", + "McpToolMessagesMessagesItem_RequestStart": ".mcp_tool_messages_messages_item", + "McpToolMetadata": ".mcp_tool_metadata", + "McpToolMetadataProtocol": ".mcp_tool_metadata_protocol", + "MessageAddHookAction": ".message_add_hook_action", + "MessageTarget": ".message_target", + "MessageTargetRole": ".message_target_role", + "MinimaxLlmModel": ".minimax_llm_model", + "MinimaxLlmModelModel": ".minimax_llm_model_model", + "MinimaxLlmModelToolsItem": ".minimax_llm_model_tools_item", + "MinimaxLlmModelToolsItem_ApiRequest": ".minimax_llm_model_tools_item", + "MinimaxLlmModelToolsItem_Bash": ".minimax_llm_model_tools_item", + "MinimaxLlmModelToolsItem_Code": ".minimax_llm_model_tools_item", + "MinimaxLlmModelToolsItem_Computer": ".minimax_llm_model_tools_item", + "MinimaxLlmModelToolsItem_Dtmf": ".minimax_llm_model_tools_item", + "MinimaxLlmModelToolsItem_EndCall": ".minimax_llm_model_tools_item", + "MinimaxLlmModelToolsItem_Function": ".minimax_llm_model_tools_item", + "MinimaxLlmModelToolsItem_GohighlevelCalendarAvailabilityCheck": ".minimax_llm_model_tools_item", + "MinimaxLlmModelToolsItem_GohighlevelCalendarEventCreate": ".minimax_llm_model_tools_item", + "MinimaxLlmModelToolsItem_GohighlevelContactCreate": ".minimax_llm_model_tools_item", + "MinimaxLlmModelToolsItem_GohighlevelContactGet": ".minimax_llm_model_tools_item", + "MinimaxLlmModelToolsItem_GoogleCalendarAvailabilityCheck": ".minimax_llm_model_tools_item", + "MinimaxLlmModelToolsItem_GoogleCalendarEventCreate": ".minimax_llm_model_tools_item", + "MinimaxLlmModelToolsItem_GoogleSheetsRowAppend": ".minimax_llm_model_tools_item", + "MinimaxLlmModelToolsItem_Handoff": ".minimax_llm_model_tools_item", + "MinimaxLlmModelToolsItem_Mcp": ".minimax_llm_model_tools_item", + "MinimaxLlmModelToolsItem_Query": ".minimax_llm_model_tools_item", + "MinimaxLlmModelToolsItem_SipRequest": ".minimax_llm_model_tools_item", + "MinimaxLlmModelToolsItem_SlackMessageSend": ".minimax_llm_model_tools_item", + "MinimaxLlmModelToolsItem_Sms": ".minimax_llm_model_tools_item", + "MinimaxLlmModelToolsItem_TextEditor": ".minimax_llm_model_tools_item", + "MinimaxLlmModelToolsItem_TransferCall": ".minimax_llm_model_tools_item", + "MinimaxLlmModelToolsItem_Voicemail": ".minimax_llm_model_tools_item", + "MinimaxVoice": ".minimax_voice", + "MinimaxVoiceLanguageBoost": ".minimax_voice_language_boost", + "MinimaxVoiceModel": ".minimax_voice_model", + "MinimaxVoiceRegion": ".minimax_voice_region", + "MinimaxVoiceSubtitleType": ".minimax_voice_subtitle_type", + "MistralCredential": ".mistral_credential", + "MistralCredentialProvider": ".mistral_credential_provider", + "ModelCost": ".model_cost", + "Monitor": ".monitor", + "MonitorPlan": ".monitor_plan", + "MonitorResult": ".monitor_result", + "Mono": ".mono", + "NeetsVoice": ".neets_voice", + "NeuphonicCredential": ".neuphonic_credential", + "NeuphonicCredentialProvider": ".neuphonic_credential_provider", + "NeuphonicVoice": ".neuphonic_voice", + "NeuphonicVoiceModel": ".neuphonic_voice_model", + "NodeArtifact": ".node_artifact", + "NodeArtifactMessagesItem": ".node_artifact_messages_item", + "OAuth2AuthenticationPlan": ".o_auth_2_authentication_plan", + "OAuth2AuthenticationPlanType": ".o_auth_2_authentication_plan_type", + "Oauth2AuthenticationSession": ".oauth_2_authentication_session", + "OpenAiCredential": ".open_ai_credential", + "OpenAiCredentialProvider": ".open_ai_credential_provider", + "OpenAiFunction": ".open_ai_function", + "OpenAiFunctionParameters": ".open_ai_function_parameters", + "OpenAiFunctionParametersType": ".open_ai_function_parameters_type", + "OpenAiMessage": ".open_ai_message", + "OpenAiMessageRole": ".open_ai_message_role", + "OpenAiModel": ".open_ai_model", + "OpenAiModelFallbackModelsItem": ".open_ai_model_fallback_models_item", + "OpenAiModelModel": ".open_ai_model_model", + "OpenAiModelPromptCacheRetention": ".open_ai_model_prompt_cache_retention", + "OpenAiModelToolStrictCompatibilityMode": ".open_ai_model_tool_strict_compatibility_mode", + "OpenAiModelToolsItem": ".open_ai_model_tools_item", + "OpenAiModelToolsItem_ApiRequest": ".open_ai_model_tools_item", + "OpenAiModelToolsItem_Bash": ".open_ai_model_tools_item", + "OpenAiModelToolsItem_Code": ".open_ai_model_tools_item", + "OpenAiModelToolsItem_Computer": ".open_ai_model_tools_item", + "OpenAiModelToolsItem_Dtmf": ".open_ai_model_tools_item", + "OpenAiModelToolsItem_EndCall": ".open_ai_model_tools_item", + "OpenAiModelToolsItem_Function": ".open_ai_model_tools_item", + "OpenAiModelToolsItem_GohighlevelCalendarAvailabilityCheck": ".open_ai_model_tools_item", + "OpenAiModelToolsItem_GohighlevelCalendarEventCreate": ".open_ai_model_tools_item", + "OpenAiModelToolsItem_GohighlevelContactCreate": ".open_ai_model_tools_item", + "OpenAiModelToolsItem_GohighlevelContactGet": ".open_ai_model_tools_item", + "OpenAiModelToolsItem_GoogleCalendarAvailabilityCheck": ".open_ai_model_tools_item", + "OpenAiModelToolsItem_GoogleCalendarEventCreate": ".open_ai_model_tools_item", + "OpenAiModelToolsItem_GoogleSheetsRowAppend": ".open_ai_model_tools_item", + "OpenAiModelToolsItem_Handoff": ".open_ai_model_tools_item", + "OpenAiModelToolsItem_Mcp": ".open_ai_model_tools_item", + "OpenAiModelToolsItem_Query": ".open_ai_model_tools_item", + "OpenAiModelToolsItem_SipRequest": ".open_ai_model_tools_item", + "OpenAiModelToolsItem_SlackMessageSend": ".open_ai_model_tools_item", + "OpenAiModelToolsItem_Sms": ".open_ai_model_tools_item", + "OpenAiModelToolsItem_TextEditor": ".open_ai_model_tools_item", + "OpenAiModelToolsItem_TransferCall": ".open_ai_model_tools_item", + "OpenAiModelToolsItem_Voicemail": ".open_ai_model_tools_item", + "OpenAiTranscriber": ".open_ai_transcriber", + "OpenAiTranscriberLanguage": ".open_ai_transcriber_language", + "OpenAiTranscriberModel": ".open_ai_transcriber_model", + "OpenAiVoice": ".open_ai_voice", + "OpenAiVoiceId": ".open_ai_voice_id", + "OpenAiVoiceIdEnum": ".open_ai_voice_id_enum", + "OpenAiVoiceModel": ".open_ai_voice_model", + "OpenAiVoicemailDetectionPlan": ".open_ai_voicemail_detection_plan", + "OpenAiVoicemailDetectionPlanProvider": ".open_ai_voicemail_detection_plan_provider", + "OpenAiVoicemailDetectionPlanType": ".open_ai_voicemail_detection_plan_type", + "OpenAiWebChatRequest": ".open_ai_web_chat_request", + "OpenAiWebChatRequestInput": ".open_ai_web_chat_request_input", + "OpenAiWebChatRequestInputOneItem": ".open_ai_web_chat_request_input_one_item", + "OpenRouterCredential": ".open_router_credential", + "OpenRouterCredentialProvider": ".open_router_credential_provider", + "OpenRouterModel": ".open_router_model", + "OpenRouterModelToolsItem": ".open_router_model_tools_item", + "OpenRouterModelToolsItem_ApiRequest": ".open_router_model_tools_item", + "OpenRouterModelToolsItem_Bash": ".open_router_model_tools_item", + "OpenRouterModelToolsItem_Code": ".open_router_model_tools_item", + "OpenRouterModelToolsItem_Computer": ".open_router_model_tools_item", + "OpenRouterModelToolsItem_Dtmf": ".open_router_model_tools_item", + "OpenRouterModelToolsItem_EndCall": ".open_router_model_tools_item", + "OpenRouterModelToolsItem_Function": ".open_router_model_tools_item", + "OpenRouterModelToolsItem_GohighlevelCalendarAvailabilityCheck": ".open_router_model_tools_item", + "OpenRouterModelToolsItem_GohighlevelCalendarEventCreate": ".open_router_model_tools_item", + "OpenRouterModelToolsItem_GohighlevelContactCreate": ".open_router_model_tools_item", + "OpenRouterModelToolsItem_GohighlevelContactGet": ".open_router_model_tools_item", + "OpenRouterModelToolsItem_GoogleCalendarAvailabilityCheck": ".open_router_model_tools_item", + "OpenRouterModelToolsItem_GoogleCalendarEventCreate": ".open_router_model_tools_item", + "OpenRouterModelToolsItem_GoogleSheetsRowAppend": ".open_router_model_tools_item", + "OpenRouterModelToolsItem_Handoff": ".open_router_model_tools_item", + "OpenRouterModelToolsItem_Mcp": ".open_router_model_tools_item", + "OpenRouterModelToolsItem_Query": ".open_router_model_tools_item", + "OpenRouterModelToolsItem_SipRequest": ".open_router_model_tools_item", + "OpenRouterModelToolsItem_SlackMessageSend": ".open_router_model_tools_item", + "OpenRouterModelToolsItem_Sms": ".open_router_model_tools_item", + "OpenRouterModelToolsItem_TextEditor": ".open_router_model_tools_item", + "OpenRouterModelToolsItem_TransferCall": ".open_router_model_tools_item", + "OpenRouterModelToolsItem_Voicemail": ".open_router_model_tools_item", + "Org": ".org", + "OrgChannel": ".org_channel", + "OutputTool": ".output_tool", + "OutputToolMessagesItem": ".output_tool_messages_item", + "OutputToolMessagesItem_RequestComplete": ".output_tool_messages_item", + "OutputToolMessagesItem_RequestFailed": ".output_tool_messages_item", + "OutputToolMessagesItem_RequestResponseDelayed": ".output_tool_messages_item", + "OutputToolMessagesItem_RequestStart": ".output_tool_messages_item", + "OutputToolType": ".output_tool_type", + "PaginationMeta": ".pagination_meta", + "PerformanceMetrics": ".performance_metrics", + "PerplexityAiCredential": ".perplexity_ai_credential", + "PerplexityAiCredentialProvider": ".perplexity_ai_credential_provider", + "PerplexityAiModel": ".perplexity_ai_model", + "PerplexityAiModelToolsItem": ".perplexity_ai_model_tools_item", + "PerplexityAiModelToolsItem_ApiRequest": ".perplexity_ai_model_tools_item", + "PerplexityAiModelToolsItem_Bash": ".perplexity_ai_model_tools_item", + "PerplexityAiModelToolsItem_Code": ".perplexity_ai_model_tools_item", + "PerplexityAiModelToolsItem_Computer": ".perplexity_ai_model_tools_item", + "PerplexityAiModelToolsItem_Dtmf": ".perplexity_ai_model_tools_item", + "PerplexityAiModelToolsItem_EndCall": ".perplexity_ai_model_tools_item", + "PerplexityAiModelToolsItem_Function": ".perplexity_ai_model_tools_item", + "PerplexityAiModelToolsItem_GohighlevelCalendarAvailabilityCheck": ".perplexity_ai_model_tools_item", + "PerplexityAiModelToolsItem_GohighlevelCalendarEventCreate": ".perplexity_ai_model_tools_item", + "PerplexityAiModelToolsItem_GohighlevelContactCreate": ".perplexity_ai_model_tools_item", + "PerplexityAiModelToolsItem_GohighlevelContactGet": ".perplexity_ai_model_tools_item", + "PerplexityAiModelToolsItem_GoogleCalendarAvailabilityCheck": ".perplexity_ai_model_tools_item", + "PerplexityAiModelToolsItem_GoogleCalendarEventCreate": ".perplexity_ai_model_tools_item", + "PerplexityAiModelToolsItem_GoogleSheetsRowAppend": ".perplexity_ai_model_tools_item", + "PerplexityAiModelToolsItem_Handoff": ".perplexity_ai_model_tools_item", + "PerplexityAiModelToolsItem_Mcp": ".perplexity_ai_model_tools_item", + "PerplexityAiModelToolsItem_Query": ".perplexity_ai_model_tools_item", + "PerplexityAiModelToolsItem_SipRequest": ".perplexity_ai_model_tools_item", + "PerplexityAiModelToolsItem_SlackMessageSend": ".perplexity_ai_model_tools_item", + "PerplexityAiModelToolsItem_Sms": ".perplexity_ai_model_tools_item", + "PerplexityAiModelToolsItem_TextEditor": ".perplexity_ai_model_tools_item", + "PerplexityAiModelToolsItem_TransferCall": ".perplexity_ai_model_tools_item", + "PerplexityAiModelToolsItem_Voicemail": ".perplexity_ai_model_tools_item", + "Personality": ".personality", + "PhoneNumberCallEndingHookFilter": ".phone_number_call_ending_hook_filter", + "PhoneNumberCallEndingHookFilterKey": ".phone_number_call_ending_hook_filter_key", + "PhoneNumberCallEndingHookFilterOneOfItem": ".phone_number_call_ending_hook_filter_one_of_item", + "PhoneNumberCallEndingHookFilterType": ".phone_number_call_ending_hook_filter_type", + "PhoneNumberCallRingingHookFilter": ".phone_number_call_ringing_hook_filter", + "PhoneNumberCallRingingHookFilterKey": ".phone_number_call_ringing_hook_filter_key", + "PhoneNumberCallRingingHookFilterType": ".phone_number_call_ringing_hook_filter_type", + "PhoneNumberHookCallEnding": ".phone_number_hook_call_ending", + "PhoneNumberHookCallEndingDo": ".phone_number_hook_call_ending_do", + "PhoneNumberHookCallEndingDo_Say": ".phone_number_hook_call_ending_do", + "PhoneNumberHookCallEndingDo_Transfer": ".phone_number_hook_call_ending_do", + "PhoneNumberHookCallRinging": ".phone_number_hook_call_ringing", + "PhoneNumberHookCallRingingDoItem": ".phone_number_hook_call_ringing_do_item", + "PhoneNumberHookCallRingingDoItem_Say": ".phone_number_hook_call_ringing_do_item", + "PhoneNumberHookCallRingingDoItem_Transfer": ".phone_number_hook_call_ringing_do_item", + "PhoneNumberPaginatedResponse": ".phone_number_paginated_response", + "PhoneNumberPaginatedResponseResultsItem": ".phone_number_paginated_response_results_item", + "PhoneNumberPaginatedResponseResultsItem_ByoPhoneNumber": ".phone_number_paginated_response_results_item", + "PhoneNumberPaginatedResponseResultsItem_Telnyx": ".phone_number_paginated_response_results_item", + "PhoneNumberPaginatedResponseResultsItem_Twilio": ".phone_number_paginated_response_results_item", + "PhoneNumberPaginatedResponseResultsItem_Vapi": ".phone_number_paginated_response_results_item", + "PhoneNumberPaginatedResponseResultsItem_Vonage": ".phone_number_paginated_response_results_item", + "PieInsight": ".pie_insight", + "PieInsightFromCallTable": ".pie_insight_from_call_table", + "PieInsightFromCallTableGroupBy": ".pie_insight_from_call_table_group_by", + "PieInsightFromCallTableQueriesItem": ".pie_insight_from_call_table_queries_item", + "PieInsightFromCallTableType": ".pie_insight_from_call_table_type", + "PieInsightGroupBy": ".pie_insight_group_by", + "PieInsightQueriesItem": ".pie_insight_queries_item", + "PlayHtCredential": ".play_ht_credential", + "PlayHtCredentialProvider": ".play_ht_credential_provider", + "PlayHtVoice": ".play_ht_voice", + "PlayHtVoiceEmotion": ".play_ht_voice_emotion", + "PlayHtVoiceId": ".play_ht_voice_id", + "PlayHtVoiceIdEnum": ".play_ht_voice_id_enum", + "PlayHtVoiceLanguage": ".play_ht_voice_language", + "PlayHtVoiceModel": ".play_ht_voice_model", + "PromptInjectionSecurityFilter": ".prompt_injection_security_filter", + "PromptInjectionSecurityFilterType": ".prompt_injection_security_filter_type", + "ProviderResource": ".provider_resource", + "ProviderResourcePaginatedResponse": ".provider_resource_paginated_response", + "ProviderResourceProvider": ".provider_resource_provider", + "ProviderResourceResourceName": ".provider_resource_resource_name", + "PublicKeyEncryptionPlan": ".public_key_encryption_plan", + "PublicKeyEncryptionPlanAlgorithm": ".public_key_encryption_plan_algorithm", + "PublicKeyEncryptionPlanPublicKey": ".public_key_encryption_plan_public_key", + "PublicKeyEncryptionPlanPublicKey_SpkiPem": ".public_key_encryption_plan_public_key", + "PunctuationBoundary": ".punctuation_boundary", + "QueryTool": ".query_tool", + "QueryToolMessagesItem": ".query_tool_messages_item", + "QueryToolMessagesItem_RequestComplete": ".query_tool_messages_item", + "QueryToolMessagesItem_RequestFailed": ".query_tool_messages_item", + "QueryToolMessagesItem_RequestResponseDelayed": ".query_tool_messages_item", + "QueryToolMessagesItem_RequestStart": ".query_tool_messages_item", + "RceSecurityFilter": ".rce_security_filter", + "RceSecurityFilterType": ".rce_security_filter_type", + "Recording": ".recording", + "RecordingConsent": ".recording_consent", + "RecordingConsentPlanStayOnLine": ".recording_consent_plan_stay_on_line", + "RecordingConsentPlanStayOnLineVoice": ".recording_consent_plan_stay_on_line_voice", + "RecordingConsentPlanStayOnLineVoice_11Labs": ".recording_consent_plan_stay_on_line_voice", + "RecordingConsentPlanStayOnLineVoice_Azure": ".recording_consent_plan_stay_on_line_voice", + "RecordingConsentPlanStayOnLineVoice_Cartesia": ".recording_consent_plan_stay_on_line_voice", + "RecordingConsentPlanStayOnLineVoice_CustomVoice": ".recording_consent_plan_stay_on_line_voice", + "RecordingConsentPlanStayOnLineVoice_Deepgram": ".recording_consent_plan_stay_on_line_voice", + "RecordingConsentPlanStayOnLineVoice_Hume": ".recording_consent_plan_stay_on_line_voice", + "RecordingConsentPlanStayOnLineVoice_Inworld": ".recording_consent_plan_stay_on_line_voice", + "RecordingConsentPlanStayOnLineVoice_Lmnt": ".recording_consent_plan_stay_on_line_voice", + "RecordingConsentPlanStayOnLineVoice_Minimax": ".recording_consent_plan_stay_on_line_voice", + "RecordingConsentPlanStayOnLineVoice_Neuphonic": ".recording_consent_plan_stay_on_line_voice", + "RecordingConsentPlanStayOnLineVoice_Openai": ".recording_consent_plan_stay_on_line_voice", + "RecordingConsentPlanStayOnLineVoice_Playht": ".recording_consent_plan_stay_on_line_voice", + "RecordingConsentPlanStayOnLineVoice_RimeAi": ".recording_consent_plan_stay_on_line_voice", + "RecordingConsentPlanStayOnLineVoice_Sesame": ".recording_consent_plan_stay_on_line_voice", + "RecordingConsentPlanStayOnLineVoice_SmallestAi": ".recording_consent_plan_stay_on_line_voice", + "RecordingConsentPlanStayOnLineVoice_Tavus": ".recording_consent_plan_stay_on_line_voice", + "RecordingConsentPlanStayOnLineVoice_Vapi": ".recording_consent_plan_stay_on_line_voice", + "RecordingConsentPlanStayOnLineVoice_Wellsaid": ".recording_consent_plan_stay_on_line_voice", + "RecordingConsentPlanVerbal": ".recording_consent_plan_verbal", + "RecordingConsentPlanVerbalVoice": ".recording_consent_plan_verbal_voice", + "RecordingConsentPlanVerbalVoice_11Labs": ".recording_consent_plan_verbal_voice", + "RecordingConsentPlanVerbalVoice_Azure": ".recording_consent_plan_verbal_voice", + "RecordingConsentPlanVerbalVoice_Cartesia": ".recording_consent_plan_verbal_voice", + "RecordingConsentPlanVerbalVoice_CustomVoice": ".recording_consent_plan_verbal_voice", + "RecordingConsentPlanVerbalVoice_Deepgram": ".recording_consent_plan_verbal_voice", + "RecordingConsentPlanVerbalVoice_Hume": ".recording_consent_plan_verbal_voice", + "RecordingConsentPlanVerbalVoice_Inworld": ".recording_consent_plan_verbal_voice", + "RecordingConsentPlanVerbalVoice_Lmnt": ".recording_consent_plan_verbal_voice", + "RecordingConsentPlanVerbalVoice_Minimax": ".recording_consent_plan_verbal_voice", + "RecordingConsentPlanVerbalVoice_Neuphonic": ".recording_consent_plan_verbal_voice", + "RecordingConsentPlanVerbalVoice_Openai": ".recording_consent_plan_verbal_voice", + "RecordingConsentPlanVerbalVoice_Playht": ".recording_consent_plan_verbal_voice", + "RecordingConsentPlanVerbalVoice_RimeAi": ".recording_consent_plan_verbal_voice", + "RecordingConsentPlanVerbalVoice_Sesame": ".recording_consent_plan_verbal_voice", + "RecordingConsentPlanVerbalVoice_SmallestAi": ".recording_consent_plan_verbal_voice", + "RecordingConsentPlanVerbalVoice_Tavus": ".recording_consent_plan_verbal_voice", + "RecordingConsentPlanVerbalVoice_Vapi": ".recording_consent_plan_verbal_voice", + "RecordingConsentPlanVerbalVoice_Wellsaid": ".recording_consent_plan_verbal_voice", + "RegexCondition": ".regex_condition", + "RegexOption": ".regex_option", + "RegexOptionType": ".regex_option_type", + "RegexReplacement": ".regex_replacement", + "RegexSecurityFilter": ".regex_security_filter", + "RegexSecurityFilterType": ".regex_security_filter_type", + "RelayCommandNote": ".relay_command_note", + "RelayCommandOptions": ".relay_command_options", + "RelayCommandOptionsType": ".relay_command_options_type", + "RelayCommandSay": ".relay_command_say", + "RelayRequest": ".relay_request", + "RelayRequestCommandsItem": ".relay_request_commands_item", + "RelayRequestCommandsItem_MessageAdd": ".relay_request_commands_item", + "RelayRequestCommandsItem_Say": ".relay_request_commands_item", + "RelayRequestTarget": ".relay_request_target", + "RelayRequestTarget_Assistant": ".relay_request_target", + "RelayRequestTarget_Squad": ".relay_request_target", + "RelayResponse": ".relay_response", + "RelayResponseStatus": ".relay_response_status", + "RelayTargetAssistant": ".relay_target_assistant", + "RelayTargetOptions": ".relay_target_options", + "RelayTargetOptionsType": ".relay_target_options_type", + "RelayTargetSquad": ".relay_target_squad", + "ResponseCompletedEvent": ".response_completed_event", + "ResponseCompletedEventType": ".response_completed_event_type", + "ResponseErrorEvent": ".response_error_event", + "ResponseErrorEventType": ".response_error_event_type", + "ResponseObject": ".response_object", + "ResponseObjectObject": ".response_object_object", + "ResponseObjectStatus": ".response_object_status", + "ResponseOutputMessage": ".response_output_message", + "ResponseOutputMessageRole": ".response_output_message_role", + "ResponseOutputMessageStatus": ".response_output_message_status", + "ResponseOutputMessageType": ".response_output_message_type", + "ResponseOutputText": ".response_output_text", + "ResponseOutputTextType": ".response_output_text_type", + "ResponseTextDeltaEvent": ".response_text_delta_event", + "ResponseTextDeltaEventType": ".response_text_delta_event_type", + "ResponseTextDoneEvent": ".response_text_done_event", + "ResponseTextDoneEventType": ".response_text_done_event_type", + "RimeAiCredential": ".rime_ai_credential", + "RimeAiCredentialProvider": ".rime_ai_credential_provider", + "RimeAiVoice": ".rime_ai_voice", + "RimeAiVoiceId": ".rime_ai_voice_id", + "RimeAiVoiceIdEnum": ".rime_ai_voice_id_enum", + "RimeAiVoiceLanguage": ".rime_ai_voice_language", + "RimeAiVoiceModel": ".rime_ai_voice_model", + "RunpodCredential": ".runpod_credential", + "RunpodCredentialProvider": ".runpod_credential_provider", + "S3Credential": ".s_3_credential", + "S3CredentialProvider": ".s_3_credential_provider", + "SayAssistantHookAction": ".say_assistant_hook_action", + "SayHookAction": ".say_hook_action", + "SayHookActionPrompt": ".say_hook_action_prompt", + "SayHookActionPromptOneItem": ".say_hook_action_prompt_one_item", + "SayPhoneNumberHookAction": ".say_phone_number_hook_action", + "SbcConfiguration": ".sbc_configuration", + "Scenario": ".scenario", + "ScenarioHooksItem": ".scenario_hooks_item", + "ScenarioHooksItem_SimulationRunEnded": ".scenario_hooks_item", + "ScenarioHooksItem_SimulationRunStarted": ".scenario_hooks_item", + "ScenarioToolMock": ".scenario_tool_mock", + "SchedulePlan": ".schedule_plan", + "Scorecard": ".scorecard", + "ScorecardMetric": ".scorecard_metric", + "ScorecardPaginatedResponse": ".scorecard_paginated_response", + "SecurityFilterBase": ".security_filter_base", + "SecurityFilterPlan": ".security_filter_plan", + "SecurityFilterPlanMode": ".security_filter_plan_mode", + "Server": ".server", + "ServerMessage": ".server_message", + "ServerMessageAssistantRequest": ".server_message_assistant_request", + "ServerMessageAssistantRequestPhoneNumber": ".server_message_assistant_request_phone_number", + "ServerMessageAssistantRequestPhoneNumber_ByoPhoneNumber": ".server_message_assistant_request_phone_number", + "ServerMessageAssistantRequestPhoneNumber_Telnyx": ".server_message_assistant_request_phone_number", + "ServerMessageAssistantRequestPhoneNumber_Twilio": ".server_message_assistant_request_phone_number", + "ServerMessageAssistantRequestPhoneNumber_Vapi": ".server_message_assistant_request_phone_number", + "ServerMessageAssistantRequestPhoneNumber_Vonage": ".server_message_assistant_request_phone_number", + "ServerMessageAssistantRequestType": ".server_message_assistant_request_type", + "ServerMessageAssistantSpeech": ".server_message_assistant_speech", + "ServerMessageAssistantSpeechPhoneNumber": ".server_message_assistant_speech_phone_number", + "ServerMessageAssistantSpeechPhoneNumber_ByoPhoneNumber": ".server_message_assistant_speech_phone_number", + "ServerMessageAssistantSpeechPhoneNumber_Telnyx": ".server_message_assistant_speech_phone_number", + "ServerMessageAssistantSpeechPhoneNumber_Twilio": ".server_message_assistant_speech_phone_number", + "ServerMessageAssistantSpeechPhoneNumber_Vapi": ".server_message_assistant_speech_phone_number", + "ServerMessageAssistantSpeechPhoneNumber_Vonage": ".server_message_assistant_speech_phone_number", + "ServerMessageAssistantSpeechSource": ".server_message_assistant_speech_source", + "ServerMessageAssistantSpeechTiming": ".server_message_assistant_speech_timing", + "ServerMessageAssistantSpeechTiming_WordAlignment": ".server_message_assistant_speech_timing", + "ServerMessageAssistantSpeechTiming_WordProgress": ".server_message_assistant_speech_timing", + "ServerMessageAssistantSpeechType": ".server_message_assistant_speech_type", + "ServerMessageCallDeleteFailed": ".server_message_call_delete_failed", + "ServerMessageCallDeleteFailedPhoneNumber": ".server_message_call_delete_failed_phone_number", + "ServerMessageCallDeleteFailedPhoneNumber_ByoPhoneNumber": ".server_message_call_delete_failed_phone_number", + "ServerMessageCallDeleteFailedPhoneNumber_Telnyx": ".server_message_call_delete_failed_phone_number", + "ServerMessageCallDeleteFailedPhoneNumber_Twilio": ".server_message_call_delete_failed_phone_number", + "ServerMessageCallDeleteFailedPhoneNumber_Vapi": ".server_message_call_delete_failed_phone_number", + "ServerMessageCallDeleteFailedPhoneNumber_Vonage": ".server_message_call_delete_failed_phone_number", + "ServerMessageCallDeleteFailedType": ".server_message_call_delete_failed_type", + "ServerMessageCallDeleted": ".server_message_call_deleted", + "ServerMessageCallDeletedPhoneNumber": ".server_message_call_deleted_phone_number", + "ServerMessageCallDeletedPhoneNumber_ByoPhoneNumber": ".server_message_call_deleted_phone_number", + "ServerMessageCallDeletedPhoneNumber_Telnyx": ".server_message_call_deleted_phone_number", + "ServerMessageCallDeletedPhoneNumber_Twilio": ".server_message_call_deleted_phone_number", + "ServerMessageCallDeletedPhoneNumber_Vapi": ".server_message_call_deleted_phone_number", + "ServerMessageCallDeletedPhoneNumber_Vonage": ".server_message_call_deleted_phone_number", + "ServerMessageCallDeletedType": ".server_message_call_deleted_type", + "ServerMessageCallEndpointingRequest": ".server_message_call_endpointing_request", + "ServerMessageCallEndpointingRequestMessagesItem": ".server_message_call_endpointing_request_messages_item", + "ServerMessageCallEndpointingRequestPhoneNumber": ".server_message_call_endpointing_request_phone_number", + "ServerMessageCallEndpointingRequestPhoneNumber_ByoPhoneNumber": ".server_message_call_endpointing_request_phone_number", + "ServerMessageCallEndpointingRequestPhoneNumber_Telnyx": ".server_message_call_endpointing_request_phone_number", + "ServerMessageCallEndpointingRequestPhoneNumber_Twilio": ".server_message_call_endpointing_request_phone_number", + "ServerMessageCallEndpointingRequestPhoneNumber_Vapi": ".server_message_call_endpointing_request_phone_number", + "ServerMessageCallEndpointingRequestPhoneNumber_Vonage": ".server_message_call_endpointing_request_phone_number", + "ServerMessageCallEndpointingRequestType": ".server_message_call_endpointing_request_type", + "ServerMessageChatCreated": ".server_message_chat_created", + "ServerMessageChatCreatedPhoneNumber": ".server_message_chat_created_phone_number", + "ServerMessageChatCreatedPhoneNumber_ByoPhoneNumber": ".server_message_chat_created_phone_number", + "ServerMessageChatCreatedPhoneNumber_Telnyx": ".server_message_chat_created_phone_number", + "ServerMessageChatCreatedPhoneNumber_Twilio": ".server_message_chat_created_phone_number", + "ServerMessageChatCreatedPhoneNumber_Vapi": ".server_message_chat_created_phone_number", + "ServerMessageChatCreatedPhoneNumber_Vonage": ".server_message_chat_created_phone_number", + "ServerMessageChatCreatedType": ".server_message_chat_created_type", + "ServerMessageChatDeleted": ".server_message_chat_deleted", + "ServerMessageChatDeletedPhoneNumber": ".server_message_chat_deleted_phone_number", + "ServerMessageChatDeletedPhoneNumber_ByoPhoneNumber": ".server_message_chat_deleted_phone_number", + "ServerMessageChatDeletedPhoneNumber_Telnyx": ".server_message_chat_deleted_phone_number", + "ServerMessageChatDeletedPhoneNumber_Twilio": ".server_message_chat_deleted_phone_number", + "ServerMessageChatDeletedPhoneNumber_Vapi": ".server_message_chat_deleted_phone_number", + "ServerMessageChatDeletedPhoneNumber_Vonage": ".server_message_chat_deleted_phone_number", + "ServerMessageChatDeletedType": ".server_message_chat_deleted_type", + "ServerMessageConversationUpdate": ".server_message_conversation_update", + "ServerMessageConversationUpdateMessagesItem": ".server_message_conversation_update_messages_item", + "ServerMessageConversationUpdatePhoneNumber": ".server_message_conversation_update_phone_number", + "ServerMessageConversationUpdatePhoneNumber_ByoPhoneNumber": ".server_message_conversation_update_phone_number", + "ServerMessageConversationUpdatePhoneNumber_Telnyx": ".server_message_conversation_update_phone_number", + "ServerMessageConversationUpdatePhoneNumber_Twilio": ".server_message_conversation_update_phone_number", + "ServerMessageConversationUpdatePhoneNumber_Vapi": ".server_message_conversation_update_phone_number", + "ServerMessageConversationUpdatePhoneNumber_Vonage": ".server_message_conversation_update_phone_number", + "ServerMessageConversationUpdateType": ".server_message_conversation_update_type", + "ServerMessageEndOfCallReport": ".server_message_end_of_call_report", + "ServerMessageEndOfCallReportCostsItem": ".server_message_end_of_call_report_costs_item", + "ServerMessageEndOfCallReportCostsItem_Analysis": ".server_message_end_of_call_report_costs_item", + "ServerMessageEndOfCallReportCostsItem_KnowledgeBase": ".server_message_end_of_call_report_costs_item", + "ServerMessageEndOfCallReportCostsItem_Model": ".server_message_end_of_call_report_costs_item", + "ServerMessageEndOfCallReportCostsItem_Transcriber": ".server_message_end_of_call_report_costs_item", + "ServerMessageEndOfCallReportCostsItem_Transport": ".server_message_end_of_call_report_costs_item", + "ServerMessageEndOfCallReportCostsItem_Vapi": ".server_message_end_of_call_report_costs_item", + "ServerMessageEndOfCallReportCostsItem_Voice": ".server_message_end_of_call_report_costs_item", + "ServerMessageEndOfCallReportCostsItem_VoicemailDetection": ".server_message_end_of_call_report_costs_item", + "ServerMessageEndOfCallReportDestination": ".server_message_end_of_call_report_destination", + "ServerMessageEndOfCallReportDestination_Number": ".server_message_end_of_call_report_destination", + "ServerMessageEndOfCallReportDestination_Sip": ".server_message_end_of_call_report_destination", + "ServerMessageEndOfCallReportEndedReason": ".server_message_end_of_call_report_ended_reason", + "ServerMessageEndOfCallReportPhoneNumber": ".server_message_end_of_call_report_phone_number", + "ServerMessageEndOfCallReportPhoneNumber_ByoPhoneNumber": ".server_message_end_of_call_report_phone_number", + "ServerMessageEndOfCallReportPhoneNumber_Telnyx": ".server_message_end_of_call_report_phone_number", + "ServerMessageEndOfCallReportPhoneNumber_Twilio": ".server_message_end_of_call_report_phone_number", + "ServerMessageEndOfCallReportPhoneNumber_Vapi": ".server_message_end_of_call_report_phone_number", + "ServerMessageEndOfCallReportPhoneNumber_Vonage": ".server_message_end_of_call_report_phone_number", + "ServerMessageEndOfCallReportType": ".server_message_end_of_call_report_type", + "ServerMessageHandoffDestinationRequest": ".server_message_handoff_destination_request", + "ServerMessageHandoffDestinationRequestPhoneNumber": ".server_message_handoff_destination_request_phone_number", + "ServerMessageHandoffDestinationRequestPhoneNumber_ByoPhoneNumber": ".server_message_handoff_destination_request_phone_number", + "ServerMessageHandoffDestinationRequestPhoneNumber_Telnyx": ".server_message_handoff_destination_request_phone_number", + "ServerMessageHandoffDestinationRequestPhoneNumber_Twilio": ".server_message_handoff_destination_request_phone_number", + "ServerMessageHandoffDestinationRequestPhoneNumber_Vapi": ".server_message_handoff_destination_request_phone_number", + "ServerMessageHandoffDestinationRequestPhoneNumber_Vonage": ".server_message_handoff_destination_request_phone_number", + "ServerMessageHandoffDestinationRequestType": ".server_message_handoff_destination_request_type", + "ServerMessageHang": ".server_message_hang", + "ServerMessageHangPhoneNumber": ".server_message_hang_phone_number", + "ServerMessageHangPhoneNumber_ByoPhoneNumber": ".server_message_hang_phone_number", + "ServerMessageHangPhoneNumber_Telnyx": ".server_message_hang_phone_number", + "ServerMessageHangPhoneNumber_Twilio": ".server_message_hang_phone_number", + "ServerMessageHangPhoneNumber_Vapi": ".server_message_hang_phone_number", + "ServerMessageHangPhoneNumber_Vonage": ".server_message_hang_phone_number", + "ServerMessageHangType": ".server_message_hang_type", + "ServerMessageKnowledgeBaseRequest": ".server_message_knowledge_base_request", + "ServerMessageKnowledgeBaseRequestMessagesItem": ".server_message_knowledge_base_request_messages_item", + "ServerMessageKnowledgeBaseRequestPhoneNumber": ".server_message_knowledge_base_request_phone_number", + "ServerMessageKnowledgeBaseRequestPhoneNumber_ByoPhoneNumber": ".server_message_knowledge_base_request_phone_number", + "ServerMessageKnowledgeBaseRequestPhoneNumber_Telnyx": ".server_message_knowledge_base_request_phone_number", + "ServerMessageKnowledgeBaseRequestPhoneNumber_Twilio": ".server_message_knowledge_base_request_phone_number", + "ServerMessageKnowledgeBaseRequestPhoneNumber_Vapi": ".server_message_knowledge_base_request_phone_number", + "ServerMessageKnowledgeBaseRequestPhoneNumber_Vonage": ".server_message_knowledge_base_request_phone_number", + "ServerMessageKnowledgeBaseRequestType": ".server_message_knowledge_base_request_type", + "ServerMessageLanguageChangeDetected": ".server_message_language_change_detected", + "ServerMessageLanguageChangeDetectedPhoneNumber": ".server_message_language_change_detected_phone_number", + "ServerMessageLanguageChangeDetectedPhoneNumber_ByoPhoneNumber": ".server_message_language_change_detected_phone_number", + "ServerMessageLanguageChangeDetectedPhoneNumber_Telnyx": ".server_message_language_change_detected_phone_number", + "ServerMessageLanguageChangeDetectedPhoneNumber_Twilio": ".server_message_language_change_detected_phone_number", + "ServerMessageLanguageChangeDetectedPhoneNumber_Vapi": ".server_message_language_change_detected_phone_number", + "ServerMessageLanguageChangeDetectedPhoneNumber_Vonage": ".server_message_language_change_detected_phone_number", + "ServerMessageLanguageChangeDetectedType": ".server_message_language_change_detected_type", + "ServerMessageMessage": ".server_message_message", + "ServerMessageModelOutput": ".server_message_model_output", + "ServerMessageModelOutputPhoneNumber": ".server_message_model_output_phone_number", + "ServerMessageModelOutputPhoneNumber_ByoPhoneNumber": ".server_message_model_output_phone_number", + "ServerMessageModelOutputPhoneNumber_Telnyx": ".server_message_model_output_phone_number", + "ServerMessageModelOutputPhoneNumber_Twilio": ".server_message_model_output_phone_number", + "ServerMessageModelOutputPhoneNumber_Vapi": ".server_message_model_output_phone_number", + "ServerMessageModelOutputPhoneNumber_Vonage": ".server_message_model_output_phone_number", + "ServerMessageModelOutputType": ".server_message_model_output_type", + "ServerMessagePhoneCallControl": ".server_message_phone_call_control", + "ServerMessagePhoneCallControlDestination": ".server_message_phone_call_control_destination", + "ServerMessagePhoneCallControlDestination_Number": ".server_message_phone_call_control_destination", + "ServerMessagePhoneCallControlDestination_Sip": ".server_message_phone_call_control_destination", + "ServerMessagePhoneCallControlPhoneNumber": ".server_message_phone_call_control_phone_number", + "ServerMessagePhoneCallControlPhoneNumber_ByoPhoneNumber": ".server_message_phone_call_control_phone_number", + "ServerMessagePhoneCallControlPhoneNumber_Telnyx": ".server_message_phone_call_control_phone_number", + "ServerMessagePhoneCallControlPhoneNumber_Twilio": ".server_message_phone_call_control_phone_number", + "ServerMessagePhoneCallControlPhoneNumber_Vapi": ".server_message_phone_call_control_phone_number", + "ServerMessagePhoneCallControlPhoneNumber_Vonage": ".server_message_phone_call_control_phone_number", + "ServerMessagePhoneCallControlRequest": ".server_message_phone_call_control_request", + "ServerMessagePhoneCallControlType": ".server_message_phone_call_control_type", + "ServerMessageResponse": ".server_message_response", + "ServerMessageResponseAssistantRequest": ".server_message_response_assistant_request", + "ServerMessageResponseAssistantRequestDestination": ".server_message_response_assistant_request_destination", + "ServerMessageResponseAssistantRequestDestination_Number": ".server_message_response_assistant_request_destination", + "ServerMessageResponseAssistantRequestDestination_Sip": ".server_message_response_assistant_request_destination", + "ServerMessageResponseCallEndpointingRequest": ".server_message_response_call_endpointing_request", + "ServerMessageResponseHandoffDestinationRequest": ".server_message_response_handoff_destination_request", + "ServerMessageResponseKnowledgeBaseRequest": ".server_message_response_knowledge_base_request", + "ServerMessageResponseMessageResponse": ".server_message_response_message_response", + "ServerMessageResponseToolCalls": ".server_message_response_tool_calls", + "ServerMessageResponseTransferDestinationRequest": ".server_message_response_transfer_destination_request", + "ServerMessageResponseTransferDestinationRequestDestination": ".server_message_response_transfer_destination_request_destination", + "ServerMessageResponseTransferDestinationRequestDestination_Assistant": ".server_message_response_transfer_destination_request_destination", + "ServerMessageResponseTransferDestinationRequestDestination_Number": ".server_message_response_transfer_destination_request_destination", + "ServerMessageResponseTransferDestinationRequestDestination_Sip": ".server_message_response_transfer_destination_request_destination", + "ServerMessageResponseTransferDestinationRequestMessage": ".server_message_response_transfer_destination_request_message", + "ServerMessageResponseTransferDestinationRequestMessage_RequestComplete": ".server_message_response_transfer_destination_request_message", + "ServerMessageResponseTransferDestinationRequestMessage_RequestFailed": ".server_message_response_transfer_destination_request_message", + "ServerMessageResponseTransferDestinationRequestMessage_RequestResponseDelayed": ".server_message_response_transfer_destination_request_message", + "ServerMessageResponseTransferDestinationRequestMessage_RequestStart": ".server_message_response_transfer_destination_request_message", + "ServerMessageResponseVoiceRequest": ".server_message_response_voice_request", + "ServerMessageSessionCreated": ".server_message_session_created", + "ServerMessageSessionCreatedPhoneNumber": ".server_message_session_created_phone_number", + "ServerMessageSessionCreatedPhoneNumber_ByoPhoneNumber": ".server_message_session_created_phone_number", + "ServerMessageSessionCreatedPhoneNumber_Telnyx": ".server_message_session_created_phone_number", + "ServerMessageSessionCreatedPhoneNumber_Twilio": ".server_message_session_created_phone_number", + "ServerMessageSessionCreatedPhoneNumber_Vapi": ".server_message_session_created_phone_number", + "ServerMessageSessionCreatedPhoneNumber_Vonage": ".server_message_session_created_phone_number", + "ServerMessageSessionCreatedType": ".server_message_session_created_type", + "ServerMessageSessionDeleted": ".server_message_session_deleted", + "ServerMessageSessionDeletedPhoneNumber": ".server_message_session_deleted_phone_number", + "ServerMessageSessionDeletedPhoneNumber_ByoPhoneNumber": ".server_message_session_deleted_phone_number", + "ServerMessageSessionDeletedPhoneNumber_Telnyx": ".server_message_session_deleted_phone_number", + "ServerMessageSessionDeletedPhoneNumber_Twilio": ".server_message_session_deleted_phone_number", + "ServerMessageSessionDeletedPhoneNumber_Vapi": ".server_message_session_deleted_phone_number", + "ServerMessageSessionDeletedPhoneNumber_Vonage": ".server_message_session_deleted_phone_number", + "ServerMessageSessionDeletedType": ".server_message_session_deleted_type", + "ServerMessageSessionUpdated": ".server_message_session_updated", + "ServerMessageSessionUpdatedPhoneNumber": ".server_message_session_updated_phone_number", + "ServerMessageSessionUpdatedPhoneNumber_ByoPhoneNumber": ".server_message_session_updated_phone_number", + "ServerMessageSessionUpdatedPhoneNumber_Telnyx": ".server_message_session_updated_phone_number", + "ServerMessageSessionUpdatedPhoneNumber_Twilio": ".server_message_session_updated_phone_number", + "ServerMessageSessionUpdatedPhoneNumber_Vapi": ".server_message_session_updated_phone_number", + "ServerMessageSessionUpdatedPhoneNumber_Vonage": ".server_message_session_updated_phone_number", + "ServerMessageSessionUpdatedType": ".server_message_session_updated_type", + "ServerMessageSpeechUpdate": ".server_message_speech_update", + "ServerMessageSpeechUpdatePhoneNumber": ".server_message_speech_update_phone_number", + "ServerMessageSpeechUpdatePhoneNumber_ByoPhoneNumber": ".server_message_speech_update_phone_number", + "ServerMessageSpeechUpdatePhoneNumber_Telnyx": ".server_message_speech_update_phone_number", + "ServerMessageSpeechUpdatePhoneNumber_Twilio": ".server_message_speech_update_phone_number", + "ServerMessageSpeechUpdatePhoneNumber_Vapi": ".server_message_speech_update_phone_number", + "ServerMessageSpeechUpdatePhoneNumber_Vonage": ".server_message_speech_update_phone_number", + "ServerMessageSpeechUpdateRole": ".server_message_speech_update_role", + "ServerMessageSpeechUpdateStatus": ".server_message_speech_update_status", + "ServerMessageSpeechUpdateType": ".server_message_speech_update_type", + "ServerMessageStatusUpdate": ".server_message_status_update", + "ServerMessageStatusUpdateDestination": ".server_message_status_update_destination", + "ServerMessageStatusUpdateDestination_Number": ".server_message_status_update_destination", + "ServerMessageStatusUpdateDestination_Sip": ".server_message_status_update_destination", + "ServerMessageStatusUpdateEndedReason": ".server_message_status_update_ended_reason", + "ServerMessageStatusUpdateMessagesItem": ".server_message_status_update_messages_item", + "ServerMessageStatusUpdatePhoneNumber": ".server_message_status_update_phone_number", + "ServerMessageStatusUpdatePhoneNumber_ByoPhoneNumber": ".server_message_status_update_phone_number", + "ServerMessageStatusUpdatePhoneNumber_Telnyx": ".server_message_status_update_phone_number", + "ServerMessageStatusUpdatePhoneNumber_Twilio": ".server_message_status_update_phone_number", + "ServerMessageStatusUpdatePhoneNumber_Vapi": ".server_message_status_update_phone_number", + "ServerMessageStatusUpdatePhoneNumber_Vonage": ".server_message_status_update_phone_number", + "ServerMessageStatusUpdateStatus": ".server_message_status_update_status", + "ServerMessageStatusUpdateType": ".server_message_status_update_type", + "ServerMessageToolCalls": ".server_message_tool_calls", + "ServerMessageToolCallsPhoneNumber": ".server_message_tool_calls_phone_number", + "ServerMessageToolCallsPhoneNumber_ByoPhoneNumber": ".server_message_tool_calls_phone_number", + "ServerMessageToolCallsPhoneNumber_Telnyx": ".server_message_tool_calls_phone_number", + "ServerMessageToolCallsPhoneNumber_Twilio": ".server_message_tool_calls_phone_number", + "ServerMessageToolCallsPhoneNumber_Vapi": ".server_message_tool_calls_phone_number", + "ServerMessageToolCallsPhoneNumber_Vonage": ".server_message_tool_calls_phone_number", + "ServerMessageToolCallsToolWithToolCallListItem": ".server_message_tool_calls_tool_with_tool_call_list_item", + "ServerMessageToolCallsToolWithToolCallListItem_Bash": ".server_message_tool_calls_tool_with_tool_call_list_item", + "ServerMessageToolCallsToolWithToolCallListItem_Computer": ".server_message_tool_calls_tool_with_tool_call_list_item", + "ServerMessageToolCallsToolWithToolCallListItem_Function": ".server_message_tool_calls_tool_with_tool_call_list_item", + "ServerMessageToolCallsToolWithToolCallListItem_Ghl": ".server_message_tool_calls_tool_with_tool_call_list_item", + "ServerMessageToolCallsToolWithToolCallListItem_GoogleCalendarEventCreate": ".server_message_tool_calls_tool_with_tool_call_list_item", + "ServerMessageToolCallsToolWithToolCallListItem_Make": ".server_message_tool_calls_tool_with_tool_call_list_item", + "ServerMessageToolCallsToolWithToolCallListItem_TextEditor": ".server_message_tool_calls_tool_with_tool_call_list_item", + "ServerMessageToolCallsType": ".server_message_tool_calls_type", + "ServerMessageTranscript": ".server_message_transcript", + "ServerMessageTranscriptPhoneNumber": ".server_message_transcript_phone_number", + "ServerMessageTranscriptPhoneNumber_ByoPhoneNumber": ".server_message_transcript_phone_number", + "ServerMessageTranscriptPhoneNumber_Telnyx": ".server_message_transcript_phone_number", + "ServerMessageTranscriptPhoneNumber_Twilio": ".server_message_transcript_phone_number", + "ServerMessageTranscriptPhoneNumber_Vapi": ".server_message_transcript_phone_number", + "ServerMessageTranscriptPhoneNumber_Vonage": ".server_message_transcript_phone_number", + "ServerMessageTranscriptRole": ".server_message_transcript_role", + "ServerMessageTranscriptTranscriptType": ".server_message_transcript_transcript_type", + "ServerMessageTranscriptType": ".server_message_transcript_type", + "ServerMessageTransferDestinationRequest": ".server_message_transfer_destination_request", + "ServerMessageTransferDestinationRequestPhoneNumber": ".server_message_transfer_destination_request_phone_number", + "ServerMessageTransferDestinationRequestPhoneNumber_ByoPhoneNumber": ".server_message_transfer_destination_request_phone_number", + "ServerMessageTransferDestinationRequestPhoneNumber_Telnyx": ".server_message_transfer_destination_request_phone_number", + "ServerMessageTransferDestinationRequestPhoneNumber_Twilio": ".server_message_transfer_destination_request_phone_number", + "ServerMessageTransferDestinationRequestPhoneNumber_Vapi": ".server_message_transfer_destination_request_phone_number", + "ServerMessageTransferDestinationRequestPhoneNumber_Vonage": ".server_message_transfer_destination_request_phone_number", + "ServerMessageTransferDestinationRequestType": ".server_message_transfer_destination_request_type", + "ServerMessageTransferUpdate": ".server_message_transfer_update", + "ServerMessageTransferUpdateDestination": ".server_message_transfer_update_destination", + "ServerMessageTransferUpdateDestination_Assistant": ".server_message_transfer_update_destination", + "ServerMessageTransferUpdateDestination_Number": ".server_message_transfer_update_destination", + "ServerMessageTransferUpdateDestination_Sip": ".server_message_transfer_update_destination", + "ServerMessageTransferUpdatePhoneNumber": ".server_message_transfer_update_phone_number", + "ServerMessageTransferUpdatePhoneNumber_ByoPhoneNumber": ".server_message_transfer_update_phone_number", + "ServerMessageTransferUpdatePhoneNumber_Telnyx": ".server_message_transfer_update_phone_number", + "ServerMessageTransferUpdatePhoneNumber_Twilio": ".server_message_transfer_update_phone_number", + "ServerMessageTransferUpdatePhoneNumber_Vapi": ".server_message_transfer_update_phone_number", + "ServerMessageTransferUpdatePhoneNumber_Vonage": ".server_message_transfer_update_phone_number", + "ServerMessageTransferUpdateType": ".server_message_transfer_update_type", + "ServerMessageUserInterrupted": ".server_message_user_interrupted", + "ServerMessageUserInterruptedPhoneNumber": ".server_message_user_interrupted_phone_number", + "ServerMessageUserInterruptedPhoneNumber_ByoPhoneNumber": ".server_message_user_interrupted_phone_number", + "ServerMessageUserInterruptedPhoneNumber_Telnyx": ".server_message_user_interrupted_phone_number", + "ServerMessageUserInterruptedPhoneNumber_Twilio": ".server_message_user_interrupted_phone_number", + "ServerMessageUserInterruptedPhoneNumber_Vapi": ".server_message_user_interrupted_phone_number", + "ServerMessageUserInterruptedPhoneNumber_Vonage": ".server_message_user_interrupted_phone_number", + "ServerMessageUserInterruptedType": ".server_message_user_interrupted_type", + "ServerMessageVoiceInput": ".server_message_voice_input", + "ServerMessageVoiceInputPhoneNumber": ".server_message_voice_input_phone_number", + "ServerMessageVoiceInputPhoneNumber_ByoPhoneNumber": ".server_message_voice_input_phone_number", + "ServerMessageVoiceInputPhoneNumber_Telnyx": ".server_message_voice_input_phone_number", + "ServerMessageVoiceInputPhoneNumber_Twilio": ".server_message_voice_input_phone_number", + "ServerMessageVoiceInputPhoneNumber_Vapi": ".server_message_voice_input_phone_number", + "ServerMessageVoiceInputPhoneNumber_Vonage": ".server_message_voice_input_phone_number", + "ServerMessageVoiceInputType": ".server_message_voice_input_type", + "ServerMessageVoiceRequest": ".server_message_voice_request", + "ServerMessageVoiceRequestPhoneNumber": ".server_message_voice_request_phone_number", + "ServerMessageVoiceRequestPhoneNumber_ByoPhoneNumber": ".server_message_voice_request_phone_number", + "ServerMessageVoiceRequestPhoneNumber_Telnyx": ".server_message_voice_request_phone_number", + "ServerMessageVoiceRequestPhoneNumber_Twilio": ".server_message_voice_request_phone_number", + "ServerMessageVoiceRequestPhoneNumber_Vapi": ".server_message_voice_request_phone_number", + "ServerMessageVoiceRequestPhoneNumber_Vonage": ".server_message_voice_request_phone_number", + "ServerMessageVoiceRequestType": ".server_message_voice_request_type", + "SesameVoice": ".sesame_voice", + "SesameVoiceModel": ".sesame_voice_model", + "Session": ".session", + "SessionCost": ".session_cost", + "SessionCostsItem": ".session_costs_item", + "SessionCostsItem_Analysis": ".session_costs_item", + "SessionCostsItem_Model": ".session_costs_item", + "SessionCostsItem_Session": ".session_costs_item", + "SessionCreatedHook": ".session_created_hook", + "SessionCreatedHookOn": ".session_created_hook_on", + "SessionMessagesItem": ".session_messages_item", + "SessionPaginatedResponse": ".session_paginated_response", + "SessionStatus": ".session_status", + "Simulation": ".simulation", + "SimulationConcurrencyResponse": ".simulation_concurrency_response", + "SimulationHookCallEnded": ".simulation_hook_call_ended", + "SimulationHookCallStarted": ".simulation_hook_call_started", + "SimulationHookInclude": ".simulation_hook_include", + "SimulationHookWebhookAction": ".simulation_hook_webhook_action", + "SimulationHookWebhookActionType": ".simulation_hook_webhook_action_type", + "SimulationRun": ".simulation_run", + "SimulationRunConfiguration": ".simulation_run_configuration", + "SimulationRunItem": ".simulation_run_item", + "SimulationRunItemCallMetadata": ".simulation_run_item_call_metadata", + "SimulationRunItemCallMonitor": ".simulation_run_item_call_monitor", + "SimulationRunItemCounts": ".simulation_run_item_counts", + "SimulationRunItemHooksItem": ".simulation_run_item_hooks_item", + "SimulationRunItemHooksItem_SimulationRunEnded": ".simulation_run_item_hooks_item", + "SimulationRunItemHooksItem_SimulationRunStarted": ".simulation_run_item_hooks_item", + "SimulationRunItemImprovementSuggestion": ".simulation_run_item_improvement_suggestion", + "SimulationRunItemImprovements": ".simulation_run_item_improvements", + "SimulationRunItemMetadata": ".simulation_run_item_metadata", + "SimulationRunItemResults": ".simulation_run_item_results", + "SimulationRunItemStatus": ".simulation_run_item_status", + "SimulationRunSimulationEntry": ".simulation_run_simulation_entry", + "SimulationRunSimulationsItem": ".simulation_run_simulations_item", + "SimulationRunSimulationsItem_Simulation": ".simulation_run_simulations_item", + "SimulationRunSimulationsItem_SimulationSuite": ".simulation_run_simulations_item", + "SimulationRunStatus": ".simulation_run_status", + "SimulationRunSuiteEntry": ".simulation_run_suite_entry", + "SimulationRunTarget": ".simulation_run_target", + "SimulationRunTargetAssistant": ".simulation_run_target_assistant", + "SimulationRunTargetSquad": ".simulation_run_target_squad", + "SimulationRunTarget_Assistant": ".simulation_run_target", + "SimulationRunTarget_Squad": ".simulation_run_target", + "SimulationRunTransportConfiguration": ".simulation_run_transport_configuration", + "SimulationRunTransportConfigurationProvider": ".simulation_run_transport_configuration_provider", + "SimulationSuite": ".simulation_suite", + "SipAuthentication": ".sip_authentication", + "SipRequestTool": ".sip_request_tool", + "SipRequestToolBody": ".sip_request_tool_body", + "SipRequestToolMessagesItem": ".sip_request_tool_messages_item", + "SipRequestToolMessagesItem_RequestComplete": ".sip_request_tool_messages_item", + "SipRequestToolMessagesItem_RequestFailed": ".sip_request_tool_messages_item", + "SipRequestToolMessagesItem_RequestResponseDelayed": ".sip_request_tool_messages_item", + "SipRequestToolMessagesItem_RequestStart": ".sip_request_tool_messages_item", + "SipRequestToolVerb": ".sip_request_tool_verb", + "SipTrunkGateway": ".sip_trunk_gateway", + "SipTrunkGatewayOutboundProtocol": ".sip_trunk_gateway_outbound_protocol", + "SipTrunkOutboundAuthenticationPlan": ".sip_trunk_outbound_authentication_plan", + "SipTrunkOutboundSipRegisterPlan": ".sip_trunk_outbound_sip_register_plan", + "SlackOAuth2AuthorizationCredential": ".slack_o_auth_2_authorization_credential", + "SlackOAuth2AuthorizationCredentialProvider": ".slack_o_auth_2_authorization_credential_provider", + "SlackSendMessageTool": ".slack_send_message_tool", + "SlackSendMessageToolMessagesItem": ".slack_send_message_tool_messages_item", + "SlackSendMessageToolMessagesItem_RequestComplete": ".slack_send_message_tool_messages_item", + "SlackSendMessageToolMessagesItem_RequestFailed": ".slack_send_message_tool_messages_item", + "SlackSendMessageToolMessagesItem_RequestResponseDelayed": ".slack_send_message_tool_messages_item", + "SlackSendMessageToolMessagesItem_RequestStart": ".slack_send_message_tool_messages_item", + "SlackWebhookCredential": ".slack_webhook_credential", + "SlackWebhookCredentialProvider": ".slack_webhook_credential_provider", + "SmallestAiCredential": ".smallest_ai_credential", + "SmallestAiCredentialProvider": ".smallest_ai_credential_provider", + "SmallestAiVoice": ".smallest_ai_voice", + "SmallestAiVoiceId": ".smallest_ai_voice_id", + "SmallestAiVoiceIdEnum": ".smallest_ai_voice_id_enum", + "SmallestAiVoiceModel": ".smallest_ai_voice_model", + "SmartDenoisingPlan": ".smart_denoising_plan", + "SmsTool": ".sms_tool", + "SmsToolMessagesItem": ".sms_tool_messages_item", + "SmsToolMessagesItem_RequestComplete": ".sms_tool_messages_item", + "SmsToolMessagesItem_RequestFailed": ".sms_tool_messages_item", + "SmsToolMessagesItem_RequestResponseDelayed": ".sms_tool_messages_item", + "SmsToolMessagesItem_RequestStart": ".sms_tool_messages_item", + "SonioxCredential": ".soniox_credential", + "SonioxCredentialProvider": ".soniox_credential_provider", + "SonioxTranscriber": ".soniox_transcriber", + "SonioxTranscriberLanguage": ".soniox_transcriber_language", + "SonioxTranscriberModel": ".soniox_transcriber_model", + "SpeechmaticsCredential": ".speechmatics_credential", + "SpeechmaticsCredentialProvider": ".speechmatics_credential_provider", + "SpeechmaticsCustomVocabularyItem": ".speechmatics_custom_vocabulary_item", + "SpeechmaticsTranscriber": ".speechmatics_transcriber", + "SpeechmaticsTranscriberLanguage": ".speechmatics_transcriber_language", + "SpeechmaticsTranscriberModel": ".speechmatics_transcriber_model", + "SpeechmaticsTranscriberNumeralStyle": ".speechmatics_transcriber_numeral_style", + "SpeechmaticsTranscriberOperatingPoint": ".speechmatics_transcriber_operating_point", + "SpeechmaticsTranscriberRegion": ".speechmatics_transcriber_region", + "SpkiPemPublicKeyConfig": ".spki_pem_public_key_config", + "SqlInjectionSecurityFilter": ".sql_injection_security_filter", + "SqlInjectionSecurityFilterType": ".sql_injection_security_filter_type", + "Squad": ".squad", + "SquadMemberDto": ".squad_member_dto", + "SquadMemberDtoAssistantDestinationsItem": ".squad_member_dto_assistant_destinations_item", + "SsrfSecurityFilter": ".ssrf_security_filter", + "SsrfSecurityFilterType": ".ssrf_security_filter_type", + "StartSpeakingPlan": ".start_speaking_plan", + "StartSpeakingPlanCustomEndpointingRulesItem": ".start_speaking_plan_custom_endpointing_rules_item", + "StartSpeakingPlanCustomEndpointingRulesItem_Assistant": ".start_speaking_plan_custom_endpointing_rules_item", + "StartSpeakingPlanCustomEndpointingRulesItem_Both": ".start_speaking_plan_custom_endpointing_rules_item", + "StartSpeakingPlanCustomEndpointingRulesItem_Customer": ".start_speaking_plan_custom_endpointing_rules_item", + "StartSpeakingPlanSmartEndpointingEnabled": ".start_speaking_plan_smart_endpointing_enabled", + "StartSpeakingPlanSmartEndpointingEnabledOne": ".start_speaking_plan_smart_endpointing_enabled_one", + "StartSpeakingPlanSmartEndpointingPlan": ".start_speaking_plan_smart_endpointing_plan", + "StopSpeakingPlan": ".stop_speaking_plan", + "StructuredDataMultiPlan": ".structured_data_multi_plan", + "StructuredDataPlan": ".structured_data_plan", + "StructuredOutput": ".structured_output", + "StructuredOutputEvaluationResult": ".structured_output_evaluation_result", + "StructuredOutputEvaluationResultComparator": ".structured_output_evaluation_result_comparator", + "StructuredOutputEvaluationResultExpectedValue": ".structured_output_evaluation_result_expected_value", + "StructuredOutputEvaluationResultExtractedValue": ".structured_output_evaluation_result_extracted_value", + "StructuredOutputFilterDto": ".structured_output_filter_dto", + "StructuredOutputModel": ".structured_output_model", + "StructuredOutputModel_Anthropic": ".structured_output_model", + "StructuredOutputModel_AnthropicBedrock": ".structured_output_model", + "StructuredOutputModel_CustomLlm": ".structured_output_model", + "StructuredOutputModel_Google": ".structured_output_model", + "StructuredOutputModel_Openai": ".structured_output_model", + "StructuredOutputPaginatedResponse": ".structured_output_paginated_response", + "StructuredOutputType": ".structured_output_type", + "Subscription": ".subscription", + "SubscriptionLimits": ".subscription_limits", + "SubscriptionMinutesIncludedResetFrequency": ".subscription_minutes_included_reset_frequency", + "SubscriptionStatus": ".subscription_status", + "SubscriptionType": ".subscription_type", + "SuccessEvaluationPlan": ".success_evaluation_plan", + "SuccessEvaluationPlanRubric": ".success_evaluation_plan_rubric", + "SummaryPlan": ".summary_plan", + "SupabaseBucketPlan": ".supabase_bucket_plan", + "SupabaseBucketPlanRegion": ".supabase_bucket_plan_region", + "SupabaseCredential": ".supabase_credential", + "SupabaseCredentialProvider": ".supabase_credential_provider", + "SyncVoiceLibraryDto": ".sync_voice_library_dto", + "SyncVoiceLibraryDtoProvidersItem": ".sync_voice_library_dto_providers_item", + "SystemMessage": ".system_message", + "TalkscriberTranscriber": ".talkscriber_transcriber", + "TalkscriberTranscriberLanguage": ".talkscriber_transcriber_language", + "TalkscriberTranscriberModel": ".talkscriber_transcriber_model", + "TargetPlan": ".target_plan", + "TavusConversationProperties": ".tavus_conversation_properties", + "TavusCredential": ".tavus_credential", + "TavusCredentialProvider": ".tavus_credential_provider", + "TavusVoice": ".tavus_voice", + "TavusVoiceVoiceId": ".tavus_voice_voice_id", + "TavusVoiceVoiceIdZero": ".tavus_voice_voice_id_zero", + "TelnyxPhoneNumber": ".telnyx_phone_number", + "TelnyxPhoneNumberFallbackDestination": ".telnyx_phone_number_fallback_destination", + "TelnyxPhoneNumberFallbackDestination_Number": ".telnyx_phone_number_fallback_destination", + "TelnyxPhoneNumberFallbackDestination_Sip": ".telnyx_phone_number_fallback_destination", + "TelnyxPhoneNumberHooksItem": ".telnyx_phone_number_hooks_item", + "TelnyxPhoneNumberHooksItem_CallEnding": ".telnyx_phone_number_hooks_item", + "TelnyxPhoneNumberHooksItem_CallRinging": ".telnyx_phone_number_hooks_item", + "TelnyxPhoneNumberStatus": ".telnyx_phone_number_status", + "Template": ".template", + "TemplateDetails": ".template_details", + "TemplateDetails_ApiRequest": ".template_details", + "TemplateDetails_Bash": ".template_details", + "TemplateDetails_Code": ".template_details", + "TemplateDetails_Computer": ".template_details", + "TemplateDetails_Dtmf": ".template_details", + "TemplateDetails_EndCall": ".template_details", + "TemplateDetails_Function": ".template_details", + "TemplateDetails_GohighlevelCalendarAvailabilityCheck": ".template_details", + "TemplateDetails_GohighlevelCalendarEventCreate": ".template_details", + "TemplateDetails_GohighlevelContactCreate": ".template_details", + "TemplateDetails_GohighlevelContactGet": ".template_details", + "TemplateDetails_GoogleCalendarAvailabilityCheck": ".template_details", + "TemplateDetails_GoogleCalendarEventCreate": ".template_details", + "TemplateDetails_GoogleSheetsRowAppend": ".template_details", + "TemplateDetails_Handoff": ".template_details", + "TemplateDetails_Mcp": ".template_details", + "TemplateDetails_Query": ".template_details", + "TemplateDetails_SipRequest": ".template_details", + "TemplateDetails_SlackMessageSend": ".template_details", + "TemplateDetails_Sms": ".template_details", + "TemplateDetails_TextEditor": ".template_details", + "TemplateDetails_TransferCall": ".template_details", + "TemplateDetails_Voicemail": ".template_details", + "TemplateProvider": ".template_provider", + "TemplateProviderDetails": ".template_provider_details", + "TemplateProviderDetails_Function": ".template_provider_details", + "TemplateProviderDetails_Ghl": ".template_provider_details", + "TemplateProviderDetails_GohighlevelCalendarAvailabilityCheck": ".template_provider_details", + "TemplateProviderDetails_GohighlevelCalendarEventCreate": ".template_provider_details", + "TemplateProviderDetails_GohighlevelContactCreate": ".template_provider_details", + "TemplateProviderDetails_GohighlevelContactGet": ".template_provider_details", + "TemplateProviderDetails_GoogleCalendarEventCreate": ".template_provider_details", + "TemplateProviderDetails_GoogleSheetsRowAppend": ".template_provider_details", + "TemplateProviderDetails_Make": ".template_provider_details", + "TemplateType": ".template_type", + "TemplateVisibility": ".template_visibility", + "TestSuite": ".test_suite", + "TestSuitePhoneNumber": ".test_suite_phone_number", + "TestSuitePhoneNumberProvider": ".test_suite_phone_number_provider", + "TestSuiteRun": ".test_suite_run", + "TestSuiteRunScorerAi": ".test_suite_run_scorer_ai", + "TestSuiteRunScorerAiResult": ".test_suite_run_scorer_ai_result", + "TestSuiteRunScorerAiType": ".test_suite_run_scorer_ai_type", + "TestSuiteRunStatus": ".test_suite_run_status", + "TestSuiteRunTestAttempt": ".test_suite_run_test_attempt", + "TestSuiteRunTestAttemptCall": ".test_suite_run_test_attempt_call", + "TestSuiteRunTestAttemptMetadata": ".test_suite_run_test_attempt_metadata", + "TestSuiteRunTestResult": ".test_suite_run_test_result", + "TestSuiteRunsPaginatedResponse": ".test_suite_runs_paginated_response", + "TestSuiteTestChat": ".test_suite_test_chat", + "TestSuiteTestScorerAi": ".test_suite_test_scorer_ai", + "TestSuiteTestScorerAiType": ".test_suite_test_scorer_ai_type", + "TestSuiteTestVoice": ".test_suite_test_voice", + "TestSuiteTestVoiceType": ".test_suite_test_voice_type", + "TestSuiteTestsPaginatedResponse": ".test_suite_tests_paginated_response", + "TestSuiteTestsPaginatedResponseResultsItem": ".test_suite_tests_paginated_response_results_item", + "TestSuiteTestsPaginatedResponseResultsItem_Chat": ".test_suite_tests_paginated_response_results_item", + "TestSuiteTestsPaginatedResponseResultsItem_Voice": ".test_suite_tests_paginated_response_results_item", + "TestSuitesPaginatedResponse": ".test_suites_paginated_response", + "TesterPlan": ".tester_plan", + "TextContent": ".text_content", + "TextContentLanguage": ".text_content_language", + "TextContentType": ".text_content_type", + "TextEditorTool": ".text_editor_tool", + "TextEditorToolMessagesItem": ".text_editor_tool_messages_item", + "TextEditorToolMessagesItem_RequestComplete": ".text_editor_tool_messages_item", + "TextEditorToolMessagesItem_RequestFailed": ".text_editor_tool_messages_item", + "TextEditorToolMessagesItem_RequestResponseDelayed": ".text_editor_tool_messages_item", + "TextEditorToolMessagesItem_RequestStart": ".text_editor_tool_messages_item", + "TextEditorToolName": ".text_editor_tool_name", + "TextEditorToolSubType": ".text_editor_tool_sub_type", + "TextEditorToolWithToolCall": ".text_editor_tool_with_tool_call", + "TextEditorToolWithToolCallMessagesItem": ".text_editor_tool_with_tool_call_messages_item", + "TextEditorToolWithToolCallMessagesItem_RequestComplete": ".text_editor_tool_with_tool_call_messages_item", + "TextEditorToolWithToolCallMessagesItem_RequestFailed": ".text_editor_tool_with_tool_call_messages_item", + "TextEditorToolWithToolCallMessagesItem_RequestResponseDelayed": ".text_editor_tool_with_tool_call_messages_item", + "TextEditorToolWithToolCallMessagesItem_RequestStart": ".text_editor_tool_with_tool_call_messages_item", + "TextEditorToolWithToolCallName": ".text_editor_tool_with_tool_call_name", + "TextEditorToolWithToolCallSubType": ".text_editor_tool_with_tool_call_sub_type", + "TextInsight": ".text_insight", + "TextInsightFromCallTable": ".text_insight_from_call_table", + "TextInsightFromCallTableQueriesItem": ".text_insight_from_call_table_queries_item", + "TextInsightFromCallTableType": ".text_insight_from_call_table_type", + "TextInsightQueriesItem": ".text_insight_queries_item", + "TimeRange": ".time_range", + "TimeRangeStep": ".time_range_step", + "TogetherAiCredential": ".together_ai_credential", + "TogetherAiCredentialProvider": ".together_ai_credential_provider", + "TogetherAiModel": ".together_ai_model", + "TogetherAiModelToolsItem": ".together_ai_model_tools_item", + "TogetherAiModelToolsItem_ApiRequest": ".together_ai_model_tools_item", + "TogetherAiModelToolsItem_Bash": ".together_ai_model_tools_item", + "TogetherAiModelToolsItem_Code": ".together_ai_model_tools_item", + "TogetherAiModelToolsItem_Computer": ".together_ai_model_tools_item", + "TogetherAiModelToolsItem_Dtmf": ".together_ai_model_tools_item", + "TogetherAiModelToolsItem_EndCall": ".together_ai_model_tools_item", + "TogetherAiModelToolsItem_Function": ".together_ai_model_tools_item", + "TogetherAiModelToolsItem_GohighlevelCalendarAvailabilityCheck": ".together_ai_model_tools_item", + "TogetherAiModelToolsItem_GohighlevelCalendarEventCreate": ".together_ai_model_tools_item", + "TogetherAiModelToolsItem_GohighlevelContactCreate": ".together_ai_model_tools_item", + "TogetherAiModelToolsItem_GohighlevelContactGet": ".together_ai_model_tools_item", + "TogetherAiModelToolsItem_GoogleCalendarAvailabilityCheck": ".together_ai_model_tools_item", + "TogetherAiModelToolsItem_GoogleCalendarEventCreate": ".together_ai_model_tools_item", + "TogetherAiModelToolsItem_GoogleSheetsRowAppend": ".together_ai_model_tools_item", + "TogetherAiModelToolsItem_Handoff": ".together_ai_model_tools_item", + "TogetherAiModelToolsItem_Mcp": ".together_ai_model_tools_item", + "TogetherAiModelToolsItem_Query": ".together_ai_model_tools_item", + "TogetherAiModelToolsItem_SipRequest": ".together_ai_model_tools_item", + "TogetherAiModelToolsItem_SlackMessageSend": ".together_ai_model_tools_item", + "TogetherAiModelToolsItem_Sms": ".together_ai_model_tools_item", + "TogetherAiModelToolsItem_TextEditor": ".together_ai_model_tools_item", + "TogetherAiModelToolsItem_TransferCall": ".together_ai_model_tools_item", + "TogetherAiModelToolsItem_Voicemail": ".together_ai_model_tools_item", + "Token": ".token", + "TokenRestrictions": ".token_restrictions", + "TokenTag": ".token_tag", + "ToolCall": ".tool_call", + "ToolCallFunction": ".tool_call_function", + "ToolCallHookAction": ".tool_call_hook_action", + "ToolCallHookActionTool": ".tool_call_hook_action_tool", + "ToolCallHookActionTool_ApiRequest": ".tool_call_hook_action_tool", + "ToolCallHookActionTool_Bash": ".tool_call_hook_action_tool", + "ToolCallHookActionTool_Code": ".tool_call_hook_action_tool", + "ToolCallHookActionTool_Computer": ".tool_call_hook_action_tool", + "ToolCallHookActionTool_Dtmf": ".tool_call_hook_action_tool", + "ToolCallHookActionTool_EndCall": ".tool_call_hook_action_tool", + "ToolCallHookActionTool_Function": ".tool_call_hook_action_tool", + "ToolCallHookActionTool_GohighlevelCalendarAvailabilityCheck": ".tool_call_hook_action_tool", + "ToolCallHookActionTool_GohighlevelCalendarEventCreate": ".tool_call_hook_action_tool", + "ToolCallHookActionTool_GohighlevelContactCreate": ".tool_call_hook_action_tool", + "ToolCallHookActionTool_GohighlevelContactGet": ".tool_call_hook_action_tool", + "ToolCallHookActionTool_GoogleCalendarAvailabilityCheck": ".tool_call_hook_action_tool", + "ToolCallHookActionTool_GoogleCalendarEventCreate": ".tool_call_hook_action_tool", + "ToolCallHookActionTool_GoogleSheetsRowAppend": ".tool_call_hook_action_tool", + "ToolCallHookActionTool_Handoff": ".tool_call_hook_action_tool", + "ToolCallHookActionTool_Mcp": ".tool_call_hook_action_tool", + "ToolCallHookActionTool_Query": ".tool_call_hook_action_tool", + "ToolCallHookActionTool_SipRequest": ".tool_call_hook_action_tool", + "ToolCallHookActionTool_SlackMessageSend": ".tool_call_hook_action_tool", + "ToolCallHookActionTool_Sms": ".tool_call_hook_action_tool", + "ToolCallHookActionTool_TextEditor": ".tool_call_hook_action_tool", + "ToolCallHookActionTool_TransferCall": ".tool_call_hook_action_tool", + "ToolCallHookActionTool_Voicemail": ".tool_call_hook_action_tool", + "ToolCallHookActionType": ".tool_call_hook_action_type", + "ToolCallMessage": ".tool_call_message", + "ToolCallResult": ".tool_call_result", + "ToolCallResultMessage": ".tool_call_result_message", + "ToolMessage": ".tool_message", + "ToolMessageComplete": ".tool_message_complete", + "ToolMessageCompleteRole": ".tool_message_complete_role", + "ToolMessageDelayed": ".tool_message_delayed", + "ToolMessageFailed": ".tool_message_failed", + "ToolMessageRole": ".tool_message_role", + "ToolMessageStart": ".tool_message_start", + "ToolNode": ".tool_node", + "ToolNodeTool": ".tool_node_tool", + "ToolNodeTool_ApiRequest": ".tool_node_tool", + "ToolNodeTool_Bash": ".tool_node_tool", + "ToolNodeTool_Code": ".tool_node_tool", + "ToolNodeTool_Computer": ".tool_node_tool", + "ToolNodeTool_Dtmf": ".tool_node_tool", + "ToolNodeTool_EndCall": ".tool_node_tool", + "ToolNodeTool_Function": ".tool_node_tool", + "ToolNodeTool_GohighlevelCalendarAvailabilityCheck": ".tool_node_tool", + "ToolNodeTool_GohighlevelCalendarEventCreate": ".tool_node_tool", + "ToolNodeTool_GohighlevelContactCreate": ".tool_node_tool", + "ToolNodeTool_GohighlevelContactGet": ".tool_node_tool", + "ToolNodeTool_GoogleCalendarAvailabilityCheck": ".tool_node_tool", + "ToolNodeTool_GoogleCalendarEventCreate": ".tool_node_tool", + "ToolNodeTool_GoogleSheetsRowAppend": ".tool_node_tool", + "ToolNodeTool_Handoff": ".tool_node_tool", + "ToolNodeTool_Mcp": ".tool_node_tool", + "ToolNodeTool_Query": ".tool_node_tool", + "ToolNodeTool_SipRequest": ".tool_node_tool", + "ToolNodeTool_SlackMessageSend": ".tool_node_tool", + "ToolNodeTool_Sms": ".tool_node_tool", + "ToolNodeTool_TextEditor": ".tool_node_tool", + "ToolNodeTool_TransferCall": ".tool_node_tool", + "ToolNodeTool_Voicemail": ".tool_node_tool", + "ToolParameter": ".tool_parameter", + "ToolParameterValue": ".tool_parameter_value", + "ToolRejectionPlan": ".tool_rejection_plan", + "ToolRejectionPlanConditionsItem": ".tool_rejection_plan_conditions_item", + "ToolRejectionPlanConditionsItem_Group": ".tool_rejection_plan_conditions_item", + "ToolRejectionPlanConditionsItem_Liquid": ".tool_rejection_plan_conditions_item", + "ToolRejectionPlanConditionsItem_Regex": ".tool_rejection_plan_conditions_item", + "ToolTemplateMetadata": ".tool_template_metadata", + "ToolTemplateSetup": ".tool_template_setup", + "TranscriberCost": ".transcriber_cost", + "TranscriptPlan": ".transcript_plan", + "TranscriptionEndpointingPlan": ".transcription_endpointing_plan", + "TransferAssistant": ".transfer_assistant", + "TransferAssistantBackgroundSound": ".transfer_assistant_background_sound", + "TransferAssistantBackgroundSoundZero": ".transfer_assistant_background_sound_zero", + "TransferAssistantFirstMessageMode": ".transfer_assistant_first_message_mode", + "TransferAssistantHookAction": ".transfer_assistant_hook_action", + "TransferAssistantModel": ".transfer_assistant_model", + "TransferAssistantModelProvider": ".transfer_assistant_model_provider", + "TransferAssistantTranscriber": ".transfer_assistant_transcriber", + "TransferAssistantTranscriber_11Labs": ".transfer_assistant_transcriber", + "TransferAssistantTranscriber_AssemblyAi": ".transfer_assistant_transcriber", + "TransferAssistantTranscriber_Azure": ".transfer_assistant_transcriber", + "TransferAssistantTranscriber_Cartesia": ".transfer_assistant_transcriber", + "TransferAssistantTranscriber_CustomTranscriber": ".transfer_assistant_transcriber", + "TransferAssistantTranscriber_Deepgram": ".transfer_assistant_transcriber", + "TransferAssistantTranscriber_Gladia": ".transfer_assistant_transcriber", + "TransferAssistantTranscriber_Google": ".transfer_assistant_transcriber", + "TransferAssistantTranscriber_Openai": ".transfer_assistant_transcriber", + "TransferAssistantTranscriber_Soniox": ".transfer_assistant_transcriber", + "TransferAssistantTranscriber_Speechmatics": ".transfer_assistant_transcriber", + "TransferAssistantTranscriber_Talkscriber": ".transfer_assistant_transcriber", + "TransferAssistantVoice": ".transfer_assistant_voice", + "TransferAssistantVoice_11Labs": ".transfer_assistant_voice", + "TransferAssistantVoice_Azure": ".transfer_assistant_voice", + "TransferAssistantVoice_Cartesia": ".transfer_assistant_voice", + "TransferAssistantVoice_CustomVoice": ".transfer_assistant_voice", + "TransferAssistantVoice_Deepgram": ".transfer_assistant_voice", + "TransferAssistantVoice_Hume": ".transfer_assistant_voice", + "TransferAssistantVoice_Inworld": ".transfer_assistant_voice", + "TransferAssistantVoice_Lmnt": ".transfer_assistant_voice", + "TransferAssistantVoice_Minimax": ".transfer_assistant_voice", + "TransferAssistantVoice_Neuphonic": ".transfer_assistant_voice", + "TransferAssistantVoice_Openai": ".transfer_assistant_voice", + "TransferAssistantVoice_Playht": ".transfer_assistant_voice", + "TransferAssistantVoice_RimeAi": ".transfer_assistant_voice", + "TransferAssistantVoice_Sesame": ".transfer_assistant_voice", + "TransferAssistantVoice_SmallestAi": ".transfer_assistant_voice", + "TransferAssistantVoice_Tavus": ".transfer_assistant_voice", + "TransferAssistantVoice_Vapi": ".transfer_assistant_voice", + "TransferAssistantVoice_Wellsaid": ".transfer_assistant_voice", + "TransferCallTool": ".transfer_call_tool", + "TransferCallToolDestinationsItem": ".transfer_call_tool_destinations_item", + "TransferCallToolDestinationsItem_Assistant": ".transfer_call_tool_destinations_item", + "TransferCallToolDestinationsItem_Number": ".transfer_call_tool_destinations_item", + "TransferCallToolDestinationsItem_Sip": ".transfer_call_tool_destinations_item", + "TransferCallToolMessagesItem": ".transfer_call_tool_messages_item", + "TransferCallToolMessagesItem_RequestComplete": ".transfer_call_tool_messages_item", + "TransferCallToolMessagesItem_RequestFailed": ".transfer_call_tool_messages_item", + "TransferCallToolMessagesItem_RequestResponseDelayed": ".transfer_call_tool_messages_item", + "TransferCallToolMessagesItem_RequestStart": ".transfer_call_tool_messages_item", + "TransferCancelToolUserEditable": ".transfer_cancel_tool_user_editable", + "TransferCancelToolUserEditableMessagesItem": ".transfer_cancel_tool_user_editable_messages_item", + "TransferCancelToolUserEditableMessagesItem_RequestComplete": ".transfer_cancel_tool_user_editable_messages_item", + "TransferCancelToolUserEditableMessagesItem_RequestFailed": ".transfer_cancel_tool_user_editable_messages_item", + "TransferCancelToolUserEditableMessagesItem_RequestResponseDelayed": ".transfer_cancel_tool_user_editable_messages_item", + "TransferCancelToolUserEditableMessagesItem_RequestStart": ".transfer_cancel_tool_user_editable_messages_item", + "TransferCancelToolUserEditableType": ".transfer_cancel_tool_user_editable_type", + "TransferDestinationAssistant": ".transfer_destination_assistant", + "TransferDestinationAssistantMessage": ".transfer_destination_assistant_message", + "TransferDestinationAssistantType": ".transfer_destination_assistant_type", + "TransferDestinationNumber": ".transfer_destination_number", + "TransferDestinationNumberMessage": ".transfer_destination_number_message", + "TransferDestinationSip": ".transfer_destination_sip", + "TransferDestinationSipMessage": ".transfer_destination_sip_message", + "TransferFallbackPlan": ".transfer_fallback_plan", + "TransferFallbackPlanMessage": ".transfer_fallback_plan_message", + "TransferHookAction": ".transfer_hook_action", + "TransferHookActionDestination": ".transfer_hook_action_destination", + "TransferHookActionDestination_Number": ".transfer_hook_action_destination", + "TransferHookActionDestination_Sip": ".transfer_hook_action_destination", + "TransferHookActionType": ".transfer_hook_action_type", + "TransferMode": ".transfer_mode", + "TransferPhoneNumberHookAction": ".transfer_phone_number_hook_action", + "TransferPhoneNumberHookActionDestination": ".transfer_phone_number_hook_action_destination", + "TransferPhoneNumberHookActionDestination_Number": ".transfer_phone_number_hook_action_destination", + "TransferPhoneNumberHookActionDestination_Sip": ".transfer_phone_number_hook_action_destination", + "TransferPlan": ".transfer_plan", + "TransferPlanContextEngineeringPlan": ".transfer_plan_context_engineering_plan", + "TransferPlanContextEngineeringPlan_All": ".transfer_plan_context_engineering_plan", + "TransferPlanContextEngineeringPlan_LastNMessages": ".transfer_plan_context_engineering_plan", + "TransferPlanContextEngineeringPlan_None": ".transfer_plan_context_engineering_plan", + "TransferPlanMessage": ".transfer_plan_message", + "TransferPlanMode": ".transfer_plan_mode", + "TransferSuccessfulToolUserEditable": ".transfer_successful_tool_user_editable", + "TransferSuccessfulToolUserEditableMessagesItem": ".transfer_successful_tool_user_editable_messages_item", + "TransferSuccessfulToolUserEditableMessagesItem_RequestComplete": ".transfer_successful_tool_user_editable_messages_item", + "TransferSuccessfulToolUserEditableMessagesItem_RequestFailed": ".transfer_successful_tool_user_editable_messages_item", + "TransferSuccessfulToolUserEditableMessagesItem_RequestResponseDelayed": ".transfer_successful_tool_user_editable_messages_item", + "TransferSuccessfulToolUserEditableMessagesItem_RequestStart": ".transfer_successful_tool_user_editable_messages_item", + "TransferSuccessfulToolUserEditableType": ".transfer_successful_tool_user_editable_type", + "TransportConfigurationTwilio": ".transport_configuration_twilio", + "TransportConfigurationTwilioProvider": ".transport_configuration_twilio_provider", + "TransportConfigurationTwilioRecordingChannels": ".transport_configuration_twilio_recording_channels", + "TransportCost": ".transport_cost", + "TransportCostProvider": ".transport_cost_provider", + "TrieveCredential": ".trieve_credential", + "TrieveCredentialProvider": ".trieve_credential_provider", + "TrieveKnowledgeBase": ".trieve_knowledge_base", + "TrieveKnowledgeBaseChunkPlan": ".trieve_knowledge_base_chunk_plan", + "TrieveKnowledgeBaseCreate": ".trieve_knowledge_base_create", + "TrieveKnowledgeBaseCreateType": ".trieve_knowledge_base_create_type", + "TrieveKnowledgeBaseImport": ".trieve_knowledge_base_import", + "TrieveKnowledgeBaseImportType": ".trieve_knowledge_base_import_type", + "TrieveKnowledgeBaseProvider": ".trieve_knowledge_base_provider", + "TrieveKnowledgeBaseSearchPlan": ".trieve_knowledge_base_search_plan", + "TrieveKnowledgeBaseSearchPlanSearchType": ".trieve_knowledge_base_search_plan_search_type", + "TurnLatency": ".turn_latency", + "TwilioCredential": ".twilio_credential", + "TwilioCredentialProvider": ".twilio_credential_provider", + "TwilioPhoneNumber": ".twilio_phone_number", + "TwilioPhoneNumberFallbackDestination": ".twilio_phone_number_fallback_destination", + "TwilioPhoneNumberFallbackDestination_Number": ".twilio_phone_number_fallback_destination", + "TwilioPhoneNumberFallbackDestination_Sip": ".twilio_phone_number_fallback_destination", + "TwilioPhoneNumberHooksItem": ".twilio_phone_number_hooks_item", + "TwilioPhoneNumberHooksItem_CallEnding": ".twilio_phone_number_hooks_item", + "TwilioPhoneNumberHooksItem_CallRinging": ".twilio_phone_number_hooks_item", + "TwilioPhoneNumberStatus": ".twilio_phone_number_status", + "TwilioSmsChatTransport": ".twilio_sms_chat_transport", + "TwilioSmsChatTransportConversationType": ".twilio_sms_chat_transport_conversation_type", + "TwilioSmsChatTransportType": ".twilio_sms_chat_transport_type", + "TwilioTransportMessage": ".twilio_transport_message", + "TwilioVoicemailDetectionPlan": ".twilio_voicemail_detection_plan", + "TwilioVoicemailDetectionPlanProvider": ".twilio_voicemail_detection_plan_provider", + "TwilioVoicemailDetectionPlanVoicemailDetectionTypesItem": ".twilio_voicemail_detection_plan_voicemail_detection_types_item", + "UpdateAnthropicBedrockCredentialDto": ".update_anthropic_bedrock_credential_dto", + "UpdateAnthropicBedrockCredentialDtoAuthenticationPlan": ".update_anthropic_bedrock_credential_dto_authentication_plan", + "UpdateAnthropicBedrockCredentialDtoAuthenticationPlan_AwsIam": ".update_anthropic_bedrock_credential_dto_authentication_plan", + "UpdateAnthropicBedrockCredentialDtoAuthenticationPlan_AwsSts": ".update_anthropic_bedrock_credential_dto_authentication_plan", + "UpdateAnthropicBedrockCredentialDtoRegion": ".update_anthropic_bedrock_credential_dto_region", + "UpdateAnthropicCredentialDto": ".update_anthropic_credential_dto", + "UpdateAnyscaleCredentialDto": ".update_anyscale_credential_dto", + "UpdateApiRequestToolDto": ".update_api_request_tool_dto", + "UpdateApiRequestToolDtoMessagesItem": ".update_api_request_tool_dto_messages_item", + "UpdateApiRequestToolDtoMessagesItem_RequestComplete": ".update_api_request_tool_dto_messages_item", + "UpdateApiRequestToolDtoMessagesItem_RequestFailed": ".update_api_request_tool_dto_messages_item", + "UpdateApiRequestToolDtoMessagesItem_RequestResponseDelayed": ".update_api_request_tool_dto_messages_item", + "UpdateApiRequestToolDtoMessagesItem_RequestStart": ".update_api_request_tool_dto_messages_item", + "UpdateApiRequestToolDtoMethod": ".update_api_request_tool_dto_method", + "UpdateAssemblyAiCredentialDto": ".update_assembly_ai_credential_dto", + "UpdateAzureCredentialDto": ".update_azure_credential_dto", + "UpdateAzureCredentialDtoRegion": ".update_azure_credential_dto_region", + "UpdateAzureCredentialDtoService": ".update_azure_credential_dto_service", + "UpdateAzureOpenAiCredentialDto": ".update_azure_open_ai_credential_dto", + "UpdateAzureOpenAiCredentialDtoModelsItem": ".update_azure_open_ai_credential_dto_models_item", + "UpdateAzureOpenAiCredentialDtoRegion": ".update_azure_open_ai_credential_dto_region", + "UpdateBarInsightFromCallTableDto": ".update_bar_insight_from_call_table_dto", + "UpdateBarInsightFromCallTableDtoGroupBy": ".update_bar_insight_from_call_table_dto_group_by", + "UpdateBarInsightFromCallTableDtoQueriesItem": ".update_bar_insight_from_call_table_dto_queries_item", + "UpdateBashToolDto": ".update_bash_tool_dto", + "UpdateBashToolDtoMessagesItem": ".update_bash_tool_dto_messages_item", + "UpdateBashToolDtoMessagesItem_RequestComplete": ".update_bash_tool_dto_messages_item", + "UpdateBashToolDtoMessagesItem_RequestFailed": ".update_bash_tool_dto_messages_item", + "UpdateBashToolDtoMessagesItem_RequestResponseDelayed": ".update_bash_tool_dto_messages_item", + "UpdateBashToolDtoMessagesItem_RequestStart": ".update_bash_tool_dto_messages_item", + "UpdateBashToolDtoName": ".update_bash_tool_dto_name", + "UpdateBashToolDtoSubType": ".update_bash_tool_dto_sub_type", + "UpdateByoPhoneNumberDto": ".update_byo_phone_number_dto", + "UpdateByoPhoneNumberDtoFallbackDestination": ".update_byo_phone_number_dto_fallback_destination", + "UpdateByoPhoneNumberDtoFallbackDestination_Number": ".update_byo_phone_number_dto_fallback_destination", + "UpdateByoPhoneNumberDtoFallbackDestination_Sip": ".update_byo_phone_number_dto_fallback_destination", + "UpdateByoPhoneNumberDtoHooksItem": ".update_byo_phone_number_dto_hooks_item", + "UpdateByoPhoneNumberDtoHooksItem_CallEnding": ".update_byo_phone_number_dto_hooks_item", + "UpdateByoPhoneNumberDtoHooksItem_CallRinging": ".update_byo_phone_number_dto_hooks_item", + "UpdateByoSipTrunkCredentialDto": ".update_byo_sip_trunk_credential_dto", + "UpdateCartesiaCredentialDto": ".update_cartesia_credential_dto", + "UpdateCerebrasCredentialDto": ".update_cerebras_credential_dto", + "UpdateCloudflareCredentialDto": ".update_cloudflare_credential_dto", + "UpdateCodeToolDto": ".update_code_tool_dto", + "UpdateCodeToolDtoMessagesItem": ".update_code_tool_dto_messages_item", + "UpdateCodeToolDtoMessagesItem_RequestComplete": ".update_code_tool_dto_messages_item", + "UpdateCodeToolDtoMessagesItem_RequestFailed": ".update_code_tool_dto_messages_item", + "UpdateCodeToolDtoMessagesItem_RequestResponseDelayed": ".update_code_tool_dto_messages_item", + "UpdateCodeToolDtoMessagesItem_RequestStart": ".update_code_tool_dto_messages_item", + "UpdateComputerToolDto": ".update_computer_tool_dto", + "UpdateComputerToolDtoMessagesItem": ".update_computer_tool_dto_messages_item", + "UpdateComputerToolDtoMessagesItem_RequestComplete": ".update_computer_tool_dto_messages_item", + "UpdateComputerToolDtoMessagesItem_RequestFailed": ".update_computer_tool_dto_messages_item", + "UpdateComputerToolDtoMessagesItem_RequestResponseDelayed": ".update_computer_tool_dto_messages_item", + "UpdateComputerToolDtoMessagesItem_RequestStart": ".update_computer_tool_dto_messages_item", + "UpdateComputerToolDtoName": ".update_computer_tool_dto_name", + "UpdateComputerToolDtoSubType": ".update_computer_tool_dto_sub_type", + "UpdateCustomCredentialDto": ".update_custom_credential_dto", + "UpdateCustomCredentialDtoAuthenticationPlan": ".update_custom_credential_dto_authentication_plan", + "UpdateCustomCredentialDtoAuthenticationPlan_Bearer": ".update_custom_credential_dto_authentication_plan", + "UpdateCustomCredentialDtoAuthenticationPlan_Hmac": ".update_custom_credential_dto_authentication_plan", + "UpdateCustomCredentialDtoAuthenticationPlan_Oauth2": ".update_custom_credential_dto_authentication_plan", + "UpdateCustomCredentialDtoEncryptionPlan": ".update_custom_credential_dto_encryption_plan", + "UpdateCustomCredentialDtoEncryptionPlan_PublicKey": ".update_custom_credential_dto_encryption_plan", + "UpdateCustomKnowledgeBaseDto": ".update_custom_knowledge_base_dto", + "UpdateCustomLlmCredentialDto": ".update_custom_llm_credential_dto", + "UpdateDeepInfraCredentialDto": ".update_deep_infra_credential_dto", + "UpdateDeepSeekCredentialDto": ".update_deep_seek_credential_dto", + "UpdateDeepgramCredentialDto": ".update_deepgram_credential_dto", + "UpdateDtmfToolDto": ".update_dtmf_tool_dto", + "UpdateDtmfToolDtoMessagesItem": ".update_dtmf_tool_dto_messages_item", + "UpdateDtmfToolDtoMessagesItem_RequestComplete": ".update_dtmf_tool_dto_messages_item", + "UpdateDtmfToolDtoMessagesItem_RequestFailed": ".update_dtmf_tool_dto_messages_item", + "UpdateDtmfToolDtoMessagesItem_RequestResponseDelayed": ".update_dtmf_tool_dto_messages_item", + "UpdateDtmfToolDtoMessagesItem_RequestStart": ".update_dtmf_tool_dto_messages_item", + "UpdateElevenLabsCredentialDto": ".update_eleven_labs_credential_dto", + "UpdateEmailCredentialDto": ".update_email_credential_dto", + "UpdateEndCallToolDto": ".update_end_call_tool_dto", + "UpdateEndCallToolDtoMessagesItem": ".update_end_call_tool_dto_messages_item", + "UpdateEndCallToolDtoMessagesItem_RequestComplete": ".update_end_call_tool_dto_messages_item", + "UpdateEndCallToolDtoMessagesItem_RequestFailed": ".update_end_call_tool_dto_messages_item", + "UpdateEndCallToolDtoMessagesItem_RequestResponseDelayed": ".update_end_call_tool_dto_messages_item", + "UpdateEndCallToolDtoMessagesItem_RequestStart": ".update_end_call_tool_dto_messages_item", + "UpdateFunctionToolDto": ".update_function_tool_dto", + "UpdateFunctionToolDtoMessagesItem": ".update_function_tool_dto_messages_item", + "UpdateFunctionToolDtoMessagesItem_RequestComplete": ".update_function_tool_dto_messages_item", + "UpdateFunctionToolDtoMessagesItem_RequestFailed": ".update_function_tool_dto_messages_item", + "UpdateFunctionToolDtoMessagesItem_RequestResponseDelayed": ".update_function_tool_dto_messages_item", + "UpdateFunctionToolDtoMessagesItem_RequestStart": ".update_function_tool_dto_messages_item", + "UpdateGcpCredentialDto": ".update_gcp_credential_dto", + "UpdateGhlToolDto": ".update_ghl_tool_dto", + "UpdateGhlToolDtoMessagesItem": ".update_ghl_tool_dto_messages_item", + "UpdateGhlToolDtoMessagesItem_RequestComplete": ".update_ghl_tool_dto_messages_item", + "UpdateGhlToolDtoMessagesItem_RequestFailed": ".update_ghl_tool_dto_messages_item", + "UpdateGhlToolDtoMessagesItem_RequestResponseDelayed": ".update_ghl_tool_dto_messages_item", + "UpdateGhlToolDtoMessagesItem_RequestStart": ".update_ghl_tool_dto_messages_item", + "UpdateGladiaCredentialDto": ".update_gladia_credential_dto", + "UpdateGoHighLevelCalendarAvailabilityToolDto": ".update_go_high_level_calendar_availability_tool_dto", + "UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem": ".update_go_high_level_calendar_availability_tool_dto_messages_item", + "UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestComplete": ".update_go_high_level_calendar_availability_tool_dto_messages_item", + "UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestFailed": ".update_go_high_level_calendar_availability_tool_dto_messages_item", + "UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestResponseDelayed": ".update_go_high_level_calendar_availability_tool_dto_messages_item", + "UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestStart": ".update_go_high_level_calendar_availability_tool_dto_messages_item", + "UpdateGoHighLevelCalendarEventCreateToolDto": ".update_go_high_level_calendar_event_create_tool_dto", + "UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem": ".update_go_high_level_calendar_event_create_tool_dto_messages_item", + "UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestComplete": ".update_go_high_level_calendar_event_create_tool_dto_messages_item", + "UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestFailed": ".update_go_high_level_calendar_event_create_tool_dto_messages_item", + "UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestResponseDelayed": ".update_go_high_level_calendar_event_create_tool_dto_messages_item", + "UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestStart": ".update_go_high_level_calendar_event_create_tool_dto_messages_item", + "UpdateGoHighLevelContactCreateToolDto": ".update_go_high_level_contact_create_tool_dto", + "UpdateGoHighLevelContactCreateToolDtoMessagesItem": ".update_go_high_level_contact_create_tool_dto_messages_item", + "UpdateGoHighLevelContactCreateToolDtoMessagesItem_RequestComplete": ".update_go_high_level_contact_create_tool_dto_messages_item", + "UpdateGoHighLevelContactCreateToolDtoMessagesItem_RequestFailed": ".update_go_high_level_contact_create_tool_dto_messages_item", + "UpdateGoHighLevelContactCreateToolDtoMessagesItem_RequestResponseDelayed": ".update_go_high_level_contact_create_tool_dto_messages_item", + "UpdateGoHighLevelContactCreateToolDtoMessagesItem_RequestStart": ".update_go_high_level_contact_create_tool_dto_messages_item", + "UpdateGoHighLevelContactGetToolDto": ".update_go_high_level_contact_get_tool_dto", + "UpdateGoHighLevelContactGetToolDtoMessagesItem": ".update_go_high_level_contact_get_tool_dto_messages_item", + "UpdateGoHighLevelContactGetToolDtoMessagesItem_RequestComplete": ".update_go_high_level_contact_get_tool_dto_messages_item", + "UpdateGoHighLevelContactGetToolDtoMessagesItem_RequestFailed": ".update_go_high_level_contact_get_tool_dto_messages_item", + "UpdateGoHighLevelContactGetToolDtoMessagesItem_RequestResponseDelayed": ".update_go_high_level_contact_get_tool_dto_messages_item", + "UpdateGoHighLevelContactGetToolDtoMessagesItem_RequestStart": ".update_go_high_level_contact_get_tool_dto_messages_item", + "UpdateGoHighLevelCredentialDto": ".update_go_high_level_credential_dto", + "UpdateGoHighLevelMcpCredentialDto": ".update_go_high_level_mcp_credential_dto", + "UpdateGoogleCalendarCheckAvailabilityToolDto": ".update_google_calendar_check_availability_tool_dto", + "UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem": ".update_google_calendar_check_availability_tool_dto_messages_item", + "UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestComplete": ".update_google_calendar_check_availability_tool_dto_messages_item", + "UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestFailed": ".update_google_calendar_check_availability_tool_dto_messages_item", + "UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestResponseDelayed": ".update_google_calendar_check_availability_tool_dto_messages_item", + "UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestStart": ".update_google_calendar_check_availability_tool_dto_messages_item", + "UpdateGoogleCalendarCreateEventToolDto": ".update_google_calendar_create_event_tool_dto", + "UpdateGoogleCalendarCreateEventToolDtoMessagesItem": ".update_google_calendar_create_event_tool_dto_messages_item", + "UpdateGoogleCalendarCreateEventToolDtoMessagesItem_RequestComplete": ".update_google_calendar_create_event_tool_dto_messages_item", + "UpdateGoogleCalendarCreateEventToolDtoMessagesItem_RequestFailed": ".update_google_calendar_create_event_tool_dto_messages_item", + "UpdateGoogleCalendarCreateEventToolDtoMessagesItem_RequestResponseDelayed": ".update_google_calendar_create_event_tool_dto_messages_item", + "UpdateGoogleCalendarCreateEventToolDtoMessagesItem_RequestStart": ".update_google_calendar_create_event_tool_dto_messages_item", + "UpdateGoogleCalendarOAuth2AuthorizationCredentialDto": ".update_google_calendar_o_auth_2_authorization_credential_dto", + "UpdateGoogleCalendarOAuth2ClientCredentialDto": ".update_google_calendar_o_auth_2_client_credential_dto", + "UpdateGoogleCredentialDto": ".update_google_credential_dto", + "UpdateGoogleSheetsOAuth2AuthorizationCredentialDto": ".update_google_sheets_o_auth_2_authorization_credential_dto", + "UpdateGoogleSheetsRowAppendToolDto": ".update_google_sheets_row_append_tool_dto", + "UpdateGoogleSheetsRowAppendToolDtoMessagesItem": ".update_google_sheets_row_append_tool_dto_messages_item", + "UpdateGoogleSheetsRowAppendToolDtoMessagesItem_RequestComplete": ".update_google_sheets_row_append_tool_dto_messages_item", + "UpdateGoogleSheetsRowAppendToolDtoMessagesItem_RequestFailed": ".update_google_sheets_row_append_tool_dto_messages_item", + "UpdateGoogleSheetsRowAppendToolDtoMessagesItem_RequestResponseDelayed": ".update_google_sheets_row_append_tool_dto_messages_item", + "UpdateGoogleSheetsRowAppendToolDtoMessagesItem_RequestStart": ".update_google_sheets_row_append_tool_dto_messages_item", + "UpdateGroqCredentialDto": ".update_groq_credential_dto", + "UpdateHandoffToolDto": ".update_handoff_tool_dto", + "UpdateHandoffToolDtoDestinationsItem": ".update_handoff_tool_dto_destinations_item", + "UpdateHandoffToolDtoDestinationsItem_Assistant": ".update_handoff_tool_dto_destinations_item", + "UpdateHandoffToolDtoDestinationsItem_Dynamic": ".update_handoff_tool_dto_destinations_item", + "UpdateHandoffToolDtoDestinationsItem_Squad": ".update_handoff_tool_dto_destinations_item", + "UpdateHandoffToolDtoMessagesItem": ".update_handoff_tool_dto_messages_item", + "UpdateHandoffToolDtoMessagesItem_RequestComplete": ".update_handoff_tool_dto_messages_item", + "UpdateHandoffToolDtoMessagesItem_RequestFailed": ".update_handoff_tool_dto_messages_item", + "UpdateHandoffToolDtoMessagesItem_RequestResponseDelayed": ".update_handoff_tool_dto_messages_item", + "UpdateHandoffToolDtoMessagesItem_RequestStart": ".update_handoff_tool_dto_messages_item", + "UpdateHumeCredentialDto": ".update_hume_credential_dto", + "UpdateInflectionAiCredentialDto": ".update_inflection_ai_credential_dto", + "UpdateInworldCredentialDto": ".update_inworld_credential_dto", + "UpdateLangfuseCredentialDto": ".update_langfuse_credential_dto", + "UpdateLineInsightFromCallTableDto": ".update_line_insight_from_call_table_dto", + "UpdateLineInsightFromCallTableDtoGroupBy": ".update_line_insight_from_call_table_dto_group_by", + "UpdateLineInsightFromCallTableDtoQueriesItem": ".update_line_insight_from_call_table_dto_queries_item", + "UpdateLmntCredentialDto": ".update_lmnt_credential_dto", + "UpdateMakeCredentialDto": ".update_make_credential_dto", + "UpdateMakeToolDto": ".update_make_tool_dto", + "UpdateMakeToolDtoMessagesItem": ".update_make_tool_dto_messages_item", + "UpdateMakeToolDtoMessagesItem_RequestComplete": ".update_make_tool_dto_messages_item", + "UpdateMakeToolDtoMessagesItem_RequestFailed": ".update_make_tool_dto_messages_item", + "UpdateMakeToolDtoMessagesItem_RequestResponseDelayed": ".update_make_tool_dto_messages_item", + "UpdateMakeToolDtoMessagesItem_RequestStart": ".update_make_tool_dto_messages_item", + "UpdateMcpToolDto": ".update_mcp_tool_dto", + "UpdateMcpToolDtoMessagesItem": ".update_mcp_tool_dto_messages_item", + "UpdateMcpToolDtoMessagesItem_RequestComplete": ".update_mcp_tool_dto_messages_item", + "UpdateMcpToolDtoMessagesItem_RequestFailed": ".update_mcp_tool_dto_messages_item", + "UpdateMcpToolDtoMessagesItem_RequestResponseDelayed": ".update_mcp_tool_dto_messages_item", + "UpdateMcpToolDtoMessagesItem_RequestStart": ".update_mcp_tool_dto_messages_item", + "UpdateMistralCredentialDto": ".update_mistral_credential_dto", + "UpdateNeuphonicCredentialDto": ".update_neuphonic_credential_dto", + "UpdateOpenAiCredentialDto": ".update_open_ai_credential_dto", + "UpdateOpenRouterCredentialDto": ".update_open_router_credential_dto", + "UpdateOrgDto": ".update_org_dto", + "UpdateOrgDtoChannel": ".update_org_dto_channel", + "UpdateOutputToolDto": ".update_output_tool_dto", + "UpdateOutputToolDtoMessagesItem": ".update_output_tool_dto_messages_item", + "UpdateOutputToolDtoMessagesItem_RequestComplete": ".update_output_tool_dto_messages_item", + "UpdateOutputToolDtoMessagesItem_RequestFailed": ".update_output_tool_dto_messages_item", + "UpdateOutputToolDtoMessagesItem_RequestResponseDelayed": ".update_output_tool_dto_messages_item", + "UpdateOutputToolDtoMessagesItem_RequestStart": ".update_output_tool_dto_messages_item", + "UpdatePerplexityAiCredentialDto": ".update_perplexity_ai_credential_dto", + "UpdatePersonalityDto": ".update_personality_dto", + "UpdatePieInsightFromCallTableDto": ".update_pie_insight_from_call_table_dto", + "UpdatePieInsightFromCallTableDtoGroupBy": ".update_pie_insight_from_call_table_dto_group_by", + "UpdatePieInsightFromCallTableDtoQueriesItem": ".update_pie_insight_from_call_table_dto_queries_item", + "UpdatePlayHtCredentialDto": ".update_play_ht_credential_dto", + "UpdateQueryToolDto": ".update_query_tool_dto", + "UpdateQueryToolDtoMessagesItem": ".update_query_tool_dto_messages_item", + "UpdateQueryToolDtoMessagesItem_RequestComplete": ".update_query_tool_dto_messages_item", + "UpdateQueryToolDtoMessagesItem_RequestFailed": ".update_query_tool_dto_messages_item", + "UpdateQueryToolDtoMessagesItem_RequestResponseDelayed": ".update_query_tool_dto_messages_item", + "UpdateQueryToolDtoMessagesItem_RequestStart": ".update_query_tool_dto_messages_item", + "UpdateRimeAiCredentialDto": ".update_rime_ai_credential_dto", + "UpdateRunpodCredentialDto": ".update_runpod_credential_dto", + "UpdateS3CredentialDto": ".update_s_3_credential_dto", + "UpdateScenarioDto": ".update_scenario_dto", + "UpdateScenarioDtoHooksItem": ".update_scenario_dto_hooks_item", + "UpdateScenarioDtoHooksItem_SimulationRunEnded": ".update_scenario_dto_hooks_item", + "UpdateScenarioDtoHooksItem_SimulationRunStarted": ".update_scenario_dto_hooks_item", + "UpdateSimulationDto": ".update_simulation_dto", + "UpdateSimulationSuiteDto": ".update_simulation_suite_dto", + "UpdateSipRequestToolDto": ".update_sip_request_tool_dto", + "UpdateSipRequestToolDtoBody": ".update_sip_request_tool_dto_body", + "UpdateSipRequestToolDtoMessagesItem": ".update_sip_request_tool_dto_messages_item", + "UpdateSipRequestToolDtoMessagesItem_RequestComplete": ".update_sip_request_tool_dto_messages_item", + "UpdateSipRequestToolDtoMessagesItem_RequestFailed": ".update_sip_request_tool_dto_messages_item", + "UpdateSipRequestToolDtoMessagesItem_RequestResponseDelayed": ".update_sip_request_tool_dto_messages_item", + "UpdateSipRequestToolDtoMessagesItem_RequestStart": ".update_sip_request_tool_dto_messages_item", + "UpdateSipRequestToolDtoVerb": ".update_sip_request_tool_dto_verb", + "UpdateSlackOAuth2AuthorizationCredentialDto": ".update_slack_o_auth_2_authorization_credential_dto", + "UpdateSlackSendMessageToolDto": ".update_slack_send_message_tool_dto", + "UpdateSlackSendMessageToolDtoMessagesItem": ".update_slack_send_message_tool_dto_messages_item", + "UpdateSlackSendMessageToolDtoMessagesItem_RequestComplete": ".update_slack_send_message_tool_dto_messages_item", + "UpdateSlackSendMessageToolDtoMessagesItem_RequestFailed": ".update_slack_send_message_tool_dto_messages_item", + "UpdateSlackSendMessageToolDtoMessagesItem_RequestResponseDelayed": ".update_slack_send_message_tool_dto_messages_item", + "UpdateSlackSendMessageToolDtoMessagesItem_RequestStart": ".update_slack_send_message_tool_dto_messages_item", + "UpdateSlackWebhookCredentialDto": ".update_slack_webhook_credential_dto", + "UpdateSmsToolDto": ".update_sms_tool_dto", + "UpdateSmsToolDtoMessagesItem": ".update_sms_tool_dto_messages_item", + "UpdateSmsToolDtoMessagesItem_RequestComplete": ".update_sms_tool_dto_messages_item", + "UpdateSmsToolDtoMessagesItem_RequestFailed": ".update_sms_tool_dto_messages_item", + "UpdateSmsToolDtoMessagesItem_RequestResponseDelayed": ".update_sms_tool_dto_messages_item", + "UpdateSmsToolDtoMessagesItem_RequestStart": ".update_sms_tool_dto_messages_item", + "UpdateSonioxCredentialDto": ".update_soniox_credential_dto", + "UpdateTelnyxPhoneNumberDto": ".update_telnyx_phone_number_dto", + "UpdateTelnyxPhoneNumberDtoFallbackDestination": ".update_telnyx_phone_number_dto_fallback_destination", + "UpdateTelnyxPhoneNumberDtoFallbackDestination_Number": ".update_telnyx_phone_number_dto_fallback_destination", + "UpdateTelnyxPhoneNumberDtoFallbackDestination_Sip": ".update_telnyx_phone_number_dto_fallback_destination", + "UpdateTelnyxPhoneNumberDtoHooksItem": ".update_telnyx_phone_number_dto_hooks_item", + "UpdateTelnyxPhoneNumberDtoHooksItem_CallEnding": ".update_telnyx_phone_number_dto_hooks_item", + "UpdateTelnyxPhoneNumberDtoHooksItem_CallRinging": ".update_telnyx_phone_number_dto_hooks_item", + "UpdateTestSuiteDto": ".update_test_suite_dto", + "UpdateTestSuiteRunDto": ".update_test_suite_run_dto", + "UpdateTestSuiteTestChatDto": ".update_test_suite_test_chat_dto", + "UpdateTestSuiteTestChatDtoType": ".update_test_suite_test_chat_dto_type", + "UpdateTestSuiteTestVoiceDto": ".update_test_suite_test_voice_dto", + "UpdateTestSuiteTestVoiceDtoType": ".update_test_suite_test_voice_dto_type", + "UpdateTextEditorToolDto": ".update_text_editor_tool_dto", + "UpdateTextEditorToolDtoMessagesItem": ".update_text_editor_tool_dto_messages_item", + "UpdateTextEditorToolDtoMessagesItem_RequestComplete": ".update_text_editor_tool_dto_messages_item", + "UpdateTextEditorToolDtoMessagesItem_RequestFailed": ".update_text_editor_tool_dto_messages_item", + "UpdateTextEditorToolDtoMessagesItem_RequestResponseDelayed": ".update_text_editor_tool_dto_messages_item", + "UpdateTextEditorToolDtoMessagesItem_RequestStart": ".update_text_editor_tool_dto_messages_item", + "UpdateTextEditorToolDtoName": ".update_text_editor_tool_dto_name", + "UpdateTextEditorToolDtoSubType": ".update_text_editor_tool_dto_sub_type", + "UpdateTextInsightFromCallTableDto": ".update_text_insight_from_call_table_dto", + "UpdateTextInsightFromCallTableDtoQueriesItem": ".update_text_insight_from_call_table_dto_queries_item", + "UpdateTogetherAiCredentialDto": ".update_together_ai_credential_dto", + "UpdateTokenDto": ".update_token_dto", + "UpdateTokenDtoTag": ".update_token_dto_tag", + "UpdateToolTemplateDto": ".update_tool_template_dto", + "UpdateToolTemplateDtoDetails": ".update_tool_template_dto_details", + "UpdateToolTemplateDtoDetails_ApiRequest": ".update_tool_template_dto_details", + "UpdateToolTemplateDtoDetails_Bash": ".update_tool_template_dto_details", + "UpdateToolTemplateDtoDetails_Code": ".update_tool_template_dto_details", + "UpdateToolTemplateDtoDetails_Computer": ".update_tool_template_dto_details", + "UpdateToolTemplateDtoDetails_Dtmf": ".update_tool_template_dto_details", + "UpdateToolTemplateDtoDetails_EndCall": ".update_tool_template_dto_details", + "UpdateToolTemplateDtoDetails_Function": ".update_tool_template_dto_details", + "UpdateToolTemplateDtoDetails_GohighlevelCalendarAvailabilityCheck": ".update_tool_template_dto_details", + "UpdateToolTemplateDtoDetails_GohighlevelCalendarEventCreate": ".update_tool_template_dto_details", + "UpdateToolTemplateDtoDetails_GohighlevelContactCreate": ".update_tool_template_dto_details", + "UpdateToolTemplateDtoDetails_GohighlevelContactGet": ".update_tool_template_dto_details", + "UpdateToolTemplateDtoDetails_GoogleCalendarAvailabilityCheck": ".update_tool_template_dto_details", + "UpdateToolTemplateDtoDetails_GoogleCalendarEventCreate": ".update_tool_template_dto_details", + "UpdateToolTemplateDtoDetails_GoogleSheetsRowAppend": ".update_tool_template_dto_details", + "UpdateToolTemplateDtoDetails_Handoff": ".update_tool_template_dto_details", + "UpdateToolTemplateDtoDetails_Mcp": ".update_tool_template_dto_details", + "UpdateToolTemplateDtoDetails_Query": ".update_tool_template_dto_details", + "UpdateToolTemplateDtoDetails_SipRequest": ".update_tool_template_dto_details", + "UpdateToolTemplateDtoDetails_SlackMessageSend": ".update_tool_template_dto_details", + "UpdateToolTemplateDtoDetails_Sms": ".update_tool_template_dto_details", + "UpdateToolTemplateDtoDetails_TextEditor": ".update_tool_template_dto_details", + "UpdateToolTemplateDtoDetails_TransferCall": ".update_tool_template_dto_details", + "UpdateToolTemplateDtoDetails_Voicemail": ".update_tool_template_dto_details", + "UpdateToolTemplateDtoProvider": ".update_tool_template_dto_provider", + "UpdateToolTemplateDtoProviderDetails": ".update_tool_template_dto_provider_details", + "UpdateToolTemplateDtoProviderDetails_Function": ".update_tool_template_dto_provider_details", + "UpdateToolTemplateDtoProviderDetails_Ghl": ".update_tool_template_dto_provider_details", + "UpdateToolTemplateDtoProviderDetails_GohighlevelCalendarAvailabilityCheck": ".update_tool_template_dto_provider_details", + "UpdateToolTemplateDtoProviderDetails_GohighlevelCalendarEventCreate": ".update_tool_template_dto_provider_details", + "UpdateToolTemplateDtoProviderDetails_GohighlevelContactCreate": ".update_tool_template_dto_provider_details", + "UpdateToolTemplateDtoProviderDetails_GohighlevelContactGet": ".update_tool_template_dto_provider_details", + "UpdateToolTemplateDtoProviderDetails_GoogleCalendarEventCreate": ".update_tool_template_dto_provider_details", + "UpdateToolTemplateDtoProviderDetails_GoogleSheetsRowAppend": ".update_tool_template_dto_provider_details", + "UpdateToolTemplateDtoProviderDetails_Make": ".update_tool_template_dto_provider_details", + "UpdateToolTemplateDtoType": ".update_tool_template_dto_type", + "UpdateToolTemplateDtoVisibility": ".update_tool_template_dto_visibility", + "UpdateTransferCallToolDto": ".update_transfer_call_tool_dto", + "UpdateTransferCallToolDtoDestinationsItem": ".update_transfer_call_tool_dto_destinations_item", + "UpdateTransferCallToolDtoDestinationsItem_Assistant": ".update_transfer_call_tool_dto_destinations_item", + "UpdateTransferCallToolDtoDestinationsItem_Number": ".update_transfer_call_tool_dto_destinations_item", + "UpdateTransferCallToolDtoDestinationsItem_Sip": ".update_transfer_call_tool_dto_destinations_item", + "UpdateTransferCallToolDtoMessagesItem": ".update_transfer_call_tool_dto_messages_item", + "UpdateTransferCallToolDtoMessagesItem_RequestComplete": ".update_transfer_call_tool_dto_messages_item", + "UpdateTransferCallToolDtoMessagesItem_RequestFailed": ".update_transfer_call_tool_dto_messages_item", + "UpdateTransferCallToolDtoMessagesItem_RequestResponseDelayed": ".update_transfer_call_tool_dto_messages_item", + "UpdateTransferCallToolDtoMessagesItem_RequestStart": ".update_transfer_call_tool_dto_messages_item", + "UpdateTrieveCredentialDto": ".update_trieve_credential_dto", + "UpdateTrieveKnowledgeBaseDto": ".update_trieve_knowledge_base_dto", + "UpdateTwilioCredentialDto": ".update_twilio_credential_dto", + "UpdateTwilioPhoneNumberDto": ".update_twilio_phone_number_dto", + "UpdateTwilioPhoneNumberDtoFallbackDestination": ".update_twilio_phone_number_dto_fallback_destination", + "UpdateTwilioPhoneNumberDtoFallbackDestination_Number": ".update_twilio_phone_number_dto_fallback_destination", + "UpdateTwilioPhoneNumberDtoFallbackDestination_Sip": ".update_twilio_phone_number_dto_fallback_destination", + "UpdateTwilioPhoneNumberDtoHooksItem": ".update_twilio_phone_number_dto_hooks_item", + "UpdateTwilioPhoneNumberDtoHooksItem_CallEnding": ".update_twilio_phone_number_dto_hooks_item", + "UpdateTwilioPhoneNumberDtoHooksItem_CallRinging": ".update_twilio_phone_number_dto_hooks_item", + "UpdateUserRoleDto": ".update_user_role_dto", + "UpdateUserRoleDtoRole": ".update_user_role_dto_role", + "UpdateVapiPhoneNumberDto": ".update_vapi_phone_number_dto", + "UpdateVapiPhoneNumberDtoFallbackDestination": ".update_vapi_phone_number_dto_fallback_destination", + "UpdateVapiPhoneNumberDtoFallbackDestination_Number": ".update_vapi_phone_number_dto_fallback_destination", + "UpdateVapiPhoneNumberDtoFallbackDestination_Sip": ".update_vapi_phone_number_dto_fallback_destination", + "UpdateVapiPhoneNumberDtoHooksItem": ".update_vapi_phone_number_dto_hooks_item", + "UpdateVapiPhoneNumberDtoHooksItem_CallEnding": ".update_vapi_phone_number_dto_hooks_item", + "UpdateVapiPhoneNumberDtoHooksItem_CallRinging": ".update_vapi_phone_number_dto_hooks_item", + "UpdateVoicemailToolDto": ".update_voicemail_tool_dto", + "UpdateVoicemailToolDtoMessagesItem": ".update_voicemail_tool_dto_messages_item", + "UpdateVoicemailToolDtoMessagesItem_RequestComplete": ".update_voicemail_tool_dto_messages_item", + "UpdateVoicemailToolDtoMessagesItem_RequestFailed": ".update_voicemail_tool_dto_messages_item", + "UpdateVoicemailToolDtoMessagesItem_RequestResponseDelayed": ".update_voicemail_tool_dto_messages_item", + "UpdateVoicemailToolDtoMessagesItem_RequestStart": ".update_voicemail_tool_dto_messages_item", + "UpdateVonageCredentialDto": ".update_vonage_credential_dto", + "UpdateVonagePhoneNumberDto": ".update_vonage_phone_number_dto", + "UpdateVonagePhoneNumberDtoFallbackDestination": ".update_vonage_phone_number_dto_fallback_destination", + "UpdateVonagePhoneNumberDtoFallbackDestination_Number": ".update_vonage_phone_number_dto_fallback_destination", + "UpdateVonagePhoneNumberDtoFallbackDestination_Sip": ".update_vonage_phone_number_dto_fallback_destination", + "UpdateVonagePhoneNumberDtoHooksItem": ".update_vonage_phone_number_dto_hooks_item", + "UpdateVonagePhoneNumberDtoHooksItem_CallEnding": ".update_vonage_phone_number_dto_hooks_item", + "UpdateVonagePhoneNumberDtoHooksItem_CallRinging": ".update_vonage_phone_number_dto_hooks_item", + "UpdateWebhookCredentialDto": ".update_webhook_credential_dto", + "UpdateWebhookCredentialDtoAuthenticationPlan": ".update_webhook_credential_dto_authentication_plan", + "UpdateWebhookCredentialDtoAuthenticationPlan_Bearer": ".update_webhook_credential_dto_authentication_plan", + "UpdateWebhookCredentialDtoAuthenticationPlan_Hmac": ".update_webhook_credential_dto_authentication_plan", + "UpdateWebhookCredentialDtoAuthenticationPlan_Oauth2": ".update_webhook_credential_dto_authentication_plan", + "UpdateWellSaidCredentialDto": ".update_well_said_credential_dto", + "UpdateWorkflowDto": ".update_workflow_dto", + "UpdateWorkflowDtoBackgroundSound": ".update_workflow_dto_background_sound", + "UpdateWorkflowDtoBackgroundSoundZero": ".update_workflow_dto_background_sound_zero", + "UpdateWorkflowDtoCredentialsItem": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_11Labs": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_Anthropic": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_AnthropicBedrock": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_Anyscale": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_AssemblyAi": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_Azure": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_AzureOpenai": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_ByoSipTrunk": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_Cartesia": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_Cerebras": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_Cloudflare": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_CustomCredential": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_CustomLlm": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_DeepSeek": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_Deepgram": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_Deepinfra": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_Email": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_Gcp": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_GhlOauth2Authorization": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_Gladia": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_Gohighlevel": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_Google": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_GoogleCalendarOauth2Authorization": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_GoogleCalendarOauth2Client": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_GoogleSheetsOauth2Authorization": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_Groq": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_Hume": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_InflectionAi": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_Inworld": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_Langfuse": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_Lmnt": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_Make": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_Minimax": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_Mistral": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_Neuphonic": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_Openai": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_Openrouter": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_PerplexityAi": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_Playht": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_RimeAi": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_Runpod": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_S3": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_SlackOauth2Authorization": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_SlackWebhook": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_SmallestAi": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_Soniox": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_Speechmatics": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_Supabase": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_Tavus": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_TogetherAi": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_Trieve": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_Twilio": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_Vonage": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_Webhook": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_Wellsaid": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoCredentialsItem_Xai": ".update_workflow_dto_credentials_item", + "UpdateWorkflowDtoHooksItem": ".update_workflow_dto_hooks_item", + "UpdateWorkflowDtoModel": ".update_workflow_dto_model", + "UpdateWorkflowDtoModel_Anthropic": ".update_workflow_dto_model", + "UpdateWorkflowDtoModel_AnthropicBedrock": ".update_workflow_dto_model", + "UpdateWorkflowDtoModel_CustomLlm": ".update_workflow_dto_model", + "UpdateWorkflowDtoModel_Google": ".update_workflow_dto_model", + "UpdateWorkflowDtoModel_Openai": ".update_workflow_dto_model", + "UpdateWorkflowDtoNodesItem": ".update_workflow_dto_nodes_item", + "UpdateWorkflowDtoNodesItem_Conversation": ".update_workflow_dto_nodes_item", + "UpdateWorkflowDtoNodesItem_Tool": ".update_workflow_dto_nodes_item", + "UpdateWorkflowDtoTranscriber": ".update_workflow_dto_transcriber", + "UpdateWorkflowDtoTranscriber_11Labs": ".update_workflow_dto_transcriber", + "UpdateWorkflowDtoTranscriber_AssemblyAi": ".update_workflow_dto_transcriber", + "UpdateWorkflowDtoTranscriber_Azure": ".update_workflow_dto_transcriber", + "UpdateWorkflowDtoTranscriber_Cartesia": ".update_workflow_dto_transcriber", + "UpdateWorkflowDtoTranscriber_CustomTranscriber": ".update_workflow_dto_transcriber", + "UpdateWorkflowDtoTranscriber_Deepgram": ".update_workflow_dto_transcriber", + "UpdateWorkflowDtoTranscriber_Gladia": ".update_workflow_dto_transcriber", + "UpdateWorkflowDtoTranscriber_Google": ".update_workflow_dto_transcriber", + "UpdateWorkflowDtoTranscriber_Openai": ".update_workflow_dto_transcriber", + "UpdateWorkflowDtoTranscriber_Soniox": ".update_workflow_dto_transcriber", + "UpdateWorkflowDtoTranscriber_Speechmatics": ".update_workflow_dto_transcriber", + "UpdateWorkflowDtoTranscriber_Talkscriber": ".update_workflow_dto_transcriber", + "UpdateWorkflowDtoVoice": ".update_workflow_dto_voice", + "UpdateWorkflowDtoVoice_11Labs": ".update_workflow_dto_voice", + "UpdateWorkflowDtoVoice_Azure": ".update_workflow_dto_voice", + "UpdateWorkflowDtoVoice_Cartesia": ".update_workflow_dto_voice", + "UpdateWorkflowDtoVoice_CustomVoice": ".update_workflow_dto_voice", + "UpdateWorkflowDtoVoice_Deepgram": ".update_workflow_dto_voice", + "UpdateWorkflowDtoVoice_Hume": ".update_workflow_dto_voice", + "UpdateWorkflowDtoVoice_Inworld": ".update_workflow_dto_voice", + "UpdateWorkflowDtoVoice_Lmnt": ".update_workflow_dto_voice", + "UpdateWorkflowDtoVoice_Minimax": ".update_workflow_dto_voice", + "UpdateWorkflowDtoVoice_Neuphonic": ".update_workflow_dto_voice", + "UpdateWorkflowDtoVoice_Openai": ".update_workflow_dto_voice", + "UpdateWorkflowDtoVoice_Playht": ".update_workflow_dto_voice", + "UpdateWorkflowDtoVoice_RimeAi": ".update_workflow_dto_voice", + "UpdateWorkflowDtoVoice_Sesame": ".update_workflow_dto_voice", + "UpdateWorkflowDtoVoice_SmallestAi": ".update_workflow_dto_voice", + "UpdateWorkflowDtoVoice_Tavus": ".update_workflow_dto_voice", + "UpdateWorkflowDtoVoice_Vapi": ".update_workflow_dto_voice", + "UpdateWorkflowDtoVoice_Wellsaid": ".update_workflow_dto_voice", + "UpdateWorkflowDtoVoicemailDetection": ".update_workflow_dto_voicemail_detection", + "UpdateWorkflowDtoVoicemailDetectionZero": ".update_workflow_dto_voicemail_detection_zero", + "UpdateXAiCredentialDto": ".update_x_ai_credential_dto", + "User": ".user", + "UserMessage": ".user_message", + "VapiCost": ".vapi_cost", + "VapiCostSubType": ".vapi_cost_sub_type", + "VapiModel": ".vapi_model", + "VapiModelProvider": ".vapi_model_provider", + "VapiModelToolsItem": ".vapi_model_tools_item", + "VapiModelToolsItem_ApiRequest": ".vapi_model_tools_item", + "VapiModelToolsItem_Bash": ".vapi_model_tools_item", + "VapiModelToolsItem_Code": ".vapi_model_tools_item", + "VapiModelToolsItem_Computer": ".vapi_model_tools_item", + "VapiModelToolsItem_Dtmf": ".vapi_model_tools_item", + "VapiModelToolsItem_EndCall": ".vapi_model_tools_item", + "VapiModelToolsItem_Function": ".vapi_model_tools_item", + "VapiModelToolsItem_GohighlevelCalendarAvailabilityCheck": ".vapi_model_tools_item", + "VapiModelToolsItem_GohighlevelCalendarEventCreate": ".vapi_model_tools_item", + "VapiModelToolsItem_GohighlevelContactCreate": ".vapi_model_tools_item", + "VapiModelToolsItem_GohighlevelContactGet": ".vapi_model_tools_item", + "VapiModelToolsItem_GoogleCalendarAvailabilityCheck": ".vapi_model_tools_item", + "VapiModelToolsItem_GoogleCalendarEventCreate": ".vapi_model_tools_item", + "VapiModelToolsItem_GoogleSheetsRowAppend": ".vapi_model_tools_item", + "VapiModelToolsItem_Handoff": ".vapi_model_tools_item", + "VapiModelToolsItem_Mcp": ".vapi_model_tools_item", + "VapiModelToolsItem_Query": ".vapi_model_tools_item", + "VapiModelToolsItem_SipRequest": ".vapi_model_tools_item", + "VapiModelToolsItem_SlackMessageSend": ".vapi_model_tools_item", + "VapiModelToolsItem_Sms": ".vapi_model_tools_item", + "VapiModelToolsItem_TextEditor": ".vapi_model_tools_item", + "VapiModelToolsItem_TransferCall": ".vapi_model_tools_item", + "VapiModelToolsItem_Voicemail": ".vapi_model_tools_item", + "VapiPhoneNumber": ".vapi_phone_number", + "VapiPhoneNumberFallbackDestination": ".vapi_phone_number_fallback_destination", + "VapiPhoneNumberFallbackDestination_Number": ".vapi_phone_number_fallback_destination", + "VapiPhoneNumberFallbackDestination_Sip": ".vapi_phone_number_fallback_destination", + "VapiPhoneNumberHooksItem": ".vapi_phone_number_hooks_item", + "VapiPhoneNumberHooksItem_CallEnding": ".vapi_phone_number_hooks_item", + "VapiPhoneNumberHooksItem_CallRinging": ".vapi_phone_number_hooks_item", + "VapiPhoneNumberStatus": ".vapi_phone_number_status", + "VapiPronunciationDictionaryLocator": ".vapi_pronunciation_dictionary_locator", + "VapiSipTransportMessage": ".vapi_sip_transport_message", + "VapiSipTransportMessageSipVerb": ".vapi_sip_transport_message_sip_verb", + "VapiSmartEndpointingPlan": ".vapi_smart_endpointing_plan", + "VapiSmartEndpointingPlanProvider": ".vapi_smart_endpointing_plan_provider", + "VapiVoice": ".vapi_voice", + "VapiVoiceVoiceId": ".vapi_voice_voice_id", + "VapiVoicemailDetectionPlan": ".vapi_voicemail_detection_plan", + "VapiVoicemailDetectionPlanProvider": ".vapi_voicemail_detection_plan_provider", + "VapiVoicemailDetectionPlanType": ".vapi_voicemail_detection_plan_type", + "VariableExtractionAlias": ".variable_extraction_alias", + "VariableExtractionPlan": ".variable_extraction_plan", + "VariableValueGroupBy": ".variable_value_group_by", + "VoiceCost": ".voice_cost", + "VoiceLibrary": ".voice_library", + "VoiceLibraryGender": ".voice_library_gender", + "VoiceLibraryVoiceResponse": ".voice_library_voice_response", + "VoicemailDetectionBackoffPlan": ".voicemail_detection_backoff_plan", + "VoicemailDetectionCost": ".voicemail_detection_cost", + "VoicemailDetectionCostProvider": ".voicemail_detection_cost_provider", + "VoicemailTool": ".voicemail_tool", + "VoicemailToolMessagesItem": ".voicemail_tool_messages_item", + "VoicemailToolMessagesItem_RequestComplete": ".voicemail_tool_messages_item", + "VoicemailToolMessagesItem_RequestFailed": ".voicemail_tool_messages_item", + "VoicemailToolMessagesItem_RequestResponseDelayed": ".voicemail_tool_messages_item", + "VoicemailToolMessagesItem_RequestStart": ".voicemail_tool_messages_item", + "VonageCredential": ".vonage_credential", + "VonageCredentialProvider": ".vonage_credential_provider", + "VonagePhoneNumber": ".vonage_phone_number", + "VonagePhoneNumberFallbackDestination": ".vonage_phone_number_fallback_destination", + "VonagePhoneNumberFallbackDestination_Number": ".vonage_phone_number_fallback_destination", + "VonagePhoneNumberFallbackDestination_Sip": ".vonage_phone_number_fallback_destination", + "VonagePhoneNumberHooksItem": ".vonage_phone_number_hooks_item", + "VonagePhoneNumberHooksItem_CallEnding": ".vonage_phone_number_hooks_item", + "VonagePhoneNumberHooksItem_CallRinging": ".vonage_phone_number_hooks_item", + "VonagePhoneNumberStatus": ".vonage_phone_number_status", + "WebChat": ".web_chat", + "WebChatOutputItem": ".web_chat_output_item", + "WebhookCredential": ".webhook_credential", + "WebhookCredentialAuthenticationPlan": ".webhook_credential_authentication_plan", + "WebhookCredentialAuthenticationPlan_Bearer": ".webhook_credential_authentication_plan", + "WebhookCredentialAuthenticationPlan_Hmac": ".webhook_credential_authentication_plan", + "WebhookCredentialAuthenticationPlan_Oauth2": ".webhook_credential_authentication_plan", + "WebhookCredentialProvider": ".webhook_credential_provider", + "WellSaidCredential": ".well_said_credential", + "WellSaidCredentialProvider": ".well_said_credential_provider", + "WellSaidVoice": ".well_said_voice", + "WellSaidVoiceModel": ".well_said_voice_model", + "Workflow": ".workflow", + "WorkflowAnthropicBedrockModel": ".workflow_anthropic_bedrock_model", + "WorkflowAnthropicBedrockModelModel": ".workflow_anthropic_bedrock_model_model", + "WorkflowAnthropicModel": ".workflow_anthropic_model", + "WorkflowAnthropicModelModel": ".workflow_anthropic_model_model", + "WorkflowBackgroundSound": ".workflow_background_sound", + "WorkflowBackgroundSoundZero": ".workflow_background_sound_zero", + "WorkflowCredentialsItem": ".workflow_credentials_item", + "WorkflowCredentialsItem_11Labs": ".workflow_credentials_item", + "WorkflowCredentialsItem_Anthropic": ".workflow_credentials_item", + "WorkflowCredentialsItem_AnthropicBedrock": ".workflow_credentials_item", + "WorkflowCredentialsItem_Anyscale": ".workflow_credentials_item", + "WorkflowCredentialsItem_AssemblyAi": ".workflow_credentials_item", + "WorkflowCredentialsItem_Azure": ".workflow_credentials_item", + "WorkflowCredentialsItem_AzureOpenai": ".workflow_credentials_item", + "WorkflowCredentialsItem_ByoSipTrunk": ".workflow_credentials_item", + "WorkflowCredentialsItem_Cartesia": ".workflow_credentials_item", + "WorkflowCredentialsItem_Cerebras": ".workflow_credentials_item", + "WorkflowCredentialsItem_Cloudflare": ".workflow_credentials_item", + "WorkflowCredentialsItem_CustomCredential": ".workflow_credentials_item", + "WorkflowCredentialsItem_CustomLlm": ".workflow_credentials_item", + "WorkflowCredentialsItem_DeepSeek": ".workflow_credentials_item", + "WorkflowCredentialsItem_Deepgram": ".workflow_credentials_item", + "WorkflowCredentialsItem_Deepinfra": ".workflow_credentials_item", + "WorkflowCredentialsItem_Email": ".workflow_credentials_item", + "WorkflowCredentialsItem_Gcp": ".workflow_credentials_item", + "WorkflowCredentialsItem_GhlOauth2Authorization": ".workflow_credentials_item", + "WorkflowCredentialsItem_Gladia": ".workflow_credentials_item", + "WorkflowCredentialsItem_Gohighlevel": ".workflow_credentials_item", + "WorkflowCredentialsItem_Google": ".workflow_credentials_item", + "WorkflowCredentialsItem_GoogleCalendarOauth2Authorization": ".workflow_credentials_item", + "WorkflowCredentialsItem_GoogleCalendarOauth2Client": ".workflow_credentials_item", + "WorkflowCredentialsItem_GoogleSheetsOauth2Authorization": ".workflow_credentials_item", + "WorkflowCredentialsItem_Groq": ".workflow_credentials_item", + "WorkflowCredentialsItem_Hume": ".workflow_credentials_item", + "WorkflowCredentialsItem_InflectionAi": ".workflow_credentials_item", + "WorkflowCredentialsItem_Inworld": ".workflow_credentials_item", + "WorkflowCredentialsItem_Langfuse": ".workflow_credentials_item", + "WorkflowCredentialsItem_Lmnt": ".workflow_credentials_item", + "WorkflowCredentialsItem_Make": ".workflow_credentials_item", + "WorkflowCredentialsItem_Minimax": ".workflow_credentials_item", + "WorkflowCredentialsItem_Mistral": ".workflow_credentials_item", + "WorkflowCredentialsItem_Neuphonic": ".workflow_credentials_item", + "WorkflowCredentialsItem_Openai": ".workflow_credentials_item", + "WorkflowCredentialsItem_Openrouter": ".workflow_credentials_item", + "WorkflowCredentialsItem_PerplexityAi": ".workflow_credentials_item", + "WorkflowCredentialsItem_Playht": ".workflow_credentials_item", + "WorkflowCredentialsItem_RimeAi": ".workflow_credentials_item", + "WorkflowCredentialsItem_Runpod": ".workflow_credentials_item", + "WorkflowCredentialsItem_S3": ".workflow_credentials_item", + "WorkflowCredentialsItem_SlackOauth2Authorization": ".workflow_credentials_item", + "WorkflowCredentialsItem_SlackWebhook": ".workflow_credentials_item", + "WorkflowCredentialsItem_SmallestAi": ".workflow_credentials_item", + "WorkflowCredentialsItem_Soniox": ".workflow_credentials_item", + "WorkflowCredentialsItem_Speechmatics": ".workflow_credentials_item", + "WorkflowCredentialsItem_Supabase": ".workflow_credentials_item", + "WorkflowCredentialsItem_Tavus": ".workflow_credentials_item", + "WorkflowCredentialsItem_TogetherAi": ".workflow_credentials_item", + "WorkflowCredentialsItem_Trieve": ".workflow_credentials_item", + "WorkflowCredentialsItem_Twilio": ".workflow_credentials_item", + "WorkflowCredentialsItem_Vonage": ".workflow_credentials_item", + "WorkflowCredentialsItem_Webhook": ".workflow_credentials_item", + "WorkflowCredentialsItem_Wellsaid": ".workflow_credentials_item", + "WorkflowCredentialsItem_Xai": ".workflow_credentials_item", + "WorkflowCustomModel": ".workflow_custom_model", + "WorkflowCustomModelMetadataSendMode": ".workflow_custom_model_metadata_send_mode", + "WorkflowGoogleModel": ".workflow_google_model", + "WorkflowGoogleModelModel": ".workflow_google_model_model", + "WorkflowHooksItem": ".workflow_hooks_item", + "WorkflowModel": ".workflow_model", + "WorkflowModel_Anthropic": ".workflow_model", + "WorkflowModel_AnthropicBedrock": ".workflow_model", + "WorkflowModel_CustomLlm": ".workflow_model", + "WorkflowModel_Google": ".workflow_model", + "WorkflowModel_Openai": ".workflow_model", + "WorkflowNodesItem": ".workflow_nodes_item", + "WorkflowNodesItem_Conversation": ".workflow_nodes_item", + "WorkflowNodesItem_Tool": ".workflow_nodes_item", + "WorkflowOpenAiModel": ".workflow_open_ai_model", + "WorkflowOpenAiModelModel": ".workflow_open_ai_model_model", + "WorkflowOverrides": ".workflow_overrides", + "WorkflowTranscriber": ".workflow_transcriber", + "WorkflowTranscriber_11Labs": ".workflow_transcriber", + "WorkflowTranscriber_AssemblyAi": ".workflow_transcriber", + "WorkflowTranscriber_Azure": ".workflow_transcriber", + "WorkflowTranscriber_Cartesia": ".workflow_transcriber", + "WorkflowTranscriber_CustomTranscriber": ".workflow_transcriber", + "WorkflowTranscriber_Deepgram": ".workflow_transcriber", + "WorkflowTranscriber_Gladia": ".workflow_transcriber", + "WorkflowTranscriber_Google": ".workflow_transcriber", + "WorkflowTranscriber_Openai": ".workflow_transcriber", + "WorkflowTranscriber_Soniox": ".workflow_transcriber", + "WorkflowTranscriber_Speechmatics": ".workflow_transcriber", + "WorkflowTranscriber_Talkscriber": ".workflow_transcriber", + "WorkflowUserEditable": ".workflow_user_editable", + "WorkflowUserEditableBackgroundSound": ".workflow_user_editable_background_sound", + "WorkflowUserEditableBackgroundSoundZero": ".workflow_user_editable_background_sound_zero", + "WorkflowUserEditableCredentialsItem": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_11Labs": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_Anthropic": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_AnthropicBedrock": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_Anyscale": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_AssemblyAi": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_Azure": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_AzureOpenai": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_ByoSipTrunk": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_Cartesia": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_Cerebras": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_Cloudflare": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_CustomCredential": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_CustomLlm": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_DeepSeek": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_Deepgram": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_Deepinfra": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_Email": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_Gcp": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_GhlOauth2Authorization": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_Gladia": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_Gohighlevel": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_Google": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_GoogleCalendarOauth2Authorization": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_GoogleCalendarOauth2Client": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_GoogleSheetsOauth2Authorization": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_Groq": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_Hume": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_InflectionAi": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_Inworld": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_Langfuse": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_Lmnt": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_Make": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_Minimax": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_Mistral": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_Neuphonic": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_Openai": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_Openrouter": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_PerplexityAi": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_Playht": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_RimeAi": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_Runpod": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_S3": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_SlackOauth2Authorization": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_SlackWebhook": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_SmallestAi": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_Soniox": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_Speechmatics": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_Supabase": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_Tavus": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_TogetherAi": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_Trieve": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_Twilio": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_Vonage": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_Webhook": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_Wellsaid": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableCredentialsItem_Xai": ".workflow_user_editable_credentials_item", + "WorkflowUserEditableHooksItem": ".workflow_user_editable_hooks_item", + "WorkflowUserEditableModel": ".workflow_user_editable_model", + "WorkflowUserEditableModel_Anthropic": ".workflow_user_editable_model", + "WorkflowUserEditableModel_AnthropicBedrock": ".workflow_user_editable_model", + "WorkflowUserEditableModel_CustomLlm": ".workflow_user_editable_model", + "WorkflowUserEditableModel_Google": ".workflow_user_editable_model", + "WorkflowUserEditableModel_Openai": ".workflow_user_editable_model", + "WorkflowUserEditableNodesItem": ".workflow_user_editable_nodes_item", + "WorkflowUserEditableNodesItem_Conversation": ".workflow_user_editable_nodes_item", + "WorkflowUserEditableNodesItem_Tool": ".workflow_user_editable_nodes_item", + "WorkflowUserEditableTranscriber": ".workflow_user_editable_transcriber", + "WorkflowUserEditableTranscriber_11Labs": ".workflow_user_editable_transcriber", + "WorkflowUserEditableTranscriber_AssemblyAi": ".workflow_user_editable_transcriber", + "WorkflowUserEditableTranscriber_Azure": ".workflow_user_editable_transcriber", + "WorkflowUserEditableTranscriber_Cartesia": ".workflow_user_editable_transcriber", + "WorkflowUserEditableTranscriber_CustomTranscriber": ".workflow_user_editable_transcriber", + "WorkflowUserEditableTranscriber_Deepgram": ".workflow_user_editable_transcriber", + "WorkflowUserEditableTranscriber_Gladia": ".workflow_user_editable_transcriber", + "WorkflowUserEditableTranscriber_Google": ".workflow_user_editable_transcriber", + "WorkflowUserEditableTranscriber_Openai": ".workflow_user_editable_transcriber", + "WorkflowUserEditableTranscriber_Soniox": ".workflow_user_editable_transcriber", + "WorkflowUserEditableTranscriber_Speechmatics": ".workflow_user_editable_transcriber", + "WorkflowUserEditableTranscriber_Talkscriber": ".workflow_user_editable_transcriber", + "WorkflowUserEditableVoice": ".workflow_user_editable_voice", + "WorkflowUserEditableVoice_11Labs": ".workflow_user_editable_voice", + "WorkflowUserEditableVoice_Azure": ".workflow_user_editable_voice", + "WorkflowUserEditableVoice_Cartesia": ".workflow_user_editable_voice", + "WorkflowUserEditableVoice_CustomVoice": ".workflow_user_editable_voice", + "WorkflowUserEditableVoice_Deepgram": ".workflow_user_editable_voice", + "WorkflowUserEditableVoice_Hume": ".workflow_user_editable_voice", + "WorkflowUserEditableVoice_Inworld": ".workflow_user_editable_voice", + "WorkflowUserEditableVoice_Lmnt": ".workflow_user_editable_voice", + "WorkflowUserEditableVoice_Minimax": ".workflow_user_editable_voice", + "WorkflowUserEditableVoice_Neuphonic": ".workflow_user_editable_voice", + "WorkflowUserEditableVoice_Openai": ".workflow_user_editable_voice", + "WorkflowUserEditableVoice_Playht": ".workflow_user_editable_voice", + "WorkflowUserEditableVoice_RimeAi": ".workflow_user_editable_voice", + "WorkflowUserEditableVoice_Sesame": ".workflow_user_editable_voice", + "WorkflowUserEditableVoice_SmallestAi": ".workflow_user_editable_voice", + "WorkflowUserEditableVoice_Tavus": ".workflow_user_editable_voice", + "WorkflowUserEditableVoice_Vapi": ".workflow_user_editable_voice", + "WorkflowUserEditableVoice_Wellsaid": ".workflow_user_editable_voice", + "WorkflowUserEditableVoicemailDetection": ".workflow_user_editable_voicemail_detection", + "WorkflowUserEditableVoicemailDetectionZero": ".workflow_user_editable_voicemail_detection_zero", + "WorkflowVoice": ".workflow_voice", + "WorkflowVoice_11Labs": ".workflow_voice", + "WorkflowVoice_Azure": ".workflow_voice", + "WorkflowVoice_Cartesia": ".workflow_voice", + "WorkflowVoice_CustomVoice": ".workflow_voice", + "WorkflowVoice_Deepgram": ".workflow_voice", + "WorkflowVoice_Hume": ".workflow_voice", + "WorkflowVoice_Inworld": ".workflow_voice", + "WorkflowVoice_Lmnt": ".workflow_voice", + "WorkflowVoice_Minimax": ".workflow_voice", + "WorkflowVoice_Neuphonic": ".workflow_voice", + "WorkflowVoice_Openai": ".workflow_voice", + "WorkflowVoice_Playht": ".workflow_voice", + "WorkflowVoice_RimeAi": ".workflow_voice", + "WorkflowVoice_Sesame": ".workflow_voice", + "WorkflowVoice_SmallestAi": ".workflow_voice", + "WorkflowVoice_Tavus": ".workflow_voice", + "WorkflowVoice_Vapi": ".workflow_voice", + "WorkflowVoice_Wellsaid": ".workflow_voice", + "WorkflowVoicemailDetection": ".workflow_voicemail_detection", + "WorkflowVoicemailDetectionZero": ".workflow_voicemail_detection_zero", + "XAiCredential": ".x_ai_credential", + "XAiCredentialProvider": ".x_ai_credential_provider", + "XaiModel": ".xai_model", + "XaiModelModel": ".xai_model_model", + "XaiModelToolsItem": ".xai_model_tools_item", + "XaiModelToolsItem_ApiRequest": ".xai_model_tools_item", + "XaiModelToolsItem_Bash": ".xai_model_tools_item", + "XaiModelToolsItem_Code": ".xai_model_tools_item", + "XaiModelToolsItem_Computer": ".xai_model_tools_item", + "XaiModelToolsItem_Dtmf": ".xai_model_tools_item", + "XaiModelToolsItem_EndCall": ".xai_model_tools_item", + "XaiModelToolsItem_Function": ".xai_model_tools_item", + "XaiModelToolsItem_GohighlevelCalendarAvailabilityCheck": ".xai_model_tools_item", + "XaiModelToolsItem_GohighlevelCalendarEventCreate": ".xai_model_tools_item", + "XaiModelToolsItem_GohighlevelContactCreate": ".xai_model_tools_item", + "XaiModelToolsItem_GohighlevelContactGet": ".xai_model_tools_item", + "XaiModelToolsItem_GoogleCalendarAvailabilityCheck": ".xai_model_tools_item", + "XaiModelToolsItem_GoogleCalendarEventCreate": ".xai_model_tools_item", + "XaiModelToolsItem_GoogleSheetsRowAppend": ".xai_model_tools_item", + "XaiModelToolsItem_Handoff": ".xai_model_tools_item", + "XaiModelToolsItem_Mcp": ".xai_model_tools_item", + "XaiModelToolsItem_Query": ".xai_model_tools_item", + "XaiModelToolsItem_SipRequest": ".xai_model_tools_item", + "XaiModelToolsItem_SlackMessageSend": ".xai_model_tools_item", + "XaiModelToolsItem_Sms": ".xai_model_tools_item", + "XaiModelToolsItem_TextEditor": ".xai_model_tools_item", + "XaiModelToolsItem_TransferCall": ".xai_model_tools_item", + "XaiModelToolsItem_Voicemail": ".xai_model_tools_item", + "XssSecurityFilter": ".xss_security_filter", + "XssSecurityFilterType": ".xss_security_filter_type", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "AddVoiceToProviderDto", + "AiEdgeCondition", + "AiEdgeConditionType", "Analysis", "AnalysisCost", "AnalysisCostAnalysisType", @@ -510,484 +9082,4176 @@ "AnalyticsQuery", "AnalyticsQueryGroupByItem", "AnalyticsQueryResult", + "AnalyticsQueryTable", + "AnthropicBedrockCredential", + "AnthropicBedrockCredentialAuthenticationPlan", + "AnthropicBedrockCredentialAuthenticationPlan_AwsIam", + "AnthropicBedrockCredentialAuthenticationPlan_AwsSts", + "AnthropicBedrockCredentialProvider", + "AnthropicBedrockCredentialRegion", + "AnthropicBedrockModel", + "AnthropicBedrockModelModel", + "AnthropicBedrockModelToolsItem", + "AnthropicBedrockModelToolsItem_ApiRequest", + "AnthropicBedrockModelToolsItem_Bash", + "AnthropicBedrockModelToolsItem_Code", + "AnthropicBedrockModelToolsItem_Computer", + "AnthropicBedrockModelToolsItem_Dtmf", + "AnthropicBedrockModelToolsItem_EndCall", + "AnthropicBedrockModelToolsItem_Function", + "AnthropicBedrockModelToolsItem_GohighlevelCalendarAvailabilityCheck", + "AnthropicBedrockModelToolsItem_GohighlevelCalendarEventCreate", + "AnthropicBedrockModelToolsItem_GohighlevelContactCreate", + "AnthropicBedrockModelToolsItem_GohighlevelContactGet", + "AnthropicBedrockModelToolsItem_GoogleCalendarAvailabilityCheck", + "AnthropicBedrockModelToolsItem_GoogleCalendarEventCreate", + "AnthropicBedrockModelToolsItem_GoogleSheetsRowAppend", + "AnthropicBedrockModelToolsItem_Handoff", + "AnthropicBedrockModelToolsItem_Mcp", + "AnthropicBedrockModelToolsItem_Query", + "AnthropicBedrockModelToolsItem_SipRequest", + "AnthropicBedrockModelToolsItem_SlackMessageSend", + "AnthropicBedrockModelToolsItem_Sms", + "AnthropicBedrockModelToolsItem_TextEditor", + "AnthropicBedrockModelToolsItem_TransferCall", + "AnthropicBedrockModelToolsItem_Voicemail", "AnthropicCredential", + "AnthropicCredentialProvider", "AnthropicModel", "AnthropicModelModel", "AnthropicModelToolsItem", + "AnthropicModelToolsItem_ApiRequest", + "AnthropicModelToolsItem_Bash", + "AnthropicModelToolsItem_Code", + "AnthropicModelToolsItem_Computer", + "AnthropicModelToolsItem_Dtmf", + "AnthropicModelToolsItem_EndCall", + "AnthropicModelToolsItem_Function", + "AnthropicModelToolsItem_GohighlevelCalendarAvailabilityCheck", + "AnthropicModelToolsItem_GohighlevelCalendarEventCreate", + "AnthropicModelToolsItem_GohighlevelContactCreate", + "AnthropicModelToolsItem_GohighlevelContactGet", + "AnthropicModelToolsItem_GoogleCalendarAvailabilityCheck", + "AnthropicModelToolsItem_GoogleCalendarEventCreate", + "AnthropicModelToolsItem_GoogleSheetsRowAppend", + "AnthropicModelToolsItem_Handoff", + "AnthropicModelToolsItem_Mcp", + "AnthropicModelToolsItem_Query", + "AnthropicModelToolsItem_SipRequest", + "AnthropicModelToolsItem_SlackMessageSend", + "AnthropicModelToolsItem_Sms", + "AnthropicModelToolsItem_TextEditor", + "AnthropicModelToolsItem_TransferCall", + "AnthropicModelToolsItem_Voicemail", + "AnthropicThinkingConfig", + "AnthropicThinkingConfigType", "AnyscaleCredential", + "AnyscaleCredentialProvider", "AnyscaleModel", "AnyscaleModelToolsItem", + "AnyscaleModelToolsItem_ApiRequest", + "AnyscaleModelToolsItem_Bash", + "AnyscaleModelToolsItem_Code", + "AnyscaleModelToolsItem_Computer", + "AnyscaleModelToolsItem_Dtmf", + "AnyscaleModelToolsItem_EndCall", + "AnyscaleModelToolsItem_Function", + "AnyscaleModelToolsItem_GohighlevelCalendarAvailabilityCheck", + "AnyscaleModelToolsItem_GohighlevelCalendarEventCreate", + "AnyscaleModelToolsItem_GohighlevelContactCreate", + "AnyscaleModelToolsItem_GohighlevelContactGet", + "AnyscaleModelToolsItem_GoogleCalendarAvailabilityCheck", + "AnyscaleModelToolsItem_GoogleCalendarEventCreate", + "AnyscaleModelToolsItem_GoogleSheetsRowAppend", + "AnyscaleModelToolsItem_Handoff", + "AnyscaleModelToolsItem_Mcp", + "AnyscaleModelToolsItem_Query", + "AnyscaleModelToolsItem_SipRequest", + "AnyscaleModelToolsItem_SlackMessageSend", + "AnyscaleModelToolsItem_Sms", + "AnyscaleModelToolsItem_TextEditor", + "AnyscaleModelToolsItem_TransferCall", + "AnyscaleModelToolsItem_Voicemail", + "ApiRequestTool", + "ApiRequestToolMessagesItem", + "ApiRequestToolMessagesItem_RequestComplete", + "ApiRequestToolMessagesItem_RequestFailed", + "ApiRequestToolMessagesItem_RequestResponseDelayed", + "ApiRequestToolMessagesItem_RequestStart", + "ApiRequestToolMethod", "Artifact", "ArtifactMessagesItem", "ArtifactPlan", - "AssignmentMutation", - "AssignmentMutationConditionsItem", + "ArtifactPlanRecordingFormat", + "AssemblyAiCredential", + "AssemblyAiCredentialProvider", + "AssemblyAiTranscriber", + "AssemblyAiTranscriberLanguage", + "AssemblyAiTranscriberSpeechModel", "Assistant", + "AssistantActivation", "AssistantBackgroundSound", + "AssistantBackgroundSoundZero", "AssistantClientMessagesItem", + "AssistantCredentialsItem", + "AssistantCredentialsItem_11Labs", + "AssistantCredentialsItem_Anthropic", + "AssistantCredentialsItem_AnthropicBedrock", + "AssistantCredentialsItem_Anyscale", + "AssistantCredentialsItem_AssemblyAi", + "AssistantCredentialsItem_Azure", + "AssistantCredentialsItem_AzureOpenai", + "AssistantCredentialsItem_ByoSipTrunk", + "AssistantCredentialsItem_Cartesia", + "AssistantCredentialsItem_Cerebras", + "AssistantCredentialsItem_Cloudflare", + "AssistantCredentialsItem_CustomCredential", + "AssistantCredentialsItem_CustomLlm", + "AssistantCredentialsItem_DeepSeek", + "AssistantCredentialsItem_Deepgram", + "AssistantCredentialsItem_Deepinfra", + "AssistantCredentialsItem_Email", + "AssistantCredentialsItem_Gcp", + "AssistantCredentialsItem_GhlOauth2Authorization", + "AssistantCredentialsItem_Gladia", + "AssistantCredentialsItem_Gohighlevel", + "AssistantCredentialsItem_Google", + "AssistantCredentialsItem_GoogleCalendarOauth2Authorization", + "AssistantCredentialsItem_GoogleCalendarOauth2Client", + "AssistantCredentialsItem_GoogleSheetsOauth2Authorization", + "AssistantCredentialsItem_Groq", + "AssistantCredentialsItem_Hume", + "AssistantCredentialsItem_InflectionAi", + "AssistantCredentialsItem_Inworld", + "AssistantCredentialsItem_Langfuse", + "AssistantCredentialsItem_Lmnt", + "AssistantCredentialsItem_Make", + "AssistantCredentialsItem_Minimax", + "AssistantCredentialsItem_Mistral", + "AssistantCredentialsItem_Neuphonic", + "AssistantCredentialsItem_Openai", + "AssistantCredentialsItem_Openrouter", + "AssistantCredentialsItem_PerplexityAi", + "AssistantCredentialsItem_Playht", + "AssistantCredentialsItem_RimeAi", + "AssistantCredentialsItem_Runpod", + "AssistantCredentialsItem_S3", + "AssistantCredentialsItem_SlackOauth2Authorization", + "AssistantCredentialsItem_SlackWebhook", + "AssistantCredentialsItem_SmallestAi", + "AssistantCredentialsItem_Soniox", + "AssistantCredentialsItem_Speechmatics", + "AssistantCredentialsItem_Supabase", + "AssistantCredentialsItem_Tavus", + "AssistantCredentialsItem_TogetherAi", + "AssistantCredentialsItem_Trieve", + "AssistantCredentialsItem_Twilio", + "AssistantCredentialsItem_Vonage", + "AssistantCredentialsItem_Webhook", + "AssistantCredentialsItem_Wellsaid", + "AssistantCredentialsItem_Xai", + "AssistantCustomEndpointingRule", "AssistantFirstMessageMode", + "AssistantHookAssistantSpeechInterrupted", + "AssistantHookCallEnding", + "AssistantHookCustomerSpeechInterrupted", + "AssistantHooksItem", + "AssistantMessage", + "AssistantMessageEvaluationContinuePlan", + "AssistantMessageJudgePlanAi", + "AssistantMessageJudgePlanAiModel", + "AssistantMessageJudgePlanAiModel_Anthropic", + "AssistantMessageJudgePlanAiModel_CustomLlm", + "AssistantMessageJudgePlanAiModel_Google", + "AssistantMessageJudgePlanAiModel_Openai", + "AssistantMessageJudgePlanAiType", + "AssistantMessageJudgePlanExact", + "AssistantMessageJudgePlanRegex", + "AssistantMessageRole", "AssistantModel", + "AssistantModel_Anthropic", + "AssistantModel_AnthropicBedrock", + "AssistantModel_Anyscale", + "AssistantModel_Cerebras", + "AssistantModel_CustomLlm", + "AssistantModel_DeepSeek", + "AssistantModel_Deepinfra", + "AssistantModel_Google", + "AssistantModel_Groq", + "AssistantModel_InflectionAi", + "AssistantModel_Minimax", + "AssistantModel_Openai", + "AssistantModel_Openrouter", + "AssistantModel_PerplexityAi", + "AssistantModel_TogetherAi", + "AssistantModel_Xai", "AssistantOverrides", "AssistantOverridesBackgroundSound", + "AssistantOverridesBackgroundSoundZero", "AssistantOverridesClientMessagesItem", + "AssistantOverridesCredentialsItem", + "AssistantOverridesCredentialsItem_11Labs", + "AssistantOverridesCredentialsItem_Anthropic", + "AssistantOverridesCredentialsItem_AnthropicBedrock", + "AssistantOverridesCredentialsItem_Anyscale", + "AssistantOverridesCredentialsItem_AssemblyAi", + "AssistantOverridesCredentialsItem_Azure", + "AssistantOverridesCredentialsItem_AzureOpenai", + "AssistantOverridesCredentialsItem_ByoSipTrunk", + "AssistantOverridesCredentialsItem_Cartesia", + "AssistantOverridesCredentialsItem_Cerebras", + "AssistantOverridesCredentialsItem_Cloudflare", + "AssistantOverridesCredentialsItem_CustomCredential", + "AssistantOverridesCredentialsItem_CustomLlm", + "AssistantOverridesCredentialsItem_DeepSeek", + "AssistantOverridesCredentialsItem_Deepgram", + "AssistantOverridesCredentialsItem_Deepinfra", + "AssistantOverridesCredentialsItem_Email", + "AssistantOverridesCredentialsItem_Gcp", + "AssistantOverridesCredentialsItem_GhlOauth2Authorization", + "AssistantOverridesCredentialsItem_Gladia", + "AssistantOverridesCredentialsItem_Gohighlevel", + "AssistantOverridesCredentialsItem_Google", + "AssistantOverridesCredentialsItem_GoogleCalendarOauth2Authorization", + "AssistantOverridesCredentialsItem_GoogleCalendarOauth2Client", + "AssistantOverridesCredentialsItem_GoogleSheetsOauth2Authorization", + "AssistantOverridesCredentialsItem_Groq", + "AssistantOverridesCredentialsItem_Hume", + "AssistantOverridesCredentialsItem_InflectionAi", + "AssistantOverridesCredentialsItem_Inworld", + "AssistantOverridesCredentialsItem_Langfuse", + "AssistantOverridesCredentialsItem_Lmnt", + "AssistantOverridesCredentialsItem_Make", + "AssistantOverridesCredentialsItem_Minimax", + "AssistantOverridesCredentialsItem_Mistral", + "AssistantOverridesCredentialsItem_Neuphonic", + "AssistantOverridesCredentialsItem_Openai", + "AssistantOverridesCredentialsItem_Openrouter", + "AssistantOverridesCredentialsItem_PerplexityAi", + "AssistantOverridesCredentialsItem_Playht", + "AssistantOverridesCredentialsItem_RimeAi", + "AssistantOverridesCredentialsItem_Runpod", + "AssistantOverridesCredentialsItem_S3", + "AssistantOverridesCredentialsItem_SlackOauth2Authorization", + "AssistantOverridesCredentialsItem_SlackWebhook", + "AssistantOverridesCredentialsItem_SmallestAi", + "AssistantOverridesCredentialsItem_Soniox", + "AssistantOverridesCredentialsItem_Speechmatics", + "AssistantOverridesCredentialsItem_Supabase", + "AssistantOverridesCredentialsItem_Tavus", + "AssistantOverridesCredentialsItem_TogetherAi", + "AssistantOverridesCredentialsItem_Trieve", + "AssistantOverridesCredentialsItem_Twilio", + "AssistantOverridesCredentialsItem_Vonage", + "AssistantOverridesCredentialsItem_Webhook", + "AssistantOverridesCredentialsItem_Wellsaid", + "AssistantOverridesCredentialsItem_Xai", "AssistantOverridesFirstMessageMode", + "AssistantOverridesHooksItem", "AssistantOverridesModel", + "AssistantOverridesModel_Anthropic", + "AssistantOverridesModel_AnthropicBedrock", + "AssistantOverridesModel_Anyscale", + "AssistantOverridesModel_Cerebras", + "AssistantOverridesModel_CustomLlm", + "AssistantOverridesModel_DeepSeek", + "AssistantOverridesModel_Deepinfra", + "AssistantOverridesModel_Google", + "AssistantOverridesModel_Groq", + "AssistantOverridesModel_InflectionAi", + "AssistantOverridesModel_Minimax", + "AssistantOverridesModel_Openai", + "AssistantOverridesModel_Openrouter", + "AssistantOverridesModel_PerplexityAi", + "AssistantOverridesModel_TogetherAi", + "AssistantOverridesModel_Xai", "AssistantOverridesServerMessagesItem", + "AssistantOverridesToolsAppendItem", + "AssistantOverridesToolsAppendItem_ApiRequest", + "AssistantOverridesToolsAppendItem_Bash", + "AssistantOverridesToolsAppendItem_Code", + "AssistantOverridesToolsAppendItem_Computer", + "AssistantOverridesToolsAppendItem_Dtmf", + "AssistantOverridesToolsAppendItem_EndCall", + "AssistantOverridesToolsAppendItem_Function", + "AssistantOverridesToolsAppendItem_GohighlevelCalendarAvailabilityCheck", + "AssistantOverridesToolsAppendItem_GohighlevelCalendarEventCreate", + "AssistantOverridesToolsAppendItem_GohighlevelContactCreate", + "AssistantOverridesToolsAppendItem_GohighlevelContactGet", + "AssistantOverridesToolsAppendItem_GoogleCalendarAvailabilityCheck", + "AssistantOverridesToolsAppendItem_GoogleCalendarEventCreate", + "AssistantOverridesToolsAppendItem_GoogleSheetsRowAppend", + "AssistantOverridesToolsAppendItem_Handoff", + "AssistantOverridesToolsAppendItem_Mcp", + "AssistantOverridesToolsAppendItem_Query", + "AssistantOverridesToolsAppendItem_SipRequest", + "AssistantOverridesToolsAppendItem_SlackMessageSend", + "AssistantOverridesToolsAppendItem_Sms", + "AssistantOverridesToolsAppendItem_TextEditor", + "AssistantOverridesToolsAppendItem_TransferCall", + "AssistantOverridesToolsAppendItem_Voicemail", "AssistantOverridesTranscriber", + "AssistantOverridesTranscriber_11Labs", + "AssistantOverridesTranscriber_AssemblyAi", + "AssistantOverridesTranscriber_Azure", + "AssistantOverridesTranscriber_Cartesia", + "AssistantOverridesTranscriber_CustomTranscriber", + "AssistantOverridesTranscriber_Deepgram", + "AssistantOverridesTranscriber_Gladia", + "AssistantOverridesTranscriber_Google", + "AssistantOverridesTranscriber_Openai", + "AssistantOverridesTranscriber_Soniox", + "AssistantOverridesTranscriber_Speechmatics", + "AssistantOverridesTranscriber_Talkscriber", "AssistantOverridesVoice", + "AssistantOverridesVoice_11Labs", + "AssistantOverridesVoice_Azure", + "AssistantOverridesVoice_Cartesia", + "AssistantOverridesVoice_CustomVoice", + "AssistantOverridesVoice_Deepgram", + "AssistantOverridesVoice_Hume", + "AssistantOverridesVoice_Inworld", + "AssistantOverridesVoice_Lmnt", + "AssistantOverridesVoice_Minimax", + "AssistantOverridesVoice_Neuphonic", + "AssistantOverridesVoice_Openai", + "AssistantOverridesVoice_Playht", + "AssistantOverridesVoice_RimeAi", + "AssistantOverridesVoice_Sesame", + "AssistantOverridesVoice_SmallestAi", + "AssistantOverridesVoice_Tavus", + "AssistantOverridesVoice_Vapi", + "AssistantOverridesVoice_Wellsaid", + "AssistantOverridesVoicemailDetection", + "AssistantOverridesVoicemailDetectionZero", + "AssistantPaginatedResponse", "AssistantServerMessagesItem", + "AssistantSpeechWordAlignmentTiming", + "AssistantSpeechWordProgressTiming", + "AssistantSpeechWordTimestamp", "AssistantTranscriber", + "AssistantTranscriber_11Labs", + "AssistantTranscriber_AssemblyAi", + "AssistantTranscriber_Azure", + "AssistantTranscriber_Cartesia", + "AssistantTranscriber_CustomTranscriber", + "AssistantTranscriber_Deepgram", + "AssistantTranscriber_Gladia", + "AssistantTranscriber_Google", + "AssistantTranscriber_Openai", + "AssistantTranscriber_Soniox", + "AssistantTranscriber_Speechmatics", + "AssistantTranscriber_Talkscriber", + "AssistantUserEditable", + "AssistantVersionPaginatedResponse", "AssistantVoice", + "AssistantVoice_11Labs", + "AssistantVoice_Azure", + "AssistantVoice_Cartesia", + "AssistantVoice_CustomVoice", + "AssistantVoice_Deepgram", + "AssistantVoice_Hume", + "AssistantVoice_Inworld", + "AssistantVoice_Lmnt", + "AssistantVoice_Minimax", + "AssistantVoice_Neuphonic", + "AssistantVoice_Openai", + "AssistantVoice_Playht", + "AssistantVoice_RimeAi", + "AssistantVoice_Sesame", + "AssistantVoice_SmallestAi", + "AssistantVoice_Tavus", + "AssistantVoice_Vapi", + "AssistantVoice_Wellsaid", + "AssistantVoicemailDetection", + "AssistantVoicemailDetectionZero", + "AutoReloadPlan", + "AwsStsAssumeRoleUser", + "AwsStsAuthenticationArtifact", + "AwsStsAuthenticationPlan", + "AwsStsAuthenticationSession", + "AwsStsCredentials", + "AwsiamCredentialsAuthenticationPlan", + "AzureBlobStorageBucketPlan", + "AzureCredential", + "AzureCredentialProvider", + "AzureCredentialRegion", + "AzureCredentialService", "AzureOpenAiCredential", "AzureOpenAiCredentialModelsItem", + "AzureOpenAiCredentialProvider", "AzureOpenAiCredentialRegion", + "AzureSpeechTranscriber", + "AzureSpeechTranscriberLanguage", + "AzureSpeechTranscriberSegmentationStrategy", "AzureVoice", "AzureVoiceId", "AzureVoiceIdEnum", - "BlockCompleteMessage", - "BlockCompleteMessageConditionsItem", - "BlockStartMessage", - "BlockStartMessageConditionsItem", + "BackgroundSpeechDenoisingPlan", + "BackoffPlan", + "BarInsight", + "BarInsightFromCallTable", + "BarInsightFromCallTableGroupBy", + "BarInsightFromCallTableQueriesItem", + "BarInsightFromCallTableType", + "BarInsightGroupBy", + "BarInsightMetadata", + "BarInsightQueriesItem", + "BashTool", + "BashToolMessagesItem", + "BashToolMessagesItem_RequestComplete", + "BashToolMessagesItem_RequestFailed", + "BashToolMessagesItem_RequestResponseDelayed", + "BashToolMessagesItem_RequestStart", + "BashToolName", + "BashToolSubType", + "BashToolWithToolCall", + "BashToolWithToolCallMessagesItem", + "BashToolWithToolCallMessagesItem_RequestComplete", + "BashToolWithToolCallMessagesItem_RequestFailed", + "BashToolWithToolCallMessagesItem_RequestResponseDelayed", + "BashToolWithToolCallMessagesItem_RequestStart", + "BashToolWithToolCallName", + "BashToolWithToolCallSubType", + "BearerAuthenticationPlan", "BotMessage", + "BothCustomEndpointingRule", "BucketPlan", - "BuyPhoneNumberDto", - "BuyPhoneNumberDtoFallbackDestination", "ByoPhoneNumber", "ByoPhoneNumberFallbackDestination", + "ByoPhoneNumberFallbackDestination_Number", + "ByoPhoneNumberFallbackDestination_Sip", + "ByoPhoneNumberHooksItem", + "ByoPhoneNumberHooksItem_CallEnding", + "ByoPhoneNumberHooksItem_CallRinging", + "ByoPhoneNumberStatus", "ByoSipTrunkCredential", + "ByoSipTrunkCredentialProvider", "Call", + "CallBatchError", + "CallBatchResponse", "CallCostsItem", + "CallCostsItem_Analysis", + "CallCostsItem_KnowledgeBase", + "CallCostsItem_Model", + "CallCostsItem_Transcriber", + "CallCostsItem_Transport", + "CallCostsItem_Vapi", + "CallCostsItem_Voice", + "CallCostsItem_VoicemailDetection", "CallDestination", + "CallDestination_Number", + "CallDestination_Sip", "CallEndedReason", + "CallHookAssistantSpeechInterrupted", + "CallHookAssistantSpeechInterruptedDoItem", + "CallHookAssistantSpeechInterruptedDoItem_MessageAdd", + "CallHookAssistantSpeechInterruptedDoItem_Say", + "CallHookAssistantSpeechInterruptedDoItem_Tool", + "CallHookAssistantSpeechInterruptedOn", + "CallHookCallEnding", + "CallHookCallEndingDoItem", + "CallHookCallEndingDoItem_MessageAdd", + "CallHookCallEndingDoItem_Tool", + "CallHookCallEndingOn", + "CallHookCustomerSpeechInterrupted", + "CallHookCustomerSpeechInterruptedDoItem", + "CallHookCustomerSpeechInterruptedDoItem_MessageAdd", + "CallHookCustomerSpeechInterruptedDoItem_Say", + "CallHookCustomerSpeechInterruptedDoItem_Tool", + "CallHookCustomerSpeechInterruptedOn", + "CallHookCustomerSpeechTimeout", + "CallHookCustomerSpeechTimeoutDoItem", + "CallHookCustomerSpeechTimeoutDoItem_MessageAdd", + "CallHookCustomerSpeechTimeoutDoItem_Say", + "CallHookCustomerSpeechTimeoutDoItem_Tool", + "CallHookFilter", + "CallHookFilterType", + "CallHookModelResponseTimeout", + "CallHookModelResponseTimeoutDoItem", + "CallHookModelResponseTimeoutDoItem_MessageAdd", + "CallHookModelResponseTimeoutDoItem_Say", + "CallHookModelResponseTimeoutDoItem_Tool", + "CallHookModelResponseTimeoutOn", + "CallHookTranscriberEndpointedSpeechLowConfidence", + "CallHookTranscriberEndpointedSpeechLowConfidenceDoItem", + "CallHookTranscriberEndpointedSpeechLowConfidenceDoItem_MessageAdd", + "CallHookTranscriberEndpointedSpeechLowConfidenceDoItem_Say", + "CallHookTranscriberEndpointedSpeechLowConfidenceDoItem_Tool", "CallMessagesItem", "CallPaginatedResponse", "CallPhoneCallProvider", "CallPhoneCallTransport", "CallStatus", "CallType", - "CallbackStep", - "CallbackStepBlock", + "Campaign", + "CampaignEndedReason", + "CampaignPaginatedResponse", + "CampaignStatus", "CartesiaCredential", + "CartesiaCredentialProvider", + "CartesiaExperimentalControls", + "CartesiaExperimentalControlsEmotion", + "CartesiaGenerationConfig", + "CartesiaGenerationConfigExperimental", + "CartesiaPronunciationDictItem", + "CartesiaPronunciationDictionary", + "CartesiaSpeedControl", + "CartesiaSpeedControlZero", + "CartesiaTranscriber", + "CartesiaTranscriberLanguage", + "CartesiaTranscriberModel", "CartesiaVoice", "CartesiaVoiceLanguage", "CartesiaVoiceModel", + "CerebrasCredential", + "CerebrasCredentialProvider", + "CerebrasModel", + "CerebrasModelModel", + "CerebrasModelToolsItem", + "CerebrasModelToolsItem_ApiRequest", + "CerebrasModelToolsItem_Bash", + "CerebrasModelToolsItem_Code", + "CerebrasModelToolsItem_Computer", + "CerebrasModelToolsItem_Dtmf", + "CerebrasModelToolsItem_EndCall", + "CerebrasModelToolsItem_Function", + "CerebrasModelToolsItem_GohighlevelCalendarAvailabilityCheck", + "CerebrasModelToolsItem_GohighlevelCalendarEventCreate", + "CerebrasModelToolsItem_GohighlevelContactCreate", + "CerebrasModelToolsItem_GohighlevelContactGet", + "CerebrasModelToolsItem_GoogleCalendarAvailabilityCheck", + "CerebrasModelToolsItem_GoogleCalendarEventCreate", + "CerebrasModelToolsItem_GoogleSheetsRowAppend", + "CerebrasModelToolsItem_Handoff", + "CerebrasModelToolsItem_Mcp", + "CerebrasModelToolsItem_Query", + "CerebrasModelToolsItem_SipRequest", + "CerebrasModelToolsItem_SlackMessageSend", + "CerebrasModelToolsItem_Sms", + "CerebrasModelToolsItem_TextEditor", + "CerebrasModelToolsItem_TransferCall", + "CerebrasModelToolsItem_Voicemail", + "Chat", + "ChatAssistantOverrides", + "ChatCost", + "ChatCostsItem", + "ChatCostsItem_Chat", + "ChatCostsItem_Model", + "ChatEvalAssistantMessageEvaluation", + "ChatEvalAssistantMessageEvaluationJudgePlan", + "ChatEvalAssistantMessageEvaluationJudgePlan_Ai", + "ChatEvalAssistantMessageEvaluationJudgePlan_Exact", + "ChatEvalAssistantMessageEvaluationJudgePlan_Regex", + "ChatEvalAssistantMessageEvaluationRole", + "ChatEvalAssistantMessageMock", + "ChatEvalAssistantMessageMockRole", + "ChatEvalAssistantMessageMockToolCall", + "ChatEvalSystemMessageMock", + "ChatEvalSystemMessageMockRole", + "ChatEvalToolResponseMessageEvaluation", + "ChatEvalToolResponseMessageEvaluationRole", + "ChatEvalToolResponseMessageMock", + "ChatEvalToolResponseMessageMockRole", + "ChatEvalUserMessageMock", + "ChatEvalUserMessageMockRole", + "ChatInput", + "ChatInputOneItem", + "ChatMessagesItem", + "ChatOutputItem", + "ChatPaginatedResponse", "ChunkPlan", "ClientInboundMessage", "ClientInboundMessageAddMessage", "ClientInboundMessageControl", "ClientInboundMessageControlControl", + "ClientInboundMessageEndCall", "ClientInboundMessageMessage", + "ClientInboundMessageMessage_AddMessage", + "ClientInboundMessageMessage_Control", + "ClientInboundMessageMessage_EndCall", + "ClientInboundMessageMessage_Say", + "ClientInboundMessageMessage_SendTransportMessage", + "ClientInboundMessageMessage_Transfer", "ClientInboundMessageSay", + "ClientInboundMessageSendTransportMessage", + "ClientInboundMessageSendTransportMessageMessage", + "ClientInboundMessageSendTransportMessageMessage_Twilio", + "ClientInboundMessageSendTransportMessageMessage_VapiSip", + "ClientInboundMessageTransfer", + "ClientInboundMessageTransferDestination", + "ClientInboundMessageTransferDestination_Number", + "ClientInboundMessageTransferDestination_Sip", "ClientMessage", + "ClientMessageAssistantSpeech", + "ClientMessageAssistantSpeechPhoneNumber", + "ClientMessageAssistantSpeechPhoneNumber_ByoPhoneNumber", + "ClientMessageAssistantSpeechPhoneNumber_Telnyx", + "ClientMessageAssistantSpeechPhoneNumber_Twilio", + "ClientMessageAssistantSpeechPhoneNumber_Vapi", + "ClientMessageAssistantSpeechPhoneNumber_Vonage", + "ClientMessageAssistantSpeechSource", + "ClientMessageAssistantSpeechTiming", + "ClientMessageAssistantSpeechTiming_WordAlignment", + "ClientMessageAssistantSpeechTiming_WordProgress", + "ClientMessageAssistantSpeechType", + "ClientMessageAssistantStarted", + "ClientMessageAssistantStartedPhoneNumber", + "ClientMessageAssistantStartedPhoneNumber_ByoPhoneNumber", + "ClientMessageAssistantStartedPhoneNumber_Telnyx", + "ClientMessageAssistantStartedPhoneNumber_Twilio", + "ClientMessageAssistantStartedPhoneNumber_Vapi", + "ClientMessageAssistantStartedPhoneNumber_Vonage", + "ClientMessageAssistantStartedType", + "ClientMessageCallDeleteFailed", + "ClientMessageCallDeleteFailedPhoneNumber", + "ClientMessageCallDeleteFailedPhoneNumber_ByoPhoneNumber", + "ClientMessageCallDeleteFailedPhoneNumber_Telnyx", + "ClientMessageCallDeleteFailedPhoneNumber_Twilio", + "ClientMessageCallDeleteFailedPhoneNumber_Vapi", + "ClientMessageCallDeleteFailedPhoneNumber_Vonage", + "ClientMessageCallDeleteFailedType", + "ClientMessageCallDeleted", + "ClientMessageCallDeletedPhoneNumber", + "ClientMessageCallDeletedPhoneNumber_ByoPhoneNumber", + "ClientMessageCallDeletedPhoneNumber_Telnyx", + "ClientMessageCallDeletedPhoneNumber_Twilio", + "ClientMessageCallDeletedPhoneNumber_Vapi", + "ClientMessageCallDeletedPhoneNumber_Vonage", + "ClientMessageCallDeletedType", + "ClientMessageChatCreated", + "ClientMessageChatCreatedPhoneNumber", + "ClientMessageChatCreatedPhoneNumber_ByoPhoneNumber", + "ClientMessageChatCreatedPhoneNumber_Telnyx", + "ClientMessageChatCreatedPhoneNumber_Twilio", + "ClientMessageChatCreatedPhoneNumber_Vapi", + "ClientMessageChatCreatedPhoneNumber_Vonage", + "ClientMessageChatCreatedType", + "ClientMessageChatDeleted", + "ClientMessageChatDeletedPhoneNumber", + "ClientMessageChatDeletedPhoneNumber_ByoPhoneNumber", + "ClientMessageChatDeletedPhoneNumber_Telnyx", + "ClientMessageChatDeletedPhoneNumber_Twilio", + "ClientMessageChatDeletedPhoneNumber_Vapi", + "ClientMessageChatDeletedPhoneNumber_Vonage", + "ClientMessageChatDeletedType", "ClientMessageConversationUpdate", "ClientMessageConversationUpdateMessagesItem", + "ClientMessageConversationUpdatePhoneNumber", + "ClientMessageConversationUpdatePhoneNumber_ByoPhoneNumber", + "ClientMessageConversationUpdatePhoneNumber_Telnyx", + "ClientMessageConversationUpdatePhoneNumber_Twilio", + "ClientMessageConversationUpdatePhoneNumber_Vapi", + "ClientMessageConversationUpdatePhoneNumber_Vonage", + "ClientMessageConversationUpdateType", "ClientMessageHang", - "ClientMessageLanguageChanged", + "ClientMessageHangPhoneNumber", + "ClientMessageHangPhoneNumber_ByoPhoneNumber", + "ClientMessageHangPhoneNumber_Telnyx", + "ClientMessageHangPhoneNumber_Twilio", + "ClientMessageHangPhoneNumber_Vapi", + "ClientMessageHangPhoneNumber_Vonage", + "ClientMessageHangType", + "ClientMessageLanguageChangeDetected", + "ClientMessageLanguageChangeDetectedPhoneNumber", + "ClientMessageLanguageChangeDetectedPhoneNumber_ByoPhoneNumber", + "ClientMessageLanguageChangeDetectedPhoneNumber_Telnyx", + "ClientMessageLanguageChangeDetectedPhoneNumber_Twilio", + "ClientMessageLanguageChangeDetectedPhoneNumber_Vapi", + "ClientMessageLanguageChangeDetectedPhoneNumber_Vonage", + "ClientMessageLanguageChangeDetectedType", "ClientMessageMessage", "ClientMessageMetadata", + "ClientMessageMetadataPhoneNumber", + "ClientMessageMetadataPhoneNumber_ByoPhoneNumber", + "ClientMessageMetadataPhoneNumber_Telnyx", + "ClientMessageMetadataPhoneNumber_Twilio", + "ClientMessageMetadataPhoneNumber_Vapi", + "ClientMessageMetadataPhoneNumber_Vonage", + "ClientMessageMetadataType", "ClientMessageModelOutput", + "ClientMessageModelOutputPhoneNumber", + "ClientMessageModelOutputPhoneNumber_ByoPhoneNumber", + "ClientMessageModelOutputPhoneNumber_Telnyx", + "ClientMessageModelOutputPhoneNumber_Twilio", + "ClientMessageModelOutputPhoneNumber_Vapi", + "ClientMessageModelOutputPhoneNumber_Vonage", + "ClientMessageModelOutputType", + "ClientMessageSessionCreated", + "ClientMessageSessionCreatedPhoneNumber", + "ClientMessageSessionCreatedPhoneNumber_ByoPhoneNumber", + "ClientMessageSessionCreatedPhoneNumber_Telnyx", + "ClientMessageSessionCreatedPhoneNumber_Twilio", + "ClientMessageSessionCreatedPhoneNumber_Vapi", + "ClientMessageSessionCreatedPhoneNumber_Vonage", + "ClientMessageSessionCreatedType", + "ClientMessageSessionDeleted", + "ClientMessageSessionDeletedPhoneNumber", + "ClientMessageSessionDeletedPhoneNumber_ByoPhoneNumber", + "ClientMessageSessionDeletedPhoneNumber_Telnyx", + "ClientMessageSessionDeletedPhoneNumber_Twilio", + "ClientMessageSessionDeletedPhoneNumber_Vapi", + "ClientMessageSessionDeletedPhoneNumber_Vonage", + "ClientMessageSessionDeletedType", + "ClientMessageSessionUpdated", + "ClientMessageSessionUpdatedPhoneNumber", + "ClientMessageSessionUpdatedPhoneNumber_ByoPhoneNumber", + "ClientMessageSessionUpdatedPhoneNumber_Telnyx", + "ClientMessageSessionUpdatedPhoneNumber_Twilio", + "ClientMessageSessionUpdatedPhoneNumber_Vapi", + "ClientMessageSessionUpdatedPhoneNumber_Vonage", + "ClientMessageSessionUpdatedType", "ClientMessageSpeechUpdate", + "ClientMessageSpeechUpdatePhoneNumber", + "ClientMessageSpeechUpdatePhoneNumber_ByoPhoneNumber", + "ClientMessageSpeechUpdatePhoneNumber_Telnyx", + "ClientMessageSpeechUpdatePhoneNumber_Twilio", + "ClientMessageSpeechUpdatePhoneNumber_Vapi", + "ClientMessageSpeechUpdatePhoneNumber_Vonage", "ClientMessageSpeechUpdateRole", "ClientMessageSpeechUpdateStatus", + "ClientMessageSpeechUpdateType", "ClientMessageToolCalls", + "ClientMessageToolCallsPhoneNumber", + "ClientMessageToolCallsPhoneNumber_ByoPhoneNumber", + "ClientMessageToolCallsPhoneNumber_Telnyx", + "ClientMessageToolCallsPhoneNumber_Twilio", + "ClientMessageToolCallsPhoneNumber_Vapi", + "ClientMessageToolCallsPhoneNumber_Vonage", "ClientMessageToolCallsResult", + "ClientMessageToolCallsResultPhoneNumber", + "ClientMessageToolCallsResultPhoneNumber_ByoPhoneNumber", + "ClientMessageToolCallsResultPhoneNumber_Telnyx", + "ClientMessageToolCallsResultPhoneNumber_Twilio", + "ClientMessageToolCallsResultPhoneNumber_Vapi", + "ClientMessageToolCallsResultPhoneNumber_Vonage", + "ClientMessageToolCallsResultType", "ClientMessageToolCallsToolWithToolCallListItem", + "ClientMessageToolCallsToolWithToolCallListItem_Bash", + "ClientMessageToolCallsToolWithToolCallListItem_Computer", + "ClientMessageToolCallsToolWithToolCallListItem_Function", + "ClientMessageToolCallsToolWithToolCallListItem_Ghl", + "ClientMessageToolCallsToolWithToolCallListItem_GoogleCalendarEventCreate", + "ClientMessageToolCallsToolWithToolCallListItem_Make", + "ClientMessageToolCallsToolWithToolCallListItem_TextEditor", + "ClientMessageToolCallsType", "ClientMessageTranscript", + "ClientMessageTranscriptPhoneNumber", + "ClientMessageTranscriptPhoneNumber_ByoPhoneNumber", + "ClientMessageTranscriptPhoneNumber_Telnyx", + "ClientMessageTranscriptPhoneNumber_Twilio", + "ClientMessageTranscriptPhoneNumber_Vapi", + "ClientMessageTranscriptPhoneNumber_Vonage", "ClientMessageTranscriptRole", "ClientMessageTranscriptTranscriptType", + "ClientMessageTranscriptType", + "ClientMessageTransferUpdate", + "ClientMessageTransferUpdateDestination", + "ClientMessageTransferUpdateDestination_Assistant", + "ClientMessageTransferUpdateDestination_Number", + "ClientMessageTransferUpdateDestination_Sip", + "ClientMessageTransferUpdatePhoneNumber", + "ClientMessageTransferUpdatePhoneNumber_ByoPhoneNumber", + "ClientMessageTransferUpdatePhoneNumber_Telnyx", + "ClientMessageTransferUpdatePhoneNumber_Twilio", + "ClientMessageTransferUpdatePhoneNumber_Vapi", + "ClientMessageTransferUpdatePhoneNumber_Vonage", + "ClientMessageTransferUpdateType", "ClientMessageUserInterrupted", + "ClientMessageUserInterruptedPhoneNumber", + "ClientMessageUserInterruptedPhoneNumber_ByoPhoneNumber", + "ClientMessageUserInterruptedPhoneNumber_Telnyx", + "ClientMessageUserInterruptedPhoneNumber_Twilio", + "ClientMessageUserInterruptedPhoneNumber_Vapi", + "ClientMessageUserInterruptedPhoneNumber_Vonage", + "ClientMessageUserInterruptedType", "ClientMessageVoiceInput", + "ClientMessageVoiceInputPhoneNumber", + "ClientMessageVoiceInputPhoneNumber_ByoPhoneNumber", + "ClientMessageVoiceInputPhoneNumber_Telnyx", + "ClientMessageVoiceInputPhoneNumber_Twilio", + "ClientMessageVoiceInputPhoneNumber_Vapi", + "ClientMessageVoiceInputPhoneNumber_Vonage", + "ClientMessageVoiceInputType", + "ClientMessageWorkflowNodeStarted", + "ClientMessageWorkflowNodeStartedPhoneNumber", + "ClientMessageWorkflowNodeStartedPhoneNumber_ByoPhoneNumber", + "ClientMessageWorkflowNodeStartedPhoneNumber_Telnyx", + "ClientMessageWorkflowNodeStartedPhoneNumber_Twilio", + "ClientMessageWorkflowNodeStartedPhoneNumber_Vapi", + "ClientMessageWorkflowNodeStartedPhoneNumber_Vonage", + "ClientMessageWorkflowNodeStartedType", "CloneVoiceDto", + "CloudflareCredential", + "CloudflareCredentialProvider", + "CloudflareR2BucketPlan", + "CodeTool", + "CodeToolEnvironmentVariable", + "CodeToolMessagesItem", + "CodeToolMessagesItem_RequestComplete", + "CodeToolMessagesItem_RequestFailed", + "CodeToolMessagesItem_RequestResponseDelayed", + "CodeToolMessagesItem_RequestStart", + "Compliance", + "ComplianceOverride", + "CompliancePlan", + "CompliancePlanRecordingConsentPlan", + "CompliancePlanRecordingConsentPlan_StayOnLine", + "CompliancePlanRecordingConsentPlan_Verbal", + "ComputerTool", + "ComputerToolMessagesItem", + "ComputerToolMessagesItem_RequestComplete", + "ComputerToolMessagesItem_RequestFailed", + "ComputerToolMessagesItem_RequestResponseDelayed", + "ComputerToolMessagesItem_RequestStart", + "ComputerToolName", + "ComputerToolSubType", + "ComputerToolWithToolCall", + "ComputerToolWithToolCallMessagesItem", + "ComputerToolWithToolCallMessagesItem_RequestComplete", + "ComputerToolWithToolCallMessagesItem_RequestFailed", + "ComputerToolWithToolCallMessagesItem_RequestResponseDelayed", + "ComputerToolWithToolCallMessagesItem_RequestStart", + "ComputerToolWithToolCallName", + "ComputerToolWithToolCallSubType", "Condition", "ConditionOperator", - "ConversationBlock", - "ConversationBlockMessagesItem", + "ContextEngineeringPlanAll", + "ContextEngineeringPlanLastNMessages", + "ContextEngineeringPlanNone", + "ContextEngineeringPlanUserAndAssistantMessages", + "ConversationNode", + "ConversationNodeModel", + "ConversationNodeModel_Anthropic", + "ConversationNodeModel_AnthropicBedrock", + "ConversationNodeModel_CustomLlm", + "ConversationNodeModel_Google", + "ConversationNodeModel_Openai", + "ConversationNodeToolsItem", + "ConversationNodeToolsItem_ApiRequest", + "ConversationNodeToolsItem_Bash", + "ConversationNodeToolsItem_Code", + "ConversationNodeToolsItem_Computer", + "ConversationNodeToolsItem_Dtmf", + "ConversationNodeToolsItem_EndCall", + "ConversationNodeToolsItem_Function", + "ConversationNodeToolsItem_GohighlevelCalendarAvailabilityCheck", + "ConversationNodeToolsItem_GohighlevelCalendarEventCreate", + "ConversationNodeToolsItem_GohighlevelContactCreate", + "ConversationNodeToolsItem_GohighlevelContactGet", + "ConversationNodeToolsItem_GoogleCalendarAvailabilityCheck", + "ConversationNodeToolsItem_GoogleCalendarEventCreate", + "ConversationNodeToolsItem_GoogleSheetsRowAppend", + "ConversationNodeToolsItem_Handoff", + "ConversationNodeToolsItem_Mcp", + "ConversationNodeToolsItem_Query", + "ConversationNodeToolsItem_SipRequest", + "ConversationNodeToolsItem_SlackMessageSend", + "ConversationNodeToolsItem_Sms", + "ConversationNodeToolsItem_TextEditor", + "ConversationNodeToolsItem_TransferCall", + "ConversationNodeToolsItem_Voicemail", + "ConversationNodeTranscriber", + "ConversationNodeTranscriber_11Labs", + "ConversationNodeTranscriber_AssemblyAi", + "ConversationNodeTranscriber_Azure", + "ConversationNodeTranscriber_Cartesia", + "ConversationNodeTranscriber_CustomTranscriber", + "ConversationNodeTranscriber_Deepgram", + "ConversationNodeTranscriber_Gladia", + "ConversationNodeTranscriber_Google", + "ConversationNodeTranscriber_Openai", + "ConversationNodeTranscriber_Soniox", + "ConversationNodeTranscriber_Speechmatics", + "ConversationNodeTranscriber_Talkscriber", + "ConversationNodeVoice", + "ConversationNodeVoice_11Labs", + "ConversationNodeVoice_Azure", + "ConversationNodeVoice_Cartesia", + "ConversationNodeVoice_CustomVoice", + "ConversationNodeVoice_Deepgram", + "ConversationNodeVoice_Hume", + "ConversationNodeVoice_Inworld", + "ConversationNodeVoice_Lmnt", + "ConversationNodeVoice_Minimax", + "ConversationNodeVoice_Neuphonic", + "ConversationNodeVoice_Openai", + "ConversationNodeVoice_Playht", + "ConversationNodeVoice_RimeAi", + "ConversationNodeVoice_Sesame", + "ConversationNodeVoice_SmallestAi", + "ConversationNodeVoice_Tavus", + "ConversationNodeVoice_Vapi", + "ConversationNodeVoice_Wellsaid", "CostBreakdown", + "CreateAnthropicBedrockCredentialDto", + "CreateAnthropicBedrockCredentialDtoAuthenticationPlan", + "CreateAnthropicBedrockCredentialDtoAuthenticationPlan_AwsIam", + "CreateAnthropicBedrockCredentialDtoAuthenticationPlan_AwsSts", + "CreateAnthropicBedrockCredentialDtoRegion", "CreateAnthropicCredentialDto", "CreateAnyscaleCredentialDto", + "CreateApiRequestToolDto", + "CreateApiRequestToolDtoMessagesItem", + "CreateApiRequestToolDtoMessagesItem_RequestComplete", + "CreateApiRequestToolDtoMessagesItem_RequestFailed", + "CreateApiRequestToolDtoMessagesItem_RequestResponseDelayed", + "CreateApiRequestToolDtoMessagesItem_RequestStart", + "CreateApiRequestToolDtoMethod", + "CreateAssemblyAiCredentialDto", "CreateAssistantDto", "CreateAssistantDtoBackgroundSound", + "CreateAssistantDtoBackgroundSoundZero", "CreateAssistantDtoClientMessagesItem", + "CreateAssistantDtoCredentialsItem", + "CreateAssistantDtoCredentialsItem_11Labs", + "CreateAssistantDtoCredentialsItem_Anthropic", + "CreateAssistantDtoCredentialsItem_AnthropicBedrock", + "CreateAssistantDtoCredentialsItem_Anyscale", + "CreateAssistantDtoCredentialsItem_AssemblyAi", + "CreateAssistantDtoCredentialsItem_Azure", + "CreateAssistantDtoCredentialsItem_AzureOpenai", + "CreateAssistantDtoCredentialsItem_ByoSipTrunk", + "CreateAssistantDtoCredentialsItem_Cartesia", + "CreateAssistantDtoCredentialsItem_Cerebras", + "CreateAssistantDtoCredentialsItem_Cloudflare", + "CreateAssistantDtoCredentialsItem_CustomCredential", + "CreateAssistantDtoCredentialsItem_CustomLlm", + "CreateAssistantDtoCredentialsItem_DeepSeek", + "CreateAssistantDtoCredentialsItem_Deepgram", + "CreateAssistantDtoCredentialsItem_Deepinfra", + "CreateAssistantDtoCredentialsItem_Email", + "CreateAssistantDtoCredentialsItem_Gcp", + "CreateAssistantDtoCredentialsItem_GhlOauth2Authorization", + "CreateAssistantDtoCredentialsItem_Gladia", + "CreateAssistantDtoCredentialsItem_Gohighlevel", + "CreateAssistantDtoCredentialsItem_Google", + "CreateAssistantDtoCredentialsItem_GoogleCalendarOauth2Authorization", + "CreateAssistantDtoCredentialsItem_GoogleCalendarOauth2Client", + "CreateAssistantDtoCredentialsItem_GoogleSheetsOauth2Authorization", + "CreateAssistantDtoCredentialsItem_Groq", + "CreateAssistantDtoCredentialsItem_Hume", + "CreateAssistantDtoCredentialsItem_InflectionAi", + "CreateAssistantDtoCredentialsItem_Inworld", + "CreateAssistantDtoCredentialsItem_Langfuse", + "CreateAssistantDtoCredentialsItem_Lmnt", + "CreateAssistantDtoCredentialsItem_Make", + "CreateAssistantDtoCredentialsItem_Minimax", + "CreateAssistantDtoCredentialsItem_Mistral", + "CreateAssistantDtoCredentialsItem_Neuphonic", + "CreateAssistantDtoCredentialsItem_Openai", + "CreateAssistantDtoCredentialsItem_Openrouter", + "CreateAssistantDtoCredentialsItem_PerplexityAi", + "CreateAssistantDtoCredentialsItem_Playht", + "CreateAssistantDtoCredentialsItem_RimeAi", + "CreateAssistantDtoCredentialsItem_Runpod", + "CreateAssistantDtoCredentialsItem_S3", + "CreateAssistantDtoCredentialsItem_SlackOauth2Authorization", + "CreateAssistantDtoCredentialsItem_SlackWebhook", + "CreateAssistantDtoCredentialsItem_SmallestAi", + "CreateAssistantDtoCredentialsItem_Soniox", + "CreateAssistantDtoCredentialsItem_Speechmatics", + "CreateAssistantDtoCredentialsItem_Supabase", + "CreateAssistantDtoCredentialsItem_Tavus", + "CreateAssistantDtoCredentialsItem_TogetherAi", + "CreateAssistantDtoCredentialsItem_Trieve", + "CreateAssistantDtoCredentialsItem_Twilio", + "CreateAssistantDtoCredentialsItem_Vonage", + "CreateAssistantDtoCredentialsItem_Webhook", + "CreateAssistantDtoCredentialsItem_Wellsaid", + "CreateAssistantDtoCredentialsItem_Xai", "CreateAssistantDtoFirstMessageMode", + "CreateAssistantDtoHooksItem", "CreateAssistantDtoModel", + "CreateAssistantDtoModel_Anthropic", + "CreateAssistantDtoModel_AnthropicBedrock", + "CreateAssistantDtoModel_Anyscale", + "CreateAssistantDtoModel_Cerebras", + "CreateAssistantDtoModel_CustomLlm", + "CreateAssistantDtoModel_DeepSeek", + "CreateAssistantDtoModel_Deepinfra", + "CreateAssistantDtoModel_Google", + "CreateAssistantDtoModel_Groq", + "CreateAssistantDtoModel_InflectionAi", + "CreateAssistantDtoModel_Minimax", + "CreateAssistantDtoModel_Openai", + "CreateAssistantDtoModel_Openrouter", + "CreateAssistantDtoModel_PerplexityAi", + "CreateAssistantDtoModel_TogetherAi", + "CreateAssistantDtoModel_Xai", "CreateAssistantDtoServerMessagesItem", "CreateAssistantDtoTranscriber", + "CreateAssistantDtoTranscriber_11Labs", + "CreateAssistantDtoTranscriber_AssemblyAi", + "CreateAssistantDtoTranscriber_Azure", + "CreateAssistantDtoTranscriber_Cartesia", + "CreateAssistantDtoTranscriber_CustomTranscriber", + "CreateAssistantDtoTranscriber_Deepgram", + "CreateAssistantDtoTranscriber_Gladia", + "CreateAssistantDtoTranscriber_Google", + "CreateAssistantDtoTranscriber_Openai", + "CreateAssistantDtoTranscriber_Soniox", + "CreateAssistantDtoTranscriber_Speechmatics", + "CreateAssistantDtoTranscriber_Talkscriber", "CreateAssistantDtoVoice", + "CreateAssistantDtoVoice_11Labs", + "CreateAssistantDtoVoice_Azure", + "CreateAssistantDtoVoice_Cartesia", + "CreateAssistantDtoVoice_CustomVoice", + "CreateAssistantDtoVoice_Deepgram", + "CreateAssistantDtoVoice_Hume", + "CreateAssistantDtoVoice_Inworld", + "CreateAssistantDtoVoice_Lmnt", + "CreateAssistantDtoVoice_Minimax", + "CreateAssistantDtoVoice_Neuphonic", + "CreateAssistantDtoVoice_Openai", + "CreateAssistantDtoVoice_Playht", + "CreateAssistantDtoVoice_RimeAi", + "CreateAssistantDtoVoice_Sesame", + "CreateAssistantDtoVoice_SmallestAi", + "CreateAssistantDtoVoice_Tavus", + "CreateAssistantDtoVoice_Vapi", + "CreateAssistantDtoVoice_Wellsaid", + "CreateAssistantDtoVoicemailDetection", + "CreateAssistantDtoVoicemailDetectionZero", + "CreateAzureCredentialDto", + "CreateAzureCredentialDtoRegion", + "CreateAzureCredentialDtoService", "CreateAzureOpenAiCredentialDto", "CreateAzureOpenAiCredentialDtoModelsItem", "CreateAzureOpenAiCredentialDtoRegion", + "CreateBarInsightFromCallTableDto", + "CreateBarInsightFromCallTableDtoGroupBy", + "CreateBarInsightFromCallTableDtoQueriesItem", + "CreateBashToolDto", + "CreateBashToolDtoMessagesItem", + "CreateBashToolDtoMessagesItem_RequestComplete", + "CreateBashToolDtoMessagesItem_RequestFailed", + "CreateBashToolDtoMessagesItem_RequestResponseDelayed", + "CreateBashToolDtoMessagesItem_RequestStart", + "CreateBashToolDtoName", + "CreateBashToolDtoSubType", "CreateByoPhoneNumberDto", "CreateByoPhoneNumberDtoFallbackDestination", + "CreateByoPhoneNumberDtoFallbackDestination_Number", + "CreateByoPhoneNumberDtoFallbackDestination_Sip", + "CreateByoPhoneNumberDtoHooksItem", + "CreateByoPhoneNumberDtoHooksItem_CallEnding", + "CreateByoPhoneNumberDtoHooksItem_CallRinging", "CreateByoSipTrunkCredentialDto", "CreateCartesiaCredentialDto", - "CreateConversationBlockDto", - "CreateConversationBlockDtoMessagesItem", + "CreateCerebrasCredentialDto", + "CreateChatStreamResponse", + "CreateCloudflareCredentialDto", + "CreateCodeToolDto", + "CreateCodeToolDtoMessagesItem", + "CreateCodeToolDtoMessagesItem_RequestComplete", + "CreateCodeToolDtoMessagesItem_RequestFailed", + "CreateCodeToolDtoMessagesItem_RequestResponseDelayed", + "CreateCodeToolDtoMessagesItem_RequestStart", + "CreateComputerToolDto", + "CreateComputerToolDtoMessagesItem", + "CreateComputerToolDtoMessagesItem_RequestComplete", + "CreateComputerToolDtoMessagesItem_RequestFailed", + "CreateComputerToolDtoMessagesItem_RequestResponseDelayed", + "CreateComputerToolDtoMessagesItem_RequestStart", + "CreateComputerToolDtoName", + "CreateComputerToolDtoSubType", + "CreateCustomCredentialDto", + "CreateCustomCredentialDtoAuthenticationPlan", + "CreateCustomCredentialDtoAuthenticationPlan_Bearer", + "CreateCustomCredentialDtoAuthenticationPlan_Hmac", + "CreateCustomCredentialDtoAuthenticationPlan_Oauth2", + "CreateCustomCredentialDtoEncryptionPlan", + "CreateCustomCredentialDtoEncryptionPlan_PublicKey", + "CreateCustomKnowledgeBaseDto", + "CreateCustomKnowledgeBaseDtoProvider", "CreateCustomLlmCredentialDto", "CreateCustomerDto", "CreateDeepInfraCredentialDto", + "CreateDeepSeekCredentialDto", "CreateDeepgramCredentialDto", "CreateDtmfToolDto", "CreateDtmfToolDtoMessagesItem", + "CreateDtmfToolDtoMessagesItem_RequestComplete", + "CreateDtmfToolDtoMessagesItem_RequestFailed", + "CreateDtmfToolDtoMessagesItem_RequestResponseDelayed", + "CreateDtmfToolDtoMessagesItem_RequestStart", "CreateElevenLabsCredentialDto", + "CreateEmailCredentialDto", "CreateEndCallToolDto", "CreateEndCallToolDtoMessagesItem", + "CreateEndCallToolDtoMessagesItem_RequestComplete", + "CreateEndCallToolDtoMessagesItem_RequestFailed", + "CreateEndCallToolDtoMessagesItem_RequestResponseDelayed", + "CreateEndCallToolDtoMessagesItem_RequestStart", + "CreateEvalDto", + "CreateEvalDtoMessagesItem", + "CreateEvalDtoType", "CreateFunctionToolDto", "CreateFunctionToolDtoMessagesItem", + "CreateFunctionToolDtoMessagesItem_RequestComplete", + "CreateFunctionToolDtoMessagesItem_RequestFailed", + "CreateFunctionToolDtoMessagesItem_RequestResponseDelayed", + "CreateFunctionToolDtoMessagesItem_RequestStart", "CreateGcpCredentialDto", "CreateGhlToolDto", "CreateGhlToolDtoMessagesItem", + "CreateGhlToolDtoMessagesItem_RequestComplete", + "CreateGhlToolDtoMessagesItem_RequestFailed", + "CreateGhlToolDtoMessagesItem_RequestResponseDelayed", + "CreateGhlToolDtoMessagesItem_RequestStart", + "CreateGhlToolDtoType", "CreateGladiaCredentialDto", + "CreateGoHighLevelCalendarAvailabilityToolDto", + "CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem", + "CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestComplete", + "CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestFailed", + "CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestResponseDelayed", + "CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestStart", + "CreateGoHighLevelCalendarEventCreateToolDto", + "CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem", + "CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestComplete", + "CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestFailed", + "CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestResponseDelayed", + "CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestStart", + "CreateGoHighLevelContactCreateToolDto", + "CreateGoHighLevelContactCreateToolDtoMessagesItem", + "CreateGoHighLevelContactCreateToolDtoMessagesItem_RequestComplete", + "CreateGoHighLevelContactCreateToolDtoMessagesItem_RequestFailed", + "CreateGoHighLevelContactCreateToolDtoMessagesItem_RequestResponseDelayed", + "CreateGoHighLevelContactCreateToolDtoMessagesItem_RequestStart", + "CreateGoHighLevelContactGetToolDto", + "CreateGoHighLevelContactGetToolDtoMessagesItem", + "CreateGoHighLevelContactGetToolDtoMessagesItem_RequestComplete", + "CreateGoHighLevelContactGetToolDtoMessagesItem_RequestFailed", + "CreateGoHighLevelContactGetToolDtoMessagesItem_RequestResponseDelayed", + "CreateGoHighLevelContactGetToolDtoMessagesItem_RequestStart", "CreateGoHighLevelCredentialDto", + "CreateGoHighLevelMcpCredentialDto", + "CreateGoogleCalendarCheckAvailabilityToolDto", + "CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem", + "CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestComplete", + "CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestFailed", + "CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestResponseDelayed", + "CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestStart", + "CreateGoogleCalendarCreateEventToolDto", + "CreateGoogleCalendarCreateEventToolDtoMessagesItem", + "CreateGoogleCalendarCreateEventToolDtoMessagesItem_RequestComplete", + "CreateGoogleCalendarCreateEventToolDtoMessagesItem_RequestFailed", + "CreateGoogleCalendarCreateEventToolDtoMessagesItem_RequestResponseDelayed", + "CreateGoogleCalendarCreateEventToolDtoMessagesItem_RequestStart", + "CreateGoogleCalendarOAuth2AuthorizationCredentialDto", + "CreateGoogleCalendarOAuth2ClientCredentialDto", + "CreateGoogleCredentialDto", + "CreateGoogleSheetsOAuth2AuthorizationCredentialDto", + "CreateGoogleSheetsRowAppendToolDto", + "CreateGoogleSheetsRowAppendToolDtoMessagesItem", + "CreateGoogleSheetsRowAppendToolDtoMessagesItem_RequestComplete", + "CreateGoogleSheetsRowAppendToolDtoMessagesItem_RequestFailed", + "CreateGoogleSheetsRowAppendToolDtoMessagesItem_RequestResponseDelayed", + "CreateGoogleSheetsRowAppendToolDtoMessagesItem_RequestStart", "CreateGroqCredentialDto", + "CreateHandoffToolDto", + "CreateHandoffToolDtoDestinationsItem", + "CreateHandoffToolDtoDestinationsItem_Assistant", + "CreateHandoffToolDtoDestinationsItem_Dynamic", + "CreateHandoffToolDtoDestinationsItem_Squad", + "CreateHandoffToolDtoMessagesItem", + "CreateHandoffToolDtoMessagesItem_RequestComplete", + "CreateHandoffToolDtoMessagesItem_RequestFailed", + "CreateHandoffToolDtoMessagesItem_RequestResponseDelayed", + "CreateHandoffToolDtoMessagesItem_RequestStart", + "CreateHumeCredentialDto", + "CreateInflectionAiCredentialDto", + "CreateInworldCredentialDto", + "CreateLangfuseCredentialDto", + "CreateLineInsightFromCallTableDto", + "CreateLineInsightFromCallTableDtoGroupBy", + "CreateLineInsightFromCallTableDtoQueriesItem", "CreateLmntCredentialDto", "CreateMakeCredentialDto", "CreateMakeToolDto", "CreateMakeToolDtoMessagesItem", + "CreateMakeToolDtoMessagesItem_RequestComplete", + "CreateMakeToolDtoMessagesItem_RequestFailed", + "CreateMakeToolDtoMessagesItem_RequestResponseDelayed", + "CreateMakeToolDtoMessagesItem_RequestStart", + "CreateMakeToolDtoType", + "CreateMcpToolDto", + "CreateMcpToolDtoMessagesItem", + "CreateMcpToolDtoMessagesItem_RequestComplete", + "CreateMcpToolDtoMessagesItem_RequestFailed", + "CreateMcpToolDtoMessagesItem_RequestResponseDelayed", + "CreateMcpToolDtoMessagesItem_RequestStart", + "CreateMinimaxCredentialDto", + "CreateMistralCredentialDto", + "CreateNeuphonicCredentialDto", "CreateOpenAiCredentialDto", "CreateOpenRouterCredentialDto", "CreateOrgDto", + "CreateOrgDtoChannel", "CreateOutboundCallDto", "CreateOutputToolDto", "CreateOutputToolDtoMessagesItem", + "CreateOutputToolDtoMessagesItem_RequestComplete", + "CreateOutputToolDtoMessagesItem_RequestFailed", + "CreateOutputToolDtoMessagesItem_RequestResponseDelayed", + "CreateOutputToolDtoMessagesItem_RequestStart", + "CreateOutputToolDtoType", "CreatePerplexityAiCredentialDto", + "CreatePersonalityDto", + "CreatePieInsightFromCallTableDto", + "CreatePieInsightFromCallTableDtoGroupBy", + "CreatePieInsightFromCallTableDtoQueriesItem", "CreatePlayHtCredentialDto", + "CreateQueryToolDto", + "CreateQueryToolDtoMessagesItem", + "CreateQueryToolDtoMessagesItem_RequestComplete", + "CreateQueryToolDtoMessagesItem_RequestFailed", + "CreateQueryToolDtoMessagesItem_RequestResponseDelayed", + "CreateQueryToolDtoMessagesItem_RequestStart", "CreateRimeAiCredentialDto", "CreateRunpodCredentialDto", "CreateS3CredentialDto", + "CreateScenarioDto", + "CreateScenarioDtoHooksItem", + "CreateScenarioDtoHooksItem_SimulationRunEnded", + "CreateScenarioDtoHooksItem_SimulationRunStarted", + "CreateScorecardDto", + "CreateSesameVoiceDto", + "CreateSimulationDto", + "CreateSimulationRunDto", + "CreateSimulationRunDtoSimulationsItem", + "CreateSimulationRunDtoSimulationsItem_Simulation", + "CreateSimulationRunDtoSimulationsItem_SimulationSuite", + "CreateSimulationRunDtoTarget", + "CreateSimulationRunDtoTarget_Assistant", + "CreateSimulationRunDtoTarget_Squad", + "CreateSimulationSuiteDto", + "CreateSipRequestToolDto", + "CreateSipRequestToolDtoBody", + "CreateSipRequestToolDtoMessagesItem", + "CreateSipRequestToolDtoMessagesItem_RequestComplete", + "CreateSipRequestToolDtoMessagesItem_RequestFailed", + "CreateSipRequestToolDtoMessagesItem_RequestResponseDelayed", + "CreateSipRequestToolDtoMessagesItem_RequestStart", + "CreateSipRequestToolDtoVerb", + "CreateSlackOAuth2AuthorizationCredentialDto", + "CreateSlackSendMessageToolDto", + "CreateSlackSendMessageToolDtoMessagesItem", + "CreateSlackSendMessageToolDtoMessagesItem_RequestComplete", + "CreateSlackSendMessageToolDtoMessagesItem_RequestFailed", + "CreateSlackSendMessageToolDtoMessagesItem_RequestResponseDelayed", + "CreateSlackSendMessageToolDtoMessagesItem_RequestStart", + "CreateSlackWebhookCredentialDto", + "CreateSmallestAiCredentialDto", + "CreateSmsToolDto", + "CreateSmsToolDtoMessagesItem", + "CreateSmsToolDtoMessagesItem_RequestComplete", + "CreateSmsToolDtoMessagesItem_RequestFailed", + "CreateSmsToolDtoMessagesItem_RequestResponseDelayed", + "CreateSmsToolDtoMessagesItem_RequestStart", + "CreateSonioxCredentialDto", + "CreateSpeechmaticsCredentialDto", "CreateSquadDto", + "CreateStructuredOutputDto", + "CreateStructuredOutputDtoModel", + "CreateStructuredOutputDtoModel_Anthropic", + "CreateStructuredOutputDtoModel_AnthropicBedrock", + "CreateStructuredOutputDtoModel_CustomLlm", + "CreateStructuredOutputDtoModel_Google", + "CreateStructuredOutputDtoModel_Openai", + "CreateStructuredOutputDtoType", + "CreateSupabaseCredentialDto", + "CreateTavusCredentialDto", + "CreateTelnyxPhoneNumberDto", + "CreateTelnyxPhoneNumberDtoFallbackDestination", + "CreateTelnyxPhoneNumberDtoFallbackDestination_Number", + "CreateTelnyxPhoneNumberDtoFallbackDestination_Sip", + "CreateTelnyxPhoneNumberDtoHooksItem", + "CreateTelnyxPhoneNumberDtoHooksItem_CallEnding", + "CreateTelnyxPhoneNumberDtoHooksItem_CallRinging", + "CreateTestSuiteDto", + "CreateTestSuiteRunDto", + "CreateTestSuiteTestChatDto", + "CreateTestSuiteTestChatDtoType", + "CreateTestSuiteTestVoiceDto", + "CreateTestSuiteTestVoiceDtoType", + "CreateTextEditorToolDto", + "CreateTextEditorToolDtoMessagesItem", + "CreateTextEditorToolDtoMessagesItem_RequestComplete", + "CreateTextEditorToolDtoMessagesItem_RequestFailed", + "CreateTextEditorToolDtoMessagesItem_RequestResponseDelayed", + "CreateTextEditorToolDtoMessagesItem_RequestStart", + "CreateTextEditorToolDtoName", + "CreateTextEditorToolDtoSubType", + "CreateTextInsightFromCallTableDto", + "CreateTextInsightFromCallTableDtoQueriesItem", "CreateTogetherAiCredentialDto", "CreateTokenDto", "CreateTokenDtoTag", - "CreateToolCallBlockDto", - "CreateToolCallBlockDtoMessagesItem", - "CreateToolCallBlockDtoTool", "CreateToolTemplateDto", "CreateToolTemplateDtoDetails", + "CreateToolTemplateDtoDetails_ApiRequest", + "CreateToolTemplateDtoDetails_Bash", + "CreateToolTemplateDtoDetails_Code", + "CreateToolTemplateDtoDetails_Computer", + "CreateToolTemplateDtoDetails_Dtmf", + "CreateToolTemplateDtoDetails_EndCall", + "CreateToolTemplateDtoDetails_Function", + "CreateToolTemplateDtoDetails_GohighlevelCalendarAvailabilityCheck", + "CreateToolTemplateDtoDetails_GohighlevelCalendarEventCreate", + "CreateToolTemplateDtoDetails_GohighlevelContactCreate", + "CreateToolTemplateDtoDetails_GohighlevelContactGet", + "CreateToolTemplateDtoDetails_GoogleCalendarAvailabilityCheck", + "CreateToolTemplateDtoDetails_GoogleCalendarEventCreate", + "CreateToolTemplateDtoDetails_GoogleSheetsRowAppend", + "CreateToolTemplateDtoDetails_Handoff", + "CreateToolTemplateDtoDetails_Mcp", + "CreateToolTemplateDtoDetails_Query", + "CreateToolTemplateDtoDetails_SipRequest", + "CreateToolTemplateDtoDetails_SlackMessageSend", + "CreateToolTemplateDtoDetails_Sms", + "CreateToolTemplateDtoDetails_TextEditor", + "CreateToolTemplateDtoDetails_TransferCall", + "CreateToolTemplateDtoDetails_Voicemail", "CreateToolTemplateDtoProvider", "CreateToolTemplateDtoProviderDetails", + "CreateToolTemplateDtoProviderDetails_Function", + "CreateToolTemplateDtoProviderDetails_Ghl", + "CreateToolTemplateDtoProviderDetails_GohighlevelCalendarAvailabilityCheck", + "CreateToolTemplateDtoProviderDetails_GohighlevelCalendarEventCreate", + "CreateToolTemplateDtoProviderDetails_GohighlevelContactCreate", + "CreateToolTemplateDtoProviderDetails_GohighlevelContactGet", + "CreateToolTemplateDtoProviderDetails_GoogleCalendarEventCreate", + "CreateToolTemplateDtoProviderDetails_GoogleSheetsRowAppend", + "CreateToolTemplateDtoProviderDetails_Make", + "CreateToolTemplateDtoType", "CreateToolTemplateDtoVisibility", "CreateTransferCallToolDto", "CreateTransferCallToolDtoDestinationsItem", + "CreateTransferCallToolDtoDestinationsItem_Assistant", + "CreateTransferCallToolDtoDestinationsItem_Number", + "CreateTransferCallToolDtoDestinationsItem_Sip", "CreateTransferCallToolDtoMessagesItem", + "CreateTransferCallToolDtoMessagesItem_RequestComplete", + "CreateTransferCallToolDtoMessagesItem_RequestFailed", + "CreateTransferCallToolDtoMessagesItem_RequestResponseDelayed", + "CreateTransferCallToolDtoMessagesItem_RequestStart", + "CreateTrieveCredentialDto", + "CreateTrieveKnowledgeBaseDto", + "CreateTrieveKnowledgeBaseDtoProvider", "CreateTwilioCredentialDto", "CreateTwilioPhoneNumberDto", "CreateTwilioPhoneNumberDtoFallbackDestination", + "CreateTwilioPhoneNumberDtoFallbackDestination_Number", + "CreateTwilioPhoneNumberDtoFallbackDestination_Sip", + "CreateTwilioPhoneNumberDtoHooksItem", + "CreateTwilioPhoneNumberDtoHooksItem_CallEnding", + "CreateTwilioPhoneNumberDtoHooksItem_CallRinging", "CreateVapiPhoneNumberDto", "CreateVapiPhoneNumberDtoFallbackDestination", + "CreateVapiPhoneNumberDtoFallbackDestination_Number", + "CreateVapiPhoneNumberDtoFallbackDestination_Sip", + "CreateVapiPhoneNumberDtoHooksItem", + "CreateVapiPhoneNumberDtoHooksItem_CallEnding", + "CreateVapiPhoneNumberDtoHooksItem_CallRinging", "CreateVoicemailToolDto", "CreateVoicemailToolDtoMessagesItem", + "CreateVoicemailToolDtoMessagesItem_RequestComplete", + "CreateVoicemailToolDtoMessagesItem_RequestFailed", + "CreateVoicemailToolDtoMessagesItem_RequestResponseDelayed", + "CreateVoicemailToolDtoMessagesItem_RequestStart", "CreateVonageCredentialDto", "CreateVonagePhoneNumberDto", "CreateVonagePhoneNumberDtoFallbackDestination", + "CreateVonagePhoneNumberDtoFallbackDestination_Number", + "CreateVonagePhoneNumberDtoFallbackDestination_Sip", + "CreateVonagePhoneNumberDtoHooksItem", + "CreateVonagePhoneNumberDtoHooksItem_CallEnding", + "CreateVonagePhoneNumberDtoHooksItem_CallRinging", "CreateWebCallDto", - "CreateWorkflowBlockDto", - "CreateWorkflowBlockDtoMessagesItem", - "CreateWorkflowBlockDtoStepsItem", + "CreateWebChatDto", + "CreateWebChatDtoInput", + "CreateWebChatDtoInputOneItem", + "CreateWebCustomerDto", + "CreateWebhookCredentialDto", + "CreateWebhookCredentialDtoAuthenticationPlan", + "CreateWebhookCredentialDtoAuthenticationPlan_Bearer", + "CreateWebhookCredentialDtoAuthenticationPlan_Hmac", + "CreateWebhookCredentialDtoAuthenticationPlan_Oauth2", + "CreateWellSaidCredentialDto", + "CreateWorkflowDto", + "CreateWorkflowDtoBackgroundSound", + "CreateWorkflowDtoBackgroundSoundZero", + "CreateWorkflowDtoCredentialsItem", + "CreateWorkflowDtoCredentialsItem_11Labs", + "CreateWorkflowDtoCredentialsItem_Anthropic", + "CreateWorkflowDtoCredentialsItem_AnthropicBedrock", + "CreateWorkflowDtoCredentialsItem_Anyscale", + "CreateWorkflowDtoCredentialsItem_AssemblyAi", + "CreateWorkflowDtoCredentialsItem_Azure", + "CreateWorkflowDtoCredentialsItem_AzureOpenai", + "CreateWorkflowDtoCredentialsItem_ByoSipTrunk", + "CreateWorkflowDtoCredentialsItem_Cartesia", + "CreateWorkflowDtoCredentialsItem_Cerebras", + "CreateWorkflowDtoCredentialsItem_Cloudflare", + "CreateWorkflowDtoCredentialsItem_CustomCredential", + "CreateWorkflowDtoCredentialsItem_CustomLlm", + "CreateWorkflowDtoCredentialsItem_DeepSeek", + "CreateWorkflowDtoCredentialsItem_Deepgram", + "CreateWorkflowDtoCredentialsItem_Deepinfra", + "CreateWorkflowDtoCredentialsItem_Email", + "CreateWorkflowDtoCredentialsItem_Gcp", + "CreateWorkflowDtoCredentialsItem_GhlOauth2Authorization", + "CreateWorkflowDtoCredentialsItem_Gladia", + "CreateWorkflowDtoCredentialsItem_Gohighlevel", + "CreateWorkflowDtoCredentialsItem_Google", + "CreateWorkflowDtoCredentialsItem_GoogleCalendarOauth2Authorization", + "CreateWorkflowDtoCredentialsItem_GoogleCalendarOauth2Client", + "CreateWorkflowDtoCredentialsItem_GoogleSheetsOauth2Authorization", + "CreateWorkflowDtoCredentialsItem_Groq", + "CreateWorkflowDtoCredentialsItem_Hume", + "CreateWorkflowDtoCredentialsItem_InflectionAi", + "CreateWorkflowDtoCredentialsItem_Inworld", + "CreateWorkflowDtoCredentialsItem_Langfuse", + "CreateWorkflowDtoCredentialsItem_Lmnt", + "CreateWorkflowDtoCredentialsItem_Make", + "CreateWorkflowDtoCredentialsItem_Minimax", + "CreateWorkflowDtoCredentialsItem_Mistral", + "CreateWorkflowDtoCredentialsItem_Neuphonic", + "CreateWorkflowDtoCredentialsItem_Openai", + "CreateWorkflowDtoCredentialsItem_Openrouter", + "CreateWorkflowDtoCredentialsItem_PerplexityAi", + "CreateWorkflowDtoCredentialsItem_Playht", + "CreateWorkflowDtoCredentialsItem_RimeAi", + "CreateWorkflowDtoCredentialsItem_Runpod", + "CreateWorkflowDtoCredentialsItem_S3", + "CreateWorkflowDtoCredentialsItem_SlackOauth2Authorization", + "CreateWorkflowDtoCredentialsItem_SlackWebhook", + "CreateWorkflowDtoCredentialsItem_SmallestAi", + "CreateWorkflowDtoCredentialsItem_Soniox", + "CreateWorkflowDtoCredentialsItem_Speechmatics", + "CreateWorkflowDtoCredentialsItem_Supabase", + "CreateWorkflowDtoCredentialsItem_Tavus", + "CreateWorkflowDtoCredentialsItem_TogetherAi", + "CreateWorkflowDtoCredentialsItem_Trieve", + "CreateWorkflowDtoCredentialsItem_Twilio", + "CreateWorkflowDtoCredentialsItem_Vonage", + "CreateWorkflowDtoCredentialsItem_Webhook", + "CreateWorkflowDtoCredentialsItem_Wellsaid", + "CreateWorkflowDtoCredentialsItem_Xai", + "CreateWorkflowDtoHooksItem", + "CreateWorkflowDtoModel", + "CreateWorkflowDtoModel_Anthropic", + "CreateWorkflowDtoModel_AnthropicBedrock", + "CreateWorkflowDtoModel_CustomLlm", + "CreateWorkflowDtoModel_Google", + "CreateWorkflowDtoModel_Openai", + "CreateWorkflowDtoNodesItem", + "CreateWorkflowDtoNodesItem_Conversation", + "CreateWorkflowDtoNodesItem_Tool", + "CreateWorkflowDtoTranscriber", + "CreateWorkflowDtoTranscriber_11Labs", + "CreateWorkflowDtoTranscriber_AssemblyAi", + "CreateWorkflowDtoTranscriber_Azure", + "CreateWorkflowDtoTranscriber_Cartesia", + "CreateWorkflowDtoTranscriber_CustomTranscriber", + "CreateWorkflowDtoTranscriber_Deepgram", + "CreateWorkflowDtoTranscriber_Gladia", + "CreateWorkflowDtoTranscriber_Google", + "CreateWorkflowDtoTranscriber_Openai", + "CreateWorkflowDtoTranscriber_Soniox", + "CreateWorkflowDtoTranscriber_Speechmatics", + "CreateWorkflowDtoTranscriber_Talkscriber", + "CreateWorkflowDtoVoice", + "CreateWorkflowDtoVoice_11Labs", + "CreateWorkflowDtoVoice_Azure", + "CreateWorkflowDtoVoice_Cartesia", + "CreateWorkflowDtoVoice_CustomVoice", + "CreateWorkflowDtoVoice_Deepgram", + "CreateWorkflowDtoVoice_Hume", + "CreateWorkflowDtoVoice_Inworld", + "CreateWorkflowDtoVoice_Lmnt", + "CreateWorkflowDtoVoice_Minimax", + "CreateWorkflowDtoVoice_Neuphonic", + "CreateWorkflowDtoVoice_Openai", + "CreateWorkflowDtoVoice_Playht", + "CreateWorkflowDtoVoice_RimeAi", + "CreateWorkflowDtoVoice_Sesame", + "CreateWorkflowDtoVoice_SmallestAi", + "CreateWorkflowDtoVoice_Tavus", + "CreateWorkflowDtoVoice_Vapi", + "CreateWorkflowDtoVoice_Wellsaid", + "CreateWorkflowDtoVoicemailDetection", + "CreateWorkflowDtoVoicemailDetectionZero", + "CreateXAiCredentialDto", + "CredentialActionRequest", + "CredentialEndUser", + "CredentialSessionError", + "CredentialSessionResponse", + "CredentialWebhookDto", + "CredentialWebhookDtoAuthMode", + "CredentialWebhookDtoOperation", + "CredentialWebhookDtoType", + "CustomCredential", + "CustomCredentialAuthenticationPlan", + "CustomCredentialAuthenticationPlan_Bearer", + "CustomCredentialAuthenticationPlan_Hmac", + "CustomCredentialAuthenticationPlan_Oauth2", + "CustomCredentialEncryptionPlan", + "CustomCredentialEncryptionPlan_PublicKey", + "CustomCredentialProvider", + "CustomEndpointingModelSmartEndpointingPlan", + "CustomEndpointingModelSmartEndpointingPlanProvider", + "CustomKnowledgeBase", + "CustomKnowledgeBaseProvider", "CustomLlmCredential", + "CustomLlmCredentialProvider", "CustomLlmModel", "CustomLlmModelMetadataSendMode", "CustomLlmModelToolsItem", + "CustomLlmModelToolsItem_ApiRequest", + "CustomLlmModelToolsItem_Bash", + "CustomLlmModelToolsItem_Code", + "CustomLlmModelToolsItem_Computer", + "CustomLlmModelToolsItem_Dtmf", + "CustomLlmModelToolsItem_EndCall", + "CustomLlmModelToolsItem_Function", + "CustomLlmModelToolsItem_GohighlevelCalendarAvailabilityCheck", + "CustomLlmModelToolsItem_GohighlevelCalendarEventCreate", + "CustomLlmModelToolsItem_GohighlevelContactCreate", + "CustomLlmModelToolsItem_GohighlevelContactGet", + "CustomLlmModelToolsItem_GoogleCalendarAvailabilityCheck", + "CustomLlmModelToolsItem_GoogleCalendarEventCreate", + "CustomLlmModelToolsItem_GoogleSheetsRowAppend", + "CustomLlmModelToolsItem_Handoff", + "CustomLlmModelToolsItem_Mcp", + "CustomLlmModelToolsItem_Query", + "CustomLlmModelToolsItem_SipRequest", + "CustomLlmModelToolsItem_SlackMessageSend", + "CustomLlmModelToolsItem_Sms", + "CustomLlmModelToolsItem_TextEditor", + "CustomLlmModelToolsItem_TransferCall", + "CustomLlmModelToolsItem_Voicemail", + "CustomMessage", + "CustomMessageType", + "CustomTranscriber", + "CustomVoice", + "CustomerCustomEndpointingRule", + "CustomerSpeechTimeoutOptions", "DeepInfraCredential", + "DeepInfraCredentialProvider", "DeepInfraModel", "DeepInfraModelToolsItem", + "DeepInfraModelToolsItem_ApiRequest", + "DeepInfraModelToolsItem_Bash", + "DeepInfraModelToolsItem_Code", + "DeepInfraModelToolsItem_Computer", + "DeepInfraModelToolsItem_Dtmf", + "DeepInfraModelToolsItem_EndCall", + "DeepInfraModelToolsItem_Function", + "DeepInfraModelToolsItem_GohighlevelCalendarAvailabilityCheck", + "DeepInfraModelToolsItem_GohighlevelCalendarEventCreate", + "DeepInfraModelToolsItem_GohighlevelContactCreate", + "DeepInfraModelToolsItem_GohighlevelContactGet", + "DeepInfraModelToolsItem_GoogleCalendarAvailabilityCheck", + "DeepInfraModelToolsItem_GoogleCalendarEventCreate", + "DeepInfraModelToolsItem_GoogleSheetsRowAppend", + "DeepInfraModelToolsItem_Handoff", + "DeepInfraModelToolsItem_Mcp", + "DeepInfraModelToolsItem_Query", + "DeepInfraModelToolsItem_SipRequest", + "DeepInfraModelToolsItem_SlackMessageSend", + "DeepInfraModelToolsItem_Sms", + "DeepInfraModelToolsItem_TextEditor", + "DeepInfraModelToolsItem_TransferCall", + "DeepInfraModelToolsItem_Voicemail", + "DeepSeekCredential", + "DeepSeekCredentialProvider", + "DeepSeekModel", + "DeepSeekModelModel", + "DeepSeekModelToolsItem", + "DeepSeekModelToolsItem_ApiRequest", + "DeepSeekModelToolsItem_Bash", + "DeepSeekModelToolsItem_Code", + "DeepSeekModelToolsItem_Computer", + "DeepSeekModelToolsItem_Dtmf", + "DeepSeekModelToolsItem_EndCall", + "DeepSeekModelToolsItem_Function", + "DeepSeekModelToolsItem_GohighlevelCalendarAvailabilityCheck", + "DeepSeekModelToolsItem_GohighlevelCalendarEventCreate", + "DeepSeekModelToolsItem_GohighlevelContactCreate", + "DeepSeekModelToolsItem_GohighlevelContactGet", + "DeepSeekModelToolsItem_GoogleCalendarAvailabilityCheck", + "DeepSeekModelToolsItem_GoogleCalendarEventCreate", + "DeepSeekModelToolsItem_GoogleSheetsRowAppend", + "DeepSeekModelToolsItem_Handoff", + "DeepSeekModelToolsItem_Mcp", + "DeepSeekModelToolsItem_Query", + "DeepSeekModelToolsItem_SipRequest", + "DeepSeekModelToolsItem_SlackMessageSend", + "DeepSeekModelToolsItem_Sms", + "DeepSeekModelToolsItem_TextEditor", + "DeepSeekModelToolsItem_TransferCall", + "DeepSeekModelToolsItem_Voicemail", "DeepgramCredential", + "DeepgramCredentialProvider", "DeepgramTranscriber", "DeepgramTranscriberLanguage", "DeepgramTranscriberModel", "DeepgramVoice", "DeepgramVoiceId", - "DeepgramVoiceIdEnum", + "DeepgramVoiceModel", + "DeveloperMessage", + "DeveloperMessageRole", + "DialPlanEntry", "DtmfTool", "DtmfToolMessagesItem", + "DtmfToolMessagesItem_RequestComplete", + "DtmfToolMessagesItem_RequestFailed", + "DtmfToolMessagesItem_RequestResponseDelayed", + "DtmfToolMessagesItem_RequestStart", + "Edge", "ElevenLabsCredential", + "ElevenLabsPronunciationDictionary", + "ElevenLabsPronunciationDictionaryLocator", + "ElevenLabsPronunciationDictionaryPermissionOnResource", + "ElevenLabsTranscriber", + "ElevenLabsTranscriberLanguage", + "ElevenLabsTranscriberModel", "ElevenLabsVoice", "ElevenLabsVoiceId", "ElevenLabsVoiceIdEnum", "ElevenLabsVoiceModel", + "EmailCredential", + "EmailCredentialProvider", "EndCallTool", "EndCallToolMessagesItem", - "Error", + "EndCallToolMessagesItem_RequestComplete", + "EndCallToolMessagesItem_RequestFailed", + "EndCallToolMessagesItem_RequestResponseDelayed", + "EndCallToolMessagesItem_RequestStart", + "EndpointedSpeechLowConfidenceOptions", + "Eval", + "EvalAnthropicModel", + "EvalAnthropicModelModel", + "EvalCustomModel", + "EvalGoogleModel", + "EvalGoogleModelModel", + "EvalGroqModel", + "EvalGroqModelModel", + "EvalGroqModelProvider", + "EvalMessagesItem", + "EvalModelListOptions", + "EvalModelListOptionsProvider", + "EvalOpenAiModel", + "EvalOpenAiModelModel", + "EvalPaginatedResponse", + "EvalRun", + "EvalRunEndedReason", + "EvalRunPaginatedResponse", + "EvalRunResult", + "EvalRunResultMessagesItem", + "EvalRunResultMessagesItem_Assistant", + "EvalRunResultMessagesItem_System", + "EvalRunResultMessagesItem_Tool", + "EvalRunResultMessagesItem_User", + "EvalRunResultStatus", + "EvalRunStatus", + "EvalRunTarget", + "EvalRunTargetAssistant", + "EvalRunTargetSquad", + "EvalRunTarget_Assistant", + "EvalRunTarget_Squad", + "EvalRunType", + "EvalType", + "EvalUserEditable", + "EvalUserEditableMessagesItem", + "EvalUserEditableType", + "EvaluationPlanItem", + "EvaluationPlanItemComparator", + "EvaluationPlanItemValue", + "EventsTableBooleanCondition", + "EventsTableBooleanConditionOperator", + "EventsTableNumberCondition", + "EventsTableNumberConditionOperator", + "EventsTableStringCondition", + "EventsTableStringConditionOperator", "ExactReplacement", + "ExportChatDto", + "ExportChatDtoColumns", + "ExportChatDtoFormat", + "ExportChatDtoSortOrder", + "ExportSessionDto", + "ExportSessionDtoColumns", + "ExportSessionDtoFormat", + "ExportSessionDtoSortOrder", + "FailedEdgeCondition", + "FallbackAssemblyAiTranscriber", + "FallbackAssemblyAiTranscriberLanguage", + "FallbackAssemblyAiTranscriberSpeechModel", + "FallbackAzureSpeechTranscriber", + "FallbackAzureSpeechTranscriberLanguage", + "FallbackAzureSpeechTranscriberSegmentationStrategy", + "FallbackAzureVoice", + "FallbackAzureVoiceId", + "FallbackAzureVoiceIdZero", + "FallbackCartesiaTranscriber", + "FallbackCartesiaTranscriberLanguage", + "FallbackCartesiaTranscriberModel", + "FallbackCartesiaVoice", + "FallbackCartesiaVoiceLanguage", + "FallbackCartesiaVoiceModel", + "FallbackCustomTranscriber", + "FallbackCustomVoice", + "FallbackDeepgramTranscriber", + "FallbackDeepgramTranscriberLanguage", + "FallbackDeepgramTranscriberModel", + "FallbackDeepgramVoice", + "FallbackDeepgramVoiceId", + "FallbackDeepgramVoiceModel", + "FallbackElevenLabsTranscriber", + "FallbackElevenLabsTranscriberLanguage", + "FallbackElevenLabsTranscriberModel", + "FallbackElevenLabsVoice", + "FallbackElevenLabsVoiceId", + "FallbackElevenLabsVoiceIdEnum", + "FallbackElevenLabsVoiceModel", + "FallbackGladiaTranscriber", + "FallbackGladiaTranscriberLanguage", + "FallbackGladiaTranscriberLanguageBehaviour", + "FallbackGladiaTranscriberLanguages", + "FallbackGladiaTranscriberModel", + "FallbackGladiaTranscriberRegion", + "FallbackGoogleTranscriber", + "FallbackGoogleTranscriberLanguage", + "FallbackGoogleTranscriberModel", + "FallbackHumeVoice", + "FallbackHumeVoiceModel", + "FallbackInworldVoice", + "FallbackInworldVoiceLanguageCode", + "FallbackInworldVoiceModel", + "FallbackInworldVoiceVoiceId", + "FallbackLmntVoice", + "FallbackLmntVoiceId", + "FallbackLmntVoiceIdEnum", + "FallbackLmntVoiceLanguage", + "FallbackMinimaxVoice", + "FallbackMinimaxVoiceLanguageBoost", + "FallbackMinimaxVoiceModel", + "FallbackMinimaxVoiceProvider", + "FallbackMinimaxVoiceRegion", + "FallbackMinimaxVoiceSubtitleType", + "FallbackNeetsVoice", + "FallbackNeuphonicVoice", + "FallbackNeuphonicVoiceModel", + "FallbackOpenAiTranscriber", + "FallbackOpenAiTranscriberLanguage", + "FallbackOpenAiTranscriberModel", + "FallbackOpenAiVoice", + "FallbackOpenAiVoiceId", + "FallbackOpenAiVoiceIdEnum", + "FallbackOpenAiVoiceModel", + "FallbackPlan", + "FallbackPlanVoicesItem", + "FallbackPlanVoicesItem_11Labs", + "FallbackPlanVoicesItem_Azure", + "FallbackPlanVoicesItem_Cartesia", + "FallbackPlanVoicesItem_CustomVoice", + "FallbackPlanVoicesItem_Deepgram", + "FallbackPlanVoicesItem_Hume", + "FallbackPlanVoicesItem_Inworld", + "FallbackPlanVoicesItem_Lmnt", + "FallbackPlanVoicesItem_Neuphonic", + "FallbackPlanVoicesItem_Openai", + "FallbackPlanVoicesItem_Playht", + "FallbackPlanVoicesItem_RimeAi", + "FallbackPlanVoicesItem_Sesame", + "FallbackPlanVoicesItem_SmallestAi", + "FallbackPlanVoicesItem_Tavus", + "FallbackPlanVoicesItem_Vapi", + "FallbackPlanVoicesItem_Wellsaid", + "FallbackPlayHtVoice", + "FallbackPlayHtVoiceEmotion", + "FallbackPlayHtVoiceId", + "FallbackPlayHtVoiceIdEnum", + "FallbackPlayHtVoiceLanguage", + "FallbackPlayHtVoiceModel", + "FallbackRimeAiVoice", + "FallbackRimeAiVoiceId", + "FallbackRimeAiVoiceIdEnum", + "FallbackRimeAiVoiceLanguage", + "FallbackRimeAiVoiceModel", + "FallbackSesameVoice", + "FallbackSesameVoiceModel", + "FallbackSmallestAiVoice", + "FallbackSmallestAiVoiceId", + "FallbackSmallestAiVoiceIdEnum", + "FallbackSmallestAiVoiceModel", + "FallbackSonioxTranscriber", + "FallbackSonioxTranscriberLanguage", + "FallbackSonioxTranscriberModel", + "FallbackSpeechmaticsTranscriber", + "FallbackSpeechmaticsTranscriberLanguage", + "FallbackSpeechmaticsTranscriberModel", + "FallbackSpeechmaticsTranscriberNumeralStyle", + "FallbackSpeechmaticsTranscriberOperatingPoint", + "FallbackSpeechmaticsTranscriberRegion", + "FallbackTalkscriberTranscriber", + "FallbackTalkscriberTranscriberLanguage", + "FallbackTalkscriberTranscriberModel", + "FallbackTavusVoice", + "FallbackTavusVoiceVoiceId", + "FallbackTavusVoiceVoiceIdZero", + "FallbackTranscriberPlan", + "FallbackTranscriberPlanTranscribersItem", + "FallbackTranscriberPlanTranscribersItem_11Labs", + "FallbackTranscriberPlanTranscribersItem_AssemblyAi", + "FallbackTranscriberPlanTranscribersItem_Azure", + "FallbackTranscriberPlanTranscribersItem_Cartesia", + "FallbackTranscriberPlanTranscribersItem_CustomTranscriber", + "FallbackTranscriberPlanTranscribersItem_Deepgram", + "FallbackTranscriberPlanTranscribersItem_Gladia", + "FallbackTranscriberPlanTranscribersItem_Google", + "FallbackTranscriberPlanTranscribersItem_Openai", + "FallbackTranscriberPlanTranscribersItem_Soniox", + "FallbackTranscriberPlanTranscribersItem_Speechmatics", + "FallbackTranscriberPlanTranscribersItem_Talkscriber", + "FallbackVapiVoice", + "FallbackVapiVoiceVoiceId", + "FallbackWellSaidVoice", + "FallbackWellSaidVoiceModel", "File", + "FileObject", "FileStatus", + "FilterDateTypeColumnOnCallTable", + "FilterDateTypeColumnOnCallTableColumn", + "FilterDateTypeColumnOnCallTableOperator", + "FilterNumberArrayTypeColumnOnCallTable", + "FilterNumberArrayTypeColumnOnCallTableColumn", + "FilterNumberArrayTypeColumnOnCallTableOperator", + "FilterNumberTypeColumnOnCallTable", + "FilterNumberTypeColumnOnCallTableColumn", + "FilterNumberTypeColumnOnCallTableOperator", + "FilterStringArrayTypeColumnOnCallTable", + "FilterStringArrayTypeColumnOnCallTableColumn", + "FilterStringArrayTypeColumnOnCallTableOperator", + "FilterStringTypeColumnOnCallTable", + "FilterStringTypeColumnOnCallTableColumn", + "FilterStringTypeColumnOnCallTableOperator", + "FilterStructuredOutputColumnOnCallTable", + "FilterStructuredOutputColumnOnCallTableColumn", + "FilterStructuredOutputColumnOnCallTableOperator", "FormatPlan", + "FormatPlanFormattersEnabledItem", "FormatPlanReplacementsItem", + "FormatPlanReplacementsItem_Exact", + "FormatPlanReplacementsItem_Regex", + "FourierDenoisingPlan", + "FunctionCall", + "FunctionCallAssistantHookAction", + "FunctionCallHookAction", + "FunctionCallHookActionMessagesItem", + "FunctionCallHookActionMessagesItem_RequestComplete", + "FunctionCallHookActionMessagesItem_RequestFailed", + "FunctionCallHookActionMessagesItem_RequestResponseDelayed", + "FunctionCallHookActionMessagesItem_RequestStart", + "FunctionCallHookActionType", "FunctionTool", "FunctionToolMessagesItem", + "FunctionToolMessagesItem_RequestComplete", + "FunctionToolMessagesItem_RequestFailed", + "FunctionToolMessagesItem_RequestResponseDelayed", + "FunctionToolMessagesItem_RequestStart", "FunctionToolProviderDetails", "FunctionToolWithToolCall", "FunctionToolWithToolCallMessagesItem", + "FunctionToolWithToolCallMessagesItem_RequestComplete", + "FunctionToolWithToolCallMessagesItem_RequestFailed", + "FunctionToolWithToolCallMessagesItem_RequestResponseDelayed", + "FunctionToolWithToolCallMessagesItem_RequestStart", "GcpCredential", + "GcpCredentialProvider", "GcpKey", + "GeminiMultimodalLivePrebuiltVoiceConfig", + "GeminiMultimodalLivePrebuiltVoiceConfigVoiceName", + "GeminiMultimodalLiveSpeechConfig", + "GeminiMultimodalLiveVoiceConfig", + "GenerateScenariosDto", + "GenerateScenariosResponse", + "GeneratedScenario", + "GeneratedScenarioCategory", + "GetChatPaginatedDto", + "GetChatPaginatedDtoSortOrder", + "GetEvalPaginatedDto", + "GetEvalPaginatedDtoSortOrder", + "GetEvalRunPaginatedDto", + "GetEvalRunPaginatedDtoSortOrder", + "GetSessionPaginatedDto", + "GetSessionPaginatedDtoSortOrder", "GhlTool", "GhlToolMessagesItem", + "GhlToolMessagesItem_RequestComplete", + "GhlToolMessagesItem_RequestFailed", + "GhlToolMessagesItem_RequestResponseDelayed", + "GhlToolMessagesItem_RequestStart", "GhlToolMetadata", "GhlToolProviderDetails", + "GhlToolType", "GhlToolWithToolCall", "GhlToolWithToolCallMessagesItem", + "GhlToolWithToolCallMessagesItem_RequestComplete", + "GhlToolWithToolCallMessagesItem_RequestFailed", + "GhlToolWithToolCallMessagesItem_RequestResponseDelayed", + "GhlToolWithToolCallMessagesItem_RequestStart", "GladiaCredential", + "GladiaCredentialProvider", + "GladiaCustomVocabularyConfigDto", + "GladiaCustomVocabularyConfigDtoVocabularyItem", "GladiaTranscriber", "GladiaTranscriberLanguage", "GladiaTranscriberLanguageBehaviour", + "GladiaTranscriberLanguages", "GladiaTranscriberModel", + "GladiaTranscriberRegion", + "GladiaVocabularyItemDto", + "GlobalNodePlan", + "GoHighLevelCalendarAvailabilityTool", + "GoHighLevelCalendarAvailabilityToolMessagesItem", + "GoHighLevelCalendarAvailabilityToolMessagesItem_RequestComplete", + "GoHighLevelCalendarAvailabilityToolMessagesItem_RequestFailed", + "GoHighLevelCalendarAvailabilityToolMessagesItem_RequestResponseDelayed", + "GoHighLevelCalendarAvailabilityToolMessagesItem_RequestStart", + "GoHighLevelCalendarAvailabilityToolProviderDetails", + "GoHighLevelCalendarAvailabilityToolWithToolCall", + "GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem", + "GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem_RequestComplete", + "GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem_RequestFailed", + "GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem_RequestResponseDelayed", + "GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem_RequestStart", + "GoHighLevelCalendarAvailabilityToolWithToolCallType", + "GoHighLevelCalendarEventCreateTool", + "GoHighLevelCalendarEventCreateToolMessagesItem", + "GoHighLevelCalendarEventCreateToolMessagesItem_RequestComplete", + "GoHighLevelCalendarEventCreateToolMessagesItem_RequestFailed", + "GoHighLevelCalendarEventCreateToolMessagesItem_RequestResponseDelayed", + "GoHighLevelCalendarEventCreateToolMessagesItem_RequestStart", + "GoHighLevelCalendarEventCreateToolProviderDetails", + "GoHighLevelCalendarEventCreateToolWithToolCall", + "GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem", + "GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem_RequestComplete", + "GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem_RequestFailed", + "GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem_RequestResponseDelayed", + "GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem_RequestStart", + "GoHighLevelCalendarEventCreateToolWithToolCallType", + "GoHighLevelContactCreateTool", + "GoHighLevelContactCreateToolMessagesItem", + "GoHighLevelContactCreateToolMessagesItem_RequestComplete", + "GoHighLevelContactCreateToolMessagesItem_RequestFailed", + "GoHighLevelContactCreateToolMessagesItem_RequestResponseDelayed", + "GoHighLevelContactCreateToolMessagesItem_RequestStart", + "GoHighLevelContactCreateToolProviderDetails", + "GoHighLevelContactCreateToolWithToolCall", + "GoHighLevelContactCreateToolWithToolCallMessagesItem", + "GoHighLevelContactCreateToolWithToolCallMessagesItem_RequestComplete", + "GoHighLevelContactCreateToolWithToolCallMessagesItem_RequestFailed", + "GoHighLevelContactCreateToolWithToolCallMessagesItem_RequestResponseDelayed", + "GoHighLevelContactCreateToolWithToolCallMessagesItem_RequestStart", + "GoHighLevelContactCreateToolWithToolCallType", + "GoHighLevelContactGetTool", + "GoHighLevelContactGetToolMessagesItem", + "GoHighLevelContactGetToolMessagesItem_RequestComplete", + "GoHighLevelContactGetToolMessagesItem_RequestFailed", + "GoHighLevelContactGetToolMessagesItem_RequestResponseDelayed", + "GoHighLevelContactGetToolMessagesItem_RequestStart", + "GoHighLevelContactGetToolProviderDetails", + "GoHighLevelContactGetToolWithToolCall", + "GoHighLevelContactGetToolWithToolCallMessagesItem", + "GoHighLevelContactGetToolWithToolCallMessagesItem_RequestComplete", + "GoHighLevelContactGetToolWithToolCallMessagesItem_RequestFailed", + "GoHighLevelContactGetToolWithToolCallMessagesItem_RequestResponseDelayed", + "GoHighLevelContactGetToolWithToolCallMessagesItem_RequestStart", + "GoHighLevelContactGetToolWithToolCallType", "GoHighLevelCredential", + "GoHighLevelCredentialProvider", + "GoHighLevelMcpCredential", + "GoHighLevelMcpCredentialProvider", + "GoogleCalendarCheckAvailabilityTool", + "GoogleCalendarCheckAvailabilityToolMessagesItem", + "GoogleCalendarCheckAvailabilityToolMessagesItem_RequestComplete", + "GoogleCalendarCheckAvailabilityToolMessagesItem_RequestFailed", + "GoogleCalendarCheckAvailabilityToolMessagesItem_RequestResponseDelayed", + "GoogleCalendarCheckAvailabilityToolMessagesItem_RequestStart", + "GoogleCalendarCreateEventTool", + "GoogleCalendarCreateEventToolMessagesItem", + "GoogleCalendarCreateEventToolMessagesItem_RequestComplete", + "GoogleCalendarCreateEventToolMessagesItem_RequestFailed", + "GoogleCalendarCreateEventToolMessagesItem_RequestResponseDelayed", + "GoogleCalendarCreateEventToolMessagesItem_RequestStart", + "GoogleCalendarCreateEventToolProviderDetails", + "GoogleCalendarCreateEventToolWithToolCall", + "GoogleCalendarCreateEventToolWithToolCallMessagesItem", + "GoogleCalendarCreateEventToolWithToolCallMessagesItem_RequestComplete", + "GoogleCalendarCreateEventToolWithToolCallMessagesItem_RequestFailed", + "GoogleCalendarCreateEventToolWithToolCallMessagesItem_RequestResponseDelayed", + "GoogleCalendarCreateEventToolWithToolCallMessagesItem_RequestStart", + "GoogleCalendarOAuth2AuthorizationCredential", + "GoogleCalendarOAuth2AuthorizationCredentialProvider", + "GoogleCalendarOAuth2ClientCredential", + "GoogleCalendarOAuth2ClientCredentialProvider", + "GoogleCredential", + "GoogleCredentialProvider", + "GoogleModel", + "GoogleModelModel", + "GoogleModelToolsItem", + "GoogleModelToolsItem_ApiRequest", + "GoogleModelToolsItem_Bash", + "GoogleModelToolsItem_Code", + "GoogleModelToolsItem_Computer", + "GoogleModelToolsItem_Dtmf", + "GoogleModelToolsItem_EndCall", + "GoogleModelToolsItem_Function", + "GoogleModelToolsItem_GohighlevelCalendarAvailabilityCheck", + "GoogleModelToolsItem_GohighlevelCalendarEventCreate", + "GoogleModelToolsItem_GohighlevelContactCreate", + "GoogleModelToolsItem_GohighlevelContactGet", + "GoogleModelToolsItem_GoogleCalendarAvailabilityCheck", + "GoogleModelToolsItem_GoogleCalendarEventCreate", + "GoogleModelToolsItem_GoogleSheetsRowAppend", + "GoogleModelToolsItem_Handoff", + "GoogleModelToolsItem_Mcp", + "GoogleModelToolsItem_Query", + "GoogleModelToolsItem_SipRequest", + "GoogleModelToolsItem_SlackMessageSend", + "GoogleModelToolsItem_Sms", + "GoogleModelToolsItem_TextEditor", + "GoogleModelToolsItem_TransferCall", + "GoogleModelToolsItem_Voicemail", + "GoogleRealtimeConfig", + "GoogleSheetsOAuth2AuthorizationCredential", + "GoogleSheetsOAuth2AuthorizationCredentialProvider", + "GoogleSheetsRowAppendTool", + "GoogleSheetsRowAppendToolMessagesItem", + "GoogleSheetsRowAppendToolMessagesItem_RequestComplete", + "GoogleSheetsRowAppendToolMessagesItem_RequestFailed", + "GoogleSheetsRowAppendToolMessagesItem_RequestResponseDelayed", + "GoogleSheetsRowAppendToolMessagesItem_RequestStart", + "GoogleSheetsRowAppendToolProviderDetails", + "GoogleSheetsRowAppendToolWithToolCall", + "GoogleSheetsRowAppendToolWithToolCallMessagesItem", + "GoogleSheetsRowAppendToolWithToolCallMessagesItem_RequestComplete", + "GoogleSheetsRowAppendToolWithToolCallMessagesItem_RequestFailed", + "GoogleSheetsRowAppendToolWithToolCallMessagesItem_RequestResponseDelayed", + "GoogleSheetsRowAppendToolWithToolCallMessagesItem_RequestStart", + "GoogleSheetsRowAppendToolWithToolCallType", + "GoogleTranscriber", + "GoogleTranscriberLanguage", + "GoogleTranscriberModel", + "GoogleVoicemailDetectionPlan", + "GoogleVoicemailDetectionPlanProvider", + "GoogleVoicemailDetectionPlanType", "GroqCredential", + "GroqCredentialProvider", "GroqModel", "GroqModelModel", "GroqModelToolsItem", - "HandoffStep", - "HandoffStepBlock", + "GroqModelToolsItem_ApiRequest", + "GroqModelToolsItem_Bash", + "GroqModelToolsItem_Code", + "GroqModelToolsItem_Computer", + "GroqModelToolsItem_Dtmf", + "GroqModelToolsItem_EndCall", + "GroqModelToolsItem_Function", + "GroqModelToolsItem_GohighlevelCalendarAvailabilityCheck", + "GroqModelToolsItem_GohighlevelCalendarEventCreate", + "GroqModelToolsItem_GohighlevelContactCreate", + "GroqModelToolsItem_GohighlevelContactGet", + "GroqModelToolsItem_GoogleCalendarAvailabilityCheck", + "GroqModelToolsItem_GoogleCalendarEventCreate", + "GroqModelToolsItem_GoogleSheetsRowAppend", + "GroqModelToolsItem_Handoff", + "GroqModelToolsItem_Mcp", + "GroqModelToolsItem_Query", + "GroqModelToolsItem_SipRequest", + "GroqModelToolsItem_SlackMessageSend", + "GroqModelToolsItem_Sms", + "GroqModelToolsItem_TextEditor", + "GroqModelToolsItem_TransferCall", + "GroqModelToolsItem_Voicemail", + "GroupCondition", + "GroupConditionConditionsItem", + "GroupConditionConditionsItem_Group", + "GroupConditionConditionsItem_Liquid", + "GroupConditionConditionsItem_Regex", + "GroupConditionOperator", + "HandoffDestinationAssistant", + "HandoffDestinationAssistantContextEngineeringPlan", + "HandoffDestinationAssistantContextEngineeringPlan_All", + "HandoffDestinationAssistantContextEngineeringPlan_LastNMessages", + "HandoffDestinationAssistantContextEngineeringPlan_None", + "HandoffDestinationAssistantContextEngineeringPlan_UserAndAssistantMessages", + "HandoffDestinationAssistantType", + "HandoffDestinationDynamic", + "HandoffDestinationSquad", + "HandoffDestinationSquadContextEngineeringPlan", + "HandoffDestinationSquadContextEngineeringPlan_All", + "HandoffDestinationSquadContextEngineeringPlan_LastNMessages", + "HandoffDestinationSquadContextEngineeringPlan_None", + "HandoffDestinationSquadContextEngineeringPlan_UserAndAssistantMessages", + "HandoffTool", + "HandoffToolDestinationsItem", + "HandoffToolDestinationsItem_Assistant", + "HandoffToolDestinationsItem_Dynamic", + "HandoffToolDestinationsItem_Squad", + "HandoffToolMessagesItem", + "HandoffToolMessagesItem_RequestComplete", + "HandoffToolMessagesItem_RequestFailed", + "HandoffToolMessagesItem_RequestResponseDelayed", + "HandoffToolMessagesItem_RequestStart", + "HangupNode", + "HangupNodeType", + "HmacAuthenticationPlan", + "HmacAuthenticationPlanAlgorithm", + "HmacAuthenticationPlanSignatureEncoding", + "HumeCredential", + "HumeCredentialProvider", + "HumeVoice", + "HumeVoiceModel", "ImportTwilioPhoneNumberDto", "ImportTwilioPhoneNumberDtoFallbackDestination", + "ImportTwilioPhoneNumberDtoFallbackDestination_Number", + "ImportTwilioPhoneNumberDtoFallbackDestination_Sip", + "ImportTwilioPhoneNumberDtoHooksItem", + "ImportTwilioPhoneNumberDtoHooksItem_CallEnding", + "ImportTwilioPhoneNumberDtoHooksItem_CallRinging", "ImportVonagePhoneNumberDto", "ImportVonagePhoneNumberDtoFallbackDestination", + "ImportVonagePhoneNumberDtoFallbackDestination_Number", + "ImportVonagePhoneNumberDtoFallbackDestination_Sip", + "ImportVonagePhoneNumberDtoHooksItem", + "ImportVonagePhoneNumberDtoHooksItem_CallEnding", + "ImportVonagePhoneNumberDtoHooksItem_CallRinging", + "InflectionAiCredential", + "InflectionAiCredentialProvider", + "InflectionAiModel", + "InflectionAiModelModel", + "InflectionAiModelToolsItem", + "InflectionAiModelToolsItem_ApiRequest", + "InflectionAiModelToolsItem_Bash", + "InflectionAiModelToolsItem_Code", + "InflectionAiModelToolsItem_Computer", + "InflectionAiModelToolsItem_Dtmf", + "InflectionAiModelToolsItem_EndCall", + "InflectionAiModelToolsItem_Function", + "InflectionAiModelToolsItem_GohighlevelCalendarAvailabilityCheck", + "InflectionAiModelToolsItem_GohighlevelCalendarEventCreate", + "InflectionAiModelToolsItem_GohighlevelContactCreate", + "InflectionAiModelToolsItem_GohighlevelContactGet", + "InflectionAiModelToolsItem_GoogleCalendarAvailabilityCheck", + "InflectionAiModelToolsItem_GoogleCalendarEventCreate", + "InflectionAiModelToolsItem_GoogleSheetsRowAppend", + "InflectionAiModelToolsItem_Handoff", + "InflectionAiModelToolsItem_Mcp", + "InflectionAiModelToolsItem_Query", + "InflectionAiModelToolsItem_SipRequest", + "InflectionAiModelToolsItem_SlackMessageSend", + "InflectionAiModelToolsItem_Sms", + "InflectionAiModelToolsItem_TextEditor", + "InflectionAiModelToolsItem_TransferCall", + "InflectionAiModelToolsItem_Voicemail", + "Insight", + "InsightFormula", + "InsightPaginatedResponse", + "InsightRunFormatPlan", + "InsightRunFormatPlanFormat", + "InsightRunResponse", + "InsightTimeRange", + "InsightTimeRangeWithStep", + "InsightTimeRangeWithStepStep", + "InsightType", "InviteUserDto", "InviteUserDtoRole", + "InvoicePlan", + "InworldCredential", + "InworldCredentialProvider", + "InworldVoice", + "InworldVoiceLanguageCode", + "InworldVoiceModel", + "InworldVoiceVoiceId", + "JsonQueryOnCallTableWithNumberTypeColumn", + "JsonQueryOnCallTableWithNumberTypeColumnColumn", + "JsonQueryOnCallTableWithNumberTypeColumnFiltersItem", + "JsonQueryOnCallTableWithNumberTypeColumnOperation", + "JsonQueryOnCallTableWithNumberTypeColumnTable", + "JsonQueryOnCallTableWithNumberTypeColumnType", + "JsonQueryOnCallTableWithStringTypeColumn", + "JsonQueryOnCallTableWithStringTypeColumnColumn", + "JsonQueryOnCallTableWithStringTypeColumnFiltersItem", + "JsonQueryOnCallTableWithStringTypeColumnOperation", + "JsonQueryOnCallTableWithStringTypeColumnTable", + "JsonQueryOnCallTableWithStringTypeColumnType", + "JsonQueryOnCallTableWithStructuredOutputColumn", + "JsonQueryOnCallTableWithStructuredOutputColumnColumn", + "JsonQueryOnCallTableWithStructuredOutputColumnFiltersItem", + "JsonQueryOnCallTableWithStructuredOutputColumnOperation", + "JsonQueryOnCallTableWithStructuredOutputColumnTable", + "JsonQueryOnCallTableWithStructuredOutputColumnType", + "JsonQueryOnEventsTable", + "JsonQueryOnEventsTableFiltersItem", + "JsonQueryOnEventsTableOn", + "JsonQueryOnEventsTableOperation", + "JsonQueryOnEventsTableTable", + "JsonQueryOnEventsTableType", "JsonSchema", + "JsonSchemaFormat", "JsonSchemaType", + "JwtResponse", + "KeypadInputPlan", + "KeypadInputPlanDelimiters", "KnowledgeBase", + "KnowledgeBaseCost", + "KnowledgeBaseModel", + "KnowledgeBaseProvider", + "KnowledgeBaseResponseDocument", + "LangfuseCredential", + "LangfuseCredentialProvider", + "LangfuseObservabilityPlan", + "LangfuseObservabilityPlanProvider", + "LatencyMetrics", + "LineInsight", + "LineInsightFromCallTable", + "LineInsightFromCallTableGroupBy", + "LineInsightFromCallTableQueriesItem", + "LineInsightFromCallTableType", + "LineInsightGroupBy", + "LineInsightMetadata", + "LineInsightQueriesItem", + "LiquidCondition", + "LivekitSmartEndpointingPlan", + "LivekitSmartEndpointingPlanProvider", "LmntCredential", + "LmntCredentialProvider", "LmntVoice", "LmntVoiceId", "LmntVoiceIdEnum", - "Log", - "LogRequestHttpMethod", - "LogResource", - "LogType", - "LogsPaginatedResponse", + "LmntVoiceLanguage", + "LogicEdgeCondition", "MakeCredential", + "MakeCredentialProvider", "MakeTool", "MakeToolMessagesItem", + "MakeToolMessagesItem_RequestComplete", + "MakeToolMessagesItem_RequestFailed", + "MakeToolMessagesItem_RequestResponseDelayed", + "MakeToolMessagesItem_RequestStart", "MakeToolMetadata", "MakeToolProviderDetails", + "MakeToolType", "MakeToolWithToolCall", "MakeToolWithToolCallMessagesItem", - "MessagePlan", - "Metrics", - "ModelBasedCondition", + "MakeToolWithToolCallMessagesItem_RequestComplete", + "MakeToolWithToolCallMessagesItem_RequestFailed", + "MakeToolWithToolCallMessagesItem_RequestResponseDelayed", + "MakeToolWithToolCallMessagesItem_RequestStart", + "McpTool", + "McpToolMessages", + "McpToolMessagesItem", + "McpToolMessagesItem_RequestComplete", + "McpToolMessagesItem_RequestFailed", + "McpToolMessagesItem_RequestResponseDelayed", + "McpToolMessagesItem_RequestStart", + "McpToolMessagesMessagesItem", + "McpToolMessagesMessagesItem_RequestComplete", + "McpToolMessagesMessagesItem_RequestFailed", + "McpToolMessagesMessagesItem_RequestResponseDelayed", + "McpToolMessagesMessagesItem_RequestStart", + "McpToolMetadata", + "McpToolMetadataProtocol", + "MessageAddHookAction", + "MessageTarget", + "MessageTargetRole", + "MinimaxLlmModel", + "MinimaxLlmModelModel", + "MinimaxLlmModelToolsItem", + "MinimaxLlmModelToolsItem_ApiRequest", + "MinimaxLlmModelToolsItem_Bash", + "MinimaxLlmModelToolsItem_Code", + "MinimaxLlmModelToolsItem_Computer", + "MinimaxLlmModelToolsItem_Dtmf", + "MinimaxLlmModelToolsItem_EndCall", + "MinimaxLlmModelToolsItem_Function", + "MinimaxLlmModelToolsItem_GohighlevelCalendarAvailabilityCheck", + "MinimaxLlmModelToolsItem_GohighlevelCalendarEventCreate", + "MinimaxLlmModelToolsItem_GohighlevelContactCreate", + "MinimaxLlmModelToolsItem_GohighlevelContactGet", + "MinimaxLlmModelToolsItem_GoogleCalendarAvailabilityCheck", + "MinimaxLlmModelToolsItem_GoogleCalendarEventCreate", + "MinimaxLlmModelToolsItem_GoogleSheetsRowAppend", + "MinimaxLlmModelToolsItem_Handoff", + "MinimaxLlmModelToolsItem_Mcp", + "MinimaxLlmModelToolsItem_Query", + "MinimaxLlmModelToolsItem_SipRequest", + "MinimaxLlmModelToolsItem_SlackMessageSend", + "MinimaxLlmModelToolsItem_Sms", + "MinimaxLlmModelToolsItem_TextEditor", + "MinimaxLlmModelToolsItem_TransferCall", + "MinimaxLlmModelToolsItem_Voicemail", + "MinimaxVoice", + "MinimaxVoiceLanguageBoost", + "MinimaxVoiceModel", + "MinimaxVoiceRegion", + "MinimaxVoiceSubtitleType", + "MistralCredential", + "MistralCredentialProvider", "ModelCost", "Monitor", "MonitorPlan", + "MonitorResult", + "Mono", "NeetsVoice", - "NeetsVoiceId", - "NeetsVoiceIdEnum", + "NeuphonicCredential", + "NeuphonicCredentialProvider", + "NeuphonicVoice", + "NeuphonicVoiceModel", + "NodeArtifact", + "NodeArtifactMessagesItem", + "OAuth2AuthenticationPlan", + "OAuth2AuthenticationPlanType", + "Oauth2AuthenticationSession", "OpenAiCredential", + "OpenAiCredentialProvider", "OpenAiFunction", "OpenAiFunctionParameters", + "OpenAiFunctionParametersType", "OpenAiMessage", "OpenAiMessageRole", "OpenAiModel", "OpenAiModelFallbackModelsItem", "OpenAiModelModel", + "OpenAiModelPromptCacheRetention", + "OpenAiModelToolStrictCompatibilityMode", "OpenAiModelToolsItem", + "OpenAiModelToolsItem_ApiRequest", + "OpenAiModelToolsItem_Bash", + "OpenAiModelToolsItem_Code", + "OpenAiModelToolsItem_Computer", + "OpenAiModelToolsItem_Dtmf", + "OpenAiModelToolsItem_EndCall", + "OpenAiModelToolsItem_Function", + "OpenAiModelToolsItem_GohighlevelCalendarAvailabilityCheck", + "OpenAiModelToolsItem_GohighlevelCalendarEventCreate", + "OpenAiModelToolsItem_GohighlevelContactCreate", + "OpenAiModelToolsItem_GohighlevelContactGet", + "OpenAiModelToolsItem_GoogleCalendarAvailabilityCheck", + "OpenAiModelToolsItem_GoogleCalendarEventCreate", + "OpenAiModelToolsItem_GoogleSheetsRowAppend", + "OpenAiModelToolsItem_Handoff", + "OpenAiModelToolsItem_Mcp", + "OpenAiModelToolsItem_Query", + "OpenAiModelToolsItem_SipRequest", + "OpenAiModelToolsItem_SlackMessageSend", + "OpenAiModelToolsItem_Sms", + "OpenAiModelToolsItem_TextEditor", + "OpenAiModelToolsItem_TransferCall", + "OpenAiModelToolsItem_Voicemail", + "OpenAiTranscriber", + "OpenAiTranscriberLanguage", + "OpenAiTranscriberModel", "OpenAiVoice", "OpenAiVoiceId", + "OpenAiVoiceIdEnum", + "OpenAiVoiceModel", + "OpenAiVoicemailDetectionPlan", + "OpenAiVoicemailDetectionPlanProvider", + "OpenAiVoicemailDetectionPlanType", + "OpenAiWebChatRequest", + "OpenAiWebChatRequestInput", + "OpenAiWebChatRequestInputOneItem", "OpenRouterCredential", + "OpenRouterCredentialProvider", "OpenRouterModel", "OpenRouterModelToolsItem", + "OpenRouterModelToolsItem_ApiRequest", + "OpenRouterModelToolsItem_Bash", + "OpenRouterModelToolsItem_Code", + "OpenRouterModelToolsItem_Computer", + "OpenRouterModelToolsItem_Dtmf", + "OpenRouterModelToolsItem_EndCall", + "OpenRouterModelToolsItem_Function", + "OpenRouterModelToolsItem_GohighlevelCalendarAvailabilityCheck", + "OpenRouterModelToolsItem_GohighlevelCalendarEventCreate", + "OpenRouterModelToolsItem_GohighlevelContactCreate", + "OpenRouterModelToolsItem_GohighlevelContactGet", + "OpenRouterModelToolsItem_GoogleCalendarAvailabilityCheck", + "OpenRouterModelToolsItem_GoogleCalendarEventCreate", + "OpenRouterModelToolsItem_GoogleSheetsRowAppend", + "OpenRouterModelToolsItem_Handoff", + "OpenRouterModelToolsItem_Mcp", + "OpenRouterModelToolsItem_Query", + "OpenRouterModelToolsItem_SipRequest", + "OpenRouterModelToolsItem_SlackMessageSend", + "OpenRouterModelToolsItem_Sms", + "OpenRouterModelToolsItem_TextEditor", + "OpenRouterModelToolsItem_TransferCall", + "OpenRouterModelToolsItem_Voicemail", "Org", - "OrgPlan", + "OrgChannel", "OutputTool", "OutputToolMessagesItem", + "OutputToolMessagesItem_RequestComplete", + "OutputToolMessagesItem_RequestFailed", + "OutputToolMessagesItem_RequestResponseDelayed", + "OutputToolMessagesItem_RequestStart", + "OutputToolType", "PaginationMeta", + "PerformanceMetrics", "PerplexityAiCredential", + "PerplexityAiCredentialProvider", "PerplexityAiModel", "PerplexityAiModelToolsItem", + "PerplexityAiModelToolsItem_ApiRequest", + "PerplexityAiModelToolsItem_Bash", + "PerplexityAiModelToolsItem_Code", + "PerplexityAiModelToolsItem_Computer", + "PerplexityAiModelToolsItem_Dtmf", + "PerplexityAiModelToolsItem_EndCall", + "PerplexityAiModelToolsItem_Function", + "PerplexityAiModelToolsItem_GohighlevelCalendarAvailabilityCheck", + "PerplexityAiModelToolsItem_GohighlevelCalendarEventCreate", + "PerplexityAiModelToolsItem_GohighlevelContactCreate", + "PerplexityAiModelToolsItem_GohighlevelContactGet", + "PerplexityAiModelToolsItem_GoogleCalendarAvailabilityCheck", + "PerplexityAiModelToolsItem_GoogleCalendarEventCreate", + "PerplexityAiModelToolsItem_GoogleSheetsRowAppend", + "PerplexityAiModelToolsItem_Handoff", + "PerplexityAiModelToolsItem_Mcp", + "PerplexityAiModelToolsItem_Query", + "PerplexityAiModelToolsItem_SipRequest", + "PerplexityAiModelToolsItem_SlackMessageSend", + "PerplexityAiModelToolsItem_Sms", + "PerplexityAiModelToolsItem_TextEditor", + "PerplexityAiModelToolsItem_TransferCall", + "PerplexityAiModelToolsItem_Voicemail", + "Personality", + "PhoneNumberCallEndingHookFilter", + "PhoneNumberCallEndingHookFilterKey", + "PhoneNumberCallEndingHookFilterOneOfItem", + "PhoneNumberCallEndingHookFilterType", + "PhoneNumberCallRingingHookFilter", + "PhoneNumberCallRingingHookFilterKey", + "PhoneNumberCallRingingHookFilterType", + "PhoneNumberHookCallEnding", + "PhoneNumberHookCallEndingDo", + "PhoneNumberHookCallEndingDo_Say", + "PhoneNumberHookCallEndingDo_Transfer", + "PhoneNumberHookCallRinging", + "PhoneNumberHookCallRingingDoItem", + "PhoneNumberHookCallRingingDoItem_Say", + "PhoneNumberHookCallRingingDoItem_Transfer", + "PhoneNumberPaginatedResponse", + "PhoneNumberPaginatedResponseResultsItem", + "PhoneNumberPaginatedResponseResultsItem_ByoPhoneNumber", + "PhoneNumberPaginatedResponseResultsItem_Telnyx", + "PhoneNumberPaginatedResponseResultsItem_Twilio", + "PhoneNumberPaginatedResponseResultsItem_Vapi", + "PhoneNumberPaginatedResponseResultsItem_Vonage", + "PieInsight", + "PieInsightFromCallTable", + "PieInsightFromCallTableGroupBy", + "PieInsightFromCallTableQueriesItem", + "PieInsightFromCallTableType", + "PieInsightGroupBy", + "PieInsightQueriesItem", "PlayHtCredential", + "PlayHtCredentialProvider", "PlayHtVoice", "PlayHtVoiceEmotion", "PlayHtVoiceId", "PlayHtVoiceIdEnum", + "PlayHtVoiceLanguage", + "PlayHtVoiceModel", + "PromptInjectionSecurityFilter", + "PromptInjectionSecurityFilterType", + "ProviderResource", + "ProviderResourcePaginatedResponse", + "ProviderResourceProvider", + "ProviderResourceResourceName", + "PublicKeyEncryptionPlan", + "PublicKeyEncryptionPlanAlgorithm", + "PublicKeyEncryptionPlanPublicKey", + "PublicKeyEncryptionPlanPublicKey_SpkiPem", "PunctuationBoundary", + "QueryTool", + "QueryToolMessagesItem", + "QueryToolMessagesItem_RequestComplete", + "QueryToolMessagesItem_RequestFailed", + "QueryToolMessagesItem_RequestResponseDelayed", + "QueryToolMessagesItem_RequestStart", + "RceSecurityFilter", + "RceSecurityFilterType", + "Recording", + "RecordingConsent", + "RecordingConsentPlanStayOnLine", + "RecordingConsentPlanStayOnLineVoice", + "RecordingConsentPlanStayOnLineVoice_11Labs", + "RecordingConsentPlanStayOnLineVoice_Azure", + "RecordingConsentPlanStayOnLineVoice_Cartesia", + "RecordingConsentPlanStayOnLineVoice_CustomVoice", + "RecordingConsentPlanStayOnLineVoice_Deepgram", + "RecordingConsentPlanStayOnLineVoice_Hume", + "RecordingConsentPlanStayOnLineVoice_Inworld", + "RecordingConsentPlanStayOnLineVoice_Lmnt", + "RecordingConsentPlanStayOnLineVoice_Minimax", + "RecordingConsentPlanStayOnLineVoice_Neuphonic", + "RecordingConsentPlanStayOnLineVoice_Openai", + "RecordingConsentPlanStayOnLineVoice_Playht", + "RecordingConsentPlanStayOnLineVoice_RimeAi", + "RecordingConsentPlanStayOnLineVoice_Sesame", + "RecordingConsentPlanStayOnLineVoice_SmallestAi", + "RecordingConsentPlanStayOnLineVoice_Tavus", + "RecordingConsentPlanStayOnLineVoice_Vapi", + "RecordingConsentPlanStayOnLineVoice_Wellsaid", + "RecordingConsentPlanVerbal", + "RecordingConsentPlanVerbalVoice", + "RecordingConsentPlanVerbalVoice_11Labs", + "RecordingConsentPlanVerbalVoice_Azure", + "RecordingConsentPlanVerbalVoice_Cartesia", + "RecordingConsentPlanVerbalVoice_CustomVoice", + "RecordingConsentPlanVerbalVoice_Deepgram", + "RecordingConsentPlanVerbalVoice_Hume", + "RecordingConsentPlanVerbalVoice_Inworld", + "RecordingConsentPlanVerbalVoice_Lmnt", + "RecordingConsentPlanVerbalVoice_Minimax", + "RecordingConsentPlanVerbalVoice_Neuphonic", + "RecordingConsentPlanVerbalVoice_Openai", + "RecordingConsentPlanVerbalVoice_Playht", + "RecordingConsentPlanVerbalVoice_RimeAi", + "RecordingConsentPlanVerbalVoice_Sesame", + "RecordingConsentPlanVerbalVoice_SmallestAi", + "RecordingConsentPlanVerbalVoice_Tavus", + "RecordingConsentPlanVerbalVoice_Vapi", + "RecordingConsentPlanVerbalVoice_Wellsaid", + "RegexCondition", "RegexOption", "RegexOptionType", "RegexReplacement", + "RegexSecurityFilter", + "RegexSecurityFilterType", + "RelayCommandNote", + "RelayCommandOptions", + "RelayCommandOptionsType", + "RelayCommandSay", + "RelayRequest", + "RelayRequestCommandsItem", + "RelayRequestCommandsItem_MessageAdd", + "RelayRequestCommandsItem_Say", + "RelayRequestTarget", + "RelayRequestTarget_Assistant", + "RelayRequestTarget_Squad", + "RelayResponse", + "RelayResponseStatus", + "RelayTargetAssistant", + "RelayTargetOptions", + "RelayTargetOptionsType", + "RelayTargetSquad", + "ResponseCompletedEvent", + "ResponseCompletedEventType", + "ResponseErrorEvent", + "ResponseErrorEventType", + "ResponseObject", + "ResponseObjectObject", + "ResponseObjectStatus", + "ResponseOutputMessage", + "ResponseOutputMessageRole", + "ResponseOutputMessageStatus", + "ResponseOutputMessageType", + "ResponseOutputText", + "ResponseOutputTextType", + "ResponseTextDeltaEvent", + "ResponseTextDeltaEventType", + "ResponseTextDoneEvent", + "ResponseTextDoneEventType", "RimeAiCredential", + "RimeAiCredentialProvider", "RimeAiVoice", "RimeAiVoiceId", "RimeAiVoiceIdEnum", + "RimeAiVoiceLanguage", "RimeAiVoiceModel", - "RuleBasedCondition", - "RuleBasedConditionOperator", "RunpodCredential", + "RunpodCredentialProvider", "S3Credential", + "S3CredentialProvider", + "SayAssistantHookAction", + "SayHookAction", + "SayHookActionPrompt", + "SayHookActionPromptOneItem", + "SayPhoneNumberHookAction", "SbcConfiguration", + "Scenario", + "ScenarioHooksItem", + "ScenarioHooksItem_SimulationRunEnded", + "ScenarioHooksItem_SimulationRunStarted", + "ScenarioToolMock", + "SchedulePlan", + "Scorecard", + "ScorecardMetric", + "ScorecardPaginatedResponse", + "SecurityFilterBase", + "SecurityFilterPlan", + "SecurityFilterPlanMode", "Server", "ServerMessage", "ServerMessageAssistantRequest", "ServerMessageAssistantRequestPhoneNumber", + "ServerMessageAssistantRequestPhoneNumber_ByoPhoneNumber", + "ServerMessageAssistantRequestPhoneNumber_Telnyx", + "ServerMessageAssistantRequestPhoneNumber_Twilio", + "ServerMessageAssistantRequestPhoneNumber_Vapi", + "ServerMessageAssistantRequestPhoneNumber_Vonage", + "ServerMessageAssistantRequestType", + "ServerMessageAssistantSpeech", + "ServerMessageAssistantSpeechPhoneNumber", + "ServerMessageAssistantSpeechPhoneNumber_ByoPhoneNumber", + "ServerMessageAssistantSpeechPhoneNumber_Telnyx", + "ServerMessageAssistantSpeechPhoneNumber_Twilio", + "ServerMessageAssistantSpeechPhoneNumber_Vapi", + "ServerMessageAssistantSpeechPhoneNumber_Vonage", + "ServerMessageAssistantSpeechSource", + "ServerMessageAssistantSpeechTiming", + "ServerMessageAssistantSpeechTiming_WordAlignment", + "ServerMessageAssistantSpeechTiming_WordProgress", + "ServerMessageAssistantSpeechType", + "ServerMessageCallDeleteFailed", + "ServerMessageCallDeleteFailedPhoneNumber", + "ServerMessageCallDeleteFailedPhoneNumber_ByoPhoneNumber", + "ServerMessageCallDeleteFailedPhoneNumber_Telnyx", + "ServerMessageCallDeleteFailedPhoneNumber_Twilio", + "ServerMessageCallDeleteFailedPhoneNumber_Vapi", + "ServerMessageCallDeleteFailedPhoneNumber_Vonage", + "ServerMessageCallDeleteFailedType", + "ServerMessageCallDeleted", + "ServerMessageCallDeletedPhoneNumber", + "ServerMessageCallDeletedPhoneNumber_ByoPhoneNumber", + "ServerMessageCallDeletedPhoneNumber_Telnyx", + "ServerMessageCallDeletedPhoneNumber_Twilio", + "ServerMessageCallDeletedPhoneNumber_Vapi", + "ServerMessageCallDeletedPhoneNumber_Vonage", + "ServerMessageCallDeletedType", + "ServerMessageCallEndpointingRequest", + "ServerMessageCallEndpointingRequestMessagesItem", + "ServerMessageCallEndpointingRequestPhoneNumber", + "ServerMessageCallEndpointingRequestPhoneNumber_ByoPhoneNumber", + "ServerMessageCallEndpointingRequestPhoneNumber_Telnyx", + "ServerMessageCallEndpointingRequestPhoneNumber_Twilio", + "ServerMessageCallEndpointingRequestPhoneNumber_Vapi", + "ServerMessageCallEndpointingRequestPhoneNumber_Vonage", + "ServerMessageCallEndpointingRequestType", + "ServerMessageChatCreated", + "ServerMessageChatCreatedPhoneNumber", + "ServerMessageChatCreatedPhoneNumber_ByoPhoneNumber", + "ServerMessageChatCreatedPhoneNumber_Telnyx", + "ServerMessageChatCreatedPhoneNumber_Twilio", + "ServerMessageChatCreatedPhoneNumber_Vapi", + "ServerMessageChatCreatedPhoneNumber_Vonage", + "ServerMessageChatCreatedType", + "ServerMessageChatDeleted", + "ServerMessageChatDeletedPhoneNumber", + "ServerMessageChatDeletedPhoneNumber_ByoPhoneNumber", + "ServerMessageChatDeletedPhoneNumber_Telnyx", + "ServerMessageChatDeletedPhoneNumber_Twilio", + "ServerMessageChatDeletedPhoneNumber_Vapi", + "ServerMessageChatDeletedPhoneNumber_Vonage", + "ServerMessageChatDeletedType", "ServerMessageConversationUpdate", "ServerMessageConversationUpdateMessagesItem", "ServerMessageConversationUpdatePhoneNumber", + "ServerMessageConversationUpdatePhoneNumber_ByoPhoneNumber", + "ServerMessageConversationUpdatePhoneNumber_Telnyx", + "ServerMessageConversationUpdatePhoneNumber_Twilio", + "ServerMessageConversationUpdatePhoneNumber_Vapi", + "ServerMessageConversationUpdatePhoneNumber_Vonage", + "ServerMessageConversationUpdateType", "ServerMessageEndOfCallReport", "ServerMessageEndOfCallReportCostsItem", + "ServerMessageEndOfCallReportCostsItem_Analysis", + "ServerMessageEndOfCallReportCostsItem_KnowledgeBase", + "ServerMessageEndOfCallReportCostsItem_Model", + "ServerMessageEndOfCallReportCostsItem_Transcriber", + "ServerMessageEndOfCallReportCostsItem_Transport", + "ServerMessageEndOfCallReportCostsItem_Vapi", + "ServerMessageEndOfCallReportCostsItem_Voice", + "ServerMessageEndOfCallReportCostsItem_VoicemailDetection", + "ServerMessageEndOfCallReportDestination", + "ServerMessageEndOfCallReportDestination_Number", + "ServerMessageEndOfCallReportDestination_Sip", "ServerMessageEndOfCallReportEndedReason", "ServerMessageEndOfCallReportPhoneNumber", + "ServerMessageEndOfCallReportPhoneNumber_ByoPhoneNumber", + "ServerMessageEndOfCallReportPhoneNumber_Telnyx", + "ServerMessageEndOfCallReportPhoneNumber_Twilio", + "ServerMessageEndOfCallReportPhoneNumber_Vapi", + "ServerMessageEndOfCallReportPhoneNumber_Vonage", + "ServerMessageEndOfCallReportType", + "ServerMessageHandoffDestinationRequest", + "ServerMessageHandoffDestinationRequestPhoneNumber", + "ServerMessageHandoffDestinationRequestPhoneNumber_ByoPhoneNumber", + "ServerMessageHandoffDestinationRequestPhoneNumber_Telnyx", + "ServerMessageHandoffDestinationRequestPhoneNumber_Twilio", + "ServerMessageHandoffDestinationRequestPhoneNumber_Vapi", + "ServerMessageHandoffDestinationRequestPhoneNumber_Vonage", + "ServerMessageHandoffDestinationRequestType", "ServerMessageHang", "ServerMessageHangPhoneNumber", - "ServerMessageLanguageChanged", - "ServerMessageLanguageChangedPhoneNumber", + "ServerMessageHangPhoneNumber_ByoPhoneNumber", + "ServerMessageHangPhoneNumber_Telnyx", + "ServerMessageHangPhoneNumber_Twilio", + "ServerMessageHangPhoneNumber_Vapi", + "ServerMessageHangPhoneNumber_Vonage", + "ServerMessageHangType", + "ServerMessageKnowledgeBaseRequest", + "ServerMessageKnowledgeBaseRequestMessagesItem", + "ServerMessageKnowledgeBaseRequestPhoneNumber", + "ServerMessageKnowledgeBaseRequestPhoneNumber_ByoPhoneNumber", + "ServerMessageKnowledgeBaseRequestPhoneNumber_Telnyx", + "ServerMessageKnowledgeBaseRequestPhoneNumber_Twilio", + "ServerMessageKnowledgeBaseRequestPhoneNumber_Vapi", + "ServerMessageKnowledgeBaseRequestPhoneNumber_Vonage", + "ServerMessageKnowledgeBaseRequestType", + "ServerMessageLanguageChangeDetected", + "ServerMessageLanguageChangeDetectedPhoneNumber", + "ServerMessageLanguageChangeDetectedPhoneNumber_ByoPhoneNumber", + "ServerMessageLanguageChangeDetectedPhoneNumber_Telnyx", + "ServerMessageLanguageChangeDetectedPhoneNumber_Twilio", + "ServerMessageLanguageChangeDetectedPhoneNumber_Vapi", + "ServerMessageLanguageChangeDetectedPhoneNumber_Vonage", + "ServerMessageLanguageChangeDetectedType", "ServerMessageMessage", "ServerMessageModelOutput", "ServerMessageModelOutputPhoneNumber", + "ServerMessageModelOutputPhoneNumber_ByoPhoneNumber", + "ServerMessageModelOutputPhoneNumber_Telnyx", + "ServerMessageModelOutputPhoneNumber_Twilio", + "ServerMessageModelOutputPhoneNumber_Vapi", + "ServerMessageModelOutputPhoneNumber_Vonage", + "ServerMessageModelOutputType", "ServerMessagePhoneCallControl", "ServerMessagePhoneCallControlDestination", + "ServerMessagePhoneCallControlDestination_Number", + "ServerMessagePhoneCallControlDestination_Sip", "ServerMessagePhoneCallControlPhoneNumber", + "ServerMessagePhoneCallControlPhoneNumber_ByoPhoneNumber", + "ServerMessagePhoneCallControlPhoneNumber_Telnyx", + "ServerMessagePhoneCallControlPhoneNumber_Twilio", + "ServerMessagePhoneCallControlPhoneNumber_Vapi", + "ServerMessagePhoneCallControlPhoneNumber_Vonage", "ServerMessagePhoneCallControlRequest", + "ServerMessagePhoneCallControlType", "ServerMessageResponse", "ServerMessageResponseAssistantRequest", "ServerMessageResponseAssistantRequestDestination", + "ServerMessageResponseAssistantRequestDestination_Number", + "ServerMessageResponseAssistantRequestDestination_Sip", + "ServerMessageResponseCallEndpointingRequest", + "ServerMessageResponseHandoffDestinationRequest", + "ServerMessageResponseKnowledgeBaseRequest", "ServerMessageResponseMessageResponse", "ServerMessageResponseToolCalls", "ServerMessageResponseTransferDestinationRequest", "ServerMessageResponseTransferDestinationRequestDestination", + "ServerMessageResponseTransferDestinationRequestDestination_Assistant", + "ServerMessageResponseTransferDestinationRequestDestination_Number", + "ServerMessageResponseTransferDestinationRequestDestination_Sip", + "ServerMessageResponseTransferDestinationRequestMessage", + "ServerMessageResponseTransferDestinationRequestMessage_RequestComplete", + "ServerMessageResponseTransferDestinationRequestMessage_RequestFailed", + "ServerMessageResponseTransferDestinationRequestMessage_RequestResponseDelayed", + "ServerMessageResponseTransferDestinationRequestMessage_RequestStart", "ServerMessageResponseVoiceRequest", + "ServerMessageSessionCreated", + "ServerMessageSessionCreatedPhoneNumber", + "ServerMessageSessionCreatedPhoneNumber_ByoPhoneNumber", + "ServerMessageSessionCreatedPhoneNumber_Telnyx", + "ServerMessageSessionCreatedPhoneNumber_Twilio", + "ServerMessageSessionCreatedPhoneNumber_Vapi", + "ServerMessageSessionCreatedPhoneNumber_Vonage", + "ServerMessageSessionCreatedType", + "ServerMessageSessionDeleted", + "ServerMessageSessionDeletedPhoneNumber", + "ServerMessageSessionDeletedPhoneNumber_ByoPhoneNumber", + "ServerMessageSessionDeletedPhoneNumber_Telnyx", + "ServerMessageSessionDeletedPhoneNumber_Twilio", + "ServerMessageSessionDeletedPhoneNumber_Vapi", + "ServerMessageSessionDeletedPhoneNumber_Vonage", + "ServerMessageSessionDeletedType", + "ServerMessageSessionUpdated", + "ServerMessageSessionUpdatedPhoneNumber", + "ServerMessageSessionUpdatedPhoneNumber_ByoPhoneNumber", + "ServerMessageSessionUpdatedPhoneNumber_Telnyx", + "ServerMessageSessionUpdatedPhoneNumber_Twilio", + "ServerMessageSessionUpdatedPhoneNumber_Vapi", + "ServerMessageSessionUpdatedPhoneNumber_Vonage", + "ServerMessageSessionUpdatedType", "ServerMessageSpeechUpdate", "ServerMessageSpeechUpdatePhoneNumber", + "ServerMessageSpeechUpdatePhoneNumber_ByoPhoneNumber", + "ServerMessageSpeechUpdatePhoneNumber_Telnyx", + "ServerMessageSpeechUpdatePhoneNumber_Twilio", + "ServerMessageSpeechUpdatePhoneNumber_Vapi", + "ServerMessageSpeechUpdatePhoneNumber_Vonage", "ServerMessageSpeechUpdateRole", "ServerMessageSpeechUpdateStatus", + "ServerMessageSpeechUpdateType", "ServerMessageStatusUpdate", "ServerMessageStatusUpdateDestination", + "ServerMessageStatusUpdateDestination_Number", + "ServerMessageStatusUpdateDestination_Sip", "ServerMessageStatusUpdateEndedReason", "ServerMessageStatusUpdateMessagesItem", "ServerMessageStatusUpdatePhoneNumber", + "ServerMessageStatusUpdatePhoneNumber_ByoPhoneNumber", + "ServerMessageStatusUpdatePhoneNumber_Telnyx", + "ServerMessageStatusUpdatePhoneNumber_Twilio", + "ServerMessageStatusUpdatePhoneNumber_Vapi", + "ServerMessageStatusUpdatePhoneNumber_Vonage", "ServerMessageStatusUpdateStatus", + "ServerMessageStatusUpdateType", "ServerMessageToolCalls", "ServerMessageToolCallsPhoneNumber", + "ServerMessageToolCallsPhoneNumber_ByoPhoneNumber", + "ServerMessageToolCallsPhoneNumber_Telnyx", + "ServerMessageToolCallsPhoneNumber_Twilio", + "ServerMessageToolCallsPhoneNumber_Vapi", + "ServerMessageToolCallsPhoneNumber_Vonage", "ServerMessageToolCallsToolWithToolCallListItem", + "ServerMessageToolCallsToolWithToolCallListItem_Bash", + "ServerMessageToolCallsToolWithToolCallListItem_Computer", + "ServerMessageToolCallsToolWithToolCallListItem_Function", + "ServerMessageToolCallsToolWithToolCallListItem_Ghl", + "ServerMessageToolCallsToolWithToolCallListItem_GoogleCalendarEventCreate", + "ServerMessageToolCallsToolWithToolCallListItem_Make", + "ServerMessageToolCallsToolWithToolCallListItem_TextEditor", + "ServerMessageToolCallsType", "ServerMessageTranscript", "ServerMessageTranscriptPhoneNumber", + "ServerMessageTranscriptPhoneNumber_ByoPhoneNumber", + "ServerMessageTranscriptPhoneNumber_Telnyx", + "ServerMessageTranscriptPhoneNumber_Twilio", + "ServerMessageTranscriptPhoneNumber_Vapi", + "ServerMessageTranscriptPhoneNumber_Vonage", "ServerMessageTranscriptRole", "ServerMessageTranscriptTranscriptType", + "ServerMessageTranscriptType", "ServerMessageTransferDestinationRequest", "ServerMessageTransferDestinationRequestPhoneNumber", + "ServerMessageTransferDestinationRequestPhoneNumber_ByoPhoneNumber", + "ServerMessageTransferDestinationRequestPhoneNumber_Telnyx", + "ServerMessageTransferDestinationRequestPhoneNumber_Twilio", + "ServerMessageTransferDestinationRequestPhoneNumber_Vapi", + "ServerMessageTransferDestinationRequestPhoneNumber_Vonage", + "ServerMessageTransferDestinationRequestType", "ServerMessageTransferUpdate", "ServerMessageTransferUpdateDestination", + "ServerMessageTransferUpdateDestination_Assistant", + "ServerMessageTransferUpdateDestination_Number", + "ServerMessageTransferUpdateDestination_Sip", "ServerMessageTransferUpdatePhoneNumber", + "ServerMessageTransferUpdatePhoneNumber_ByoPhoneNumber", + "ServerMessageTransferUpdatePhoneNumber_Telnyx", + "ServerMessageTransferUpdatePhoneNumber_Twilio", + "ServerMessageTransferUpdatePhoneNumber_Vapi", + "ServerMessageTransferUpdatePhoneNumber_Vonage", + "ServerMessageTransferUpdateType", "ServerMessageUserInterrupted", "ServerMessageUserInterruptedPhoneNumber", + "ServerMessageUserInterruptedPhoneNumber_ByoPhoneNumber", + "ServerMessageUserInterruptedPhoneNumber_Telnyx", + "ServerMessageUserInterruptedPhoneNumber_Twilio", + "ServerMessageUserInterruptedPhoneNumber_Vapi", + "ServerMessageUserInterruptedPhoneNumber_Vonage", + "ServerMessageUserInterruptedType", "ServerMessageVoiceInput", "ServerMessageVoiceInputPhoneNumber", + "ServerMessageVoiceInputPhoneNumber_ByoPhoneNumber", + "ServerMessageVoiceInputPhoneNumber_Telnyx", + "ServerMessageVoiceInputPhoneNumber_Twilio", + "ServerMessageVoiceInputPhoneNumber_Vapi", + "ServerMessageVoiceInputPhoneNumber_Vonage", + "ServerMessageVoiceInputType", "ServerMessageVoiceRequest", "ServerMessageVoiceRequestPhoneNumber", + "ServerMessageVoiceRequestPhoneNumber_ByoPhoneNumber", + "ServerMessageVoiceRequestPhoneNumber_Telnyx", + "ServerMessageVoiceRequestPhoneNumber_Twilio", + "ServerMessageVoiceRequestPhoneNumber_Vapi", + "ServerMessageVoiceRequestPhoneNumber_Vonage", + "ServerMessageVoiceRequestType", + "SesameVoice", + "SesameVoiceModel", + "Session", + "SessionCost", + "SessionCostsItem", + "SessionCostsItem_Analysis", + "SessionCostsItem_Model", + "SessionCostsItem_Session", + "SessionCreatedHook", + "SessionCreatedHookOn", + "SessionMessagesItem", + "SessionPaginatedResponse", + "SessionStatus", + "Simulation", + "SimulationConcurrencyResponse", + "SimulationHookCallEnded", + "SimulationHookCallStarted", + "SimulationHookInclude", + "SimulationHookWebhookAction", + "SimulationHookWebhookActionType", + "SimulationRun", + "SimulationRunConfiguration", + "SimulationRunItem", + "SimulationRunItemCallMetadata", + "SimulationRunItemCallMonitor", + "SimulationRunItemCounts", + "SimulationRunItemHooksItem", + "SimulationRunItemHooksItem_SimulationRunEnded", + "SimulationRunItemHooksItem_SimulationRunStarted", + "SimulationRunItemImprovementSuggestion", + "SimulationRunItemImprovements", + "SimulationRunItemMetadata", + "SimulationRunItemResults", + "SimulationRunItemStatus", + "SimulationRunSimulationEntry", + "SimulationRunSimulationsItem", + "SimulationRunSimulationsItem_Simulation", + "SimulationRunSimulationsItem_SimulationSuite", + "SimulationRunStatus", + "SimulationRunSuiteEntry", + "SimulationRunTarget", + "SimulationRunTargetAssistant", + "SimulationRunTargetSquad", + "SimulationRunTarget_Assistant", + "SimulationRunTarget_Squad", + "SimulationRunTransportConfiguration", + "SimulationRunTransportConfigurationProvider", + "SimulationSuite", + "SipAuthentication", + "SipRequestTool", + "SipRequestToolBody", + "SipRequestToolMessagesItem", + "SipRequestToolMessagesItem_RequestComplete", + "SipRequestToolMessagesItem_RequestFailed", + "SipRequestToolMessagesItem_RequestResponseDelayed", + "SipRequestToolMessagesItem_RequestStart", + "SipRequestToolVerb", "SipTrunkGateway", "SipTrunkGatewayOutboundProtocol", "SipTrunkOutboundAuthenticationPlan", "SipTrunkOutboundSipRegisterPlan", + "SlackOAuth2AuthorizationCredential", + "SlackOAuth2AuthorizationCredentialProvider", + "SlackSendMessageTool", + "SlackSendMessageToolMessagesItem", + "SlackSendMessageToolMessagesItem_RequestComplete", + "SlackSendMessageToolMessagesItem_RequestFailed", + "SlackSendMessageToolMessagesItem_RequestResponseDelayed", + "SlackSendMessageToolMessagesItem_RequestStart", + "SlackWebhookCredential", + "SlackWebhookCredentialProvider", + "SmallestAiCredential", + "SmallestAiCredentialProvider", + "SmallestAiVoice", + "SmallestAiVoiceId", + "SmallestAiVoiceIdEnum", + "SmallestAiVoiceModel", + "SmartDenoisingPlan", + "SmsTool", + "SmsToolMessagesItem", + "SmsToolMessagesItem_RequestComplete", + "SmsToolMessagesItem_RequestFailed", + "SmsToolMessagesItem_RequestResponseDelayed", + "SmsToolMessagesItem_RequestStart", + "SonioxCredential", + "SonioxCredentialProvider", + "SonioxTranscriber", + "SonioxTranscriberLanguage", + "SonioxTranscriberModel", + "SpeechmaticsCredential", + "SpeechmaticsCredentialProvider", + "SpeechmaticsCustomVocabularyItem", + "SpeechmaticsTranscriber", + "SpeechmaticsTranscriberLanguage", + "SpeechmaticsTranscriberModel", + "SpeechmaticsTranscriberNumeralStyle", + "SpeechmaticsTranscriberOperatingPoint", + "SpeechmaticsTranscriberRegion", + "SpkiPemPublicKeyConfig", + "SqlInjectionSecurityFilter", + "SqlInjectionSecurityFilterType", "Squad", "SquadMemberDto", + "SquadMemberDtoAssistantDestinationsItem", + "SsrfSecurityFilter", + "SsrfSecurityFilterType", "StartSpeakingPlan", - "StepDestination", - "StepDestinationConditionsItem", + "StartSpeakingPlanCustomEndpointingRulesItem", + "StartSpeakingPlanCustomEndpointingRulesItem_Assistant", + "StartSpeakingPlanCustomEndpointingRulesItem_Both", + "StartSpeakingPlanCustomEndpointingRulesItem_Customer", + "StartSpeakingPlanSmartEndpointingEnabled", + "StartSpeakingPlanSmartEndpointingEnabledOne", + "StartSpeakingPlanSmartEndpointingPlan", "StopSpeakingPlan", + "StructuredDataMultiPlan", "StructuredDataPlan", + "StructuredOutput", + "StructuredOutputEvaluationResult", + "StructuredOutputEvaluationResultComparator", + "StructuredOutputEvaluationResultExpectedValue", + "StructuredOutputEvaluationResultExtractedValue", + "StructuredOutputFilterDto", + "StructuredOutputModel", + "StructuredOutputModel_Anthropic", + "StructuredOutputModel_AnthropicBedrock", + "StructuredOutputModel_CustomLlm", + "StructuredOutputModel_Google", + "StructuredOutputModel_Openai", + "StructuredOutputPaginatedResponse", + "StructuredOutputType", + "Subscription", + "SubscriptionLimits", + "SubscriptionMinutesIncludedResetFrequency", + "SubscriptionStatus", + "SubscriptionType", "SuccessEvaluationPlan", "SuccessEvaluationPlanRubric", "SummaryPlan", + "SupabaseBucketPlan", + "SupabaseBucketPlanRegion", + "SupabaseCredential", + "SupabaseCredentialProvider", "SyncVoiceLibraryDto", "SyncVoiceLibraryDtoProvidersItem", "SystemMessage", "TalkscriberTranscriber", "TalkscriberTranscriberLanguage", + "TalkscriberTranscriberModel", + "TargetPlan", + "TavusConversationProperties", + "TavusCredential", + "TavusCredentialProvider", + "TavusVoice", + "TavusVoiceVoiceId", + "TavusVoiceVoiceIdZero", + "TelnyxPhoneNumber", + "TelnyxPhoneNumberFallbackDestination", + "TelnyxPhoneNumberFallbackDestination_Number", + "TelnyxPhoneNumberFallbackDestination_Sip", + "TelnyxPhoneNumberHooksItem", + "TelnyxPhoneNumberHooksItem_CallEnding", + "TelnyxPhoneNumberHooksItem_CallRinging", + "TelnyxPhoneNumberStatus", "Template", "TemplateDetails", + "TemplateDetails_ApiRequest", + "TemplateDetails_Bash", + "TemplateDetails_Code", + "TemplateDetails_Computer", + "TemplateDetails_Dtmf", + "TemplateDetails_EndCall", + "TemplateDetails_Function", + "TemplateDetails_GohighlevelCalendarAvailabilityCheck", + "TemplateDetails_GohighlevelCalendarEventCreate", + "TemplateDetails_GohighlevelContactCreate", + "TemplateDetails_GohighlevelContactGet", + "TemplateDetails_GoogleCalendarAvailabilityCheck", + "TemplateDetails_GoogleCalendarEventCreate", + "TemplateDetails_GoogleSheetsRowAppend", + "TemplateDetails_Handoff", + "TemplateDetails_Mcp", + "TemplateDetails_Query", + "TemplateDetails_SipRequest", + "TemplateDetails_SlackMessageSend", + "TemplateDetails_Sms", + "TemplateDetails_TextEditor", + "TemplateDetails_TransferCall", + "TemplateDetails_Voicemail", "TemplateProvider", "TemplateProviderDetails", + "TemplateProviderDetails_Function", + "TemplateProviderDetails_Ghl", + "TemplateProviderDetails_GohighlevelCalendarAvailabilityCheck", + "TemplateProviderDetails_GohighlevelCalendarEventCreate", + "TemplateProviderDetails_GohighlevelContactCreate", + "TemplateProviderDetails_GohighlevelContactGet", + "TemplateProviderDetails_GoogleCalendarEventCreate", + "TemplateProviderDetails_GoogleSheetsRowAppend", + "TemplateProviderDetails_Make", + "TemplateType", "TemplateVisibility", + "TestSuite", + "TestSuitePhoneNumber", + "TestSuitePhoneNumberProvider", + "TestSuiteRun", + "TestSuiteRunScorerAi", + "TestSuiteRunScorerAiResult", + "TestSuiteRunScorerAiType", + "TestSuiteRunStatus", + "TestSuiteRunTestAttempt", + "TestSuiteRunTestAttemptCall", + "TestSuiteRunTestAttemptMetadata", + "TestSuiteRunTestResult", + "TestSuiteRunsPaginatedResponse", + "TestSuiteTestChat", + "TestSuiteTestScorerAi", + "TestSuiteTestScorerAiType", + "TestSuiteTestVoice", + "TestSuiteTestVoiceType", + "TestSuiteTestsPaginatedResponse", + "TestSuiteTestsPaginatedResponseResultsItem", + "TestSuiteTestsPaginatedResponseResultsItem_Chat", + "TestSuiteTestsPaginatedResponseResultsItem_Voice", + "TestSuitesPaginatedResponse", + "TesterPlan", + "TextContent", + "TextContentLanguage", + "TextContentType", + "TextEditorTool", + "TextEditorToolMessagesItem", + "TextEditorToolMessagesItem_RequestComplete", + "TextEditorToolMessagesItem_RequestFailed", + "TextEditorToolMessagesItem_RequestResponseDelayed", + "TextEditorToolMessagesItem_RequestStart", + "TextEditorToolName", + "TextEditorToolSubType", + "TextEditorToolWithToolCall", + "TextEditorToolWithToolCallMessagesItem", + "TextEditorToolWithToolCallMessagesItem_RequestComplete", + "TextEditorToolWithToolCallMessagesItem_RequestFailed", + "TextEditorToolWithToolCallMessagesItem_RequestResponseDelayed", + "TextEditorToolWithToolCallMessagesItem_RequestStart", + "TextEditorToolWithToolCallName", + "TextEditorToolWithToolCallSubType", + "TextInsight", + "TextInsightFromCallTable", + "TextInsightFromCallTableQueriesItem", + "TextInsightFromCallTableType", + "TextInsightQueriesItem", "TimeRange", "TimeRangeStep", "TogetherAiCredential", + "TogetherAiCredentialProvider", "TogetherAiModel", "TogetherAiModelToolsItem", + "TogetherAiModelToolsItem_ApiRequest", + "TogetherAiModelToolsItem_Bash", + "TogetherAiModelToolsItem_Code", + "TogetherAiModelToolsItem_Computer", + "TogetherAiModelToolsItem_Dtmf", + "TogetherAiModelToolsItem_EndCall", + "TogetherAiModelToolsItem_Function", + "TogetherAiModelToolsItem_GohighlevelCalendarAvailabilityCheck", + "TogetherAiModelToolsItem_GohighlevelCalendarEventCreate", + "TogetherAiModelToolsItem_GohighlevelContactCreate", + "TogetherAiModelToolsItem_GohighlevelContactGet", + "TogetherAiModelToolsItem_GoogleCalendarAvailabilityCheck", + "TogetherAiModelToolsItem_GoogleCalendarEventCreate", + "TogetherAiModelToolsItem_GoogleSheetsRowAppend", + "TogetherAiModelToolsItem_Handoff", + "TogetherAiModelToolsItem_Mcp", + "TogetherAiModelToolsItem_Query", + "TogetherAiModelToolsItem_SipRequest", + "TogetherAiModelToolsItem_SlackMessageSend", + "TogetherAiModelToolsItem_Sms", + "TogetherAiModelToolsItem_TextEditor", + "TogetherAiModelToolsItem_TransferCall", + "TogetherAiModelToolsItem_Voicemail", "Token", "TokenRestrictions", "TokenTag", "ToolCall", - "ToolCallBlock", - "ToolCallBlockMessagesItem", - "ToolCallBlockTool", "ToolCallFunction", + "ToolCallHookAction", + "ToolCallHookActionTool", + "ToolCallHookActionTool_ApiRequest", + "ToolCallHookActionTool_Bash", + "ToolCallHookActionTool_Code", + "ToolCallHookActionTool_Computer", + "ToolCallHookActionTool_Dtmf", + "ToolCallHookActionTool_EndCall", + "ToolCallHookActionTool_Function", + "ToolCallHookActionTool_GohighlevelCalendarAvailabilityCheck", + "ToolCallHookActionTool_GohighlevelCalendarEventCreate", + "ToolCallHookActionTool_GohighlevelContactCreate", + "ToolCallHookActionTool_GohighlevelContactGet", + "ToolCallHookActionTool_GoogleCalendarAvailabilityCheck", + "ToolCallHookActionTool_GoogleCalendarEventCreate", + "ToolCallHookActionTool_GoogleSheetsRowAppend", + "ToolCallHookActionTool_Handoff", + "ToolCallHookActionTool_Mcp", + "ToolCallHookActionTool_Query", + "ToolCallHookActionTool_SipRequest", + "ToolCallHookActionTool_SlackMessageSend", + "ToolCallHookActionTool_Sms", + "ToolCallHookActionTool_TextEditor", + "ToolCallHookActionTool_TransferCall", + "ToolCallHookActionTool_Voicemail", + "ToolCallHookActionType", "ToolCallMessage", "ToolCallResult", "ToolCallResultMessage", - "ToolCallResultMessageItem", + "ToolMessage", "ToolMessageComplete", "ToolMessageCompleteRole", "ToolMessageDelayed", "ToolMessageFailed", + "ToolMessageRole", "ToolMessageStart", + "ToolNode", + "ToolNodeTool", + "ToolNodeTool_ApiRequest", + "ToolNodeTool_Bash", + "ToolNodeTool_Code", + "ToolNodeTool_Computer", + "ToolNodeTool_Dtmf", + "ToolNodeTool_EndCall", + "ToolNodeTool_Function", + "ToolNodeTool_GohighlevelCalendarAvailabilityCheck", + "ToolNodeTool_GohighlevelCalendarEventCreate", + "ToolNodeTool_GohighlevelContactCreate", + "ToolNodeTool_GohighlevelContactGet", + "ToolNodeTool_GoogleCalendarAvailabilityCheck", + "ToolNodeTool_GoogleCalendarEventCreate", + "ToolNodeTool_GoogleSheetsRowAppend", + "ToolNodeTool_Handoff", + "ToolNodeTool_Mcp", + "ToolNodeTool_Query", + "ToolNodeTool_SipRequest", + "ToolNodeTool_SlackMessageSend", + "ToolNodeTool_Sms", + "ToolNodeTool_TextEditor", + "ToolNodeTool_TransferCall", + "ToolNodeTool_Voicemail", + "ToolParameter", + "ToolParameterValue", + "ToolRejectionPlan", + "ToolRejectionPlanConditionsItem", + "ToolRejectionPlanConditionsItem_Group", + "ToolRejectionPlanConditionsItem_Liquid", + "ToolRejectionPlanConditionsItem_Regex", "ToolTemplateMetadata", "ToolTemplateSetup", "TranscriberCost", "TranscriptPlan", "TranscriptionEndpointingPlan", + "TransferAssistant", + "TransferAssistantBackgroundSound", + "TransferAssistantBackgroundSoundZero", + "TransferAssistantFirstMessageMode", + "TransferAssistantHookAction", + "TransferAssistantModel", + "TransferAssistantModelProvider", + "TransferAssistantTranscriber", + "TransferAssistantTranscriber_11Labs", + "TransferAssistantTranscriber_AssemblyAi", + "TransferAssistantTranscriber_Azure", + "TransferAssistantTranscriber_Cartesia", + "TransferAssistantTranscriber_CustomTranscriber", + "TransferAssistantTranscriber_Deepgram", + "TransferAssistantTranscriber_Gladia", + "TransferAssistantTranscriber_Google", + "TransferAssistantTranscriber_Openai", + "TransferAssistantTranscriber_Soniox", + "TransferAssistantTranscriber_Speechmatics", + "TransferAssistantTranscriber_Talkscriber", + "TransferAssistantVoice", + "TransferAssistantVoice_11Labs", + "TransferAssistantVoice_Azure", + "TransferAssistantVoice_Cartesia", + "TransferAssistantVoice_CustomVoice", + "TransferAssistantVoice_Deepgram", + "TransferAssistantVoice_Hume", + "TransferAssistantVoice_Inworld", + "TransferAssistantVoice_Lmnt", + "TransferAssistantVoice_Minimax", + "TransferAssistantVoice_Neuphonic", + "TransferAssistantVoice_Openai", + "TransferAssistantVoice_Playht", + "TransferAssistantVoice_RimeAi", + "TransferAssistantVoice_Sesame", + "TransferAssistantVoice_SmallestAi", + "TransferAssistantVoice_Tavus", + "TransferAssistantVoice_Vapi", + "TransferAssistantVoice_Wellsaid", "TransferCallTool", "TransferCallToolDestinationsItem", + "TransferCallToolDestinationsItem_Assistant", + "TransferCallToolDestinationsItem_Number", + "TransferCallToolDestinationsItem_Sip", "TransferCallToolMessagesItem", + "TransferCallToolMessagesItem_RequestComplete", + "TransferCallToolMessagesItem_RequestFailed", + "TransferCallToolMessagesItem_RequestResponseDelayed", + "TransferCallToolMessagesItem_RequestStart", + "TransferCancelToolUserEditable", + "TransferCancelToolUserEditableMessagesItem", + "TransferCancelToolUserEditableMessagesItem_RequestComplete", + "TransferCancelToolUserEditableMessagesItem_RequestFailed", + "TransferCancelToolUserEditableMessagesItem_RequestResponseDelayed", + "TransferCancelToolUserEditableMessagesItem_RequestStart", + "TransferCancelToolUserEditableType", "TransferDestinationAssistant", + "TransferDestinationAssistantMessage", + "TransferDestinationAssistantType", "TransferDestinationNumber", + "TransferDestinationNumberMessage", "TransferDestinationSip", - "TransferDestinationStep", + "TransferDestinationSipMessage", + "TransferFallbackPlan", + "TransferFallbackPlanMessage", + "TransferHookAction", + "TransferHookActionDestination", + "TransferHookActionDestination_Number", + "TransferHookActionDestination_Sip", + "TransferHookActionType", "TransferMode", + "TransferPhoneNumberHookAction", + "TransferPhoneNumberHookActionDestination", + "TransferPhoneNumberHookActionDestination_Number", + "TransferPhoneNumberHookActionDestination_Sip", + "TransferPlan", + "TransferPlanContextEngineeringPlan", + "TransferPlanContextEngineeringPlan_All", + "TransferPlanContextEngineeringPlan_LastNMessages", + "TransferPlanContextEngineeringPlan_None", + "TransferPlanMessage", + "TransferPlanMode", + "TransferSuccessfulToolUserEditable", + "TransferSuccessfulToolUserEditableMessagesItem", + "TransferSuccessfulToolUserEditableMessagesItem_RequestComplete", + "TransferSuccessfulToolUserEditableMessagesItem_RequestFailed", + "TransferSuccessfulToolUserEditableMessagesItem_RequestResponseDelayed", + "TransferSuccessfulToolUserEditableMessagesItem_RequestStart", + "TransferSuccessfulToolUserEditableType", "TransportConfigurationTwilio", + "TransportConfigurationTwilioProvider", "TransportConfigurationTwilioRecordingChannels", "TransportCost", + "TransportCostProvider", + "TrieveCredential", + "TrieveCredentialProvider", + "TrieveKnowledgeBase", + "TrieveKnowledgeBaseChunkPlan", + "TrieveKnowledgeBaseCreate", + "TrieveKnowledgeBaseCreateType", + "TrieveKnowledgeBaseImport", + "TrieveKnowledgeBaseImportType", + "TrieveKnowledgeBaseProvider", + "TrieveKnowledgeBaseSearchPlan", + "TrieveKnowledgeBaseSearchPlanSearchType", + "TurnLatency", "TwilioCredential", + "TwilioCredentialProvider", "TwilioPhoneNumber", "TwilioPhoneNumberFallbackDestination", - "TwilioVoicemailDetection", - "TwilioVoicemailDetectionVoicemailDetectionTypesItem", + "TwilioPhoneNumberFallbackDestination_Number", + "TwilioPhoneNumberFallbackDestination_Sip", + "TwilioPhoneNumberHooksItem", + "TwilioPhoneNumberHooksItem_CallEnding", + "TwilioPhoneNumberHooksItem_CallRinging", + "TwilioPhoneNumberStatus", + "TwilioSmsChatTransport", + "TwilioSmsChatTransportConversationType", + "TwilioSmsChatTransportType", + "TwilioTransportMessage", + "TwilioVoicemailDetectionPlan", + "TwilioVoicemailDetectionPlanProvider", + "TwilioVoicemailDetectionPlanVoicemailDetectionTypesItem", + "UpdateAnthropicBedrockCredentialDto", + "UpdateAnthropicBedrockCredentialDtoAuthenticationPlan", + "UpdateAnthropicBedrockCredentialDtoAuthenticationPlan_AwsIam", + "UpdateAnthropicBedrockCredentialDtoAuthenticationPlan_AwsSts", + "UpdateAnthropicBedrockCredentialDtoRegion", "UpdateAnthropicCredentialDto", "UpdateAnyscaleCredentialDto", + "UpdateApiRequestToolDto", + "UpdateApiRequestToolDtoMessagesItem", + "UpdateApiRequestToolDtoMessagesItem_RequestComplete", + "UpdateApiRequestToolDtoMessagesItem_RequestFailed", + "UpdateApiRequestToolDtoMessagesItem_RequestResponseDelayed", + "UpdateApiRequestToolDtoMessagesItem_RequestStart", + "UpdateApiRequestToolDtoMethod", + "UpdateAssemblyAiCredentialDto", + "UpdateAzureCredentialDto", + "UpdateAzureCredentialDtoRegion", + "UpdateAzureCredentialDtoService", "UpdateAzureOpenAiCredentialDto", "UpdateAzureOpenAiCredentialDtoModelsItem", "UpdateAzureOpenAiCredentialDtoRegion", + "UpdateBarInsightFromCallTableDto", + "UpdateBarInsightFromCallTableDtoGroupBy", + "UpdateBarInsightFromCallTableDtoQueriesItem", + "UpdateBashToolDto", + "UpdateBashToolDtoMessagesItem", + "UpdateBashToolDtoMessagesItem_RequestComplete", + "UpdateBashToolDtoMessagesItem_RequestFailed", + "UpdateBashToolDtoMessagesItem_RequestResponseDelayed", + "UpdateBashToolDtoMessagesItem_RequestStart", + "UpdateBashToolDtoName", + "UpdateBashToolDtoSubType", + "UpdateByoPhoneNumberDto", + "UpdateByoPhoneNumberDtoFallbackDestination", + "UpdateByoPhoneNumberDtoFallbackDestination_Number", + "UpdateByoPhoneNumberDtoFallbackDestination_Sip", + "UpdateByoPhoneNumberDtoHooksItem", + "UpdateByoPhoneNumberDtoHooksItem_CallEnding", + "UpdateByoPhoneNumberDtoHooksItem_CallRinging", "UpdateByoSipTrunkCredentialDto", "UpdateCartesiaCredentialDto", + "UpdateCerebrasCredentialDto", + "UpdateCloudflareCredentialDto", + "UpdateCodeToolDto", + "UpdateCodeToolDtoMessagesItem", + "UpdateCodeToolDtoMessagesItem_RequestComplete", + "UpdateCodeToolDtoMessagesItem_RequestFailed", + "UpdateCodeToolDtoMessagesItem_RequestResponseDelayed", + "UpdateCodeToolDtoMessagesItem_RequestStart", + "UpdateComputerToolDto", + "UpdateComputerToolDtoMessagesItem", + "UpdateComputerToolDtoMessagesItem_RequestComplete", + "UpdateComputerToolDtoMessagesItem_RequestFailed", + "UpdateComputerToolDtoMessagesItem_RequestResponseDelayed", + "UpdateComputerToolDtoMessagesItem_RequestStart", + "UpdateComputerToolDtoName", + "UpdateComputerToolDtoSubType", + "UpdateCustomCredentialDto", + "UpdateCustomCredentialDtoAuthenticationPlan", + "UpdateCustomCredentialDtoAuthenticationPlan_Bearer", + "UpdateCustomCredentialDtoAuthenticationPlan_Hmac", + "UpdateCustomCredentialDtoAuthenticationPlan_Oauth2", + "UpdateCustomCredentialDtoEncryptionPlan", + "UpdateCustomCredentialDtoEncryptionPlan_PublicKey", + "UpdateCustomKnowledgeBaseDto", "UpdateCustomLlmCredentialDto", "UpdateDeepInfraCredentialDto", + "UpdateDeepSeekCredentialDto", "UpdateDeepgramCredentialDto", + "UpdateDtmfToolDto", + "UpdateDtmfToolDtoMessagesItem", + "UpdateDtmfToolDtoMessagesItem_RequestComplete", + "UpdateDtmfToolDtoMessagesItem_RequestFailed", + "UpdateDtmfToolDtoMessagesItem_RequestResponseDelayed", + "UpdateDtmfToolDtoMessagesItem_RequestStart", "UpdateElevenLabsCredentialDto", + "UpdateEmailCredentialDto", + "UpdateEndCallToolDto", + "UpdateEndCallToolDtoMessagesItem", + "UpdateEndCallToolDtoMessagesItem_RequestComplete", + "UpdateEndCallToolDtoMessagesItem_RequestFailed", + "UpdateEndCallToolDtoMessagesItem_RequestResponseDelayed", + "UpdateEndCallToolDtoMessagesItem_RequestStart", + "UpdateFunctionToolDto", + "UpdateFunctionToolDtoMessagesItem", + "UpdateFunctionToolDtoMessagesItem_RequestComplete", + "UpdateFunctionToolDtoMessagesItem_RequestFailed", + "UpdateFunctionToolDtoMessagesItem_RequestResponseDelayed", + "UpdateFunctionToolDtoMessagesItem_RequestStart", "UpdateGcpCredentialDto", + "UpdateGhlToolDto", + "UpdateGhlToolDtoMessagesItem", + "UpdateGhlToolDtoMessagesItem_RequestComplete", + "UpdateGhlToolDtoMessagesItem_RequestFailed", + "UpdateGhlToolDtoMessagesItem_RequestResponseDelayed", + "UpdateGhlToolDtoMessagesItem_RequestStart", "UpdateGladiaCredentialDto", + "UpdateGoHighLevelCalendarAvailabilityToolDto", + "UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem", + "UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestComplete", + "UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestFailed", + "UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestResponseDelayed", + "UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestStart", + "UpdateGoHighLevelCalendarEventCreateToolDto", + "UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem", + "UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestComplete", + "UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestFailed", + "UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestResponseDelayed", + "UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestStart", + "UpdateGoHighLevelContactCreateToolDto", + "UpdateGoHighLevelContactCreateToolDtoMessagesItem", + "UpdateGoHighLevelContactCreateToolDtoMessagesItem_RequestComplete", + "UpdateGoHighLevelContactCreateToolDtoMessagesItem_RequestFailed", + "UpdateGoHighLevelContactCreateToolDtoMessagesItem_RequestResponseDelayed", + "UpdateGoHighLevelContactCreateToolDtoMessagesItem_RequestStart", + "UpdateGoHighLevelContactGetToolDto", + "UpdateGoHighLevelContactGetToolDtoMessagesItem", + "UpdateGoHighLevelContactGetToolDtoMessagesItem_RequestComplete", + "UpdateGoHighLevelContactGetToolDtoMessagesItem_RequestFailed", + "UpdateGoHighLevelContactGetToolDtoMessagesItem_RequestResponseDelayed", + "UpdateGoHighLevelContactGetToolDtoMessagesItem_RequestStart", "UpdateGoHighLevelCredentialDto", + "UpdateGoHighLevelMcpCredentialDto", + "UpdateGoogleCalendarCheckAvailabilityToolDto", + "UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem", + "UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestComplete", + "UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestFailed", + "UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestResponseDelayed", + "UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestStart", + "UpdateGoogleCalendarCreateEventToolDto", + "UpdateGoogleCalendarCreateEventToolDtoMessagesItem", + "UpdateGoogleCalendarCreateEventToolDtoMessagesItem_RequestComplete", + "UpdateGoogleCalendarCreateEventToolDtoMessagesItem_RequestFailed", + "UpdateGoogleCalendarCreateEventToolDtoMessagesItem_RequestResponseDelayed", + "UpdateGoogleCalendarCreateEventToolDtoMessagesItem_RequestStart", + "UpdateGoogleCalendarOAuth2AuthorizationCredentialDto", + "UpdateGoogleCalendarOAuth2ClientCredentialDto", + "UpdateGoogleCredentialDto", + "UpdateGoogleSheetsOAuth2AuthorizationCredentialDto", + "UpdateGoogleSheetsRowAppendToolDto", + "UpdateGoogleSheetsRowAppendToolDtoMessagesItem", + "UpdateGoogleSheetsRowAppendToolDtoMessagesItem_RequestComplete", + "UpdateGoogleSheetsRowAppendToolDtoMessagesItem_RequestFailed", + "UpdateGoogleSheetsRowAppendToolDtoMessagesItem_RequestResponseDelayed", + "UpdateGoogleSheetsRowAppendToolDtoMessagesItem_RequestStart", "UpdateGroqCredentialDto", + "UpdateHandoffToolDto", + "UpdateHandoffToolDtoDestinationsItem", + "UpdateHandoffToolDtoDestinationsItem_Assistant", + "UpdateHandoffToolDtoDestinationsItem_Dynamic", + "UpdateHandoffToolDtoDestinationsItem_Squad", + "UpdateHandoffToolDtoMessagesItem", + "UpdateHandoffToolDtoMessagesItem_RequestComplete", + "UpdateHandoffToolDtoMessagesItem_RequestFailed", + "UpdateHandoffToolDtoMessagesItem_RequestResponseDelayed", + "UpdateHandoffToolDtoMessagesItem_RequestStart", + "UpdateHumeCredentialDto", + "UpdateInflectionAiCredentialDto", + "UpdateInworldCredentialDto", + "UpdateLangfuseCredentialDto", + "UpdateLineInsightFromCallTableDto", + "UpdateLineInsightFromCallTableDtoGroupBy", + "UpdateLineInsightFromCallTableDtoQueriesItem", "UpdateLmntCredentialDto", "UpdateMakeCredentialDto", + "UpdateMakeToolDto", + "UpdateMakeToolDtoMessagesItem", + "UpdateMakeToolDtoMessagesItem_RequestComplete", + "UpdateMakeToolDtoMessagesItem_RequestFailed", + "UpdateMakeToolDtoMessagesItem_RequestResponseDelayed", + "UpdateMakeToolDtoMessagesItem_RequestStart", + "UpdateMcpToolDto", + "UpdateMcpToolDtoMessagesItem", + "UpdateMcpToolDtoMessagesItem_RequestComplete", + "UpdateMcpToolDtoMessagesItem_RequestFailed", + "UpdateMcpToolDtoMessagesItem_RequestResponseDelayed", + "UpdateMcpToolDtoMessagesItem_RequestStart", + "UpdateMistralCredentialDto", + "UpdateNeuphonicCredentialDto", "UpdateOpenAiCredentialDto", "UpdateOpenRouterCredentialDto", "UpdateOrgDto", + "UpdateOrgDtoChannel", + "UpdateOutputToolDto", + "UpdateOutputToolDtoMessagesItem", + "UpdateOutputToolDtoMessagesItem_RequestComplete", + "UpdateOutputToolDtoMessagesItem_RequestFailed", + "UpdateOutputToolDtoMessagesItem_RequestResponseDelayed", + "UpdateOutputToolDtoMessagesItem_RequestStart", "UpdatePerplexityAiCredentialDto", + "UpdatePersonalityDto", + "UpdatePieInsightFromCallTableDto", + "UpdatePieInsightFromCallTableDtoGroupBy", + "UpdatePieInsightFromCallTableDtoQueriesItem", "UpdatePlayHtCredentialDto", + "UpdateQueryToolDto", + "UpdateQueryToolDtoMessagesItem", + "UpdateQueryToolDtoMessagesItem_RequestComplete", + "UpdateQueryToolDtoMessagesItem_RequestFailed", + "UpdateQueryToolDtoMessagesItem_RequestResponseDelayed", + "UpdateQueryToolDtoMessagesItem_RequestStart", "UpdateRimeAiCredentialDto", "UpdateRunpodCredentialDto", "UpdateS3CredentialDto", + "UpdateScenarioDto", + "UpdateScenarioDtoHooksItem", + "UpdateScenarioDtoHooksItem_SimulationRunEnded", + "UpdateScenarioDtoHooksItem_SimulationRunStarted", + "UpdateSimulationDto", + "UpdateSimulationSuiteDto", + "UpdateSipRequestToolDto", + "UpdateSipRequestToolDtoBody", + "UpdateSipRequestToolDtoMessagesItem", + "UpdateSipRequestToolDtoMessagesItem_RequestComplete", + "UpdateSipRequestToolDtoMessagesItem_RequestFailed", + "UpdateSipRequestToolDtoMessagesItem_RequestResponseDelayed", + "UpdateSipRequestToolDtoMessagesItem_RequestStart", + "UpdateSipRequestToolDtoVerb", + "UpdateSlackOAuth2AuthorizationCredentialDto", + "UpdateSlackSendMessageToolDto", + "UpdateSlackSendMessageToolDtoMessagesItem", + "UpdateSlackSendMessageToolDtoMessagesItem_RequestComplete", + "UpdateSlackSendMessageToolDtoMessagesItem_RequestFailed", + "UpdateSlackSendMessageToolDtoMessagesItem_RequestResponseDelayed", + "UpdateSlackSendMessageToolDtoMessagesItem_RequestStart", + "UpdateSlackWebhookCredentialDto", + "UpdateSmsToolDto", + "UpdateSmsToolDtoMessagesItem", + "UpdateSmsToolDtoMessagesItem_RequestComplete", + "UpdateSmsToolDtoMessagesItem_RequestFailed", + "UpdateSmsToolDtoMessagesItem_RequestResponseDelayed", + "UpdateSmsToolDtoMessagesItem_RequestStart", + "UpdateSonioxCredentialDto", + "UpdateTelnyxPhoneNumberDto", + "UpdateTelnyxPhoneNumberDtoFallbackDestination", + "UpdateTelnyxPhoneNumberDtoFallbackDestination_Number", + "UpdateTelnyxPhoneNumberDtoFallbackDestination_Sip", + "UpdateTelnyxPhoneNumberDtoHooksItem", + "UpdateTelnyxPhoneNumberDtoHooksItem_CallEnding", + "UpdateTelnyxPhoneNumberDtoHooksItem_CallRinging", + "UpdateTestSuiteDto", + "UpdateTestSuiteRunDto", + "UpdateTestSuiteTestChatDto", + "UpdateTestSuiteTestChatDtoType", + "UpdateTestSuiteTestVoiceDto", + "UpdateTestSuiteTestVoiceDtoType", + "UpdateTextEditorToolDto", + "UpdateTextEditorToolDtoMessagesItem", + "UpdateTextEditorToolDtoMessagesItem_RequestComplete", + "UpdateTextEditorToolDtoMessagesItem_RequestFailed", + "UpdateTextEditorToolDtoMessagesItem_RequestResponseDelayed", + "UpdateTextEditorToolDtoMessagesItem_RequestStart", + "UpdateTextEditorToolDtoName", + "UpdateTextEditorToolDtoSubType", + "UpdateTextInsightFromCallTableDto", + "UpdateTextInsightFromCallTableDtoQueriesItem", "UpdateTogetherAiCredentialDto", + "UpdateTokenDto", + "UpdateTokenDtoTag", "UpdateToolTemplateDto", "UpdateToolTemplateDtoDetails", + "UpdateToolTemplateDtoDetails_ApiRequest", + "UpdateToolTemplateDtoDetails_Bash", + "UpdateToolTemplateDtoDetails_Code", + "UpdateToolTemplateDtoDetails_Computer", + "UpdateToolTemplateDtoDetails_Dtmf", + "UpdateToolTemplateDtoDetails_EndCall", + "UpdateToolTemplateDtoDetails_Function", + "UpdateToolTemplateDtoDetails_GohighlevelCalendarAvailabilityCheck", + "UpdateToolTemplateDtoDetails_GohighlevelCalendarEventCreate", + "UpdateToolTemplateDtoDetails_GohighlevelContactCreate", + "UpdateToolTemplateDtoDetails_GohighlevelContactGet", + "UpdateToolTemplateDtoDetails_GoogleCalendarAvailabilityCheck", + "UpdateToolTemplateDtoDetails_GoogleCalendarEventCreate", + "UpdateToolTemplateDtoDetails_GoogleSheetsRowAppend", + "UpdateToolTemplateDtoDetails_Handoff", + "UpdateToolTemplateDtoDetails_Mcp", + "UpdateToolTemplateDtoDetails_Query", + "UpdateToolTemplateDtoDetails_SipRequest", + "UpdateToolTemplateDtoDetails_SlackMessageSend", + "UpdateToolTemplateDtoDetails_Sms", + "UpdateToolTemplateDtoDetails_TextEditor", + "UpdateToolTemplateDtoDetails_TransferCall", + "UpdateToolTemplateDtoDetails_Voicemail", "UpdateToolTemplateDtoProvider", "UpdateToolTemplateDtoProviderDetails", + "UpdateToolTemplateDtoProviderDetails_Function", + "UpdateToolTemplateDtoProviderDetails_Ghl", + "UpdateToolTemplateDtoProviderDetails_GohighlevelCalendarAvailabilityCheck", + "UpdateToolTemplateDtoProviderDetails_GohighlevelCalendarEventCreate", + "UpdateToolTemplateDtoProviderDetails_GohighlevelContactCreate", + "UpdateToolTemplateDtoProviderDetails_GohighlevelContactGet", + "UpdateToolTemplateDtoProviderDetails_GoogleCalendarEventCreate", + "UpdateToolTemplateDtoProviderDetails_GoogleSheetsRowAppend", + "UpdateToolTemplateDtoProviderDetails_Make", + "UpdateToolTemplateDtoType", "UpdateToolTemplateDtoVisibility", + "UpdateTransferCallToolDto", + "UpdateTransferCallToolDtoDestinationsItem", + "UpdateTransferCallToolDtoDestinationsItem_Assistant", + "UpdateTransferCallToolDtoDestinationsItem_Number", + "UpdateTransferCallToolDtoDestinationsItem_Sip", + "UpdateTransferCallToolDtoMessagesItem", + "UpdateTransferCallToolDtoMessagesItem_RequestComplete", + "UpdateTransferCallToolDtoMessagesItem_RequestFailed", + "UpdateTransferCallToolDtoMessagesItem_RequestResponseDelayed", + "UpdateTransferCallToolDtoMessagesItem_RequestStart", + "UpdateTrieveCredentialDto", + "UpdateTrieveKnowledgeBaseDto", "UpdateTwilioCredentialDto", + "UpdateTwilioPhoneNumberDto", + "UpdateTwilioPhoneNumberDtoFallbackDestination", + "UpdateTwilioPhoneNumberDtoFallbackDestination_Number", + "UpdateTwilioPhoneNumberDtoFallbackDestination_Sip", + "UpdateTwilioPhoneNumberDtoHooksItem", + "UpdateTwilioPhoneNumberDtoHooksItem_CallEnding", + "UpdateTwilioPhoneNumberDtoHooksItem_CallRinging", "UpdateUserRoleDto", "UpdateUserRoleDtoRole", + "UpdateVapiPhoneNumberDto", + "UpdateVapiPhoneNumberDtoFallbackDestination", + "UpdateVapiPhoneNumberDtoFallbackDestination_Number", + "UpdateVapiPhoneNumberDtoFallbackDestination_Sip", + "UpdateVapiPhoneNumberDtoHooksItem", + "UpdateVapiPhoneNumberDtoHooksItem_CallEnding", + "UpdateVapiPhoneNumberDtoHooksItem_CallRinging", + "UpdateVoicemailToolDto", + "UpdateVoicemailToolDtoMessagesItem", + "UpdateVoicemailToolDtoMessagesItem_RequestComplete", + "UpdateVoicemailToolDtoMessagesItem_RequestFailed", + "UpdateVoicemailToolDtoMessagesItem_RequestResponseDelayed", + "UpdateVoicemailToolDtoMessagesItem_RequestStart", "UpdateVonageCredentialDto", + "UpdateVonagePhoneNumberDto", + "UpdateVonagePhoneNumberDtoFallbackDestination", + "UpdateVonagePhoneNumberDtoFallbackDestination_Number", + "UpdateVonagePhoneNumberDtoFallbackDestination_Sip", + "UpdateVonagePhoneNumberDtoHooksItem", + "UpdateVonagePhoneNumberDtoHooksItem_CallEnding", + "UpdateVonagePhoneNumberDtoHooksItem_CallRinging", + "UpdateWebhookCredentialDto", + "UpdateWebhookCredentialDtoAuthenticationPlan", + "UpdateWebhookCredentialDtoAuthenticationPlan_Bearer", + "UpdateWebhookCredentialDtoAuthenticationPlan_Hmac", + "UpdateWebhookCredentialDtoAuthenticationPlan_Oauth2", + "UpdateWellSaidCredentialDto", + "UpdateWorkflowDto", + "UpdateWorkflowDtoBackgroundSound", + "UpdateWorkflowDtoBackgroundSoundZero", + "UpdateWorkflowDtoCredentialsItem", + "UpdateWorkflowDtoCredentialsItem_11Labs", + "UpdateWorkflowDtoCredentialsItem_Anthropic", + "UpdateWorkflowDtoCredentialsItem_AnthropicBedrock", + "UpdateWorkflowDtoCredentialsItem_Anyscale", + "UpdateWorkflowDtoCredentialsItem_AssemblyAi", + "UpdateWorkflowDtoCredentialsItem_Azure", + "UpdateWorkflowDtoCredentialsItem_AzureOpenai", + "UpdateWorkflowDtoCredentialsItem_ByoSipTrunk", + "UpdateWorkflowDtoCredentialsItem_Cartesia", + "UpdateWorkflowDtoCredentialsItem_Cerebras", + "UpdateWorkflowDtoCredentialsItem_Cloudflare", + "UpdateWorkflowDtoCredentialsItem_CustomCredential", + "UpdateWorkflowDtoCredentialsItem_CustomLlm", + "UpdateWorkflowDtoCredentialsItem_DeepSeek", + "UpdateWorkflowDtoCredentialsItem_Deepgram", + "UpdateWorkflowDtoCredentialsItem_Deepinfra", + "UpdateWorkflowDtoCredentialsItem_Email", + "UpdateWorkflowDtoCredentialsItem_Gcp", + "UpdateWorkflowDtoCredentialsItem_GhlOauth2Authorization", + "UpdateWorkflowDtoCredentialsItem_Gladia", + "UpdateWorkflowDtoCredentialsItem_Gohighlevel", + "UpdateWorkflowDtoCredentialsItem_Google", + "UpdateWorkflowDtoCredentialsItem_GoogleCalendarOauth2Authorization", + "UpdateWorkflowDtoCredentialsItem_GoogleCalendarOauth2Client", + "UpdateWorkflowDtoCredentialsItem_GoogleSheetsOauth2Authorization", + "UpdateWorkflowDtoCredentialsItem_Groq", + "UpdateWorkflowDtoCredentialsItem_Hume", + "UpdateWorkflowDtoCredentialsItem_InflectionAi", + "UpdateWorkflowDtoCredentialsItem_Inworld", + "UpdateWorkflowDtoCredentialsItem_Langfuse", + "UpdateWorkflowDtoCredentialsItem_Lmnt", + "UpdateWorkflowDtoCredentialsItem_Make", + "UpdateWorkflowDtoCredentialsItem_Minimax", + "UpdateWorkflowDtoCredentialsItem_Mistral", + "UpdateWorkflowDtoCredentialsItem_Neuphonic", + "UpdateWorkflowDtoCredentialsItem_Openai", + "UpdateWorkflowDtoCredentialsItem_Openrouter", + "UpdateWorkflowDtoCredentialsItem_PerplexityAi", + "UpdateWorkflowDtoCredentialsItem_Playht", + "UpdateWorkflowDtoCredentialsItem_RimeAi", + "UpdateWorkflowDtoCredentialsItem_Runpod", + "UpdateWorkflowDtoCredentialsItem_S3", + "UpdateWorkflowDtoCredentialsItem_SlackOauth2Authorization", + "UpdateWorkflowDtoCredentialsItem_SlackWebhook", + "UpdateWorkflowDtoCredentialsItem_SmallestAi", + "UpdateWorkflowDtoCredentialsItem_Soniox", + "UpdateWorkflowDtoCredentialsItem_Speechmatics", + "UpdateWorkflowDtoCredentialsItem_Supabase", + "UpdateWorkflowDtoCredentialsItem_Tavus", + "UpdateWorkflowDtoCredentialsItem_TogetherAi", + "UpdateWorkflowDtoCredentialsItem_Trieve", + "UpdateWorkflowDtoCredentialsItem_Twilio", + "UpdateWorkflowDtoCredentialsItem_Vonage", + "UpdateWorkflowDtoCredentialsItem_Webhook", + "UpdateWorkflowDtoCredentialsItem_Wellsaid", + "UpdateWorkflowDtoCredentialsItem_Xai", + "UpdateWorkflowDtoHooksItem", + "UpdateWorkflowDtoModel", + "UpdateWorkflowDtoModel_Anthropic", + "UpdateWorkflowDtoModel_AnthropicBedrock", + "UpdateWorkflowDtoModel_CustomLlm", + "UpdateWorkflowDtoModel_Google", + "UpdateWorkflowDtoModel_Openai", + "UpdateWorkflowDtoNodesItem", + "UpdateWorkflowDtoNodesItem_Conversation", + "UpdateWorkflowDtoNodesItem_Tool", + "UpdateWorkflowDtoTranscriber", + "UpdateWorkflowDtoTranscriber_11Labs", + "UpdateWorkflowDtoTranscriber_AssemblyAi", + "UpdateWorkflowDtoTranscriber_Azure", + "UpdateWorkflowDtoTranscriber_Cartesia", + "UpdateWorkflowDtoTranscriber_CustomTranscriber", + "UpdateWorkflowDtoTranscriber_Deepgram", + "UpdateWorkflowDtoTranscriber_Gladia", + "UpdateWorkflowDtoTranscriber_Google", + "UpdateWorkflowDtoTranscriber_Openai", + "UpdateWorkflowDtoTranscriber_Soniox", + "UpdateWorkflowDtoTranscriber_Speechmatics", + "UpdateWorkflowDtoTranscriber_Talkscriber", + "UpdateWorkflowDtoVoice", + "UpdateWorkflowDtoVoice_11Labs", + "UpdateWorkflowDtoVoice_Azure", + "UpdateWorkflowDtoVoice_Cartesia", + "UpdateWorkflowDtoVoice_CustomVoice", + "UpdateWorkflowDtoVoice_Deepgram", + "UpdateWorkflowDtoVoice_Hume", + "UpdateWorkflowDtoVoice_Inworld", + "UpdateWorkflowDtoVoice_Lmnt", + "UpdateWorkflowDtoVoice_Minimax", + "UpdateWorkflowDtoVoice_Neuphonic", + "UpdateWorkflowDtoVoice_Openai", + "UpdateWorkflowDtoVoice_Playht", + "UpdateWorkflowDtoVoice_RimeAi", + "UpdateWorkflowDtoVoice_Sesame", + "UpdateWorkflowDtoVoice_SmallestAi", + "UpdateWorkflowDtoVoice_Tavus", + "UpdateWorkflowDtoVoice_Vapi", + "UpdateWorkflowDtoVoice_Wellsaid", + "UpdateWorkflowDtoVoicemailDetection", + "UpdateWorkflowDtoVoicemailDetectionZero", + "UpdateXAiCredentialDto", "User", "UserMessage", "VapiCost", + "VapiCostSubType", "VapiModel", - "VapiModelStepsItem", + "VapiModelProvider", "VapiModelToolsItem", + "VapiModelToolsItem_ApiRequest", + "VapiModelToolsItem_Bash", + "VapiModelToolsItem_Code", + "VapiModelToolsItem_Computer", + "VapiModelToolsItem_Dtmf", + "VapiModelToolsItem_EndCall", + "VapiModelToolsItem_Function", + "VapiModelToolsItem_GohighlevelCalendarAvailabilityCheck", + "VapiModelToolsItem_GohighlevelCalendarEventCreate", + "VapiModelToolsItem_GohighlevelContactCreate", + "VapiModelToolsItem_GohighlevelContactGet", + "VapiModelToolsItem_GoogleCalendarAvailabilityCheck", + "VapiModelToolsItem_GoogleCalendarEventCreate", + "VapiModelToolsItem_GoogleSheetsRowAppend", + "VapiModelToolsItem_Handoff", + "VapiModelToolsItem_Mcp", + "VapiModelToolsItem_Query", + "VapiModelToolsItem_SipRequest", + "VapiModelToolsItem_SlackMessageSend", + "VapiModelToolsItem_Sms", + "VapiModelToolsItem_TextEditor", + "VapiModelToolsItem_TransferCall", + "VapiModelToolsItem_Voicemail", "VapiPhoneNumber", "VapiPhoneNumberFallbackDestination", + "VapiPhoneNumberFallbackDestination_Number", + "VapiPhoneNumberFallbackDestination_Sip", + "VapiPhoneNumberHooksItem", + "VapiPhoneNumberHooksItem_CallEnding", + "VapiPhoneNumberHooksItem_CallRinging", + "VapiPhoneNumberStatus", + "VapiPronunciationDictionaryLocator", + "VapiSipTransportMessage", + "VapiSipTransportMessageSipVerb", + "VapiSmartEndpointingPlan", + "VapiSmartEndpointingPlanProvider", + "VapiVoice", + "VapiVoiceVoiceId", + "VapiVoicemailDetectionPlan", + "VapiVoicemailDetectionPlanProvider", + "VapiVoicemailDetectionPlanType", + "VariableExtractionAlias", + "VariableExtractionPlan", + "VariableValueGroupBy", "VoiceCost", "VoiceLibrary", "VoiceLibraryGender", "VoiceLibraryVoiceResponse", + "VoicemailDetectionBackoffPlan", + "VoicemailDetectionCost", + "VoicemailDetectionCostProvider", + "VoicemailTool", + "VoicemailToolMessagesItem", + "VoicemailToolMessagesItem_RequestComplete", + "VoicemailToolMessagesItem_RequestFailed", + "VoicemailToolMessagesItem_RequestResponseDelayed", + "VoicemailToolMessagesItem_RequestStart", "VonageCredential", + "VonageCredentialProvider", "VonagePhoneNumber", "VonagePhoneNumberFallbackDestination", - "WorkflowBlock", - "WorkflowBlockMessagesItem", - "WorkflowBlockStepsItem", + "VonagePhoneNumberFallbackDestination_Number", + "VonagePhoneNumberFallbackDestination_Sip", + "VonagePhoneNumberHooksItem", + "VonagePhoneNumberHooksItem_CallEnding", + "VonagePhoneNumberHooksItem_CallRinging", + "VonagePhoneNumberStatus", + "WebChat", + "WebChatOutputItem", + "WebhookCredential", + "WebhookCredentialAuthenticationPlan", + "WebhookCredentialAuthenticationPlan_Bearer", + "WebhookCredentialAuthenticationPlan_Hmac", + "WebhookCredentialAuthenticationPlan_Oauth2", + "WebhookCredentialProvider", + "WellSaidCredential", + "WellSaidCredentialProvider", + "WellSaidVoice", + "WellSaidVoiceModel", + "Workflow", + "WorkflowAnthropicBedrockModel", + "WorkflowAnthropicBedrockModelModel", + "WorkflowAnthropicModel", + "WorkflowAnthropicModelModel", + "WorkflowBackgroundSound", + "WorkflowBackgroundSoundZero", + "WorkflowCredentialsItem", + "WorkflowCredentialsItem_11Labs", + "WorkflowCredentialsItem_Anthropic", + "WorkflowCredentialsItem_AnthropicBedrock", + "WorkflowCredentialsItem_Anyscale", + "WorkflowCredentialsItem_AssemblyAi", + "WorkflowCredentialsItem_Azure", + "WorkflowCredentialsItem_AzureOpenai", + "WorkflowCredentialsItem_ByoSipTrunk", + "WorkflowCredentialsItem_Cartesia", + "WorkflowCredentialsItem_Cerebras", + "WorkflowCredentialsItem_Cloudflare", + "WorkflowCredentialsItem_CustomCredential", + "WorkflowCredentialsItem_CustomLlm", + "WorkflowCredentialsItem_DeepSeek", + "WorkflowCredentialsItem_Deepgram", + "WorkflowCredentialsItem_Deepinfra", + "WorkflowCredentialsItem_Email", + "WorkflowCredentialsItem_Gcp", + "WorkflowCredentialsItem_GhlOauth2Authorization", + "WorkflowCredentialsItem_Gladia", + "WorkflowCredentialsItem_Gohighlevel", + "WorkflowCredentialsItem_Google", + "WorkflowCredentialsItem_GoogleCalendarOauth2Authorization", + "WorkflowCredentialsItem_GoogleCalendarOauth2Client", + "WorkflowCredentialsItem_GoogleSheetsOauth2Authorization", + "WorkflowCredentialsItem_Groq", + "WorkflowCredentialsItem_Hume", + "WorkflowCredentialsItem_InflectionAi", + "WorkflowCredentialsItem_Inworld", + "WorkflowCredentialsItem_Langfuse", + "WorkflowCredentialsItem_Lmnt", + "WorkflowCredentialsItem_Make", + "WorkflowCredentialsItem_Minimax", + "WorkflowCredentialsItem_Mistral", + "WorkflowCredentialsItem_Neuphonic", + "WorkflowCredentialsItem_Openai", + "WorkflowCredentialsItem_Openrouter", + "WorkflowCredentialsItem_PerplexityAi", + "WorkflowCredentialsItem_Playht", + "WorkflowCredentialsItem_RimeAi", + "WorkflowCredentialsItem_Runpod", + "WorkflowCredentialsItem_S3", + "WorkflowCredentialsItem_SlackOauth2Authorization", + "WorkflowCredentialsItem_SlackWebhook", + "WorkflowCredentialsItem_SmallestAi", + "WorkflowCredentialsItem_Soniox", + "WorkflowCredentialsItem_Speechmatics", + "WorkflowCredentialsItem_Supabase", + "WorkflowCredentialsItem_Tavus", + "WorkflowCredentialsItem_TogetherAi", + "WorkflowCredentialsItem_Trieve", + "WorkflowCredentialsItem_Twilio", + "WorkflowCredentialsItem_Vonage", + "WorkflowCredentialsItem_Webhook", + "WorkflowCredentialsItem_Wellsaid", + "WorkflowCredentialsItem_Xai", + "WorkflowCustomModel", + "WorkflowCustomModelMetadataSendMode", + "WorkflowGoogleModel", + "WorkflowGoogleModelModel", + "WorkflowHooksItem", + "WorkflowModel", + "WorkflowModel_Anthropic", + "WorkflowModel_AnthropicBedrock", + "WorkflowModel_CustomLlm", + "WorkflowModel_Google", + "WorkflowModel_Openai", + "WorkflowNodesItem", + "WorkflowNodesItem_Conversation", + "WorkflowNodesItem_Tool", + "WorkflowOpenAiModel", + "WorkflowOpenAiModelModel", + "WorkflowOverrides", + "WorkflowTranscriber", + "WorkflowTranscriber_11Labs", + "WorkflowTranscriber_AssemblyAi", + "WorkflowTranscriber_Azure", + "WorkflowTranscriber_Cartesia", + "WorkflowTranscriber_CustomTranscriber", + "WorkflowTranscriber_Deepgram", + "WorkflowTranscriber_Gladia", + "WorkflowTranscriber_Google", + "WorkflowTranscriber_Openai", + "WorkflowTranscriber_Soniox", + "WorkflowTranscriber_Speechmatics", + "WorkflowTranscriber_Talkscriber", + "WorkflowUserEditable", + "WorkflowUserEditableBackgroundSound", + "WorkflowUserEditableBackgroundSoundZero", + "WorkflowUserEditableCredentialsItem", + "WorkflowUserEditableCredentialsItem_11Labs", + "WorkflowUserEditableCredentialsItem_Anthropic", + "WorkflowUserEditableCredentialsItem_AnthropicBedrock", + "WorkflowUserEditableCredentialsItem_Anyscale", + "WorkflowUserEditableCredentialsItem_AssemblyAi", + "WorkflowUserEditableCredentialsItem_Azure", + "WorkflowUserEditableCredentialsItem_AzureOpenai", + "WorkflowUserEditableCredentialsItem_ByoSipTrunk", + "WorkflowUserEditableCredentialsItem_Cartesia", + "WorkflowUserEditableCredentialsItem_Cerebras", + "WorkflowUserEditableCredentialsItem_Cloudflare", + "WorkflowUserEditableCredentialsItem_CustomCredential", + "WorkflowUserEditableCredentialsItem_CustomLlm", + "WorkflowUserEditableCredentialsItem_DeepSeek", + "WorkflowUserEditableCredentialsItem_Deepgram", + "WorkflowUserEditableCredentialsItem_Deepinfra", + "WorkflowUserEditableCredentialsItem_Email", + "WorkflowUserEditableCredentialsItem_Gcp", + "WorkflowUserEditableCredentialsItem_GhlOauth2Authorization", + "WorkflowUserEditableCredentialsItem_Gladia", + "WorkflowUserEditableCredentialsItem_Gohighlevel", + "WorkflowUserEditableCredentialsItem_Google", + "WorkflowUserEditableCredentialsItem_GoogleCalendarOauth2Authorization", + "WorkflowUserEditableCredentialsItem_GoogleCalendarOauth2Client", + "WorkflowUserEditableCredentialsItem_GoogleSheetsOauth2Authorization", + "WorkflowUserEditableCredentialsItem_Groq", + "WorkflowUserEditableCredentialsItem_Hume", + "WorkflowUserEditableCredentialsItem_InflectionAi", + "WorkflowUserEditableCredentialsItem_Inworld", + "WorkflowUserEditableCredentialsItem_Langfuse", + "WorkflowUserEditableCredentialsItem_Lmnt", + "WorkflowUserEditableCredentialsItem_Make", + "WorkflowUserEditableCredentialsItem_Minimax", + "WorkflowUserEditableCredentialsItem_Mistral", + "WorkflowUserEditableCredentialsItem_Neuphonic", + "WorkflowUserEditableCredentialsItem_Openai", + "WorkflowUserEditableCredentialsItem_Openrouter", + "WorkflowUserEditableCredentialsItem_PerplexityAi", + "WorkflowUserEditableCredentialsItem_Playht", + "WorkflowUserEditableCredentialsItem_RimeAi", + "WorkflowUserEditableCredentialsItem_Runpod", + "WorkflowUserEditableCredentialsItem_S3", + "WorkflowUserEditableCredentialsItem_SlackOauth2Authorization", + "WorkflowUserEditableCredentialsItem_SlackWebhook", + "WorkflowUserEditableCredentialsItem_SmallestAi", + "WorkflowUserEditableCredentialsItem_Soniox", + "WorkflowUserEditableCredentialsItem_Speechmatics", + "WorkflowUserEditableCredentialsItem_Supabase", + "WorkflowUserEditableCredentialsItem_Tavus", + "WorkflowUserEditableCredentialsItem_TogetherAi", + "WorkflowUserEditableCredentialsItem_Trieve", + "WorkflowUserEditableCredentialsItem_Twilio", + "WorkflowUserEditableCredentialsItem_Vonage", + "WorkflowUserEditableCredentialsItem_Webhook", + "WorkflowUserEditableCredentialsItem_Wellsaid", + "WorkflowUserEditableCredentialsItem_Xai", + "WorkflowUserEditableHooksItem", + "WorkflowUserEditableModel", + "WorkflowUserEditableModel_Anthropic", + "WorkflowUserEditableModel_AnthropicBedrock", + "WorkflowUserEditableModel_CustomLlm", + "WorkflowUserEditableModel_Google", + "WorkflowUserEditableModel_Openai", + "WorkflowUserEditableNodesItem", + "WorkflowUserEditableNodesItem_Conversation", + "WorkflowUserEditableNodesItem_Tool", + "WorkflowUserEditableTranscriber", + "WorkflowUserEditableTranscriber_11Labs", + "WorkflowUserEditableTranscriber_AssemblyAi", + "WorkflowUserEditableTranscriber_Azure", + "WorkflowUserEditableTranscriber_Cartesia", + "WorkflowUserEditableTranscriber_CustomTranscriber", + "WorkflowUserEditableTranscriber_Deepgram", + "WorkflowUserEditableTranscriber_Gladia", + "WorkflowUserEditableTranscriber_Google", + "WorkflowUserEditableTranscriber_Openai", + "WorkflowUserEditableTranscriber_Soniox", + "WorkflowUserEditableTranscriber_Speechmatics", + "WorkflowUserEditableTranscriber_Talkscriber", + "WorkflowUserEditableVoice", + "WorkflowUserEditableVoice_11Labs", + "WorkflowUserEditableVoice_Azure", + "WorkflowUserEditableVoice_Cartesia", + "WorkflowUserEditableVoice_CustomVoice", + "WorkflowUserEditableVoice_Deepgram", + "WorkflowUserEditableVoice_Hume", + "WorkflowUserEditableVoice_Inworld", + "WorkflowUserEditableVoice_Lmnt", + "WorkflowUserEditableVoice_Minimax", + "WorkflowUserEditableVoice_Neuphonic", + "WorkflowUserEditableVoice_Openai", + "WorkflowUserEditableVoice_Playht", + "WorkflowUserEditableVoice_RimeAi", + "WorkflowUserEditableVoice_Sesame", + "WorkflowUserEditableVoice_SmallestAi", + "WorkflowUserEditableVoice_Tavus", + "WorkflowUserEditableVoice_Vapi", + "WorkflowUserEditableVoice_Wellsaid", + "WorkflowUserEditableVoicemailDetection", + "WorkflowUserEditableVoicemailDetectionZero", + "WorkflowVoice", + "WorkflowVoice_11Labs", + "WorkflowVoice_Azure", + "WorkflowVoice_Cartesia", + "WorkflowVoice_CustomVoice", + "WorkflowVoice_Deepgram", + "WorkflowVoice_Hume", + "WorkflowVoice_Inworld", + "WorkflowVoice_Lmnt", + "WorkflowVoice_Minimax", + "WorkflowVoice_Neuphonic", + "WorkflowVoice_Openai", + "WorkflowVoice_Playht", + "WorkflowVoice_RimeAi", + "WorkflowVoice_Sesame", + "WorkflowVoice_SmallestAi", + "WorkflowVoice_Tavus", + "WorkflowVoice_Vapi", + "WorkflowVoice_Wellsaid", + "WorkflowVoicemailDetection", + "WorkflowVoicemailDetectionZero", + "XAiCredential", + "XAiCredentialProvider", + "XaiModel", + "XaiModelModel", + "XaiModelToolsItem", + "XaiModelToolsItem_ApiRequest", + "XaiModelToolsItem_Bash", + "XaiModelToolsItem_Code", + "XaiModelToolsItem_Computer", + "XaiModelToolsItem_Dtmf", + "XaiModelToolsItem_EndCall", + "XaiModelToolsItem_Function", + "XaiModelToolsItem_GohighlevelCalendarAvailabilityCheck", + "XaiModelToolsItem_GohighlevelCalendarEventCreate", + "XaiModelToolsItem_GohighlevelContactCreate", + "XaiModelToolsItem_GohighlevelContactGet", + "XaiModelToolsItem_GoogleCalendarAvailabilityCheck", + "XaiModelToolsItem_GoogleCalendarEventCreate", + "XaiModelToolsItem_GoogleSheetsRowAppend", + "XaiModelToolsItem_Handoff", + "XaiModelToolsItem_Mcp", + "XaiModelToolsItem_Query", + "XaiModelToolsItem_SipRequest", + "XaiModelToolsItem_SlackMessageSend", + "XaiModelToolsItem_Sms", + "XaiModelToolsItem_TextEditor", + "XaiModelToolsItem_TransferCall", + "XaiModelToolsItem_Voicemail", + "XssSecurityFilter", + "XssSecurityFilterType", ] diff --git a/src/vapi/types/add_voice_to_provider_dto.py b/src/vapi/types/add_voice_to_provider_dto.py index 74f7a8ae..26532513 100644 --- a/src/vapi/types/add_voice_to_provider_dto.py +++ b/src/vapi/types/add_voice_to_provider_dto.py @@ -1,24 +1,31 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions -from ..core.serialization import FieldMetadata -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 import typing +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class AddVoiceToProviderDto(UniversalBaseModel): - owner_id: typing_extensions.Annotated[str, FieldMetadata(alias="ownerId")] = pydantic.Field() - """ - This is the owner_id of your shared voice which you want to add to your provider Account from Provider Voice Library - """ - - voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId")] = pydantic.Field() - """ - This is the voice_id of the shared voice which you want to add to your provider Account from Provider Voice Library - """ +class AddVoiceToProviderDto(UncheckedBaseModel): + owner_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="ownerId"), + pydantic.Field( + alias="ownerId", + description="This is the owner_id of your shared voice which you want to add to your provider Account from Provider Voice Library", + ), + ] + voice_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="voiceId"), + pydantic.Field( + alias="voiceId", + description="This is the voice_id of the shared voice which you want to add to your provider Account from Provider Voice Library", + ), + ] name: str = pydantic.Field() """ This is the new name of the voice which you want to have once you have added voice to your provider Account from Provider Voice Library diff --git a/src/vapi/types/ai_edge_condition.py b/src/vapi/types/ai_edge_condition.py new file mode 100644 index 00000000..6cb27d6c --- /dev/null +++ b/src/vapi/types/ai_edge_condition.py @@ -0,0 +1,25 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .ai_edge_condition_type import AiEdgeConditionType + + +class AiEdgeCondition(UncheckedBaseModel): + type: AiEdgeConditionType + prompt: str = pydantic.Field() + """ + This is the prompt for the AI edge condition. It should evaluate to a boolean. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/ai_edge_condition_type.py b/src/vapi/types/ai_edge_condition_type.py new file mode 100644 index 00000000..5d01f1bb --- /dev/null +++ b/src/vapi/types/ai_edge_condition_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +AiEdgeConditionType = typing.Union[typing.Literal["ai"], typing.Any] diff --git a/src/vapi/types/analysis.py b/src/vapi/types/analysis.py index ec1d5212..c821a7ad 100644 --- a/src/vapi/types/analysis.py +++ b/src/vapi/types/analysis.py @@ -1,32 +1,44 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing + import pydantic import typing_extensions -from ..core.serialization import FieldMetadata from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class Analysis(UniversalBaseModel): +class Analysis(UncheckedBaseModel): summary: typing.Optional[str] = pydantic.Field(default=None) """ This is the summary of the call. Customize by setting `assistant.analysisPlan.summaryPrompt`. """ structured_data: typing_extensions.Annotated[ - typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]], FieldMetadata(alias="structuredData") - ] = pydantic.Field(default=None) - """ - This is the structured data extracted from the call. Customize by setting `assistant.analysisPlan.structuredDataPrompt` and/or `assistant.analysisPlan.structuredDataSchema`. - """ - - success_evaluation: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="successEvaluation")] = ( - pydantic.Field(default=None) - ) - """ - This is the evaluation of the call. Customize by setting `assistant.analysisPlan.successEvaluationPrompt` and/or `assistant.analysisPlan.successEvaluationRubric`. - """ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="structuredData"), + pydantic.Field( + alias="structuredData", + description="This is the structured data extracted from the call. Customize by setting `assistant.analysisPlan.structuredDataPrompt` and/or `assistant.analysisPlan.structuredDataSchema`.", + ), + ] = None + structured_data_multi: typing_extensions.Annotated[ + typing.Optional[typing.List[typing.Dict[str, typing.Any]]], + FieldMetadata(alias="structuredDataMulti"), + pydantic.Field( + alias="structuredDataMulti", + description="This is the structured data catalog of the call. Customize by setting `assistant.analysisPlan.structuredDataMultiPlan`.", + ), + ] = None + success_evaluation: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="successEvaluation"), + pydantic.Field( + alias="successEvaluation", + description="This is the evaluation of the call. Customize by setting `assistant.analysisPlan.successEvaluationPrompt` and/or `assistant.analysisPlan.successEvaluationRubric`.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/analysis_cost.py b/src/vapi/types/analysis_cost.py index 3c643496..979b8b1d 100644 --- a/src/vapi/types/analysis_cost.py +++ b/src/vapi/types/analysis_cost.py @@ -1,42 +1,46 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing + import pydantic import typing_extensions -from .analysis_cost_analysis_type import AnalysisCostAnalysisType -from ..core.serialization import FieldMetadata from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .analysis_cost_analysis_type import AnalysisCostAnalysisType -class AnalysisCost(UniversalBaseModel): - type: typing.Literal["analysis"] = pydantic.Field(default="analysis") - """ - This is the type of cost, always 'analysis' for this class. - """ - - analysis_type: typing_extensions.Annotated[AnalysisCostAnalysisType, FieldMetadata(alias="analysisType")] = ( - pydantic.Field() - ) - """ - This is the type of analysis performed. - """ - - model: typing.Dict[str, typing.Optional[typing.Any]] = pydantic.Field() +class AnalysisCost(UncheckedBaseModel): + analysis_type: typing_extensions.Annotated[ + AnalysisCostAnalysisType, + FieldMetadata(alias="analysisType"), + pydantic.Field(alias="analysisType", description="This is the type of analysis performed."), + ] + model: typing.Dict[str, typing.Any] = pydantic.Field() """ This is the model that was used to perform the analysis. """ - prompt_tokens: typing_extensions.Annotated[float, FieldMetadata(alias="promptTokens")] = pydantic.Field() - """ - This is the number of prompt tokens used in the analysis. - """ - - completion_tokens: typing_extensions.Annotated[float, FieldMetadata(alias="completionTokens")] = pydantic.Field() - """ - This is the number of completion tokens generated in the analysis. - """ - + prompt_tokens: typing_extensions.Annotated[ + float, + FieldMetadata(alias="promptTokens"), + pydantic.Field(alias="promptTokens", description="This is the number of prompt tokens used in the analysis."), + ] + completion_tokens: typing_extensions.Annotated[ + float, + FieldMetadata(alias="completionTokens"), + pydantic.Field( + alias="completionTokens", description="This is the number of completion tokens generated in the analysis." + ), + ] + cached_prompt_tokens: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="cachedPromptTokens"), + pydantic.Field( + alias="cachedPromptTokens", + description="This is the number of cached prompt tokens used in the analysis. This is only applicable to certain providers (e.g., OpenAI, Azure OpenAI) that support prompt caching. Cached tokens are billed at a discounted rate.", + ), + ] = None cost: float = pydantic.Field() """ This is the cost of the component in USD. diff --git a/src/vapi/types/analysis_cost_analysis_type.py b/src/vapi/types/analysis_cost_analysis_type.py index 483ab822..b2b010be 100644 --- a/src/vapi/types/analysis_cost_analysis_type.py +++ b/src/vapi/types/analysis_cost_analysis_type.py @@ -2,4 +2,6 @@ import typing -AnalysisCostAnalysisType = typing.Union[typing.Literal["summary", "structuredData", "successEvaluation"], typing.Any] +AnalysisCostAnalysisType = typing.Union[ + typing.Literal["summary", "structuredData", "successEvaluation", "structuredOutput"], typing.Any +] diff --git a/src/vapi/types/analysis_cost_breakdown.py b/src/vapi/types/analysis_cost_breakdown.py index 43b4a22e..0d1d1c8b 100644 --- a/src/vapi/types/analysis_cost_breakdown.py +++ b/src/vapi/types/analysis_cost_breakdown.py @@ -1,74 +1,136 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing + import pydantic import typing_extensions -from ..core.serialization import FieldMetadata from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class AnalysisCostBreakdown(UniversalBaseModel): +class AnalysisCostBreakdown(UncheckedBaseModel): summary: typing.Optional[float] = pydantic.Field(default=None) """ This is the cost to summarize the call. """ summary_prompt_tokens: typing_extensions.Annotated[ - typing.Optional[float], FieldMetadata(alias="summaryPromptTokens") - ] = pydantic.Field(default=None) - """ - This is the number of prompt tokens used to summarize the call. - """ - + typing.Optional[float], + FieldMetadata(alias="summaryPromptTokens"), + pydantic.Field( + alias="summaryPromptTokens", description="This is the number of prompt tokens used to summarize the call." + ), + ] = None summary_completion_tokens: typing_extensions.Annotated[ - typing.Optional[float], FieldMetadata(alias="summaryCompletionTokens") - ] = pydantic.Field(default=None) - """ - This is the number of completion tokens used to summarize the call. - """ - - structured_data: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="structuredData")] = ( - pydantic.Field(default=None) - ) - """ - This is the cost to extract structured data from the call. - """ - + typing.Optional[float], + FieldMetadata(alias="summaryCompletionTokens"), + pydantic.Field( + alias="summaryCompletionTokens", + description="This is the number of completion tokens used to summarize the call.", + ), + ] = None + summary_cached_prompt_tokens: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="summaryCachedPromptTokens"), + pydantic.Field( + alias="summaryCachedPromptTokens", + description="This is the number of cached prompt tokens used to summarize the call.", + ), + ] = None + structured_data: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="structuredData"), + pydantic.Field( + alias="structuredData", description="This is the cost to extract structured data from the call." + ), + ] = None structured_data_prompt_tokens: typing_extensions.Annotated[ - typing.Optional[float], FieldMetadata(alias="structuredDataPromptTokens") - ] = pydantic.Field(default=None) - """ - This is the number of prompt tokens used to extract structured data from the call. - """ - + typing.Optional[float], + FieldMetadata(alias="structuredDataPromptTokens"), + pydantic.Field( + alias="structuredDataPromptTokens", + description="This is the number of prompt tokens used to extract structured data from the call.", + ), + ] = None structured_data_completion_tokens: typing_extensions.Annotated[ - typing.Optional[float], FieldMetadata(alias="structuredDataCompletionTokens") - ] = pydantic.Field(default=None) - """ - This is the number of completion tokens used to extract structured data from the call. - """ - + typing.Optional[float], + FieldMetadata(alias="structuredDataCompletionTokens"), + pydantic.Field( + alias="structuredDataCompletionTokens", + description="This is the number of completion tokens used to extract structured data from the call.", + ), + ] = None + structured_data_cached_prompt_tokens: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="structuredDataCachedPromptTokens"), + pydantic.Field( + alias="structuredDataCachedPromptTokens", + description="This is the number of cached prompt tokens used to extract structured data from the call.", + ), + ] = None success_evaluation: typing_extensions.Annotated[ - typing.Optional[float], FieldMetadata(alias="successEvaluation") - ] = pydantic.Field(default=None) - """ - This is the cost to evaluate if the call was successful. - """ - + typing.Optional[float], + FieldMetadata(alias="successEvaluation"), + pydantic.Field( + alias="successEvaluation", description="This is the cost to evaluate if the call was successful." + ), + ] = None success_evaluation_prompt_tokens: typing_extensions.Annotated[ - typing.Optional[float], FieldMetadata(alias="successEvaluationPromptTokens") - ] = pydantic.Field(default=None) - """ - This is the number of prompt tokens used to evaluate if the call was successful. - """ - + typing.Optional[float], + FieldMetadata(alias="successEvaluationPromptTokens"), + pydantic.Field( + alias="successEvaluationPromptTokens", + description="This is the number of prompt tokens used to evaluate if the call was successful.", + ), + ] = None success_evaluation_completion_tokens: typing_extensions.Annotated[ - typing.Optional[float], FieldMetadata(alias="successEvaluationCompletionTokens") - ] = pydantic.Field(default=None) - """ - This is the number of completion tokens used to evaluate if the call was successful. - """ + typing.Optional[float], + FieldMetadata(alias="successEvaluationCompletionTokens"), + pydantic.Field( + alias="successEvaluationCompletionTokens", + description="This is the number of completion tokens used to evaluate if the call was successful.", + ), + ] = None + success_evaluation_cached_prompt_tokens: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="successEvaluationCachedPromptTokens"), + pydantic.Field( + alias="successEvaluationCachedPromptTokens", + description="This is the number of cached prompt tokens used to evaluate if the call was successful.", + ), + ] = None + structured_output: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="structuredOutput"), + pydantic.Field( + alias="structuredOutput", description="This is the cost to evaluate structuredOutputs from the call." + ), + ] = None + structured_output_prompt_tokens: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="structuredOutputPromptTokens"), + pydantic.Field( + alias="structuredOutputPromptTokens", + description="This is the number of prompt tokens used to evaluate structuredOutputs from the call.", + ), + ] = None + structured_output_completion_tokens: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="structuredOutputCompletionTokens"), + pydantic.Field( + alias="structuredOutputCompletionTokens", + description="This is the number of completion tokens used to evaluate structuredOutputs from the call.", + ), + ] = None + structured_output_cached_prompt_tokens: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="structuredOutputCachedPromptTokens"), + pydantic.Field( + alias="structuredOutputCachedPromptTokens", + description="This is the number of cached prompt tokens used to evaluate structuredOutputs from the call.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/analysis_plan.py b/src/vapi/types/analysis_plan.py index 64e5d31c..c7fc8bf7 100644 --- a/src/vapi/types/analysis_plan.py +++ b/src/vapi/types/analysis_plan.py @@ -1,37 +1,69 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions +from __future__ import annotations + import typing -from .summary_plan import SummaryPlan -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .structured_data_multi_plan import StructuredDataMultiPlan from .structured_data_plan import StructuredDataPlan from .success_evaluation_plan import SuccessEvaluationPlan -from ..core.pydantic_utilities import IS_PYDANTIC_V2 - +from .summary_plan import SummaryPlan -class AnalysisPlan(UniversalBaseModel): - summary_plan: typing_extensions.Annotated[typing.Optional[SummaryPlan], FieldMetadata(alias="summaryPlan")] = ( - pydantic.Field(default=None) - ) - """ - This is the plan for generating the summary of the call. This outputs to `call.analysis.summary`. - """ +class AnalysisPlan(UncheckedBaseModel): + min_messages_threshold: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minMessagesThreshold"), + pydantic.Field( + alias="minMessagesThreshold", + description="The minimum number of messages required to run the analysis plan.\nIf the number of messages is less than this, analysis will be skipped.\n\n@default 2", + ), + ] = None + summary_plan: typing_extensions.Annotated[ + typing.Optional[SummaryPlan], + FieldMetadata(alias="summaryPlan"), + pydantic.Field( + alias="summaryPlan", + description="This is the plan for generating the summary of the call. This outputs to `call.analysis.summary`.", + ), + ] = None structured_data_plan: typing_extensions.Annotated[ - typing.Optional[StructuredDataPlan], FieldMetadata(alias="structuredDataPlan") - ] = pydantic.Field(default=None) - """ - This is the plan for generating the structured data from the call. This outputs to `call.analysis.structuredData`. - """ - + typing.Optional[StructuredDataPlan], + FieldMetadata(alias="structuredDataPlan"), + pydantic.Field( + alias="structuredDataPlan", + description="This is the plan for generating the structured data from the call. This outputs to `call.analysis.structuredData`.", + ), + ] = None + structured_data_multi_plan: typing_extensions.Annotated[ + typing.Optional[typing.List[StructuredDataMultiPlan]], + FieldMetadata(alias="structuredDataMultiPlan"), + pydantic.Field( + alias="structuredDataMultiPlan", + description="This is an array of structured data plan catalogs. Each entry includes a `key` and a `plan` for generating the structured data from the call. This outputs to `call.analysis.structuredDataMulti`.", + ), + ] = None success_evaluation_plan: typing_extensions.Annotated[ - typing.Optional[SuccessEvaluationPlan], FieldMetadata(alias="successEvaluationPlan") - ] = pydantic.Field(default=None) - """ - This is the plan for generating the success evaluation of the call. This outputs to `call.analysis.successEvaluation`. - """ + typing.Optional[SuccessEvaluationPlan], + FieldMetadata(alias="successEvaluationPlan"), + pydantic.Field( + alias="successEvaluationPlan", + description="This is the plan for generating the success evaluation of the call. This outputs to `call.analysis.successEvaluation`.", + ), + ] = None + outcome_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="outcomeIds"), + pydantic.Field( + alias="outcomeIds", + description="This is an array of outcome UUIDs to be calculated during analysis.\nThe outcomes will be calculated and stored in `call.analysis.outcomes`.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -41,3 +73,6 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +update_forward_refs(AnalysisPlan) diff --git a/src/vapi/types/analytics_operation.py b/src/vapi/types/analytics_operation.py index fdb4b5c2..f12006ba 100644 --- a/src/vapi/types/analytics_operation.py +++ b/src/vapi/types/analytics_operation.py @@ -1,14 +1,15 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -from .analytics_operation_operation import AnalyticsOperationOperation -import pydantic -from .analytics_operation_column import AnalyticsOperationColumn import typing + +import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .analytics_operation_column import AnalyticsOperationColumn +from .analytics_operation_operation import AnalyticsOperationOperation -class AnalyticsOperation(UniversalBaseModel): +class AnalyticsOperation(UncheckedBaseModel): operation: AnalyticsOperationOperation = pydantic.Field() """ This is the aggregation operation you want to perform. diff --git a/src/vapi/types/analytics_operation_column.py b/src/vapi/types/analytics_operation_column.py index e45992c2..f2321ebf 100644 --- a/src/vapi/types/analytics_operation_column.py +++ b/src/vapi/types/analytics_operation_column.py @@ -10,10 +10,16 @@ "costBreakdown.stt", "costBreakdown.tts", "costBreakdown.vapi", + "costBreakdown.transport", + "costBreakdown.analysisBreakdown.summary", + "costBreakdown.transcriber", "costBreakdown.ttsCharacters", "costBreakdown.llmPromptTokens", "costBreakdown.llmCompletionTokens", + "costBreakdown.llmCachedPromptTokens", "duration", + "concurrency", + "minutesUsed", ], typing.Any, ] diff --git a/src/vapi/types/analytics_operation_operation.py b/src/vapi/types/analytics_operation_operation.py index e709ffc0..eec029b1 100644 --- a/src/vapi/types/analytics_operation_operation.py +++ b/src/vapi/types/analytics_operation_operation.py @@ -2,4 +2,4 @@ import typing -AnalyticsOperationOperation = typing.Union[typing.Literal["sum", "avg", "count", "min", "max"], typing.Any] +AnalyticsOperationOperation = typing.Union[typing.Literal["sum", "avg", "count", "min", "max", "history"], typing.Any] diff --git a/src/vapi/types/analytics_query.py b/src/vapi/types/analytics_query.py index 639756ea..a2533aa2 100644 --- a/src/vapi/types/analytics_query.py +++ b/src/vapi/types/analytics_query.py @@ -1,41 +1,47 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing + import pydantic import typing_extensions -from .analytics_query_group_by_item import AnalyticsQueryGroupByItem +from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.serialization import FieldMetadata -from .time_range import TimeRange +from ..core.unchecked_base_model import UncheckedBaseModel from .analytics_operation import AnalyticsOperation -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from .analytics_query_group_by_item import AnalyticsQueryGroupByItem +from .analytics_query_table import AnalyticsQueryTable +from .time_range import TimeRange +from .variable_value_group_by import VariableValueGroupBy -class AnalyticsQuery(UniversalBaseModel): - table: typing.Literal["call"] = pydantic.Field(default="call") +class AnalyticsQuery(UncheckedBaseModel): + table: AnalyticsQueryTable = pydantic.Field() """ This is the table you want to query. """ group_by: typing_extensions.Annotated[ - typing.Optional[typing.List[AnalyticsQueryGroupByItem]], FieldMetadata(alias="groupBy") - ] = pydantic.Field(default=None) - """ - This is the list of columns you want to group by. - """ - + typing.Optional[typing.List[AnalyticsQueryGroupByItem]], + FieldMetadata(alias="groupBy"), + pydantic.Field(alias="groupBy", description="This is the list of columns you want to group by."), + ] = None + group_by_variable_value: typing_extensions.Annotated[ + typing.Optional[typing.List[VariableValueGroupBy]], + FieldMetadata(alias="groupByVariableValue"), + pydantic.Field( + alias="groupByVariableValue", description="This is the list of variable value keys you want to group by." + ), + ] = None name: str = pydantic.Field() """ This is the name of the query. This will be used to identify the query in the response. """ - time_range: typing_extensions.Annotated[typing.Optional[TimeRange], FieldMetadata(alias="timeRange")] = ( - pydantic.Field(default=None) - ) - """ - This is the time range for the query. - """ - + time_range: typing_extensions.Annotated[ + typing.Optional[TimeRange], + FieldMetadata(alias="timeRange"), + pydantic.Field(alias="timeRange", description="This is the time range for the query."), + ] = None operations: typing.List[AnalyticsOperation] = pydantic.Field() """ This is the list of operations you want to perform. diff --git a/src/vapi/types/analytics_query_result.py b/src/vapi/types/analytics_query_result.py index 5e91cf97..15ad372c 100644 --- a/src/vapi/types/analytics_query_result.py +++ b/src/vapi/types/analytics_query_result.py @@ -1,34 +1,35 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +import typing + import pydantic import typing_extensions -from .time_range import TimeRange -from ..core.serialization import FieldMetadata -import typing from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .time_range import TimeRange -class AnalyticsQueryResult(UniversalBaseModel): +class AnalyticsQueryResult(UncheckedBaseModel): name: str = pydantic.Field() """ This is the unique key for the query. """ - time_range: typing_extensions.Annotated[TimeRange, FieldMetadata(alias="timeRange")] = pydantic.Field() - """ - This is the time range for the query. - """ - - result: typing.List[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field() + time_range: typing_extensions.Annotated[ + TimeRange, + FieldMetadata(alias="timeRange"), + pydantic.Field(alias="timeRange", description="This is the time range for the query."), + ] + result: typing.List[typing.Dict[str, typing.Any]] = pydantic.Field() """ This is the result of the query, a list of unique groups with result of their aggregations. Example: "result": [ - { "date": "2023-01-01", "assistantId": "123", "endedReason": "customer-ended-call", "sumDuration": 120, "avgCost": 10.5 }, - { "date": "2023-01-02", "assistantId": "123", "endedReason": "customer-did-not-give-microphone-permission", "sumDuration": 0, "avgCost": 0 }, - // Additional results + { "date": "2023-01-01", "assistantId": "123", "endedReason": "customer-ended-call", "sumDuration": 120, "avgCost": 10.5 }, + { "date": "2023-01-02", "assistantId": "123", "endedReason": "customer-did-not-give-microphone-permission", "sumDuration": 0, "avgCost": 0 }, + // Additional results ] """ diff --git a/src/vapi/types/analytics_query_table.py b/src/vapi/types/analytics_query_table.py new file mode 100644 index 00000000..881d98a9 --- /dev/null +++ b/src/vapi/types/analytics_query_table.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +AnalyticsQueryTable = typing.Union[typing.Literal["call", "subscription"], typing.Any] diff --git a/src/vapi/types/anthropic_bedrock_credential.py b/src/vapi/types/anthropic_bedrock_credential.py new file mode 100644 index 00000000..8fce6361 --- /dev/null +++ b/src/vapi/types/anthropic_bedrock_credential.py @@ -0,0 +1,88 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .anthropic_bedrock_credential_authentication_plan import AnthropicBedrockCredentialAuthenticationPlan +from .anthropic_bedrock_credential_provider import AnthropicBedrockCredentialProvider +from .anthropic_bedrock_credential_region import AnthropicBedrockCredentialRegion +from .aws_sts_authentication_artifact import AwsStsAuthenticationArtifact +from .aws_sts_authentication_session import AwsStsAuthenticationSession + + +class AnthropicBedrockCredential(UncheckedBaseModel): + provider: AnthropicBedrockCredentialProvider + region: AnthropicBedrockCredentialRegion = pydantic.Field() + """ + AWS region where Bedrock is configured. + """ + + authentication_plan: typing_extensions.Annotated[ + AnthropicBedrockCredentialAuthenticationPlan, + FieldMetadata(alias="authenticationPlan"), + pydantic.Field( + alias="authenticationPlan", + description="Authentication method - either direct IAM credentials or cross-account role assumption.", + ), + ] + id: str = pydantic.Field() + """ + This is the unique identifier for the credential. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + authentication_artifact: typing_extensions.Annotated[ + typing.Optional[AwsStsAuthenticationArtifact], + FieldMetadata(alias="authenticationArtifact"), + pydantic.Field( + alias="authenticationArtifact", + description="Stores the external ID (generated or user-provided) for future AssumeRole calls.", + ), + ] = None + authentication_session: typing_extensions.Annotated[ + typing.Optional[AwsStsAuthenticationSession], + FieldMetadata(alias="authenticationSession"), + pydantic.Field( + alias="authenticationSession", + description="Cached authentication session from AssumeRole (temporary credentials).\nManaged by the system, auto-refreshed when expired.", + ), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/anthropic_bedrock_credential_authentication_plan.py b/src/vapi/types/anthropic_bedrock_credential_authentication_plan.py new file mode 100644 index 00000000..810aa1d5 --- /dev/null +++ b/src/vapi/types/anthropic_bedrock_credential_authentication_plan.py @@ -0,0 +1,63 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class AnthropicBedrockCredentialAuthenticationPlan_AwsIam(UncheckedBaseModel): + """ + Authentication method - either direct IAM credentials or cross-account role assumption. + """ + + type: typing.Literal["aws-iam"] = "aws-iam" + aws_access_key_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="awsAccessKeyId"), pydantic.Field(alias="awsAccessKeyId") + ] + aws_secret_access_key: typing_extensions.Annotated[ + str, FieldMetadata(alias="awsSecretAccessKey"), pydantic.Field(alias="awsSecretAccessKey") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnthropicBedrockCredentialAuthenticationPlan_AwsSts(UncheckedBaseModel): + """ + Authentication method - either direct IAM credentials or cross-account role assumption. + """ + + type: typing.Literal["aws-sts"] = "aws-sts" + role_arn: typing_extensions.Annotated[str, FieldMetadata(alias="roleArn"), pydantic.Field(alias="roleArn")] + external_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="externalId"), pydantic.Field(alias="externalId") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AnthropicBedrockCredentialAuthenticationPlan = typing_extensions.Annotated[ + typing.Union[ + AnthropicBedrockCredentialAuthenticationPlan_AwsIam, AnthropicBedrockCredentialAuthenticationPlan_AwsSts + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/anthropic_bedrock_credential_provider.py b/src/vapi/types/anthropic_bedrock_credential_provider.py new file mode 100644 index 00000000..17c13ed1 --- /dev/null +++ b/src/vapi/types/anthropic_bedrock_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +AnthropicBedrockCredentialProvider = typing.Union[typing.Literal["anthropic-bedrock"], typing.Any] diff --git a/src/vapi/types/anthropic_bedrock_credential_region.py b/src/vapi/types/anthropic_bedrock_credential_region.py new file mode 100644 index 00000000..dc386d2e --- /dev/null +++ b/src/vapi/types/anthropic_bedrock_credential_region.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +AnthropicBedrockCredentialRegion = typing.Union[ + typing.Literal["us-east-1", "us-west-2", "eu-west-1", "eu-west-3", "ap-northeast-1", "ap-southeast-2"], typing.Any +] diff --git a/src/vapi/types/anthropic_bedrock_model.py b/src/vapi/types/anthropic_bedrock_model.py new file mode 100644 index 00000000..af4ae613 --- /dev/null +++ b/src/vapi/types/anthropic_bedrock_model.py @@ -0,0 +1,211 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .anthropic_bedrock_model_model import AnthropicBedrockModelModel +from .anthropic_thinking_config import AnthropicThinkingConfig +from .create_custom_knowledge_base_dto import CreateCustomKnowledgeBaseDto +from .open_ai_message import OpenAiMessage + + +class AnthropicBedrockModel(UncheckedBaseModel): + messages: typing.Optional[typing.List[OpenAiMessage]] = pydantic.Field(default=None) + """ + This is the starting state for the conversation. + """ + + tools: typing.Optional[typing.List["AnthropicBedrockModelToolsItem"]] = pydantic.Field(default=None) + """ + These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`. + + Both `tools` and `toolIds` can be used together. + """ + + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="toolIds"), + pydantic.Field( + alias="toolIds", + description="These are the tools that the assistant can use during the call. To use transient tools, use `tools`.\n\nBoth `tools` and `toolIds` can be used together.", + ), + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase", description="These are the options for the knowledge base."), + ] = None + model: AnthropicBedrockModelModel = pydantic.Field() + """ + The specific Anthropic/Claude model that will be used via Bedrock. + """ + + thinking: typing.Optional[AnthropicThinkingConfig] = pydantic.Field(default=None) + """ + Optional configuration for Anthropic's thinking feature. + Only applicable for claude-3-7-sonnet-20250219 model. + If provided, maxTokens must be greater than thinking.budgetTokens. + """ + + temperature: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency. + """ + + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="maxTokens"), + pydantic.Field( + alias="maxTokens", + description="This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.", + ), + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field( + alias="emotionRecognitionEnabled", + description="This determines whether we detect user's emotion while they speak and send it as an additional info to model.\n\nDefault `false` because the model is usually are good at understanding the user's emotion from text.\n\n@default false", + ), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="numFastTurns"), + pydantic.Field( + alias="numFastTurns", + description="This sets how many turns at the start of the conversation to use a smaller, faster model from the same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai.\n\nDefault is 0.\n\n@default 0", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/anthropic_bedrock_model_model.py b/src/vapi/types/anthropic_bedrock_model_model.py new file mode 100644 index 00000000..9a14e096 --- /dev/null +++ b/src/vapi/types/anthropic_bedrock_model_model.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +AnthropicBedrockModelModel = typing.Union[ + typing.Literal[ + "claude-3-opus-20240229", + "claude-3-sonnet-20240229", + "claude-3-haiku-20240307", + "claude-3-5-sonnet-20240620", + "claude-3-5-sonnet-20241022", + "claude-3-5-haiku-20241022", + "claude-3-7-sonnet-20250219", + "claude-opus-4-20250514", + "claude-opus-4-5-20251101", + "claude-opus-4-6", + "claude-sonnet-4-20250514", + "claude-sonnet-4-5-20250929", + "claude-sonnet-4-6", + "claude-haiku-4-5-20251001", + ], + typing.Any, +] diff --git a/src/vapi/types/anthropic_bedrock_model_tools_item.py b/src/vapi/types/anthropic_bedrock_model_tools_item.py new file mode 100644 index 00000000..11168561 --- /dev/null +++ b/src/vapi/types/anthropic_bedrock_model_tools_item.py @@ -0,0 +1,731 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .backoff_plan import BackoffPlan +from .code_tool_environment_variable import CodeToolEnvironmentVariable +from .create_api_request_tool_dto_messages_item import CreateApiRequestToolDtoMessagesItem +from .create_api_request_tool_dto_method import CreateApiRequestToolDtoMethod +from .create_bash_tool_dto_messages_item import CreateBashToolDtoMessagesItem +from .create_bash_tool_dto_name import CreateBashToolDtoName +from .create_bash_tool_dto_sub_type import CreateBashToolDtoSubType +from .create_code_tool_dto_messages_item import CreateCodeToolDtoMessagesItem +from .create_computer_tool_dto_messages_item import CreateComputerToolDtoMessagesItem +from .create_computer_tool_dto_name import CreateComputerToolDtoName +from .create_computer_tool_dto_sub_type import CreateComputerToolDtoSubType +from .create_dtmf_tool_dto_messages_item import CreateDtmfToolDtoMessagesItem +from .create_end_call_tool_dto_messages_item import CreateEndCallToolDtoMessagesItem +from .create_function_tool_dto_messages_item import CreateFunctionToolDtoMessagesItem +from .create_go_high_level_calendar_availability_tool_dto_messages_item import ( + CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem, +) +from .create_go_high_level_calendar_event_create_tool_dto_messages_item import ( + CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_create_tool_dto_messages_item import ( + CreateGoHighLevelContactCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_get_tool_dto_messages_item import CreateGoHighLevelContactGetToolDtoMessagesItem +from .create_google_calendar_check_availability_tool_dto_messages_item import ( + CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem, +) +from .create_google_calendar_create_event_tool_dto_messages_item import ( + CreateGoogleCalendarCreateEventToolDtoMessagesItem, +) +from .create_google_sheets_row_append_tool_dto_messages_item import CreateGoogleSheetsRowAppendToolDtoMessagesItem +from .create_handoff_tool_dto_messages_item import CreateHandoffToolDtoMessagesItem +from .create_mcp_tool_dto_messages_item import CreateMcpToolDtoMessagesItem +from .create_query_tool_dto_messages_item import CreateQueryToolDtoMessagesItem +from .create_sip_request_tool_dto_body import CreateSipRequestToolDtoBody +from .create_sip_request_tool_dto_messages_item import CreateSipRequestToolDtoMessagesItem +from .create_sip_request_tool_dto_verb import CreateSipRequestToolDtoVerb +from .create_slack_send_message_tool_dto_messages_item import CreateSlackSendMessageToolDtoMessagesItem +from .create_sms_tool_dto_messages_item import CreateSmsToolDtoMessagesItem +from .create_text_editor_tool_dto_messages_item import CreateTextEditorToolDtoMessagesItem +from .create_text_editor_tool_dto_name import CreateTextEditorToolDtoName +from .create_text_editor_tool_dto_sub_type import CreateTextEditorToolDtoSubType +from .create_transfer_call_tool_dto_destinations_item import CreateTransferCallToolDtoDestinationsItem +from .create_transfer_call_tool_dto_messages_item import CreateTransferCallToolDtoMessagesItem +from .create_voicemail_tool_dto_messages_item import CreateVoicemailToolDtoMessagesItem +from .knowledge_base import KnowledgeBase +from .mcp_tool_messages import McpToolMessages +from .mcp_tool_metadata import McpToolMetadata +from .open_ai_function import OpenAiFunction +from .server import Server +from .tool_parameter import ToolParameter +from .tool_rejection_plan import ToolRejectionPlan +from .variable_extraction_plan import VariableExtractionPlan + + +class AnthropicBedrockModelToolsItem_ApiRequest(UncheckedBaseModel): + type: typing.Literal["apiRequest"] = "apiRequest" + messages: typing.Optional[typing.List[CreateApiRequestToolDtoMessagesItem]] = None + method: CreateApiRequestToolDtoMethod + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + encrypted_paths: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="encryptedPaths"), pydantic.Field(alias="encryptedPaths") + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + name: typing.Optional[str] = None + description: typing.Optional[str] = None + url: str + body: typing.Optional["JsonSchema"] = None + headers: typing.Optional["JsonSchema"] = None + backoff_plan: typing_extensions.Annotated[ + typing.Optional[BackoffPlan], FieldMetadata(alias="backoffPlan"), pydantic.Field(alias="backoffPlan") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnthropicBedrockModelToolsItem_Bash(UncheckedBaseModel): + type: typing.Literal["bash"] = "bash" + messages: typing.Optional[typing.List[CreateBashToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateBashToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateBashToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnthropicBedrockModelToolsItem_Code(UncheckedBaseModel): + type: typing.Literal["code"] = "code" + messages: typing.Optional[typing.List[CreateCodeToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + code: str + environment_variables: typing_extensions.Annotated[ + typing.Optional[typing.List[CodeToolEnvironmentVariable]], + FieldMetadata(alias="environmentVariables"), + pydantic.Field(alias="environmentVariables"), + ] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnthropicBedrockModelToolsItem_Computer(UncheckedBaseModel): + type: typing.Literal["computer"] = "computer" + messages: typing.Optional[typing.List[CreateComputerToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateComputerToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateComputerToolDtoName + display_width_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayWidthPx"), pydantic.Field(alias="displayWidthPx") + ] + display_height_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayHeightPx"), pydantic.Field(alias="displayHeightPx") + ] + display_number: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="displayNumber"), pydantic.Field(alias="displayNumber") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnthropicBedrockModelToolsItem_Dtmf(UncheckedBaseModel): + type: typing.Literal["dtmf"] = "dtmf" + messages: typing.Optional[typing.List[CreateDtmfToolDtoMessagesItem]] = None + sip_info_dtmf_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="sipInfoDtmfEnabled"), pydantic.Field(alias="sipInfoDtmfEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnthropicBedrockModelToolsItem_EndCall(UncheckedBaseModel): + type: typing.Literal["endCall"] = "endCall" + messages: typing.Optional[typing.List[CreateEndCallToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnthropicBedrockModelToolsItem_Function(UncheckedBaseModel): + type: typing.Literal["function"] = "function" + messages: typing.Optional[typing.List[CreateFunctionToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnthropicBedrockModelToolsItem_GohighlevelCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.availability.check"] = "gohighlevel.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnthropicBedrockModelToolsItem_GohighlevelCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.event.create"] = "gohighlevel.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnthropicBedrockModelToolsItem_GohighlevelContactCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.create"] = "gohighlevel.contact.create" + messages: typing.Optional[typing.List[CreateGoHighLevelContactCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnthropicBedrockModelToolsItem_GohighlevelContactGet(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.get"] = "gohighlevel.contact.get" + messages: typing.Optional[typing.List[CreateGoHighLevelContactGetToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnthropicBedrockModelToolsItem_GoogleCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["google.calendar.availability.check"] = "google.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnthropicBedrockModelToolsItem_GoogleCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["google.calendar.event.create"] = "google.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoogleCalendarCreateEventToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnthropicBedrockModelToolsItem_GoogleSheetsRowAppend(UncheckedBaseModel): + type: typing.Literal["google.sheets.row.append"] = "google.sheets.row.append" + messages: typing.Optional[typing.List[CreateGoogleSheetsRowAppendToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnthropicBedrockModelToolsItem_Handoff(UncheckedBaseModel): + type: typing.Literal["handoff"] = "handoff" + messages: typing.Optional[typing.List[CreateHandoffToolDtoMessagesItem]] = None + default_result: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="defaultResult"), pydantic.Field(alias="defaultResult") + ] = None + destinations: typing.Optional[typing.List["CreateHandoffToolDtoDestinationsItem"]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnthropicBedrockModelToolsItem_Mcp(UncheckedBaseModel): + type: typing.Literal["mcp"] = "mcp" + messages: typing.Optional[typing.List[CreateMcpToolDtoMessagesItem]] = None + server: typing.Optional[Server] = None + tool_messages: typing_extensions.Annotated[ + typing.Optional[typing.List[McpToolMessages]], + FieldMetadata(alias="toolMessages"), + pydantic.Field(alias="toolMessages"), + ] = None + metadata: typing.Optional[McpToolMetadata] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnthropicBedrockModelToolsItem_Query(UncheckedBaseModel): + type: typing.Literal["query"] = "query" + messages: typing.Optional[typing.List[CreateQueryToolDtoMessagesItem]] = None + knowledge_bases: typing_extensions.Annotated[ + typing.Optional[typing.List[KnowledgeBase]], + FieldMetadata(alias="knowledgeBases"), + pydantic.Field(alias="knowledgeBases"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnthropicBedrockModelToolsItem_SlackMessageSend(UncheckedBaseModel): + type: typing.Literal["slack.message.send"] = "slack.message.send" + messages: typing.Optional[typing.List[CreateSlackSendMessageToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnthropicBedrockModelToolsItem_Sms(UncheckedBaseModel): + type: typing.Literal["sms"] = "sms" + messages: typing.Optional[typing.List[CreateSmsToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnthropicBedrockModelToolsItem_TextEditor(UncheckedBaseModel): + type: typing.Literal["textEditor"] = "textEditor" + messages: typing.Optional[typing.List[CreateTextEditorToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateTextEditorToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateTextEditorToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnthropicBedrockModelToolsItem_TransferCall(UncheckedBaseModel): + type: typing.Literal["transferCall"] = "transferCall" + messages: typing.Optional[typing.List[CreateTransferCallToolDtoMessagesItem]] = None + destinations: typing.Optional[typing.List[CreateTransferCallToolDtoDestinationsItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnthropicBedrockModelToolsItem_SipRequest(UncheckedBaseModel): + type: typing.Literal["sipRequest"] = "sipRequest" + messages: typing.Optional[typing.List[CreateSipRequestToolDtoMessagesItem]] = None + verb: CreateSipRequestToolDtoVerb + headers: typing.Optional["JsonSchema"] = None + body: typing.Optional[CreateSipRequestToolDtoBody] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnthropicBedrockModelToolsItem_Voicemail(UncheckedBaseModel): + type: typing.Literal["voicemail"] = "voicemail" + messages: typing.Optional[typing.List[CreateVoicemailToolDtoMessagesItem]] = None + beep_detection_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="beepDetectionEnabled"), pydantic.Field(alias="beepDetectionEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AnthropicBedrockModelToolsItem = typing_extensions.Annotated[ + typing.Union[ + AnthropicBedrockModelToolsItem_ApiRequest, + AnthropicBedrockModelToolsItem_Bash, + AnthropicBedrockModelToolsItem_Code, + AnthropicBedrockModelToolsItem_Computer, + AnthropicBedrockModelToolsItem_Dtmf, + AnthropicBedrockModelToolsItem_EndCall, + AnthropicBedrockModelToolsItem_Function, + AnthropicBedrockModelToolsItem_GohighlevelCalendarAvailabilityCheck, + AnthropicBedrockModelToolsItem_GohighlevelCalendarEventCreate, + AnthropicBedrockModelToolsItem_GohighlevelContactCreate, + AnthropicBedrockModelToolsItem_GohighlevelContactGet, + AnthropicBedrockModelToolsItem_GoogleCalendarAvailabilityCheck, + AnthropicBedrockModelToolsItem_GoogleCalendarEventCreate, + AnthropicBedrockModelToolsItem_GoogleSheetsRowAppend, + AnthropicBedrockModelToolsItem_Handoff, + AnthropicBedrockModelToolsItem_Mcp, + AnthropicBedrockModelToolsItem_Query, + AnthropicBedrockModelToolsItem_SlackMessageSend, + AnthropicBedrockModelToolsItem_Sms, + AnthropicBedrockModelToolsItem_TextEditor, + AnthropicBedrockModelToolsItem_TransferCall, + AnthropicBedrockModelToolsItem_SipRequest, + AnthropicBedrockModelToolsItem_Voicemail, + ], + UnionMetadata(discriminant="type"), +] +from .json_schema import JsonSchema # noqa: E402, I001 +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs(AnthropicBedrockModelToolsItem_ApiRequest, JsonSchema=JsonSchema) +update_forward_refs(AnthropicBedrockModelToolsItem_Bash) +update_forward_refs(AnthropicBedrockModelToolsItem_Code) +update_forward_refs(AnthropicBedrockModelToolsItem_Computer) +update_forward_refs(AnthropicBedrockModelToolsItem_Dtmf) +update_forward_refs(AnthropicBedrockModelToolsItem_EndCall) +update_forward_refs(AnthropicBedrockModelToolsItem_Function) +update_forward_refs(AnthropicBedrockModelToolsItem_GohighlevelCalendarAvailabilityCheck) +update_forward_refs(AnthropicBedrockModelToolsItem_GohighlevelCalendarEventCreate) +update_forward_refs(AnthropicBedrockModelToolsItem_GohighlevelContactCreate) +update_forward_refs(AnthropicBedrockModelToolsItem_GohighlevelContactGet) +update_forward_refs(AnthropicBedrockModelToolsItem_GoogleCalendarAvailabilityCheck) +update_forward_refs(AnthropicBedrockModelToolsItem_GoogleCalendarEventCreate) +update_forward_refs(AnthropicBedrockModelToolsItem_GoogleSheetsRowAppend) +update_forward_refs( + AnthropicBedrockModelToolsItem_Handoff, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs(AnthropicBedrockModelToolsItem_Mcp) +update_forward_refs(AnthropicBedrockModelToolsItem_Query) +update_forward_refs(AnthropicBedrockModelToolsItem_SlackMessageSend) +update_forward_refs(AnthropicBedrockModelToolsItem_Sms) +update_forward_refs(AnthropicBedrockModelToolsItem_TextEditor) +update_forward_refs(AnthropicBedrockModelToolsItem_TransferCall) +update_forward_refs(AnthropicBedrockModelToolsItem_SipRequest, JsonSchema=JsonSchema) +update_forward_refs(AnthropicBedrockModelToolsItem_Voicemail) diff --git a/src/vapi/types/anthropic_credential.py b/src/vapi/types/anthropic_credential.py index e36cc37f..409d748f 100644 --- a/src/vapi/types/anthropic_credential.py +++ b/src/vapi/types/anthropic_credential.py @@ -1,39 +1,53 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +import datetime as dt import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic -import datetime as dt +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .anthropic_credential_provider import AnthropicCredentialProvider -class AnthropicCredential(UniversalBaseModel): - provider: typing.Literal["anthropic"] = "anthropic" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() - """ - This is not returned in the API. - """ - +class AnthropicCredential(UncheckedBaseModel): + provider: AnthropicCredentialProvider + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] id: str = pydantic.Field() """ This is the unique identifier for the credential. """ - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field() - """ - This is the unique identifier for the org that this credential belongs to. - """ - - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the credential was created. - """ - - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the assistant was last updated. + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/anthropic_credential_provider.py b/src/vapi/types/anthropic_credential_provider.py new file mode 100644 index 00000000..119cd6f0 --- /dev/null +++ b/src/vapi/types/anthropic_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +AnthropicCredentialProvider = typing.Union[typing.Literal["anthropic"], typing.Any] diff --git a/src/vapi/types/anthropic_model.py b/src/vapi/types/anthropic_model.py index 9265cab6..567a437d 100644 --- a/src/vapi/types/anthropic_model.py +++ b/src/vapi/types/anthropic_model.py @@ -1,85 +1,87 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +from __future__ import annotations + import typing -from .open_ai_message import OpenAiMessage + import pydantic -from .anthropic_model_tools_item import AnthropicModelToolsItem import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel from .anthropic_model_model import AnthropicModelModel -from .knowledge_base import KnowledgeBase -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from .anthropic_thinking_config import AnthropicThinkingConfig +from .create_custom_knowledge_base_dto import CreateCustomKnowledgeBaseDto +from .open_ai_message import OpenAiMessage -class AnthropicModel(UniversalBaseModel): +class AnthropicModel(UncheckedBaseModel): messages: typing.Optional[typing.List[OpenAiMessage]] = pydantic.Field(default=None) """ This is the starting state for the conversation. """ - tools: typing.Optional[typing.List[AnthropicModelToolsItem]] = pydantic.Field(default=None) + tools: typing.Optional[typing.List["AnthropicModelToolsItem"]] = pydantic.Field(default=None) """ These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`. Both `tools` and `toolIds` can be used together. """ - tool_ids: typing_extensions.Annotated[typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds")] = ( - pydantic.Field(default=None) - ) + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="toolIds"), + pydantic.Field( + alias="toolIds", + description="These are the tools that the assistant can use during the call. To use transient tools, use `tools`.\n\nBoth `tools` and `toolIds` can be used together.", + ), + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase", description="These are the options for the knowledge base."), + ] = None + model: AnthropicModelModel = pydantic.Field() """ - These are the tools that the assistant can use during the call. To use transient tools, use `tools`. - - Both `tools` and `toolIds` can be used together. + The specific Anthropic/Claude model that will be used. """ - model: AnthropicModelModel = pydantic.Field() + thinking: typing.Optional[AnthropicThinkingConfig] = pydantic.Field(default=None) """ - This is the Anthropic/Claude models that will be used. + Optional configuration for Anthropic's thinking feature. + Only applicable for claude-3-7-sonnet-20250219 model. + If provided, maxTokens must be greater than thinking.budgetTokens. """ - provider: typing.Literal["anthropic"] = "anthropic" temperature: typing.Optional[float] = pydantic.Field(default=None) """ This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency. """ - knowledge_base: typing_extensions.Annotated[ - typing.Optional[KnowledgeBase], FieldMetadata(alias="knowledgeBase") - ] = pydantic.Field(default=None) - """ - These are the options for the knowledge base. - """ - - max_tokens: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="maxTokens")] = pydantic.Field( - default=None - ) - """ - This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250. - """ - + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="maxTokens"), + pydantic.Field( + alias="maxTokens", + description="This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.", + ), + ] = None emotion_recognition_enabled: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="emotionRecognitionEnabled") - ] = pydantic.Field(default=None) - """ - This determines whether we detect user's emotion while they speak and send it as an additional info to model. - - Default `false` because the model is usually are good at understanding the user's emotion from text. - - @default false - """ - - num_fast_turns: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="numFastTurns")] = ( - pydantic.Field(default=None) - ) - """ - This sets how many turns at the start of the conversation to use a smaller, faster model from the same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai. - - Default is 0. - - @default 0 - """ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field( + alias="emotionRecognitionEnabled", + description="This determines whether we detect user's emotion while they speak and send it as an additional info to model.\n\nDefault `false` because the model is usually are good at understanding the user's emotion from text.\n\n@default false", + ), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="numFastTurns"), + pydantic.Field( + alias="numFastTurns", + description="This sets how many turns at the start of the conversation to use a smaller, faster model from the same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai.\n\nDefault is 0.\n\n@default 0", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -89,3 +91,121 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + AnthropicModel, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/anthropic_model_model.py b/src/vapi/types/anthropic_model_model.py index 671ff39a..2bc88621 100644 --- a/src/vapi/types/anthropic_model_model.py +++ b/src/vapi/types/anthropic_model_model.py @@ -4,7 +4,20 @@ AnthropicModelModel = typing.Union[ typing.Literal[ - "claude-3-opus-20240229", "claude-3-sonnet-20240229", "claude-3-haiku-20240307", "claude-3-5-sonnet-20240620" + "claude-3-opus-20240229", + "claude-3-sonnet-20240229", + "claude-3-haiku-20240307", + "claude-3-5-sonnet-20240620", + "claude-3-5-sonnet-20241022", + "claude-3-5-haiku-20241022", + "claude-3-7-sonnet-20250219", + "claude-opus-4-20250514", + "claude-opus-4-5-20251101", + "claude-opus-4-6", + "claude-sonnet-4-20250514", + "claude-sonnet-4-5-20250929", + "claude-sonnet-4-6", + "claude-haiku-4-5-20251001", ], typing.Any, ] diff --git a/src/vapi/types/anthropic_model_tools_item.py b/src/vapi/types/anthropic_model_tools_item.py index 09b4fe01..543ab1be 100644 --- a/src/vapi/types/anthropic_model_tools_item.py +++ b/src/vapi/types/anthropic_model_tools_item.py @@ -1,20 +1,731 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .create_dtmf_tool_dto import CreateDtmfToolDto -from .create_end_call_tool_dto import CreateEndCallToolDto -from .create_voicemail_tool_dto import CreateVoicemailToolDto -from .create_function_tool_dto import CreateFunctionToolDto -from .create_ghl_tool_dto import CreateGhlToolDto -from .create_make_tool_dto import CreateMakeToolDto -from .create_transfer_call_tool_dto import CreateTransferCallToolDto - -AnthropicModelToolsItem = typing.Union[ - CreateDtmfToolDto, - CreateEndCallToolDto, - CreateVoicemailToolDto, - CreateFunctionToolDto, - CreateGhlToolDto, - CreateMakeToolDto, - CreateTransferCallToolDto, + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .backoff_plan import BackoffPlan +from .code_tool_environment_variable import CodeToolEnvironmentVariable +from .create_api_request_tool_dto_messages_item import CreateApiRequestToolDtoMessagesItem +from .create_api_request_tool_dto_method import CreateApiRequestToolDtoMethod +from .create_bash_tool_dto_messages_item import CreateBashToolDtoMessagesItem +from .create_bash_tool_dto_name import CreateBashToolDtoName +from .create_bash_tool_dto_sub_type import CreateBashToolDtoSubType +from .create_code_tool_dto_messages_item import CreateCodeToolDtoMessagesItem +from .create_computer_tool_dto_messages_item import CreateComputerToolDtoMessagesItem +from .create_computer_tool_dto_name import CreateComputerToolDtoName +from .create_computer_tool_dto_sub_type import CreateComputerToolDtoSubType +from .create_dtmf_tool_dto_messages_item import CreateDtmfToolDtoMessagesItem +from .create_end_call_tool_dto_messages_item import CreateEndCallToolDtoMessagesItem +from .create_function_tool_dto_messages_item import CreateFunctionToolDtoMessagesItem +from .create_go_high_level_calendar_availability_tool_dto_messages_item import ( + CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem, +) +from .create_go_high_level_calendar_event_create_tool_dto_messages_item import ( + CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_create_tool_dto_messages_item import ( + CreateGoHighLevelContactCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_get_tool_dto_messages_item import CreateGoHighLevelContactGetToolDtoMessagesItem +from .create_google_calendar_check_availability_tool_dto_messages_item import ( + CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem, +) +from .create_google_calendar_create_event_tool_dto_messages_item import ( + CreateGoogleCalendarCreateEventToolDtoMessagesItem, +) +from .create_google_sheets_row_append_tool_dto_messages_item import CreateGoogleSheetsRowAppendToolDtoMessagesItem +from .create_handoff_tool_dto_messages_item import CreateHandoffToolDtoMessagesItem +from .create_mcp_tool_dto_messages_item import CreateMcpToolDtoMessagesItem +from .create_query_tool_dto_messages_item import CreateQueryToolDtoMessagesItem +from .create_sip_request_tool_dto_body import CreateSipRequestToolDtoBody +from .create_sip_request_tool_dto_messages_item import CreateSipRequestToolDtoMessagesItem +from .create_sip_request_tool_dto_verb import CreateSipRequestToolDtoVerb +from .create_slack_send_message_tool_dto_messages_item import CreateSlackSendMessageToolDtoMessagesItem +from .create_sms_tool_dto_messages_item import CreateSmsToolDtoMessagesItem +from .create_text_editor_tool_dto_messages_item import CreateTextEditorToolDtoMessagesItem +from .create_text_editor_tool_dto_name import CreateTextEditorToolDtoName +from .create_text_editor_tool_dto_sub_type import CreateTextEditorToolDtoSubType +from .create_transfer_call_tool_dto_destinations_item import CreateTransferCallToolDtoDestinationsItem +from .create_transfer_call_tool_dto_messages_item import CreateTransferCallToolDtoMessagesItem +from .create_voicemail_tool_dto_messages_item import CreateVoicemailToolDtoMessagesItem +from .knowledge_base import KnowledgeBase +from .mcp_tool_messages import McpToolMessages +from .mcp_tool_metadata import McpToolMetadata +from .open_ai_function import OpenAiFunction +from .server import Server +from .tool_parameter import ToolParameter +from .tool_rejection_plan import ToolRejectionPlan +from .variable_extraction_plan import VariableExtractionPlan + + +class AnthropicModelToolsItem_ApiRequest(UncheckedBaseModel): + type: typing.Literal["apiRequest"] = "apiRequest" + messages: typing.Optional[typing.List[CreateApiRequestToolDtoMessagesItem]] = None + method: CreateApiRequestToolDtoMethod + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + encrypted_paths: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="encryptedPaths"), pydantic.Field(alias="encryptedPaths") + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + name: typing.Optional[str] = None + description: typing.Optional[str] = None + url: str + body: typing.Optional["JsonSchema"] = None + headers: typing.Optional["JsonSchema"] = None + backoff_plan: typing_extensions.Annotated[ + typing.Optional[BackoffPlan], FieldMetadata(alias="backoffPlan"), pydantic.Field(alias="backoffPlan") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnthropicModelToolsItem_Bash(UncheckedBaseModel): + type: typing.Literal["bash"] = "bash" + messages: typing.Optional[typing.List[CreateBashToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateBashToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateBashToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnthropicModelToolsItem_Code(UncheckedBaseModel): + type: typing.Literal["code"] = "code" + messages: typing.Optional[typing.List[CreateCodeToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + code: str + environment_variables: typing_extensions.Annotated[ + typing.Optional[typing.List[CodeToolEnvironmentVariable]], + FieldMetadata(alias="environmentVariables"), + pydantic.Field(alias="environmentVariables"), + ] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnthropicModelToolsItem_Computer(UncheckedBaseModel): + type: typing.Literal["computer"] = "computer" + messages: typing.Optional[typing.List[CreateComputerToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateComputerToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateComputerToolDtoName + display_width_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayWidthPx"), pydantic.Field(alias="displayWidthPx") + ] + display_height_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayHeightPx"), pydantic.Field(alias="displayHeightPx") + ] + display_number: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="displayNumber"), pydantic.Field(alias="displayNumber") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnthropicModelToolsItem_Dtmf(UncheckedBaseModel): + type: typing.Literal["dtmf"] = "dtmf" + messages: typing.Optional[typing.List[CreateDtmfToolDtoMessagesItem]] = None + sip_info_dtmf_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="sipInfoDtmfEnabled"), pydantic.Field(alias="sipInfoDtmfEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnthropicModelToolsItem_EndCall(UncheckedBaseModel): + type: typing.Literal["endCall"] = "endCall" + messages: typing.Optional[typing.List[CreateEndCallToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnthropicModelToolsItem_Function(UncheckedBaseModel): + type: typing.Literal["function"] = "function" + messages: typing.Optional[typing.List[CreateFunctionToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnthropicModelToolsItem_GohighlevelCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.availability.check"] = "gohighlevel.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnthropicModelToolsItem_GohighlevelCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.event.create"] = "gohighlevel.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnthropicModelToolsItem_GohighlevelContactCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.create"] = "gohighlevel.contact.create" + messages: typing.Optional[typing.List[CreateGoHighLevelContactCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnthropicModelToolsItem_GohighlevelContactGet(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.get"] = "gohighlevel.contact.get" + messages: typing.Optional[typing.List[CreateGoHighLevelContactGetToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnthropicModelToolsItem_GoogleCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["google.calendar.availability.check"] = "google.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnthropicModelToolsItem_GoogleCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["google.calendar.event.create"] = "google.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoogleCalendarCreateEventToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnthropicModelToolsItem_GoogleSheetsRowAppend(UncheckedBaseModel): + type: typing.Literal["google.sheets.row.append"] = "google.sheets.row.append" + messages: typing.Optional[typing.List[CreateGoogleSheetsRowAppendToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnthropicModelToolsItem_Handoff(UncheckedBaseModel): + type: typing.Literal["handoff"] = "handoff" + messages: typing.Optional[typing.List[CreateHandoffToolDtoMessagesItem]] = None + default_result: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="defaultResult"), pydantic.Field(alias="defaultResult") + ] = None + destinations: typing.Optional[typing.List["CreateHandoffToolDtoDestinationsItem"]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnthropicModelToolsItem_Mcp(UncheckedBaseModel): + type: typing.Literal["mcp"] = "mcp" + messages: typing.Optional[typing.List[CreateMcpToolDtoMessagesItem]] = None + server: typing.Optional[Server] = None + tool_messages: typing_extensions.Annotated[ + typing.Optional[typing.List[McpToolMessages]], + FieldMetadata(alias="toolMessages"), + pydantic.Field(alias="toolMessages"), + ] = None + metadata: typing.Optional[McpToolMetadata] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnthropicModelToolsItem_Query(UncheckedBaseModel): + type: typing.Literal["query"] = "query" + messages: typing.Optional[typing.List[CreateQueryToolDtoMessagesItem]] = None + knowledge_bases: typing_extensions.Annotated[ + typing.Optional[typing.List[KnowledgeBase]], + FieldMetadata(alias="knowledgeBases"), + pydantic.Field(alias="knowledgeBases"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnthropicModelToolsItem_SlackMessageSend(UncheckedBaseModel): + type: typing.Literal["slack.message.send"] = "slack.message.send" + messages: typing.Optional[typing.List[CreateSlackSendMessageToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnthropicModelToolsItem_Sms(UncheckedBaseModel): + type: typing.Literal["sms"] = "sms" + messages: typing.Optional[typing.List[CreateSmsToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnthropicModelToolsItem_TextEditor(UncheckedBaseModel): + type: typing.Literal["textEditor"] = "textEditor" + messages: typing.Optional[typing.List[CreateTextEditorToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateTextEditorToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateTextEditorToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnthropicModelToolsItem_TransferCall(UncheckedBaseModel): + type: typing.Literal["transferCall"] = "transferCall" + messages: typing.Optional[typing.List[CreateTransferCallToolDtoMessagesItem]] = None + destinations: typing.Optional[typing.List[CreateTransferCallToolDtoDestinationsItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnthropicModelToolsItem_SipRequest(UncheckedBaseModel): + type: typing.Literal["sipRequest"] = "sipRequest" + messages: typing.Optional[typing.List[CreateSipRequestToolDtoMessagesItem]] = None + verb: CreateSipRequestToolDtoVerb + headers: typing.Optional["JsonSchema"] = None + body: typing.Optional[CreateSipRequestToolDtoBody] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnthropicModelToolsItem_Voicemail(UncheckedBaseModel): + type: typing.Literal["voicemail"] = "voicemail" + messages: typing.Optional[typing.List[CreateVoicemailToolDtoMessagesItem]] = None + beep_detection_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="beepDetectionEnabled"), pydantic.Field(alias="beepDetectionEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AnthropicModelToolsItem = typing_extensions.Annotated[ + typing.Union[ + AnthropicModelToolsItem_ApiRequest, + AnthropicModelToolsItem_Bash, + AnthropicModelToolsItem_Code, + AnthropicModelToolsItem_Computer, + AnthropicModelToolsItem_Dtmf, + AnthropicModelToolsItem_EndCall, + AnthropicModelToolsItem_Function, + AnthropicModelToolsItem_GohighlevelCalendarAvailabilityCheck, + AnthropicModelToolsItem_GohighlevelCalendarEventCreate, + AnthropicModelToolsItem_GohighlevelContactCreate, + AnthropicModelToolsItem_GohighlevelContactGet, + AnthropicModelToolsItem_GoogleCalendarAvailabilityCheck, + AnthropicModelToolsItem_GoogleCalendarEventCreate, + AnthropicModelToolsItem_GoogleSheetsRowAppend, + AnthropicModelToolsItem_Handoff, + AnthropicModelToolsItem_Mcp, + AnthropicModelToolsItem_Query, + AnthropicModelToolsItem_SlackMessageSend, + AnthropicModelToolsItem_Sms, + AnthropicModelToolsItem_TextEditor, + AnthropicModelToolsItem_TransferCall, + AnthropicModelToolsItem_SipRequest, + AnthropicModelToolsItem_Voicemail, + ], + UnionMetadata(discriminant="type"), ] +from .json_schema import JsonSchema # noqa: E402, I001 +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs(AnthropicModelToolsItem_ApiRequest, JsonSchema=JsonSchema) +update_forward_refs(AnthropicModelToolsItem_Bash) +update_forward_refs(AnthropicModelToolsItem_Code) +update_forward_refs(AnthropicModelToolsItem_Computer) +update_forward_refs(AnthropicModelToolsItem_Dtmf) +update_forward_refs(AnthropicModelToolsItem_EndCall) +update_forward_refs(AnthropicModelToolsItem_Function) +update_forward_refs(AnthropicModelToolsItem_GohighlevelCalendarAvailabilityCheck) +update_forward_refs(AnthropicModelToolsItem_GohighlevelCalendarEventCreate) +update_forward_refs(AnthropicModelToolsItem_GohighlevelContactCreate) +update_forward_refs(AnthropicModelToolsItem_GohighlevelContactGet) +update_forward_refs(AnthropicModelToolsItem_GoogleCalendarAvailabilityCheck) +update_forward_refs(AnthropicModelToolsItem_GoogleCalendarEventCreate) +update_forward_refs(AnthropicModelToolsItem_GoogleSheetsRowAppend) +update_forward_refs( + AnthropicModelToolsItem_Handoff, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs(AnthropicModelToolsItem_Mcp) +update_forward_refs(AnthropicModelToolsItem_Query) +update_forward_refs(AnthropicModelToolsItem_SlackMessageSend) +update_forward_refs(AnthropicModelToolsItem_Sms) +update_forward_refs(AnthropicModelToolsItem_TextEditor) +update_forward_refs(AnthropicModelToolsItem_TransferCall) +update_forward_refs(AnthropicModelToolsItem_SipRequest, JsonSchema=JsonSchema) +update_forward_refs(AnthropicModelToolsItem_Voicemail) diff --git a/src/vapi/types/anthropic_thinking_config.py b/src/vapi/types/anthropic_thinking_config.py new file mode 100644 index 00000000..1a9b8290 --- /dev/null +++ b/src/vapi/types/anthropic_thinking_config.py @@ -0,0 +1,31 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .anthropic_thinking_config_type import AnthropicThinkingConfigType + + +class AnthropicThinkingConfig(UncheckedBaseModel): + type: AnthropicThinkingConfigType + budget_tokens: typing_extensions.Annotated[ + float, + FieldMetadata(alias="budgetTokens"), + pydantic.Field( + alias="budgetTokens", + description="The maximum number of tokens to allocate for thinking.\nMust be between 1024 and 100000 tokens.", + ), + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/anthropic_thinking_config_type.py b/src/vapi/types/anthropic_thinking_config_type.py new file mode 100644 index 00000000..0bd9ac6a --- /dev/null +++ b/src/vapi/types/anthropic_thinking_config_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +AnthropicThinkingConfigType = typing.Union[typing.Literal["enabled"], typing.Any] diff --git a/src/vapi/types/anyscale_credential.py b/src/vapi/types/anyscale_credential.py index 2983f0a4..a361512c 100644 --- a/src/vapi/types/anyscale_credential.py +++ b/src/vapi/types/anyscale_credential.py @@ -1,39 +1,53 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +import datetime as dt import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic -import datetime as dt +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .anyscale_credential_provider import AnyscaleCredentialProvider -class AnyscaleCredential(UniversalBaseModel): - provider: typing.Literal["anyscale"] = "anyscale" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() - """ - This is not returned in the API. - """ - +class AnyscaleCredential(UncheckedBaseModel): + provider: AnyscaleCredentialProvider + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] id: str = pydantic.Field() """ This is the unique identifier for the credential. """ - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field() - """ - This is the unique identifier for the org that this credential belongs to. - """ - - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the credential was created. - """ - - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the assistant was last updated. + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/anyscale_credential_provider.py b/src/vapi/types/anyscale_credential_provider.py new file mode 100644 index 00000000..a8fb12b8 --- /dev/null +++ b/src/vapi/types/anyscale_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +AnyscaleCredentialProvider = typing.Union[typing.Literal["anyscale"], typing.Any] diff --git a/src/vapi/types/anyscale_model.py b/src/vapi/types/anyscale_model.py index d3909705..74a19b90 100644 --- a/src/vapi/types/anyscale_model.py +++ b/src/vapi/types/anyscale_model.py @@ -1,39 +1,44 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +from __future__ import annotations + import typing -from .open_ai_message import OpenAiMessage + import pydantic -from .anyscale_model_tools_item import AnyscaleModelToolsItem import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.serialization import FieldMetadata -from .knowledge_base import KnowledgeBase -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_custom_knowledge_base_dto import CreateCustomKnowledgeBaseDto +from .open_ai_message import OpenAiMessage -class AnyscaleModel(UniversalBaseModel): +class AnyscaleModel(UncheckedBaseModel): messages: typing.Optional[typing.List[OpenAiMessage]] = pydantic.Field(default=None) """ This is the starting state for the conversation. """ - tools: typing.Optional[typing.List[AnyscaleModelToolsItem]] = pydantic.Field(default=None) + tools: typing.Optional[typing.List["AnyscaleModelToolsItem"]] = pydantic.Field(default=None) """ These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`. Both `tools` and `toolIds` can be used together. """ - tool_ids: typing_extensions.Annotated[typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds")] = ( - pydantic.Field(default=None) - ) - """ - These are the tools that the assistant can use during the call. To use transient tools, use `tools`. - - Both `tools` and `toolIds` can be used together. - """ - - provider: typing.Literal["anyscale"] = "anyscale" + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="toolIds"), + pydantic.Field( + alias="toolIds", + description="These are the tools that the assistant can use during the call. To use transient tools, use `tools`.\n\nBoth `tools` and `toolIds` can be used together.", + ), + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase", description="These are the options for the knowledge base."), + ] = None model: str = pydantic.Field() """ This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b @@ -44,41 +49,30 @@ class AnyscaleModel(UniversalBaseModel): This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency. """ - knowledge_base: typing_extensions.Annotated[ - typing.Optional[KnowledgeBase], FieldMetadata(alias="knowledgeBase") - ] = pydantic.Field(default=None) - """ - These are the options for the knowledge base. - """ - - max_tokens: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="maxTokens")] = pydantic.Field( - default=None - ) - """ - This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250. - """ - + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="maxTokens"), + pydantic.Field( + alias="maxTokens", + description="This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.", + ), + ] = None emotion_recognition_enabled: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="emotionRecognitionEnabled") - ] = pydantic.Field(default=None) - """ - This determines whether we detect user's emotion while they speak and send it as an additional info to model. - - Default `false` because the model is usually are good at understanding the user's emotion from text. - - @default false - """ - - num_fast_turns: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="numFastTurns")] = ( - pydantic.Field(default=None) - ) - """ - This sets how many turns at the start of the conversation to use a smaller, faster model from the same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai. - - Default is 0. - - @default 0 - """ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field( + alias="emotionRecognitionEnabled", + description="This determines whether we detect user's emotion while they speak and send it as an additional info to model.\n\nDefault `false` because the model is usually are good at understanding the user's emotion from text.\n\n@default false", + ), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="numFastTurns"), + pydantic.Field( + alias="numFastTurns", + description="This sets how many turns at the start of the conversation to use a smaller, faster model from the same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai.\n\nDefault is 0.\n\n@default 0", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -88,3 +82,121 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + AnyscaleModel, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/anyscale_model_tools_item.py b/src/vapi/types/anyscale_model_tools_item.py index 09473b7b..e10afcc7 100644 --- a/src/vapi/types/anyscale_model_tools_item.py +++ b/src/vapi/types/anyscale_model_tools_item.py @@ -1,20 +1,731 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .create_dtmf_tool_dto import CreateDtmfToolDto -from .create_end_call_tool_dto import CreateEndCallToolDto -from .create_voicemail_tool_dto import CreateVoicemailToolDto -from .create_function_tool_dto import CreateFunctionToolDto -from .create_ghl_tool_dto import CreateGhlToolDto -from .create_make_tool_dto import CreateMakeToolDto -from .create_transfer_call_tool_dto import CreateTransferCallToolDto - -AnyscaleModelToolsItem = typing.Union[ - CreateDtmfToolDto, - CreateEndCallToolDto, - CreateVoicemailToolDto, - CreateFunctionToolDto, - CreateGhlToolDto, - CreateMakeToolDto, - CreateTransferCallToolDto, + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .backoff_plan import BackoffPlan +from .code_tool_environment_variable import CodeToolEnvironmentVariable +from .create_api_request_tool_dto_messages_item import CreateApiRequestToolDtoMessagesItem +from .create_api_request_tool_dto_method import CreateApiRequestToolDtoMethod +from .create_bash_tool_dto_messages_item import CreateBashToolDtoMessagesItem +from .create_bash_tool_dto_name import CreateBashToolDtoName +from .create_bash_tool_dto_sub_type import CreateBashToolDtoSubType +from .create_code_tool_dto_messages_item import CreateCodeToolDtoMessagesItem +from .create_computer_tool_dto_messages_item import CreateComputerToolDtoMessagesItem +from .create_computer_tool_dto_name import CreateComputerToolDtoName +from .create_computer_tool_dto_sub_type import CreateComputerToolDtoSubType +from .create_dtmf_tool_dto_messages_item import CreateDtmfToolDtoMessagesItem +from .create_end_call_tool_dto_messages_item import CreateEndCallToolDtoMessagesItem +from .create_function_tool_dto_messages_item import CreateFunctionToolDtoMessagesItem +from .create_go_high_level_calendar_availability_tool_dto_messages_item import ( + CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem, +) +from .create_go_high_level_calendar_event_create_tool_dto_messages_item import ( + CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_create_tool_dto_messages_item import ( + CreateGoHighLevelContactCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_get_tool_dto_messages_item import CreateGoHighLevelContactGetToolDtoMessagesItem +from .create_google_calendar_check_availability_tool_dto_messages_item import ( + CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem, +) +from .create_google_calendar_create_event_tool_dto_messages_item import ( + CreateGoogleCalendarCreateEventToolDtoMessagesItem, +) +from .create_google_sheets_row_append_tool_dto_messages_item import CreateGoogleSheetsRowAppendToolDtoMessagesItem +from .create_handoff_tool_dto_messages_item import CreateHandoffToolDtoMessagesItem +from .create_mcp_tool_dto_messages_item import CreateMcpToolDtoMessagesItem +from .create_query_tool_dto_messages_item import CreateQueryToolDtoMessagesItem +from .create_sip_request_tool_dto_body import CreateSipRequestToolDtoBody +from .create_sip_request_tool_dto_messages_item import CreateSipRequestToolDtoMessagesItem +from .create_sip_request_tool_dto_verb import CreateSipRequestToolDtoVerb +from .create_slack_send_message_tool_dto_messages_item import CreateSlackSendMessageToolDtoMessagesItem +from .create_sms_tool_dto_messages_item import CreateSmsToolDtoMessagesItem +from .create_text_editor_tool_dto_messages_item import CreateTextEditorToolDtoMessagesItem +from .create_text_editor_tool_dto_name import CreateTextEditorToolDtoName +from .create_text_editor_tool_dto_sub_type import CreateTextEditorToolDtoSubType +from .create_transfer_call_tool_dto_destinations_item import CreateTransferCallToolDtoDestinationsItem +from .create_transfer_call_tool_dto_messages_item import CreateTransferCallToolDtoMessagesItem +from .create_voicemail_tool_dto_messages_item import CreateVoicemailToolDtoMessagesItem +from .knowledge_base import KnowledgeBase +from .mcp_tool_messages import McpToolMessages +from .mcp_tool_metadata import McpToolMetadata +from .open_ai_function import OpenAiFunction +from .server import Server +from .tool_parameter import ToolParameter +from .tool_rejection_plan import ToolRejectionPlan +from .variable_extraction_plan import VariableExtractionPlan + + +class AnyscaleModelToolsItem_ApiRequest(UncheckedBaseModel): + type: typing.Literal["apiRequest"] = "apiRequest" + messages: typing.Optional[typing.List[CreateApiRequestToolDtoMessagesItem]] = None + method: CreateApiRequestToolDtoMethod + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + encrypted_paths: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="encryptedPaths"), pydantic.Field(alias="encryptedPaths") + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + name: typing.Optional[str] = None + description: typing.Optional[str] = None + url: str + body: typing.Optional["JsonSchema"] = None + headers: typing.Optional["JsonSchema"] = None + backoff_plan: typing_extensions.Annotated[ + typing.Optional[BackoffPlan], FieldMetadata(alias="backoffPlan"), pydantic.Field(alias="backoffPlan") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnyscaleModelToolsItem_Bash(UncheckedBaseModel): + type: typing.Literal["bash"] = "bash" + messages: typing.Optional[typing.List[CreateBashToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateBashToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateBashToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnyscaleModelToolsItem_Code(UncheckedBaseModel): + type: typing.Literal["code"] = "code" + messages: typing.Optional[typing.List[CreateCodeToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + code: str + environment_variables: typing_extensions.Annotated[ + typing.Optional[typing.List[CodeToolEnvironmentVariable]], + FieldMetadata(alias="environmentVariables"), + pydantic.Field(alias="environmentVariables"), + ] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnyscaleModelToolsItem_Computer(UncheckedBaseModel): + type: typing.Literal["computer"] = "computer" + messages: typing.Optional[typing.List[CreateComputerToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateComputerToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateComputerToolDtoName + display_width_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayWidthPx"), pydantic.Field(alias="displayWidthPx") + ] + display_height_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayHeightPx"), pydantic.Field(alias="displayHeightPx") + ] + display_number: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="displayNumber"), pydantic.Field(alias="displayNumber") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnyscaleModelToolsItem_Dtmf(UncheckedBaseModel): + type: typing.Literal["dtmf"] = "dtmf" + messages: typing.Optional[typing.List[CreateDtmfToolDtoMessagesItem]] = None + sip_info_dtmf_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="sipInfoDtmfEnabled"), pydantic.Field(alias="sipInfoDtmfEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnyscaleModelToolsItem_EndCall(UncheckedBaseModel): + type: typing.Literal["endCall"] = "endCall" + messages: typing.Optional[typing.List[CreateEndCallToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnyscaleModelToolsItem_Function(UncheckedBaseModel): + type: typing.Literal["function"] = "function" + messages: typing.Optional[typing.List[CreateFunctionToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnyscaleModelToolsItem_GohighlevelCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.availability.check"] = "gohighlevel.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnyscaleModelToolsItem_GohighlevelCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.event.create"] = "gohighlevel.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnyscaleModelToolsItem_GohighlevelContactCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.create"] = "gohighlevel.contact.create" + messages: typing.Optional[typing.List[CreateGoHighLevelContactCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnyscaleModelToolsItem_GohighlevelContactGet(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.get"] = "gohighlevel.contact.get" + messages: typing.Optional[typing.List[CreateGoHighLevelContactGetToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnyscaleModelToolsItem_GoogleCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["google.calendar.availability.check"] = "google.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnyscaleModelToolsItem_GoogleCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["google.calendar.event.create"] = "google.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoogleCalendarCreateEventToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnyscaleModelToolsItem_GoogleSheetsRowAppend(UncheckedBaseModel): + type: typing.Literal["google.sheets.row.append"] = "google.sheets.row.append" + messages: typing.Optional[typing.List[CreateGoogleSheetsRowAppendToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnyscaleModelToolsItem_Handoff(UncheckedBaseModel): + type: typing.Literal["handoff"] = "handoff" + messages: typing.Optional[typing.List[CreateHandoffToolDtoMessagesItem]] = None + default_result: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="defaultResult"), pydantic.Field(alias="defaultResult") + ] = None + destinations: typing.Optional[typing.List["CreateHandoffToolDtoDestinationsItem"]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnyscaleModelToolsItem_Mcp(UncheckedBaseModel): + type: typing.Literal["mcp"] = "mcp" + messages: typing.Optional[typing.List[CreateMcpToolDtoMessagesItem]] = None + server: typing.Optional[Server] = None + tool_messages: typing_extensions.Annotated[ + typing.Optional[typing.List[McpToolMessages]], + FieldMetadata(alias="toolMessages"), + pydantic.Field(alias="toolMessages"), + ] = None + metadata: typing.Optional[McpToolMetadata] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnyscaleModelToolsItem_Query(UncheckedBaseModel): + type: typing.Literal["query"] = "query" + messages: typing.Optional[typing.List[CreateQueryToolDtoMessagesItem]] = None + knowledge_bases: typing_extensions.Annotated[ + typing.Optional[typing.List[KnowledgeBase]], + FieldMetadata(alias="knowledgeBases"), + pydantic.Field(alias="knowledgeBases"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnyscaleModelToolsItem_SlackMessageSend(UncheckedBaseModel): + type: typing.Literal["slack.message.send"] = "slack.message.send" + messages: typing.Optional[typing.List[CreateSlackSendMessageToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnyscaleModelToolsItem_Sms(UncheckedBaseModel): + type: typing.Literal["sms"] = "sms" + messages: typing.Optional[typing.List[CreateSmsToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnyscaleModelToolsItem_TextEditor(UncheckedBaseModel): + type: typing.Literal["textEditor"] = "textEditor" + messages: typing.Optional[typing.List[CreateTextEditorToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateTextEditorToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateTextEditorToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnyscaleModelToolsItem_TransferCall(UncheckedBaseModel): + type: typing.Literal["transferCall"] = "transferCall" + messages: typing.Optional[typing.List[CreateTransferCallToolDtoMessagesItem]] = None + destinations: typing.Optional[typing.List[CreateTransferCallToolDtoDestinationsItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnyscaleModelToolsItem_SipRequest(UncheckedBaseModel): + type: typing.Literal["sipRequest"] = "sipRequest" + messages: typing.Optional[typing.List[CreateSipRequestToolDtoMessagesItem]] = None + verb: CreateSipRequestToolDtoVerb + headers: typing.Optional["JsonSchema"] = None + body: typing.Optional[CreateSipRequestToolDtoBody] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AnyscaleModelToolsItem_Voicemail(UncheckedBaseModel): + type: typing.Literal["voicemail"] = "voicemail" + messages: typing.Optional[typing.List[CreateVoicemailToolDtoMessagesItem]] = None + beep_detection_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="beepDetectionEnabled"), pydantic.Field(alias="beepDetectionEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AnyscaleModelToolsItem = typing_extensions.Annotated[ + typing.Union[ + AnyscaleModelToolsItem_ApiRequest, + AnyscaleModelToolsItem_Bash, + AnyscaleModelToolsItem_Code, + AnyscaleModelToolsItem_Computer, + AnyscaleModelToolsItem_Dtmf, + AnyscaleModelToolsItem_EndCall, + AnyscaleModelToolsItem_Function, + AnyscaleModelToolsItem_GohighlevelCalendarAvailabilityCheck, + AnyscaleModelToolsItem_GohighlevelCalendarEventCreate, + AnyscaleModelToolsItem_GohighlevelContactCreate, + AnyscaleModelToolsItem_GohighlevelContactGet, + AnyscaleModelToolsItem_GoogleCalendarAvailabilityCheck, + AnyscaleModelToolsItem_GoogleCalendarEventCreate, + AnyscaleModelToolsItem_GoogleSheetsRowAppend, + AnyscaleModelToolsItem_Handoff, + AnyscaleModelToolsItem_Mcp, + AnyscaleModelToolsItem_Query, + AnyscaleModelToolsItem_SlackMessageSend, + AnyscaleModelToolsItem_Sms, + AnyscaleModelToolsItem_TextEditor, + AnyscaleModelToolsItem_TransferCall, + AnyscaleModelToolsItem_SipRequest, + AnyscaleModelToolsItem_Voicemail, + ], + UnionMetadata(discriminant="type"), ] +from .json_schema import JsonSchema # noqa: E402, I001 +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs(AnyscaleModelToolsItem_ApiRequest, JsonSchema=JsonSchema) +update_forward_refs(AnyscaleModelToolsItem_Bash) +update_forward_refs(AnyscaleModelToolsItem_Code) +update_forward_refs(AnyscaleModelToolsItem_Computer) +update_forward_refs(AnyscaleModelToolsItem_Dtmf) +update_forward_refs(AnyscaleModelToolsItem_EndCall) +update_forward_refs(AnyscaleModelToolsItem_Function) +update_forward_refs(AnyscaleModelToolsItem_GohighlevelCalendarAvailabilityCheck) +update_forward_refs(AnyscaleModelToolsItem_GohighlevelCalendarEventCreate) +update_forward_refs(AnyscaleModelToolsItem_GohighlevelContactCreate) +update_forward_refs(AnyscaleModelToolsItem_GohighlevelContactGet) +update_forward_refs(AnyscaleModelToolsItem_GoogleCalendarAvailabilityCheck) +update_forward_refs(AnyscaleModelToolsItem_GoogleCalendarEventCreate) +update_forward_refs(AnyscaleModelToolsItem_GoogleSheetsRowAppend) +update_forward_refs( + AnyscaleModelToolsItem_Handoff, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs(AnyscaleModelToolsItem_Mcp) +update_forward_refs(AnyscaleModelToolsItem_Query) +update_forward_refs(AnyscaleModelToolsItem_SlackMessageSend) +update_forward_refs(AnyscaleModelToolsItem_Sms) +update_forward_refs(AnyscaleModelToolsItem_TextEditor) +update_forward_refs(AnyscaleModelToolsItem_TransferCall) +update_forward_refs(AnyscaleModelToolsItem_SipRequest, JsonSchema=JsonSchema) +update_forward_refs(AnyscaleModelToolsItem_Voicemail) diff --git a/src/vapi/types/api_request_tool.py b/src/vapi/types/api_request_tool.py new file mode 100644 index 00000000..2cf79a59 --- /dev/null +++ b/src/vapi/types/api_request_tool.py @@ -0,0 +1,146 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .api_request_tool_messages_item import ApiRequestToolMessagesItem +from .api_request_tool_method import ApiRequestToolMethod +from .backoff_plan import BackoffPlan +from .tool_parameter import ToolParameter +from .tool_rejection_plan import ToolRejectionPlan +from .variable_extraction_plan import VariableExtractionPlan + + +class ApiRequestTool(UncheckedBaseModel): + messages: typing.Optional[typing.List[ApiRequestToolMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + method: ApiRequestToolMethod + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="timeoutSeconds"), + pydantic.Field( + alias="timeoutSeconds", + description="This is the timeout in seconds for the request. Defaults to 20 seconds.\n\n@default 20", + ), + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="credentialId"), + pydantic.Field(alias="credentialId", description="The credential ID for API request authentication"), + ] = None + encrypted_paths: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="encryptedPaths"), + pydantic.Field( + alias="encryptedPaths", + description="This is the paths to encrypt in the request body if credentialId and encryptionPlan are defined.", + ), + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = pydantic.Field(default=None) + """ + Static key-value pairs merged into the request body. Values support Liquid templates. + """ + + id: str = pydantic.Field() + """ + This is the unique identifier for the tool. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the organization that this tool belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the tool was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", description="This is the ISO 8601 date-time string of when the tool was last updated." + ), + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the tool. This will be passed to the model. + + Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 40. + """ + + description: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the description of the tool. This will be passed to the model. + """ + + url: str = pydantic.Field() + """ + This is where the request will be sent. + """ + + body: typing.Optional["JsonSchema"] = pydantic.Field(default=None) + """ + This is the body of the request. + """ + + headers: typing.Optional["JsonSchema"] = pydantic.Field(default=None) + """ + These are the headers to send with the request. + """ + + backoff_plan: typing_extensions.Annotated[ + typing.Optional[BackoffPlan], + FieldMetadata(alias="backoffPlan"), + pydantic.Field( + alias="backoffPlan", + description="This is the backoff plan if the request fails. Defaults to undefined (the request will not be retried).\n\n@default undefined (the request will not be retried)", + ), + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field( + alias="variableExtractionPlan", + description='This is the plan to extract variables from the tool\'s response. These will be accessible during the call and stored in `call.artifact.variableValues` after the call.\n\nUsage:\n1. Use `aliases` to extract variables from the tool\'s response body. (Most common case)\n\n```json\n{\n "aliases": [\n {\n "key": "customerName",\n "value": "{{customer.name}}"\n },\n {\n "key": "customerAge",\n "value": "{{customer.age}}"\n }\n ]\n}\n```\n\nThe tool response body is made available to the liquid template.\n\n2. Use `aliases` to extract variables from the tool\'s response body if the response is an array.\n\n```json\n{\n "aliases": [\n {\n "key": "customerName",\n "value": "{{$[0].name}}"\n },\n {\n "key": "customerAge",\n "value": "{{$[0].age}}"\n }\n ]\n}\n```\n\n$ is a shorthand for the tool\'s response body. `$[0]` is the first item in the array. `$[n]` is the nth item in the array. Note, $ is available regardless of the response body type (both object and array).\n\n3. Use `aliases` to extract variables from the tool\'s response headers.\n\n```json\n{\n "aliases": [\n {\n "key": "customerName",\n "value": "{{tool.response.headers.customer-name}}"\n },\n {\n "key": "customerAge",\n "value": "{{tool.response.headers.customer-age}}"\n }\n ]\n}\n```\n\n`tool.response` is made available to the liquid template. Particularly, both `tool.response.headers` and `tool.response.body` are available. Note, `tool.response` is available regardless of the response body type (both object and array).\n\n4. Use `schema` to extract a large portion of the tool\'s response body.\n\n4.1. If you hit example.com and it returns `{"name": "John", "age": 30}`, then you can specify the schema as:\n\n```json\n{\n "schema": {\n "type": "object",\n "properties": {\n "name": {\n "type": "string"\n },\n "age": {\n "type": "number"\n }\n }\n }\n}\n```\nThese will be extracted as `{{ name }}` and `{{ age }}` respectively. To emphasize, object properties are extracted as direct global variables.\n\n4.2. If you hit example.com and it returns `{"name": {"first": "John", "last": "Doe"}}`, then you can specify the schema as:\n\n```json\n{\n "schema": {\n "type": "object",\n "properties": {\n "name": {\n "type": "object",\n "properties": {\n "first": {\n "type": "string"\n },\n "last": {\n "type": "string"\n }\n }\n }\n }\n }\n}\n```\n\nThese will be extracted as `{{ name }}`. And, `{{ name.first }}` and `{{ name.last }}` will be accessible.\n\n4.3. If you hit example.com and it returns `["94123", "94124"]`, then you can specify the schema as:\n\n```json\n{\n "schema": {\n "type": "array",\n "title": "zipCodes",\n "items": {\n "type": "string"\n }\n }\n}\n```\n\nThis will be extracted as `{{ zipCodes }}`. To access the array items, you can use `{{ zipCodes[0] }}` and `{{ zipCodes[1] }}`.\n\n4.4. If you hit example.com and it returns `[{"name": "John", "age": 30, "zipCodes": ["94123", "94124"]}, {"name": "Jane", "age": 25, "zipCodes": ["94125", "94126"]}]`, then you can specify the schema as:\n\n```json\n{\n "schema": {\n "type": "array",\n "title": "people",\n "items": {\n "type": "object",\n "properties": {\n "name": {\n "type": "string"\n },\n "age": {\n "type": "number"\n },\n "zipCodes": {\n "type": "array",\n "items": {\n "type": "string"\n }\n }\n }\n }\n }\n}\n```\n\nThis will be extracted as `{{ people }}`. To access the array items, you can use `{{ people[n].name }}`, `{{ people[n].age }}`, `{{ people[n].zipCodes }}`, `{{ people[n].zipCodes[0] }}` and `{{ people[n].zipCodes[1] }}`.\n\nNote: Both `aliases` and `schema` can be used together.', + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .json_schema import JsonSchema # noqa: E402, I001 + +update_forward_refs(ApiRequestTool, JsonSchema=JsonSchema) diff --git a/src/vapi/types/api_request_tool_messages_item.py b/src/vapi/types/api_request_tool_messages_item.py new file mode 100644 index 00000000..40a8cb8f --- /dev/null +++ b/src/vapi/types/api_request_tool_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class ApiRequestToolMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ApiRequestToolMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ApiRequestToolMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ApiRequestToolMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ApiRequestToolMessagesItem = typing_extensions.Annotated[ + typing.Union[ + ApiRequestToolMessagesItem_RequestStart, + ApiRequestToolMessagesItem_RequestComplete, + ApiRequestToolMessagesItem_RequestFailed, + ApiRequestToolMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/log_request_http_method.py b/src/vapi/types/api_request_tool_method.py similarity index 65% rename from src/vapi/types/log_request_http_method.py rename to src/vapi/types/api_request_tool_method.py index f4734880..73cb92c9 100644 --- a/src/vapi/types/log_request_http_method.py +++ b/src/vapi/types/api_request_tool_method.py @@ -2,4 +2,4 @@ import typing -LogRequestHttpMethod = typing.Union[typing.Literal["POST", "GET", "PUT", "PATCH", "DELETE"], typing.Any] +ApiRequestToolMethod = typing.Union[typing.Literal["POST", "GET", "PUT", "PATCH", "DELETE"], typing.Any] diff --git a/src/vapi/types/artifact.py b/src/vapi/types/artifact.py index 7afda69b..784d86ce 100644 --- a/src/vapi/types/artifact.py +++ b/src/vapi/types/artifact.py @@ -1,61 +1,148 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +import datetime as dt import typing -from .artifact_messages_item import ArtifactMessagesItem + import pydantic import typing_extensions -from .open_ai_message import OpenAiMessage -from ..core.serialization import FieldMetadata from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .artifact_messages_item import ArtifactMessagesItem +from .assistant_activation import AssistantActivation +from .node_artifact import NodeArtifact +from .open_ai_message import OpenAiMessage +from .performance_metrics import PerformanceMetrics +from .recording import Recording -class Artifact(UniversalBaseModel): +class Artifact(UncheckedBaseModel): messages: typing.Optional[typing.List[ArtifactMessagesItem]] = pydantic.Field(default=None) """ These are the messages that were spoken during the call. """ messages_open_ai_formatted: typing_extensions.Annotated[ - typing.Optional[typing.List[OpenAiMessage]], FieldMetadata(alias="messagesOpenAIFormatted") - ] = pydantic.Field(default=None) - """ - These are the messages that were spoken during the call, formatted for OpenAI. - """ - - recording_url: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="recordingUrl")] = ( - pydantic.Field(default=None) - ) + typing.Optional[typing.List[OpenAiMessage]], + FieldMetadata(alias="messagesOpenAIFormatted"), + pydantic.Field( + alias="messagesOpenAIFormatted", + description="These are the messages that were spoken during the call, formatted for OpenAI.", + ), + ] = None + recording_url: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="recordingUrl"), + pydantic.Field( + alias="recordingUrl", + description="This is the recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`.", + ), + ] = None + stereo_recording_url: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="stereoRecordingUrl"), + pydantic.Field( + alias="stereoRecordingUrl", + description="This is the stereo recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`.", + ), + ] = None + video_recording_url: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="videoRecordingUrl"), + pydantic.Field( + alias="videoRecordingUrl", + description="This is video recording url for the call. To enable, set `assistant.artifactPlan.videoRecordingEnabled`.", + ), + ] = None + video_recording_start_delay_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="videoRecordingStartDelaySeconds"), + pydantic.Field( + alias="videoRecordingStartDelaySeconds", + description="This is video recording start delay in ms. To enable, set `assistant.artifactPlan.videoRecordingEnabled`. This can be used to align the playback of the recording with artifact.messages timestamps.", + ), + ] = None + recording: typing.Optional[Recording] = pydantic.Field(default=None) """ This is the recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`. """ - stereo_recording_url: typing_extensions.Annotated[ - typing.Optional[str], FieldMetadata(alias="stereoRecordingUrl") - ] = pydantic.Field(default=None) + transcript: typing.Optional[str] = pydantic.Field(default=None) """ - This is the stereo recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`. + This is the transcript of the call. This is derived from `artifact.messages` but provided for convenience. """ - video_recording_url: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="videoRecordingUrl")] = ( - pydantic.Field(default=None) - ) + pcap_url: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="pcapUrl"), + pydantic.Field( + alias="pcapUrl", + description="This is the packet capture url for the call. This is only available for `phone` type calls where phone number's provider is `vapi` or `byo-phone-number`.", + ), + ] = None + log_url: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="logUrl"), + pydantic.Field( + alias="logUrl", + description="This is the url for the call logs. This includes all logging output during the call for debugging purposes.", + ), + ] = None + nodes: typing.Optional[typing.List[NodeArtifact]] = pydantic.Field(default=None) """ - This is video recording url for the call. To enable, set `assistant.artifactPlan.videoRecordingEnabled`. + This is the history of workflow nodes that were executed during the call. """ - video_recording_start_delay_seconds: typing_extensions.Annotated[ - typing.Optional[float], FieldMetadata(alias="videoRecordingStartDelaySeconds") - ] = pydantic.Field(default=None) + assistant_activations: typing_extensions.Annotated[ + typing.Optional[typing.List[AssistantActivation]], + FieldMetadata(alias="assistantActivations"), + pydantic.Field( + alias="assistantActivations", + description="Ordered list of assistants that were active during the call, including after transfers and handoffs.", + ), + ] = None + variable_values: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="variableValues"), + pydantic.Field( + alias="variableValues", description="These are the variable values at the end of the workflow execution." + ), + ] = None + performance_metrics: typing_extensions.Annotated[ + typing.Optional[PerformanceMetrics], + FieldMetadata(alias="performanceMetrics"), + pydantic.Field( + alias="performanceMetrics", + description="This is the performance metrics for the call. It contains the turn latency, broken down by component.", + ), + ] = None + structured_outputs: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="structuredOutputs"), + pydantic.Field( + alias="structuredOutputs", + description="These are the structured outputs that will be extracted from the call.\nTo enable, set `assistant.artifactPlan.structuredOutputIds` with the IDs of the structured outputs you want to extract.", + ), + ] = None + scorecards: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) """ - This is video recording start delay in ms. To enable, set `assistant.artifactPlan.videoRecordingEnabled`. This can be used to align the playback of the recording with artifact.messages timestamps. + These are the scorecards that have been evaluated based on the structured outputs extracted during the call. + To enable, set `assistant.artifactPlan.scorecardIds` or `assistant.artifactPlan.scorecards` with the IDs or objects of the scorecards you want to evaluate. """ - transcript: typing.Optional[str] = pydantic.Field(default=None) + transfers: typing.Optional[typing.List[str]] = pydantic.Field(default=None) """ - This is the transcript of the call. This is derived from `artifact.messages` but provided for convenience. + These are the transfer records from warm transfers, including destinations, transcripts, and status. """ + structured_outputs_last_updated_at: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="structuredOutputsLastUpdatedAt"), + pydantic.Field( + alias="structuredOutputsLastUpdatedAt", description="This is when the structured outputs were last updated" + ), + ] = None + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/vapi/types/artifact_messages_item.py b/src/vapi/types/artifact_messages_item.py index 140bb74d..24408210 100644 --- a/src/vapi/types/artifact_messages_item.py +++ b/src/vapi/types/artifact_messages_item.py @@ -1,10 +1,11 @@ # This file was auto-generated by Fern from our API Definition. import typing -from .user_message import UserMessage -from .system_message import SystemMessage + from .bot_message import BotMessage +from .system_message import SystemMessage from .tool_call_message import ToolCallMessage from .tool_call_result_message import ToolCallResultMessage +from .user_message import UserMessage ArtifactMessagesItem = typing.Union[UserMessage, SystemMessage, BotMessage, ToolCallMessage, ToolCallResultMessage] diff --git a/src/vapi/types/artifact_plan.py b/src/vapi/types/artifact_plan.py index 24da574f..faae07b5 100644 --- a/src/vapi/types/artifact_plan.py +++ b/src/vapi/types/artifact_plan.py @@ -1,64 +1,155 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions +from __future__ import annotations + import typing -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .artifact_plan_recording_format import ArtifactPlanRecordingFormat +from .create_scorecard_dto import CreateScorecardDto +from .create_structured_output_dto import CreateStructuredOutputDto from .transcript_plan import TranscriptPlan -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -class ArtifactPlan(UniversalBaseModel): - recording_enabled: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="recordingEnabled")] = ( - pydantic.Field(default=None) - ) - """ - This determines whether assistant's calls are recorded. Defaults to true. - - Usage: - - - If you don't want to record the calls, set this to false. - - If you want to record the calls when `assistant.hipaaEnabled`, explicity set this to true and make sure to provide S3 or GCP credentials on the Provider Credentials page in the Dashboard. - - You can find the recording at `call.artifact.recordingUrl` and `call.artifact.stereoRecordingUrl` after the call is ended. - - @default true - """ - +class ArtifactPlan(UncheckedBaseModel): + recording_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="recordingEnabled"), + pydantic.Field( + alias="recordingEnabled", + description="This determines whether assistant's calls are recorded. Defaults to true.\n\nUsage:\n- If you don't want to record the calls, set this to false.\n- If you want to record the calls when `assistant.hipaaEnabled` (deprecated) or `assistant.compliancePlan.hipaaEnabled` explicity set this to true and make sure to provide S3 or GCP credentials on the Provider Credentials page in the Dashboard.\n\nYou can find the recording at `call.artifact.recordingUrl` and `call.artifact.stereoRecordingUrl` after the call is ended.\n\n@default true", + ), + ] = None + recording_format: typing_extensions.Annotated[ + typing.Optional[ArtifactPlanRecordingFormat], + FieldMetadata(alias="recordingFormat"), + pydantic.Field( + alias="recordingFormat", + description="This determines the format of the recording. Defaults to `wav;l16`.\n\n@default 'wav;l16'", + ), + ] = None + recording_use_custom_storage_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="recordingUseCustomStorageEnabled"), + pydantic.Field( + alias="recordingUseCustomStorageEnabled", + description="This determines whether to use custom storage (S3 or GCP) for call recordings when storage credentials are configured.\n\nWhen set to false, recordings will be stored on Vapi's storage instead of your custom storage, even if you have custom storage credentials configured.\n\nUsage:\n- Set to false if you have custom storage configured but want to store recordings on Vapi's storage for this assistant.\n- Set to true (or leave unset) to use your custom storage for recordings when available.\n\n@default true", + ), + ] = None video_recording_enabled: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="videoRecordingEnabled") - ] = pydantic.Field(default=None) - """ - This determines whether the video is recorded during the call. Defaults to false. Only relevant for `webCall` type. - - You can find the video recording at `call.artifact.videoRecordingUrl` after the call is ended. - - @default false - """ - + typing.Optional[bool], + FieldMetadata(alias="videoRecordingEnabled"), + pydantic.Field( + alias="videoRecordingEnabled", + description="This determines whether the video is recorded during the call. Defaults to false. Only relevant for `webCall` type.\n\nYou can find the video recording at `call.artifact.videoRecordingUrl` after the call is ended.\n\n@default false", + ), + ] = None + full_message_history_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="fullMessageHistoryEnabled"), + pydantic.Field( + alias="fullMessageHistoryEnabled", + description="This determines whether the artifact contains the full message history, even after handoff context engineering. Defaults to false.", + ), + ] = None + pcap_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="pcapEnabled"), + pydantic.Field( + alias="pcapEnabled", + description="This determines whether the SIP packet capture is enabled. Defaults to true. Only relevant for `phone` type calls where phone number's provider is `vapi` or `byo-phone-number`.\n\nYou can find the packet capture at `call.artifact.pcapUrl` after the call is ended.\n\n@default true", + ), + ] = None + pcap_s_3_path_prefix: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="pcapS3PathPrefix"), + pydantic.Field( + alias="pcapS3PathPrefix", + description="This is the path where the SIP packet capture will be uploaded. This is only used if you have provided S3 or GCP credentials on the Provider Credentials page in the Dashboard.\n\nIf credential.s3PathPrefix or credential.bucketPlan.path is set, this will append to it.\n\nUsage:\n- If you want to upload the packet capture to a specific path, set this to the path. Example: `/my-assistant-captures`.\n- If you want to upload the packet capture to the root of the bucket, set this to `/`.\n\n@default '/'", + ), + ] = None + pcap_use_custom_storage_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="pcapUseCustomStorageEnabled"), + pydantic.Field( + alias="pcapUseCustomStorageEnabled", + description="This determines whether to use custom storage (S3 or GCP) for SIP packet captures when storage credentials are configured.\n\nWhen set to false, packet captures will be stored on Vapi's storage instead of your custom storage, even if you have custom storage credentials configured.\n\nUsage:\n- Set to false if you have custom storage configured but want to store packet captures on Vapi's storage for this assistant.\n- Set to true (or leave unset) to use your custom storage for packet captures when available.\n\n@default true", + ), + ] = None + logging_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="loggingEnabled"), + pydantic.Field( + alias="loggingEnabled", + description="This determines whether the call logs are enabled. Defaults to true.\n\n@default true", + ), + ] = None + logging_use_custom_storage_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="loggingUseCustomStorageEnabled"), + pydantic.Field( + alias="loggingUseCustomStorageEnabled", + description="This determines whether to use custom storage (S3 or GCP) for call logs when storage credentials are configured.\n\nWhen set to false, logs will be stored on Vapi's storage instead of your custom storage, even if you have custom storage credentials configured.\n\nUsage:\n- Set to false if you have custom storage configured but want to store logs on Vapi's storage for this assistant.\n- Set to true (or leave unset) to use your custom storage for logs when available.\n\n@default true", + ), + ] = None transcript_plan: typing_extensions.Annotated[ - typing.Optional[TranscriptPlan], FieldMetadata(alias="transcriptPlan") - ] = pydantic.Field(default=None) + typing.Optional[TranscriptPlan], + FieldMetadata(alias="transcriptPlan"), + pydantic.Field( + alias="transcriptPlan", + description="This is the plan for `call.artifact.transcript`. To disable, set `transcriptPlan.enabled` to false.", + ), + ] = None + recording_path: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="recordingPath"), + pydantic.Field( + alias="recordingPath", + description="This is the path where the recording will be uploaded. This is only used if you have provided S3 or GCP credentials on the Provider Credentials page in the Dashboard.\n\nIf credential.s3PathPrefix or credential.bucketPlan.path is set, this will append to it.\n\nUsage:\n- If you want to upload the recording to a specific path, set this to the path. Example: `/my-assistant-recordings`.\n- If you want to upload the recording to the root of the bucket, set this to `/`.\n\n@default '/'", + ), + ] = None + structured_output_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="structuredOutputIds"), + pydantic.Field( + alias="structuredOutputIds", + description="This is an array of structured output IDs to be calculated during the call.\nThe outputs will be extracted and stored in `call.artifact.structuredOutputs` after the call is ended.", + ), + ] = None + structured_outputs: typing_extensions.Annotated[ + typing.Optional[typing.List[CreateStructuredOutputDto]], + FieldMetadata(alias="structuredOutputs"), + pydantic.Field( + alias="structuredOutputs", + description="This is an array of transient structured outputs to be calculated during the call.\nThe outputs will be extracted and stored in `call.artifact.structuredOutputs` after the call is ended.\nUse this to provide inline structured output configurations instead of referencing existing ones via structuredOutputIds.", + ), + ] = None + scorecard_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="scorecardIds"), + pydantic.Field( + alias="scorecardIds", + description="This is an array of scorecard IDs that will be evaluated based on the structured outputs extracted during the call.\nThe scorecards will be evaluated and the results will be stored in `call.artifact.scorecards` after the call has ended.", + ), + ] = None + scorecards: typing.Optional[typing.List[CreateScorecardDto]] = pydantic.Field(default=None) """ - This is the plan for `call.artifact.transcript`. To disable, set `transcriptPlan.enabled` to false. + This is the array of scorecards that will be evaluated based on the structured outputs extracted during the call. + The scorecards will be evaluated and the results will be stored in `call.artifact.scorecards` after the call has ended. """ - recording_path: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="recordingPath")] = ( - pydantic.Field(default=None) - ) - """ - This is the path where the recording will be uploaded. This is only used if you have provided S3 or GCP credentials on the Provider Credentials page in the Dashboard. - - If credential.s3PathPrefix or credential.bucketPlan.path is set, this will append to it. - - Usage: - - - If you want to upload the recording to a specific path, set this to the path. Example: `/my-assistant-recordings`. - - If you want to upload the recording to the root of the bucket, set this to `/`. - - @default '/' - """ + logging_path: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="loggingPath"), + pydantic.Field( + alias="loggingPath", + description="This is the path where the call logs will be uploaded. This is only used if you have provided S3 or GCP credentials on the Provider Credentials page in the Dashboard.\n\nIf credential.s3PathPrefix or credential.bucketPlan.path is set, this will append to it.\n\nUsage:\n- If you want to upload the call logs to a specific path, set this to the path. Example: `/my-assistant-logs`.\n- If you want to upload the call logs to the root of the bucket, set this to `/`.\n\n@default '/'", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -68,3 +159,6 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +update_forward_refs(ArtifactPlan) diff --git a/src/vapi/types/artifact_plan_recording_format.py b/src/vapi/types/artifact_plan_recording_format.py new file mode 100644 index 00000000..ed15bfbe --- /dev/null +++ b/src/vapi/types/artifact_plan_recording_format.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ArtifactPlanRecordingFormat = typing.Union[typing.Literal["wav;l16", "mp3"], typing.Any] diff --git a/src/vapi/types/assembly_ai_credential.py b/src/vapi/types/assembly_ai_credential.py new file mode 100644 index 00000000..47be4ed4 --- /dev/null +++ b/src/vapi/types/assembly_ai_credential.py @@ -0,0 +1,60 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .assembly_ai_credential_provider import AssemblyAiCredentialProvider + + +class AssemblyAiCredential(UncheckedBaseModel): + provider: AssemblyAiCredentialProvider + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + id: str = pydantic.Field() + """ + This is the unique identifier for the credential. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/assembly_ai_credential_provider.py b/src/vapi/types/assembly_ai_credential_provider.py new file mode 100644 index 00000000..ea91b1a6 --- /dev/null +++ b/src/vapi/types/assembly_ai_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +AssemblyAiCredentialProvider = typing.Union[typing.Literal["assembly-ai"], typing.Any] diff --git a/src/vapi/types/assembly_ai_transcriber.py b/src/vapi/types/assembly_ai_transcriber.py new file mode 100644 index 00000000..f105f49e --- /dev/null +++ b/src/vapi/types/assembly_ai_transcriber.py @@ -0,0 +1,129 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .assembly_ai_transcriber_language import AssemblyAiTranscriberLanguage +from .assembly_ai_transcriber_speech_model import AssemblyAiTranscriberSpeechModel +from .fallback_transcriber_plan import FallbackTranscriberPlan + + +class AssemblyAiTranscriber(UncheckedBaseModel): + language: typing.Optional[AssemblyAiTranscriberLanguage] = pydantic.Field(default=None) + """ + This is the language that will be set for the transcription. + """ + + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="confidenceThreshold"), + pydantic.Field( + alias="confidenceThreshold", + description="Transcripts below this confidence threshold will be discarded.\n\n@default 0.4", + ), + ] = None + format_turns: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="formatTurns"), + pydantic.Field(alias="formatTurns", description="This enables formatting of transcripts.\n\n@default true"), + ] = None + end_of_turn_confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="endOfTurnConfidenceThreshold"), + pydantic.Field( + alias="endOfTurnConfidenceThreshold", + description="This is the end of turn confidence threshold. The minimum confidence that the end of turn is detected.\nNote: Only used if startSpeakingPlan.smartEndpointingPlan is not set.\n@min 0\n@max 1\n@default 0.7", + ), + ] = None + min_end_of_turn_silence_when_confident: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minEndOfTurnSilenceWhenConfident"), + pydantic.Field( + alias="minEndOfTurnSilenceWhenConfident", + description="This is the minimum end of turn silence when confident in milliseconds.\nNote: Only used if startSpeakingPlan.smartEndpointingPlan is not set.\n@default 160", + ), + ] = None + word_finalization_max_wait_time: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="wordFinalizationMaxWaitTime"), + pydantic.Field(alias="wordFinalizationMaxWaitTime"), + ] = None + max_turn_silence: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="maxTurnSilence"), + pydantic.Field( + alias="maxTurnSilence", + description="This is the maximum turn silence time in milliseconds.\nNote: Only used if startSpeakingPlan.smartEndpointingPlan is not set.\n@default 400", + ), + ] = None + vad_assisted_endpointing_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="vadAssistedEndpointingEnabled"), + pydantic.Field( + alias="vadAssistedEndpointingEnabled", + description="Use VAD to assist with endpointing decisions from the transcriber.\nWhen enabled, transcriber endpointing will be buffered if VAD detects the user is still speaking, preventing premature turn-taking.\nWhen disabled, transcriber endpointing will be used immediately regardless of VAD state, allowing for quicker but more aggressive turn-taking.\nNote: Only used if startSpeakingPlan.smartEndpointingPlan is not set.\n\n@default true", + ), + ] = None + speech_model: typing_extensions.Annotated[ + typing.Optional[AssemblyAiTranscriberSpeechModel], + FieldMetadata(alias="speechModel"), + pydantic.Field( + alias="speechModel", + description="This is the speech model used for the streaming session.\nNote: Keyterms prompting is not supported with multilingual streaming.\n@default 'universal-streaming-english'", + ), + ] = None + realtime_url: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="realtimeUrl"), + pydantic.Field(alias="realtimeUrl", description="The WebSocket URL that the transcriber connects to."), + ] = None + word_boost: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="wordBoost"), + pydantic.Field(alias="wordBoost", description="Add up to 2500 characters of custom vocabulary."), + ] = None + keyterms_prompt: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="keytermsPrompt"), + pydantic.Field( + alias="keytermsPrompt", + description="Keyterms prompting improves recognition accuracy for specific words and phrases.\nCan include up to 100 keyterms, each up to 50 characters.\nCosts an additional $0.04/hour when enabled.", + ), + ] = None + end_utterance_silence_threshold: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="endUtteranceSilenceThreshold"), + pydantic.Field( + alias="endUtteranceSilenceThreshold", + description="The duration of the end utterance silence threshold in milliseconds.", + ), + ] = None + disable_partial_transcripts: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="disablePartialTranscripts"), + pydantic.Field( + alias="disablePartialTranscripts", + description="Disable partial transcripts.\nSet to `true` to not receive partial transcripts. Defaults to `false`.", + ), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field( + alias="fallbackPlan", + description="This is the plan for transcriber provider fallbacks in the event that the primary transcriber provider fails.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/assembly_ai_transcriber_language.py b/src/vapi/types/assembly_ai_transcriber_language.py new file mode 100644 index 00000000..e4fd15c1 --- /dev/null +++ b/src/vapi/types/assembly_ai_transcriber_language.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +AssemblyAiTranscriberLanguage = typing.Union[typing.Literal["multi", "en"], typing.Any] diff --git a/src/vapi/types/assembly_ai_transcriber_speech_model.py b/src/vapi/types/assembly_ai_transcriber_speech_model.py new file mode 100644 index 00000000..09078345 --- /dev/null +++ b/src/vapi/types/assembly_ai_transcriber_speech_model.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +AssemblyAiTranscriberSpeechModel = typing.Union[ + typing.Literal["universal-streaming-english", "universal-streaming-multilingual"], typing.Any +] diff --git a/src/vapi/types/assignment_mutation.py b/src/vapi/types/assignment_mutation.py deleted file mode 100644 index fc7656ea..00000000 --- a/src/vapi/types/assignment_mutation.py +++ /dev/null @@ -1,85 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from ..core.pydantic_utilities import UniversalBaseModel -import typing -from .assignment_mutation_conditions_item import AssignmentMutationConditionsItem -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 - - -class AssignmentMutation(UniversalBaseModel): - conditions: typing.Optional[typing.List[AssignmentMutationConditionsItem]] = pydantic.Field(default=None) - """ - This is an optional array of conditions that must be met for this mutation to be triggered. - """ - - type: typing.Literal["assignment"] = pydantic.Field(default="assignment") - """ - This mutation assigns a new value to an existing or new variable. - """ - - variable: str = pydantic.Field() - """ - This is the variable to assign a new value to. - - You can reference any variable in the context of the current block execution (step): - - - "output.your-property-name" for current step's output - - "your-step-name.output.your-property-name" for another step's output (in the same workflow; read caveat #1) - - "your-block-name.output.your-property-name" for another block's output (in the same workflow; read caveat #2) - - "global.your-property-name" for the global context - - This needs to be the key path of the variable. If you use {{}}, it'll dereference that to the value of the variable before assignment. This can be useful if the path is dynamic. Example: - - - "global.{{my-tool-call-step.output.my-key-name}}" - - You can also string interpolate multiple variables to get the key name: - - - "global.{{my-tool-call-step.output.my-key-name-suffix}}-{{my-tool-call-step.output.my-key-name}}" - - The path to the new variable is created if it doesn't exist. Example: - - - "global.this-does-not-exist.neither-does-this" will create `this-does-not-exist` object with `neither-does-this` as a key - - Caveats: - - 1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.output.propertyName}} will reference the latest usage of the step. - 2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.output.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow. - """ - - value: str = pydantic.Field() - """ - The value to assign to the variable. - - You can reference any variable in the context of the current block execution (step): - - - "{{output.your-property-name}}" for current step's output - - "{{your-step-name.output.your-property-name}}" for another step's output (in the same workflow; read caveat #1) - - "{{your-block-name.output.your-property-name}}" for another block's output (in the same workflow; read caveat #2) - - "{{global.your-property-name}}" for the global context - - Or, you can use a constant: - - - "1" - - "text" - - "true" - - "false" - - Or, you can mix and match with string interpolation: - - - "{{your-property-name}}-{{input.your-property-name-2}}-1" - - Caveats: - - 1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.output.propertyName}} will reference the latest usage of the step. - 2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.output.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/vapi/types/assignment_mutation_conditions_item.py b/src/vapi/types/assignment_mutation_conditions_item.py deleted file mode 100644 index 36d05c0b..00000000 --- a/src/vapi/types/assignment_mutation_conditions_item.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from .model_based_condition import ModelBasedCondition -from .rule_based_condition import RuleBasedCondition - -AssignmentMutationConditionsItem = typing.Union[ModelBasedCondition, RuleBasedCondition] diff --git a/src/vapi/types/assistant.py b/src/vapi/types/assistant.py index c2c7fb97..896bc9af 100644 --- a/src/vapi/types/assistant.py +++ b/src/vapi/types/assistant.py @@ -1,35 +1,39 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -from .callback_step import CallbackStep -from .create_workflow_block_dto import CreateWorkflowBlockDto -from .handoff_step import HandoffStep + +import datetime as dt import typing -from .assistant_transcriber import AssistantTranscriber + import pydantic -from .assistant_model import AssistantModel -from .assistant_voice import AssistantVoice import typing_extensions -from .assistant_first_message_mode import AssistantFirstMessageMode +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.serialization import FieldMetadata -from .assistant_client_messages_item import AssistantClientMessagesItem -from .assistant_server_messages_item import AssistantServerMessagesItem -from .assistant_background_sound import AssistantBackgroundSound -from .transport_configuration_twilio import TransportConfigurationTwilio -from .twilio_voicemail_detection import TwilioVoicemailDetection +from ..core.unchecked_base_model import UncheckedBaseModel from .analysis_plan import AnalysisPlan from .artifact_plan import ArtifactPlan -from .message_plan import MessagePlan +from .assistant_background_sound import AssistantBackgroundSound +from .assistant_client_messages_item import AssistantClientMessagesItem +from .assistant_credentials_item import AssistantCredentialsItem +from .assistant_first_message_mode import AssistantFirstMessageMode +from .assistant_hooks_item import AssistantHooksItem +from .assistant_model import AssistantModel +from .assistant_server_messages_item import AssistantServerMessagesItem +from .assistant_transcriber import AssistantTranscriber +from .assistant_voice import AssistantVoice +from .assistant_voicemail_detection import AssistantVoicemailDetection +from .background_speech_denoising_plan import BackgroundSpeechDenoisingPlan +from .compliance_plan import CompliancePlan +from .keypad_input_plan import KeypadInputPlan +from .langfuse_observability_plan import LangfuseObservabilityPlan +from .monitor_plan import MonitorPlan +from .server import Server from .start_speaking_plan import StartSpeakingPlan from .stop_speaking_plan import StopSpeakingPlan -from .monitor_plan import MonitorPlan -import datetime as dt -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.pydantic_utilities import update_forward_refs +from .transport_configuration_twilio import TransportConfigurationTwilio -class Assistant(UniversalBaseModel): +class Assistant(UncheckedBaseModel): transcriber: typing.Optional[AssistantTranscriber] = pydantic.Field(default=None) """ These are the options for the assistant's transcriber. @@ -45,105 +49,99 @@ class Assistant(UniversalBaseModel): These are the options for the assistant's voice. """ + first_message: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="firstMessage"), + pydantic.Field( + alias="firstMessage", + description="This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.).\n\nIf unspecified, assistant will wait for user to speak and use the model to respond once they speak.", + ), + ] = None + first_message_interruptions_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="firstMessageInterruptionsEnabled"), + pydantic.Field(alias="firstMessageInterruptionsEnabled"), + ] = None first_message_mode: typing_extensions.Annotated[ - typing.Optional[AssistantFirstMessageMode], FieldMetadata(alias="firstMessageMode") - ] = pydantic.Field(default=None) - """ - This is the mode for the first message. Default is 'assistant-speaks-first'. - - Use: - - - 'assistant-speaks-first' to have the assistant speak first. - - 'assistant-waits-for-user' to have the assistant wait for the user to speak first. - - 'assistant-speaks-first-with-model-generated-message' to have the assistant speak first with a message generated by the model based on the conversation state. (`assistant.model.messages` at call start, `call.messages` at squad transfer points). - - @default 'assistant-speaks-first' - """ - - hipaa_enabled: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="hipaaEnabled")] = ( - pydantic.Field(default=None) - ) - """ - When this is enabled, no logs, recordings, or transcriptions will be stored. At the end of the call, you will still receive an end-of-call-report message to store on your server. Defaults to false. - """ - + typing.Optional[AssistantFirstMessageMode], + FieldMetadata(alias="firstMessageMode"), + pydantic.Field( + alias="firstMessageMode", + description="This is the mode for the first message. Default is 'assistant-speaks-first'.\n\nUse:\n- 'assistant-speaks-first' to have the assistant speak first.\n- 'assistant-waits-for-user' to have the assistant wait for the user to speak first.\n- 'assistant-speaks-first-with-model-generated-message' to have the assistant speak first with a message generated by the model based on the conversation state. (`assistant.model.messages` at call start, `call.messages` at squad transfer points).\n\n@default 'assistant-speaks-first'", + ), + ] = None + voicemail_detection: typing_extensions.Annotated[ + typing.Optional[AssistantVoicemailDetection], + FieldMetadata(alias="voicemailDetection"), + pydantic.Field( + alias="voicemailDetection", + description="These are the settings to configure or disable voicemail detection. Alternatively, voicemail detection can be configured using the model.tools=[VoicemailTool].\nBy default, voicemail detection is disabled.", + ), + ] = None client_messages: typing_extensions.Annotated[ - typing.Optional[typing.List[AssistantClientMessagesItem]], FieldMetadata(alias="clientMessages") - ] = pydantic.Field(default=None) - """ - These are the messages that will be sent to your Client SDKs. Default is conversation-update,function-call,hang,model-output,speech-update,status-update,transcript,tool-calls,user-interrupted,voice-input. You can check the shape of the messages in ClientMessage schema. - """ - + typing.Optional[typing.List[AssistantClientMessagesItem]], + FieldMetadata(alias="clientMessages"), + pydantic.Field( + alias="clientMessages", + description="These are the messages that will be sent to your Client SDKs. Default is conversation-update,function-call,hang,model-output,speech-update,status-update,transfer-update,transcript,tool-calls,user-interrupted,voice-input,workflow.node.started,assistant.started. You can check the shape of the messages in ClientMessage schema.", + ), + ] = None server_messages: typing_extensions.Annotated[ - typing.Optional[typing.List[AssistantServerMessagesItem]], FieldMetadata(alias="serverMessages") - ] = pydantic.Field(default=None) - """ - These are the messages that will be sent to your Server URL. Default is conversation-update,end-of-call-report,function-call,hang,speech-update,status-update,tool-calls,transfer-destination-request,user-interrupted. You can check the shape of the messages in ServerMessage schema. - """ - - silence_timeout_seconds: typing_extensions.Annotated[ - typing.Optional[float], FieldMetadata(alias="silenceTimeoutSeconds") - ] = pydantic.Field(default=None) - """ - How many seconds of silence to wait before ending the call. Defaults to 30. - - @default 30 - """ - + typing.Optional[typing.List[AssistantServerMessagesItem]], + FieldMetadata(alias="serverMessages"), + pydantic.Field( + alias="serverMessages", + description="These are the messages that will be sent to your Server URL. Default is conversation-update,end-of-call-report,function-call,hang,speech-update,status-update,tool-calls,transfer-destination-request,handoff-destination-request,user-interrupted,assistant.started. You can check the shape of the messages in ServerMessage schema.", + ), + ] = None max_duration_seconds: typing_extensions.Annotated[ - typing.Optional[float], FieldMetadata(alias="maxDurationSeconds") - ] = pydantic.Field(default=None) - """ - This is the maximum number of seconds that the call will last. When the call reaches this duration, it will be ended. - - @default 600 (10 minutes) - """ - + typing.Optional[float], + FieldMetadata(alias="maxDurationSeconds"), + pydantic.Field( + alias="maxDurationSeconds", + description="This is the maximum number of seconds that the call will last. When the call reaches this duration, it will be ended.\n\n@default 600 (10 minutes)", + ), + ] = None background_sound: typing_extensions.Annotated[ - typing.Optional[AssistantBackgroundSound], FieldMetadata(alias="backgroundSound") - ] = pydantic.Field(default=None) - """ - This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'. - """ - - backchanneling_enabled: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="backchannelingEnabled") - ] = pydantic.Field(default=None) - """ - This determines whether the model says 'mhmm', 'ahem' etc. while user is speaking. - - Default `false` while in beta. - - @default false - """ - - background_denoising_enabled: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="backgroundDenoisingEnabled") - ] = pydantic.Field(default=None) - """ - This enables filtering of noise and background speech while the user is talking. - - Default `false` while in beta. - - @default false - """ - + typing.Optional[AssistantBackgroundSound], + FieldMetadata(alias="backgroundSound"), + pydantic.Field( + alias="backgroundSound", + description="This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'.\nYou can also provide a custom sound by providing a URL to an audio file.", + ), + ] = None model_output_in_messages_enabled: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="modelOutputInMessagesEnabled") - ] = pydantic.Field(default=None) + typing.Optional[bool], + FieldMetadata(alias="modelOutputInMessagesEnabled"), + pydantic.Field( + alias="modelOutputInMessagesEnabled", + description="This determines whether the model's output is used in conversation history rather than the transcription of assistant's speech.\n\n@default false", + ), + ] = None + transport_configurations: typing_extensions.Annotated[ + typing.Optional[typing.List[TransportConfigurationTwilio]], + FieldMetadata(alias="transportConfigurations"), + pydantic.Field( + alias="transportConfigurations", + description="These are the configurations to be passed to the transport providers of assistant's calls, like Twilio. You can store multiple configurations for different transport providers. For a call, only the configuration matching the call transport provider is used.", + ), + ] = None + observability_plan: typing_extensions.Annotated[ + typing.Optional[LangfuseObservabilityPlan], + FieldMetadata(alias="observabilityPlan"), + pydantic.Field( + alias="observabilityPlan", + description="This is the plan for observability of assistant's calls.\n\nCurrently, only Langfuse is supported.", + ), + ] = None + credentials: typing.Optional[typing.List[AssistantCredentialsItem]] = pydantic.Field(default=None) """ - This determines whether the model's output is used in conversation history rather than the transcription of assistant's speech. - - Default `false` while in beta. - - @default false + These are dynamic credentials that will be used for the assistant calls. By default, all the credentials are available for use in the call but you can supplement an additional credentials using this. Dynamic credentials override existing credentials. """ - transport_configurations: typing_extensions.Annotated[ - typing.Optional[typing.List[TransportConfigurationTwilio]], FieldMetadata(alias="transportConfigurations") - ] = pydantic.Field(default=None) + hooks: typing.Optional[typing.List[AssistantHooksItem]] = pydantic.Field(default=None) """ - These are the configurations to be passed to the transport providers of assistant's calls, like Twilio. You can store multiple configurations for different transport providers. For a call, only the configuration matching the call transport provider is used. + This is a set of actions that will be performed on certain events. """ name: typing.Optional[str] = pydantic.Field(default=None) @@ -153,167 +151,137 @@ class Assistant(UniversalBaseModel): This is required when you want to transfer between assistants in a call. """ - first_message: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="firstMessage")] = ( - pydantic.Field(default=None) - ) - """ - This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.). - - If unspecified, assistant will wait for user to speak and use the model to respond once they speak. - """ - - voicemail_detection: typing_extensions.Annotated[ - typing.Optional[TwilioVoicemailDetection], FieldMetadata(alias="voicemailDetection") - ] = pydantic.Field(default=None) - """ - These are the settings to configure or disable voicemail detection. Alternatively, voicemail detection can be configured using the model.tools=[VoicemailTool]. - This uses Twilio's built-in detection while the VoicemailTool relies on the model to detect if a voicemail was reached. - You can use neither of them, one of them, or both of them. By default, Twilio built-in detection is enabled while VoicemailTool is not. - """ - - voicemail_message: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="voicemailMessage")] = ( - pydantic.Field(default=None) - ) - """ - This is the message that the assistant will say if the call is forwarded to voicemail. - - If unspecified, it will hang up. - """ - - end_call_message: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="endCallMessage")] = ( - pydantic.Field(default=None) - ) - """ - This is the message that the assistant will say if it ends the call. - - If unspecified, it will hang up without saying anything. - """ - + voicemail_message: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="voicemailMessage"), + pydantic.Field( + alias="voicemailMessage", + description="This is the message that the assistant will say if the call is forwarded to voicemail.\n\nIf unspecified, it will hang up.", + ), + ] = None + end_call_message: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="endCallMessage"), + pydantic.Field( + alias="endCallMessage", + description="This is the message that the assistant will say if it ends the call.\n\nIf unspecified, it will hang up without saying anything.", + ), + ] = None end_call_phrases: typing_extensions.Annotated[ - typing.Optional[typing.List[str]], FieldMetadata(alias="endCallPhrases") - ] = pydantic.Field(default=None) - """ - This list contains phrases that, if spoken by the assistant, will trigger the call to be hung up. Case insensitive. - """ - - metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None) + typing.Optional[typing.List[str]], + FieldMetadata(alias="endCallPhrases"), + pydantic.Field( + alias="endCallPhrases", + description="This list contains phrases that, if spoken by the assistant, will trigger the call to be hung up. Case insensitive.", + ), + ] = None + compliance_plan: typing_extensions.Annotated[ + typing.Optional[CompliancePlan], FieldMetadata(alias="compliancePlan"), pydantic.Field(alias="compliancePlan") + ] = None + metadata: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) """ This is for metadata you want to store on the assistant. """ - server_url: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="serverUrl")] = pydantic.Field( - default=None - ) - """ - This is the URL Vapi will communicate with via HTTP GET and POST Requests. This is used for retrieving context, function calling, and end-of-call reports. - - All requests will be sent with the call object among other things relevant to that message. You can find more details in the Server URL documentation. - - This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: tool.server.url > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl - """ - - server_url_secret: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="serverUrlSecret")] = ( - pydantic.Field(default=None) - ) - """ - This is the secret you can set that Vapi will send with every request to your server. Will be sent as a header called x-vapi-secret. - - Same precedence logic as serverUrl. - """ - - analysis_plan: typing_extensions.Annotated[typing.Optional[AnalysisPlan], FieldMetadata(alias="analysisPlan")] = ( - pydantic.Field(default=None) - ) - """ - This is the plan for analysis of assistant's calls. Stored in `call.analysis`. - """ - - artifact_plan: typing_extensions.Annotated[typing.Optional[ArtifactPlan], FieldMetadata(alias="artifactPlan")] = ( - pydantic.Field(default=None) - ) - """ - This is the plan for artifacts generated during assistant's calls. Stored in `call.artifact`. - - Note: `recordingEnabled` is currently at the root level. It will be moved to `artifactPlan` in the future, but will remain backwards compatible. - """ - - message_plan: typing_extensions.Annotated[typing.Optional[MessagePlan], FieldMetadata(alias="messagePlan")] = ( - pydantic.Field(default=None) - ) - """ - This is the plan for static predefined messages that can be spoken by the assistant during the call, like `idleMessages`. - - Note: `firstMessage`, `voicemailMessage`, and `endCallMessage` are currently at the root level. They will be moved to `messagePlan` in the future, but will remain backwards compatible. - """ - + background_speech_denoising_plan: typing_extensions.Annotated[ + typing.Optional[BackgroundSpeechDenoisingPlan], + FieldMetadata(alias="backgroundSpeechDenoisingPlan"), + pydantic.Field( + alias="backgroundSpeechDenoisingPlan", + description="This enables filtering of noise and background speech while the user is talking.\n\nFeatures:\n- Smart denoising using Krisp\n- Fourier denoising\n\nSmart denoising can be combined with or used independently of Fourier denoising.\n\nOrder of precedence:\n- Smart denoising\n- Fourier denoising", + ), + ] = None + analysis_plan: typing_extensions.Annotated[ + typing.Optional[AnalysisPlan], + FieldMetadata(alias="analysisPlan"), + pydantic.Field( + alias="analysisPlan", + description="This is the plan for analysis of assistant's calls. Stored in `call.analysis`.", + ), + ] = None + artifact_plan: typing_extensions.Annotated[ + typing.Optional[ArtifactPlan], + FieldMetadata(alias="artifactPlan"), + pydantic.Field( + alias="artifactPlan", + description="This is the plan for artifacts generated during assistant's calls. Stored in `call.artifact`.", + ), + ] = None start_speaking_plan: typing_extensions.Annotated[ - typing.Optional[StartSpeakingPlan], FieldMetadata(alias="startSpeakingPlan") - ] = pydantic.Field(default=None) - """ - This is the plan for when the assistant should start talking. - - You should configure this if you're running into these issues: - - - The assistant is too slow to start talking after the customer is done speaking. - - The assistant is too fast to start talking after the customer is done speaking. - - The assistant is so fast that it's actually interrupting the customer. - """ - + typing.Optional[StartSpeakingPlan], + FieldMetadata(alias="startSpeakingPlan"), + pydantic.Field( + alias="startSpeakingPlan", + description="This is the plan for when the assistant should start talking.\n\nYou should configure this if you're running into these issues:\n- The assistant is too slow to start talking after the customer is done speaking.\n- The assistant is too fast to start talking after the customer is done speaking.\n- The assistant is so fast that it's actually interrupting the customer.", + ), + ] = None stop_speaking_plan: typing_extensions.Annotated[ - typing.Optional[StopSpeakingPlan], FieldMetadata(alias="stopSpeakingPlan") - ] = pydantic.Field(default=None) - """ - This is the plan for when assistant should stop talking on customer interruption. - - You should configure this if you're running into these issues: - - - The assistant is too slow to recognize customer's interruption. - - The assistant is too fast to recognize customer's interruption. - - The assistant is getting interrupted by phrases that are just acknowledgments. - - The assistant is getting interrupted by background noises. - - The assistant is not properly stopping -- it starts talking right after getting interrupted. - """ - - monitor_plan: typing_extensions.Annotated[typing.Optional[MonitorPlan], FieldMetadata(alias="monitorPlan")] = ( - pydantic.Field(default=None) - ) - """ - This is the plan for real-time monitoring of the assistant's calls. - - Usage: + typing.Optional[StopSpeakingPlan], + FieldMetadata(alias="stopSpeakingPlan"), + pydantic.Field( + alias="stopSpeakingPlan", + description="This is the plan for when assistant should stop talking on customer interruption.\n\nYou should configure this if you're running into these issues:\n- The assistant is too slow to recognize customer's interruption.\n- The assistant is too fast to recognize customer's interruption.\n- The assistant is getting interrupted by phrases that are just acknowledgments.\n- The assistant is getting interrupted by background noises.\n- The assistant is not properly stopping -- it starts talking right after getting interrupted.", + ), + ] = None + monitor_plan: typing_extensions.Annotated[ + typing.Optional[MonitorPlan], + FieldMetadata(alias="monitorPlan"), + pydantic.Field( + alias="monitorPlan", + description="This is the plan for real-time monitoring of the assistant's calls.\n\nUsage:\n- To enable live listening of the assistant's calls, set `monitorPlan.listenEnabled` to `true`.\n- To enable live control of the assistant's calls, set `monitorPlan.controlEnabled` to `true`.\n- To attach monitors to the assistant, set `monitorPlan.monitorIds` to the set of monitor ids.", + ), + ] = None + credential_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="credentialIds"), + pydantic.Field( + alias="credentialIds", + description="These are the credentials that will be used for the assistant calls. By default, all the credentials are available for use in the call but you can provide a subset using this.", + ), + ] = None + server: typing.Optional[Server] = pydantic.Field(default=None) + """ + This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema. - - To enable live listening of the assistant's calls, set `monitorPlan.listenEnabled` to `true`. - - To enable live control of the assistant's calls, set `monitorPlan.controlEnabled` to `true`. + The order of precedence is: - Note, `serverMessages`, `clientMessages`, `serverUrl` and `serverUrlSecret` are currently at the root level but will be moved to `monitorPlan` in the future. Will remain backwards compatible - """ - - credential_ids: typing_extensions.Annotated[ - typing.Optional[typing.List[str]], FieldMetadata(alias="credentialIds") - ] = pydantic.Field(default=None) - """ - These are the credentials that will be used for the assistant calls. By default, all the credentials are available for use in the call but you can provide a subset using this. + 1. assistant.server.url + 2. phoneNumber.serverUrl + 3. org.serverUrl """ + keypad_input_plan: typing_extensions.Annotated[ + typing.Optional[KeypadInputPlan], + FieldMetadata(alias="keypadInputPlan"), + pydantic.Field(alias="keypadInputPlan"), + ] = None id: str = pydantic.Field() """ This is the unique identifier for the assistant. """ - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field() - """ - This is the unique identifier for the org that this assistant belongs to. - """ - - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the assistant was created. - """ - - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the assistant was last updated. - """ + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this assistant belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the assistant was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -325,6 +293,4 @@ class Config: extra = pydantic.Extra.allow -update_forward_refs(CallbackStep, Assistant=Assistant) -update_forward_refs(CreateWorkflowBlockDto, Assistant=Assistant) -update_forward_refs(HandoffStep, Assistant=Assistant) +update_forward_refs(Assistant) diff --git a/src/vapi/types/assistant_activation.py b/src/vapi/types/assistant_activation.py new file mode 100644 index 00000000..ed28a94f --- /dev/null +++ b/src/vapi/types/assistant_activation.py @@ -0,0 +1,35 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AssistantActivation(UncheckedBaseModel): + assistant_name: typing_extensions.Annotated[ + str, + FieldMetadata(alias="assistantName"), + pydantic.Field( + alias="assistantName", description="This is the name of the assistant that was active during the call." + ), + ] + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assistantId"), + pydantic.Field( + alias="assistantId", description="This is the ID of the assistant that was active during the call." + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/assistant_background_sound.py b/src/vapi/types/assistant_background_sound.py index 147d11cc..b7cb5f44 100644 --- a/src/vapi/types/assistant_background_sound.py +++ b/src/vapi/types/assistant_background_sound.py @@ -2,4 +2,6 @@ import typing -AssistantBackgroundSound = typing.Union[typing.Literal["off", "office"], typing.Any] +from .assistant_background_sound_zero import AssistantBackgroundSoundZero + +AssistantBackgroundSound = typing.Union[AssistantBackgroundSoundZero, str] diff --git a/src/vapi/types/assistant_background_sound_zero.py b/src/vapi/types/assistant_background_sound_zero.py new file mode 100644 index 00000000..10948de6 --- /dev/null +++ b/src/vapi/types/assistant_background_sound_zero.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +AssistantBackgroundSoundZero = typing.Union[typing.Literal["off", "office"], typing.Any] diff --git a/src/vapi/types/assistant_client_messages_item.py b/src/vapi/types/assistant_client_messages_item.py index c76465b6..530264b8 100644 --- a/src/vapi/types/assistant_client_messages_item.py +++ b/src/vapi/types/assistant_client_messages_item.py @@ -5,6 +5,7 @@ AssistantClientMessagesItem = typing.Union[ typing.Literal[ "conversation-update", + "assistant.speechStarted", "function-call", "function-call-result", "hang", @@ -16,8 +17,12 @@ "transcript", "tool-calls", "tool-calls-result", + "tool.completed", + "transfer-update", "user-interrupted", "voice-input", + "workflow.node.started", + "assistant.started", ], typing.Any, ] diff --git a/src/vapi/types/assistant_credentials_item.py b/src/vapi/types/assistant_credentials_item.py new file mode 100644 index 00000000..97af4b97 --- /dev/null +++ b/src/vapi/types/assistant_credentials_item.py @@ -0,0 +1,1070 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .azure_blob_storage_bucket_plan import AzureBlobStorageBucketPlan +from .bucket_plan import BucketPlan +from .cloudflare_r_2_bucket_plan import CloudflareR2BucketPlan +from .create_anthropic_bedrock_credential_dto_authentication_plan import ( + CreateAnthropicBedrockCredentialDtoAuthenticationPlan, +) +from .create_anthropic_bedrock_credential_dto_region import CreateAnthropicBedrockCredentialDtoRegion +from .create_azure_credential_dto_region import CreateAzureCredentialDtoRegion +from .create_azure_credential_dto_service import CreateAzureCredentialDtoService +from .create_azure_open_ai_credential_dto_models_item import CreateAzureOpenAiCredentialDtoModelsItem +from .create_azure_open_ai_credential_dto_region import CreateAzureOpenAiCredentialDtoRegion +from .create_custom_credential_dto_authentication_plan import CreateCustomCredentialDtoAuthenticationPlan +from .create_custom_credential_dto_encryption_plan import CreateCustomCredentialDtoEncryptionPlan +from .create_webhook_credential_dto_authentication_plan import CreateWebhookCredentialDtoAuthenticationPlan +from .gcp_key import GcpKey +from .o_auth_2_authentication_plan import OAuth2AuthenticationPlan +from .oauth_2_authentication_session import Oauth2AuthenticationSession +from .sbc_configuration import SbcConfiguration +from .sip_trunk_gateway import SipTrunkGateway +from .sip_trunk_outbound_authentication_plan import SipTrunkOutboundAuthenticationPlan +from .supabase_bucket_plan import SupabaseBucketPlan + + +class AssistantCredentialsItem_11Labs(UncheckedBaseModel): + provider: typing.Literal["11labs"] = "11labs" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_Anthropic(UncheckedBaseModel): + provider: typing.Literal["anthropic"] = "anthropic" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_AnthropicBedrock(UncheckedBaseModel): + provider: typing.Literal["anthropic-bedrock"] = "anthropic-bedrock" + region: CreateAnthropicBedrockCredentialDtoRegion + authentication_plan: typing_extensions.Annotated[ + CreateAnthropicBedrockCredentialDtoAuthenticationPlan, + FieldMetadata(alias="authenticationPlan"), + pydantic.Field(alias="authenticationPlan"), + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_Anyscale(UncheckedBaseModel): + provider: typing.Literal["anyscale"] = "anyscale" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_AssemblyAi(UncheckedBaseModel): + provider: typing.Literal["assembly-ai"] = "assembly-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_AzureOpenai(UncheckedBaseModel): + provider: typing.Literal["azure-openai"] = "azure-openai" + region: CreateAzureOpenAiCredentialDtoRegion + models: typing.List[CreateAzureOpenAiCredentialDtoModelsItem] + open_ai_key: typing_extensions.Annotated[str, FieldMetadata(alias="openAIKey"), pydantic.Field(alias="openAIKey")] + ocp_apim_subscription_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="ocpApimSubscriptionKey"), + pydantic.Field(alias="ocpApimSubscriptionKey"), + ] = None + open_ai_endpoint: typing_extensions.Annotated[ + str, FieldMetadata(alias="openAIEndpoint"), pydantic.Field(alias="openAIEndpoint") + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_Azure(UncheckedBaseModel): + provider: typing.Literal["azure"] = "azure" + service: CreateAzureCredentialDtoService + region: typing.Optional[CreateAzureCredentialDtoRegion] = None + api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey") + ] = None + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="fallbackIndex"), pydantic.Field(alias="fallbackIndex") + ] = None + bucket_plan: typing_extensions.Annotated[ + typing.Optional[AzureBlobStorageBucketPlan], + FieldMetadata(alias="bucketPlan"), + pydantic.Field(alias="bucketPlan"), + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_ByoSipTrunk(UncheckedBaseModel): + provider: typing.Literal["byo-sip-trunk"] = "byo-sip-trunk" + gateways: typing.List[SipTrunkGateway] + outbound_authentication_plan: typing_extensions.Annotated[ + typing.Optional[SipTrunkOutboundAuthenticationPlan], + FieldMetadata(alias="outboundAuthenticationPlan"), + pydantic.Field(alias="outboundAuthenticationPlan"), + ] = None + outbound_leading_plus_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="outboundLeadingPlusEnabled"), + pydantic.Field(alias="outboundLeadingPlusEnabled"), + ] = None + tech_prefix: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="techPrefix"), pydantic.Field(alias="techPrefix") + ] = None + sip_diversion_header: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipDiversionHeader"), pydantic.Field(alias="sipDiversionHeader") + ] = None + sbc_configuration: typing_extensions.Annotated[ + typing.Optional[SbcConfiguration], + FieldMetadata(alias="sbcConfiguration"), + pydantic.Field(alias="sbcConfiguration"), + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_Cartesia(UncheckedBaseModel): + provider: typing.Literal["cartesia"] = "cartesia" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_Cerebras(UncheckedBaseModel): + provider: typing.Literal["cerebras"] = "cerebras" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_Cloudflare(UncheckedBaseModel): + provider: typing.Literal["cloudflare"] = "cloudflare" + account_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="accountId"), pydantic.Field(alias="accountId") + ] = None + api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey") + ] = None + account_email: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="accountEmail"), pydantic.Field(alias="accountEmail") + ] = None + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="fallbackIndex"), pydantic.Field(alias="fallbackIndex") + ] = None + bucket_plan: typing_extensions.Annotated[ + typing.Optional[CloudflareR2BucketPlan], FieldMetadata(alias="bucketPlan"), pydantic.Field(alias="bucketPlan") + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_CustomLlm(UncheckedBaseModel): + provider: typing.Literal["custom-llm"] = "custom-llm" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + authentication_plan: typing_extensions.Annotated[ + typing.Optional[OAuth2AuthenticationPlan], + FieldMetadata(alias="authenticationPlan"), + pydantic.Field(alias="authenticationPlan"), + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_Deepgram(UncheckedBaseModel): + provider: typing.Literal["deepgram"] = "deepgram" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + api_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="apiUrl"), pydantic.Field(alias="apiUrl") + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_Deepinfra(UncheckedBaseModel): + provider: typing.Literal["deepinfra"] = "deepinfra" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_DeepSeek(UncheckedBaseModel): + provider: typing.Literal["deep-seek"] = "deep-seek" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_Gcp(UncheckedBaseModel): + provider: typing.Literal["gcp"] = "gcp" + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="fallbackIndex"), pydantic.Field(alias="fallbackIndex") + ] = None + gcp_key: typing_extensions.Annotated[GcpKey, FieldMetadata(alias="gcpKey"), pydantic.Field(alias="gcpKey")] + region: typing.Optional[str] = None + bucket_plan: typing_extensions.Annotated[ + typing.Optional[BucketPlan], FieldMetadata(alias="bucketPlan"), pydantic.Field(alias="bucketPlan") + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_Gladia(UncheckedBaseModel): + provider: typing.Literal["gladia"] = "gladia" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_Gohighlevel(UncheckedBaseModel): + provider: typing.Literal["gohighlevel"] = "gohighlevel" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_Google(UncheckedBaseModel): + provider: typing.Literal["google"] = "google" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_Groq(UncheckedBaseModel): + provider: typing.Literal["groq"] = "groq" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_InflectionAi(UncheckedBaseModel): + provider: typing.Literal["inflection-ai"] = "inflection-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_Langfuse(UncheckedBaseModel): + provider: typing.Literal["langfuse"] = "langfuse" + public_key: typing_extensions.Annotated[str, FieldMetadata(alias="publicKey"), pydantic.Field(alias="publicKey")] + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + api_url: typing_extensions.Annotated[str, FieldMetadata(alias="apiUrl"), pydantic.Field(alias="apiUrl")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_Lmnt(UncheckedBaseModel): + provider: typing.Literal["lmnt"] = "lmnt" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_Make(UncheckedBaseModel): + provider: typing.Literal["make"] = "make" + team_id: typing_extensions.Annotated[str, FieldMetadata(alias="teamId"), pydantic.Field(alias="teamId")] + region: str + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_Openai(UncheckedBaseModel): + provider: typing.Literal["openai"] = "openai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_Openrouter(UncheckedBaseModel): + provider: typing.Literal["openrouter"] = "openrouter" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_PerplexityAi(UncheckedBaseModel): + provider: typing.Literal["perplexity-ai"] = "perplexity-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_Playht(UncheckedBaseModel): + provider: typing.Literal["playht"] = "playht" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + user_id: typing_extensions.Annotated[str, FieldMetadata(alias="userId"), pydantic.Field(alias="userId")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_RimeAi(UncheckedBaseModel): + provider: typing.Literal["rime-ai"] = "rime-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_Runpod(UncheckedBaseModel): + provider: typing.Literal["runpod"] = "runpod" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_S3(UncheckedBaseModel): + provider: typing.Literal["s3"] = "s3" + aws_access_key_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="awsAccessKeyId"), pydantic.Field(alias="awsAccessKeyId") + ] + aws_secret_access_key: typing_extensions.Annotated[ + str, FieldMetadata(alias="awsSecretAccessKey"), pydantic.Field(alias="awsSecretAccessKey") + ] + region: str + s_3_bucket_name: typing_extensions.Annotated[ + str, FieldMetadata(alias="s3BucketName"), pydantic.Field(alias="s3BucketName") + ] + s_3_path_prefix: typing_extensions.Annotated[ + str, FieldMetadata(alias="s3PathPrefix"), pydantic.Field(alias="s3PathPrefix") + ] + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="fallbackIndex"), pydantic.Field(alias="fallbackIndex") + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_Supabase(UncheckedBaseModel): + provider: typing.Literal["supabase"] = "supabase" + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="fallbackIndex"), pydantic.Field(alias="fallbackIndex") + ] = None + bucket_plan: typing_extensions.Annotated[ + typing.Optional[SupabaseBucketPlan], FieldMetadata(alias="bucketPlan"), pydantic.Field(alias="bucketPlan") + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_SmallestAi(UncheckedBaseModel): + provider: typing.Literal["smallest-ai"] = "smallest-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_Tavus(UncheckedBaseModel): + provider: typing.Literal["tavus"] = "tavus" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_TogetherAi(UncheckedBaseModel): + provider: typing.Literal["together-ai"] = "together-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_Twilio(UncheckedBaseModel): + provider: typing.Literal["twilio"] = "twilio" + auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="authToken"), pydantic.Field(alias="authToken") + ] = None + api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey") + ] = None + api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="apiSecret"), pydantic.Field(alias="apiSecret") + ] = None + account_sid: typing_extensions.Annotated[str, FieldMetadata(alias="accountSid"), pydantic.Field(alias="accountSid")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_Vonage(UncheckedBaseModel): + provider: typing.Literal["vonage"] = "vonage" + api_secret: typing_extensions.Annotated[str, FieldMetadata(alias="apiSecret"), pydantic.Field(alias="apiSecret")] + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_Webhook(UncheckedBaseModel): + provider: typing.Literal["webhook"] = "webhook" + authentication_plan: typing_extensions.Annotated[ + CreateWebhookCredentialDtoAuthenticationPlan, + FieldMetadata(alias="authenticationPlan"), + pydantic.Field(alias="authenticationPlan"), + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_CustomCredential(UncheckedBaseModel): + provider: typing.Literal["custom-credential"] = "custom-credential" + authentication_plan: typing_extensions.Annotated[ + CreateCustomCredentialDtoAuthenticationPlan, + FieldMetadata(alias="authenticationPlan"), + pydantic.Field(alias="authenticationPlan"), + ] + encryption_plan: typing_extensions.Annotated[ + typing.Optional[CreateCustomCredentialDtoEncryptionPlan], + FieldMetadata(alias="encryptionPlan"), + pydantic.Field(alias="encryptionPlan"), + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_Xai(UncheckedBaseModel): + provider: typing.Literal["xai"] = "xai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_Neuphonic(UncheckedBaseModel): + provider: typing.Literal["neuphonic"] = "neuphonic" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_Hume(UncheckedBaseModel): + provider: typing.Literal["hume"] = "hume" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_Mistral(UncheckedBaseModel): + provider: typing.Literal["mistral"] = "mistral" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_Speechmatics(UncheckedBaseModel): + provider: typing.Literal["speechmatics"] = "speechmatics" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_Soniox(UncheckedBaseModel): + provider: typing.Literal["soniox"] = "soniox" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_Trieve(UncheckedBaseModel): + provider: typing.Literal["trieve"] = "trieve" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_GoogleCalendarOauth2Client(UncheckedBaseModel): + provider: typing.Literal["google.calendar.oauth2-client"] = "google.calendar.oauth2-client" + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_GoogleCalendarOauth2Authorization(UncheckedBaseModel): + provider: typing.Literal["google.calendar.oauth2-authorization"] = "google.calendar.oauth2-authorization" + authorization_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="authorizationId"), pydantic.Field(alias="authorizationId") + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_GoogleSheetsOauth2Authorization(UncheckedBaseModel): + provider: typing.Literal["google.sheets.oauth2-authorization"] = "google.sheets.oauth2-authorization" + authorization_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="authorizationId"), pydantic.Field(alias="authorizationId") + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_SlackOauth2Authorization(UncheckedBaseModel): + provider: typing.Literal["slack.oauth2-authorization"] = "slack.oauth2-authorization" + authorization_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="authorizationId"), pydantic.Field(alias="authorizationId") + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_GhlOauth2Authorization(UncheckedBaseModel): + provider: typing.Literal["ghl.oauth2-authorization"] = "ghl.oauth2-authorization" + authentication_session: typing_extensions.Annotated[ + Oauth2AuthenticationSession, + FieldMetadata(alias="authenticationSession"), + pydantic.Field(alias="authenticationSession"), + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_Inworld(UncheckedBaseModel): + provider: typing.Literal["inworld"] = "inworld" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_Minimax(UncheckedBaseModel): + provider: typing.Literal["minimax"] = "minimax" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + group_id: typing_extensions.Annotated[str, FieldMetadata(alias="groupId"), pydantic.Field(alias="groupId")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_Wellsaid(UncheckedBaseModel): + provider: typing.Literal["wellsaid"] = "wellsaid" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_Email(UncheckedBaseModel): + provider: typing.Literal["email"] = "email" + email: str + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantCredentialsItem_SlackWebhook(UncheckedBaseModel): + provider: typing.Literal["slack-webhook"] = "slack-webhook" + webhook_url: typing_extensions.Annotated[str, FieldMetadata(alias="webhookUrl"), pydantic.Field(alias="webhookUrl")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AssistantCredentialsItem = typing_extensions.Annotated[ + typing.Union[ + AssistantCredentialsItem_11Labs, + AssistantCredentialsItem_Anthropic, + AssistantCredentialsItem_AnthropicBedrock, + AssistantCredentialsItem_Anyscale, + AssistantCredentialsItem_AssemblyAi, + AssistantCredentialsItem_AzureOpenai, + AssistantCredentialsItem_Azure, + AssistantCredentialsItem_ByoSipTrunk, + AssistantCredentialsItem_Cartesia, + AssistantCredentialsItem_Cerebras, + AssistantCredentialsItem_Cloudflare, + AssistantCredentialsItem_CustomLlm, + AssistantCredentialsItem_Deepgram, + AssistantCredentialsItem_Deepinfra, + AssistantCredentialsItem_DeepSeek, + AssistantCredentialsItem_Gcp, + AssistantCredentialsItem_Gladia, + AssistantCredentialsItem_Gohighlevel, + AssistantCredentialsItem_Google, + AssistantCredentialsItem_Groq, + AssistantCredentialsItem_InflectionAi, + AssistantCredentialsItem_Langfuse, + AssistantCredentialsItem_Lmnt, + AssistantCredentialsItem_Make, + AssistantCredentialsItem_Openai, + AssistantCredentialsItem_Openrouter, + AssistantCredentialsItem_PerplexityAi, + AssistantCredentialsItem_Playht, + AssistantCredentialsItem_RimeAi, + AssistantCredentialsItem_Runpod, + AssistantCredentialsItem_S3, + AssistantCredentialsItem_Supabase, + AssistantCredentialsItem_SmallestAi, + AssistantCredentialsItem_Tavus, + AssistantCredentialsItem_TogetherAi, + AssistantCredentialsItem_Twilio, + AssistantCredentialsItem_Vonage, + AssistantCredentialsItem_Webhook, + AssistantCredentialsItem_CustomCredential, + AssistantCredentialsItem_Xai, + AssistantCredentialsItem_Neuphonic, + AssistantCredentialsItem_Hume, + AssistantCredentialsItem_Mistral, + AssistantCredentialsItem_Speechmatics, + AssistantCredentialsItem_Soniox, + AssistantCredentialsItem_Trieve, + AssistantCredentialsItem_GoogleCalendarOauth2Client, + AssistantCredentialsItem_GoogleCalendarOauth2Authorization, + AssistantCredentialsItem_GoogleSheetsOauth2Authorization, + AssistantCredentialsItem_SlackOauth2Authorization, + AssistantCredentialsItem_GhlOauth2Authorization, + AssistantCredentialsItem_Inworld, + AssistantCredentialsItem_Minimax, + AssistantCredentialsItem_Wellsaid, + AssistantCredentialsItem_Email, + AssistantCredentialsItem_SlackWebhook, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/assistant_custom_endpointing_rule.py b/src/vapi/types/assistant_custom_endpointing_rule.py new file mode 100644 index 00000000..11acb762 --- /dev/null +++ b/src/vapi/types/assistant_custom_endpointing_rule.py @@ -0,0 +1,49 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .regex_option import RegexOption + + +class AssistantCustomEndpointingRule(UncheckedBaseModel): + regex: str = pydantic.Field() + """ + This is the regex pattern to match. + + Note: + - This works by using the `RegExp.test` method in Node.JS. Eg. `/hello/.test("hello there")` will return `true`. + + Hot tip: + - In JavaScript, escape `\\` when sending the regex pattern. Eg. `"hello\\sthere"` will be sent over the wire as `"hellosthere"`. Send `"hello\\\\sthere"` instead. + - `RegExp.test` does substring matching, so `/cat/.test("I love cats")` will return `true`. To do full string matching, send "^cat$". + """ + + regex_options: typing_extensions.Annotated[ + typing.Optional[typing.List[RegexOption]], + FieldMetadata(alias="regexOptions"), + pydantic.Field( + alias="regexOptions", + description="These are the options for the regex match. Defaults to all disabled.\n\n@default []", + ), + ] = None + timeout_seconds: typing_extensions.Annotated[ + float, + FieldMetadata(alias="timeoutSeconds"), + pydantic.Field( + alias="timeoutSeconds", description="This is the endpointing timeout in seconds, if the rule is matched." + ), + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/assistant_hook_assistant_speech_interrupted.py b/src/vapi/types/assistant_hook_assistant_speech_interrupted.py new file mode 100644 index 00000000..bd0826c0 --- /dev/null +++ b/src/vapi/types/assistant_hook_assistant_speech_interrupted.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +AssistantHookAssistantSpeechInterrupted = typing.Any diff --git a/src/vapi/types/assistant_hook_call_ending.py b/src/vapi/types/assistant_hook_call_ending.py new file mode 100644 index 00000000..eca85847 --- /dev/null +++ b/src/vapi/types/assistant_hook_call_ending.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +AssistantHookCallEnding = typing.Any diff --git a/src/vapi/types/assistant_hook_customer_speech_interrupted.py b/src/vapi/types/assistant_hook_customer_speech_interrupted.py new file mode 100644 index 00000000..9b1b6081 --- /dev/null +++ b/src/vapi/types/assistant_hook_customer_speech_interrupted.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +AssistantHookCustomerSpeechInterrupted = typing.Any diff --git a/src/vapi/types/assistant_hooks_item.py b/src/vapi/types/assistant_hooks_item.py new file mode 100644 index 00000000..52cddc20 --- /dev/null +++ b/src/vapi/types/assistant_hooks_item.py @@ -0,0 +1,17 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted +from .call_hook_call_ending import CallHookCallEnding +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout +from .session_created_hook import SessionCreatedHook + +AssistantHooksItem = typing.Union[ + CallHookCallEnding, + CallHookAssistantSpeechInterrupted, + CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechTimeout, + SessionCreatedHook, +] diff --git a/src/vapi/types/assistant_message.py b/src/vapi/types/assistant_message.py new file mode 100644 index 00000000..d1e29293 --- /dev/null +++ b/src/vapi/types/assistant_message.py @@ -0,0 +1,50 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .assistant_message_role import AssistantMessageRole +from .tool_call import ToolCall + + +class AssistantMessage(UncheckedBaseModel): + role: AssistantMessageRole = pydantic.Field() + """ + This is the role of the message author + """ + + content: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the content of the assistant message + """ + + refusal: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the refusal message generated by the model + """ + + tool_calls: typing.Optional[typing.List[ToolCall]] = pydantic.Field(default=None) + """ + This is the tool calls generated by the model + """ + + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is an optional name for the participant + """ + + metadata: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) + """ + This is an optional metadata for the message + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/assistant_message_evaluation_continue_plan.py b/src/vapi/types/assistant_message_evaluation_continue_plan.py new file mode 100644 index 00000000..722a3359 --- /dev/null +++ b/src/vapi/types/assistant_message_evaluation_continue_plan.py @@ -0,0 +1,46 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .chat_eval_assistant_message_mock_tool_call import ChatEvalAssistantMessageMockToolCall + + +class AssistantMessageEvaluationContinuePlan(UncheckedBaseModel): + exit_on_failure_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="exitOnFailureEnabled"), + pydantic.Field( + alias="exitOnFailureEnabled", + description="This is whether the evaluation should exit if the assistant message evaluates to false.\nBy default, it is false and the evaluation will continue.\n@default false", + ), + ] = None + content_override: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="contentOverride"), + pydantic.Field( + alias="contentOverride", + description="This is the content that will be used in the conversation for this assistant turn moving forward if provided.\nIt will override the content received from the model.", + ), + ] = None + tool_calls_override: typing_extensions.Annotated[ + typing.Optional[typing.List[ChatEvalAssistantMessageMockToolCall]], + FieldMetadata(alias="toolCallsOverride"), + pydantic.Field( + alias="toolCallsOverride", + description="This is the tool calls that will be used in the conversation for this assistant turn moving forward if provided.\nIt will override the tool calls received from the model.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/assistant_message_judge_plan_ai.py b/src/vapi/types/assistant_message_judge_plan_ai.py new file mode 100644 index 00000000..0d5bdb8a --- /dev/null +++ b/src/vapi/types/assistant_message_judge_plan_ai.py @@ -0,0 +1,50 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .assistant_message_judge_plan_ai_model import AssistantMessageJudgePlanAiModel +from .assistant_message_judge_plan_ai_type import AssistantMessageJudgePlanAiType + + +class AssistantMessageJudgePlanAi(UncheckedBaseModel): + model: AssistantMessageJudgePlanAiModel = pydantic.Field() + """ + This is the model to use for the LLM-as-a-judge. + If not provided, will default to the assistant's model. + + The instructions on how to evaluate the model output with this LLM-Judge must be passed as a system message in the messages array of the model. + + The Mock conversation can be passed to the LLM-Judge to evaluate using the prompt {{messages}} and will be evaluated as a LiquidJS Variable. To access and judge only the last message, use {{messages[-1]}} + + The LLM-Judge must respond with "pass" or "fail" and only those two responses are allowed. + """ + + type: AssistantMessageJudgePlanAiType = pydantic.Field() + """ + This is the type of the judge plan. + Use 'ai' to evaluate the assistant message content using LLM-as-a-judge. + @default 'ai' + """ + + auto_include_message_history: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="autoIncludeMessageHistory"), + pydantic.Field( + alias="autoIncludeMessageHistory", + description="This is the flag to enable automatically adding the liquid variable {{messages}} to the model's messages array\nThis is only applicable if the user has not provided any messages in the model's messages array\n@default true", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/assistant_message_judge_plan_ai_model.py b/src/vapi/types/assistant_message_judge_plan_ai_model.py new file mode 100644 index 00000000..696827fd --- /dev/null +++ b/src/vapi/types/assistant_message_judge_plan_ai_model.py @@ -0,0 +1,152 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .anthropic_thinking_config import AnthropicThinkingConfig +from .eval_anthropic_model_model import EvalAnthropicModelModel +from .eval_google_model_model import EvalGoogleModelModel +from .eval_open_ai_model_model import EvalOpenAiModelModel + + +class AssistantMessageJudgePlanAiModel_Openai(UncheckedBaseModel): + """ + This is the model to use for the LLM-as-a-judge. + If not provided, will default to the assistant's model. + + The instructions on how to evaluate the model output with this LLM-Judge must be passed as a system message in the messages array of the model. + + The Mock conversation can be passed to the LLM-Judge to evaluate using the prompt {{messages}} and will be evaluated as a LiquidJS Variable. To access and judge only the last message, use {{messages[-1]}} + + The LLM-Judge must respond with "pass" or "fail" and only those two responses are allowed. + """ + + provider: typing.Literal["openai"] = "openai" + model: EvalOpenAiModelModel + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + messages: typing.List[typing.Dict[str, typing.Any]] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantMessageJudgePlanAiModel_Anthropic(UncheckedBaseModel): + """ + This is the model to use for the LLM-as-a-judge. + If not provided, will default to the assistant's model. + + The instructions on how to evaluate the model output with this LLM-Judge must be passed as a system message in the messages array of the model. + + The Mock conversation can be passed to the LLM-Judge to evaluate using the prompt {{messages}} and will be evaluated as a LiquidJS Variable. To access and judge only the last message, use {{messages[-1]}} + + The LLM-Judge must respond with "pass" or "fail" and only those two responses are allowed. + """ + + provider: typing.Literal["anthropic"] = "anthropic" + model: EvalAnthropicModelModel + thinking: typing.Optional[AnthropicThinkingConfig] = None + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + messages: typing.List[typing.Dict[str, typing.Any]] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantMessageJudgePlanAiModel_Google(UncheckedBaseModel): + """ + This is the model to use for the LLM-as-a-judge. + If not provided, will default to the assistant's model. + + The instructions on how to evaluate the model output with this LLM-Judge must be passed as a system message in the messages array of the model. + + The Mock conversation can be passed to the LLM-Judge to evaluate using the prompt {{messages}} and will be evaluated as a LiquidJS Variable. To access and judge only the last message, use {{messages[-1]}} + + The LLM-Judge must respond with "pass" or "fail" and only those two responses are allowed. + """ + + provider: typing.Literal["google"] = "google" + model: EvalGoogleModelModel + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + messages: typing.List[typing.Dict[str, typing.Any]] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantMessageJudgePlanAiModel_CustomLlm(UncheckedBaseModel): + """ + This is the model to use for the LLM-as-a-judge. + If not provided, will default to the assistant's model. + + The instructions on how to evaluate the model output with this LLM-Judge must be passed as a system message in the messages array of the model. + + The Mock conversation can be passed to the LLM-Judge to evaluate using the prompt {{messages}} and will be evaluated as a LiquidJS Variable. To access and judge only the last message, use {{messages[-1]}} + + The LLM-Judge must respond with "pass" or "fail" and only those two responses are allowed. + """ + + provider: typing.Literal["custom-llm"] = "custom-llm" + url: str + headers: typing.Optional[typing.Dict[str, typing.Any]] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + model: str + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + messages: typing.List[typing.Dict[str, typing.Any]] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AssistantMessageJudgePlanAiModel = typing_extensions.Annotated[ + typing.Union[ + AssistantMessageJudgePlanAiModel_Openai, + AssistantMessageJudgePlanAiModel_Anthropic, + AssistantMessageJudgePlanAiModel_Google, + AssistantMessageJudgePlanAiModel_CustomLlm, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/assistant_message_judge_plan_ai_type.py b/src/vapi/types/assistant_message_judge_plan_ai_type.py new file mode 100644 index 00000000..a2cc40ad --- /dev/null +++ b/src/vapi/types/assistant_message_judge_plan_ai_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +AssistantMessageJudgePlanAiType = typing.Union[typing.Literal["ai"], typing.Any] diff --git a/src/vapi/types/assistant_message_judge_plan_exact.py b/src/vapi/types/assistant_message_judge_plan_exact.py new file mode 100644 index 00000000..74fd1e17 --- /dev/null +++ b/src/vapi/types/assistant_message_judge_plan_exact.py @@ -0,0 +1,36 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .chat_eval_assistant_message_mock_tool_call import ChatEvalAssistantMessageMockToolCall + + +class AssistantMessageJudgePlanExact(UncheckedBaseModel): + content: str = pydantic.Field() + """ + This is what that will be used to evaluate the model's message content. + If you provide a string, the assistant message content will be evaluated against it as an exact match, case-insensitive. + """ + + tool_calls: typing_extensions.Annotated[ + typing.Optional[typing.List[ChatEvalAssistantMessageMockToolCall]], + FieldMetadata(alias="toolCalls"), + pydantic.Field( + alias="toolCalls", + description='This is the tool calls that will be used to evaluate the model\'s message content.\nThe tool name must be a valid tool that the assistant is allowed to call.\n\nFor the Query tool, the arguments for the tool call are in the format - {knowledgeBaseNames: [\'kb_name\', \'kb_name_2\']}\n\nFor the DTMF tool, the arguments for the tool call are in the format - {dtmf: "1234*"}\n\nFor the Handoff tool, the arguments for the tool call are in the format - {destination: "assistant_id"}\n\nFor the Transfer Call tool, the arguments for the tool call are in the format - {destination: "phone_number_or_assistant_id"}\n\nFor all other tools, they are called without arguments or with user-defined arguments', + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/assistant_message_judge_plan_regex.py b/src/vapi/types/assistant_message_judge_plan_regex.py new file mode 100644 index 00000000..ac23243a --- /dev/null +++ b/src/vapi/types/assistant_message_judge_plan_regex.py @@ -0,0 +1,37 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .chat_eval_assistant_message_mock_tool_call import ChatEvalAssistantMessageMockToolCall + + +class AssistantMessageJudgePlanRegex(UncheckedBaseModel): + content: str = pydantic.Field() + """ + This is what that will be used to evaluate the model's message content. + The content will be evaluated against the regex pattern provided in the Judge Plan content field. + Evaluation is considered successful if the regex pattern matches any part of the assistant message content. + """ + + tool_calls: typing_extensions.Annotated[ + typing.Optional[typing.List[ChatEvalAssistantMessageMockToolCall]], + FieldMetadata(alias="toolCalls"), + pydantic.Field( + alias="toolCalls", + description='This is the tool calls that will be used to evaluate the model\'s message content.\nThe tool name must be a valid tool that the assistant is allowed to call.\nThe values to the arguments for the tool call should be a Regular Expression.\nEvaluation is considered successful if the regex pattern matches any part of each tool call argument.\n\nFor the Query tool, the arguments for the tool call are in the format - {knowledgeBaseNames: [\'kb_name\', \'kb_name_2\']}\n\nFor the DTMF tool, the arguments for the tool call are in the format - {dtmf: "1234*"}\n\nFor the Handoff tool, the arguments for the tool call are in the format - {destination: "assistant_id"}\n\nFor the Transfer Call tool, the arguments for the tool call are in the format - {destination: "phone_number_or_assistant_id"}\n\nFor all other tools, they are called without arguments or with user-defined arguments', + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/assistant_message_role.py b/src/vapi/types/assistant_message_role.py new file mode 100644 index 00000000..762ca57e --- /dev/null +++ b/src/vapi/types/assistant_message_role.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +AssistantMessageRole = typing.Union[typing.Literal["assistant"], typing.Any] diff --git a/src/vapi/types/assistant_model.py b/src/vapi/types/assistant_model.py index 09f3d4ca..537c460e 100644 --- a/src/vapi/types/assistant_model.py +++ b/src/vapi/types/assistant_model.py @@ -1,26 +1,1734 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .anyscale_model import AnyscaleModel -from .anthropic_model import AnthropicModel -from .custom_llm_model import CustomLlmModel -from .deep_infra_model import DeepInfraModel -from .groq_model import GroqModel -from .open_ai_model import OpenAiModel -from .open_router_model import OpenRouterModel -from .perplexity_ai_model import PerplexityAiModel -from .together_ai_model import TogetherAiModel -from .vapi_model import VapiModel - -AssistantModel = typing.Union[ - AnyscaleModel, - AnthropicModel, - CustomLlmModel, - DeepInfraModel, - GroqModel, - OpenAiModel, - OpenRouterModel, - PerplexityAiModel, - TogetherAiModel, - VapiModel, + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .anthropic_bedrock_model_model import AnthropicBedrockModelModel +from .anthropic_model_model import AnthropicModelModel +from .anthropic_thinking_config import AnthropicThinkingConfig +from .cerebras_model_model import CerebrasModelModel +from .create_custom_knowledge_base_dto import CreateCustomKnowledgeBaseDto +from .custom_llm_model_metadata_send_mode import CustomLlmModelMetadataSendMode +from .deep_seek_model_model import DeepSeekModelModel +from .google_model_model import GoogleModelModel +from .google_realtime_config import GoogleRealtimeConfig +from .groq_model_model import GroqModelModel +from .inflection_ai_model_model import InflectionAiModelModel +from .minimax_llm_model_model import MinimaxLlmModelModel +from .open_ai_message import OpenAiMessage +from .open_ai_model_fallback_models_item import OpenAiModelFallbackModelsItem +from .open_ai_model_model import OpenAiModelModel +from .open_ai_model_prompt_cache_retention import OpenAiModelPromptCacheRetention +from .open_ai_model_tool_strict_compatibility_mode import OpenAiModelToolStrictCompatibilityMode +from .xai_model_model import XaiModelModel + + +class AssistantModel_Anthropic(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["anthropic"] = "anthropic" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["AnthropicModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: AnthropicModelModel + thinking: typing.Optional[AnthropicThinkingConfig] = None + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantModel_AnthropicBedrock(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["anthropic-bedrock"] = "anthropic-bedrock" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["AnthropicBedrockModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: AnthropicBedrockModelModel + thinking: typing.Optional[AnthropicThinkingConfig] = None + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantModel_Anyscale(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["anyscale"] = "anyscale" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["AnyscaleModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: str + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantModel_Cerebras(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["cerebras"] = "cerebras" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["CerebrasModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: CerebrasModelModel + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantModel_CustomLlm(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["custom-llm"] = "custom-llm" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["CustomLlmModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + metadata_send_mode: typing_extensions.Annotated[ + typing.Optional[CustomLlmModelMetadataSendMode], + FieldMetadata(alias="metadataSendMode"), + pydantic.Field(alias="metadataSendMode"), + ] = None + headers: typing.Optional[typing.Dict[str, str]] = None + url: str + word_level_confidence_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="wordLevelConfidenceEnabled"), + pydantic.Field(alias="wordLevelConfidenceEnabled"), + ] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + model: str + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantModel_Deepinfra(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["deepinfra"] = "deepinfra" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["DeepInfraModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: str + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantModel_DeepSeek(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["deep-seek"] = "deep-seek" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["DeepSeekModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: DeepSeekModelModel + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantModel_Google(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["google"] = "google" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["GoogleModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: GoogleModelModel + realtime_config: typing_extensions.Annotated[ + typing.Optional[GoogleRealtimeConfig], + FieldMetadata(alias="realtimeConfig"), + pydantic.Field(alias="realtimeConfig"), + ] = None + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantModel_Groq(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["groq"] = "groq" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["GroqModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: GroqModelModel + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantModel_InflectionAi(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["inflection-ai"] = "inflection-ai" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["InflectionAiModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: InflectionAiModelModel + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantModel_Minimax(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["minimax"] = "minimax" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["MinimaxLlmModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: MinimaxLlmModelModel + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantModel_Openai(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["openai"] = "openai" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["OpenAiModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: OpenAiModelModel + fallback_models: typing_extensions.Annotated[ + typing.Optional[typing.List[OpenAiModelFallbackModelsItem]], + FieldMetadata(alias="fallbackModels"), + pydantic.Field(alias="fallbackModels"), + ] = None + tool_strict_compatibility_mode: typing_extensions.Annotated[ + typing.Optional[OpenAiModelToolStrictCompatibilityMode], + FieldMetadata(alias="toolStrictCompatibilityMode"), + pydantic.Field(alias="toolStrictCompatibilityMode"), + ] = None + prompt_cache_retention: typing_extensions.Annotated[ + typing.Optional[OpenAiModelPromptCacheRetention], + FieldMetadata(alias="promptCacheRetention"), + pydantic.Field(alias="promptCacheRetention"), + ] = None + prompt_cache_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="promptCacheKey"), pydantic.Field(alias="promptCacheKey") + ] = None + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantModel_Openrouter(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["openrouter"] = "openrouter" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["OpenRouterModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: str + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantModel_PerplexityAi(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["perplexity-ai"] = "perplexity-ai" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["PerplexityAiModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: str + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantModel_TogetherAi(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["together-ai"] = "together-ai" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["TogetherAiModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: str + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantModel_Xai(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["xai"] = "xai" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["XaiModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: XaiModelModel + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AssistantModel = typing_extensions.Annotated[ + typing.Union[ + AssistantModel_Anthropic, + AssistantModel_AnthropicBedrock, + AssistantModel_Anyscale, + AssistantModel_Cerebras, + AssistantModel_CustomLlm, + AssistantModel_Deepinfra, + AssistantModel_DeepSeek, + AssistantModel_Google, + AssistantModel_Groq, + AssistantModel_InflectionAi, + AssistantModel_Minimax, + AssistantModel_Openai, + AssistantModel_Openrouter, + AssistantModel_PerplexityAi, + AssistantModel_TogetherAi, + AssistantModel_Xai, + ], + UnionMetadata(discriminant="provider"), ] +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 + +update_forward_refs( + AssistantModel_Anthropic, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + AssistantModel_AnthropicBedrock, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + AssistantModel_Anyscale, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + AssistantModel_Cerebras, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + AssistantModel_CustomLlm, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + AssistantModel_Deepinfra, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + AssistantModel_DeepSeek, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + AssistantModel_Google, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + AssistantModel_Groq, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + AssistantModel_InflectionAi, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + AssistantModel_Minimax, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + AssistantModel_Openai, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + AssistantModel_Openrouter, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + AssistantModel_PerplexityAi, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + AssistantModel_TogetherAi, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + AssistantModel_Xai, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/assistant_overrides.py b/src/vapi/types/assistant_overrides.py index 5970d006..f575189f 100644 --- a/src/vapi/types/assistant_overrides.py +++ b/src/vapi/types/assistant_overrides.py @@ -1,40 +1,42 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -from .callback_step import CallbackStep -from .create_workflow_block_dto import CreateWorkflowBlockDto -from .handoff_step import HandoffStep + import typing -from .assistant_overrides_transcriber import AssistantOverridesTranscriber + import pydantic -from .assistant_overrides_model import AssistantOverridesModel -from .assistant_overrides_voice import AssistantOverridesVoice import typing_extensions -from .assistant_overrides_first_message_mode import AssistantOverridesFirstMessageMode +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.serialization import FieldMetadata -from .assistant_overrides_client_messages_item import AssistantOverridesClientMessagesItem -from .assistant_overrides_server_messages_item import AssistantOverridesServerMessagesItem -from .assistant_overrides_background_sound import AssistantOverridesBackgroundSound -from .transport_configuration_twilio import TransportConfigurationTwilio -from .twilio_voicemail_detection import TwilioVoicemailDetection +from ..core.unchecked_base_model import UncheckedBaseModel from .analysis_plan import AnalysisPlan from .artifact_plan import ArtifactPlan -from .message_plan import MessagePlan +from .assistant_overrides_background_sound import AssistantOverridesBackgroundSound +from .assistant_overrides_client_messages_item import AssistantOverridesClientMessagesItem +from .assistant_overrides_credentials_item import AssistantOverridesCredentialsItem +from .assistant_overrides_first_message_mode import AssistantOverridesFirstMessageMode +from .assistant_overrides_server_messages_item import AssistantOverridesServerMessagesItem +from .assistant_overrides_transcriber import AssistantOverridesTranscriber +from .assistant_overrides_voice import AssistantOverridesVoice +from .assistant_overrides_voicemail_detection import AssistantOverridesVoicemailDetection +from .background_speech_denoising_plan import BackgroundSpeechDenoisingPlan +from .compliance_plan import CompliancePlan +from .keypad_input_plan import KeypadInputPlan +from .langfuse_observability_plan import LangfuseObservabilityPlan +from .monitor_plan import MonitorPlan +from .server import Server from .start_speaking_plan import StartSpeakingPlan from .stop_speaking_plan import StopSpeakingPlan -from .monitor_plan import MonitorPlan -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.pydantic_utilities import update_forward_refs +from .transport_configuration_twilio import TransportConfigurationTwilio -class AssistantOverrides(UniversalBaseModel): +class AssistantOverrides(UncheckedBaseModel): transcriber: typing.Optional[AssistantOverridesTranscriber] = pydantic.Field(default=None) """ These are the options for the assistant's transcriber. """ - model: typing.Optional[AssistantOverridesModel] = pydantic.Field(default=None) + model: typing.Optional["AssistantOverridesModel"] = pydantic.Field(default=None) """ These are the options for the assistant's LLM. """ @@ -44,114 +46,114 @@ class AssistantOverrides(UniversalBaseModel): These are the options for the assistant's voice. """ + first_message: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="firstMessage"), + pydantic.Field( + alias="firstMessage", + description="This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.).\n\nIf unspecified, assistant will wait for user to speak and use the model to respond once they speak.", + ), + ] = None + first_message_interruptions_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="firstMessageInterruptionsEnabled"), + pydantic.Field(alias="firstMessageInterruptionsEnabled"), + ] = None first_message_mode: typing_extensions.Annotated[ - typing.Optional[AssistantOverridesFirstMessageMode], FieldMetadata(alias="firstMessageMode") - ] = pydantic.Field(default=None) - """ - This is the mode for the first message. Default is 'assistant-speaks-first'. - - Use: - - - 'assistant-speaks-first' to have the assistant speak first. - - 'assistant-waits-for-user' to have the assistant wait for the user to speak first. - - 'assistant-speaks-first-with-model-generated-message' to have the assistant speak first with a message generated by the model based on the conversation state. (`assistant.model.messages` at call start, `call.messages` at squad transfer points). - - @default 'assistant-speaks-first' - """ - - hipaa_enabled: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="hipaaEnabled")] = ( - pydantic.Field(default=None) - ) - """ - When this is enabled, no logs, recordings, or transcriptions will be stored. At the end of the call, you will still receive an end-of-call-report message to store on your server. Defaults to false. - """ - + typing.Optional[AssistantOverridesFirstMessageMode], + FieldMetadata(alias="firstMessageMode"), + pydantic.Field( + alias="firstMessageMode", + description="This is the mode for the first message. Default is 'assistant-speaks-first'.\n\nUse:\n- 'assistant-speaks-first' to have the assistant speak first.\n- 'assistant-waits-for-user' to have the assistant wait for the user to speak first.\n- 'assistant-speaks-first-with-model-generated-message' to have the assistant speak first with a message generated by the model based on the conversation state. (`assistant.model.messages` at call start, `call.messages` at squad transfer points).\n\n@default 'assistant-speaks-first'", + ), + ] = None + voicemail_detection: typing_extensions.Annotated[ + typing.Optional[AssistantOverridesVoicemailDetection], + FieldMetadata(alias="voicemailDetection"), + pydantic.Field( + alias="voicemailDetection", + description="These are the settings to configure or disable voicemail detection. Alternatively, voicemail detection can be configured using the model.tools=[VoicemailTool].\nBy default, voicemail detection is disabled.", + ), + ] = None client_messages: typing_extensions.Annotated[ - typing.Optional[typing.List[AssistantOverridesClientMessagesItem]], FieldMetadata(alias="clientMessages") - ] = pydantic.Field(default=None) - """ - These are the messages that will be sent to your Client SDKs. Default is conversation-update,function-call,hang,model-output,speech-update,status-update,transcript,tool-calls,user-interrupted,voice-input. You can check the shape of the messages in ClientMessage schema. - """ - + typing.Optional[typing.List[AssistantOverridesClientMessagesItem]], + FieldMetadata(alias="clientMessages"), + pydantic.Field( + alias="clientMessages", + description="These are the messages that will be sent to your Client SDKs. Default is conversation-update,function-call,hang,model-output,speech-update,status-update,transfer-update,transcript,tool-calls,user-interrupted,voice-input,workflow.node.started,assistant.started. You can check the shape of the messages in ClientMessage schema.", + ), + ] = None server_messages: typing_extensions.Annotated[ - typing.Optional[typing.List[AssistantOverridesServerMessagesItem]], FieldMetadata(alias="serverMessages") - ] = pydantic.Field(default=None) - """ - These are the messages that will be sent to your Server URL. Default is conversation-update,end-of-call-report,function-call,hang,speech-update,status-update,tool-calls,transfer-destination-request,user-interrupted. You can check the shape of the messages in ServerMessage schema. - """ - - silence_timeout_seconds: typing_extensions.Annotated[ - typing.Optional[float], FieldMetadata(alias="silenceTimeoutSeconds") - ] = pydantic.Field(default=None) - """ - How many seconds of silence to wait before ending the call. Defaults to 30. - - @default 30 - """ - + typing.Optional[typing.List[AssistantOverridesServerMessagesItem]], + FieldMetadata(alias="serverMessages"), + pydantic.Field( + alias="serverMessages", + description="These are the messages that will be sent to your Server URL. Default is conversation-update,end-of-call-report,function-call,hang,speech-update,status-update,tool-calls,transfer-destination-request,handoff-destination-request,user-interrupted,assistant.started. You can check the shape of the messages in ServerMessage schema.", + ), + ] = None max_duration_seconds: typing_extensions.Annotated[ - typing.Optional[float], FieldMetadata(alias="maxDurationSeconds") - ] = pydantic.Field(default=None) - """ - This is the maximum number of seconds that the call will last. When the call reaches this duration, it will be ended. - - @default 600 (10 minutes) - """ - + typing.Optional[float], + FieldMetadata(alias="maxDurationSeconds"), + pydantic.Field( + alias="maxDurationSeconds", + description="This is the maximum number of seconds that the call will last. When the call reaches this duration, it will be ended.\n\n@default 600 (10 minutes)", + ), + ] = None background_sound: typing_extensions.Annotated[ - typing.Optional[AssistantOverridesBackgroundSound], FieldMetadata(alias="backgroundSound") - ] = pydantic.Field(default=None) - """ - This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'. - """ - - backchanneling_enabled: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="backchannelingEnabled") - ] = pydantic.Field(default=None) - """ - This determines whether the model says 'mhmm', 'ahem' etc. while user is speaking. - - Default `false` while in beta. - - @default false - """ - - background_denoising_enabled: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="backgroundDenoisingEnabled") - ] = pydantic.Field(default=None) - """ - This enables filtering of noise and background speech while the user is talking. - - Default `false` while in beta. - - @default false - """ - + typing.Optional[AssistantOverridesBackgroundSound], + FieldMetadata(alias="backgroundSound"), + pydantic.Field( + alias="backgroundSound", + description="This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'.\nYou can also provide a custom sound by providing a URL to an audio file.", + ), + ] = None model_output_in_messages_enabled: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="modelOutputInMessagesEnabled") - ] = pydantic.Field(default=None) - """ - This determines whether the model's output is used in conversation history rather than the transcription of assistant's speech. - - Default `false` while in beta. - - @default false - """ - + typing.Optional[bool], + FieldMetadata(alias="modelOutputInMessagesEnabled"), + pydantic.Field( + alias="modelOutputInMessagesEnabled", + description="This determines whether the model's output is used in conversation history rather than the transcription of assistant's speech.\n\n@default false", + ), + ] = None transport_configurations: typing_extensions.Annotated[ - typing.Optional[typing.List[TransportConfigurationTwilio]], FieldMetadata(alias="transportConfigurations") - ] = pydantic.Field(default=None) - """ - These are the configurations to be passed to the transport providers of assistant's calls, like Twilio. You can store multiple configurations for different transport providers. For a call, only the configuration matching the call transport provider is used. - """ - + typing.Optional[typing.List[TransportConfigurationTwilio]], + FieldMetadata(alias="transportConfigurations"), + pydantic.Field( + alias="transportConfigurations", + description="These are the configurations to be passed to the transport providers of assistant's calls, like Twilio. You can store multiple configurations for different transport providers. For a call, only the configuration matching the call transport provider is used.", + ), + ] = None + observability_plan: typing_extensions.Annotated[ + typing.Optional[LangfuseObservabilityPlan], + FieldMetadata(alias="observabilityPlan"), + pydantic.Field( + alias="observabilityPlan", + description="This is the plan for observability of assistant's calls.\n\nCurrently, only Langfuse is supported.", + ), + ] = None + credentials: typing.Optional[typing.List[AssistantOverridesCredentialsItem]] = pydantic.Field(default=None) + """ + These are dynamic credentials that will be used for the assistant calls. By default, all the credentials are available for use in the call but you can supplement an additional credentials using this. Dynamic credentials override existing credentials. + """ + + hooks: typing.Optional[typing.List["AssistantOverridesHooksItem"]] = pydantic.Field(default=None) + """ + This is a set of actions that will be performed on certain events. + """ + + tools_append: typing_extensions.Annotated[ + typing.Optional[typing.List["AssistantOverridesToolsAppendItem"]], + FieldMetadata(alias="tools:append"), + pydantic.Field(alias="tools:append"), + ] = None variable_values: typing_extensions.Annotated[ - typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]], FieldMetadata(alias="variableValues") - ] = pydantic.Field(default=None) - """ - These are values that will be used to replace the template variables in the assistant messages and other text-based fields. - """ - + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="variableValues"), + pydantic.Field( + alias="variableValues", + description='These are values that will be used to replace the template variables in the assistant messages and other text-based fields.\nThis uses LiquidJS syntax. https://liquidjs.com/tutorials/intro-to-liquid.html\n\nSo for example, `{{ name }}` will be replaced with the value of `name` in `variableValues`.\n`{{"now" | date: "%b %d, %Y, %I:%M %p", "America/New_York"}}` will be replaced with the current date and time in New York.\n Some VAPI reserved defaults:\n - *customer* - the customer object', + ), + ] = None name: typing.Optional[str] = pydantic.Field(default=None) """ This is the name of the assistant. @@ -159,147 +161,110 @@ class AssistantOverrides(UniversalBaseModel): This is required when you want to transfer between assistants in a call. """ - first_message: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="firstMessage")] = ( - pydantic.Field(default=None) - ) - """ - This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.). - - If unspecified, assistant will wait for user to speak and use the model to respond once they speak. - """ - - voicemail_detection: typing_extensions.Annotated[ - typing.Optional[TwilioVoicemailDetection], FieldMetadata(alias="voicemailDetection") - ] = pydantic.Field(default=None) - """ - These are the settings to configure or disable voicemail detection. Alternatively, voicemail detection can be configured using the model.tools=[VoicemailTool]. - This uses Twilio's built-in detection while the VoicemailTool relies on the model to detect if a voicemail was reached. - You can use neither of them, one of them, or both of them. By default, Twilio built-in detection is enabled while VoicemailTool is not. - """ - - voicemail_message: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="voicemailMessage")] = ( - pydantic.Field(default=None) - ) - """ - This is the message that the assistant will say if the call is forwarded to voicemail. - - If unspecified, it will hang up. - """ - - end_call_message: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="endCallMessage")] = ( - pydantic.Field(default=None) - ) - """ - This is the message that the assistant will say if it ends the call. - - If unspecified, it will hang up without saying anything. - """ - + voicemail_message: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="voicemailMessage"), + pydantic.Field( + alias="voicemailMessage", + description="This is the message that the assistant will say if the call is forwarded to voicemail.\n\nIf unspecified, it will hang up.", + ), + ] = None + end_call_message: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="endCallMessage"), + pydantic.Field( + alias="endCallMessage", + description="This is the message that the assistant will say if it ends the call.\n\nIf unspecified, it will hang up without saying anything.", + ), + ] = None end_call_phrases: typing_extensions.Annotated[ - typing.Optional[typing.List[str]], FieldMetadata(alias="endCallPhrases") - ] = pydantic.Field(default=None) - """ - This list contains phrases that, if spoken by the assistant, will trigger the call to be hung up. Case insensitive. - """ - - metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None) + typing.Optional[typing.List[str]], + FieldMetadata(alias="endCallPhrases"), + pydantic.Field( + alias="endCallPhrases", + description="This list contains phrases that, if spoken by the assistant, will trigger the call to be hung up. Case insensitive.", + ), + ] = None + compliance_plan: typing_extensions.Annotated[ + typing.Optional[CompliancePlan], FieldMetadata(alias="compliancePlan"), pydantic.Field(alias="compliancePlan") + ] = None + metadata: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) """ This is for metadata you want to store on the assistant. """ - server_url: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="serverUrl")] = pydantic.Field( - default=None - ) - """ - This is the URL Vapi will communicate with via HTTP GET and POST Requests. This is used for retrieving context, function calling, and end-of-call reports. - - All requests will be sent with the call object among other things relevant to that message. You can find more details in the Server URL documentation. - - This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: tool.server.url > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl - """ - - server_url_secret: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="serverUrlSecret")] = ( - pydantic.Field(default=None) - ) - """ - This is the secret you can set that Vapi will send with every request to your server. Will be sent as a header called x-vapi-secret. - - Same precedence logic as serverUrl. - """ - - analysis_plan: typing_extensions.Annotated[typing.Optional[AnalysisPlan], FieldMetadata(alias="analysisPlan")] = ( - pydantic.Field(default=None) - ) - """ - This is the plan for analysis of assistant's calls. Stored in `call.analysis`. - """ - - artifact_plan: typing_extensions.Annotated[typing.Optional[ArtifactPlan], FieldMetadata(alias="artifactPlan")] = ( - pydantic.Field(default=None) - ) - """ - This is the plan for artifacts generated during assistant's calls. Stored in `call.artifact`. - - Note: `recordingEnabled` is currently at the root level. It will be moved to `artifactPlan` in the future, but will remain backwards compatible. - """ - - message_plan: typing_extensions.Annotated[typing.Optional[MessagePlan], FieldMetadata(alias="messagePlan")] = ( - pydantic.Field(default=None) - ) - """ - This is the plan for static predefined messages that can be spoken by the assistant during the call, like `idleMessages`. - - Note: `firstMessage`, `voicemailMessage`, and `endCallMessage` are currently at the root level. They will be moved to `messagePlan` in the future, but will remain backwards compatible. - """ - + background_speech_denoising_plan: typing_extensions.Annotated[ + typing.Optional[BackgroundSpeechDenoisingPlan], + FieldMetadata(alias="backgroundSpeechDenoisingPlan"), + pydantic.Field( + alias="backgroundSpeechDenoisingPlan", + description="This enables filtering of noise and background speech while the user is talking.\n\nFeatures:\n- Smart denoising using Krisp\n- Fourier denoising\n\nSmart denoising can be combined with or used independently of Fourier denoising.\n\nOrder of precedence:\n- Smart denoising\n- Fourier denoising", + ), + ] = None + analysis_plan: typing_extensions.Annotated[ + typing.Optional[AnalysisPlan], + FieldMetadata(alias="analysisPlan"), + pydantic.Field( + alias="analysisPlan", + description="This is the plan for analysis of assistant's calls. Stored in `call.analysis`.", + ), + ] = None + artifact_plan: typing_extensions.Annotated[ + typing.Optional[ArtifactPlan], + FieldMetadata(alias="artifactPlan"), + pydantic.Field( + alias="artifactPlan", + description="This is the plan for artifacts generated during assistant's calls. Stored in `call.artifact`.", + ), + ] = None start_speaking_plan: typing_extensions.Annotated[ - typing.Optional[StartSpeakingPlan], FieldMetadata(alias="startSpeakingPlan") - ] = pydantic.Field(default=None) - """ - This is the plan for when the assistant should start talking. - - You should configure this if you're running into these issues: - - - The assistant is too slow to start talking after the customer is done speaking. - - The assistant is too fast to start talking after the customer is done speaking. - - The assistant is so fast that it's actually interrupting the customer. - """ - + typing.Optional[StartSpeakingPlan], + FieldMetadata(alias="startSpeakingPlan"), + pydantic.Field( + alias="startSpeakingPlan", + description="This is the plan for when the assistant should start talking.\n\nYou should configure this if you're running into these issues:\n- The assistant is too slow to start talking after the customer is done speaking.\n- The assistant is too fast to start talking after the customer is done speaking.\n- The assistant is so fast that it's actually interrupting the customer.", + ), + ] = None stop_speaking_plan: typing_extensions.Annotated[ - typing.Optional[StopSpeakingPlan], FieldMetadata(alias="stopSpeakingPlan") - ] = pydantic.Field(default=None) - """ - This is the plan for when assistant should stop talking on customer interruption. - - You should configure this if you're running into these issues: - - - The assistant is too slow to recognize customer's interruption. - - The assistant is too fast to recognize customer's interruption. - - The assistant is getting interrupted by phrases that are just acknowledgments. - - The assistant is getting interrupted by background noises. - - The assistant is not properly stopping -- it starts talking right after getting interrupted. - """ - - monitor_plan: typing_extensions.Annotated[typing.Optional[MonitorPlan], FieldMetadata(alias="monitorPlan")] = ( - pydantic.Field(default=None) - ) - """ - This is the plan for real-time monitoring of the assistant's calls. - - Usage: + typing.Optional[StopSpeakingPlan], + FieldMetadata(alias="stopSpeakingPlan"), + pydantic.Field( + alias="stopSpeakingPlan", + description="This is the plan for when assistant should stop talking on customer interruption.\n\nYou should configure this if you're running into these issues:\n- The assistant is too slow to recognize customer's interruption.\n- The assistant is too fast to recognize customer's interruption.\n- The assistant is getting interrupted by phrases that are just acknowledgments.\n- The assistant is getting interrupted by background noises.\n- The assistant is not properly stopping -- it starts talking right after getting interrupted.", + ), + ] = None + monitor_plan: typing_extensions.Annotated[ + typing.Optional[MonitorPlan], + FieldMetadata(alias="monitorPlan"), + pydantic.Field( + alias="monitorPlan", + description="This is the plan for real-time monitoring of the assistant's calls.\n\nUsage:\n- To enable live listening of the assistant's calls, set `monitorPlan.listenEnabled` to `true`.\n- To enable live control of the assistant's calls, set `monitorPlan.controlEnabled` to `true`.\n- To attach monitors to the assistant, set `monitorPlan.monitorIds` to the set of monitor ids.", + ), + ] = None + credential_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="credentialIds"), + pydantic.Field( + alias="credentialIds", + description="These are the credentials that will be used for the assistant calls. By default, all the credentials are available for use in the call but you can provide a subset using this.", + ), + ] = None + server: typing.Optional[Server] = pydantic.Field(default=None) + """ + This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema. - - To enable live listening of the assistant's calls, set `monitorPlan.listenEnabled` to `true`. - - To enable live control of the assistant's calls, set `monitorPlan.controlEnabled` to `true`. + The order of precedence is: - Note, `serverMessages`, `clientMessages`, `serverUrl` and `serverUrlSecret` are currently at the root level but will be moved to `monitorPlan` in the future. Will remain backwards compatible + 1. assistant.server.url + 2. phoneNumber.serverUrl + 3. org.serverUrl """ - credential_ids: typing_extensions.Annotated[ - typing.Optional[typing.List[str]], FieldMetadata(alias="credentialIds") - ] = pydantic.Field(default=None) - """ - These are the credentials that will be used for the assistant calls. By default, all the credentials are available for use in the call but you can provide a subset using this. - """ + keypad_input_plan: typing_extensions.Annotated[ + typing.Optional[KeypadInputPlan], + FieldMetadata(alias="keypadInputPlan"), + pydantic.Field(alias="keypadInputPlan"), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -311,6 +276,119 @@ class Config: extra = pydantic.Extra.allow -update_forward_refs(CallbackStep, AssistantOverrides=AssistantOverrides) -update_forward_refs(CreateWorkflowBlockDto, AssistantOverrides=AssistantOverrides) -update_forward_refs(HandoffStep, AssistantOverrides=AssistantOverrides) +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + AssistantOverrides, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/assistant_overrides_background_sound.py b/src/vapi/types/assistant_overrides_background_sound.py index 8a4c007c..4e0aeeb7 100644 --- a/src/vapi/types/assistant_overrides_background_sound.py +++ b/src/vapi/types/assistant_overrides_background_sound.py @@ -2,4 +2,6 @@ import typing -AssistantOverridesBackgroundSound = typing.Union[typing.Literal["off", "office"], typing.Any] +from .assistant_overrides_background_sound_zero import AssistantOverridesBackgroundSoundZero + +AssistantOverridesBackgroundSound = typing.Union[AssistantOverridesBackgroundSoundZero, str] diff --git a/src/vapi/types/assistant_overrides_background_sound_zero.py b/src/vapi/types/assistant_overrides_background_sound_zero.py new file mode 100644 index 00000000..ab63c0ce --- /dev/null +++ b/src/vapi/types/assistant_overrides_background_sound_zero.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +AssistantOverridesBackgroundSoundZero = typing.Union[typing.Literal["off", "office"], typing.Any] diff --git a/src/vapi/types/assistant_overrides_client_messages_item.py b/src/vapi/types/assistant_overrides_client_messages_item.py index 81a3df50..57f0be10 100644 --- a/src/vapi/types/assistant_overrides_client_messages_item.py +++ b/src/vapi/types/assistant_overrides_client_messages_item.py @@ -5,6 +5,7 @@ AssistantOverridesClientMessagesItem = typing.Union[ typing.Literal[ "conversation-update", + "assistant.speechStarted", "function-call", "function-call-result", "hang", @@ -16,8 +17,12 @@ "transcript", "tool-calls", "tool-calls-result", + "tool.completed", + "transfer-update", "user-interrupted", "voice-input", + "workflow.node.started", + "assistant.started", ], typing.Any, ] diff --git a/src/vapi/types/assistant_overrides_credentials_item.py b/src/vapi/types/assistant_overrides_credentials_item.py new file mode 100644 index 00000000..c868b438 --- /dev/null +++ b/src/vapi/types/assistant_overrides_credentials_item.py @@ -0,0 +1,1070 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .azure_blob_storage_bucket_plan import AzureBlobStorageBucketPlan +from .bucket_plan import BucketPlan +from .cloudflare_r_2_bucket_plan import CloudflareR2BucketPlan +from .create_anthropic_bedrock_credential_dto_authentication_plan import ( + CreateAnthropicBedrockCredentialDtoAuthenticationPlan, +) +from .create_anthropic_bedrock_credential_dto_region import CreateAnthropicBedrockCredentialDtoRegion +from .create_azure_credential_dto_region import CreateAzureCredentialDtoRegion +from .create_azure_credential_dto_service import CreateAzureCredentialDtoService +from .create_azure_open_ai_credential_dto_models_item import CreateAzureOpenAiCredentialDtoModelsItem +from .create_azure_open_ai_credential_dto_region import CreateAzureOpenAiCredentialDtoRegion +from .create_custom_credential_dto_authentication_plan import CreateCustomCredentialDtoAuthenticationPlan +from .create_custom_credential_dto_encryption_plan import CreateCustomCredentialDtoEncryptionPlan +from .create_webhook_credential_dto_authentication_plan import CreateWebhookCredentialDtoAuthenticationPlan +from .gcp_key import GcpKey +from .o_auth_2_authentication_plan import OAuth2AuthenticationPlan +from .oauth_2_authentication_session import Oauth2AuthenticationSession +from .sbc_configuration import SbcConfiguration +from .sip_trunk_gateway import SipTrunkGateway +from .sip_trunk_outbound_authentication_plan import SipTrunkOutboundAuthenticationPlan +from .supabase_bucket_plan import SupabaseBucketPlan + + +class AssistantOverridesCredentialsItem_11Labs(UncheckedBaseModel): + provider: typing.Literal["11labs"] = "11labs" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_Anthropic(UncheckedBaseModel): + provider: typing.Literal["anthropic"] = "anthropic" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_AnthropicBedrock(UncheckedBaseModel): + provider: typing.Literal["anthropic-bedrock"] = "anthropic-bedrock" + region: CreateAnthropicBedrockCredentialDtoRegion + authentication_plan: typing_extensions.Annotated[ + CreateAnthropicBedrockCredentialDtoAuthenticationPlan, + FieldMetadata(alias="authenticationPlan"), + pydantic.Field(alias="authenticationPlan"), + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_Anyscale(UncheckedBaseModel): + provider: typing.Literal["anyscale"] = "anyscale" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_AssemblyAi(UncheckedBaseModel): + provider: typing.Literal["assembly-ai"] = "assembly-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_AzureOpenai(UncheckedBaseModel): + provider: typing.Literal["azure-openai"] = "azure-openai" + region: CreateAzureOpenAiCredentialDtoRegion + models: typing.List[CreateAzureOpenAiCredentialDtoModelsItem] + open_ai_key: typing_extensions.Annotated[str, FieldMetadata(alias="openAIKey"), pydantic.Field(alias="openAIKey")] + ocp_apim_subscription_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="ocpApimSubscriptionKey"), + pydantic.Field(alias="ocpApimSubscriptionKey"), + ] = None + open_ai_endpoint: typing_extensions.Annotated[ + str, FieldMetadata(alias="openAIEndpoint"), pydantic.Field(alias="openAIEndpoint") + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_Azure(UncheckedBaseModel): + provider: typing.Literal["azure"] = "azure" + service: CreateAzureCredentialDtoService + region: typing.Optional[CreateAzureCredentialDtoRegion] = None + api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey") + ] = None + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="fallbackIndex"), pydantic.Field(alias="fallbackIndex") + ] = None + bucket_plan: typing_extensions.Annotated[ + typing.Optional[AzureBlobStorageBucketPlan], + FieldMetadata(alias="bucketPlan"), + pydantic.Field(alias="bucketPlan"), + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_ByoSipTrunk(UncheckedBaseModel): + provider: typing.Literal["byo-sip-trunk"] = "byo-sip-trunk" + gateways: typing.List[SipTrunkGateway] + outbound_authentication_plan: typing_extensions.Annotated[ + typing.Optional[SipTrunkOutboundAuthenticationPlan], + FieldMetadata(alias="outboundAuthenticationPlan"), + pydantic.Field(alias="outboundAuthenticationPlan"), + ] = None + outbound_leading_plus_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="outboundLeadingPlusEnabled"), + pydantic.Field(alias="outboundLeadingPlusEnabled"), + ] = None + tech_prefix: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="techPrefix"), pydantic.Field(alias="techPrefix") + ] = None + sip_diversion_header: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipDiversionHeader"), pydantic.Field(alias="sipDiversionHeader") + ] = None + sbc_configuration: typing_extensions.Annotated[ + typing.Optional[SbcConfiguration], + FieldMetadata(alias="sbcConfiguration"), + pydantic.Field(alias="sbcConfiguration"), + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_Cartesia(UncheckedBaseModel): + provider: typing.Literal["cartesia"] = "cartesia" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_Cerebras(UncheckedBaseModel): + provider: typing.Literal["cerebras"] = "cerebras" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_Cloudflare(UncheckedBaseModel): + provider: typing.Literal["cloudflare"] = "cloudflare" + account_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="accountId"), pydantic.Field(alias="accountId") + ] = None + api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey") + ] = None + account_email: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="accountEmail"), pydantic.Field(alias="accountEmail") + ] = None + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="fallbackIndex"), pydantic.Field(alias="fallbackIndex") + ] = None + bucket_plan: typing_extensions.Annotated[ + typing.Optional[CloudflareR2BucketPlan], FieldMetadata(alias="bucketPlan"), pydantic.Field(alias="bucketPlan") + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_CustomLlm(UncheckedBaseModel): + provider: typing.Literal["custom-llm"] = "custom-llm" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + authentication_plan: typing_extensions.Annotated[ + typing.Optional[OAuth2AuthenticationPlan], + FieldMetadata(alias="authenticationPlan"), + pydantic.Field(alias="authenticationPlan"), + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_Deepgram(UncheckedBaseModel): + provider: typing.Literal["deepgram"] = "deepgram" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + api_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="apiUrl"), pydantic.Field(alias="apiUrl") + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_Deepinfra(UncheckedBaseModel): + provider: typing.Literal["deepinfra"] = "deepinfra" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_DeepSeek(UncheckedBaseModel): + provider: typing.Literal["deep-seek"] = "deep-seek" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_Gcp(UncheckedBaseModel): + provider: typing.Literal["gcp"] = "gcp" + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="fallbackIndex"), pydantic.Field(alias="fallbackIndex") + ] = None + gcp_key: typing_extensions.Annotated[GcpKey, FieldMetadata(alias="gcpKey"), pydantic.Field(alias="gcpKey")] + region: typing.Optional[str] = None + bucket_plan: typing_extensions.Annotated[ + typing.Optional[BucketPlan], FieldMetadata(alias="bucketPlan"), pydantic.Field(alias="bucketPlan") + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_Gladia(UncheckedBaseModel): + provider: typing.Literal["gladia"] = "gladia" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_Gohighlevel(UncheckedBaseModel): + provider: typing.Literal["gohighlevel"] = "gohighlevel" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_Google(UncheckedBaseModel): + provider: typing.Literal["google"] = "google" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_Groq(UncheckedBaseModel): + provider: typing.Literal["groq"] = "groq" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_InflectionAi(UncheckedBaseModel): + provider: typing.Literal["inflection-ai"] = "inflection-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_Langfuse(UncheckedBaseModel): + provider: typing.Literal["langfuse"] = "langfuse" + public_key: typing_extensions.Annotated[str, FieldMetadata(alias="publicKey"), pydantic.Field(alias="publicKey")] + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + api_url: typing_extensions.Annotated[str, FieldMetadata(alias="apiUrl"), pydantic.Field(alias="apiUrl")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_Lmnt(UncheckedBaseModel): + provider: typing.Literal["lmnt"] = "lmnt" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_Make(UncheckedBaseModel): + provider: typing.Literal["make"] = "make" + team_id: typing_extensions.Annotated[str, FieldMetadata(alias="teamId"), pydantic.Field(alias="teamId")] + region: str + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_Openai(UncheckedBaseModel): + provider: typing.Literal["openai"] = "openai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_Openrouter(UncheckedBaseModel): + provider: typing.Literal["openrouter"] = "openrouter" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_PerplexityAi(UncheckedBaseModel): + provider: typing.Literal["perplexity-ai"] = "perplexity-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_Playht(UncheckedBaseModel): + provider: typing.Literal["playht"] = "playht" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + user_id: typing_extensions.Annotated[str, FieldMetadata(alias="userId"), pydantic.Field(alias="userId")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_RimeAi(UncheckedBaseModel): + provider: typing.Literal["rime-ai"] = "rime-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_Runpod(UncheckedBaseModel): + provider: typing.Literal["runpod"] = "runpod" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_S3(UncheckedBaseModel): + provider: typing.Literal["s3"] = "s3" + aws_access_key_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="awsAccessKeyId"), pydantic.Field(alias="awsAccessKeyId") + ] + aws_secret_access_key: typing_extensions.Annotated[ + str, FieldMetadata(alias="awsSecretAccessKey"), pydantic.Field(alias="awsSecretAccessKey") + ] + region: str + s_3_bucket_name: typing_extensions.Annotated[ + str, FieldMetadata(alias="s3BucketName"), pydantic.Field(alias="s3BucketName") + ] + s_3_path_prefix: typing_extensions.Annotated[ + str, FieldMetadata(alias="s3PathPrefix"), pydantic.Field(alias="s3PathPrefix") + ] + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="fallbackIndex"), pydantic.Field(alias="fallbackIndex") + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_Supabase(UncheckedBaseModel): + provider: typing.Literal["supabase"] = "supabase" + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="fallbackIndex"), pydantic.Field(alias="fallbackIndex") + ] = None + bucket_plan: typing_extensions.Annotated[ + typing.Optional[SupabaseBucketPlan], FieldMetadata(alias="bucketPlan"), pydantic.Field(alias="bucketPlan") + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_SmallestAi(UncheckedBaseModel): + provider: typing.Literal["smallest-ai"] = "smallest-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_Tavus(UncheckedBaseModel): + provider: typing.Literal["tavus"] = "tavus" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_TogetherAi(UncheckedBaseModel): + provider: typing.Literal["together-ai"] = "together-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_Twilio(UncheckedBaseModel): + provider: typing.Literal["twilio"] = "twilio" + auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="authToken"), pydantic.Field(alias="authToken") + ] = None + api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey") + ] = None + api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="apiSecret"), pydantic.Field(alias="apiSecret") + ] = None + account_sid: typing_extensions.Annotated[str, FieldMetadata(alias="accountSid"), pydantic.Field(alias="accountSid")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_Vonage(UncheckedBaseModel): + provider: typing.Literal["vonage"] = "vonage" + api_secret: typing_extensions.Annotated[str, FieldMetadata(alias="apiSecret"), pydantic.Field(alias="apiSecret")] + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_Webhook(UncheckedBaseModel): + provider: typing.Literal["webhook"] = "webhook" + authentication_plan: typing_extensions.Annotated[ + CreateWebhookCredentialDtoAuthenticationPlan, + FieldMetadata(alias="authenticationPlan"), + pydantic.Field(alias="authenticationPlan"), + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_CustomCredential(UncheckedBaseModel): + provider: typing.Literal["custom-credential"] = "custom-credential" + authentication_plan: typing_extensions.Annotated[ + CreateCustomCredentialDtoAuthenticationPlan, + FieldMetadata(alias="authenticationPlan"), + pydantic.Field(alias="authenticationPlan"), + ] + encryption_plan: typing_extensions.Annotated[ + typing.Optional[CreateCustomCredentialDtoEncryptionPlan], + FieldMetadata(alias="encryptionPlan"), + pydantic.Field(alias="encryptionPlan"), + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_Xai(UncheckedBaseModel): + provider: typing.Literal["xai"] = "xai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_Neuphonic(UncheckedBaseModel): + provider: typing.Literal["neuphonic"] = "neuphonic" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_Hume(UncheckedBaseModel): + provider: typing.Literal["hume"] = "hume" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_Mistral(UncheckedBaseModel): + provider: typing.Literal["mistral"] = "mistral" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_Speechmatics(UncheckedBaseModel): + provider: typing.Literal["speechmatics"] = "speechmatics" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_Soniox(UncheckedBaseModel): + provider: typing.Literal["soniox"] = "soniox" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_Trieve(UncheckedBaseModel): + provider: typing.Literal["trieve"] = "trieve" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_GoogleCalendarOauth2Client(UncheckedBaseModel): + provider: typing.Literal["google.calendar.oauth2-client"] = "google.calendar.oauth2-client" + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_GoogleCalendarOauth2Authorization(UncheckedBaseModel): + provider: typing.Literal["google.calendar.oauth2-authorization"] = "google.calendar.oauth2-authorization" + authorization_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="authorizationId"), pydantic.Field(alias="authorizationId") + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_GoogleSheetsOauth2Authorization(UncheckedBaseModel): + provider: typing.Literal["google.sheets.oauth2-authorization"] = "google.sheets.oauth2-authorization" + authorization_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="authorizationId"), pydantic.Field(alias="authorizationId") + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_SlackOauth2Authorization(UncheckedBaseModel): + provider: typing.Literal["slack.oauth2-authorization"] = "slack.oauth2-authorization" + authorization_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="authorizationId"), pydantic.Field(alias="authorizationId") + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_GhlOauth2Authorization(UncheckedBaseModel): + provider: typing.Literal["ghl.oauth2-authorization"] = "ghl.oauth2-authorization" + authentication_session: typing_extensions.Annotated[ + Oauth2AuthenticationSession, + FieldMetadata(alias="authenticationSession"), + pydantic.Field(alias="authenticationSession"), + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_Inworld(UncheckedBaseModel): + provider: typing.Literal["inworld"] = "inworld" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_Minimax(UncheckedBaseModel): + provider: typing.Literal["minimax"] = "minimax" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + group_id: typing_extensions.Annotated[str, FieldMetadata(alias="groupId"), pydantic.Field(alias="groupId")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_Wellsaid(UncheckedBaseModel): + provider: typing.Literal["wellsaid"] = "wellsaid" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_Email(UncheckedBaseModel): + provider: typing.Literal["email"] = "email" + email: str + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesCredentialsItem_SlackWebhook(UncheckedBaseModel): + provider: typing.Literal["slack-webhook"] = "slack-webhook" + webhook_url: typing_extensions.Annotated[str, FieldMetadata(alias="webhookUrl"), pydantic.Field(alias="webhookUrl")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AssistantOverridesCredentialsItem = typing_extensions.Annotated[ + typing.Union[ + AssistantOverridesCredentialsItem_11Labs, + AssistantOverridesCredentialsItem_Anthropic, + AssistantOverridesCredentialsItem_AnthropicBedrock, + AssistantOverridesCredentialsItem_Anyscale, + AssistantOverridesCredentialsItem_AssemblyAi, + AssistantOverridesCredentialsItem_AzureOpenai, + AssistantOverridesCredentialsItem_Azure, + AssistantOverridesCredentialsItem_ByoSipTrunk, + AssistantOverridesCredentialsItem_Cartesia, + AssistantOverridesCredentialsItem_Cerebras, + AssistantOverridesCredentialsItem_Cloudflare, + AssistantOverridesCredentialsItem_CustomLlm, + AssistantOverridesCredentialsItem_Deepgram, + AssistantOverridesCredentialsItem_Deepinfra, + AssistantOverridesCredentialsItem_DeepSeek, + AssistantOverridesCredentialsItem_Gcp, + AssistantOverridesCredentialsItem_Gladia, + AssistantOverridesCredentialsItem_Gohighlevel, + AssistantOverridesCredentialsItem_Google, + AssistantOverridesCredentialsItem_Groq, + AssistantOverridesCredentialsItem_InflectionAi, + AssistantOverridesCredentialsItem_Langfuse, + AssistantOverridesCredentialsItem_Lmnt, + AssistantOverridesCredentialsItem_Make, + AssistantOverridesCredentialsItem_Openai, + AssistantOverridesCredentialsItem_Openrouter, + AssistantOverridesCredentialsItem_PerplexityAi, + AssistantOverridesCredentialsItem_Playht, + AssistantOverridesCredentialsItem_RimeAi, + AssistantOverridesCredentialsItem_Runpod, + AssistantOverridesCredentialsItem_S3, + AssistantOverridesCredentialsItem_Supabase, + AssistantOverridesCredentialsItem_SmallestAi, + AssistantOverridesCredentialsItem_Tavus, + AssistantOverridesCredentialsItem_TogetherAi, + AssistantOverridesCredentialsItem_Twilio, + AssistantOverridesCredentialsItem_Vonage, + AssistantOverridesCredentialsItem_Webhook, + AssistantOverridesCredentialsItem_CustomCredential, + AssistantOverridesCredentialsItem_Xai, + AssistantOverridesCredentialsItem_Neuphonic, + AssistantOverridesCredentialsItem_Hume, + AssistantOverridesCredentialsItem_Mistral, + AssistantOverridesCredentialsItem_Speechmatics, + AssistantOverridesCredentialsItem_Soniox, + AssistantOverridesCredentialsItem_Trieve, + AssistantOverridesCredentialsItem_GoogleCalendarOauth2Client, + AssistantOverridesCredentialsItem_GoogleCalendarOauth2Authorization, + AssistantOverridesCredentialsItem_GoogleSheetsOauth2Authorization, + AssistantOverridesCredentialsItem_SlackOauth2Authorization, + AssistantOverridesCredentialsItem_GhlOauth2Authorization, + AssistantOverridesCredentialsItem_Inworld, + AssistantOverridesCredentialsItem_Minimax, + AssistantOverridesCredentialsItem_Wellsaid, + AssistantOverridesCredentialsItem_Email, + AssistantOverridesCredentialsItem_SlackWebhook, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/assistant_overrides_hooks_item.py b/src/vapi/types/assistant_overrides_hooks_item.py new file mode 100644 index 00000000..29abb046 --- /dev/null +++ b/src/vapi/types/assistant_overrides_hooks_item.py @@ -0,0 +1,19 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +if typing.TYPE_CHECKING: + from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted + from .call_hook_call_ending import CallHookCallEnding + from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted + from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout + from .session_created_hook import SessionCreatedHook +AssistantOverridesHooksItem = typing.Union[ + "CallHookCallEnding", + "CallHookAssistantSpeechInterrupted", + "CallHookCustomerSpeechInterrupted", + "CallHookCustomerSpeechTimeout", + "SessionCreatedHook", +] diff --git a/src/vapi/types/assistant_overrides_model.py b/src/vapi/types/assistant_overrides_model.py index ec4c3191..c1079428 100644 --- a/src/vapi/types/assistant_overrides_model.py +++ b/src/vapi/types/assistant_overrides_model.py @@ -1,26 +1,1733 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .anyscale_model import AnyscaleModel -from .anthropic_model import AnthropicModel -from .custom_llm_model import CustomLlmModel -from .deep_infra_model import DeepInfraModel -from .groq_model import GroqModel -from .open_ai_model import OpenAiModel -from .open_router_model import OpenRouterModel -from .perplexity_ai_model import PerplexityAiModel -from .together_ai_model import TogetherAiModel -from .vapi_model import VapiModel - -AssistantOverridesModel = typing.Union[ - AnyscaleModel, - AnthropicModel, - CustomLlmModel, - DeepInfraModel, - GroqModel, - OpenAiModel, - OpenRouterModel, - PerplexityAiModel, - TogetherAiModel, - VapiModel, + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .anthropic_bedrock_model_model import AnthropicBedrockModelModel +from .anthropic_model_model import AnthropicModelModel +from .anthropic_thinking_config import AnthropicThinkingConfig +from .cerebras_model_model import CerebrasModelModel +from .create_custom_knowledge_base_dto import CreateCustomKnowledgeBaseDto +from .custom_llm_model_metadata_send_mode import CustomLlmModelMetadataSendMode +from .deep_seek_model_model import DeepSeekModelModel +from .google_model_model import GoogleModelModel +from .google_realtime_config import GoogleRealtimeConfig +from .groq_model_model import GroqModelModel +from .inflection_ai_model_model import InflectionAiModelModel +from .minimax_llm_model_model import MinimaxLlmModelModel +from .open_ai_message import OpenAiMessage +from .open_ai_model_fallback_models_item import OpenAiModelFallbackModelsItem +from .open_ai_model_model import OpenAiModelModel +from .open_ai_model_prompt_cache_retention import OpenAiModelPromptCacheRetention +from .open_ai_model_tool_strict_compatibility_mode import OpenAiModelToolStrictCompatibilityMode +from .xai_model_model import XaiModelModel + + +class AssistantOverridesModel_Anthropic(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["anthropic"] = "anthropic" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["AnthropicModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: AnthropicModelModel + thinking: typing.Optional[AnthropicThinkingConfig] = None + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesModel_AnthropicBedrock(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["anthropic-bedrock"] = "anthropic-bedrock" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["AnthropicBedrockModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: AnthropicBedrockModelModel + thinking: typing.Optional[AnthropicThinkingConfig] = None + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesModel_Anyscale(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["anyscale"] = "anyscale" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["AnyscaleModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: str + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesModel_Cerebras(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["cerebras"] = "cerebras" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["CerebrasModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: CerebrasModelModel + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesModel_CustomLlm(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["custom-llm"] = "custom-llm" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["CustomLlmModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + metadata_send_mode: typing_extensions.Annotated[ + typing.Optional[CustomLlmModelMetadataSendMode], + FieldMetadata(alias="metadataSendMode"), + pydantic.Field(alias="metadataSendMode"), + ] = None + headers: typing.Optional[typing.Dict[str, str]] = None + url: str + word_level_confidence_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="wordLevelConfidenceEnabled"), + pydantic.Field(alias="wordLevelConfidenceEnabled"), + ] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + model: str + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesModel_Deepinfra(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["deepinfra"] = "deepinfra" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["DeepInfraModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: str + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesModel_DeepSeek(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["deep-seek"] = "deep-seek" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["DeepSeekModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: DeepSeekModelModel + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesModel_Google(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["google"] = "google" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["GoogleModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: GoogleModelModel + realtime_config: typing_extensions.Annotated[ + typing.Optional[GoogleRealtimeConfig], + FieldMetadata(alias="realtimeConfig"), + pydantic.Field(alias="realtimeConfig"), + ] = None + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesModel_Groq(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["groq"] = "groq" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["GroqModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: GroqModelModel + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesModel_InflectionAi(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["inflection-ai"] = "inflection-ai" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["InflectionAiModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: InflectionAiModelModel + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesModel_Minimax(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["minimax"] = "minimax" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["MinimaxLlmModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: MinimaxLlmModelModel + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesModel_Openai(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["openai"] = "openai" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["OpenAiModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: OpenAiModelModel + fallback_models: typing_extensions.Annotated[ + typing.Optional[typing.List[OpenAiModelFallbackModelsItem]], + FieldMetadata(alias="fallbackModels"), + pydantic.Field(alias="fallbackModels"), + ] = None + tool_strict_compatibility_mode: typing_extensions.Annotated[ + typing.Optional[OpenAiModelToolStrictCompatibilityMode], + FieldMetadata(alias="toolStrictCompatibilityMode"), + pydantic.Field(alias="toolStrictCompatibilityMode"), + ] = None + prompt_cache_retention: typing_extensions.Annotated[ + typing.Optional[OpenAiModelPromptCacheRetention], + FieldMetadata(alias="promptCacheRetention"), + pydantic.Field(alias="promptCacheRetention"), + ] = None + prompt_cache_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="promptCacheKey"), pydantic.Field(alias="promptCacheKey") + ] = None + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesModel_Openrouter(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["openrouter"] = "openrouter" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["OpenRouterModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: str + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesModel_PerplexityAi(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["perplexity-ai"] = "perplexity-ai" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["PerplexityAiModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: str + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesModel_TogetherAi(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["together-ai"] = "together-ai" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["TogetherAiModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: str + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesModel_Xai(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["xai"] = "xai" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["XaiModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: XaiModelModel + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AssistantOverridesModel = typing_extensions.Annotated[ + typing.Union[ + AssistantOverridesModel_Anthropic, + AssistantOverridesModel_AnthropicBedrock, + AssistantOverridesModel_Anyscale, + AssistantOverridesModel_Cerebras, + AssistantOverridesModel_CustomLlm, + AssistantOverridesModel_Deepinfra, + AssistantOverridesModel_DeepSeek, + AssistantOverridesModel_Google, + AssistantOverridesModel_Groq, + AssistantOverridesModel_InflectionAi, + AssistantOverridesModel_Minimax, + AssistantOverridesModel_Openai, + AssistantOverridesModel_Openrouter, + AssistantOverridesModel_PerplexityAi, + AssistantOverridesModel_TogetherAi, + AssistantOverridesModel_Xai, + ], + UnionMetadata(discriminant="provider"), ] +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 + +update_forward_refs( + AssistantOverridesModel_Anthropic, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + AssistantOverridesModel_AnthropicBedrock, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + AssistantOverridesModel_Anyscale, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + AssistantOverridesModel_Cerebras, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + AssistantOverridesModel_CustomLlm, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + AssistantOverridesModel_Deepinfra, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + AssistantOverridesModel_DeepSeek, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + AssistantOverridesModel_Google, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + AssistantOverridesModel_Groq, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + AssistantOverridesModel_InflectionAi, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + AssistantOverridesModel_Minimax, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + AssistantOverridesModel_Openai, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + AssistantOverridesModel_Openrouter, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + AssistantOverridesModel_PerplexityAi, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + AssistantOverridesModel_TogetherAi, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + AssistantOverridesModel_Xai, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/assistant_overrides_server_messages_item.py b/src/vapi/types/assistant_overrides_server_messages_item.py index 63dc5312..9673f660 100644 --- a/src/vapi/types/assistant_overrides_server_messages_item.py +++ b/src/vapi/types/assistant_overrides_server_messages_item.py @@ -9,6 +9,7 @@ "function-call", "hang", "language-changed", + "language-change-detected", "model-output", "phone-call-control", "speech-update", diff --git a/src/vapi/types/assistant_overrides_tools_append_item.py b/src/vapi/types/assistant_overrides_tools_append_item.py new file mode 100644 index 00000000..bfd9b792 --- /dev/null +++ b/src/vapi/types/assistant_overrides_tools_append_item.py @@ -0,0 +1,731 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .backoff_plan import BackoffPlan +from .code_tool_environment_variable import CodeToolEnvironmentVariable +from .create_api_request_tool_dto_messages_item import CreateApiRequestToolDtoMessagesItem +from .create_api_request_tool_dto_method import CreateApiRequestToolDtoMethod +from .create_bash_tool_dto_messages_item import CreateBashToolDtoMessagesItem +from .create_bash_tool_dto_name import CreateBashToolDtoName +from .create_bash_tool_dto_sub_type import CreateBashToolDtoSubType +from .create_code_tool_dto_messages_item import CreateCodeToolDtoMessagesItem +from .create_computer_tool_dto_messages_item import CreateComputerToolDtoMessagesItem +from .create_computer_tool_dto_name import CreateComputerToolDtoName +from .create_computer_tool_dto_sub_type import CreateComputerToolDtoSubType +from .create_dtmf_tool_dto_messages_item import CreateDtmfToolDtoMessagesItem +from .create_end_call_tool_dto_messages_item import CreateEndCallToolDtoMessagesItem +from .create_function_tool_dto_messages_item import CreateFunctionToolDtoMessagesItem +from .create_go_high_level_calendar_availability_tool_dto_messages_item import ( + CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem, +) +from .create_go_high_level_calendar_event_create_tool_dto_messages_item import ( + CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_create_tool_dto_messages_item import ( + CreateGoHighLevelContactCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_get_tool_dto_messages_item import CreateGoHighLevelContactGetToolDtoMessagesItem +from .create_google_calendar_check_availability_tool_dto_messages_item import ( + CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem, +) +from .create_google_calendar_create_event_tool_dto_messages_item import ( + CreateGoogleCalendarCreateEventToolDtoMessagesItem, +) +from .create_google_sheets_row_append_tool_dto_messages_item import CreateGoogleSheetsRowAppendToolDtoMessagesItem +from .create_handoff_tool_dto_messages_item import CreateHandoffToolDtoMessagesItem +from .create_mcp_tool_dto_messages_item import CreateMcpToolDtoMessagesItem +from .create_query_tool_dto_messages_item import CreateQueryToolDtoMessagesItem +from .create_sip_request_tool_dto_body import CreateSipRequestToolDtoBody +from .create_sip_request_tool_dto_messages_item import CreateSipRequestToolDtoMessagesItem +from .create_sip_request_tool_dto_verb import CreateSipRequestToolDtoVerb +from .create_slack_send_message_tool_dto_messages_item import CreateSlackSendMessageToolDtoMessagesItem +from .create_sms_tool_dto_messages_item import CreateSmsToolDtoMessagesItem +from .create_text_editor_tool_dto_messages_item import CreateTextEditorToolDtoMessagesItem +from .create_text_editor_tool_dto_name import CreateTextEditorToolDtoName +from .create_text_editor_tool_dto_sub_type import CreateTextEditorToolDtoSubType +from .create_transfer_call_tool_dto_destinations_item import CreateTransferCallToolDtoDestinationsItem +from .create_transfer_call_tool_dto_messages_item import CreateTransferCallToolDtoMessagesItem +from .create_voicemail_tool_dto_messages_item import CreateVoicemailToolDtoMessagesItem +from .knowledge_base import KnowledgeBase +from .mcp_tool_messages import McpToolMessages +from .mcp_tool_metadata import McpToolMetadata +from .open_ai_function import OpenAiFunction +from .server import Server +from .tool_parameter import ToolParameter +from .tool_rejection_plan import ToolRejectionPlan +from .variable_extraction_plan import VariableExtractionPlan + + +class AssistantOverridesToolsAppendItem_ApiRequest(UncheckedBaseModel): + type: typing.Literal["apiRequest"] = "apiRequest" + messages: typing.Optional[typing.List[CreateApiRequestToolDtoMessagesItem]] = None + method: CreateApiRequestToolDtoMethod + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + encrypted_paths: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="encryptedPaths"), pydantic.Field(alias="encryptedPaths") + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + name: typing.Optional[str] = None + description: typing.Optional[str] = None + url: str + body: typing.Optional["JsonSchema"] = None + headers: typing.Optional["JsonSchema"] = None + backoff_plan: typing_extensions.Annotated[ + typing.Optional[BackoffPlan], FieldMetadata(alias="backoffPlan"), pydantic.Field(alias="backoffPlan") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesToolsAppendItem_Bash(UncheckedBaseModel): + type: typing.Literal["bash"] = "bash" + messages: typing.Optional[typing.List[CreateBashToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateBashToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateBashToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesToolsAppendItem_Code(UncheckedBaseModel): + type: typing.Literal["code"] = "code" + messages: typing.Optional[typing.List[CreateCodeToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + code: str + environment_variables: typing_extensions.Annotated[ + typing.Optional[typing.List[CodeToolEnvironmentVariable]], + FieldMetadata(alias="environmentVariables"), + pydantic.Field(alias="environmentVariables"), + ] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesToolsAppendItem_Computer(UncheckedBaseModel): + type: typing.Literal["computer"] = "computer" + messages: typing.Optional[typing.List[CreateComputerToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateComputerToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateComputerToolDtoName + display_width_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayWidthPx"), pydantic.Field(alias="displayWidthPx") + ] + display_height_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayHeightPx"), pydantic.Field(alias="displayHeightPx") + ] + display_number: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="displayNumber"), pydantic.Field(alias="displayNumber") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesToolsAppendItem_Dtmf(UncheckedBaseModel): + type: typing.Literal["dtmf"] = "dtmf" + messages: typing.Optional[typing.List[CreateDtmfToolDtoMessagesItem]] = None + sip_info_dtmf_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="sipInfoDtmfEnabled"), pydantic.Field(alias="sipInfoDtmfEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesToolsAppendItem_EndCall(UncheckedBaseModel): + type: typing.Literal["endCall"] = "endCall" + messages: typing.Optional[typing.List[CreateEndCallToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesToolsAppendItem_Function(UncheckedBaseModel): + type: typing.Literal["function"] = "function" + messages: typing.Optional[typing.List[CreateFunctionToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesToolsAppendItem_GohighlevelCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.availability.check"] = "gohighlevel.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesToolsAppendItem_GohighlevelCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.event.create"] = "gohighlevel.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesToolsAppendItem_GohighlevelContactCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.create"] = "gohighlevel.contact.create" + messages: typing.Optional[typing.List[CreateGoHighLevelContactCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesToolsAppendItem_GohighlevelContactGet(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.get"] = "gohighlevel.contact.get" + messages: typing.Optional[typing.List[CreateGoHighLevelContactGetToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesToolsAppendItem_GoogleCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["google.calendar.availability.check"] = "google.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesToolsAppendItem_GoogleCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["google.calendar.event.create"] = "google.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoogleCalendarCreateEventToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesToolsAppendItem_GoogleSheetsRowAppend(UncheckedBaseModel): + type: typing.Literal["google.sheets.row.append"] = "google.sheets.row.append" + messages: typing.Optional[typing.List[CreateGoogleSheetsRowAppendToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesToolsAppendItem_Handoff(UncheckedBaseModel): + type: typing.Literal["handoff"] = "handoff" + messages: typing.Optional[typing.List[CreateHandoffToolDtoMessagesItem]] = None + default_result: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="defaultResult"), pydantic.Field(alias="defaultResult") + ] = None + destinations: typing.Optional[typing.List["CreateHandoffToolDtoDestinationsItem"]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesToolsAppendItem_Mcp(UncheckedBaseModel): + type: typing.Literal["mcp"] = "mcp" + messages: typing.Optional[typing.List[CreateMcpToolDtoMessagesItem]] = None + server: typing.Optional[Server] = None + tool_messages: typing_extensions.Annotated[ + typing.Optional[typing.List[McpToolMessages]], + FieldMetadata(alias="toolMessages"), + pydantic.Field(alias="toolMessages"), + ] = None + metadata: typing.Optional[McpToolMetadata] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesToolsAppendItem_Query(UncheckedBaseModel): + type: typing.Literal["query"] = "query" + messages: typing.Optional[typing.List[CreateQueryToolDtoMessagesItem]] = None + knowledge_bases: typing_extensions.Annotated[ + typing.Optional[typing.List[KnowledgeBase]], + FieldMetadata(alias="knowledgeBases"), + pydantic.Field(alias="knowledgeBases"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesToolsAppendItem_SlackMessageSend(UncheckedBaseModel): + type: typing.Literal["slack.message.send"] = "slack.message.send" + messages: typing.Optional[typing.List[CreateSlackSendMessageToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesToolsAppendItem_Sms(UncheckedBaseModel): + type: typing.Literal["sms"] = "sms" + messages: typing.Optional[typing.List[CreateSmsToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesToolsAppendItem_TextEditor(UncheckedBaseModel): + type: typing.Literal["textEditor"] = "textEditor" + messages: typing.Optional[typing.List[CreateTextEditorToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateTextEditorToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateTextEditorToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesToolsAppendItem_TransferCall(UncheckedBaseModel): + type: typing.Literal["transferCall"] = "transferCall" + messages: typing.Optional[typing.List[CreateTransferCallToolDtoMessagesItem]] = None + destinations: typing.Optional[typing.List[CreateTransferCallToolDtoDestinationsItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesToolsAppendItem_SipRequest(UncheckedBaseModel): + type: typing.Literal["sipRequest"] = "sipRequest" + messages: typing.Optional[typing.List[CreateSipRequestToolDtoMessagesItem]] = None + verb: CreateSipRequestToolDtoVerb + headers: typing.Optional["JsonSchema"] = None + body: typing.Optional[CreateSipRequestToolDtoBody] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesToolsAppendItem_Voicemail(UncheckedBaseModel): + type: typing.Literal["voicemail"] = "voicemail" + messages: typing.Optional[typing.List[CreateVoicemailToolDtoMessagesItem]] = None + beep_detection_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="beepDetectionEnabled"), pydantic.Field(alias="beepDetectionEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AssistantOverridesToolsAppendItem = typing_extensions.Annotated[ + typing.Union[ + AssistantOverridesToolsAppendItem_ApiRequest, + AssistantOverridesToolsAppendItem_Bash, + AssistantOverridesToolsAppendItem_Code, + AssistantOverridesToolsAppendItem_Computer, + AssistantOverridesToolsAppendItem_Dtmf, + AssistantOverridesToolsAppendItem_EndCall, + AssistantOverridesToolsAppendItem_Function, + AssistantOverridesToolsAppendItem_GohighlevelCalendarAvailabilityCheck, + AssistantOverridesToolsAppendItem_GohighlevelCalendarEventCreate, + AssistantOverridesToolsAppendItem_GohighlevelContactCreate, + AssistantOverridesToolsAppendItem_GohighlevelContactGet, + AssistantOverridesToolsAppendItem_GoogleCalendarAvailabilityCheck, + AssistantOverridesToolsAppendItem_GoogleCalendarEventCreate, + AssistantOverridesToolsAppendItem_GoogleSheetsRowAppend, + AssistantOverridesToolsAppendItem_Handoff, + AssistantOverridesToolsAppendItem_Mcp, + AssistantOverridesToolsAppendItem_Query, + AssistantOverridesToolsAppendItem_SlackMessageSend, + AssistantOverridesToolsAppendItem_Sms, + AssistantOverridesToolsAppendItem_TextEditor, + AssistantOverridesToolsAppendItem_TransferCall, + AssistantOverridesToolsAppendItem_SipRequest, + AssistantOverridesToolsAppendItem_Voicemail, + ], + UnionMetadata(discriminant="type"), +] +from .json_schema import JsonSchema # noqa: E402, I001 +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs(AssistantOverridesToolsAppendItem_ApiRequest, JsonSchema=JsonSchema) +update_forward_refs(AssistantOverridesToolsAppendItem_Bash) +update_forward_refs(AssistantOverridesToolsAppendItem_Code) +update_forward_refs(AssistantOverridesToolsAppendItem_Computer) +update_forward_refs(AssistantOverridesToolsAppendItem_Dtmf) +update_forward_refs(AssistantOverridesToolsAppendItem_EndCall) +update_forward_refs(AssistantOverridesToolsAppendItem_Function) +update_forward_refs(AssistantOverridesToolsAppendItem_GohighlevelCalendarAvailabilityCheck) +update_forward_refs(AssistantOverridesToolsAppendItem_GohighlevelCalendarEventCreate) +update_forward_refs(AssistantOverridesToolsAppendItem_GohighlevelContactCreate) +update_forward_refs(AssistantOverridesToolsAppendItem_GohighlevelContactGet) +update_forward_refs(AssistantOverridesToolsAppendItem_GoogleCalendarAvailabilityCheck) +update_forward_refs(AssistantOverridesToolsAppendItem_GoogleCalendarEventCreate) +update_forward_refs(AssistantOverridesToolsAppendItem_GoogleSheetsRowAppend) +update_forward_refs( + AssistantOverridesToolsAppendItem_Handoff, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs(AssistantOverridesToolsAppendItem_Mcp) +update_forward_refs(AssistantOverridesToolsAppendItem_Query) +update_forward_refs(AssistantOverridesToolsAppendItem_SlackMessageSend) +update_forward_refs(AssistantOverridesToolsAppendItem_Sms) +update_forward_refs(AssistantOverridesToolsAppendItem_TextEditor) +update_forward_refs(AssistantOverridesToolsAppendItem_TransferCall) +update_forward_refs(AssistantOverridesToolsAppendItem_SipRequest, JsonSchema=JsonSchema) +update_forward_refs(AssistantOverridesToolsAppendItem_Voicemail) diff --git a/src/vapi/types/assistant_overrides_transcriber.py b/src/vapi/types/assistant_overrides_transcriber.py index 9f2168e3..5cfe10c4 100644 --- a/src/vapi/types/assistant_overrides_transcriber.py +++ b/src/vapi/types/assistant_overrides_transcriber.py @@ -1,8 +1,538 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .deepgram_transcriber import DeepgramTranscriber -from .gladia_transcriber import GladiaTranscriber -from .talkscriber_transcriber import TalkscriberTranscriber -AssistantOverridesTranscriber = typing.Union[DeepgramTranscriber, GladiaTranscriber, TalkscriberTranscriber] +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .assembly_ai_transcriber_language import AssemblyAiTranscriberLanguage +from .assembly_ai_transcriber_speech_model import AssemblyAiTranscriberSpeechModel +from .azure_speech_transcriber_language import AzureSpeechTranscriberLanguage +from .azure_speech_transcriber_segmentation_strategy import AzureSpeechTranscriberSegmentationStrategy +from .cartesia_transcriber_language import CartesiaTranscriberLanguage +from .cartesia_transcriber_model import CartesiaTranscriberModel +from .deepgram_transcriber_language import DeepgramTranscriberLanguage +from .deepgram_transcriber_model import DeepgramTranscriberModel +from .eleven_labs_transcriber_language import ElevenLabsTranscriberLanguage +from .eleven_labs_transcriber_model import ElevenLabsTranscriberModel +from .fallback_transcriber_plan import FallbackTranscriberPlan +from .gladia_custom_vocabulary_config_dto import GladiaCustomVocabularyConfigDto +from .gladia_transcriber_language import GladiaTranscriberLanguage +from .gladia_transcriber_language_behaviour import GladiaTranscriberLanguageBehaviour +from .gladia_transcriber_languages import GladiaTranscriberLanguages +from .gladia_transcriber_model import GladiaTranscriberModel +from .gladia_transcriber_region import GladiaTranscriberRegion +from .google_transcriber_language import GoogleTranscriberLanguage +from .google_transcriber_model import GoogleTranscriberModel +from .open_ai_transcriber_language import OpenAiTranscriberLanguage +from .open_ai_transcriber_model import OpenAiTranscriberModel +from .server import Server +from .soniox_transcriber_language import SonioxTranscriberLanguage +from .soniox_transcriber_model import SonioxTranscriberModel +from .speechmatics_custom_vocabulary_item import SpeechmaticsCustomVocabularyItem +from .speechmatics_transcriber_language import SpeechmaticsTranscriberLanguage +from .speechmatics_transcriber_model import SpeechmaticsTranscriberModel +from .speechmatics_transcriber_numeral_style import SpeechmaticsTranscriberNumeralStyle +from .speechmatics_transcriber_operating_point import SpeechmaticsTranscriberOperatingPoint +from .speechmatics_transcriber_region import SpeechmaticsTranscriberRegion +from .talkscriber_transcriber_language import TalkscriberTranscriberLanguage +from .talkscriber_transcriber_model import TalkscriberTranscriberModel + + +class AssistantOverridesTranscriber_AssemblyAi(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["assembly-ai"] = "assembly-ai" + language: typing.Optional[AssemblyAiTranscriberLanguage] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="confidenceThreshold"), pydantic.Field(alias="confidenceThreshold") + ] = None + format_turns: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="formatTurns"), pydantic.Field(alias="formatTurns") + ] = None + end_of_turn_confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="endOfTurnConfidenceThreshold"), + pydantic.Field(alias="endOfTurnConfidenceThreshold"), + ] = None + min_end_of_turn_silence_when_confident: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minEndOfTurnSilenceWhenConfident"), + pydantic.Field(alias="minEndOfTurnSilenceWhenConfident"), + ] = None + word_finalization_max_wait_time: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="wordFinalizationMaxWaitTime"), + pydantic.Field(alias="wordFinalizationMaxWaitTime"), + ] = None + max_turn_silence: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTurnSilence"), pydantic.Field(alias="maxTurnSilence") + ] = None + vad_assisted_endpointing_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="vadAssistedEndpointingEnabled"), + pydantic.Field(alias="vadAssistedEndpointingEnabled"), + ] = None + speech_model: typing_extensions.Annotated[ + typing.Optional[AssemblyAiTranscriberSpeechModel], + FieldMetadata(alias="speechModel"), + pydantic.Field(alias="speechModel"), + ] = None + realtime_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="realtimeUrl"), pydantic.Field(alias="realtimeUrl") + ] = None + word_boost: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="wordBoost"), pydantic.Field(alias="wordBoost") + ] = None + keyterms_prompt: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="keytermsPrompt"), pydantic.Field(alias="keytermsPrompt") + ] = None + end_utterance_silence_threshold: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="endUtteranceSilenceThreshold"), + pydantic.Field(alias="endUtteranceSilenceThreshold"), + ] = None + disable_partial_transcripts: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="disablePartialTranscripts"), + pydantic.Field(alias="disablePartialTranscripts"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesTranscriber_Azure(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["azure"] = "azure" + language: typing.Optional[AzureSpeechTranscriberLanguage] = None + segmentation_strategy: typing_extensions.Annotated[ + typing.Optional[AzureSpeechTranscriberSegmentationStrategy], + FieldMetadata(alias="segmentationStrategy"), + pydantic.Field(alias="segmentationStrategy"), + ] = None + segmentation_silence_timeout_ms: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="segmentationSilenceTimeoutMs"), + pydantic.Field(alias="segmentationSilenceTimeoutMs"), + ] = None + segmentation_maximum_time_ms: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="segmentationMaximumTimeMs"), + pydantic.Field(alias="segmentationMaximumTimeMs"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesTranscriber_CustomTranscriber(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["custom-transcriber"] = "custom-transcriber" + server: Server + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesTranscriber_Deepgram(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["deepgram"] = "deepgram" + model: typing.Optional[DeepgramTranscriberModel] = None + language: typing.Optional[DeepgramTranscriberLanguage] = None + smart_format: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smartFormat"), pydantic.Field(alias="smartFormat") + ] = None + mip_opt_out: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="mipOptOut"), pydantic.Field(alias="mipOptOut") + ] = None + numerals: typing.Optional[bool] = None + profanity_filter: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="profanityFilter"), pydantic.Field(alias="profanityFilter") + ] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="confidenceThreshold"), pydantic.Field(alias="confidenceThreshold") + ] = None + eager_eot_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="eagerEotThreshold"), pydantic.Field(alias="eagerEotThreshold") + ] = None + eot_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="eotThreshold"), pydantic.Field(alias="eotThreshold") + ] = None + eot_timeout_ms: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="eotTimeoutMs"), pydantic.Field(alias="eotTimeoutMs") + ] = None + keywords: typing.Optional[typing.List[str]] = None + keyterm: typing.Optional[typing.List[str]] = None + endpointing: typing.Optional[float] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesTranscriber_11Labs(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["11labs"] = "11labs" + model: typing.Optional[ElevenLabsTranscriberModel] = None + language: typing.Optional[ElevenLabsTranscriberLanguage] = None + silence_threshold_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="silenceThresholdSeconds"), + pydantic.Field(alias="silenceThresholdSeconds"), + ] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="confidenceThreshold"), pydantic.Field(alias="confidenceThreshold") + ] = None + min_speech_duration_ms: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="minSpeechDurationMs"), pydantic.Field(alias="minSpeechDurationMs") + ] = None + min_silence_duration_ms: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minSilenceDurationMs"), + pydantic.Field(alias="minSilenceDurationMs"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesTranscriber_Gladia(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["gladia"] = "gladia" + model: typing.Optional[GladiaTranscriberModel] = None + language_behaviour: typing_extensions.Annotated[ + typing.Optional[GladiaTranscriberLanguageBehaviour], + FieldMetadata(alias="languageBehaviour"), + pydantic.Field(alias="languageBehaviour"), + ] = None + language: typing.Optional[GladiaTranscriberLanguage] = None + languages: typing.Optional[GladiaTranscriberLanguages] = None + transcription_hint: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="transcriptionHint"), pydantic.Field(alias="transcriptionHint") + ] = None + prosody: typing.Optional[bool] = None + audio_enhancer: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="audioEnhancer"), pydantic.Field(alias="audioEnhancer") + ] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="confidenceThreshold"), pydantic.Field(alias="confidenceThreshold") + ] = None + endpointing: typing.Optional[float] = None + speech_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="speechThreshold"), pydantic.Field(alias="speechThreshold") + ] = None + custom_vocabulary_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="customVocabularyEnabled"), + pydantic.Field(alias="customVocabularyEnabled"), + ] = None + custom_vocabulary_config: typing_extensions.Annotated[ + typing.Optional[GladiaCustomVocabularyConfigDto], + FieldMetadata(alias="customVocabularyConfig"), + pydantic.Field(alias="customVocabularyConfig"), + ] = None + region: typing.Optional[GladiaTranscriberRegion] = None + receive_partial_transcripts: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="receivePartialTranscripts"), + pydantic.Field(alias="receivePartialTranscripts"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesTranscriber_Google(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["google"] = "google" + model: typing.Optional[GoogleTranscriberModel] = None + language: typing.Optional[GoogleTranscriberLanguage] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesTranscriber_Speechmatics(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["speechmatics"] = "speechmatics" + model: typing.Optional[SpeechmaticsTranscriberModel] = None + language: typing.Optional[SpeechmaticsTranscriberLanguage] = None + operating_point: typing_extensions.Annotated[ + typing.Optional[SpeechmaticsTranscriberOperatingPoint], + FieldMetadata(alias="operatingPoint"), + pydantic.Field(alias="operatingPoint"), + ] = None + region: typing.Optional[SpeechmaticsTranscriberRegion] = None + enable_diarization: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="enableDiarization"), pydantic.Field(alias="enableDiarization") + ] = None + max_delay: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxDelay"), pydantic.Field(alias="maxDelay") + ] = None + custom_vocabulary: typing_extensions.Annotated[ + typing.List[SpeechmaticsCustomVocabularyItem], + FieldMetadata(alias="customVocabulary"), + pydantic.Field(alias="customVocabulary"), + ] + numeral_style: typing_extensions.Annotated[ + typing.Optional[SpeechmaticsTranscriberNumeralStyle], + FieldMetadata(alias="numeralStyle"), + pydantic.Field(alias="numeralStyle"), + ] = None + end_of_turn_sensitivity: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="endOfTurnSensitivity"), + pydantic.Field(alias="endOfTurnSensitivity"), + ] = None + remove_disfluencies: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="removeDisfluencies"), pydantic.Field(alias="removeDisfluencies") + ] = None + minimum_speech_duration: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minimumSpeechDuration"), + pydantic.Field(alias="minimumSpeechDuration"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesTranscriber_Talkscriber(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["talkscriber"] = "talkscriber" + model: typing.Optional[TalkscriberTranscriberModel] = None + language: typing.Optional[TalkscriberTranscriberLanguage] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesTranscriber_Openai(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["openai"] = "openai" + model: OpenAiTranscriberModel + language: typing.Optional[OpenAiTranscriberLanguage] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesTranscriber_Cartesia(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["cartesia"] = "cartesia" + model: typing.Optional[CartesiaTranscriberModel] = None + language: typing.Optional[CartesiaTranscriberLanguage] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesTranscriber_Soniox(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["soniox"] = "soniox" + model: typing.Optional[SonioxTranscriberModel] = None + language: typing.Optional[SonioxTranscriberLanguage] = None + language_hints_strict: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="languageHintsStrict"), pydantic.Field(alias="languageHintsStrict") + ] = None + max_endpoint_delay_ms: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxEndpointDelayMs"), pydantic.Field(alias="maxEndpointDelayMs") + ] = None + custom_vocabulary: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="customVocabulary"), + pydantic.Field(alias="customVocabulary"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AssistantOverridesTranscriber = typing_extensions.Annotated[ + typing.Union[ + AssistantOverridesTranscriber_AssemblyAi, + AssistantOverridesTranscriber_Azure, + AssistantOverridesTranscriber_CustomTranscriber, + AssistantOverridesTranscriber_Deepgram, + AssistantOverridesTranscriber_11Labs, + AssistantOverridesTranscriber_Gladia, + AssistantOverridesTranscriber_Google, + AssistantOverridesTranscriber_Speechmatics, + AssistantOverridesTranscriber_Talkscriber, + AssistantOverridesTranscriber_Openai, + AssistantOverridesTranscriber_Cartesia, + AssistantOverridesTranscriber_Soniox, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/assistant_overrides_voice.py b/src/vapi/types/assistant_overrides_voice.py index 9c7edb40..e21f113b 100644 --- a/src/vapi/types/assistant_overrides_voice.py +++ b/src/vapi/types/assistant_overrides_voice.py @@ -1,24 +1,740 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .azure_voice import AzureVoice -from .cartesia_voice import CartesiaVoice -from .deepgram_voice import DeepgramVoice -from .eleven_labs_voice import ElevenLabsVoice -from .lmnt_voice import LmntVoice -from .neets_voice import NeetsVoice -from .open_ai_voice import OpenAiVoice -from .play_ht_voice import PlayHtVoice -from .rime_ai_voice import RimeAiVoice - -AssistantOverridesVoice = typing.Union[ - AzureVoice, - CartesiaVoice, - DeepgramVoice, - ElevenLabsVoice, - LmntVoice, - NeetsVoice, - OpenAiVoice, - PlayHtVoice, - RimeAiVoice, + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .azure_voice_id import AzureVoiceId +from .cartesia_experimental_controls import CartesiaExperimentalControls +from .cartesia_generation_config import CartesiaGenerationConfig +from .cartesia_voice_language import CartesiaVoiceLanguage +from .cartesia_voice_model import CartesiaVoiceModel +from .chunk_plan import ChunkPlan +from .deepgram_voice_id import DeepgramVoiceId +from .deepgram_voice_model import DeepgramVoiceModel +from .eleven_labs_pronunciation_dictionary_locator import ElevenLabsPronunciationDictionaryLocator +from .eleven_labs_voice_id import ElevenLabsVoiceId +from .eleven_labs_voice_model import ElevenLabsVoiceModel +from .fallback_plan import FallbackPlan +from .hume_voice_model import HumeVoiceModel +from .inworld_voice_language_code import InworldVoiceLanguageCode +from .inworld_voice_model import InworldVoiceModel +from .inworld_voice_voice_id import InworldVoiceVoiceId +from .lmnt_voice_id import LmntVoiceId +from .lmnt_voice_language import LmntVoiceLanguage +from .minimax_voice_language_boost import MinimaxVoiceLanguageBoost +from .minimax_voice_model import MinimaxVoiceModel +from .minimax_voice_region import MinimaxVoiceRegion +from .minimax_voice_subtitle_type import MinimaxVoiceSubtitleType +from .neuphonic_voice_model import NeuphonicVoiceModel +from .open_ai_voice_id import OpenAiVoiceId +from .open_ai_voice_model import OpenAiVoiceModel +from .play_ht_voice_emotion import PlayHtVoiceEmotion +from .play_ht_voice_id import PlayHtVoiceId +from .play_ht_voice_language import PlayHtVoiceLanguage +from .play_ht_voice_model import PlayHtVoiceModel +from .rime_ai_voice_id import RimeAiVoiceId +from .rime_ai_voice_language import RimeAiVoiceLanguage +from .rime_ai_voice_model import RimeAiVoiceModel +from .server import Server +from .sesame_voice_model import SesameVoiceModel +from .smallest_ai_voice_id import SmallestAiVoiceId +from .smallest_ai_voice_model import SmallestAiVoiceModel +from .tavus_conversation_properties import TavusConversationProperties +from .tavus_voice_voice_id import TavusVoiceVoiceId +from .vapi_pronunciation_dictionary_locator import VapiPronunciationDictionaryLocator +from .vapi_voice_voice_id import VapiVoiceVoiceId +from .well_said_voice_model import WellSaidVoiceModel + + +class AssistantOverridesVoice_Azure(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["azure"] = "azure" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[AzureVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + speed: typing.Optional[float] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesVoice_Cartesia(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["cartesia"] = "cartesia" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[CartesiaVoiceModel] = None + language: typing.Optional[CartesiaVoiceLanguage] = None + experimental_controls: typing_extensions.Annotated[ + typing.Optional[CartesiaExperimentalControls], + FieldMetadata(alias="experimentalControls"), + pydantic.Field(alias="experimentalControls"), + ] = None + generation_config: typing_extensions.Annotated[ + typing.Optional[CartesiaGenerationConfig], + FieldMetadata(alias="generationConfig"), + pydantic.Field(alias="generationConfig"), + ] = None + pronunciation_dict_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="pronunciationDictId"), pydantic.Field(alias="pronunciationDictId") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesVoice_CustomVoice(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["custom-voice"] = "custom-voice" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + server: Server + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesVoice_Deepgram(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["deepgram"] = "deepgram" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + DeepgramVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[DeepgramVoiceModel] = None + mip_opt_out: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="mipOptOut"), pydantic.Field(alias="mipOptOut") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesVoice_11Labs(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["11labs"] = "11labs" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + ElevenLabsVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + stability: typing.Optional[float] = None + similarity_boost: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="similarityBoost"), pydantic.Field(alias="similarityBoost") + ] = None + style: typing.Optional[float] = None + use_speaker_boost: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="useSpeakerBoost"), pydantic.Field(alias="useSpeakerBoost") + ] = None + speed: typing.Optional[float] = None + optimize_streaming_latency: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="optimizeStreamingLatency"), + pydantic.Field(alias="optimizeStreamingLatency"), + ] = None + enable_ssml_parsing: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="enableSsmlParsing"), pydantic.Field(alias="enableSsmlParsing") + ] = None + auto_mode: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="autoMode"), pydantic.Field(alias="autoMode") + ] = None + model: typing.Optional[ElevenLabsVoiceModel] = None + language: typing.Optional[str] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + pronunciation_dictionary_locators: typing_extensions.Annotated[ + typing.Optional[typing.List[ElevenLabsPronunciationDictionaryLocator]], + FieldMetadata(alias="pronunciationDictionaryLocators"), + pydantic.Field(alias="pronunciationDictionaryLocators"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesVoice_Hume(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["hume"] = "hume" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + model: typing.Optional[HumeVoiceModel] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + is_custom_hume_voice: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="isCustomHumeVoice"), pydantic.Field(alias="isCustomHumeVoice") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + description: typing.Optional[str] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesVoice_Lmnt(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["lmnt"] = "lmnt" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[LmntVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + speed: typing.Optional[float] = None + language: typing.Optional[LmntVoiceLanguage] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesVoice_Neuphonic(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["neuphonic"] = "neuphonic" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[NeuphonicVoiceModel] = None + language: typing.Dict[str, typing.Any] + speed: typing.Optional[float] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesVoice_Openai(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["openai"] = "openai" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + OpenAiVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[OpenAiVoiceModel] = None + instructions: typing.Optional[str] = None + speed: typing.Optional[float] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesVoice_Playht(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["playht"] = "playht" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + PlayHtVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + speed: typing.Optional[float] = None + temperature: typing.Optional[float] = None + emotion: typing.Optional[PlayHtVoiceEmotion] = None + voice_guidance: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="voiceGuidance"), pydantic.Field(alias="voiceGuidance") + ] = None + style_guidance: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="styleGuidance"), pydantic.Field(alias="styleGuidance") + ] = None + text_guidance: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="textGuidance"), pydantic.Field(alias="textGuidance") + ] = None + model: typing.Optional[PlayHtVoiceModel] = None + language: typing.Optional[PlayHtVoiceLanguage] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesVoice_Wellsaid(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["wellsaid"] = "wellsaid" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[WellSaidVoiceModel] = None + enable_ssml: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="enableSsml"), pydantic.Field(alias="enableSsml") + ] = None + library_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="libraryIds"), pydantic.Field(alias="libraryIds") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesVoice_RimeAi(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["rime-ai"] = "rime-ai" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + RimeAiVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[RimeAiVoiceModel] = None + speed: typing.Optional[float] = None + pause_between_brackets: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="pauseBetweenBrackets"), pydantic.Field(alias="pauseBetweenBrackets") + ] = None + phonemize_between_brackets: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="phonemizeBetweenBrackets"), + pydantic.Field(alias="phonemizeBetweenBrackets"), + ] = None + reduce_latency: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="reduceLatency"), pydantic.Field(alias="reduceLatency") + ] = None + inline_speed_alpha: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="inlineSpeedAlpha"), pydantic.Field(alias="inlineSpeedAlpha") + ] = None + language: typing.Optional[RimeAiVoiceLanguage] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesVoice_SmallestAi(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["smallest-ai"] = "smallest-ai" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + SmallestAiVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[SmallestAiVoiceModel] = None + speed: typing.Optional[float] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesVoice_Tavus(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["tavus"] = "tavus" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + TavusVoiceVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + persona_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="personaId"), pydantic.Field(alias="personaId") + ] = None + callback_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callbackUrl"), pydantic.Field(alias="callbackUrl") + ] = None + conversation_name: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="conversationName"), pydantic.Field(alias="conversationName") + ] = None + conversational_context: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="conversationalContext"), + pydantic.Field(alias="conversationalContext"), + ] = None + custom_greeting: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="customGreeting"), pydantic.Field(alias="customGreeting") + ] = None + properties: typing.Optional[TavusConversationProperties] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesVoice_Vapi(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["vapi"] = "vapi" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + VapiVoiceVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + speed: typing.Optional[float] = None + pronunciation_dictionary: typing_extensions.Annotated[ + typing.Optional[typing.List[VapiPronunciationDictionaryLocator]], + FieldMetadata(alias="pronunciationDictionary"), + pydantic.Field(alias="pronunciationDictionary"), + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesVoice_Sesame(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["sesame"] = "sesame" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: SesameVoiceModel + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesVoice_Inworld(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["inworld"] = "inworld" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + InworldVoiceVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[InworldVoiceModel] = None + language_code: typing_extensions.Annotated[ + typing.Optional[InworldVoiceLanguageCode], + FieldMetadata(alias="languageCode"), + pydantic.Field(alias="languageCode"), + ] = None + temperature: typing.Optional[float] = None + speaking_rate: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="speakingRate"), pydantic.Field(alias="speakingRate") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantOverridesVoice_Minimax(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["minimax"] = "minimax" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[MinimaxVoiceModel] = None + emotion: typing.Optional[str] = None + subtitle_type: typing_extensions.Annotated[ + typing.Optional[MinimaxVoiceSubtitleType], + FieldMetadata(alias="subtitleType"), + pydantic.Field(alias="subtitleType"), + ] = None + pitch: typing.Optional[float] = None + speed: typing.Optional[float] = None + volume: typing.Optional[float] = None + region: typing.Optional[MinimaxVoiceRegion] = None + language_boost: typing_extensions.Annotated[ + typing.Optional[MinimaxVoiceLanguageBoost], + FieldMetadata(alias="languageBoost"), + pydantic.Field(alias="languageBoost"), + ] = None + text_normalization_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="textNormalizationEnabled"), + pydantic.Field(alias="textNormalizationEnabled"), + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AssistantOverridesVoice = typing_extensions.Annotated[ + typing.Union[ + AssistantOverridesVoice_Azure, + AssistantOverridesVoice_Cartesia, + AssistantOverridesVoice_CustomVoice, + AssistantOverridesVoice_Deepgram, + AssistantOverridesVoice_11Labs, + AssistantOverridesVoice_Hume, + AssistantOverridesVoice_Lmnt, + AssistantOverridesVoice_Neuphonic, + AssistantOverridesVoice_Openai, + AssistantOverridesVoice_Playht, + AssistantOverridesVoice_Wellsaid, + AssistantOverridesVoice_RimeAi, + AssistantOverridesVoice_SmallestAi, + AssistantOverridesVoice_Tavus, + AssistantOverridesVoice_Vapi, + AssistantOverridesVoice_Sesame, + AssistantOverridesVoice_Inworld, + AssistantOverridesVoice_Minimax, + ], + UnionMetadata(discriminant="provider"), ] diff --git a/src/vapi/types/assistant_overrides_voicemail_detection.py b/src/vapi/types/assistant_overrides_voicemail_detection.py new file mode 100644 index 00000000..68537525 --- /dev/null +++ b/src/vapi/types/assistant_overrides_voicemail_detection.py @@ -0,0 +1,17 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .assistant_overrides_voicemail_detection_zero import AssistantOverridesVoicemailDetectionZero +from .google_voicemail_detection_plan import GoogleVoicemailDetectionPlan +from .open_ai_voicemail_detection_plan import OpenAiVoicemailDetectionPlan +from .twilio_voicemail_detection_plan import TwilioVoicemailDetectionPlan +from .vapi_voicemail_detection_plan import VapiVoicemailDetectionPlan + +AssistantOverridesVoicemailDetection = typing.Union[ + AssistantOverridesVoicemailDetectionZero, + GoogleVoicemailDetectionPlan, + OpenAiVoicemailDetectionPlan, + TwilioVoicemailDetectionPlan, + VapiVoicemailDetectionPlan, +] diff --git a/src/vapi/types/assistant_overrides_voicemail_detection_zero.py b/src/vapi/types/assistant_overrides_voicemail_detection_zero.py new file mode 100644 index 00000000..e97c2d73 --- /dev/null +++ b/src/vapi/types/assistant_overrides_voicemail_detection_zero.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +AssistantOverridesVoicemailDetectionZero = typing.Union[typing.Literal["off"], typing.Any] diff --git a/src/vapi/types/assistant_paginated_response.py b/src/vapi/types/assistant_paginated_response.py new file mode 100644 index 00000000..c93a43a6 --- /dev/null +++ b/src/vapi/types/assistant_paginated_response.py @@ -0,0 +1,28 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .assistant import Assistant +from .pagination_meta import PaginationMeta + + +class AssistantPaginatedResponse(UncheckedBaseModel): + results: typing.List[Assistant] + metadata: PaginationMeta + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(AssistantPaginatedResponse) diff --git a/src/vapi/types/assistant_server_messages_item.py b/src/vapi/types/assistant_server_messages_item.py index 94e55457..1bb1240a 100644 --- a/src/vapi/types/assistant_server_messages_item.py +++ b/src/vapi/types/assistant_server_messages_item.py @@ -9,6 +9,7 @@ "function-call", "hang", "language-changed", + "language-change-detected", "model-output", "phone-call-control", "speech-update", diff --git a/src/vapi/types/assistant_speech_word_alignment_timing.py b/src/vapi/types/assistant_speech_word_alignment_timing.py new file mode 100644 index 00000000..86c61468 --- /dev/null +++ b/src/vapi/types/assistant_speech_word_alignment_timing.py @@ -0,0 +1,40 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AssistantSpeechWordAlignmentTiming(UncheckedBaseModel): + words: typing.List[str] = pydantic.Field() + """ + The individual words in this audio segment. + """ + + words_start_times_ms: typing_extensions.Annotated[ + typing.List[float], + FieldMetadata(alias="wordsStartTimesMs"), + pydantic.Field( + alias="wordsStartTimesMs", description="Start time in milliseconds for each word (parallel to `words`)." + ), + ] + words_end_times_ms: typing_extensions.Annotated[ + typing.List[float], + FieldMetadata(alias="wordsEndTimesMs"), + pydantic.Field( + alias="wordsEndTimesMs", description="End time in milliseconds for each word (parallel to `words`)." + ), + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/assistant_speech_word_progress_timing.py b/src/vapi/types/assistant_speech_word_progress_timing.py new file mode 100644 index 00000000..43735faa --- /dev/null +++ b/src/vapi/types/assistant_speech_word_progress_timing.py @@ -0,0 +1,61 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .assistant_speech_word_timestamp import AssistantSpeechWordTimestamp + + +class AssistantSpeechWordProgressTiming(UncheckedBaseModel): + words_spoken: typing_extensions.Annotated[ + float, + FieldMetadata(alias="wordsSpoken"), + pydantic.Field(alias="wordsSpoken", description="Number of words spoken so far in this turn."), + ] + total_words: typing_extensions.Annotated[ + float, + FieldMetadata(alias="totalWords"), + pydantic.Field( + alias="totalWords", + description='Total number of words sent to the TTS provider for this turn.\n\n**Important**: this value grows across events within a single turn because\nMinimax synthesizes audio incrementally as the LLM streams tokens. Treat\nit as "best known total so far" — it will stabilize once synthesis is\ncomplete.\n\nA value of `0` is a valid sentinel meaning "not yet known". This can occur\non the very first `assistant-speech` event of a turn if audio begins\nplaying before the TTS provider has confirmed word-count data. Clients\n**must** guard against divide-by-zero when computing a progress fraction:\n\n```ts\nconst pct = totalWords > 0 ? wordsSpoken / totalWords : 0;\n```', + ), + ] + segment: typing.Optional[str] = pydantic.Field(default=None) + """ + The text of the latest spoken segment (sentence or clause). Use this + for caption display — it corresponds to the chunk just confirmed by + the TTS provider, unlike `text` on the parent message which carries + the full turn text. + """ + + segment_duration_ms: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="segmentDurationMs"), + pydantic.Field( + alias="segmentDurationMs", + description="Audio duration in milliseconds for the latest spoken segment. Pair\nwith `segment` to animate karaoke-style word reveals — divide the\nsegment text across this duration for approximate per-word timing.", + ), + ] = None + words: typing.Optional[typing.List[AssistantSpeechWordTimestamp]] = pydantic.Field(default=None) + """ + Per-word timestamps for the latest spoken segment. Available when the + TTS provider supports word-level timing (e.g. Minimax with + subtitle_type: "word"). Syllables from the provider are aggregated + into whole words with start/end times relative to the segment start. + + Use these for precise karaoke-style highlighting instead of + interpolating from segmentDurationMs. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/assistant_speech_word_timestamp.py b/src/vapi/types/assistant_speech_word_timestamp.py new file mode 100644 index 00000000..51de72e6 --- /dev/null +++ b/src/vapi/types/assistant_speech_word_timestamp.py @@ -0,0 +1,36 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AssistantSpeechWordTimestamp(UncheckedBaseModel): + word: str = pydantic.Field() + """ + The full word text (syllables aggregated into complete words). + """ + + start_ms: typing_extensions.Annotated[ + float, + FieldMetadata(alias="startMs"), + pydantic.Field(alias="startMs", description="Start time in milliseconds relative to the segment start."), + ] + end_ms: typing_extensions.Annotated[ + float, + FieldMetadata(alias="endMs"), + pydantic.Field(alias="endMs", description="End time in milliseconds relative to the segment start."), + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/assistant_transcriber.py b/src/vapi/types/assistant_transcriber.py index 5549c7cc..41247666 100644 --- a/src/vapi/types/assistant_transcriber.py +++ b/src/vapi/types/assistant_transcriber.py @@ -1,8 +1,538 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .deepgram_transcriber import DeepgramTranscriber -from .gladia_transcriber import GladiaTranscriber -from .talkscriber_transcriber import TalkscriberTranscriber -AssistantTranscriber = typing.Union[DeepgramTranscriber, GladiaTranscriber, TalkscriberTranscriber] +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .assembly_ai_transcriber_language import AssemblyAiTranscriberLanguage +from .assembly_ai_transcriber_speech_model import AssemblyAiTranscriberSpeechModel +from .azure_speech_transcriber_language import AzureSpeechTranscriberLanguage +from .azure_speech_transcriber_segmentation_strategy import AzureSpeechTranscriberSegmentationStrategy +from .cartesia_transcriber_language import CartesiaTranscriberLanguage +from .cartesia_transcriber_model import CartesiaTranscriberModel +from .deepgram_transcriber_language import DeepgramTranscriberLanguage +from .deepgram_transcriber_model import DeepgramTranscriberModel +from .eleven_labs_transcriber_language import ElevenLabsTranscriberLanguage +from .eleven_labs_transcriber_model import ElevenLabsTranscriberModel +from .fallback_transcriber_plan import FallbackTranscriberPlan +from .gladia_custom_vocabulary_config_dto import GladiaCustomVocabularyConfigDto +from .gladia_transcriber_language import GladiaTranscriberLanguage +from .gladia_transcriber_language_behaviour import GladiaTranscriberLanguageBehaviour +from .gladia_transcriber_languages import GladiaTranscriberLanguages +from .gladia_transcriber_model import GladiaTranscriberModel +from .gladia_transcriber_region import GladiaTranscriberRegion +from .google_transcriber_language import GoogleTranscriberLanguage +from .google_transcriber_model import GoogleTranscriberModel +from .open_ai_transcriber_language import OpenAiTranscriberLanguage +from .open_ai_transcriber_model import OpenAiTranscriberModel +from .server import Server +from .soniox_transcriber_language import SonioxTranscriberLanguage +from .soniox_transcriber_model import SonioxTranscriberModel +from .speechmatics_custom_vocabulary_item import SpeechmaticsCustomVocabularyItem +from .speechmatics_transcriber_language import SpeechmaticsTranscriberLanguage +from .speechmatics_transcriber_model import SpeechmaticsTranscriberModel +from .speechmatics_transcriber_numeral_style import SpeechmaticsTranscriberNumeralStyle +from .speechmatics_transcriber_operating_point import SpeechmaticsTranscriberOperatingPoint +from .speechmatics_transcriber_region import SpeechmaticsTranscriberRegion +from .talkscriber_transcriber_language import TalkscriberTranscriberLanguage +from .talkscriber_transcriber_model import TalkscriberTranscriberModel + + +class AssistantTranscriber_AssemblyAi(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["assembly-ai"] = "assembly-ai" + language: typing.Optional[AssemblyAiTranscriberLanguage] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="confidenceThreshold"), pydantic.Field(alias="confidenceThreshold") + ] = None + format_turns: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="formatTurns"), pydantic.Field(alias="formatTurns") + ] = None + end_of_turn_confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="endOfTurnConfidenceThreshold"), + pydantic.Field(alias="endOfTurnConfidenceThreshold"), + ] = None + min_end_of_turn_silence_when_confident: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minEndOfTurnSilenceWhenConfident"), + pydantic.Field(alias="minEndOfTurnSilenceWhenConfident"), + ] = None + word_finalization_max_wait_time: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="wordFinalizationMaxWaitTime"), + pydantic.Field(alias="wordFinalizationMaxWaitTime"), + ] = None + max_turn_silence: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTurnSilence"), pydantic.Field(alias="maxTurnSilence") + ] = None + vad_assisted_endpointing_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="vadAssistedEndpointingEnabled"), + pydantic.Field(alias="vadAssistedEndpointingEnabled"), + ] = None + speech_model: typing_extensions.Annotated[ + typing.Optional[AssemblyAiTranscriberSpeechModel], + FieldMetadata(alias="speechModel"), + pydantic.Field(alias="speechModel"), + ] = None + realtime_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="realtimeUrl"), pydantic.Field(alias="realtimeUrl") + ] = None + word_boost: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="wordBoost"), pydantic.Field(alias="wordBoost") + ] = None + keyterms_prompt: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="keytermsPrompt"), pydantic.Field(alias="keytermsPrompt") + ] = None + end_utterance_silence_threshold: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="endUtteranceSilenceThreshold"), + pydantic.Field(alias="endUtteranceSilenceThreshold"), + ] = None + disable_partial_transcripts: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="disablePartialTranscripts"), + pydantic.Field(alias="disablePartialTranscripts"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantTranscriber_Azure(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["azure"] = "azure" + language: typing.Optional[AzureSpeechTranscriberLanguage] = None + segmentation_strategy: typing_extensions.Annotated[ + typing.Optional[AzureSpeechTranscriberSegmentationStrategy], + FieldMetadata(alias="segmentationStrategy"), + pydantic.Field(alias="segmentationStrategy"), + ] = None + segmentation_silence_timeout_ms: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="segmentationSilenceTimeoutMs"), + pydantic.Field(alias="segmentationSilenceTimeoutMs"), + ] = None + segmentation_maximum_time_ms: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="segmentationMaximumTimeMs"), + pydantic.Field(alias="segmentationMaximumTimeMs"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantTranscriber_CustomTranscriber(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["custom-transcriber"] = "custom-transcriber" + server: Server + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantTranscriber_Deepgram(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["deepgram"] = "deepgram" + model: typing.Optional[DeepgramTranscriberModel] = None + language: typing.Optional[DeepgramTranscriberLanguage] = None + smart_format: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smartFormat"), pydantic.Field(alias="smartFormat") + ] = None + mip_opt_out: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="mipOptOut"), pydantic.Field(alias="mipOptOut") + ] = None + numerals: typing.Optional[bool] = None + profanity_filter: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="profanityFilter"), pydantic.Field(alias="profanityFilter") + ] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="confidenceThreshold"), pydantic.Field(alias="confidenceThreshold") + ] = None + eager_eot_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="eagerEotThreshold"), pydantic.Field(alias="eagerEotThreshold") + ] = None + eot_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="eotThreshold"), pydantic.Field(alias="eotThreshold") + ] = None + eot_timeout_ms: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="eotTimeoutMs"), pydantic.Field(alias="eotTimeoutMs") + ] = None + keywords: typing.Optional[typing.List[str]] = None + keyterm: typing.Optional[typing.List[str]] = None + endpointing: typing.Optional[float] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantTranscriber_11Labs(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["11labs"] = "11labs" + model: typing.Optional[ElevenLabsTranscriberModel] = None + language: typing.Optional[ElevenLabsTranscriberLanguage] = None + silence_threshold_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="silenceThresholdSeconds"), + pydantic.Field(alias="silenceThresholdSeconds"), + ] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="confidenceThreshold"), pydantic.Field(alias="confidenceThreshold") + ] = None + min_speech_duration_ms: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="minSpeechDurationMs"), pydantic.Field(alias="minSpeechDurationMs") + ] = None + min_silence_duration_ms: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minSilenceDurationMs"), + pydantic.Field(alias="minSilenceDurationMs"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantTranscriber_Gladia(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["gladia"] = "gladia" + model: typing.Optional[GladiaTranscriberModel] = None + language_behaviour: typing_extensions.Annotated[ + typing.Optional[GladiaTranscriberLanguageBehaviour], + FieldMetadata(alias="languageBehaviour"), + pydantic.Field(alias="languageBehaviour"), + ] = None + language: typing.Optional[GladiaTranscriberLanguage] = None + languages: typing.Optional[GladiaTranscriberLanguages] = None + transcription_hint: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="transcriptionHint"), pydantic.Field(alias="transcriptionHint") + ] = None + prosody: typing.Optional[bool] = None + audio_enhancer: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="audioEnhancer"), pydantic.Field(alias="audioEnhancer") + ] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="confidenceThreshold"), pydantic.Field(alias="confidenceThreshold") + ] = None + endpointing: typing.Optional[float] = None + speech_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="speechThreshold"), pydantic.Field(alias="speechThreshold") + ] = None + custom_vocabulary_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="customVocabularyEnabled"), + pydantic.Field(alias="customVocabularyEnabled"), + ] = None + custom_vocabulary_config: typing_extensions.Annotated[ + typing.Optional[GladiaCustomVocabularyConfigDto], + FieldMetadata(alias="customVocabularyConfig"), + pydantic.Field(alias="customVocabularyConfig"), + ] = None + region: typing.Optional[GladiaTranscriberRegion] = None + receive_partial_transcripts: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="receivePartialTranscripts"), + pydantic.Field(alias="receivePartialTranscripts"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantTranscriber_Google(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["google"] = "google" + model: typing.Optional[GoogleTranscriberModel] = None + language: typing.Optional[GoogleTranscriberLanguage] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantTranscriber_Speechmatics(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["speechmatics"] = "speechmatics" + model: typing.Optional[SpeechmaticsTranscriberModel] = None + language: typing.Optional[SpeechmaticsTranscriberLanguage] = None + operating_point: typing_extensions.Annotated[ + typing.Optional[SpeechmaticsTranscriberOperatingPoint], + FieldMetadata(alias="operatingPoint"), + pydantic.Field(alias="operatingPoint"), + ] = None + region: typing.Optional[SpeechmaticsTranscriberRegion] = None + enable_diarization: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="enableDiarization"), pydantic.Field(alias="enableDiarization") + ] = None + max_delay: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxDelay"), pydantic.Field(alias="maxDelay") + ] = None + custom_vocabulary: typing_extensions.Annotated[ + typing.List[SpeechmaticsCustomVocabularyItem], + FieldMetadata(alias="customVocabulary"), + pydantic.Field(alias="customVocabulary"), + ] + numeral_style: typing_extensions.Annotated[ + typing.Optional[SpeechmaticsTranscriberNumeralStyle], + FieldMetadata(alias="numeralStyle"), + pydantic.Field(alias="numeralStyle"), + ] = None + end_of_turn_sensitivity: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="endOfTurnSensitivity"), + pydantic.Field(alias="endOfTurnSensitivity"), + ] = None + remove_disfluencies: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="removeDisfluencies"), pydantic.Field(alias="removeDisfluencies") + ] = None + minimum_speech_duration: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minimumSpeechDuration"), + pydantic.Field(alias="minimumSpeechDuration"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantTranscriber_Talkscriber(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["talkscriber"] = "talkscriber" + model: typing.Optional[TalkscriberTranscriberModel] = None + language: typing.Optional[TalkscriberTranscriberLanguage] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantTranscriber_Openai(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["openai"] = "openai" + model: OpenAiTranscriberModel + language: typing.Optional[OpenAiTranscriberLanguage] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantTranscriber_Cartesia(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["cartesia"] = "cartesia" + model: typing.Optional[CartesiaTranscriberModel] = None + language: typing.Optional[CartesiaTranscriberLanguage] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantTranscriber_Soniox(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["soniox"] = "soniox" + model: typing.Optional[SonioxTranscriberModel] = None + language: typing.Optional[SonioxTranscriberLanguage] = None + language_hints_strict: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="languageHintsStrict"), pydantic.Field(alias="languageHintsStrict") + ] = None + max_endpoint_delay_ms: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxEndpointDelayMs"), pydantic.Field(alias="maxEndpointDelayMs") + ] = None + custom_vocabulary: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="customVocabulary"), + pydantic.Field(alias="customVocabulary"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AssistantTranscriber = typing_extensions.Annotated[ + typing.Union[ + AssistantTranscriber_AssemblyAi, + AssistantTranscriber_Azure, + AssistantTranscriber_CustomTranscriber, + AssistantTranscriber_Deepgram, + AssistantTranscriber_11Labs, + AssistantTranscriber_Gladia, + AssistantTranscriber_Google, + AssistantTranscriber_Speechmatics, + AssistantTranscriber_Talkscriber, + AssistantTranscriber_Openai, + AssistantTranscriber_Cartesia, + AssistantTranscriber_Soniox, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/assistant_user_editable.py b/src/vapi/types/assistant_user_editable.py new file mode 100644 index 00000000..e8530dde --- /dev/null +++ b/src/vapi/types/assistant_user_editable.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AssistantUserEditable(UncheckedBaseModel): + server_messages: typing_extensions.Annotated[ + typing.Optional[typing.Any], FieldMetadata(alias="serverMessages"), pydantic.Field(alias="serverMessages") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/assistant_version_paginated_response.py b/src/vapi/types/assistant_version_paginated_response.py new file mode 100644 index 00000000..1b8e260b --- /dev/null +++ b/src/vapi/types/assistant_version_paginated_response.py @@ -0,0 +1,27 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .pagination_meta import PaginationMeta + + +class AssistantVersionPaginatedResponse(UncheckedBaseModel): + results: typing.List[typing.Any] + metadata: PaginationMeta + next_page_state: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="nextPageState"), pydantic.Field(alias="nextPageState") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/assistant_voice.py b/src/vapi/types/assistant_voice.py index 84c90b7f..f0bc9e44 100644 --- a/src/vapi/types/assistant_voice.py +++ b/src/vapi/types/assistant_voice.py @@ -1,24 +1,740 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .azure_voice import AzureVoice -from .cartesia_voice import CartesiaVoice -from .deepgram_voice import DeepgramVoice -from .eleven_labs_voice import ElevenLabsVoice -from .lmnt_voice import LmntVoice -from .neets_voice import NeetsVoice -from .open_ai_voice import OpenAiVoice -from .play_ht_voice import PlayHtVoice -from .rime_ai_voice import RimeAiVoice - -AssistantVoice = typing.Union[ - AzureVoice, - CartesiaVoice, - DeepgramVoice, - ElevenLabsVoice, - LmntVoice, - NeetsVoice, - OpenAiVoice, - PlayHtVoice, - RimeAiVoice, + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .azure_voice_id import AzureVoiceId +from .cartesia_experimental_controls import CartesiaExperimentalControls +from .cartesia_generation_config import CartesiaGenerationConfig +from .cartesia_voice_language import CartesiaVoiceLanguage +from .cartesia_voice_model import CartesiaVoiceModel +from .chunk_plan import ChunkPlan +from .deepgram_voice_id import DeepgramVoiceId +from .deepgram_voice_model import DeepgramVoiceModel +from .eleven_labs_pronunciation_dictionary_locator import ElevenLabsPronunciationDictionaryLocator +from .eleven_labs_voice_id import ElevenLabsVoiceId +from .eleven_labs_voice_model import ElevenLabsVoiceModel +from .fallback_plan import FallbackPlan +from .hume_voice_model import HumeVoiceModel +from .inworld_voice_language_code import InworldVoiceLanguageCode +from .inworld_voice_model import InworldVoiceModel +from .inworld_voice_voice_id import InworldVoiceVoiceId +from .lmnt_voice_id import LmntVoiceId +from .lmnt_voice_language import LmntVoiceLanguage +from .minimax_voice_language_boost import MinimaxVoiceLanguageBoost +from .minimax_voice_model import MinimaxVoiceModel +from .minimax_voice_region import MinimaxVoiceRegion +from .minimax_voice_subtitle_type import MinimaxVoiceSubtitleType +from .neuphonic_voice_model import NeuphonicVoiceModel +from .open_ai_voice_id import OpenAiVoiceId +from .open_ai_voice_model import OpenAiVoiceModel +from .play_ht_voice_emotion import PlayHtVoiceEmotion +from .play_ht_voice_id import PlayHtVoiceId +from .play_ht_voice_language import PlayHtVoiceLanguage +from .play_ht_voice_model import PlayHtVoiceModel +from .rime_ai_voice_id import RimeAiVoiceId +from .rime_ai_voice_language import RimeAiVoiceLanguage +from .rime_ai_voice_model import RimeAiVoiceModel +from .server import Server +from .sesame_voice_model import SesameVoiceModel +from .smallest_ai_voice_id import SmallestAiVoiceId +from .smallest_ai_voice_model import SmallestAiVoiceModel +from .tavus_conversation_properties import TavusConversationProperties +from .tavus_voice_voice_id import TavusVoiceVoiceId +from .vapi_pronunciation_dictionary_locator import VapiPronunciationDictionaryLocator +from .vapi_voice_voice_id import VapiVoiceVoiceId +from .well_said_voice_model import WellSaidVoiceModel + + +class AssistantVoice_Azure(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["azure"] = "azure" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[AzureVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + speed: typing.Optional[float] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantVoice_Cartesia(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["cartesia"] = "cartesia" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[CartesiaVoiceModel] = None + language: typing.Optional[CartesiaVoiceLanguage] = None + experimental_controls: typing_extensions.Annotated[ + typing.Optional[CartesiaExperimentalControls], + FieldMetadata(alias="experimentalControls"), + pydantic.Field(alias="experimentalControls"), + ] = None + generation_config: typing_extensions.Annotated[ + typing.Optional[CartesiaGenerationConfig], + FieldMetadata(alias="generationConfig"), + pydantic.Field(alias="generationConfig"), + ] = None + pronunciation_dict_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="pronunciationDictId"), pydantic.Field(alias="pronunciationDictId") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantVoice_CustomVoice(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["custom-voice"] = "custom-voice" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + server: Server + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantVoice_Deepgram(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["deepgram"] = "deepgram" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + DeepgramVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[DeepgramVoiceModel] = None + mip_opt_out: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="mipOptOut"), pydantic.Field(alias="mipOptOut") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantVoice_11Labs(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["11labs"] = "11labs" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + ElevenLabsVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + stability: typing.Optional[float] = None + similarity_boost: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="similarityBoost"), pydantic.Field(alias="similarityBoost") + ] = None + style: typing.Optional[float] = None + use_speaker_boost: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="useSpeakerBoost"), pydantic.Field(alias="useSpeakerBoost") + ] = None + speed: typing.Optional[float] = None + optimize_streaming_latency: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="optimizeStreamingLatency"), + pydantic.Field(alias="optimizeStreamingLatency"), + ] = None + enable_ssml_parsing: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="enableSsmlParsing"), pydantic.Field(alias="enableSsmlParsing") + ] = None + auto_mode: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="autoMode"), pydantic.Field(alias="autoMode") + ] = None + model: typing.Optional[ElevenLabsVoiceModel] = None + language: typing.Optional[str] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + pronunciation_dictionary_locators: typing_extensions.Annotated[ + typing.Optional[typing.List[ElevenLabsPronunciationDictionaryLocator]], + FieldMetadata(alias="pronunciationDictionaryLocators"), + pydantic.Field(alias="pronunciationDictionaryLocators"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantVoice_Hume(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["hume"] = "hume" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + model: typing.Optional[HumeVoiceModel] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + is_custom_hume_voice: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="isCustomHumeVoice"), pydantic.Field(alias="isCustomHumeVoice") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + description: typing.Optional[str] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantVoice_Lmnt(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["lmnt"] = "lmnt" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[LmntVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + speed: typing.Optional[float] = None + language: typing.Optional[LmntVoiceLanguage] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantVoice_Neuphonic(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["neuphonic"] = "neuphonic" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[NeuphonicVoiceModel] = None + language: typing.Dict[str, typing.Any] + speed: typing.Optional[float] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantVoice_Openai(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["openai"] = "openai" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + OpenAiVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[OpenAiVoiceModel] = None + instructions: typing.Optional[str] = None + speed: typing.Optional[float] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantVoice_Playht(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["playht"] = "playht" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + PlayHtVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + speed: typing.Optional[float] = None + temperature: typing.Optional[float] = None + emotion: typing.Optional[PlayHtVoiceEmotion] = None + voice_guidance: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="voiceGuidance"), pydantic.Field(alias="voiceGuidance") + ] = None + style_guidance: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="styleGuidance"), pydantic.Field(alias="styleGuidance") + ] = None + text_guidance: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="textGuidance"), pydantic.Field(alias="textGuidance") + ] = None + model: typing.Optional[PlayHtVoiceModel] = None + language: typing.Optional[PlayHtVoiceLanguage] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantVoice_Wellsaid(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["wellsaid"] = "wellsaid" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[WellSaidVoiceModel] = None + enable_ssml: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="enableSsml"), pydantic.Field(alias="enableSsml") + ] = None + library_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="libraryIds"), pydantic.Field(alias="libraryIds") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantVoice_RimeAi(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["rime-ai"] = "rime-ai" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + RimeAiVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[RimeAiVoiceModel] = None + speed: typing.Optional[float] = None + pause_between_brackets: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="pauseBetweenBrackets"), pydantic.Field(alias="pauseBetweenBrackets") + ] = None + phonemize_between_brackets: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="phonemizeBetweenBrackets"), + pydantic.Field(alias="phonemizeBetweenBrackets"), + ] = None + reduce_latency: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="reduceLatency"), pydantic.Field(alias="reduceLatency") + ] = None + inline_speed_alpha: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="inlineSpeedAlpha"), pydantic.Field(alias="inlineSpeedAlpha") + ] = None + language: typing.Optional[RimeAiVoiceLanguage] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantVoice_SmallestAi(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["smallest-ai"] = "smallest-ai" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + SmallestAiVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[SmallestAiVoiceModel] = None + speed: typing.Optional[float] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantVoice_Tavus(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["tavus"] = "tavus" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + TavusVoiceVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + persona_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="personaId"), pydantic.Field(alias="personaId") + ] = None + callback_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callbackUrl"), pydantic.Field(alias="callbackUrl") + ] = None + conversation_name: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="conversationName"), pydantic.Field(alias="conversationName") + ] = None + conversational_context: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="conversationalContext"), + pydantic.Field(alias="conversationalContext"), + ] = None + custom_greeting: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="customGreeting"), pydantic.Field(alias="customGreeting") + ] = None + properties: typing.Optional[TavusConversationProperties] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantVoice_Vapi(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["vapi"] = "vapi" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + VapiVoiceVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + speed: typing.Optional[float] = None + pronunciation_dictionary: typing_extensions.Annotated[ + typing.Optional[typing.List[VapiPronunciationDictionaryLocator]], + FieldMetadata(alias="pronunciationDictionary"), + pydantic.Field(alias="pronunciationDictionary"), + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantVoice_Sesame(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["sesame"] = "sesame" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: SesameVoiceModel + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantVoice_Inworld(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["inworld"] = "inworld" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + InworldVoiceVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[InworldVoiceModel] = None + language_code: typing_extensions.Annotated[ + typing.Optional[InworldVoiceLanguageCode], + FieldMetadata(alias="languageCode"), + pydantic.Field(alias="languageCode"), + ] = None + temperature: typing.Optional[float] = None + speaking_rate: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="speakingRate"), pydantic.Field(alias="speakingRate") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class AssistantVoice_Minimax(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["minimax"] = "minimax" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[MinimaxVoiceModel] = None + emotion: typing.Optional[str] = None + subtitle_type: typing_extensions.Annotated[ + typing.Optional[MinimaxVoiceSubtitleType], + FieldMetadata(alias="subtitleType"), + pydantic.Field(alias="subtitleType"), + ] = None + pitch: typing.Optional[float] = None + speed: typing.Optional[float] = None + volume: typing.Optional[float] = None + region: typing.Optional[MinimaxVoiceRegion] = None + language_boost: typing_extensions.Annotated[ + typing.Optional[MinimaxVoiceLanguageBoost], + FieldMetadata(alias="languageBoost"), + pydantic.Field(alias="languageBoost"), + ] = None + text_normalization_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="textNormalizationEnabled"), + pydantic.Field(alias="textNormalizationEnabled"), + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +AssistantVoice = typing_extensions.Annotated[ + typing.Union[ + AssistantVoice_Azure, + AssistantVoice_Cartesia, + AssistantVoice_CustomVoice, + AssistantVoice_Deepgram, + AssistantVoice_11Labs, + AssistantVoice_Hume, + AssistantVoice_Lmnt, + AssistantVoice_Neuphonic, + AssistantVoice_Openai, + AssistantVoice_Playht, + AssistantVoice_Wellsaid, + AssistantVoice_RimeAi, + AssistantVoice_SmallestAi, + AssistantVoice_Tavus, + AssistantVoice_Vapi, + AssistantVoice_Sesame, + AssistantVoice_Inworld, + AssistantVoice_Minimax, + ], + UnionMetadata(discriminant="provider"), ] diff --git a/src/vapi/types/assistant_voicemail_detection.py b/src/vapi/types/assistant_voicemail_detection.py new file mode 100644 index 00000000..e05b1e66 --- /dev/null +++ b/src/vapi/types/assistant_voicemail_detection.py @@ -0,0 +1,17 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .assistant_voicemail_detection_zero import AssistantVoicemailDetectionZero +from .google_voicemail_detection_plan import GoogleVoicemailDetectionPlan +from .open_ai_voicemail_detection_plan import OpenAiVoicemailDetectionPlan +from .twilio_voicemail_detection_plan import TwilioVoicemailDetectionPlan +from .vapi_voicemail_detection_plan import VapiVoicemailDetectionPlan + +AssistantVoicemailDetection = typing.Union[ + AssistantVoicemailDetectionZero, + GoogleVoicemailDetectionPlan, + OpenAiVoicemailDetectionPlan, + TwilioVoicemailDetectionPlan, + VapiVoicemailDetectionPlan, +] diff --git a/src/vapi/types/assistant_voicemail_detection_zero.py b/src/vapi/types/assistant_voicemail_detection_zero.py new file mode 100644 index 00000000..ee7072e6 --- /dev/null +++ b/src/vapi/types/assistant_voicemail_detection_zero.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +AssistantVoicemailDetectionZero = typing.Union[typing.Literal["off"], typing.Any] diff --git a/src/vapi/types/client_message_language_changed.py b/src/vapi/types/auto_reload_plan.py similarity index 51% rename from src/vapi/types/client_message_language_changed.py rename to src/vapi/types/auto_reload_plan.py index bdde1784..801b71c5 100644 --- a/src/vapi/types/client_message_language_changed.py +++ b/src/vapi/types/auto_reload_plan.py @@ -1,20 +1,21 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing + import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel -class ClientMessageLanguageChanged(UniversalBaseModel): - type: typing.Literal["language-changed"] = pydantic.Field(default="language-changed") +class AutoReloadPlan(UncheckedBaseModel): + credits: float = pydantic.Field() """ - This is the type of the message. "language-switched" is sent when the transcriber is automatically switched based on the detected language. + This the amount of credits to reload. """ - language: str = pydantic.Field() + threshold: float = pydantic.Field() """ - This is the language the transcriber is switched to. + This is the limit at which the reload is triggered. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/org_plan.py b/src/vapi/types/aws_sts_assume_role_user.py similarity index 50% rename from src/vapi/types/org_plan.py rename to src/vapi/types/aws_sts_assume_role_user.py index ad23d4a6..c832c008 100644 --- a/src/vapi/types/org_plan.py +++ b/src/vapi/types/aws_sts_assume_role_user.py @@ -1,21 +1,24 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions import typing -from ..core.serialization import FieldMetadata -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class OrgPlan(UniversalBaseModel): - included_providers: typing_extensions.Annotated[ - typing.Optional[typing.List[typing.Dict[str, typing.Optional[typing.Any]]]], - FieldMetadata(alias="includedProviders"), +class AwsStsAssumeRoleUser(UncheckedBaseModel): + assumed_role_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="AssumedRoleId"), + pydantic.Field(alias="AssumedRoleId", description="This is the assumed role ID"), ] = None - included_minutes: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="includedMinutes")] = None - cost_per_overage_minute: typing_extensions.Annotated[ - typing.Optional[float], FieldMetadata(alias="costPerOverageMinute") + arn: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="Arn"), + pydantic.Field(alias="Arn", description="This is the assumed role ARN"), ] = None if IS_PYDANTIC_V2: diff --git a/src/vapi/types/aws_sts_authentication_artifact.py b/src/vapi/types/aws_sts_authentication_artifact.py new file mode 100644 index 00000000..d877731d --- /dev/null +++ b/src/vapi/types/aws_sts_authentication_artifact.py @@ -0,0 +1,26 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AwsStsAuthenticationArtifact(UncheckedBaseModel): + external_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="externalId"), + pydantic.Field(alias="externalId", description="This is the optional external ID for the AWS credential"), + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/aws_sts_authentication_plan.py b/src/vapi/types/aws_sts_authentication_plan.py new file mode 100644 index 00000000..ed4d0648 --- /dev/null +++ b/src/vapi/types/aws_sts_authentication_plan.py @@ -0,0 +1,33 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AwsStsAuthenticationPlan(UncheckedBaseModel): + role_arn: typing_extensions.Annotated[ + str, + FieldMetadata(alias="roleArn"), + pydantic.Field(alias="roleArn", description="This is the role ARN for the AWS credential"), + ] + external_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="externalId"), + pydantic.Field( + alias="externalId", description="Optional external ID for additional security in the role trust policy." + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/aws_sts_authentication_session.py b/src/vapi/types/aws_sts_authentication_session.py new file mode 100644 index 00000000..e3a6f2ce --- /dev/null +++ b/src/vapi/types/aws_sts_authentication_session.py @@ -0,0 +1,43 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .aws_sts_assume_role_user import AwsStsAssumeRoleUser +from .aws_sts_credentials import AwsStsCredentials + + +class AwsStsAuthenticationSession(UncheckedBaseModel): + assumed_role_user: typing_extensions.Annotated[ + typing.Optional[AwsStsAssumeRoleUser], + FieldMetadata(alias="assumedRoleUser"), + pydantic.Field(alias="assumedRoleUser", description="This is the assumed role user"), + ] = None + credentials: typing.Optional[AwsStsCredentials] = pydantic.Field(default=None) + """ + This is the credentials for the AWS STS assume role + """ + + packed_policy_size: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="packedPolicySize"), + pydantic.Field(alias="packedPolicySize", description="This is the size of the policy"), + ] = None + sourced_id_entity: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="sourcedIDEntity"), + pydantic.Field(alias="sourcedIDEntity", description="This is the sourced ID entity"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/aws_sts_credentials.py b/src/vapi/types/aws_sts_credentials.py new file mode 100644 index 00000000..af153971 --- /dev/null +++ b/src/vapi/types/aws_sts_credentials.py @@ -0,0 +1,42 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AwsStsCredentials(UncheckedBaseModel): + access_key_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="AccessKeyId"), + pydantic.Field(alias="AccessKeyId", description="This is the access key ID for the AWS credential"), + ] = None + expiration: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="Expiration"), + pydantic.Field(alias="Expiration", description="This is the expiration date for the AWS credential"), + ] = None + secret_access_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="SecretAccessKey"), + pydantic.Field(alias="SecretAccessKey", description="This is the secret access key for the AWS credential"), + ] = None + session_token: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="SessionToken"), + pydantic.Field(alias="SessionToken", description="This is the session token for the AWS credential"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/awsiam_credentials_authentication_plan.py b/src/vapi/types/awsiam_credentials_authentication_plan.py new file mode 100644 index 00000000..27430cc4 --- /dev/null +++ b/src/vapi/types/awsiam_credentials_authentication_plan.py @@ -0,0 +1,33 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AwsiamCredentialsAuthenticationPlan(UncheckedBaseModel): + aws_access_key_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="awsAccessKeyId"), + pydantic.Field(alias="awsAccessKeyId", description="AWS Access Key ID. This is not returned in the API."), + ] + aws_secret_access_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="awsSecretAccessKey"), + pydantic.Field( + alias="awsSecretAccessKey", description="AWS Secret Access Key. This is not returned in the API." + ), + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/azure_blob_storage_bucket_plan.py b/src/vapi/types/azure_blob_storage_bucket_plan.py new file mode 100644 index 00000000..70ce8f98 --- /dev/null +++ b/src/vapi/types/azure_blob_storage_bucket_plan.py @@ -0,0 +1,43 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class AzureBlobStorageBucketPlan(UncheckedBaseModel): + connection_string: typing_extensions.Annotated[ + str, + FieldMetadata(alias="connectionString"), + pydantic.Field( + alias="connectionString", description="This is the blob storage connection string for the Azure resource." + ), + ] + container_name: typing_extensions.Annotated[ + str, + FieldMetadata(alias="containerName"), + pydantic.Field(alias="containerName", description="This is the container name for the Azure blob storage."), + ] + path: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the path where call artifacts will be stored. + + Usage: + - To store call artifacts in a specific folder, set this to the full path. Eg. "/folder-name1/folder-name2". + - To store call artifacts in the root of the bucket, leave this blank. + + @default "/" + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/azure_credential.py b/src/vapi/types/azure_credential.py new file mode 100644 index 00000000..1b5f5cfe --- /dev/null +++ b/src/vapi/types/azure_credential.py @@ -0,0 +1,90 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .azure_blob_storage_bucket_plan import AzureBlobStorageBucketPlan +from .azure_credential_provider import AzureCredentialProvider +from .azure_credential_region import AzureCredentialRegion +from .azure_credential_service import AzureCredentialService + + +class AzureCredential(UncheckedBaseModel): + provider: AzureCredentialProvider + service: AzureCredentialService = pydantic.Field() + """ + This is the service being used in Azure. + """ + + region: typing.Optional[AzureCredentialRegion] = pydantic.Field(default=None) + """ + This is the region of the Azure resource. + """ + + api_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] = None + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="fallbackIndex"), + pydantic.Field( + alias="fallbackIndex", + description="This is the order in which this storage provider is tried during upload retries. Lower numbers are tried first in increasing order.", + ), + ] = None + id: str = pydantic.Field() + """ + This is the unique identifier for the credential. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + bucket_plan: typing_extensions.Annotated[ + typing.Optional[AzureBlobStorageBucketPlan], + FieldMetadata(alias="bucketPlan"), + pydantic.Field( + alias="bucketPlan", + description="This is the bucket plan that can be provided to store call artifacts in Azure Blob Storage.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/azure_credential_provider.py b/src/vapi/types/azure_credential_provider.py new file mode 100644 index 00000000..fd0d9e05 --- /dev/null +++ b/src/vapi/types/azure_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +AzureCredentialProvider = typing.Union[typing.Literal["azure"], typing.Any] diff --git a/src/vapi/types/azure_credential_region.py b/src/vapi/types/azure_credential_region.py new file mode 100644 index 00000000..f1444bd5 --- /dev/null +++ b/src/vapi/types/azure_credential_region.py @@ -0,0 +1,32 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +AzureCredentialRegion = typing.Union[ + typing.Literal[ + "australiaeast", + "canadaeast", + "canadacentral", + "centralus", + "eastus2", + "eastus", + "france", + "germanywestcentral", + "india", + "japaneast", + "japanwest", + "northcentralus", + "norway", + "polandcentral", + "southcentralus", + "spaincentral", + "swedencentral", + "switzerland", + "uaenorth", + "uk", + "westeurope", + "westus", + "westus3", + ], + typing.Any, +] diff --git a/src/vapi/types/azure_credential_service.py b/src/vapi/types/azure_credential_service.py new file mode 100644 index 00000000..dc69d67b --- /dev/null +++ b/src/vapi/types/azure_credential_service.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +AzureCredentialService = typing.Union[typing.Literal["speech", "blob_storage"], typing.Any] diff --git a/src/vapi/types/azure_open_ai_credential.py b/src/vapi/types/azure_open_ai_credential.py index 86a52b5d..27d497f1 100644 --- a/src/vapi/types/azure_open_ai_credential.py +++ b/src/vapi/types/azure_open_ai_credential.py @@ -1,46 +1,67 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +import datetime as dt import typing -from .azure_open_ai_credential_region import AzureOpenAiCredentialRegion -from .azure_open_ai_credential_models_item import AzureOpenAiCredentialModelsItem -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic -import datetime as dt +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .azure_open_ai_credential_models_item import AzureOpenAiCredentialModelsItem +from .azure_open_ai_credential_provider import AzureOpenAiCredentialProvider +from .azure_open_ai_credential_region import AzureOpenAiCredentialRegion -class AzureOpenAiCredential(UniversalBaseModel): - provider: typing.Literal["azure-openai"] = "azure-openai" +class AzureOpenAiCredential(UncheckedBaseModel): + provider: AzureOpenAiCredentialProvider region: AzureOpenAiCredentialRegion models: typing.List[AzureOpenAiCredentialModelsItem] - open_ai_key: typing_extensions.Annotated[str, FieldMetadata(alias="openAIKey")] = pydantic.Field() - """ - This is not returned in the API. - """ - + open_ai_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="openAIKey"), + pydantic.Field(alias="openAIKey", description="This is not returned in the API."), + ] + ocp_apim_subscription_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="ocpApimSubscriptionKey"), + pydantic.Field(alias="ocpApimSubscriptionKey", description="This is not returned in the API."), + ] = None id: str = pydantic.Field() """ This is the unique identifier for the credential. """ - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field() - """ - This is the unique identifier for the org that this credential belongs to. - """ - - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the credential was created. - """ - - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is the ISO 8601 date-time string of when the assistant was last updated. + This is the name of credential. This is just for your reference. """ - open_ai_endpoint: typing_extensions.Annotated[str, FieldMetadata(alias="openAIEndpoint")] + open_ai_endpoint: typing_extensions.Annotated[ + str, FieldMetadata(alias="openAIEndpoint"), pydantic.Field(alias="openAIEndpoint") + ] if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/azure_open_ai_credential_models_item.py b/src/vapi/types/azure_open_ai_credential_models_item.py index bd6cf9d2..ee8c6008 100644 --- a/src/vapi/types/azure_open_ai_credential_models_item.py +++ b/src/vapi/types/azure_open_ai_credential_models_item.py @@ -4,8 +4,23 @@ AzureOpenAiCredentialModelsItem = typing.Union[ typing.Literal[ - "gpt-4o-mini-2024-07-18", + "gpt-5.4", + "gpt-5.4-mini", + "gpt-5.4-nano", + "gpt-5.2", + "gpt-5.2-chat", + "gpt-5.1", + "gpt-5.1-chat", + "gpt-5", + "gpt-5-mini", + "gpt-5-nano", + "gpt-4.1-2025-04-14", + "gpt-4.1-mini-2025-04-14", + "gpt-4.1-nano-2025-04-14", + "gpt-4o-2024-11-20", + "gpt-4o-2024-08-06", "gpt-4o-2024-05-13", + "gpt-4o-mini-2024-07-18", "gpt-4-turbo-2024-04-09", "gpt-4-0125-preview", "gpt-4-1106-preview", diff --git a/src/vapi/types/azure_open_ai_credential_provider.py b/src/vapi/types/azure_open_ai_credential_provider.py new file mode 100644 index 00000000..7ace485b --- /dev/null +++ b/src/vapi/types/azure_open_ai_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +AzureOpenAiCredentialProvider = typing.Union[typing.Literal["azure-openai"], typing.Any] diff --git a/src/vapi/types/azure_open_ai_credential_region.py b/src/vapi/types/azure_open_ai_credential_region.py index a82558e8..dc6c825c 100644 --- a/src/vapi/types/azure_open_ai_credential_region.py +++ b/src/vapi/types/azure_open_ai_credential_region.py @@ -4,19 +4,27 @@ AzureOpenAiCredentialRegion = typing.Union[ typing.Literal[ - "australia", - "canada", + "australiaeast", + "canadaeast", + "canadacentral", + "centralus", "eastus2", "eastus", "france", + "germanywestcentral", "india", - "japan", + "japaneast", + "japanwest", "northcentralus", "norway", + "polandcentral", "southcentralus", - "sweden", + "spaincentral", + "swedencentral", "switzerland", + "uaenorth", "uk", + "westeurope", "westus", "westus3", ], diff --git a/src/vapi/types/azure_speech_transcriber.py b/src/vapi/types/azure_speech_transcriber.py new file mode 100644 index 00000000..0593f9d6 --- /dev/null +++ b/src/vapi/types/azure_speech_transcriber.py @@ -0,0 +1,61 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .azure_speech_transcriber_language import AzureSpeechTranscriberLanguage +from .azure_speech_transcriber_segmentation_strategy import AzureSpeechTranscriberSegmentationStrategy +from .fallback_transcriber_plan import FallbackTranscriberPlan + + +class AzureSpeechTranscriber(UncheckedBaseModel): + language: typing.Optional[AzureSpeechTranscriberLanguage] = pydantic.Field(default=None) + """ + This is the language that will be set for the transcription. The list of languages Azure supports can be found here: https://learn.microsoft.com/en-us/azure/ai-services/speech-service/language-support?tabs=stt + """ + + segmentation_strategy: typing_extensions.Annotated[ + typing.Optional[AzureSpeechTranscriberSegmentationStrategy], + FieldMetadata(alias="segmentationStrategy"), + pydantic.Field( + alias="segmentationStrategy", + description="Controls how phrase boundaries are detected, enabling either simple time/silence heuristics or more advanced semantic segmentation.", + ), + ] = None + segmentation_silence_timeout_ms: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="segmentationSilenceTimeoutMs"), + pydantic.Field( + alias="segmentationSilenceTimeoutMs", + description="Duration of detected silence after which the service finalizes a phrase. Configure to adjust sensitivity to pauses in speech.", + ), + ] = None + segmentation_maximum_time_ms: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="segmentationMaximumTimeMs"), + pydantic.Field( + alias="segmentationMaximumTimeMs", + description="Maximum duration a segment can reach before being cut off when using time-based segmentation.", + ), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field( + alias="fallbackPlan", + description="This is the plan for transcriber provider fallbacks in the event that the primary transcriber provider fails.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/azure_speech_transcriber_language.py b/src/vapi/types/azure_speech_transcriber_language.py new file mode 100644 index 00000000..72b28dc6 --- /dev/null +++ b/src/vapi/types/azure_speech_transcriber_language.py @@ -0,0 +1,152 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +AzureSpeechTranscriberLanguage = typing.Union[ + typing.Literal[ + "af-ZA", + "am-ET", + "ar-AE", + "ar-BH", + "ar-DZ", + "ar-EG", + "ar-IL", + "ar-IQ", + "ar-JO", + "ar-KW", + "ar-LB", + "ar-LY", + "ar-MA", + "ar-OM", + "ar-PS", + "ar-QA", + "ar-SA", + "ar-SY", + "ar-TN", + "ar-YE", + "az-AZ", + "bg-BG", + "bn-IN", + "bs-BA", + "ca-ES", + "cs-CZ", + "cy-GB", + "da-DK", + "de-AT", + "de-CH", + "de-DE", + "el-GR", + "en-AU", + "en-CA", + "en-GB", + "en-GH", + "en-HK", + "en-IE", + "en-IN", + "en-KE", + "en-NG", + "en-NZ", + "en-PH", + "en-SG", + "en-TZ", + "en-US", + "en-ZA", + "es-AR", + "es-BO", + "es-CL", + "es-CO", + "es-CR", + "es-CU", + "es-DO", + "es-EC", + "es-ES", + "es-GQ", + "es-GT", + "es-HN", + "es-MX", + "es-NI", + "es-PA", + "es-PE", + "es-PR", + "es-PY", + "es-SV", + "es-US", + "es-UY", + "es-VE", + "et-EE", + "eu-ES", + "fa-IR", + "fi-FI", + "fil-PH", + "fr-BE", + "fr-CA", + "fr-CH", + "fr-FR", + "ga-IE", + "gl-ES", + "gu-IN", + "he-IL", + "hi-IN", + "hr-HR", + "hu-HU", + "hy-AM", + "id-ID", + "is-IS", + "it-CH", + "it-IT", + "ja-JP", + "jv-ID", + "ka-GE", + "kk-KZ", + "km-KH", + "kn-IN", + "ko-KR", + "lo-LA", + "lt-LT", + "lv-LV", + "mk-MK", + "ml-IN", + "mn-MN", + "mr-IN", + "ms-MY", + "mt-MT", + "my-MM", + "nb-NO", + "ne-NP", + "nl-BE", + "nl-NL", + "pa-IN", + "pl-PL", + "ps-AF", + "pt-BR", + "pt-PT", + "ro-RO", + "ru-RU", + "si-LK", + "sk-SK", + "sl-SI", + "so-SO", + "sq-AL", + "sr-RS", + "sv-SE", + "sw-KE", + "sw-TZ", + "ta-IN", + "te-IN", + "th-TH", + "tr-TR", + "uk-UA", + "ur-IN", + "uz-UZ", + "vi-VN", + "wuu-CN", + "yue-CN", + "zh-CN", + "zh-CN-shandong", + "zh-CN-sichuan", + "zh-HK", + "zh-TW", + "zu-ZA", + ], + typing.Any, +] diff --git a/src/vapi/types/azure_speech_transcriber_segmentation_strategy.py b/src/vapi/types/azure_speech_transcriber_segmentation_strategy.py new file mode 100644 index 00000000..8d9aee4a --- /dev/null +++ b/src/vapi/types/azure_speech_transcriber_segmentation_strategy.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +AzureSpeechTranscriberSegmentationStrategy = typing.Union[typing.Literal["Default", "Time", "Semantic"], typing.Any] diff --git a/src/vapi/types/azure_voice.py b/src/vapi/types/azure_voice.py index 56d30c41..9ad031db 100644 --- a/src/vapi/types/azure_voice.py +++ b/src/vapi/types/azure_voice.py @@ -1,46 +1,51 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions import typing -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel from .azure_voice_id import AzureVoiceId from .chunk_plan import ChunkPlan -from ..core.pydantic_utilities import IS_PYDANTIC_V2 - - -class AzureVoice(UniversalBaseModel): - filler_injection_enabled: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="fillerInjectionEnabled") - ] = pydantic.Field(default=None) - """ - This determines whether fillers are injected into the model output before inputting it into the voice provider. - - Default `false` because you can achieve better results with prompting the model. - """ - - provider: typing.Literal["azure"] = pydantic.Field(default="azure") - """ - This is the voice provider that will be used. - """ - - voice_id: typing_extensions.Annotated[AzureVoiceId, FieldMetadata(alias="voiceId")] = pydantic.Field() - """ - This is the provider-specific ID that will be used. - """ - +from .fallback_plan import FallbackPlan + + +class AzureVoice(UncheckedBaseModel): + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="cachingEnabled"), + pydantic.Field( + alias="cachingEnabled", description="This is the flag to toggle voice caching for the assistant." + ), + ] = None + voice_id: typing_extensions.Annotated[ + AzureVoiceId, + FieldMetadata(alias="voiceId"), + pydantic.Field(alias="voiceId", description="This is the provider-specific ID that will be used."), + ] + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], + FieldMetadata(alias="chunkPlan"), + pydantic.Field( + alias="chunkPlan", + description="This is the plan for chunking the model output before it is sent to the voice provider.", + ), + ] = None speed: typing.Optional[float] = pydantic.Field(default=None) """ This is the speed multiplier that will be used. """ - chunk_plan: typing_extensions.Annotated[typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan")] = ( - pydantic.Field(default=None) - ) - """ - This is the plan for chunking the model output before it is sent to the voice provider. - """ + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field( + alias="fallbackPlan", + description="This is the plan for voice provider fallbacks in the event that the primary voice provider fails.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/azure_voice_id.py b/src/vapi/types/azure_voice_id.py index eeaabe6f..e40f61aa 100644 --- a/src/vapi/types/azure_voice_id.py +++ b/src/vapi/types/azure_voice_id.py @@ -1,6 +1,7 @@ # This file was auto-generated by Fern from our API Definition. import typing + from .azure_voice_id_enum import AzureVoiceIdEnum AzureVoiceId = typing.Union[AzureVoiceIdEnum, str] diff --git a/src/vapi/types/background_speech_denoising_plan.py b/src/vapi/types/background_speech_denoising_plan.py new file mode 100644 index 00000000..32956773 --- /dev/null +++ b/src/vapi/types/background_speech_denoising_plan.py @@ -0,0 +1,36 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .fourier_denoising_plan import FourierDenoisingPlan +from .smart_denoising_plan import SmartDenoisingPlan + + +class BackgroundSpeechDenoisingPlan(UncheckedBaseModel): + smart_denoising_plan: typing_extensions.Annotated[ + typing.Optional[SmartDenoisingPlan], + FieldMetadata(alias="smartDenoisingPlan"), + pydantic.Field(alias="smartDenoisingPlan", description="Whether smart denoising using Krisp is enabled."), + ] = None + fourier_denoising_plan: typing_extensions.Annotated[ + typing.Optional[FourierDenoisingPlan], + FieldMetadata(alias="fourierDenoisingPlan"), + pydantic.Field( + alias="fourierDenoisingPlan", + description="Whether Fourier denoising is enabled. Note that this is experimental and may not work as expected.\n\nThis can be combined with smart denoising, and will be run afterwards.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/backoff_plan.py b/src/vapi/types/backoff_plan.py new file mode 100644 index 00000000..55faa4f0 --- /dev/null +++ b/src/vapi/types/backoff_plan.py @@ -0,0 +1,52 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class BackoffPlan(UncheckedBaseModel): + type: typing.Dict[str, typing.Any] = pydantic.Field() + """ + This is the type of backoff plan to use. Defaults to fixed. + + @default fixed + """ + + max_retries: typing_extensions.Annotated[ + float, + FieldMetadata(alias="maxRetries"), + pydantic.Field( + alias="maxRetries", + description="This is the maximum number of retries to attempt if the request fails. Defaults to 0 (no retries).\n\n@default 0", + ), + ] + base_delay_seconds: typing_extensions.Annotated[ + float, + FieldMetadata(alias="baseDelaySeconds"), + pydantic.Field( + alias="baseDelaySeconds", + description="This is the base delay in seconds. For linear backoff, this is the delay between each retry. For exponential backoff, this is the initial delay.", + ), + ] + excluded_status_codes: typing_extensions.Annotated[ + typing.Optional[typing.List[typing.Dict[str, typing.Any]]], + FieldMetadata(alias="excludedStatusCodes"), + pydantic.Field( + alias="excludedStatusCodes", + description="This is the excluded status codes. If the response status code is in this list, the request will not be retried.\nBy default, the request will be retried for any non-2xx status code.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/bar_insight.py b/src/vapi/types/bar_insight.py new file mode 100644 index 00000000..26ce9e24 --- /dev/null +++ b/src/vapi/types/bar_insight.py @@ -0,0 +1,98 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .bar_insight_group_by import BarInsightGroupBy +from .bar_insight_metadata import BarInsightMetadata +from .bar_insight_queries_item import BarInsightQueriesItem +from .insight_formula import InsightFormula +from .insight_time_range_with_step import InsightTimeRangeWithStep + + +class BarInsight(UncheckedBaseModel): + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the Insight. + """ + + formulas: typing.Optional[typing.List[InsightFormula]] = pydantic.Field(default=None) + """ + Formulas are mathematical expressions applied on the data returned by the queries to transform them before being used to create the insight. + The formulas needs to be a valid mathematical expression, supported by MathJS - https://mathjs.org/docs/expressions/syntax.html + A formula is created by using the query names as the variable. + The formulas must contain at least one query name in the LiquidJS format {{query_name}} or {{['query name']}} which will be substituted with the query result. + For example, if you have 2 queries, 'Was Booking Made' and 'Average Call Duration', you can create a formula like this: + ``` + {{['Query 1']}} / {{['Query 2']}} * 100 + ``` + + ``` + ({{[Query 1]}} * 10) + {{[Query 2]}} + ``` + This will take the + + You can also use the query names as the variable in the formula. + """ + + metadata: typing.Optional[BarInsightMetadata] = pydantic.Field(default=None) + """ + This is the metadata for the insight. + """ + + time_range: typing_extensions.Annotated[ + typing.Optional[InsightTimeRangeWithStep], FieldMetadata(alias="timeRange"), pydantic.Field(alias="timeRange") + ] = None + group_by: typing_extensions.Annotated[ + typing.Optional[BarInsightGroupBy], + FieldMetadata(alias="groupBy"), + pydantic.Field( + alias="groupBy", + description="This is the group by column for the insight when table is `call`.\nThese are the columns to group the results by.\nAll results are grouped by the time range step by default.", + ), + ] = None + queries: typing.List[BarInsightQueriesItem] = pydantic.Field() + """ + These are the queries to run to generate the insight. + """ + + id: str = pydantic.Field() + """ + This is the unique identifier for the Insight. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this Insight belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the Insight was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", description="This is the ISO 8601 date-time string of when the Insight was last updated." + ), + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/bar_insight_from_call_table.py b/src/vapi/types/bar_insight_from_call_table.py new file mode 100644 index 00000000..d62a93e3 --- /dev/null +++ b/src/vapi/types/bar_insight_from_call_table.py @@ -0,0 +1,77 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .bar_insight_from_call_table_group_by import BarInsightFromCallTableGroupBy +from .bar_insight_from_call_table_queries_item import BarInsightFromCallTableQueriesItem +from .bar_insight_from_call_table_type import BarInsightFromCallTableType +from .bar_insight_metadata import BarInsightMetadata +from .insight_formula import InsightFormula +from .insight_time_range_with_step import InsightTimeRangeWithStep + + +class BarInsightFromCallTable(UncheckedBaseModel): + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the Insight. + """ + + type: BarInsightFromCallTableType = pydantic.Field() + """ + This is the type of the Insight. + It is required to be `bar` to create a bar insight. + """ + + formulas: typing.Optional[typing.List[InsightFormula]] = pydantic.Field(default=None) + """ + Formulas are mathematical expressions applied on the data returned by the queries to transform them before being used to create the insight. + The formulas needs to be a valid mathematical expression, supported by MathJS - https://mathjs.org/docs/expressions/syntax.html + A formula is created by using the query names as the variable. + The formulas must contain at least one query name in the LiquidJS format {{query_name}} or {{['query name']}} which will be substituted with the query result. + For example, if you have 2 queries, 'Was Booking Made' and 'Average Call Duration', you can create a formula like this: + ``` + {{['Query 1']}} / {{['Query 2']}} * 100 + ``` + + ``` + ({{[Query 1]}} * 10) + {{[Query 2]}} + ``` + This will take the + + You can also use the query names as the variable in the formula. + """ + + metadata: typing.Optional[BarInsightMetadata] = pydantic.Field(default=None) + """ + This is the metadata for the insight. + """ + + time_range: typing_extensions.Annotated[ + typing.Optional[InsightTimeRangeWithStep], FieldMetadata(alias="timeRange"), pydantic.Field(alias="timeRange") + ] = None + group_by: typing_extensions.Annotated[ + typing.Optional[BarInsightFromCallTableGroupBy], + FieldMetadata(alias="groupBy"), + pydantic.Field( + alias="groupBy", + description="This is the group by column for the insight when table is `call`.\nThese are the columns to group the results by.\nAll results are grouped by the time range step by default.", + ), + ] = None + queries: typing.List[BarInsightFromCallTableQueriesItem] = pydantic.Field() + """ + These are the queries to run to generate the insight. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/bar_insight_from_call_table_group_by.py b/src/vapi/types/bar_insight_from_call_table_group_by.py new file mode 100644 index 00000000..1b734708 --- /dev/null +++ b/src/vapi/types/bar_insight_from_call_table_group_by.py @@ -0,0 +1,18 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +BarInsightFromCallTableGroupBy = typing.Union[ + typing.Literal[ + "assistantId", + "workflowId", + "squadId", + "phoneNumberId", + "type", + "endedReason", + "customerNumber", + "campaignId", + "artifact.structuredOutputs[OutputID]", + ], + typing.Any, +] diff --git a/src/vapi/types/bar_insight_from_call_table_queries_item.py b/src/vapi/types/bar_insight_from_call_table_queries_item.py new file mode 100644 index 00000000..84f826cb --- /dev/null +++ b/src/vapi/types/bar_insight_from_call_table_queries_item.py @@ -0,0 +1,15 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .json_query_on_call_table_with_number_type_column import JsonQueryOnCallTableWithNumberTypeColumn +from .json_query_on_call_table_with_string_type_column import JsonQueryOnCallTableWithStringTypeColumn +from .json_query_on_call_table_with_structured_output_column import JsonQueryOnCallTableWithStructuredOutputColumn +from .json_query_on_events_table import JsonQueryOnEventsTable + +BarInsightFromCallTableQueriesItem = typing.Union[ + JsonQueryOnCallTableWithStringTypeColumn, + JsonQueryOnCallTableWithNumberTypeColumn, + JsonQueryOnCallTableWithStructuredOutputColumn, + JsonQueryOnEventsTable, +] diff --git a/src/vapi/types/bar_insight_from_call_table_type.py b/src/vapi/types/bar_insight_from_call_table_type.py new file mode 100644 index 00000000..e6986cb6 --- /dev/null +++ b/src/vapi/types/bar_insight_from_call_table_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +BarInsightFromCallTableType = typing.Union[typing.Literal["bar"], typing.Any] diff --git a/src/vapi/types/bar_insight_group_by.py b/src/vapi/types/bar_insight_group_by.py new file mode 100644 index 00000000..a5643c30 --- /dev/null +++ b/src/vapi/types/bar_insight_group_by.py @@ -0,0 +1,18 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +BarInsightGroupBy = typing.Union[ + typing.Literal[ + "assistantId", + "workflowId", + "squadId", + "phoneNumberId", + "type", + "endedReason", + "customerNumber", + "campaignId", + "artifact.structuredOutputs[OutputID]", + ], + typing.Any, +] diff --git a/src/vapi/types/bar_insight_metadata.py b/src/vapi/types/bar_insight_metadata.py new file mode 100644 index 00000000..ce11229e --- /dev/null +++ b/src/vapi/types/bar_insight_metadata.py @@ -0,0 +1,34 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class BarInsightMetadata(UncheckedBaseModel): + x_axis_label: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="xAxisLabel"), pydantic.Field(alias="xAxisLabel") + ] = None + y_axis_label: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="yAxisLabel"), pydantic.Field(alias="yAxisLabel") + ] = None + y_axis_min: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="yAxisMin"), pydantic.Field(alias="yAxisMin") + ] = None + y_axis_max: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="yAxisMax"), pydantic.Field(alias="yAxisMax") + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/bar_insight_queries_item.py b/src/vapi/types/bar_insight_queries_item.py new file mode 100644 index 00000000..195cd6d5 --- /dev/null +++ b/src/vapi/types/bar_insight_queries_item.py @@ -0,0 +1,15 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .json_query_on_call_table_with_number_type_column import JsonQueryOnCallTableWithNumberTypeColumn +from .json_query_on_call_table_with_string_type_column import JsonQueryOnCallTableWithStringTypeColumn +from .json_query_on_call_table_with_structured_output_column import JsonQueryOnCallTableWithStructuredOutputColumn +from .json_query_on_events_table import JsonQueryOnEventsTable + +BarInsightQueriesItem = typing.Union[ + JsonQueryOnCallTableWithStringTypeColumn, + JsonQueryOnCallTableWithNumberTypeColumn, + JsonQueryOnCallTableWithStructuredOutputColumn, + JsonQueryOnEventsTable, +] diff --git a/src/vapi/types/bash_tool.py b/src/vapi/types/bash_tool.py new file mode 100644 index 00000000..2f476bc7 --- /dev/null +++ b/src/vapi/types/bash_tool.py @@ -0,0 +1,95 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .bash_tool_messages_item import BashToolMessagesItem +from .bash_tool_name import BashToolName +from .bash_tool_sub_type import BashToolSubType +from .server import Server +from .tool_rejection_plan import ToolRejectionPlan + + +class BashTool(UncheckedBaseModel): + messages: typing.Optional[typing.List[BashToolMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + sub_type: typing_extensions.Annotated[ + BashToolSubType, + FieldMetadata(alias="subType"), + pydantic.Field(alias="subType", description="The sub type of tool."), + ] + server: typing.Optional[Server] = pydantic.Field(default=None) + """ + + This is the server where a `tool-calls` webhook will be sent. + + Notes: + - Webhook is sent to this server when a tool call is made. + - Webhook contains the call, assistant, and phone number objects. + - Webhook contains the variables set on the assistant. + - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}. + - Webhook expects a response with tool call result. + """ + + id: str = pydantic.Field() + """ + This is the unique identifier for the tool. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the organization that this tool belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the tool was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", description="This is the ISO 8601 date-time string of when the tool was last updated." + ), + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + name: BashToolName = pydantic.Field() + """ + The name of the tool, fixed to 'bash' + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(BashTool) diff --git a/src/vapi/types/bash_tool_messages_item.py b/src/vapi/types/bash_tool_messages_item.py new file mode 100644 index 00000000..2c0baa72 --- /dev/null +++ b/src/vapi/types/bash_tool_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class BashToolMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class BashToolMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class BashToolMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class BashToolMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +BashToolMessagesItem = typing_extensions.Annotated[ + typing.Union[ + BashToolMessagesItem_RequestStart, + BashToolMessagesItem_RequestComplete, + BashToolMessagesItem_RequestFailed, + BashToolMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/bash_tool_name.py b/src/vapi/types/bash_tool_name.py new file mode 100644 index 00000000..580a8ce7 --- /dev/null +++ b/src/vapi/types/bash_tool_name.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +BashToolName = typing.Union[typing.Literal["bash"], typing.Any] diff --git a/src/vapi/types/bash_tool_sub_type.py b/src/vapi/types/bash_tool_sub_type.py new file mode 100644 index 00000000..82c2f792 --- /dev/null +++ b/src/vapi/types/bash_tool_sub_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +BashToolSubType = typing.Union[typing.Literal["bash_20241022"], typing.Any] diff --git a/src/vapi/types/bash_tool_with_tool_call.py b/src/vapi/types/bash_tool_with_tool_call.py new file mode 100644 index 00000000..0ca0d6a6 --- /dev/null +++ b/src/vapi/types/bash_tool_with_tool_call.py @@ -0,0 +1,71 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .bash_tool_with_tool_call_messages_item import BashToolWithToolCallMessagesItem +from .bash_tool_with_tool_call_name import BashToolWithToolCallName +from .bash_tool_with_tool_call_sub_type import BashToolWithToolCallSubType +from .server import Server +from .tool_call import ToolCall +from .tool_rejection_plan import ToolRejectionPlan + + +class BashToolWithToolCall(UncheckedBaseModel): + messages: typing.Optional[typing.List[BashToolWithToolCallMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + sub_type: typing_extensions.Annotated[ + BashToolWithToolCallSubType, + FieldMetadata(alias="subType"), + pydantic.Field(alias="subType", description="The sub type of tool."), + ] + server: typing.Optional[Server] = pydantic.Field(default=None) + """ + + This is the server where a `tool-calls` webhook will be sent. + + Notes: + - Webhook is sent to this server when a tool call is made. + - Webhook contains the call, assistant, and phone number objects. + - Webhook contains the variables set on the assistant. + - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}. + - Webhook expects a response with tool call result. + """ + + tool_call: typing_extensions.Annotated[ToolCall, FieldMetadata(alias="toolCall"), pydantic.Field(alias="toolCall")] + name: BashToolWithToolCallName = pydantic.Field() + """ + The name of the tool, fixed to 'bash' + """ + + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(BashToolWithToolCall) diff --git a/src/vapi/types/bash_tool_with_tool_call_messages_item.py b/src/vapi/types/bash_tool_with_tool_call_messages_item.py new file mode 100644 index 00000000..53549d58 --- /dev/null +++ b/src/vapi/types/bash_tool_with_tool_call_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class BashToolWithToolCallMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class BashToolWithToolCallMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class BashToolWithToolCallMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class BashToolWithToolCallMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +BashToolWithToolCallMessagesItem = typing_extensions.Annotated[ + typing.Union[ + BashToolWithToolCallMessagesItem_RequestStart, + BashToolWithToolCallMessagesItem_RequestComplete, + BashToolWithToolCallMessagesItem_RequestFailed, + BashToolWithToolCallMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/bash_tool_with_tool_call_name.py b/src/vapi/types/bash_tool_with_tool_call_name.py new file mode 100644 index 00000000..46220674 --- /dev/null +++ b/src/vapi/types/bash_tool_with_tool_call_name.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +BashToolWithToolCallName = typing.Union[typing.Literal["bash"], typing.Any] diff --git a/src/vapi/types/bash_tool_with_tool_call_sub_type.py b/src/vapi/types/bash_tool_with_tool_call_sub_type.py new file mode 100644 index 00000000..ef24438c --- /dev/null +++ b/src/vapi/types/bash_tool_with_tool_call_sub_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +BashToolWithToolCallSubType = typing.Union[typing.Literal["bash_20241022"], typing.Any] diff --git a/src/vapi/types/bearer_authentication_plan.py b/src/vapi/types/bearer_authentication_plan.py new file mode 100644 index 00000000..d7fec9b1 --- /dev/null +++ b/src/vapi/types/bearer_authentication_plan.py @@ -0,0 +1,42 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class BearerAuthenticationPlan(UncheckedBaseModel): + token: str = pydantic.Field() + """ + This is the bearer token value. + """ + + header_name: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="headerName"), + pydantic.Field( + alias="headerName", + description="This is the header name where the bearer token will be sent. Defaults to 'Authorization'.", + ), + ] = None + bearer_prefix_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="bearerPrefixEnabled"), + pydantic.Field( + alias="bearerPrefixEnabled", + description="Whether to include the 'Bearer ' prefix in the header value. Defaults to true.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/block_complete_message.py b/src/vapi/types/block_complete_message.py deleted file mode 100644 index c4d33f92..00000000 --- a/src/vapi/types/block_complete_message.py +++ /dev/null @@ -1,33 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from ..core.pydantic_utilities import UniversalBaseModel -import typing -from .block_complete_message_conditions_item import BlockCompleteMessageConditionsItem -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 - - -class BlockCompleteMessage(UniversalBaseModel): - conditions: typing.Optional[typing.List[BlockCompleteMessageConditionsItem]] = pydantic.Field(default=None) - """ - This is an optional array of conditions that must be met for this message to be triggered. - """ - - type: typing.Literal["block-complete"] = pydantic.Field(default="block-complete") - """ - This is the message type that is triggered when the block completes. - """ - - content: str = pydantic.Field() - """ - This is the content that the assistant will say when this message is triggered. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/vapi/types/block_complete_message_conditions_item.py b/src/vapi/types/block_complete_message_conditions_item.py deleted file mode 100644 index 5da3dd6f..00000000 --- a/src/vapi/types/block_complete_message_conditions_item.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from .model_based_condition import ModelBasedCondition -from .rule_based_condition import RuleBasedCondition - -BlockCompleteMessageConditionsItem = typing.Union[ModelBasedCondition, RuleBasedCondition] diff --git a/src/vapi/types/block_start_message.py b/src/vapi/types/block_start_message.py deleted file mode 100644 index 917aaf8d..00000000 --- a/src/vapi/types/block_start_message.py +++ /dev/null @@ -1,33 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from ..core.pydantic_utilities import UniversalBaseModel -import typing -from .block_start_message_conditions_item import BlockStartMessageConditionsItem -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 - - -class BlockStartMessage(UniversalBaseModel): - conditions: typing.Optional[typing.List[BlockStartMessageConditionsItem]] = pydantic.Field(default=None) - """ - This is an optional array of conditions that must be met for this message to be triggered. - """ - - type: typing.Literal["block-start"] = pydantic.Field(default="block-start") - """ - This is the message type that is triggered when the block starts. - """ - - content: str = pydantic.Field() - """ - This is the content that the assistant will say when this message is triggered. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/vapi/types/block_start_message_conditions_item.py b/src/vapi/types/block_start_message_conditions_item.py deleted file mode 100644 index cf7a9ccf..00000000 --- a/src/vapi/types/block_start_message_conditions_item.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from .model_based_condition import ModelBasedCondition -from .rule_based_condition import RuleBasedCondition - -BlockStartMessageConditionsItem = typing.Union[ModelBasedCondition, RuleBasedCondition] diff --git a/src/vapi/types/bot_message.py b/src/vapi/types/bot_message.py index 0d862aaf..68c810a5 100644 --- a/src/vapi/types/bot_message.py +++ b/src/vapi/types/bot_message.py @@ -1,14 +1,15 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +import typing + import pydantic import typing_extensions -from ..core.serialization import FieldMetadata -import typing from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class BotMessage(UniversalBaseModel): +class BotMessage(UncheckedBaseModel): role: str = pydantic.Field() """ The role of the bot in the conversation. @@ -24,16 +25,18 @@ class BotMessage(UniversalBaseModel): The timestamp when the message was sent. """ - end_time: typing_extensions.Annotated[float, FieldMetadata(alias="endTime")] = pydantic.Field() - """ - The timestamp when the message ended. - """ - - seconds_from_start: typing_extensions.Annotated[float, FieldMetadata(alias="secondsFromStart")] = pydantic.Field() - """ - The number of seconds from the start of the conversation. - """ - + end_time: typing_extensions.Annotated[ + float, + FieldMetadata(alias="endTime"), + pydantic.Field(alias="endTime", description="The timestamp when the message ended."), + ] + seconds_from_start: typing_extensions.Annotated[ + float, + FieldMetadata(alias="secondsFromStart"), + pydantic.Field( + alias="secondsFromStart", description="The number of seconds from the start of the conversation." + ), + ] source: typing.Optional[str] = pydantic.Field(default=None) """ The source of the message. diff --git a/src/vapi/types/both_custom_endpointing_rule.py b/src/vapi/types/both_custom_endpointing_rule.py new file mode 100644 index 00000000..1a09a4e0 --- /dev/null +++ b/src/vapi/types/both_custom_endpointing_rule.py @@ -0,0 +1,56 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .regex_option import RegexOption + + +class BothCustomEndpointingRule(UncheckedBaseModel): + assistant_regex: typing_extensions.Annotated[ + str, + FieldMetadata(alias="assistantRegex"), + pydantic.Field( + alias="assistantRegex", + description='This is the regex pattern to match the assistant\'s message.\n\nNote:\n- This works by using the `RegExp.test` method in Node.JS. Eg. `/hello/.test("hello there")` will return `true`.\n\nHot tip:\n- In JavaScript, escape `\\` when sending the regex pattern. Eg. `"hello\\sthere"` will be sent over the wire as `"hellosthere"`. Send `"hello\\\\sthere"` instead.\n- `RegExp.test` does substring matching, so `/cat/.test("I love cats")` will return `true`. To do full string matching, send "^cat$".', + ), + ] + assistant_regex_options: typing_extensions.Annotated[ + typing.Optional[typing.List[RegexOption]], + FieldMetadata(alias="assistantRegexOptions"), + pydantic.Field( + alias="assistantRegexOptions", + description="These are the options for the assistant's message regex match. Defaults to all disabled.\n\n@default []", + ), + ] = None + customer_regex: typing_extensions.Annotated[ + str, FieldMetadata(alias="customerRegex"), pydantic.Field(alias="customerRegex") + ] + customer_regex_options: typing_extensions.Annotated[ + typing.Optional[typing.List[RegexOption]], + FieldMetadata(alias="customerRegexOptions"), + pydantic.Field( + alias="customerRegexOptions", + description="These are the options for the customer's message regex match. Defaults to all disabled.\n\n@default []", + ), + ] = None + timeout_seconds: typing_extensions.Annotated[ + float, + FieldMetadata(alias="timeoutSeconds"), + pydantic.Field( + alias="timeoutSeconds", description="This is the endpointing timeout in seconds, if the rule is matched." + ), + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/bucket_plan.py b/src/vapi/types/bucket_plan.py index cb1820fe..0a668671 100644 --- a/src/vapi/types/bucket_plan.py +++ b/src/vapi/types/bucket_plan.py @@ -1,14 +1,15 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import pydantic import typing + +import pydantic import typing_extensions -from ..core.serialization import FieldMetadata from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class BucketPlan(UniversalBaseModel): +class BucketPlan(UncheckedBaseModel): name: str = pydantic.Field() """ This is the name of the bucket. @@ -19,9 +20,10 @@ class BucketPlan(UniversalBaseModel): This is the region of the bucket. Usage: - - If `credential.type` is `aws`, then this is required. - If `credential.type` is `gcp`, then this is optional since GCP allows buckets to be accessed without a region but region is required for data residency requirements. Read here: https://cloud.google.com/storage/docs/request-endpoints + + This overrides the `credential.region` field if it is provided. """ path: typing.Optional[str] = pydantic.Field(default=None) @@ -29,38 +31,28 @@ class BucketPlan(UniversalBaseModel): This is the path where call artifacts will be stored. Usage: - - To store call artifacts in a specific folder, set this to the full path. Eg. "/folder-name1/folder-name2". - To store call artifacts in the root of the bucket, leave this blank. @default "/" """ - hmac_access_key: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="hmacAccessKey")] = ( - pydantic.Field(default=None) - ) - """ - This is the HMAC access key offered by GCP for interoperability with S3 clients. Here is the guide on how to create: https://cloud.google.com/storage/docs/authentication/managing-hmackeys#console - - Usage: - - - If `credential.type` is `gcp`, then this is required. - - If `credential.type` is `aws`, then this is not required since credential.awsAccessKeyId is used instead. - """ - - hmac_secret: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="hmacSecret")] = pydantic.Field( - default=None - ) - """ - This is the secret for the HMAC access key. Here is the guide on how to create: https://cloud.google.com/storage/docs/authentication/managing-hmackeys#console - - Usage: - - - If `credential.type` is `gcp`, then this is required. - - If `credential.type` is `aws`, then this is not required since credential.awsSecretAccessKey is used instead. - - Note: This is not returned in the API. - """ + hmac_access_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="hmacAccessKey"), + pydantic.Field( + alias="hmacAccessKey", + description="This is the HMAC access key offered by GCP for interoperability with S3 clients. Here is the guide on how to create: https://cloud.google.com/storage/docs/authentication/managing-hmackeys#console\n\nUsage:\n- If `credential.type` is `gcp`, then this is required.\n- If `credential.type` is `aws`, then this is not required since credential.awsAccessKeyId is used instead.", + ), + ] = None + hmac_secret: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="hmacSecret"), + pydantic.Field( + alias="hmacSecret", + description="This is the secret for the HMAC access key. Here is the guide on how to create: https://cloud.google.com/storage/docs/authentication/managing-hmackeys#console\n\nUsage:\n- If `credential.type` is `gcp`, then this is required.\n- If `credential.type` is `aws`, then this is not required since credential.awsSecretAccessKey is used instead.\n\nNote: This is not returned in the API.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/buy_phone_number_dto.py b/src/vapi/types/buy_phone_number_dto.py deleted file mode 100644 index a9dd7647..00000000 --- a/src/vapi/types/buy_phone_number_dto.py +++ /dev/null @@ -1,81 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions -import typing -from .buy_phone_number_dto_fallback_destination import BuyPhoneNumberDtoFallbackDestination -from ..core.serialization import FieldMetadata -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 - - -class BuyPhoneNumberDto(UniversalBaseModel): - fallback_destination: typing_extensions.Annotated[ - typing.Optional[BuyPhoneNumberDtoFallbackDestination], FieldMetadata(alias="fallbackDestination") - ] = pydantic.Field(default=None) - """ - This is the fallback destination an inbound call will be transferred to if: - - 1. `assistantId` is not set - 2. `squadId` is not set - 3. and, `assistant-request` message to the `serverUrl` fails - - If this is not set and above conditions are met, the inbound call is hung up with an error message. - """ - - area_code: typing_extensions.Annotated[str, FieldMetadata(alias="areaCode")] = pydantic.Field() - """ - This is the area code of the phone number to purchase. - """ - - name: typing.Optional[str] = pydantic.Field(default=None) - """ - This is the name of the phone number. This is just for your own reference. - """ - - assistant_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="assistantId")] = ( - pydantic.Field(default=None) - ) - """ - This is the assistant that will be used for incoming calls to this phone number. - - If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected. - """ - - squad_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="squadId")] = pydantic.Field( - default=None - ) - """ - This is the squad that will be used for incoming calls to this phone number. - - If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected. - """ - - server_url: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="serverUrl")] = pydantic.Field( - default=None - ) - """ - This is the server URL where messages will be sent for calls on this number. This includes the `assistant-request` message. - - You can see the shape of the messages sent in `ServerMessage`. - - This overrides the `org.serverUrl`. Order of precedence: tool.server.url > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl. - """ - - server_url_secret: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="serverUrlSecret")] = ( - pydantic.Field(default=None) - ) - """ - This is the secret Vapi will send with every message to your server. It's sent as a header called x-vapi-secret. - - Same precedence logic as serverUrl. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/vapi/types/buy_phone_number_dto_fallback_destination.py b/src/vapi/types/buy_phone_number_dto_fallback_destination.py deleted file mode 100644 index 82d6250f..00000000 --- a/src/vapi/types/buy_phone_number_dto_fallback_destination.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from .transfer_destination_number import TransferDestinationNumber -from .transfer_destination_sip import TransferDestinationSip - -BuyPhoneNumberDtoFallbackDestination = typing.Union[TransferDestinationNumber, TransferDestinationSip] diff --git a/src/vapi/types/byo_phone_number.py b/src/vapi/types/byo_phone_number.py index 1ee72d31..b64d9b8f 100644 --- a/src/vapi/types/byo_phone_number.py +++ b/src/vapi/types/byo_phone_number.py @@ -1,64 +1,71 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions +import datetime as dt import typing -from .byo_phone_number_fallback_destination import ByoPhoneNumberFallbackDestination -from ..core.serialization import FieldMetadata + import pydantic -import datetime as dt +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .byo_phone_number_fallback_destination import ByoPhoneNumberFallbackDestination +from .byo_phone_number_hooks_item import ByoPhoneNumberHooksItem +from .byo_phone_number_status import ByoPhoneNumberStatus +from .server import Server -class ByoPhoneNumber(UniversalBaseModel): +class ByoPhoneNumber(UncheckedBaseModel): fallback_destination: typing_extensions.Annotated[ - typing.Optional[ByoPhoneNumberFallbackDestination], FieldMetadata(alias="fallbackDestination") - ] = pydantic.Field(default=None) + typing.Optional[ByoPhoneNumberFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field( + alias="fallbackDestination", + description="This is the fallback destination an inbound call will be transferred to if:\n1. `assistantId` is not set\n2. `squadId` is not set\n3. and, `assistant-request` message to the `serverUrl` fails\n\nIf this is not set and above conditions are met, the inbound call is hung up with an error message.", + ), + ] = None + hooks: typing.Optional[typing.List[ByoPhoneNumberHooksItem]] = pydantic.Field(default=None) """ - This is the fallback destination an inbound call will be transferred to if: - - 1. `assistantId` is not set - 2. `squadId` is not set - 3. and, `assistant-request` message to the `serverUrl` fails - - If this is not set and above conditions are met, the inbound call is hung up with an error message. + This is the hooks that will be used for incoming calls to this phone number. """ - provider: typing.Literal["byo-phone-number"] = "byo-phone-number" number_e_164_check_enabled: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="numberE164CheckEnabled") - ] = pydantic.Field(default=None) - """ - This is the flag to toggle the E164 check for the `number` field. This is an advanced property which should be used if you know your use case requires it. - - Use cases: - - - `false`: To allow non-E164 numbers like `+001234567890`, `1234`, or `abc`. This is useful for dialing out to non-E164 numbers on your SIP trunks. - - `true` (default): To allow only E164 numbers like `+14155551234`. This is standard for PSTN calls. - - If `false`, the `number` is still required to only contain alphanumeric characters (regex: `/^\+?[a-zA-Z0-9]+$/`). - - @default true (E164 check is enabled) - """ - + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field( + alias="numberE164CheckEnabled", + description="This is the flag to toggle the E164 check for the `number` field. This is an advanced property which should be used if you know your use case requires it.\n\nUse cases:\n- `false`: To allow non-E164 numbers like `+001234567890`, `1234`, or `abc`. This is useful for dialing out to non-E164 numbers on your SIP trunks.\n- `true` (default): To allow only E164 numbers like `+14155551234`. This is standard for PSTN calls.\n\nIf `false`, the `number` is still required to only contain alphanumeric characters (regex: `/^\\+?[a-zA-Z0-9]+$/`).\n\n@default true (E164 check is enabled)", + ), + ] = None id: str = pydantic.Field() """ This is the unique identifier for the phone number. """ - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field() - """ - This is the unique identifier for the org that this phone number belongs to. - """ - - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the phone number was created. - """ - - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the phone number was last updated. + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this phone number belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the phone number was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the phone number was last updated.", + ), + ] + status: typing.Optional[ByoPhoneNumberStatus] = pydantic.Field(default=None) + """ + This is the status of the phone number. """ name: typing.Optional[str] = pydantic.Field(default=None) @@ -66,42 +73,39 @@ class ByoPhoneNumber(UniversalBaseModel): This is the name of the phone number. This is just for your own reference. """ - assistant_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="assistantId")] = ( - pydantic.Field(default=None) - ) - """ - This is the assistant that will be used for incoming calls to this phone number. - - If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected. - """ - - squad_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="squadId")] = pydantic.Field( - default=None - ) - """ - This is the squad that will be used for incoming calls to this phone number. - - If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected. - """ - - server_url: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="serverUrl")] = pydantic.Field( - default=None - ) - """ - This is the server URL where messages will be sent for calls on this number. This includes the `assistant-request` message. + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assistantId"), + pydantic.Field( + alias="assistantId", + description="This is the assistant that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="workflowId"), + pydantic.Field( + alias="workflowId", + description="This is the workflow that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="squadId"), + pydantic.Field( + alias="squadId", + description="This is the squad that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + server: typing.Optional[Server] = pydantic.Field(default=None) + """ + This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema. - You can see the shape of the messages sent in `ServerMessage`. - - This overrides the `org.serverUrl`. Order of precedence: tool.server.url > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl. - """ - - server_url_secret: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="serverUrlSecret")] = ( - pydantic.Field(default=None) - ) - """ - This is the secret Vapi will send with every message to your server. It's sent as a header called x-vapi-secret. + The order of precedence is: - Same precedence logic as serverUrl. + 1. assistant.server + 2. phoneNumber.server + 3. org.server """ number: typing.Optional[str] = pydantic.Field(default=None) @@ -109,12 +113,14 @@ class ByoPhoneNumber(UniversalBaseModel): This is the number of the customer. """ - credential_id: typing_extensions.Annotated[str, FieldMetadata(alias="credentialId")] = pydantic.Field() - """ - This is the credential of your own SIP trunk or Carrier (type `byo-sip-trunk`) which can be used to make calls to this phone number. - - You can add the SIP trunk or Carrier credential in the Provider Credentials page on the Dashboard to get the credentialId. - """ + credential_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="credentialId"), + pydantic.Field( + alias="credentialId", + description="This is the credential of your own SIP trunk or Carrier (type `byo-sip-trunk`) which can be used to make calls to this phone number.\n\nYou can add the SIP trunk or Carrier credential in the Provider Credentials page on the Dashboard to get the credentialId.", + ), + ] if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/byo_phone_number_fallback_destination.py b/src/vapi/types/byo_phone_number_fallback_destination.py index 9637f4eb..73989950 100644 --- a/src/vapi/types/byo_phone_number_fallback_destination.py +++ b/src/vapi/types/byo_phone_number_fallback_destination.py @@ -1,7 +1,93 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .transfer_destination_number import TransferDestinationNumber -from .transfer_destination_sip import TransferDestinationSip -ByoPhoneNumberFallbackDestination = typing.Union[TransferDestinationNumber, TransferDestinationSip] +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .transfer_destination_number_message import TransferDestinationNumberMessage +from .transfer_destination_sip_message import TransferDestinationSipMessage +from .transfer_plan import TransferPlan + + +class ByoPhoneNumberFallbackDestination_Number(UncheckedBaseModel): + """ + This is the fallback destination an inbound call will be transferred to if: + 1. `assistantId` is not set + 2. `squadId` is not set + 3. and, `assistant-request` message to the `serverUrl` fails + + If this is not set and above conditions are met, the inbound call is hung up with an error message. + """ + + type: typing.Literal["number"] = "number" + message: typing.Optional[TransferDestinationNumberMessage] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: str + extension: typing.Optional[str] = None + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ByoPhoneNumberFallbackDestination_Sip(UncheckedBaseModel): + """ + This is the fallback destination an inbound call will be transferred to if: + 1. `assistantId` is not set + 2. `squadId` is not set + 3. and, `assistant-request` message to the `serverUrl` fails + + If this is not set and above conditions are met, the inbound call is hung up with an error message. + """ + + type: typing.Literal["sip"] = "sip" + message: typing.Optional[TransferDestinationSipMessage] = None + sip_uri: typing_extensions.Annotated[str, FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri")] + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + sip_headers: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="sipHeaders"), + pydantic.Field(alias="sipHeaders"), + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ByoPhoneNumberFallbackDestination = typing_extensions.Annotated[ + typing.Union[ByoPhoneNumberFallbackDestination_Number, ByoPhoneNumberFallbackDestination_Sip], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/byo_phone_number_hooks_item.py b/src/vapi/types/byo_phone_number_hooks_item.py new file mode 100644 index 00000000..e75b319c --- /dev/null +++ b/src/vapi/types/byo_phone_number_hooks_item.py @@ -0,0 +1,50 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .phone_number_call_ending_hook_filter import PhoneNumberCallEndingHookFilter +from .phone_number_call_ringing_hook_filter import PhoneNumberCallRingingHookFilter +from .phone_number_hook_call_ending_do import PhoneNumberHookCallEndingDo +from .phone_number_hook_call_ringing_do_item import PhoneNumberHookCallRingingDoItem + + +class ByoPhoneNumberHooksItem_CallRinging(UncheckedBaseModel): + on: typing.Literal["call.ringing"] = "call.ringing" + filters: typing.Optional[typing.List[PhoneNumberCallRingingHookFilter]] = None + do: typing.List[PhoneNumberHookCallRingingDoItem] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ByoPhoneNumberHooksItem_CallEnding(UncheckedBaseModel): + on: typing.Literal["call.ending"] = "call.ending" + filters: typing.Optional[typing.List[PhoneNumberCallEndingHookFilter]] = None + do: typing.Optional[PhoneNumberHookCallEndingDo] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ByoPhoneNumberHooksItem = typing_extensions.Annotated[ + typing.Union[ByoPhoneNumberHooksItem_CallRinging, ByoPhoneNumberHooksItem_CallEnding], + UnionMetadata(discriminant="on"), +] diff --git a/src/vapi/types/byo_phone_number_status.py b/src/vapi/types/byo_phone_number_status.py new file mode 100644 index 00000000..59910d0e --- /dev/null +++ b/src/vapi/types/byo_phone_number_status.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ByoPhoneNumberStatus = typing.Union[typing.Literal["active", "activating", "blocked"], typing.Any] diff --git a/src/vapi/types/byo_sip_trunk_credential.py b/src/vapi/types/byo_sip_trunk_credential.py index 29bd1304..54d3f72d 100644 --- a/src/vapi/types/byo_sip_trunk_credential.py +++ b/src/vapi/types/byo_sip_trunk_credential.py @@ -1,19 +1,21 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +import datetime as dt import typing + import pydantic import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.serialization import FieldMetadata -import datetime as dt +from ..core.unchecked_base_model import UncheckedBaseModel +from .byo_sip_trunk_credential_provider import ByoSipTrunkCredentialProvider +from .sbc_configuration import SbcConfiguration from .sip_trunk_gateway import SipTrunkGateway from .sip_trunk_outbound_authentication_plan import SipTrunkOutboundAuthenticationPlan -from .sbc_configuration import SbcConfiguration -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -class ByoSipTrunkCredential(UniversalBaseModel): - provider: typing.Optional[typing.Literal["byo-sip-trunk"]] = pydantic.Field(default=None) +class ByoSipTrunkCredential(UncheckedBaseModel): + provider: typing.Optional[ByoSipTrunkCredentialProvider] = pydantic.Field(default=None) """ This can be used to bring your own SIP trunks or to connect to a Carrier. """ @@ -23,19 +25,31 @@ class ByoSipTrunkCredential(UniversalBaseModel): This is the unique identifier for the credential. """ - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field() - """ - This is the unique identifier for the org that this credential belongs to. - """ - - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the credential was created. - """ - - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is the ISO 8601 date-time string of when the assistant was last updated. + This is the name of credential. This is just for your reference. """ gateways: typing.List[SipTrunkGateway] = pydantic.Field() @@ -43,37 +57,46 @@ class ByoSipTrunkCredential(UniversalBaseModel): This is the list of SIP trunk's gateways. """ - name: typing.Optional[str] = pydantic.Field(default=None) - """ - This is the name of the SIP trunk. This is just for your reference. - """ - outbound_authentication_plan: typing_extensions.Annotated[ - typing.Optional[SipTrunkOutboundAuthenticationPlan], FieldMetadata(alias="outboundAuthenticationPlan") - ] = pydantic.Field(default=None) - """ - This can be used to configure the outbound authentication if required by the SIP trunk. - """ - + typing.Optional[SipTrunkOutboundAuthenticationPlan], + FieldMetadata(alias="outboundAuthenticationPlan"), + pydantic.Field( + alias="outboundAuthenticationPlan", + description="This can be used to configure the outbound authentication if required by the SIP trunk.", + ), + ] = None outbound_leading_plus_enabled: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="outboundLeadingPlusEnabled") - ] = pydantic.Field(default=None) - """ - This ensures the outbound origination attempts have a leading plus. Defaults to false to match conventional telecom behavior. - - Usage: - - - Vonage/Twilio requires leading plus for all outbound calls. Set this to true. - - @default false - """ - + typing.Optional[bool], + FieldMetadata(alias="outboundLeadingPlusEnabled"), + pydantic.Field( + alias="outboundLeadingPlusEnabled", + description="This ensures the outbound origination attempts have a leading plus. Defaults to false to match conventional telecom behavior.\n\nUsage:\n- Vonage/Twilio requires leading plus for all outbound calls. Set this to true.\n\n@default false", + ), + ] = None + tech_prefix: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="techPrefix"), + pydantic.Field( + alias="techPrefix", + description="This can be used to configure the tech prefix on outbound calls. This is an advanced property.", + ), + ] = None + sip_diversion_header: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="sipDiversionHeader"), + pydantic.Field( + alias="sipDiversionHeader", + description="This can be used to enable the SIP diversion header for authenticating the calling number if the SIP trunk supports it. This is an advanced property.", + ), + ] = None sbc_configuration: typing_extensions.Annotated[ - typing.Optional[SbcConfiguration], FieldMetadata(alias="sbcConfiguration") - ] = pydantic.Field(default=None) - """ - This is an advanced configuration for enterprise deployments. This uses the onprem SBC to trunk into the SIP trunk's `gateways`, rather than the managed SBC provided by Vapi. - """ + typing.Optional[SbcConfiguration], + FieldMetadata(alias="sbcConfiguration"), + pydantic.Field( + alias="sbcConfiguration", + description="This is an advanced configuration for enterprise deployments. This uses the onprem SBC to trunk into the SIP trunk's `gateways`, rather than the managed SBC provided by Vapi.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/byo_sip_trunk_credential_provider.py b/src/vapi/types/byo_sip_trunk_credential_provider.py new file mode 100644 index 00000000..1b7938fe --- /dev/null +++ b/src/vapi/types/byo_sip_trunk_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ByoSipTrunkCredentialProvider = typing.Union[typing.Literal["byo-sip-trunk"], typing.Any] diff --git a/src/vapi/types/call.py b/src/vapi/types/call.py index 47582e53..af2283a1 100644 --- a/src/vapi/types/call.py +++ b/src/vapi/types/call.py @@ -1,38 +1,38 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -from .callback_step import CallbackStep -from .create_workflow_block_dto import CreateWorkflowBlockDto -from .handoff_step import HandoffStep + +import datetime as dt import typing -from .call_type import CallType + import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .analysis import Analysis +from .artifact import Artifact +from .artifact_plan import ArtifactPlan from .call_costs_item import CallCostsItem +from .call_destination import CallDestination +from .call_ended_reason import CallEndedReason from .call_messages_item import CallMessagesItem -import typing_extensions from .call_phone_call_provider import CallPhoneCallProvider -from ..core.serialization import FieldMetadata from .call_phone_call_transport import CallPhoneCallTransport from .call_status import CallStatus -from .call_ended_reason import CallEndedReason -from .call_destination import CallDestination -import datetime as dt +from .call_type import CallType +from .compliance import Compliance from .cost_breakdown import CostBreakdown -from .artifact_plan import ArtifactPlan -from .analysis import Analysis -from .monitor import Monitor -from .artifact import Artifact -from .create_assistant_dto import CreateAssistantDto -from .assistant_overrides import AssistantOverrides -from .create_squad_dto import CreateSquadDto -from .import_twilio_phone_number_dto import ImportTwilioPhoneNumberDto from .create_customer_dto import CreateCustomerDto -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.pydantic_utilities import update_forward_refs +from .create_workflow_dto import CreateWorkflowDto +from .import_twilio_phone_number_dto import ImportTwilioPhoneNumberDto +from .monitor import Monitor +from .schedule_plan import SchedulePlan +from .subscription_limits import SubscriptionLimits +from .workflow_overrides import WorkflowOverrides -class Call(UniversalBaseModel): +class Call(UncheckedBaseModel): type: typing.Optional[CallType] = pydantic.Field(default=None) """ This is the type of call. @@ -45,35 +45,39 @@ class Call(UniversalBaseModel): messages: typing.Optional[typing.List[CallMessagesItem]] = None phone_call_provider: typing_extensions.Annotated[ - typing.Optional[CallPhoneCallProvider], FieldMetadata(alias="phoneCallProvider") - ] = pydantic.Field(default=None) - """ - This is the provider of the call. - - Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type. - """ - + typing.Optional[CallPhoneCallProvider], + FieldMetadata(alias="phoneCallProvider"), + pydantic.Field( + alias="phoneCallProvider", + description="This is the provider of the call.\n\nOnly relevant for `outboundPhoneCall` and `inboundPhoneCall` type.", + ), + ] = None phone_call_transport: typing_extensions.Annotated[ - typing.Optional[CallPhoneCallTransport], FieldMetadata(alias="phoneCallTransport") - ] = pydantic.Field(default=None) - """ - This is the transport of the phone call. - - Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type. - """ - + typing.Optional[CallPhoneCallTransport], + FieldMetadata(alias="phoneCallTransport"), + pydantic.Field( + alias="phoneCallTransport", + description="This is the transport of the phone call.\n\nOnly relevant for `outboundPhoneCall` and `inboundPhoneCall` type.", + ), + ] = None status: typing.Optional[CallStatus] = pydantic.Field(default=None) """ This is the status of the call. """ - ended_reason: typing_extensions.Annotated[typing.Optional[CallEndedReason], FieldMetadata(alias="endedReason")] = ( - pydantic.Field(default=None) - ) - """ - This is the explanation for how the call ended. - """ - + ended_reason: typing_extensions.Annotated[ + typing.Optional[CallEndedReason], + FieldMetadata(alias="endedReason"), + pydantic.Field(alias="endedReason", description="This is the explanation for how the call ended."), + ] = None + ended_message: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="endedMessage"), + pydantic.Field( + alias="endedMessage", + description="This is the message that adds more context to the ended reason. It can be used to provide potential error messages or warnings.", + ), + ] = None destination: typing.Optional[CallDestination] = pydantic.Field(default=None) """ This is the destination where the call ended up being transferred to. If the call was not transferred, this will be empty. @@ -84,54 +88,59 @@ class Call(UniversalBaseModel): This is the unique identifier for the call. """ - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field() - """ - This is the unique identifier for the org that this call belongs to. - """ - - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the call was created. - """ - - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the call was last updated. - """ - - started_at: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="startedAt")] = ( - pydantic.Field(default=None) - ) - """ - This is the ISO 8601 date-time string of when the call was started. - """ - - ended_at: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="endedAt")] = ( - pydantic.Field(default=None) - ) - """ - This is the ISO 8601 date-time string of when the call was ended. - """ - + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this call belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the call was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", description="This is the ISO 8601 date-time string of when the call was last updated." + ), + ] + started_at: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="startedAt"), + pydantic.Field( + alias="startedAt", description="This is the ISO 8601 date-time string of when the call was started." + ), + ] = None + ended_at: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="endedAt"), + pydantic.Field( + alias="endedAt", description="This is the ISO 8601 date-time string of when the call was ended." + ), + ] = None cost: typing.Optional[float] = pydantic.Field(default=None) """ This is the cost of the call in USD. """ cost_breakdown: typing_extensions.Annotated[ - typing.Optional[CostBreakdown], FieldMetadata(alias="costBreakdown") - ] = pydantic.Field(default=None) - """ - This is the cost of the call in USD. - """ - - artifact_plan: typing_extensions.Annotated[typing.Optional[ArtifactPlan], FieldMetadata(alias="artifactPlan")] = ( - pydantic.Field(default=None) - ) - """ - This is a copy of assistant artifact plan. This isn't actually stored on the call but rather just returned in POST /call/web to enable artifact creation client side. - """ - + typing.Optional[CostBreakdown], + FieldMetadata(alias="costBreakdown"), + pydantic.Field(alias="costBreakdown", description="This is the cost of the call in USD."), + ] = None + artifact_plan: typing_extensions.Annotated[ + typing.Optional[ArtifactPlan], + FieldMetadata(alias="artifactPlan"), + pydantic.Field( + alias="artifactPlan", + description="This is a copy of assistant artifact plan. This isn't actually stored on the call but rather just returned in POST /call/web to enable artifact creation client side.", + ), + ] = None analysis: typing.Optional[Analysis] = pydantic.Field(default=None) """ This is the analysis of the call. Configure in `assistant.analysisPlan`. @@ -147,73 +156,126 @@ class Call(UniversalBaseModel): These are the artifacts created from the call. Configure in `assistant.artifactPlan`. """ - phone_call_provider_id: typing_extensions.Annotated[ - typing.Optional[str], FieldMetadata(alias="phoneCallProviderId") - ] = pydantic.Field(default=None) - """ - The ID of the call as provided by the phone number service. callSid in Twilio. conversationUuid in Vonage. - - Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type. - """ - - assistant_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="assistantId")] = ( - pydantic.Field(default=None) - ) + compliance: typing.Optional[Compliance] = pydantic.Field(default=None) """ - This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead. + This is the compliance of the call. Configure in `assistant.compliancePlan`. """ - assistant: typing.Optional[CreateAssistantDto] = pydantic.Field(default=None) + phone_call_provider_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="phoneCallProviderId"), + pydantic.Field( + alias="phoneCallProviderId", + description="The ID of the call as provided by the phone number service. callSid in Twilio. conversationUuid in Vonage. callControlId in Telnyx.\n\nOnly relevant for `outboundPhoneCall` and `inboundPhoneCall` type.", + ), + ] = None + campaign_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="campaignId"), + pydantic.Field(alias="campaignId", description="This is the campaign ID that the call belongs to."), + ] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assistantId"), + pydantic.Field( + alias="assistantId", + description="This is the assistant ID that will be used for the call. To use a transient assistant, use `assistant` instead.\n\nTo start a call with:\n- Assistant, use `assistantId` or `assistant`\n- Squad, use `squadId` or `squad`\n- Workflow, use `workflowId` or `workflow`", + ), + ] = None + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) """ This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. + + To start a call with: + - Assistant, use `assistant` + - Squad, use `squad` + - Workflow, use `workflow` """ assistant_overrides: typing_extensions.Annotated[ - typing.Optional[AssistantOverrides], FieldMetadata(alias="assistantOverrides") - ] = pydantic.Field(default=None) - """ - These are the overrides for the `assistant` or `assistantId`'s settings and template variables. - """ - - squad_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="squadId")] = pydantic.Field( - default=None - ) - """ - This is the squad that will be used for the call. To use a transient squad, use `squad` instead. - """ - - squad: typing.Optional[CreateSquadDto] = pydantic.Field(default=None) + typing.Optional["AssistantOverrides"], + FieldMetadata(alias="assistantOverrides"), + pydantic.Field( + alias="assistantOverrides", + description="These are the overrides for the `assistant` or `assistantId`'s settings and template variables.", + ), + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="squadId"), + pydantic.Field( + alias="squadId", + description="This is the squad that will be used for the call. To use a transient squad, use `squad` instead.\n\nTo start a call with:\n- Assistant, use `assistant` or `assistantId`\n- Squad, use `squad` or `squadId`\n- Workflow, use `workflow` or `workflowId`", + ), + ] = None + squad: typing.Optional["CreateSquadDto"] = pydantic.Field(default=None) """ This is a squad that will be used for the call. To use an existing squad, use `squadId` instead. - """ - - phone_number_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="phoneNumberId")] = ( - pydantic.Field(default=None) - ) - """ - This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead. - Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type. - """ - - phone_number: typing_extensions.Annotated[ - typing.Optional[ImportTwilioPhoneNumberDto], FieldMetadata(alias="phoneNumber") - ] = pydantic.Field(default=None) - """ - This is the phone number that will be used for the call. To use an existing number, use `phoneNumberId` instead. + To start a call with: + - Assistant, use `assistant` or `assistantId` + - Squad, use `squad` or `squadId` + - Workflow, use `workflow` or `workflowId` + """ + + squad_overrides: typing_extensions.Annotated[ + typing.Optional["AssistantOverrides"], + FieldMetadata(alias="squadOverrides"), + pydantic.Field( + alias="squadOverrides", + description="These are the overrides for the `squad` or `squadId`'s member settings and template variables.\nThis will apply to all members of the squad.", + ), + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="workflowId"), + pydantic.Field( + alias="workflowId", + description="This is the workflow that will be used for the call. To use a transient workflow, use `workflow` instead.\n\nTo start a call with:\n- Assistant, use `assistant` or `assistantId`\n- Squad, use `squad` or `squadId`\n- Workflow, use `workflow` or `workflowId`", + ), + ] = None + workflow: typing.Optional[CreateWorkflowDto] = pydantic.Field(default=None) + """ + This is a workflow that will be used for the call. To use an existing workflow, use `workflowId` instead. - Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type. - """ - - customer_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="customerId")] = pydantic.Field( - default=None - ) - """ - This is the customer that will be called. To call a transient customer , use `customer` instead. - - Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type. - """ - + To start a call with: + - Assistant, use `assistant` or `assistantId` + - Squad, use `squad` or `squadId` + - Workflow, use `workflow` or `workflowId` + """ + + workflow_overrides: typing_extensions.Annotated[ + typing.Optional[WorkflowOverrides], + FieldMetadata(alias="workflowOverrides"), + pydantic.Field( + alias="workflowOverrides", + description="These are the overrides for the `workflow` or `workflowId`'s settings and template variables.", + ), + ] = None + phone_number_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="phoneNumberId"), + pydantic.Field( + alias="phoneNumberId", + description="This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead.\n\nOnly relevant for `outboundPhoneCall` and `inboundPhoneCall` type.", + ), + ] = None + phone_number: typing_extensions.Annotated[ + typing.Optional[ImportTwilioPhoneNumberDto], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", + description="This is the phone number that will be used for the call. To use an existing number, use `phoneNumberId` instead.\n\nOnly relevant for `outboundPhoneCall` and `inboundPhoneCall` type.", + ), + ] = None + customer_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="customerId"), + pydantic.Field( + alias="customerId", + description="This is the customer that will be called. To call a transient customer , use `customer` instead.\n\nOnly relevant for `outboundPhoneCall` and `inboundPhoneCall` type.", + ), + ] = None customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) """ This is the customer that will be called. To call an existing customer, use `customerId` instead. @@ -226,6 +288,25 @@ class Call(UniversalBaseModel): This is the name of the call. This is just for your own reference. """ + schedule_plan: typing_extensions.Annotated[ + typing.Optional[SchedulePlan], + FieldMetadata(alias="schedulePlan"), + pydantic.Field(alias="schedulePlan", description="This is the schedule plan of the call."), + ] = None + transport: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) + """ + This is the transport of the call. + """ + + subscription_limits: typing_extensions.Annotated[ + typing.Optional[SubscriptionLimits], + FieldMetadata(alias="subscriptionLimits"), + pydantic.Field( + alias="subscriptionLimits", + description="These are the subscription limits for the org at the time of the call. Includes concurrency limit information.", + ), + ] = None + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: @@ -236,6 +317,121 @@ class Config: extra = pydantic.Extra.allow -update_forward_refs(CallbackStep, Call=Call) -update_forward_refs(CreateWorkflowBlockDto, Call=Call) -update_forward_refs(HandoffStep, Call=Call) +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + Call, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/call_batch_error.py b/src/vapi/types/call_batch_error.py new file mode 100644 index 00000000..024a5a58 --- /dev/null +++ b/src/vapi/types/call_batch_error.py @@ -0,0 +1,27 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_customer_dto import CreateCustomerDto + + +class CallBatchError(UncheckedBaseModel): + customer: CreateCustomerDto + error: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(CallBatchError) diff --git a/src/vapi/types/call_batch_response.py b/src/vapi/types/call_batch_response.py new file mode 100644 index 00000000..985f1285 --- /dev/null +++ b/src/vapi/types/call_batch_response.py @@ -0,0 +1,43 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .call import Call +from .call_batch_error import CallBatchError +from .subscription_limits import SubscriptionLimits + + +class CallBatchResponse(UncheckedBaseModel): + subscription_limits: typing_extensions.Annotated[ + typing.Optional[SubscriptionLimits], + FieldMetadata(alias="subscriptionLimits"), + pydantic.Field(alias="subscriptionLimits", description="Subscription limits at the end of this batch"), + ] = None + results: typing.List[Call] = pydantic.Field() + """ + This is the list of calls that were created. + """ + + errors: typing.List[CallBatchError] = pydantic.Field() + """ + This is the list of calls that failed to be created. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(CallBatchResponse) diff --git a/src/vapi/types/call_costs_item.py b/src/vapi/types/call_costs_item.py index 8de58dd3..e9610aed 100644 --- a/src/vapi/types/call_costs_item.py +++ b/src/vapi/types/call_costs_item.py @@ -1,11 +1,196 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .transport_cost import TransportCost -from .transcriber_cost import TranscriberCost -from .model_cost import ModelCost -from .voice_cost import VoiceCost -from .vapi_cost import VapiCost -from .analysis_cost import AnalysisCost - -CallCostsItem = typing.Union[TransportCost, TranscriberCost, ModelCost, VoiceCost, VapiCost, AnalysisCost] + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .analysis_cost_analysis_type import AnalysisCostAnalysisType +from .transport_cost_provider import TransportCostProvider +from .vapi_cost_sub_type import VapiCostSubType +from .voicemail_detection_cost_provider import VoicemailDetectionCostProvider + + +class CallCostsItem_Transport(UncheckedBaseModel): + type: typing.Literal["transport"] = "transport" + provider: typing.Optional[TransportCostProvider] = None + minutes: float + cost: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CallCostsItem_Transcriber(UncheckedBaseModel): + type: typing.Literal["transcriber"] = "transcriber" + transcriber: typing.Dict[str, typing.Any] + minutes: float + cost: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CallCostsItem_Model(UncheckedBaseModel): + type: typing.Literal["model"] = "model" + model: typing.Dict[str, typing.Any] + prompt_tokens: typing_extensions.Annotated[ + float, FieldMetadata(alias="promptTokens"), pydantic.Field(alias="promptTokens") + ] + completion_tokens: typing_extensions.Annotated[ + float, FieldMetadata(alias="completionTokens"), pydantic.Field(alias="completionTokens") + ] + cached_prompt_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="cachedPromptTokens"), pydantic.Field(alias="cachedPromptTokens") + ] = None + cost: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CallCostsItem_Voice(UncheckedBaseModel): + type: typing.Literal["voice"] = "voice" + voice: typing.Dict[str, typing.Any] + characters: float + cost: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CallCostsItem_Vapi(UncheckedBaseModel): + type: typing.Literal["vapi"] = "vapi" + sub_type: typing_extensions.Annotated[ + VapiCostSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + minutes: float + cost: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CallCostsItem_VoicemailDetection(UncheckedBaseModel): + type: typing.Literal["voicemail-detection"] = "voicemail-detection" + model: typing.Dict[str, typing.Any] + provider: VoicemailDetectionCostProvider + prompt_text_tokens: typing_extensions.Annotated[ + float, FieldMetadata(alias="promptTextTokens"), pydantic.Field(alias="promptTextTokens") + ] + prompt_audio_tokens: typing_extensions.Annotated[ + float, FieldMetadata(alias="promptAudioTokens"), pydantic.Field(alias="promptAudioTokens") + ] + completion_text_tokens: typing_extensions.Annotated[ + float, FieldMetadata(alias="completionTextTokens"), pydantic.Field(alias="completionTextTokens") + ] + completion_audio_tokens: typing_extensions.Annotated[ + float, FieldMetadata(alias="completionAudioTokens"), pydantic.Field(alias="completionAudioTokens") + ] + cost: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CallCostsItem_Analysis(UncheckedBaseModel): + type: typing.Literal["analysis"] = "analysis" + analysis_type: typing_extensions.Annotated[ + AnalysisCostAnalysisType, FieldMetadata(alias="analysisType"), pydantic.Field(alias="analysisType") + ] + model: typing.Dict[str, typing.Any] + prompt_tokens: typing_extensions.Annotated[ + float, FieldMetadata(alias="promptTokens"), pydantic.Field(alias="promptTokens") + ] + completion_tokens: typing_extensions.Annotated[ + float, FieldMetadata(alias="completionTokens"), pydantic.Field(alias="completionTokens") + ] + cached_prompt_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="cachedPromptTokens"), pydantic.Field(alias="cachedPromptTokens") + ] = None + cost: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CallCostsItem_KnowledgeBase(UncheckedBaseModel): + type: typing.Literal["knowledge-base"] = "knowledge-base" + model: typing.Dict[str, typing.Any] + prompt_tokens: typing_extensions.Annotated[ + float, FieldMetadata(alias="promptTokens"), pydantic.Field(alias="promptTokens") + ] + completion_tokens: typing_extensions.Annotated[ + float, FieldMetadata(alias="completionTokens"), pydantic.Field(alias="completionTokens") + ] + cost: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CallCostsItem = typing_extensions.Annotated[ + typing.Union[ + CallCostsItem_Transport, + CallCostsItem_Transcriber, + CallCostsItem_Model, + CallCostsItem_Voice, + CallCostsItem_Vapi, + CallCostsItem_VoicemailDetection, + CallCostsItem_Analysis, + CallCostsItem_KnowledgeBase, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/call_destination.py b/src/vapi/types/call_destination.py index 18a5fe28..f4767602 100644 --- a/src/vapi/types/call_destination.py +++ b/src/vapi/types/call_destination.py @@ -1,7 +1,82 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .transfer_destination_number import TransferDestinationNumber -from .transfer_destination_sip import TransferDestinationSip -CallDestination = typing.Union[TransferDestinationNumber, TransferDestinationSip] +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .transfer_destination_number_message import TransferDestinationNumberMessage +from .transfer_destination_sip_message import TransferDestinationSipMessage +from .transfer_plan import TransferPlan + + +class CallDestination_Number(UncheckedBaseModel): + """ + This is the destination where the call ended up being transferred to. If the call was not transferred, this will be empty. + """ + + type: typing.Literal["number"] = "number" + message: typing.Optional[TransferDestinationNumberMessage] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: str + extension: typing.Optional[str] = None + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CallDestination_Sip(UncheckedBaseModel): + """ + This is the destination where the call ended up being transferred to. If the call was not transferred, this will be empty. + """ + + type: typing.Literal["sip"] = "sip" + message: typing.Optional[TransferDestinationSipMessage] = None + sip_uri: typing_extensions.Annotated[str, FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri")] + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + sip_headers: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="sipHeaders"), + pydantic.Field(alias="sipHeaders"), + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CallDestination = typing_extensions.Annotated[ + typing.Union[CallDestination_Number, CallDestination_Sip], UnionMetadata(discriminant="type") +] diff --git a/src/vapi/types/call_ended_reason.py b/src/vapi/types/call_ended_reason.py index eb300f3b..d09b537c 100644 --- a/src/vapi/types/call_ended_reason.py +++ b/src/vapi/types/call_ended_reason.py @@ -4,133 +4,452 @@ CallEndedReason = typing.Union[ typing.Literal[ - "assistant-error", + "call-start-error-neither-assistant-nor-server-set", + "assistant-request-failed", + "assistant-request-returned-error", + "assistant-request-returned-unspeakable-error", + "assistant-request-returned-invalid-assistant", + "assistant-request-returned-no-assistant", + "assistant-request-returned-forwarding-phone-number", + "scheduled-call-deleted", + "call.start.error-vapifault-get-org", + "call.start.error-vapifault-get-subscription", + "call.start.error-get-assistant", + "call.start.error-get-phone-number", + "call.start.error-get-customer", + "call.start.error-get-resources-validation", + "call.start.error-vapi-number-international", + "call.start.error-vapi-number-outbound-daily-limit", + "call.start.error-get-transport", + "call.start.error-subscription-wallet-does-not-exist", + "call.start.error-fraud-check-failed", + "call.start.error-subscription-frozen", + "call.start.error-subscription-insufficient-credits", + "call.start.error-subscription-upgrade-failed", + "call.start.error-subscription-concurrency-limit-reached", + "call.start.error-enterprise-feature-not-available-recording-consent", + "assistant-not-valid", + "call.start.error-vapifault-database-error", "assistant-not-found", - "db-error", - "no-server-available", - "license-check-failed", - "pipeline-error-openai-llm-failed", - "pipeline-error-azure-openai-llm-failed", - "pipeline-error-groq-llm-failed", - "pipeline-error-anthropic-llm-failed", - "pipeline-error-vapi-llm-failed", - "pipeline-error-vapi-400-bad-request-validation-failed", - "pipeline-error-vapi-401-unauthorized", - "pipeline-error-vapi-403-model-access-denied", - "pipeline-error-vapi-429-exceeded-quota", - "pipeline-error-vapi-500-server-error", "pipeline-error-openai-voice-failed", "pipeline-error-cartesia-voice-failed", - "pipeline-error-deepgram-transcriber-failed", "pipeline-error-deepgram-voice-failed", - "pipeline-error-gladia-transcriber-failed", "pipeline-error-eleven-labs-voice-failed", "pipeline-error-playht-voice-failed", "pipeline-error-lmnt-voice-failed", "pipeline-error-azure-voice-failed", "pipeline-error-rime-ai-voice-failed", - "pipeline-error-neets-voice-failed", - "pipeline-no-available-model", + "pipeline-error-smallest-ai-voice-failed", + "pipeline-error-vapi-voice-failed", + "pipeline-error-neuphonic-voice-failed", + "pipeline-error-hume-voice-failed", + "pipeline-error-sesame-voice-failed", + "pipeline-error-inworld-voice-failed", + "pipeline-error-minimax-voice-failed", + "pipeline-error-wellsaid-voice-failed", + "pipeline-error-tavus-video-failed", + "call.in-progress.error-vapifault-openai-voice-failed", + "call.in-progress.error-vapifault-cartesia-voice-failed", + "call.in-progress.error-vapifault-deepgram-voice-failed", + "call.in-progress.error-vapifault-eleven-labs-voice-failed", + "call.in-progress.error-vapifault-playht-voice-failed", + "call.in-progress.error-vapifault-lmnt-voice-failed", + "call.in-progress.error-vapifault-azure-voice-failed", + "call.in-progress.error-vapifault-rime-ai-voice-failed", + "call.in-progress.error-vapifault-smallest-ai-voice-failed", + "call.in-progress.error-vapifault-vapi-voice-failed", + "call.in-progress.error-vapifault-neuphonic-voice-failed", + "call.in-progress.error-vapifault-hume-voice-failed", + "call.in-progress.error-vapifault-sesame-voice-failed", + "call.in-progress.error-vapifault-inworld-voice-failed", + "call.in-progress.error-vapifault-minimax-voice-failed", + "call.in-progress.error-vapifault-wellsaid-voice-failed", + "call.in-progress.error-vapifault-tavus-video-failed", + "pipeline-error-vapi-llm-failed", + "pipeline-error-vapi-400-bad-request-validation-failed", + "pipeline-error-vapi-401-unauthorized", + "pipeline-error-vapi-403-model-access-denied", + "pipeline-error-vapi-429-exceeded-quota", + "pipeline-error-vapi-500-server-error", + "pipeline-error-vapi-503-server-overloaded-error", + "call.in-progress.error-providerfault-vapi-llm-failed", + "call.in-progress.error-vapifault-vapi-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-vapi-401-unauthorized", + "call.in-progress.error-vapifault-vapi-403-model-access-denied", + "call.in-progress.error-vapifault-vapi-429-exceeded-quota", + "call.in-progress.error-providerfault-vapi-500-server-error", + "call.in-progress.error-providerfault-vapi-503-server-overloaded-error", + "pipeline-error-deepgram-transcriber-failed", + "pipeline-error-deepgram-transcriber-api-key-missing", + "call.in-progress.error-vapifault-deepgram-transcriber-failed", + "pipeline-error-gladia-transcriber-failed", + "call.in-progress.error-vapifault-gladia-transcriber-failed", + "pipeline-error-speechmatics-transcriber-failed", + "call.in-progress.error-vapifault-speechmatics-transcriber-failed", + "pipeline-error-assembly-ai-transcriber-failed", + "pipeline-error-assembly-ai-returning-400-insufficent-funds", + "pipeline-error-assembly-ai-returning-400-paid-only-feature", + "pipeline-error-assembly-ai-returning-401-invalid-credentials", + "pipeline-error-assembly-ai-returning-500-invalid-schema", + "pipeline-error-assembly-ai-returning-500-word-boost-parsing-failed", + "call.in-progress.error-vapifault-assembly-ai-transcriber-failed", + "call.in-progress.error-vapifault-assembly-ai-returning-400-insufficent-funds", + "call.in-progress.error-vapifault-assembly-ai-returning-400-paid-only-feature", + "call.in-progress.error-vapifault-assembly-ai-returning-401-invalid-credentials", + "call.in-progress.error-vapifault-assembly-ai-returning-500-invalid-schema", + "call.in-progress.error-vapifault-assembly-ai-returning-500-word-boost-parsing-failed", + "pipeline-error-talkscriber-transcriber-failed", + "call.in-progress.error-vapifault-talkscriber-transcriber-failed", + "pipeline-error-azure-speech-transcriber-failed", + "call.in-progress.error-vapifault-azure-speech-transcriber-failed", + "pipeline-error-eleven-labs-transcriber-failed", + "call.in-progress.error-vapifault-eleven-labs-transcriber-failed", + "pipeline-error-google-transcriber-failed", + "call.in-progress.error-vapifault-google-transcriber-failed", + "pipeline-error-openai-transcriber-failed", + "call.in-progress.error-vapifault-openai-transcriber-failed", + "pipeline-error-soniox-transcriber-auth-failed", + "pipeline-error-soniox-transcriber-rate-limited", + "pipeline-error-soniox-transcriber-invalid-config", + "pipeline-error-soniox-transcriber-server-error", + "pipeline-error-soniox-transcriber-failed", + "call.in-progress.error-vapifault-soniox-transcriber-auth-failed", + "call.in-progress.error-vapifault-soniox-transcriber-rate-limited", + "call.in-progress.error-vapifault-soniox-transcriber-invalid-config", + "call.in-progress.error-vapifault-soniox-transcriber-server-error", + "call.in-progress.error-vapifault-soniox-transcriber-failed", + "call.in-progress.error-pipeline-no-available-llm-model", "worker-shutdown", - "unknown-error", "vonage-disconnected", "vonage-failed-to-connect-call", + "vonage-completed", "phone-call-provider-bypass-enabled-but-no-call-received", - "vapifault-phone-call-worker-setup-socket-error", - "vapifault-phone-call-worker-worker-setup-socket-timeout", - "vapifault-phone-call-worker-could-not-find-call", - "vapifault-transport-never-connected", - "vapifault-web-call-worker-setup-failed", - "vapifault-transport-connected-but-call-not-active", - "assistant-not-invalid", - "assistant-not-provided", - "call-start-error-neither-assistant-nor-server-set", - "assistant-request-failed", - "assistant-request-returned-error", - "assistant-request-returned-unspeakable-error", - "assistant-request-returned-invalid-assistant", - "assistant-request-returned-no-assistant", - "assistant-request-returned-forwarding-phone-number", - "assistant-ended-call", - "assistant-said-end-call-phrase", - "assistant-forwarded-call", - "assistant-join-timed-out", - "customer-busy", - "customer-ended-call", - "customer-did-not-answer", - "customer-did-not-give-microphone-permission", - "assistant-said-message-with-end-call-enabled", - "exceeded-max-duration", - "manually-canceled", - "phone-call-provider-closed-websocket", + "call.in-progress.error-providerfault-transport-never-connected", + "call.in-progress.error-vapifault-worker-not-available", + "call.in-progress.error-vapifault-transport-never-connected", + "call.in-progress.error-vapifault-transport-connected-but-call-not-active", + "call.in-progress.error-vapifault-call-started-but-connection-to-transport-missing", + "call.in-progress.error-vapifault-worker-died", + "call.in-progress.twilio-completed-call", + "call.in-progress.sip-completed-call", + "call.in-progress.error-sip-inbound-call-failed-to-connect", + "call.in-progress.error-providerfault-outbound-sip-503-service-unavailable", + "call.in-progress.error-sip-outbound-call-failed-to-connect", + "call.ringing.error-sip-inbound-call-failed-to-connect", + "call.in-progress.error-providerfault-openai-llm-failed", + "call.in-progress.error-providerfault-azure-openai-llm-failed", + "call.in-progress.error-providerfault-groq-llm-failed", + "call.in-progress.error-providerfault-google-llm-failed", + "call.in-progress.error-providerfault-xai-llm-failed", + "call.in-progress.error-providerfault-mistral-llm-failed", + "call.in-progress.error-providerfault-minimax-llm-failed", + "call.in-progress.error-providerfault-inflection-ai-llm-failed", + "call.in-progress.error-providerfault-cerebras-llm-failed", + "call.in-progress.error-providerfault-deep-seek-llm-failed", + "call.in-progress.error-providerfault-baseten-llm-failed", + "call.in-progress.error-vapifault-chat-pipeline-failed-to-start", "pipeline-error-openai-400-bad-request-validation-failed", "pipeline-error-openai-401-unauthorized", + "pipeline-error-openai-401-incorrect-api-key", + "pipeline-error-openai-401-account-not-in-organization", "pipeline-error-openai-403-model-access-denied", "pipeline-error-openai-429-exceeded-quota", + "pipeline-error-openai-429-rate-limit-reached", "pipeline-error-openai-500-server-error", + "pipeline-error-openai-503-server-overloaded-error", + "pipeline-error-openai-llm-failed", + "call.in-progress.error-vapifault-openai-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-openai-401-unauthorized", + "call.in-progress.error-vapifault-openai-401-incorrect-api-key", + "call.in-progress.error-vapifault-openai-401-account-not-in-organization", + "call.in-progress.error-vapifault-openai-403-model-access-denied", + "call.in-progress.error-vapifault-openai-429-exceeded-quota", + "call.in-progress.error-vapifault-openai-429-rate-limit-reached", + "call.in-progress.error-providerfault-openai-500-server-error", + "call.in-progress.error-providerfault-openai-503-server-overloaded-error", "pipeline-error-azure-openai-400-bad-request-validation-failed", "pipeline-error-azure-openai-401-unauthorized", "pipeline-error-azure-openai-403-model-access-denied", "pipeline-error-azure-openai-429-exceeded-quota", "pipeline-error-azure-openai-500-server-error", + "pipeline-error-azure-openai-503-server-overloaded-error", + "pipeline-error-azure-openai-llm-failed", + "call.in-progress.error-vapifault-azure-openai-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-azure-openai-401-unauthorized", + "call.in-progress.error-vapifault-azure-openai-403-model-access-denied", + "call.in-progress.error-vapifault-azure-openai-429-exceeded-quota", + "call.in-progress.error-providerfault-azure-openai-500-server-error", + "call.in-progress.error-providerfault-azure-openai-503-server-overloaded-error", + "pipeline-error-google-400-bad-request-validation-failed", + "pipeline-error-google-401-unauthorized", + "pipeline-error-google-403-model-access-denied", + "pipeline-error-google-429-exceeded-quota", + "pipeline-error-google-500-server-error", + "pipeline-error-google-503-server-overloaded-error", + "pipeline-error-google-llm-failed", + "call.in-progress.error-vapifault-google-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-google-401-unauthorized", + "call.in-progress.error-vapifault-google-403-model-access-denied", + "call.in-progress.error-vapifault-google-429-exceeded-quota", + "call.in-progress.error-providerfault-google-500-server-error", + "call.in-progress.error-providerfault-google-503-server-overloaded-error", + "pipeline-error-xai-400-bad-request-validation-failed", + "pipeline-error-xai-401-unauthorized", + "pipeline-error-xai-403-model-access-denied", + "pipeline-error-xai-429-exceeded-quota", + "pipeline-error-xai-500-server-error", + "pipeline-error-xai-503-server-overloaded-error", + "pipeline-error-xai-llm-failed", + "call.in-progress.error-vapifault-xai-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-xai-401-unauthorized", + "call.in-progress.error-vapifault-xai-403-model-access-denied", + "call.in-progress.error-vapifault-xai-429-exceeded-quota", + "call.in-progress.error-providerfault-xai-500-server-error", + "call.in-progress.error-providerfault-xai-503-server-overloaded-error", + "pipeline-error-baseten-400-bad-request-validation-failed", + "pipeline-error-baseten-401-unauthorized", + "pipeline-error-baseten-403-model-access-denied", + "pipeline-error-baseten-429-exceeded-quota", + "pipeline-error-baseten-500-server-error", + "pipeline-error-baseten-503-server-overloaded-error", + "pipeline-error-baseten-llm-failed", + "call.in-progress.error-vapifault-baseten-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-baseten-401-unauthorized", + "call.in-progress.error-vapifault-baseten-403-model-access-denied", + "call.in-progress.error-vapifault-baseten-429-exceeded-quota", + "call.in-progress.error-providerfault-baseten-500-server-error", + "call.in-progress.error-providerfault-baseten-503-server-overloaded-error", + "pipeline-error-mistral-400-bad-request-validation-failed", + "pipeline-error-mistral-401-unauthorized", + "pipeline-error-mistral-403-model-access-denied", + "pipeline-error-mistral-429-exceeded-quota", + "pipeline-error-mistral-500-server-error", + "pipeline-error-mistral-503-server-overloaded-error", + "pipeline-error-mistral-llm-failed", + "call.in-progress.error-vapifault-mistral-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-mistral-401-unauthorized", + "call.in-progress.error-vapifault-mistral-403-model-access-denied", + "call.in-progress.error-vapifault-mistral-429-exceeded-quota", + "call.in-progress.error-providerfault-mistral-500-server-error", + "call.in-progress.error-providerfault-mistral-503-server-overloaded-error", + "pipeline-error-minimax-400-bad-request-validation-failed", + "pipeline-error-minimax-401-unauthorized", + "pipeline-error-minimax-403-model-access-denied", + "pipeline-error-minimax-429-exceeded-quota", + "pipeline-error-minimax-500-server-error", + "pipeline-error-minimax-503-server-overloaded-error", + "pipeline-error-minimax-llm-failed", + "call.in-progress.error-vapifault-minimax-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-minimax-401-unauthorized", + "call.in-progress.error-vapifault-minimax-403-model-access-denied", + "call.in-progress.error-vapifault-minimax-429-exceeded-quota", + "call.in-progress.error-providerfault-minimax-500-server-error", + "call.in-progress.error-providerfault-minimax-503-server-overloaded-error", + "pipeline-error-inflection-ai-400-bad-request-validation-failed", + "pipeline-error-inflection-ai-401-unauthorized", + "pipeline-error-inflection-ai-403-model-access-denied", + "pipeline-error-inflection-ai-429-exceeded-quota", + "pipeline-error-inflection-ai-500-server-error", + "pipeline-error-inflection-ai-503-server-overloaded-error", + "pipeline-error-inflection-ai-llm-failed", + "call.in-progress.error-vapifault-inflection-ai-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-inflection-ai-401-unauthorized", + "call.in-progress.error-vapifault-inflection-ai-403-model-access-denied", + "call.in-progress.error-vapifault-inflection-ai-429-exceeded-quota", + "call.in-progress.error-providerfault-inflection-ai-500-server-error", + "call.in-progress.error-providerfault-inflection-ai-503-server-overloaded-error", + "pipeline-error-deep-seek-400-bad-request-validation-failed", + "pipeline-error-deep-seek-401-unauthorized", + "pipeline-error-deep-seek-403-model-access-denied", + "pipeline-error-deep-seek-429-exceeded-quota", + "pipeline-error-deep-seek-500-server-error", + "pipeline-error-deep-seek-503-server-overloaded-error", + "pipeline-error-deep-seek-llm-failed", + "call.in-progress.error-vapifault-deep-seek-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-deep-seek-401-unauthorized", + "call.in-progress.error-vapifault-deep-seek-403-model-access-denied", + "call.in-progress.error-vapifault-deep-seek-429-exceeded-quota", + "call.in-progress.error-providerfault-deep-seek-500-server-error", + "call.in-progress.error-providerfault-deep-seek-503-server-overloaded-error", "pipeline-error-groq-400-bad-request-validation-failed", "pipeline-error-groq-401-unauthorized", "pipeline-error-groq-403-model-access-denied", "pipeline-error-groq-429-exceeded-quota", "pipeline-error-groq-500-server-error", + "pipeline-error-groq-503-server-overloaded-error", + "pipeline-error-groq-llm-failed", + "call.in-progress.error-vapifault-groq-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-groq-401-unauthorized", + "call.in-progress.error-vapifault-groq-403-model-access-denied", + "call.in-progress.error-vapifault-groq-429-exceeded-quota", + "call.in-progress.error-providerfault-groq-500-server-error", + "call.in-progress.error-providerfault-groq-503-server-overloaded-error", + "pipeline-error-cerebras-400-bad-request-validation-failed", + "pipeline-error-cerebras-401-unauthorized", + "pipeline-error-cerebras-403-model-access-denied", + "pipeline-error-cerebras-429-exceeded-quota", + "pipeline-error-cerebras-500-server-error", + "pipeline-error-cerebras-503-server-overloaded-error", + "pipeline-error-cerebras-llm-failed", + "call.in-progress.error-vapifault-cerebras-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-cerebras-401-unauthorized", + "call.in-progress.error-vapifault-cerebras-403-model-access-denied", + "call.in-progress.error-vapifault-cerebras-429-exceeded-quota", + "call.in-progress.error-providerfault-cerebras-500-server-error", + "call.in-progress.error-providerfault-cerebras-503-server-overloaded-error", "pipeline-error-anthropic-400-bad-request-validation-failed", "pipeline-error-anthropic-401-unauthorized", "pipeline-error-anthropic-403-model-access-denied", "pipeline-error-anthropic-429-exceeded-quota", "pipeline-error-anthropic-500-server-error", + "pipeline-error-anthropic-503-server-overloaded-error", + "pipeline-error-anthropic-llm-failed", + "call.in-progress.error-providerfault-anthropic-llm-failed", + "call.in-progress.error-vapifault-anthropic-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-anthropic-401-unauthorized", + "call.in-progress.error-vapifault-anthropic-403-model-access-denied", + "call.in-progress.error-vapifault-anthropic-429-exceeded-quota", + "call.in-progress.error-providerfault-anthropic-500-server-error", + "call.in-progress.error-providerfault-anthropic-503-server-overloaded-error", + "pipeline-error-anthropic-bedrock-400-bad-request-validation-failed", + "pipeline-error-anthropic-bedrock-401-unauthorized", + "pipeline-error-anthropic-bedrock-403-model-access-denied", + "pipeline-error-anthropic-bedrock-429-exceeded-quota", + "pipeline-error-anthropic-bedrock-500-server-error", + "pipeline-error-anthropic-bedrock-503-server-overloaded-error", + "pipeline-error-anthropic-bedrock-llm-failed", + "call.in-progress.error-providerfault-anthropic-bedrock-llm-failed", + "call.in-progress.error-vapifault-anthropic-bedrock-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-anthropic-bedrock-401-unauthorized", + "call.in-progress.error-vapifault-anthropic-bedrock-403-model-access-denied", + "call.in-progress.error-vapifault-anthropic-bedrock-429-exceeded-quota", + "call.in-progress.error-providerfault-anthropic-bedrock-500-server-error", + "call.in-progress.error-providerfault-anthropic-bedrock-503-server-overloaded-error", + "pipeline-error-anthropic-vertex-400-bad-request-validation-failed", + "pipeline-error-anthropic-vertex-401-unauthorized", + "pipeline-error-anthropic-vertex-403-model-access-denied", + "pipeline-error-anthropic-vertex-429-exceeded-quota", + "pipeline-error-anthropic-vertex-500-server-error", + "pipeline-error-anthropic-vertex-503-server-overloaded-error", + "pipeline-error-anthropic-vertex-llm-failed", + "call.in-progress.error-providerfault-anthropic-vertex-llm-failed", + "call.in-progress.error-vapifault-anthropic-vertex-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-anthropic-vertex-401-unauthorized", + "call.in-progress.error-vapifault-anthropic-vertex-403-model-access-denied", + "call.in-progress.error-vapifault-anthropic-vertex-429-exceeded-quota", + "call.in-progress.error-providerfault-anthropic-vertex-500-server-error", + "call.in-progress.error-providerfault-anthropic-vertex-503-server-overloaded-error", "pipeline-error-together-ai-400-bad-request-validation-failed", "pipeline-error-together-ai-401-unauthorized", "pipeline-error-together-ai-403-model-access-denied", "pipeline-error-together-ai-429-exceeded-quota", "pipeline-error-together-ai-500-server-error", + "pipeline-error-together-ai-503-server-overloaded-error", "pipeline-error-together-ai-llm-failed", + "call.in-progress.error-providerfault-together-ai-llm-failed", + "call.in-progress.error-vapifault-together-ai-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-together-ai-401-unauthorized", + "call.in-progress.error-vapifault-together-ai-403-model-access-denied", + "call.in-progress.error-vapifault-together-ai-429-exceeded-quota", + "call.in-progress.error-providerfault-together-ai-500-server-error", + "call.in-progress.error-providerfault-together-ai-503-server-overloaded-error", "pipeline-error-anyscale-400-bad-request-validation-failed", "pipeline-error-anyscale-401-unauthorized", "pipeline-error-anyscale-403-model-access-denied", "pipeline-error-anyscale-429-exceeded-quota", "pipeline-error-anyscale-500-server-error", + "pipeline-error-anyscale-503-server-overloaded-error", "pipeline-error-anyscale-llm-failed", + "call.in-progress.error-providerfault-anyscale-llm-failed", + "call.in-progress.error-vapifault-anyscale-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-anyscale-401-unauthorized", + "call.in-progress.error-vapifault-anyscale-403-model-access-denied", + "call.in-progress.error-vapifault-anyscale-429-exceeded-quota", + "call.in-progress.error-providerfault-anyscale-500-server-error", + "call.in-progress.error-providerfault-anyscale-503-server-overloaded-error", "pipeline-error-openrouter-400-bad-request-validation-failed", "pipeline-error-openrouter-401-unauthorized", "pipeline-error-openrouter-403-model-access-denied", "pipeline-error-openrouter-429-exceeded-quota", "pipeline-error-openrouter-500-server-error", + "pipeline-error-openrouter-503-server-overloaded-error", "pipeline-error-openrouter-llm-failed", + "call.in-progress.error-providerfault-openrouter-llm-failed", + "call.in-progress.error-vapifault-openrouter-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-openrouter-401-unauthorized", + "call.in-progress.error-vapifault-openrouter-403-model-access-denied", + "call.in-progress.error-vapifault-openrouter-429-exceeded-quota", + "call.in-progress.error-providerfault-openrouter-500-server-error", + "call.in-progress.error-providerfault-openrouter-503-server-overloaded-error", "pipeline-error-perplexity-ai-400-bad-request-validation-failed", "pipeline-error-perplexity-ai-401-unauthorized", "pipeline-error-perplexity-ai-403-model-access-denied", "pipeline-error-perplexity-ai-429-exceeded-quota", "pipeline-error-perplexity-ai-500-server-error", + "pipeline-error-perplexity-ai-503-server-overloaded-error", "pipeline-error-perplexity-ai-llm-failed", + "call.in-progress.error-providerfault-perplexity-ai-llm-failed", + "call.in-progress.error-vapifault-perplexity-ai-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-perplexity-ai-401-unauthorized", + "call.in-progress.error-vapifault-perplexity-ai-403-model-access-denied", + "call.in-progress.error-vapifault-perplexity-ai-429-exceeded-quota", + "call.in-progress.error-providerfault-perplexity-ai-500-server-error", + "call.in-progress.error-providerfault-perplexity-ai-503-server-overloaded-error", "pipeline-error-deepinfra-400-bad-request-validation-failed", "pipeline-error-deepinfra-401-unauthorized", "pipeline-error-deepinfra-403-model-access-denied", "pipeline-error-deepinfra-429-exceeded-quota", "pipeline-error-deepinfra-500-server-error", + "pipeline-error-deepinfra-503-server-overloaded-error", "pipeline-error-deepinfra-llm-failed", + "call.in-progress.error-providerfault-deepinfra-llm-failed", + "call.in-progress.error-vapifault-deepinfra-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-deepinfra-401-unauthorized", + "call.in-progress.error-vapifault-deepinfra-403-model-access-denied", + "call.in-progress.error-vapifault-deepinfra-429-exceeded-quota", + "call.in-progress.error-providerfault-deepinfra-500-server-error", + "call.in-progress.error-providerfault-deepinfra-503-server-overloaded-error", "pipeline-error-runpod-400-bad-request-validation-failed", "pipeline-error-runpod-401-unauthorized", "pipeline-error-runpod-403-model-access-denied", "pipeline-error-runpod-429-exceeded-quota", "pipeline-error-runpod-500-server-error", + "pipeline-error-runpod-503-server-overloaded-error", "pipeline-error-runpod-llm-failed", + "call.in-progress.error-providerfault-runpod-llm-failed", + "call.in-progress.error-vapifault-runpod-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-runpod-401-unauthorized", + "call.in-progress.error-vapifault-runpod-403-model-access-denied", + "call.in-progress.error-vapifault-runpod-429-exceeded-quota", + "call.in-progress.error-providerfault-runpod-500-server-error", + "call.in-progress.error-providerfault-runpod-503-server-overloaded-error", "pipeline-error-custom-llm-400-bad-request-validation-failed", "pipeline-error-custom-llm-401-unauthorized", "pipeline-error-custom-llm-403-model-access-denied", "pipeline-error-custom-llm-429-exceeded-quota", "pipeline-error-custom-llm-500-server-error", + "pipeline-error-custom-llm-503-server-overloaded-error", "pipeline-error-custom-llm-llm-failed", + "call.in-progress.error-providerfault-custom-llm-llm-failed", + "call.in-progress.error-vapifault-custom-llm-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-custom-llm-401-unauthorized", + "call.in-progress.error-vapifault-custom-llm-403-model-access-denied", + "call.in-progress.error-vapifault-custom-llm-429-exceeded-quota", + "call.in-progress.error-providerfault-custom-llm-500-server-error", + "call.in-progress.error-providerfault-custom-llm-503-server-overloaded-error", + "call.in-progress.error-pipeline-ws-model-connection-failed", + "pipeline-error-custom-voice-failed", "pipeline-error-cartesia-socket-hang-up", "pipeline-error-cartesia-requested-payment", "pipeline-error-cartesia-500-server-error", + "pipeline-error-cartesia-502-server-error", "pipeline-error-cartesia-503-server-error", "pipeline-error-cartesia-522-server-error", - "pipeline-error-custom-voice-failed", + "call.in-progress.error-vapifault-cartesia-socket-hang-up", + "call.in-progress.error-vapifault-cartesia-requested-payment", + "call.in-progress.error-providerfault-cartesia-500-server-error", + "call.in-progress.error-providerfault-cartesia-503-server-error", + "call.in-progress.error-providerfault-cartesia-522-server-error", "pipeline-error-eleven-labs-voice-not-found", "pipeline-error-eleven-labs-quota-exceeded", "pipeline-error-eleven-labs-unauthorized-access", @@ -144,17 +463,44 @@ "pipeline-error-eleven-labs-invalid-api-key", "pipeline-error-eleven-labs-invalid-voice-samples", "pipeline-error-eleven-labs-voice-disabled-by-owner", + "pipeline-error-eleven-labs-vapi-voice-disabled-by-owner", "pipeline-error-eleven-labs-blocked-account-in-probation", "pipeline-error-eleven-labs-blocked-content-against-their-policy", "pipeline-error-eleven-labs-missing-samples-for-voice-clone", "pipeline-error-eleven-labs-voice-not-fine-tuned-and-cannot-be-used", "pipeline-error-eleven-labs-voice-not-allowed-for-free-users", - "pipeline-error-eleven-labs-500-server-error", "pipeline-error-eleven-labs-max-character-limit-exceeded", + "pipeline-error-eleven-labs-blocked-voice-potentially-against-terms-of-service-and-awaiting-verification", + "pipeline-error-eleven-labs-500-server-error", + "pipeline-error-eleven-labs-503-server-error", + "call.in-progress.error-vapifault-eleven-labs-voice-not-found", + "call.in-progress.error-vapifault-eleven-labs-quota-exceeded", + "call.in-progress.error-vapifault-eleven-labs-unauthorized-access", + "call.in-progress.error-vapifault-eleven-labs-unauthorized-to-access-model", + "call.in-progress.error-vapifault-eleven-labs-professional-voices-only-for-creator-plus", + "call.in-progress.error-vapifault-eleven-labs-blocked-free-plan-and-requested-upgrade", + "call.in-progress.error-vapifault-eleven-labs-blocked-concurrent-requests-and-requested-upgrade", + "call.in-progress.error-vapifault-eleven-labs-blocked-using-instant-voice-clone-and-requested-upgrade", + "call.in-progress.error-vapifault-eleven-labs-system-busy-and-requested-upgrade", + "call.in-progress.error-vapifault-eleven-labs-voice-not-fine-tuned", + "call.in-progress.error-vapifault-eleven-labs-invalid-api-key", + "call.in-progress.error-vapifault-eleven-labs-invalid-voice-samples", + "call.in-progress.error-vapifault-eleven-labs-voice-disabled-by-owner", + "call.in-progress.error-vapifault-eleven-labs-blocked-account-in-probation", + "call.in-progress.error-vapifault-eleven-labs-blocked-content-against-their-policy", + "call.in-progress.error-vapifault-eleven-labs-missing-samples-for-voice-clone", + "call.in-progress.error-vapifault-eleven-labs-voice-not-fine-tuned-and-cannot-be-used", + "call.in-progress.error-vapifault-eleven-labs-voice-not-allowed-for-free-users", + "call.in-progress.error-vapifault-eleven-labs-max-character-limit-exceeded", + "call.in-progress.error-vapifault-eleven-labs-blocked-voice-potentially-against-terms-of-service-and-awaiting-verification", + "call.in-progress.error-providerfault-eleven-labs-system-busy-and-requested-upgrade", + "call.in-progress.error-providerfault-eleven-labs-500-server-error", + "call.in-progress.error-providerfault-eleven-labs-503-server-error", "pipeline-error-playht-request-timed-out", "pipeline-error-playht-invalid-voice", "pipeline-error-playht-unexpected-error", "pipeline-error-playht-out-of-credits", + "pipeline-error-playht-invalid-emotion", "pipeline-error-playht-voice-must-be-a-valid-voice-manifest-uri", "pipeline-error-playht-401-unauthorized", "pipeline-error-playht-403-forbidden-out-of-characters", @@ -162,16 +508,73 @@ "pipeline-error-playht-429-exceeded-quota", "pipeline-error-playht-502-gateway-error", "pipeline-error-playht-504-gateway-error", - "pipeline-error-deepgram-403-model-access-denied", - "pipeline-error-deepgram-404-not-found", - "pipeline-error-deepgram-400-no-such-model-language-tier-combination", - "pipeline-error-deepgram-500-returning-invalid-json", - "sip-gateway-failed-to-connect-call", + "call.in-progress.error-vapifault-playht-request-timed-out", + "call.in-progress.error-vapifault-playht-invalid-voice", + "call.in-progress.error-vapifault-playht-unexpected-error", + "call.in-progress.error-vapifault-playht-out-of-credits", + "call.in-progress.error-vapifault-playht-invalid-emotion", + "call.in-progress.error-vapifault-playht-voice-must-be-a-valid-voice-manifest-uri", + "call.in-progress.error-vapifault-playht-401-unauthorized", + "call.in-progress.error-vapifault-playht-403-forbidden-out-of-characters", + "call.in-progress.error-vapifault-playht-403-forbidden-api-access-not-available", + "call.in-progress.error-vapifault-playht-429-exceeded-quota", + "call.in-progress.error-providerfault-playht-502-gateway-error", + "call.in-progress.error-providerfault-playht-504-gateway-error", + "pipeline-error-custom-transcriber-failed", + "call.in-progress.error-vapifault-custom-transcriber-failed", + "pipeline-error-deepgram-returning-400-no-such-model-language-tier-combination", + "pipeline-error-deepgram-returning-401-invalid-credentials", + "pipeline-error-deepgram-returning-403-model-access-denied", + "pipeline-error-deepgram-returning-404-not-found", + "pipeline-error-deepgram-returning-500-invalid-json", + "pipeline-error-deepgram-returning-502-network-error", + "pipeline-error-deepgram-returning-502-bad-gateway-ehostunreach", + "pipeline-error-deepgram-returning-econnreset", + "call.in-progress.error-vapifault-deepgram-returning-400-no-such-model-language-tier-combination", + "call.in-progress.error-vapifault-deepgram-returning-401-invalid-credentials", + "call.in-progress.error-vapifault-deepgram-returning-404-not-found", + "call.in-progress.error-vapifault-deepgram-returning-403-model-access-denied", + "call.in-progress.error-providerfault-deepgram-returning-500-invalid-json", + "call.in-progress.error-providerfault-deepgram-returning-502-network-error", + "call.in-progress.error-providerfault-deepgram-returning-502-bad-gateway-ehostunreach", + "call.in-progress.error-warm-transfer-max-duration", + "call.in-progress.error-warm-transfer-assistant-cancelled", + "call.in-progress.error-warm-transfer-silence-timeout", + "call.in-progress.error-warm-transfer-microphone-timeout", + "assistant-ended-call", + "assistant-said-end-call-phrase", + "assistant-ended-call-with-hangup-task", + "assistant-ended-call-after-message-spoken", + "assistant-forwarded-call", + "assistant-join-timed-out", + "call.in-progress.error-assistant-did-not-receive-customer-audio", + "call.in-progress.error-transfer-failed", + "customer-busy", + "customer-ended-call", + "customer-ended-call-before-warm-transfer", + "customer-ended-call-after-warm-transfer-attempt", + "customer-ended-call-during-transfer", + "customer-did-not-answer", + "customer-did-not-give-microphone-permission", + "exceeded-max-duration", + "manually-canceled", + "phone-call-provider-closed-websocket", + "call.forwarding.operator-busy", "silence-timed-out", + "call.in-progress.error-providerfault-outbound-sip-403-forbidden", + "call.in-progress.error-providerfault-outbound-sip-407-proxy-authentication-required", + "call.in-progress.error-providerfault-outbound-sip-408-request-timeout", + "call.in-progress.error-providerfault-outbound-sip-480-temporarily-unavailable", + "call.ringing.hook-executed-say", + "call.ringing.hook-executed-transfer", + "call.ending.hook-executed-say", + "call.ending.hook-executed-transfer", + "call.ringing.sip-inbound-caller-hungup-before-call-connect", "twilio-failed-to-connect-call", "twilio-reported-customer-misdialed", - "voicemail", "vonage-rejected", + "voicemail", + "call-deleted", ], typing.Any, ] diff --git a/src/vapi/types/call_hook_assistant_speech_interrupted.py b/src/vapi/types/call_hook_assistant_speech_interrupted.py new file mode 100644 index 00000000..b54f6135 --- /dev/null +++ b/src/vapi/types/call_hook_assistant_speech_interrupted.py @@ -0,0 +1,149 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .call_hook_assistant_speech_interrupted_on import CallHookAssistantSpeechInterruptedOn + + +class CallHookAssistantSpeechInterrupted(UncheckedBaseModel): + on: CallHookAssistantSpeechInterruptedOn = pydantic.Field() + """ + This is the event that triggers this hook + """ + + do: typing.List["CallHookAssistantSpeechInterruptedDoItem"] = pydantic.Field() + """ + This is the set of actions to perform when the hook triggers + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + CallHookAssistantSpeechInterrupted, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/call_hook_assistant_speech_interrupted_do_item.py b/src/vapi/types/call_hook_assistant_speech_interrupted_do_item.py new file mode 100644 index 00000000..d2931480 --- /dev/null +++ b/src/vapi/types/call_hook_assistant_speech_interrupted_do_item.py @@ -0,0 +1,189 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .open_ai_message import OpenAiMessage +from .say_hook_action_prompt import SayHookActionPrompt + + +class CallHookAssistantSpeechInterruptedDoItem_Say(UncheckedBaseModel): + type: typing.Literal["say"] = "say" + prompt: typing.Optional[SayHookActionPrompt] = None + exact: typing.Optional[typing.Dict[str, typing.Any]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CallHookAssistantSpeechInterruptedDoItem_Tool(UncheckedBaseModel): + type: typing.Literal["tool"] = "tool" + tool: typing.Optional["ToolCallHookActionTool"] = None + tool_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="toolId"), pydantic.Field(alias="toolId") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CallHookAssistantSpeechInterruptedDoItem_MessageAdd(UncheckedBaseModel): + type: typing.Literal["message.add"] = "message.add" + message: OpenAiMessage + trigger_response_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="triggerResponseEnabled"), + pydantic.Field(alias="triggerResponseEnabled"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CallHookAssistantSpeechInterruptedDoItem = typing_extensions.Annotated[ + typing.Union[ + CallHookAssistantSpeechInterruptedDoItem_Say, + CallHookAssistantSpeechInterruptedDoItem_Tool, + CallHookAssistantSpeechInterruptedDoItem_MessageAdd, + ], + UnionMetadata(discriminant="type"), +] +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + CallHookAssistantSpeechInterruptedDoItem_Tool, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/call_hook_assistant_speech_interrupted_on.py b/src/vapi/types/call_hook_assistant_speech_interrupted_on.py new file mode 100644 index 00000000..c9d51c72 --- /dev/null +++ b/src/vapi/types/call_hook_assistant_speech_interrupted_on.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CallHookAssistantSpeechInterruptedOn = typing.Union[typing.Literal["assistant.speech.interrupted"], typing.Any] diff --git a/src/vapi/types/call_hook_call_ending.py b/src/vapi/types/call_hook_call_ending.py new file mode 100644 index 00000000..41dfca4a --- /dev/null +++ b/src/vapi/types/call_hook_call_ending.py @@ -0,0 +1,155 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .call_hook_call_ending_on import CallHookCallEndingOn +from .call_hook_filter import CallHookFilter + + +class CallHookCallEnding(UncheckedBaseModel): + on: CallHookCallEndingOn = pydantic.Field() + """ + This is the event that triggers this hook + """ + + do: typing.List["CallHookCallEndingDoItem"] = pydantic.Field() + """ + This is the set of actions to perform when the hook triggers + """ + + filters: typing.Optional[typing.List[CallHookFilter]] = pydantic.Field(default=None) + """ + This is the set of filters that must match for the hook to trigger + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + CallHookCallEnding, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/call_hook_call_ending_do_item.py b/src/vapi/types/call_hook_call_ending_do_item.py new file mode 100644 index 00000000..8dae9a9a --- /dev/null +++ b/src/vapi/types/call_hook_call_ending_do_item.py @@ -0,0 +1,168 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .open_ai_message import OpenAiMessage + + +class CallHookCallEndingDoItem_Tool(UncheckedBaseModel): + type: typing.Literal["tool"] = "tool" + tool: typing.Optional["ToolCallHookActionTool"] = None + tool_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="toolId"), pydantic.Field(alias="toolId") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CallHookCallEndingDoItem_MessageAdd(UncheckedBaseModel): + type: typing.Literal["message.add"] = "message.add" + message: OpenAiMessage + trigger_response_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="triggerResponseEnabled"), + pydantic.Field(alias="triggerResponseEnabled"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CallHookCallEndingDoItem = typing_extensions.Annotated[ + typing.Union[CallHookCallEndingDoItem_Tool, CallHookCallEndingDoItem_MessageAdd], UnionMetadata(discriminant="type") +] +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + CallHookCallEndingDoItem_Tool, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/call_hook_call_ending_on.py b/src/vapi/types/call_hook_call_ending_on.py new file mode 100644 index 00000000..81a75d81 --- /dev/null +++ b/src/vapi/types/call_hook_call_ending_on.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CallHookCallEndingOn = typing.Union[typing.Literal["call.ending"], typing.Any] diff --git a/src/vapi/types/call_hook_customer_speech_interrupted.py b/src/vapi/types/call_hook_customer_speech_interrupted.py new file mode 100644 index 00000000..7a8e50f8 --- /dev/null +++ b/src/vapi/types/call_hook_customer_speech_interrupted.py @@ -0,0 +1,149 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .call_hook_customer_speech_interrupted_on import CallHookCustomerSpeechInterruptedOn + + +class CallHookCustomerSpeechInterrupted(UncheckedBaseModel): + on: CallHookCustomerSpeechInterruptedOn = pydantic.Field() + """ + This is the event that triggers this hook + """ + + do: typing.List["CallHookCustomerSpeechInterruptedDoItem"] = pydantic.Field() + """ + This is the set of actions to perform when the hook triggers + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + CallHookCustomerSpeechInterrupted, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/call_hook_customer_speech_interrupted_do_item.py b/src/vapi/types/call_hook_customer_speech_interrupted_do_item.py new file mode 100644 index 00000000..ba12d6cc --- /dev/null +++ b/src/vapi/types/call_hook_customer_speech_interrupted_do_item.py @@ -0,0 +1,189 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .open_ai_message import OpenAiMessage +from .say_hook_action_prompt import SayHookActionPrompt + + +class CallHookCustomerSpeechInterruptedDoItem_Say(UncheckedBaseModel): + type: typing.Literal["say"] = "say" + prompt: typing.Optional[SayHookActionPrompt] = None + exact: typing.Optional[typing.Dict[str, typing.Any]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CallHookCustomerSpeechInterruptedDoItem_Tool(UncheckedBaseModel): + type: typing.Literal["tool"] = "tool" + tool: typing.Optional["ToolCallHookActionTool"] = None + tool_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="toolId"), pydantic.Field(alias="toolId") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CallHookCustomerSpeechInterruptedDoItem_MessageAdd(UncheckedBaseModel): + type: typing.Literal["message.add"] = "message.add" + message: OpenAiMessage + trigger_response_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="triggerResponseEnabled"), + pydantic.Field(alias="triggerResponseEnabled"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CallHookCustomerSpeechInterruptedDoItem = typing_extensions.Annotated[ + typing.Union[ + CallHookCustomerSpeechInterruptedDoItem_Say, + CallHookCustomerSpeechInterruptedDoItem_Tool, + CallHookCustomerSpeechInterruptedDoItem_MessageAdd, + ], + UnionMetadata(discriminant="type"), +] +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + CallHookCustomerSpeechInterruptedDoItem_Tool, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/call_hook_customer_speech_interrupted_on.py b/src/vapi/types/call_hook_customer_speech_interrupted_on.py new file mode 100644 index 00000000..b72228cc --- /dev/null +++ b/src/vapi/types/call_hook_customer_speech_interrupted_on.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CallHookCustomerSpeechInterruptedOn = typing.Union[typing.Literal["customer.speech.interrupted"], typing.Any] diff --git a/src/vapi/types/call_hook_customer_speech_timeout.py b/src/vapi/types/call_hook_customer_speech_timeout.py new file mode 100644 index 00000000..6aa0557e --- /dev/null +++ b/src/vapi/types/call_hook_customer_speech_timeout.py @@ -0,0 +1,162 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .customer_speech_timeout_options import CustomerSpeechTimeoutOptions + + +class CallHookCustomerSpeechTimeout(UncheckedBaseModel): + on: str = pydantic.Field() + """ + Must be either "customer.speech.timeout" or match the pattern "customer.speech.timeout[property=value]" + """ + + do: typing.List["CallHookCustomerSpeechTimeoutDoItem"] = pydantic.Field() + """ + This is the set of actions to perform when the hook triggers + """ + + options: typing.Optional[CustomerSpeechTimeoutOptions] = pydantic.Field(default=None) + """ + This is the set of filters that must match for the hook to trigger + """ + + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the hook, it can be set by the user to identify the hook. + If no name is provided, the hook will be auto generated as UUID. + + @default UUID + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + CallHookCustomerSpeechTimeout, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/call_hook_customer_speech_timeout_do_item.py b/src/vapi/types/call_hook_customer_speech_timeout_do_item.py new file mode 100644 index 00000000..e7d0aebf --- /dev/null +++ b/src/vapi/types/call_hook_customer_speech_timeout_do_item.py @@ -0,0 +1,189 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .open_ai_message import OpenAiMessage +from .say_hook_action_prompt import SayHookActionPrompt + + +class CallHookCustomerSpeechTimeoutDoItem_Say(UncheckedBaseModel): + type: typing.Literal["say"] = "say" + prompt: typing.Optional[SayHookActionPrompt] = None + exact: typing.Optional[typing.Dict[str, typing.Any]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CallHookCustomerSpeechTimeoutDoItem_Tool(UncheckedBaseModel): + type: typing.Literal["tool"] = "tool" + tool: typing.Optional["ToolCallHookActionTool"] = None + tool_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="toolId"), pydantic.Field(alias="toolId") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CallHookCustomerSpeechTimeoutDoItem_MessageAdd(UncheckedBaseModel): + type: typing.Literal["message.add"] = "message.add" + message: OpenAiMessage + trigger_response_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="triggerResponseEnabled"), + pydantic.Field(alias="triggerResponseEnabled"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CallHookCustomerSpeechTimeoutDoItem = typing_extensions.Annotated[ + typing.Union[ + CallHookCustomerSpeechTimeoutDoItem_Say, + CallHookCustomerSpeechTimeoutDoItem_Tool, + CallHookCustomerSpeechTimeoutDoItem_MessageAdd, + ], + UnionMetadata(discriminant="type"), +] +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + CallHookCustomerSpeechTimeoutDoItem_Tool, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/call_hook_filter.py b/src/vapi/types/call_hook_filter.py new file mode 100644 index 00000000..247e25b1 --- /dev/null +++ b/src/vapi/types/call_hook_filter.py @@ -0,0 +1,37 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .call_hook_filter_type import CallHookFilterType + + +class CallHookFilter(UncheckedBaseModel): + type: CallHookFilterType = pydantic.Field() + """ + This is the type of filter - currently only "oneOf" is supported + """ + + key: str = pydantic.Field() + """ + This is the key to filter on (e.g. "call.endedReason") + """ + + one_of: typing_extensions.Annotated[ + typing.List[str], + FieldMetadata(alias="oneOf"), + pydantic.Field(alias="oneOf", description="This is the array of possible values to match against"), + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/call_hook_filter_type.py b/src/vapi/types/call_hook_filter_type.py new file mode 100644 index 00000000..c851bd2e --- /dev/null +++ b/src/vapi/types/call_hook_filter_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CallHookFilterType = typing.Union[typing.Literal["oneOf"], typing.Any] diff --git a/src/vapi/types/call_hook_model_response_timeout.py b/src/vapi/types/call_hook_model_response_timeout.py new file mode 100644 index 00000000..cddf5520 --- /dev/null +++ b/src/vapi/types/call_hook_model_response_timeout.py @@ -0,0 +1,35 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .call_hook_model_response_timeout_do_item import CallHookModelResponseTimeoutDoItem +from .call_hook_model_response_timeout_on import CallHookModelResponseTimeoutOn + + +class CallHookModelResponseTimeout(UncheckedBaseModel): + on: CallHookModelResponseTimeoutOn = pydantic.Field() + """ + This is the event that triggers this hook + """ + + do: typing.List[CallHookModelResponseTimeoutDoItem] = pydantic.Field() + """ + This is the set of actions to perform when the hook triggers + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(CallHookModelResponseTimeout) diff --git a/src/vapi/types/call_hook_model_response_timeout_do_item.py b/src/vapi/types/call_hook_model_response_timeout_do_item.py new file mode 100644 index 00000000..da3f92e5 --- /dev/null +++ b/src/vapi/types/call_hook_model_response_timeout_do_item.py @@ -0,0 +1,190 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .open_ai_message import OpenAiMessage +from .say_hook_action_prompt import SayHookActionPrompt + + +class CallHookModelResponseTimeoutDoItem_Say(UncheckedBaseModel): + type: typing.Literal["say"] = "say" + prompt: typing.Optional[SayHookActionPrompt] = None + exact: typing.Optional[typing.Dict[str, typing.Any]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CallHookModelResponseTimeoutDoItem_Tool(UncheckedBaseModel): + type: typing.Literal["tool"] = "tool" + tool: typing.Optional["ToolCallHookActionTool"] = None + tool_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="toolId"), pydantic.Field(alias="toolId") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CallHookModelResponseTimeoutDoItem_MessageAdd(UncheckedBaseModel): + type: typing.Literal["message.add"] = "message.add" + message: OpenAiMessage + trigger_response_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="triggerResponseEnabled"), + pydantic.Field(alias="triggerResponseEnabled"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CallHookModelResponseTimeoutDoItem = typing_extensions.Annotated[ + typing.Union[ + CallHookModelResponseTimeoutDoItem_Say, + CallHookModelResponseTimeoutDoItem_Tool, + CallHookModelResponseTimeoutDoItem_MessageAdd, + ], + UnionMetadata(discriminant="type"), +] +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + CallHookModelResponseTimeoutDoItem_Tool, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/call_hook_model_response_timeout_on.py b/src/vapi/types/call_hook_model_response_timeout_on.py new file mode 100644 index 00000000..a192b687 --- /dev/null +++ b/src/vapi/types/call_hook_model_response_timeout_on.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CallHookModelResponseTimeoutOn = typing.Union[typing.Literal["model.response.timeout"], typing.Any] diff --git a/src/vapi/types/call_hook_transcriber_endpointed_speech_low_confidence.py b/src/vapi/types/call_hook_transcriber_endpointed_speech_low_confidence.py new file mode 100644 index 00000000..67226855 --- /dev/null +++ b/src/vapi/types/call_hook_transcriber_endpointed_speech_low_confidence.py @@ -0,0 +1,42 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .call_hook_transcriber_endpointed_speech_low_confidence_do_item import ( + CallHookTranscriberEndpointedSpeechLowConfidenceDoItem, +) +from .endpointed_speech_low_confidence_options import EndpointedSpeechLowConfidenceOptions + + +class CallHookTranscriberEndpointedSpeechLowConfidence(UncheckedBaseModel): + do: typing.List[CallHookTranscriberEndpointedSpeechLowConfidenceDoItem] = pydantic.Field() + """ + This is the set of actions to perform when the hook triggers + """ + + on: str = pydantic.Field() + """ + This is the event that triggers this hook + """ + + options: typing.Optional[EndpointedSpeechLowConfidenceOptions] = pydantic.Field(default=None) + """ + This is the options for the hook including confidence thresholds + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(CallHookTranscriberEndpointedSpeechLowConfidence) diff --git a/src/vapi/types/call_hook_transcriber_endpointed_speech_low_confidence_do_item.py b/src/vapi/types/call_hook_transcriber_endpointed_speech_low_confidence_do_item.py new file mode 100644 index 00000000..7463e40e --- /dev/null +++ b/src/vapi/types/call_hook_transcriber_endpointed_speech_low_confidence_do_item.py @@ -0,0 +1,190 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .open_ai_message import OpenAiMessage +from .say_hook_action_prompt import SayHookActionPrompt + + +class CallHookTranscriberEndpointedSpeechLowConfidenceDoItem_Say(UncheckedBaseModel): + type: typing.Literal["say"] = "say" + prompt: typing.Optional[SayHookActionPrompt] = None + exact: typing.Optional[typing.Dict[str, typing.Any]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CallHookTranscriberEndpointedSpeechLowConfidenceDoItem_Tool(UncheckedBaseModel): + type: typing.Literal["tool"] = "tool" + tool: typing.Optional["ToolCallHookActionTool"] = None + tool_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="toolId"), pydantic.Field(alias="toolId") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CallHookTranscriberEndpointedSpeechLowConfidenceDoItem_MessageAdd(UncheckedBaseModel): + type: typing.Literal["message.add"] = "message.add" + message: OpenAiMessage + trigger_response_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="triggerResponseEnabled"), + pydantic.Field(alias="triggerResponseEnabled"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CallHookTranscriberEndpointedSpeechLowConfidenceDoItem = typing_extensions.Annotated[ + typing.Union[ + CallHookTranscriberEndpointedSpeechLowConfidenceDoItem_Say, + CallHookTranscriberEndpointedSpeechLowConfidenceDoItem_Tool, + CallHookTranscriberEndpointedSpeechLowConfidenceDoItem_MessageAdd, + ], + UnionMetadata(discriminant="type"), +] +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + CallHookTranscriberEndpointedSpeechLowConfidenceDoItem_Tool, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/call_messages_item.py b/src/vapi/types/call_messages_item.py index b4a7f016..c1043408 100644 --- a/src/vapi/types/call_messages_item.py +++ b/src/vapi/types/call_messages_item.py @@ -1,10 +1,11 @@ # This file was auto-generated by Fern from our API Definition. import typing -from .user_message import UserMessage -from .system_message import SystemMessage + from .bot_message import BotMessage +from .system_message import SystemMessage from .tool_call_message import ToolCallMessage from .tool_call_result_message import ToolCallResultMessage +from .user_message import UserMessage CallMessagesItem = typing.Union[UserMessage, SystemMessage, BotMessage, ToolCallMessage, ToolCallResultMessage] diff --git a/src/vapi/types/call_paginated_response.py b/src/vapi/types/call_paginated_response.py index 18b8804a..b9e3cb40 100644 --- a/src/vapi/types/call_paginated_response.py +++ b/src/vapi/types/call_paginated_response.py @@ -1,19 +1,17 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -from .callback_step import CallbackStep -from .create_workflow_block_dto import CreateWorkflowBlockDto -from .handoff_step import HandoffStep + import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel from .call import Call from .pagination_meta import PaginationMeta -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -import pydantic -from ..core.pydantic_utilities import update_forward_refs -class CallPaginatedResponse(UniversalBaseModel): +class CallPaginatedResponse(UncheckedBaseModel): results: typing.List[Call] metadata: PaginationMeta @@ -27,6 +25,4 @@ class Config: extra = pydantic.Extra.allow -update_forward_refs(CallbackStep, CallPaginatedResponse=CallPaginatedResponse) -update_forward_refs(CreateWorkflowBlockDto, CallPaginatedResponse=CallPaginatedResponse) -update_forward_refs(HandoffStep, CallPaginatedResponse=CallPaginatedResponse) +update_forward_refs(CallPaginatedResponse) diff --git a/src/vapi/types/call_phone_call_provider.py b/src/vapi/types/call_phone_call_provider.py index f08be6bb..b1f58a92 100644 --- a/src/vapi/types/call_phone_call_provider.py +++ b/src/vapi/types/call_phone_call_provider.py @@ -2,4 +2,4 @@ import typing -CallPhoneCallProvider = typing.Union[typing.Literal["twilio", "vonage", "vapi"], typing.Any] +CallPhoneCallProvider = typing.Union[typing.Literal["twilio", "vonage", "vapi", "telnyx"], typing.Any] diff --git a/src/vapi/types/call_status.py b/src/vapi/types/call_status.py index 5b794851..113fffac 100644 --- a/src/vapi/types/call_status.py +++ b/src/vapi/types/call_status.py @@ -2,4 +2,9 @@ import typing -CallStatus = typing.Union[typing.Literal["queued", "ringing", "in-progress", "forwarding", "ended"], typing.Any] +CallStatus = typing.Union[ + typing.Literal[ + "scheduled", "queued", "ringing", "in-progress", "forwarding", "ended", "not-found", "deletion-failed" + ], + typing.Any, +] diff --git a/src/vapi/types/call_type.py b/src/vapi/types/call_type.py index 6c5f62c6..44e0848a 100644 --- a/src/vapi/types/call_type.py +++ b/src/vapi/types/call_type.py @@ -2,4 +2,6 @@ import typing -CallType = typing.Union[typing.Literal["inboundPhoneCall", "outboundPhoneCall", "webCall"], typing.Any] +CallType = typing.Union[ + typing.Literal["inboundPhoneCall", "outboundPhoneCall", "webCall", "vapi.websocketCall"], typing.Any +] diff --git a/src/vapi/types/callback_step.py b/src/vapi/types/callback_step.py deleted file mode 100644 index 87f4fdcc..00000000 --- a/src/vapi/types/callback_step.py +++ /dev/null @@ -1,116 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -import typing -import pydantic -from .assignment_mutation import AssignmentMutation -import typing_extensions -from ..core.serialization import FieldMetadata -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.pydantic_utilities import update_forward_refs - - -class CallbackStep(UniversalBaseModel): - block: typing.Optional["CallbackStepBlock"] = pydantic.Field(default=None) - """ - This is the block to use. To use an existing block, use `blockId`. - """ - - type: typing.Literal["callback"] = pydantic.Field(default="callback") - """ - This is a step that calls back to the previous step after it's done. This effectively means we're spawning a new conversation thread. The previous conversation thread will resume where it left off once this step is done. - - Use case: - - - You are collecting a customer's order and while they were on one item, they start a new item or try to modify a previous one. You would make a OrderUpdate block which calls the same block repeatedly when a new update starts. - """ - - mutations: typing.Optional[typing.List[AssignmentMutation]] = pydantic.Field(default=None) - """ - This is the mutations to apply to the context after the step is done. - """ - - name: str = pydantic.Field() - """ - This is the name of the step. - """ - - block_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="blockId")] = pydantic.Field( - default=None - ) - """ - This is the id of the block to use. To use a transient block, use `block`. - """ - - input: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None) - """ - This is the input to the block. You can use any key-value map as input to the block. - - Example: - { - "name": "John Doe", - "age": 20 - } - - You can reference any variable in the context of the current block: - - - "{{your-step-name.output.your-property-name}}" for another step's output (in the same workflow; read caveat #1) - - "{{your-step-name.input.your-property-name}}" for another step's input (in the same workflow; read caveat #1) - - "{{your-block-name.output.your-property-name}}" for another block's output (in the same workflow; read caveat #2) - - "{{your-block-name.input.your-property-name}}" for another block's input (in the same workflow; read caveat #2) - - "{{workflow.input.your-property-name}}" for the current workflow's input - - "{{global.your-property-name}}" for the global context - - Example: - { - "name": "{{my-tool-call-step.output.name}}", - "age": "{{my-tool-call-step.input.age}}", - "date": "{{workflow.input.date}}" - } - - You can dynamically change the key name. - - Example: - { - "{{my-tool-call-step.output.key-name-for-name}}": "{{name}}", - "{{my-tool-call-step.input.key-name-for-age}}": "{{age}}", - "{{workflow.input.key-name-for-date}}": "{{date}}" - } - - You can represent the value as a string, number, boolean, array, or object. - - Example: - { - "name": "john", - "age": 20, - "date": "2021-01-01", - "metadata": { - "unique-key": "{{my-tool-call-step.output.unique-key}}" - }, - "array": ["A", "B", "C"], - } - - Caveats: - - 1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.input/output.propertyName}} will reference the latest usage of the step. - 2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.input/output.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .create_workflow_block_dto import CreateWorkflowBlockDto # noqa: E402 -from .handoff_step import HandoffStep # noqa: E402 -from .callback_step_block import CallbackStepBlock # noqa: E402 - -update_forward_refs(CreateWorkflowBlockDto, CallbackStep=CallbackStep) -update_forward_refs(HandoffStep, CallbackStep=CallbackStep) -update_forward_refs(CallbackStep) diff --git a/src/vapi/types/callback_step_block.py b/src/vapi/types/callback_step_block.py deleted file mode 100644 index d0ae695f..00000000 --- a/src/vapi/types/callback_step_block.py +++ /dev/null @@ -1,11 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations -import typing -from .create_conversation_block_dto import CreateConversationBlockDto -from .create_tool_call_block_dto import CreateToolCallBlockDto -import typing - -if typing.TYPE_CHECKING: - from .create_workflow_block_dto import CreateWorkflowBlockDto -CallbackStepBlock = typing.Union[CreateConversationBlockDto, CreateToolCallBlockDto, "CreateWorkflowBlockDto"] diff --git a/src/vapi/types/campaign.py b/src/vapi/types/campaign.py new file mode 100644 index 00000000..53ce458f --- /dev/null +++ b/src/vapi/types/campaign.py @@ -0,0 +1,164 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .campaign_ended_reason import CampaignEndedReason +from .campaign_status import CampaignStatus +from .create_customer_dto import CreateCustomerDto +from .dial_plan_entry import DialPlanEntry +from .schedule_plan import SchedulePlan + + +class Campaign(UncheckedBaseModel): + status: CampaignStatus = pydantic.Field() + """ + This is the status of the campaign. + """ + + ended_reason: typing_extensions.Annotated[ + typing.Optional[CampaignEndedReason], + FieldMetadata(alias="endedReason"), + pydantic.Field(alias="endedReason", description="This is the explanation for how the campaign ended."), + ] = None + name: str = pydantic.Field() + """ + This is the name of the campaign. This is just for your own reference. + """ + + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assistantId"), + pydantic.Field( + alias="assistantId", + description="This is the assistant ID that will be used for the campaign calls. Note: Only one of assistantId, workflowId, or squadId can be used.", + ), + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="workflowId"), + pydantic.Field( + alias="workflowId", + description="This is the workflow ID that will be used for the campaign calls. Note: Only one of assistantId, workflowId, or squadId can be used.", + ), + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="squadId"), + pydantic.Field( + alias="squadId", + description="This is the squad ID that will be used for the campaign calls. Note: Only one of assistantId, workflowId, or squadId can be used.", + ), + ] = None + phone_number_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="phoneNumberId"), + pydantic.Field( + alias="phoneNumberId", + description="This is the phone number ID that will be used for the campaign calls. Required if dialPlan is not provided. Note: phoneNumberId and dialPlan are mutually exclusive.", + ), + ] = None + dial_plan: typing_extensions.Annotated[ + typing.Optional[typing.List[DialPlanEntry]], + FieldMetadata(alias="dialPlan"), + pydantic.Field( + alias="dialPlan", + description="This is a list of dial entries, each specifying a phone number and the customers to call using that number. Use this when you want different phone numbers to call different sets of customers. Note: phoneNumberId and dialPlan are mutually exclusive.", + ), + ] = None + schedule_plan: typing_extensions.Annotated[ + typing.Optional[SchedulePlan], + FieldMetadata(alias="schedulePlan"), + pydantic.Field( + alias="schedulePlan", + description="This is the schedule plan for the campaign. Calls will start at startedAt and continue until your organization’s concurrency limit is reached. Any remaining calls will be retried for up to one hour as capacity becomes available. After that hour or after latestAt, whichever comes first, any calls that couldn’t be placed won’t be retried.", + ), + ] = None + customers: typing.Optional[typing.List[CreateCustomerDto]] = pydantic.Field(default=None) + """ + These are the customers that will be called in the campaign. Required if dialPlan is not provided. + """ + + id: str = pydantic.Field() + """ + This is the unique identifier for the campaign. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this campaign belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the campaign was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the campaign was last updated.", + ), + ] + calls: typing.Dict[str, typing.Any] = pydantic.Field() + """ + This is a map of call IDs to campaign call details. + """ + + calls_counter_scheduled: typing_extensions.Annotated[ + float, + FieldMetadata(alias="callsCounterScheduled"), + pydantic.Field( + alias="callsCounterScheduled", description="This is the number of calls that have been scheduled." + ), + ] + calls_counter_queued: typing_extensions.Annotated[ + float, + FieldMetadata(alias="callsCounterQueued"), + pydantic.Field(alias="callsCounterQueued", description="This is the number of calls that have been queued."), + ] + calls_counter_in_progress: typing_extensions.Annotated[ + float, + FieldMetadata(alias="callsCounterInProgress"), + pydantic.Field( + alias="callsCounterInProgress", description="This is the number of calls that have been in progress." + ), + ] + calls_counter_ended_voicemail: typing_extensions.Annotated[ + float, + FieldMetadata(alias="callsCounterEndedVoicemail"), + pydantic.Field( + alias="callsCounterEndedVoicemail", + description="This is the number of calls whose ended reason is 'voicemail'.", + ), + ] + calls_counter_ended: typing_extensions.Annotated[ + float, + FieldMetadata(alias="callsCounterEnded"), + pydantic.Field(alias="callsCounterEnded", description="This is the number of calls that have ended."), + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(Campaign) diff --git a/src/vapi/types/campaign_ended_reason.py b/src/vapi/types/campaign_ended_reason.py new file mode 100644 index 00000000..0933e03e --- /dev/null +++ b/src/vapi/types/campaign_ended_reason.py @@ -0,0 +1,8 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CampaignEndedReason = typing.Union[ + typing.Literal["campaign.scheduled.ended-by-user", "campaign.in-progress.ended-by-user", "campaign.ended.success"], + typing.Any, +] diff --git a/src/vapi/types/campaign_paginated_response.py b/src/vapi/types/campaign_paginated_response.py new file mode 100644 index 00000000..86f02d0a --- /dev/null +++ b/src/vapi/types/campaign_paginated_response.py @@ -0,0 +1,28 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .campaign import Campaign +from .pagination_meta import PaginationMeta + + +class CampaignPaginatedResponse(UncheckedBaseModel): + results: typing.List[Campaign] + metadata: PaginationMeta + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(CampaignPaginatedResponse) diff --git a/src/vapi/types/campaign_status.py b/src/vapi/types/campaign_status.py new file mode 100644 index 00000000..a9357df2 --- /dev/null +++ b/src/vapi/types/campaign_status.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CampaignStatus = typing.Union[typing.Literal["scheduled", "in-progress", "ended"], typing.Any] diff --git a/src/vapi/types/cartesia_credential.py b/src/vapi/types/cartesia_credential.py index 2fbf720c..1771d712 100644 --- a/src/vapi/types/cartesia_credential.py +++ b/src/vapi/types/cartesia_credential.py @@ -1,39 +1,53 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +import datetime as dt import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic -import datetime as dt +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .cartesia_credential_provider import CartesiaCredentialProvider -class CartesiaCredential(UniversalBaseModel): - provider: typing.Literal["cartesia"] = "cartesia" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() - """ - This is not returned in the API. - """ - +class CartesiaCredential(UncheckedBaseModel): + provider: CartesiaCredentialProvider + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] id: str = pydantic.Field() """ This is the unique identifier for the credential. """ - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field() - """ - This is the unique identifier for the org that this credential belongs to. - """ - - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the credential was created. - """ - - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the assistant was last updated. + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/cartesia_credential_provider.py b/src/vapi/types/cartesia_credential_provider.py new file mode 100644 index 00000000..b945e4b5 --- /dev/null +++ b/src/vapi/types/cartesia_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CartesiaCredentialProvider = typing.Union[typing.Literal["cartesia"], typing.Any] diff --git a/src/vapi/types/cartesia_experimental_controls.py b/src/vapi/types/cartesia_experimental_controls.py new file mode 100644 index 00000000..4f47b795 --- /dev/null +++ b/src/vapi/types/cartesia_experimental_controls.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .cartesia_experimental_controls_emotion import CartesiaExperimentalControlsEmotion +from .cartesia_speed_control import CartesiaSpeedControl + + +class CartesiaExperimentalControls(UncheckedBaseModel): + speed: typing.Optional[CartesiaSpeedControl] = None + emotion: typing.Optional[CartesiaExperimentalControlsEmotion] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/cartesia_experimental_controls_emotion.py b/src/vapi/types/cartesia_experimental_controls_emotion.py new file mode 100644 index 00000000..dac6fa53 --- /dev/null +++ b/src/vapi/types/cartesia_experimental_controls_emotion.py @@ -0,0 +1,29 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CartesiaExperimentalControlsEmotion = typing.Union[ + typing.Literal[ + "anger:lowest", + "anger:low", + "anger:high", + "anger:highest", + "positivity:lowest", + "positivity:low", + "positivity:high", + "positivity:highest", + "surprise:lowest", + "surprise:low", + "surprise:high", + "surprise:highest", + "sadness:lowest", + "sadness:low", + "sadness:high", + "sadness:highest", + "curiosity:lowest", + "curiosity:low", + "curiosity:high", + "curiosity:highest", + ], + typing.Any, +] diff --git a/src/vapi/types/cartesia_generation_config.py b/src/vapi/types/cartesia_generation_config.py new file mode 100644 index 00000000..f030824f --- /dev/null +++ b/src/vapi/types/cartesia_generation_config.py @@ -0,0 +1,34 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .cartesia_generation_config_experimental import CartesiaGenerationConfigExperimental + + +class CartesiaGenerationConfig(UncheckedBaseModel): + speed: typing.Optional[float] = pydantic.Field(default=None) + """ + Fine-grained speed control for sonic-3. Only available for sonic-3 model. + """ + + volume: typing.Optional[float] = pydantic.Field(default=None) + """ + Fine-grained volume control for sonic-3. Only available for sonic-3 model. + """ + + experimental: typing.Optional[CartesiaGenerationConfigExperimental] = pydantic.Field(default=None) + """ + Experimental model controls for sonic-3. These are subject to breaking changes. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/cartesia_generation_config_experimental.py b/src/vapi/types/cartesia_generation_config_experimental.py new file mode 100644 index 00000000..c07f2086 --- /dev/null +++ b/src/vapi/types/cartesia_generation_config_experimental.py @@ -0,0 +1,29 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class CartesiaGenerationConfigExperimental(UncheckedBaseModel): + accent_localization: typing_extensions.Annotated[ + typing.Optional[int], + FieldMetadata(alias="accentLocalization"), + pydantic.Field( + alias="accentLocalization", + description="Toggle accent localization for sonic-3: 0 (disabled, default) or 1 (enabled). When enabled, the voice adapts to match the transcript language accent while preserving vocal characteristics.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/cartesia_pronunciation_dict_item.py b/src/vapi/types/cartesia_pronunciation_dict_item.py new file mode 100644 index 00000000..80c84100 --- /dev/null +++ b/src/vapi/types/cartesia_pronunciation_dict_item.py @@ -0,0 +1,29 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class CartesiaPronunciationDictItem(UncheckedBaseModel): + text: str = pydantic.Field() + """ + The text to be replaced in pronunciation + """ + + alias: str = pydantic.Field() + """ + The pronunciation alias or IPA representation + Can be a "sounds-like" guidance (e.g., "VAH-pee") or IPA notation (e.g., "<<ˈ|v|ɑ|ˈ|p|i>>") + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/cartesia_pronunciation_dictionary.py b/src/vapi/types/cartesia_pronunciation_dictionary.py new file mode 100644 index 00000000..65a48c12 --- /dev/null +++ b/src/vapi/types/cartesia_pronunciation_dictionary.py @@ -0,0 +1,52 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .cartesia_pronunciation_dict_item import CartesiaPronunciationDictItem + + +class CartesiaPronunciationDictionary(UncheckedBaseModel): + id: str = pydantic.Field() + """ + Unique identifier for the pronunciation dictionary + """ + + name: str = pydantic.Field() + """ + Name of the pronunciation dictionary + """ + + owner_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="ownerId"), + pydantic.Field(alias="ownerId", description="ID of the user who owns this dictionary"), + ] + pinned: bool = pydantic.Field() + """ + Whether this dictionary is pinned for the user + """ + + items: typing.List[CartesiaPronunciationDictItem] = pydantic.Field() + """ + List of text-to-pronunciation mappings + """ + + created_at: typing_extensions.Annotated[ + str, + FieldMetadata(alias="createdAt"), + pydantic.Field(alias="createdAt", description="ISO 8601 timestamp of when the dictionary was created"), + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/cartesia_speed_control.py b/src/vapi/types/cartesia_speed_control.py new file mode 100644 index 00000000..38745d44 --- /dev/null +++ b/src/vapi/types/cartesia_speed_control.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .cartesia_speed_control_zero import CartesiaSpeedControlZero + +CartesiaSpeedControl = typing.Union[CartesiaSpeedControlZero, float] diff --git a/src/vapi/types/cartesia_speed_control_zero.py b/src/vapi/types/cartesia_speed_control_zero.py new file mode 100644 index 00000000..f4414656 --- /dev/null +++ b/src/vapi/types/cartesia_speed_control_zero.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CartesiaSpeedControlZero = typing.Union[typing.Literal["slowest", "slow", "normal", "fast", "fastest"], typing.Any] diff --git a/src/vapi/types/cartesia_transcriber.py b/src/vapi/types/cartesia_transcriber.py new file mode 100644 index 00000000..e58ca77c --- /dev/null +++ b/src/vapi/types/cartesia_transcriber.py @@ -0,0 +1,34 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .cartesia_transcriber_language import CartesiaTranscriberLanguage +from .cartesia_transcriber_model import CartesiaTranscriberModel +from .fallback_transcriber_plan import FallbackTranscriberPlan + + +class CartesiaTranscriber(UncheckedBaseModel): + model: typing.Optional[CartesiaTranscriberModel] = None + language: typing.Optional[CartesiaTranscriberLanguage] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field( + alias="fallbackPlan", + description="This is the plan for transcriber provider fallbacks in the event that the primary transcriber provider fails.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/cartesia_transcriber_language.py b/src/vapi/types/cartesia_transcriber_language.py new file mode 100644 index 00000000..4570f7c2 --- /dev/null +++ b/src/vapi/types/cartesia_transcriber_language.py @@ -0,0 +1,194 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CartesiaTranscriberLanguage = typing.Union[ + typing.Literal[ + "aa", + "ab", + "ae", + "af", + "ak", + "am", + "an", + "ar", + "as", + "av", + "ay", + "az", + "ba", + "be", + "bg", + "bh", + "bi", + "bm", + "bn", + "bo", + "br", + "bs", + "ca", + "ce", + "ch", + "co", + "cr", + "cs", + "cu", + "cv", + "cy", + "da", + "de", + "dv", + "dz", + "ee", + "el", + "en", + "eo", + "es", + "et", + "eu", + "fa", + "ff", + "fi", + "fj", + "fo", + "fr", + "fy", + "ga", + "gd", + "gl", + "gn", + "gu", + "gv", + "ha", + "he", + "hi", + "ho", + "hr", + "ht", + "hu", + "hy", + "hz", + "ia", + "id", + "ie", + "ig", + "ii", + "ik", + "io", + "is", + "it", + "iu", + "ja", + "jv", + "ka", + "kg", + "ki", + "kj", + "kk", + "kl", + "km", + "kn", + "ko", + "kr", + "ks", + "ku", + "kv", + "kw", + "ky", + "la", + "lb", + "lg", + "li", + "ln", + "lo", + "lt", + "lu", + "lv", + "mg", + "mh", + "mi", + "mk", + "ml", + "mn", + "mr", + "ms", + "mt", + "my", + "na", + "nb", + "nd", + "ne", + "ng", + "nl", + "nn", + "no", + "nr", + "nv", + "ny", + "oc", + "oj", + "om", + "or", + "os", + "pa", + "pi", + "pl", + "ps", + "pt", + "qu", + "rm", + "rn", + "ro", + "ru", + "rw", + "sa", + "sc", + "sd", + "se", + "sg", + "si", + "sk", + "sl", + "sm", + "sn", + "so", + "sq", + "sr", + "ss", + "st", + "su", + "sv", + "sw", + "ta", + "te", + "tg", + "th", + "ti", + "tk", + "tl", + "tn", + "to", + "tr", + "ts", + "tt", + "tw", + "ty", + "ug", + "uk", + "ur", + "uz", + "ve", + "vi", + "vo", + "wa", + "wo", + "xh", + "yi", + "yue", + "yo", + "za", + "zh", + "zu", + ], + typing.Any, +] diff --git a/src/vapi/types/cartesia_transcriber_model.py b/src/vapi/types/cartesia_transcriber_model.py new file mode 100644 index 00000000..762fdd3d --- /dev/null +++ b/src/vapi/types/cartesia_transcriber_model.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CartesiaTranscriberModel = typing.Union[typing.Literal["ink-whisper"], typing.Any] diff --git a/src/vapi/types/cartesia_voice.py b/src/vapi/types/cartesia_voice.py index 9ce64462..2e0f9a6a 100644 --- a/src/vapi/types/cartesia_voice.py +++ b/src/vapi/types/cartesia_voice.py @@ -1,31 +1,33 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions import typing -from ..core.serialization import FieldMetadata + import pydantic -from .cartesia_voice_model import CartesiaVoiceModel +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .cartesia_experimental_controls import CartesiaExperimentalControls +from .cartesia_generation_config import CartesiaGenerationConfig from .cartesia_voice_language import CartesiaVoiceLanguage +from .cartesia_voice_model import CartesiaVoiceModel from .chunk_plan import ChunkPlan -from ..core.pydantic_utilities import IS_PYDANTIC_V2 - +from .fallback_plan import FallbackPlan -class CartesiaVoice(UniversalBaseModel): - filler_injection_enabled: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="fillerInjectionEnabled") - ] = pydantic.Field(default=None) - """ - This determines whether fillers are injected into the model output before inputting it into the voice provider. - - Default `false` because you can achieve better results with prompting the model. - """ - - provider: typing.Literal["cartesia"] = pydantic.Field(default="cartesia") - """ - This is the voice provider that will be used. - """ +class CartesiaVoice(UncheckedBaseModel): + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="cachingEnabled"), + pydantic.Field( + alias="cachingEnabled", description="This is the flag to toggle voice caching for the assistant." + ), + ] = None + voice_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="voiceId"), + pydantic.Field(alias="voiceId", description="The ID of the particular voice you want to use."), + ] model: typing.Optional[CartesiaVoiceModel] = pydantic.Field(default=None) """ This is the model that will be used. This is optional and will default to the correct model for the voiceId. @@ -36,17 +38,43 @@ class CartesiaVoice(UniversalBaseModel): This is the language that will be used. This is optional and will default to the correct language for the voiceId. """ - voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId")] = pydantic.Field() - """ - This is the provider-specific ID that will be used. - """ - - chunk_plan: typing_extensions.Annotated[typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan")] = ( - pydantic.Field(default=None) - ) - """ - This is the plan for chunking the model output before it is sent to the voice provider. - """ + experimental_controls: typing_extensions.Annotated[ + typing.Optional[CartesiaExperimentalControls], + FieldMetadata(alias="experimentalControls"), + pydantic.Field(alias="experimentalControls", description="Experimental controls for Cartesia voice generation"), + ] = None + generation_config: typing_extensions.Annotated[ + typing.Optional[CartesiaGenerationConfig], + FieldMetadata(alias="generationConfig"), + pydantic.Field( + alias="generationConfig", + description="Generation config for fine-grained control of sonic-3 voice output (speed, volume, and experimental controls). Only available for sonic-3 model.", + ), + ] = None + pronunciation_dict_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="pronunciationDictId"), + pydantic.Field( + alias="pronunciationDictId", + description="Pronunciation dictionary ID for sonic-3. Allows custom pronunciations for specific words. Only available for sonic-3 model.", + ), + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], + FieldMetadata(alias="chunkPlan"), + pydantic.Field( + alias="chunkPlan", + description="This is the plan for chunking the model output before it is sent to the voice provider.", + ), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field( + alias="fallbackPlan", + description="This is the plan for voice provider fallbacks in the event that the primary voice provider fails.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/cartesia_voice_language.py b/src/vapi/types/cartesia_voice_language.py index ea8e832b..a72c35b4 100644 --- a/src/vapi/types/cartesia_voice_language.py +++ b/src/vapi/types/cartesia_voice_language.py @@ -2,4 +2,50 @@ import typing -CartesiaVoiceLanguage = typing.Union[typing.Literal["de", "en", "es", "fr", "ja", "pt", "zh"], typing.Any] +CartesiaVoiceLanguage = typing.Union[ + typing.Literal[ + "ar", + "bg", + "bn", + "cs", + "da", + "de", + "el", + "en", + "es", + "fi", + "fr", + "gu", + "he", + "hi", + "hr", + "hu", + "id", + "it", + "ja", + "ka", + "kn", + "ko", + "ml", + "mr", + "ms", + "nl", + "no", + "pa", + "pl", + "pt", + "ro", + "ru", + "sk", + "sv", + "ta", + "te", + "th", + "tl", + "tr", + "uk", + "vi", + "zh", + ], + typing.Any, +] diff --git a/src/vapi/types/cartesia_voice_model.py b/src/vapi/types/cartesia_voice_model.py index 52360088..67dcd88d 100644 --- a/src/vapi/types/cartesia_voice_model.py +++ b/src/vapi/types/cartesia_voice_model.py @@ -2,4 +2,17 @@ import typing -CartesiaVoiceModel = typing.Union[typing.Literal["sonic-english", "sonic-multilingual"], typing.Any] +CartesiaVoiceModel = typing.Union[ + typing.Literal[ + "sonic-3", + "sonic-3-2026-01-12", + "sonic-3-2025-10-27", + "sonic-2", + "sonic-2-2025-06-11", + "sonic-english", + "sonic-multilingual", + "sonic-preview", + "sonic", + ], + typing.Any, +] diff --git a/src/vapi/types/cerebras_credential.py b/src/vapi/types/cerebras_credential.py new file mode 100644 index 00000000..172eb685 --- /dev/null +++ b/src/vapi/types/cerebras_credential.py @@ -0,0 +1,60 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .cerebras_credential_provider import CerebrasCredentialProvider + + +class CerebrasCredential(UncheckedBaseModel): + provider: CerebrasCredentialProvider + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + id: str = pydantic.Field() + """ + This is the unique identifier for the credential. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/cerebras_credential_provider.py b/src/vapi/types/cerebras_credential_provider.py new file mode 100644 index 00000000..63b76a1a --- /dev/null +++ b/src/vapi/types/cerebras_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CerebrasCredentialProvider = typing.Union[typing.Literal["cerebras"], typing.Any] diff --git a/src/vapi/types/cerebras_model.py b/src/vapi/types/cerebras_model.py new file mode 100644 index 00000000..363d20ef --- /dev/null +++ b/src/vapi/types/cerebras_model.py @@ -0,0 +1,203 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .cerebras_model_model import CerebrasModelModel +from .create_custom_knowledge_base_dto import CreateCustomKnowledgeBaseDto +from .open_ai_message import OpenAiMessage + + +class CerebrasModel(UncheckedBaseModel): + messages: typing.Optional[typing.List[OpenAiMessage]] = pydantic.Field(default=None) + """ + This is the starting state for the conversation. + """ + + tools: typing.Optional[typing.List["CerebrasModelToolsItem"]] = pydantic.Field(default=None) + """ + These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`. + + Both `tools` and `toolIds` can be used together. + """ + + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="toolIds"), + pydantic.Field( + alias="toolIds", + description="These are the tools that the assistant can use during the call. To use transient tools, use `tools`.\n\nBoth `tools` and `toolIds` can be used together.", + ), + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase", description="These are the options for the knowledge base."), + ] = None + model: CerebrasModelModel = pydantic.Field() + """ + This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b + """ + + temperature: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency. + """ + + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="maxTokens"), + pydantic.Field( + alias="maxTokens", + description="This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.", + ), + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field( + alias="emotionRecognitionEnabled", + description="This determines whether we detect user's emotion while they speak and send it as an additional info to model.\n\nDefault `false` because the model is usually are good at understanding the user's emotion from text.\n\n@default false", + ), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="numFastTurns"), + pydantic.Field( + alias="numFastTurns", + description="This sets how many turns at the start of the conversation to use a smaller, faster model from the same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai.\n\nDefault is 0.\n\n@default 0", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + CerebrasModel, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/cerebras_model_model.py b/src/vapi/types/cerebras_model_model.py new file mode 100644 index 00000000..8157f059 --- /dev/null +++ b/src/vapi/types/cerebras_model_model.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CerebrasModelModel = typing.Union[typing.Literal["llama3.1-8b", "llama-3.3-70b"], typing.Any] diff --git a/src/vapi/types/cerebras_model_tools_item.py b/src/vapi/types/cerebras_model_tools_item.py new file mode 100644 index 00000000..f691fa20 --- /dev/null +++ b/src/vapi/types/cerebras_model_tools_item.py @@ -0,0 +1,731 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .backoff_plan import BackoffPlan +from .code_tool_environment_variable import CodeToolEnvironmentVariable +from .create_api_request_tool_dto_messages_item import CreateApiRequestToolDtoMessagesItem +from .create_api_request_tool_dto_method import CreateApiRequestToolDtoMethod +from .create_bash_tool_dto_messages_item import CreateBashToolDtoMessagesItem +from .create_bash_tool_dto_name import CreateBashToolDtoName +from .create_bash_tool_dto_sub_type import CreateBashToolDtoSubType +from .create_code_tool_dto_messages_item import CreateCodeToolDtoMessagesItem +from .create_computer_tool_dto_messages_item import CreateComputerToolDtoMessagesItem +from .create_computer_tool_dto_name import CreateComputerToolDtoName +from .create_computer_tool_dto_sub_type import CreateComputerToolDtoSubType +from .create_dtmf_tool_dto_messages_item import CreateDtmfToolDtoMessagesItem +from .create_end_call_tool_dto_messages_item import CreateEndCallToolDtoMessagesItem +from .create_function_tool_dto_messages_item import CreateFunctionToolDtoMessagesItem +from .create_go_high_level_calendar_availability_tool_dto_messages_item import ( + CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem, +) +from .create_go_high_level_calendar_event_create_tool_dto_messages_item import ( + CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_create_tool_dto_messages_item import ( + CreateGoHighLevelContactCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_get_tool_dto_messages_item import CreateGoHighLevelContactGetToolDtoMessagesItem +from .create_google_calendar_check_availability_tool_dto_messages_item import ( + CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem, +) +from .create_google_calendar_create_event_tool_dto_messages_item import ( + CreateGoogleCalendarCreateEventToolDtoMessagesItem, +) +from .create_google_sheets_row_append_tool_dto_messages_item import CreateGoogleSheetsRowAppendToolDtoMessagesItem +from .create_handoff_tool_dto_messages_item import CreateHandoffToolDtoMessagesItem +from .create_mcp_tool_dto_messages_item import CreateMcpToolDtoMessagesItem +from .create_query_tool_dto_messages_item import CreateQueryToolDtoMessagesItem +from .create_sip_request_tool_dto_body import CreateSipRequestToolDtoBody +from .create_sip_request_tool_dto_messages_item import CreateSipRequestToolDtoMessagesItem +from .create_sip_request_tool_dto_verb import CreateSipRequestToolDtoVerb +from .create_slack_send_message_tool_dto_messages_item import CreateSlackSendMessageToolDtoMessagesItem +from .create_sms_tool_dto_messages_item import CreateSmsToolDtoMessagesItem +from .create_text_editor_tool_dto_messages_item import CreateTextEditorToolDtoMessagesItem +from .create_text_editor_tool_dto_name import CreateTextEditorToolDtoName +from .create_text_editor_tool_dto_sub_type import CreateTextEditorToolDtoSubType +from .create_transfer_call_tool_dto_destinations_item import CreateTransferCallToolDtoDestinationsItem +from .create_transfer_call_tool_dto_messages_item import CreateTransferCallToolDtoMessagesItem +from .create_voicemail_tool_dto_messages_item import CreateVoicemailToolDtoMessagesItem +from .knowledge_base import KnowledgeBase +from .mcp_tool_messages import McpToolMessages +from .mcp_tool_metadata import McpToolMetadata +from .open_ai_function import OpenAiFunction +from .server import Server +from .tool_parameter import ToolParameter +from .tool_rejection_plan import ToolRejectionPlan +from .variable_extraction_plan import VariableExtractionPlan + + +class CerebrasModelToolsItem_ApiRequest(UncheckedBaseModel): + type: typing.Literal["apiRequest"] = "apiRequest" + messages: typing.Optional[typing.List[CreateApiRequestToolDtoMessagesItem]] = None + method: CreateApiRequestToolDtoMethod + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + encrypted_paths: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="encryptedPaths"), pydantic.Field(alias="encryptedPaths") + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + name: typing.Optional[str] = None + description: typing.Optional[str] = None + url: str + body: typing.Optional["JsonSchema"] = None + headers: typing.Optional["JsonSchema"] = None + backoff_plan: typing_extensions.Annotated[ + typing.Optional[BackoffPlan], FieldMetadata(alias="backoffPlan"), pydantic.Field(alias="backoffPlan") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CerebrasModelToolsItem_Bash(UncheckedBaseModel): + type: typing.Literal["bash"] = "bash" + messages: typing.Optional[typing.List[CreateBashToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateBashToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateBashToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CerebrasModelToolsItem_Code(UncheckedBaseModel): + type: typing.Literal["code"] = "code" + messages: typing.Optional[typing.List[CreateCodeToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + code: str + environment_variables: typing_extensions.Annotated[ + typing.Optional[typing.List[CodeToolEnvironmentVariable]], + FieldMetadata(alias="environmentVariables"), + pydantic.Field(alias="environmentVariables"), + ] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CerebrasModelToolsItem_Computer(UncheckedBaseModel): + type: typing.Literal["computer"] = "computer" + messages: typing.Optional[typing.List[CreateComputerToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateComputerToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateComputerToolDtoName + display_width_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayWidthPx"), pydantic.Field(alias="displayWidthPx") + ] + display_height_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayHeightPx"), pydantic.Field(alias="displayHeightPx") + ] + display_number: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="displayNumber"), pydantic.Field(alias="displayNumber") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CerebrasModelToolsItem_Dtmf(UncheckedBaseModel): + type: typing.Literal["dtmf"] = "dtmf" + messages: typing.Optional[typing.List[CreateDtmfToolDtoMessagesItem]] = None + sip_info_dtmf_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="sipInfoDtmfEnabled"), pydantic.Field(alias="sipInfoDtmfEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CerebrasModelToolsItem_EndCall(UncheckedBaseModel): + type: typing.Literal["endCall"] = "endCall" + messages: typing.Optional[typing.List[CreateEndCallToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CerebrasModelToolsItem_Function(UncheckedBaseModel): + type: typing.Literal["function"] = "function" + messages: typing.Optional[typing.List[CreateFunctionToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CerebrasModelToolsItem_GohighlevelCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.availability.check"] = "gohighlevel.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CerebrasModelToolsItem_GohighlevelCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.event.create"] = "gohighlevel.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CerebrasModelToolsItem_GohighlevelContactCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.create"] = "gohighlevel.contact.create" + messages: typing.Optional[typing.List[CreateGoHighLevelContactCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CerebrasModelToolsItem_GohighlevelContactGet(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.get"] = "gohighlevel.contact.get" + messages: typing.Optional[typing.List[CreateGoHighLevelContactGetToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CerebrasModelToolsItem_GoogleCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["google.calendar.availability.check"] = "google.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CerebrasModelToolsItem_GoogleCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["google.calendar.event.create"] = "google.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoogleCalendarCreateEventToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CerebrasModelToolsItem_GoogleSheetsRowAppend(UncheckedBaseModel): + type: typing.Literal["google.sheets.row.append"] = "google.sheets.row.append" + messages: typing.Optional[typing.List[CreateGoogleSheetsRowAppendToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CerebrasModelToolsItem_Handoff(UncheckedBaseModel): + type: typing.Literal["handoff"] = "handoff" + messages: typing.Optional[typing.List[CreateHandoffToolDtoMessagesItem]] = None + default_result: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="defaultResult"), pydantic.Field(alias="defaultResult") + ] = None + destinations: typing.Optional[typing.List["CreateHandoffToolDtoDestinationsItem"]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CerebrasModelToolsItem_Mcp(UncheckedBaseModel): + type: typing.Literal["mcp"] = "mcp" + messages: typing.Optional[typing.List[CreateMcpToolDtoMessagesItem]] = None + server: typing.Optional[Server] = None + tool_messages: typing_extensions.Annotated[ + typing.Optional[typing.List[McpToolMessages]], + FieldMetadata(alias="toolMessages"), + pydantic.Field(alias="toolMessages"), + ] = None + metadata: typing.Optional[McpToolMetadata] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CerebrasModelToolsItem_Query(UncheckedBaseModel): + type: typing.Literal["query"] = "query" + messages: typing.Optional[typing.List[CreateQueryToolDtoMessagesItem]] = None + knowledge_bases: typing_extensions.Annotated[ + typing.Optional[typing.List[KnowledgeBase]], + FieldMetadata(alias="knowledgeBases"), + pydantic.Field(alias="knowledgeBases"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CerebrasModelToolsItem_SlackMessageSend(UncheckedBaseModel): + type: typing.Literal["slack.message.send"] = "slack.message.send" + messages: typing.Optional[typing.List[CreateSlackSendMessageToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CerebrasModelToolsItem_Sms(UncheckedBaseModel): + type: typing.Literal["sms"] = "sms" + messages: typing.Optional[typing.List[CreateSmsToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CerebrasModelToolsItem_TextEditor(UncheckedBaseModel): + type: typing.Literal["textEditor"] = "textEditor" + messages: typing.Optional[typing.List[CreateTextEditorToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateTextEditorToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateTextEditorToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CerebrasModelToolsItem_TransferCall(UncheckedBaseModel): + type: typing.Literal["transferCall"] = "transferCall" + messages: typing.Optional[typing.List[CreateTransferCallToolDtoMessagesItem]] = None + destinations: typing.Optional[typing.List[CreateTransferCallToolDtoDestinationsItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CerebrasModelToolsItem_SipRequest(UncheckedBaseModel): + type: typing.Literal["sipRequest"] = "sipRequest" + messages: typing.Optional[typing.List[CreateSipRequestToolDtoMessagesItem]] = None + verb: CreateSipRequestToolDtoVerb + headers: typing.Optional["JsonSchema"] = None + body: typing.Optional[CreateSipRequestToolDtoBody] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CerebrasModelToolsItem_Voicemail(UncheckedBaseModel): + type: typing.Literal["voicemail"] = "voicemail" + messages: typing.Optional[typing.List[CreateVoicemailToolDtoMessagesItem]] = None + beep_detection_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="beepDetectionEnabled"), pydantic.Field(alias="beepDetectionEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CerebrasModelToolsItem = typing_extensions.Annotated[ + typing.Union[ + CerebrasModelToolsItem_ApiRequest, + CerebrasModelToolsItem_Bash, + CerebrasModelToolsItem_Code, + CerebrasModelToolsItem_Computer, + CerebrasModelToolsItem_Dtmf, + CerebrasModelToolsItem_EndCall, + CerebrasModelToolsItem_Function, + CerebrasModelToolsItem_GohighlevelCalendarAvailabilityCheck, + CerebrasModelToolsItem_GohighlevelCalendarEventCreate, + CerebrasModelToolsItem_GohighlevelContactCreate, + CerebrasModelToolsItem_GohighlevelContactGet, + CerebrasModelToolsItem_GoogleCalendarAvailabilityCheck, + CerebrasModelToolsItem_GoogleCalendarEventCreate, + CerebrasModelToolsItem_GoogleSheetsRowAppend, + CerebrasModelToolsItem_Handoff, + CerebrasModelToolsItem_Mcp, + CerebrasModelToolsItem_Query, + CerebrasModelToolsItem_SlackMessageSend, + CerebrasModelToolsItem_Sms, + CerebrasModelToolsItem_TextEditor, + CerebrasModelToolsItem_TransferCall, + CerebrasModelToolsItem_SipRequest, + CerebrasModelToolsItem_Voicemail, + ], + UnionMetadata(discriminant="type"), +] +from .json_schema import JsonSchema # noqa: E402, I001 +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs(CerebrasModelToolsItem_ApiRequest, JsonSchema=JsonSchema) +update_forward_refs(CerebrasModelToolsItem_Bash) +update_forward_refs(CerebrasModelToolsItem_Code) +update_forward_refs(CerebrasModelToolsItem_Computer) +update_forward_refs(CerebrasModelToolsItem_Dtmf) +update_forward_refs(CerebrasModelToolsItem_EndCall) +update_forward_refs(CerebrasModelToolsItem_Function) +update_forward_refs(CerebrasModelToolsItem_GohighlevelCalendarAvailabilityCheck) +update_forward_refs(CerebrasModelToolsItem_GohighlevelCalendarEventCreate) +update_forward_refs(CerebrasModelToolsItem_GohighlevelContactCreate) +update_forward_refs(CerebrasModelToolsItem_GohighlevelContactGet) +update_forward_refs(CerebrasModelToolsItem_GoogleCalendarAvailabilityCheck) +update_forward_refs(CerebrasModelToolsItem_GoogleCalendarEventCreate) +update_forward_refs(CerebrasModelToolsItem_GoogleSheetsRowAppend) +update_forward_refs( + CerebrasModelToolsItem_Handoff, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs(CerebrasModelToolsItem_Mcp) +update_forward_refs(CerebrasModelToolsItem_Query) +update_forward_refs(CerebrasModelToolsItem_SlackMessageSend) +update_forward_refs(CerebrasModelToolsItem_Sms) +update_forward_refs(CerebrasModelToolsItem_TextEditor) +update_forward_refs(CerebrasModelToolsItem_TransferCall) +update_forward_refs(CerebrasModelToolsItem_SipRequest, JsonSchema=JsonSchema) +update_forward_refs(CerebrasModelToolsItem_Voicemail) diff --git a/src/vapi/types/chat.py b/src/vapi/types/chat.py new file mode 100644 index 00000000..e1fa9444 --- /dev/null +++ b/src/vapi/types/chat.py @@ -0,0 +1,261 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .chat_costs_item import ChatCostsItem +from .chat_input import ChatInput +from .chat_messages_item import ChatMessagesItem +from .chat_output_item import ChatOutputItem + + +class Chat(UncheckedBaseModel): + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assistantId"), + pydantic.Field( + alias="assistantId", + description="This is the assistant that will be used for the chat. To use an existing assistant, use `assistantId` instead.", + ), + ] = None + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) + """ + This is the assistant that will be used for the chat. To use an existing assistant, use `assistantId` instead. + """ + + assistant_overrides: typing_extensions.Annotated[ + typing.Optional["AssistantOverrides"], + FieldMetadata(alias="assistantOverrides"), + pydantic.Field( + alias="assistantOverrides", + description="These are the variable values that will be used to replace template variables in the assistant messages.\nOnly variable substitution is supported in chat contexts - other assistant properties cannot be overridden.", + ), + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="squadId"), + pydantic.Field( + alias="squadId", + description="This is the squad that will be used for the chat. To use a transient squad, use `squad` instead.", + ), + ] = None + squad: typing.Optional["CreateSquadDto"] = pydantic.Field(default=None) + """ + This is the squad that will be used for the chat. To use an existing squad, use `squadId` instead. + """ + + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the chat. This is just for your own reference. + """ + + session_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="sessionId"), + pydantic.Field( + alias="sessionId", + description="This is the ID of the session that will be used for the chat.\nMutually exclusive with previousChatId.", + ), + ] = None + input: typing.Optional[ChatInput] = pydantic.Field(default=None) + """ + This is the input text for the chat. + Can be a string or an array of chat messages. + """ + + stream: typing.Optional[bool] = pydantic.Field(default=None) + """ + This is a flag that determines whether the response should be streamed. + When true, the response will be sent as chunks of text. + """ + + previous_chat_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="previousChatId"), + pydantic.Field( + alias="previousChatId", + description="This is the ID of the chat that will be used as context for the new chat.\nThe messages from the previous chat will be used as context.\nMutually exclusive with sessionId.", + ), + ] = None + id: str = pydantic.Field() + """ + This is the unique identifier for the chat. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this chat belongs to." + ), + ] + messages: typing.Optional[typing.List[ChatMessagesItem]] = pydantic.Field(default=None) + """ + This is an array of messages used as context for the chat. + Used to provide message history for multi-turn conversations. + """ + + output: typing.Optional[typing.List[ChatOutputItem]] = pydantic.Field(default=None) + """ + This is the output messages generated by the system in response to the input. + """ + + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the chat was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", description="This is the ISO 8601 date-time string of when the chat was last updated." + ), + ] + costs: typing.Optional[typing.List[ChatCostsItem]] = pydantic.Field(default=None) + """ + These are the costs of individual components of the chat in USD. + """ + + cost: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the cost of the chat in USD. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + Chat, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/chat_assistant_overrides.py b/src/vapi/types/chat_assistant_overrides.py new file mode 100644 index 00000000..24288fd3 --- /dev/null +++ b/src/vapi/types/chat_assistant_overrides.py @@ -0,0 +1,26 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class ChatAssistantOverrides(UncheckedBaseModel): + variable_values: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="variableValues"), + pydantic.Field(alias="variableValues", description="Variable values for template substitution"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/chat_cost.py b/src/vapi/types/chat_cost.py new file mode 100644 index 00000000..b6853f7c --- /dev/null +++ b/src/vapi/types/chat_cost.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class ChatCost(UncheckedBaseModel): + cost: float = pydantic.Field() + """ + This is the cost of the component in USD. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/chat_costs_item.py b/src/vapi/types/chat_costs_item.py new file mode 100644 index 00000000..93f7bb32 --- /dev/null +++ b/src/vapi/types/chat_costs_item.py @@ -0,0 +1,54 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class ChatCostsItem_Model(UncheckedBaseModel): + type: typing.Literal["model"] = "model" + model: typing.Dict[str, typing.Any] + prompt_tokens: typing_extensions.Annotated[ + float, FieldMetadata(alias="promptTokens"), pydantic.Field(alias="promptTokens") + ] + completion_tokens: typing_extensions.Annotated[ + float, FieldMetadata(alias="completionTokens"), pydantic.Field(alias="completionTokens") + ] + cached_prompt_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="cachedPromptTokens"), pydantic.Field(alias="cachedPromptTokens") + ] = None + cost: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ChatCostsItem_Chat(UncheckedBaseModel): + type: typing.Literal["chat"] = "chat" + cost: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ChatCostsItem = typing_extensions.Annotated[ + typing.Union[ChatCostsItem_Model, ChatCostsItem_Chat], UnionMetadata(discriminant="type") +] diff --git a/src/vapi/types/chat_eval_assistant_message_evaluation.py b/src/vapi/types/chat_eval_assistant_message_evaluation.py new file mode 100644 index 00000000..fedf57ff --- /dev/null +++ b/src/vapi/types/chat_eval_assistant_message_evaluation.py @@ -0,0 +1,47 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .assistant_message_evaluation_continue_plan import AssistantMessageEvaluationContinuePlan +from .chat_eval_assistant_message_evaluation_judge_plan import ChatEvalAssistantMessageEvaluationJudgePlan +from .chat_eval_assistant_message_evaluation_role import ChatEvalAssistantMessageEvaluationRole + + +class ChatEvalAssistantMessageEvaluation(UncheckedBaseModel): + role: ChatEvalAssistantMessageEvaluationRole = pydantic.Field() + """ + This is the role of the message author. + For an assistant message evaluation, the role is always 'assistant' + @default 'assistant' + """ + + judge_plan: typing_extensions.Annotated[ + ChatEvalAssistantMessageEvaluationJudgePlan, + FieldMetadata(alias="judgePlan"), + pydantic.Field( + alias="judgePlan", + description="This is the judge plan that instructs how to evaluate the assistant message.\nThe assistant message can be evaluated against fixed content (exact match or RegEx) or with an LLM-as-judge by defining the evaluation criteria in a prompt.", + ), + ] + continue_plan: typing_extensions.Annotated[ + typing.Optional[AssistantMessageEvaluationContinuePlan], + FieldMetadata(alias="continuePlan"), + pydantic.Field( + alias="continuePlan", + description="This is the plan for how the overall evaluation will proceed after the assistant message is evaluated.\nThis lets you configure whether to stop the evaluation if this message fails, and whether to override any content for future turns", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/chat_eval_assistant_message_evaluation_judge_plan.py b/src/vapi/types/chat_eval_assistant_message_evaluation_judge_plan.py new file mode 100644 index 00000000..5dab3c3d --- /dev/null +++ b/src/vapi/types/chat_eval_assistant_message_evaluation_judge_plan.py @@ -0,0 +1,95 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .assistant_message_judge_plan_ai_model import AssistantMessageJudgePlanAiModel +from .chat_eval_assistant_message_mock_tool_call import ChatEvalAssistantMessageMockToolCall + + +class ChatEvalAssistantMessageEvaluationJudgePlan_Exact(UncheckedBaseModel): + """ + This is the judge plan that instructs how to evaluate the assistant message. + The assistant message can be evaluated against fixed content (exact match or RegEx) or with an LLM-as-judge by defining the evaluation criteria in a prompt. + """ + + type: typing.Literal["exact"] = "exact" + content: str + tool_calls: typing_extensions.Annotated[ + typing.Optional[typing.List[ChatEvalAssistantMessageMockToolCall]], + FieldMetadata(alias="toolCalls"), + pydantic.Field(alias="toolCalls"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ChatEvalAssistantMessageEvaluationJudgePlan_Regex(UncheckedBaseModel): + """ + This is the judge plan that instructs how to evaluate the assistant message. + The assistant message can be evaluated against fixed content (exact match or RegEx) or with an LLM-as-judge by defining the evaluation criteria in a prompt. + """ + + type: typing.Literal["regex"] = "regex" + content: str + tool_calls: typing_extensions.Annotated[ + typing.Optional[typing.List[ChatEvalAssistantMessageMockToolCall]], + FieldMetadata(alias="toolCalls"), + pydantic.Field(alias="toolCalls"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ChatEvalAssistantMessageEvaluationJudgePlan_Ai(UncheckedBaseModel): + """ + This is the judge plan that instructs how to evaluate the assistant message. + The assistant message can be evaluated against fixed content (exact match or RegEx) or with an LLM-as-judge by defining the evaluation criteria in a prompt. + """ + + type: typing.Literal["ai"] = "ai" + model: AssistantMessageJudgePlanAiModel + auto_include_message_history: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="autoIncludeMessageHistory"), + pydantic.Field(alias="autoIncludeMessageHistory"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ChatEvalAssistantMessageEvaluationJudgePlan = typing_extensions.Annotated[ + typing.Union[ + ChatEvalAssistantMessageEvaluationJudgePlan_Exact, + ChatEvalAssistantMessageEvaluationJudgePlan_Regex, + ChatEvalAssistantMessageEvaluationJudgePlan_Ai, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/chat_eval_assistant_message_evaluation_role.py b/src/vapi/types/chat_eval_assistant_message_evaluation_role.py new file mode 100644 index 00000000..935f63fd --- /dev/null +++ b/src/vapi/types/chat_eval_assistant_message_evaluation_role.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ChatEvalAssistantMessageEvaluationRole = typing.Union[typing.Literal["assistant"], typing.Any] diff --git a/src/vapi/types/chat_eval_assistant_message_mock.py b/src/vapi/types/chat_eval_assistant_message_mock.py new file mode 100644 index 00000000..ab77e789 --- /dev/null +++ b/src/vapi/types/chat_eval_assistant_message_mock.py @@ -0,0 +1,41 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .chat_eval_assistant_message_mock_role import ChatEvalAssistantMessageMockRole +from .chat_eval_assistant_message_mock_tool_call import ChatEvalAssistantMessageMockToolCall + + +class ChatEvalAssistantMessageMock(UncheckedBaseModel): + role: ChatEvalAssistantMessageMockRole = pydantic.Field() + """ + This is the role of the message author. + For a mock assistant message, the role is always 'assistant' + @default 'assistant' + """ + + content: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the content of the assistant message. + This is the message that the assistant would have sent. + """ + + tool_calls: typing_extensions.Annotated[ + typing.Optional[typing.List[ChatEvalAssistantMessageMockToolCall]], + FieldMetadata(alias="toolCalls"), + pydantic.Field(alias="toolCalls", description="This is the tool calls that will be made by the assistant."), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/chat_eval_assistant_message_mock_role.py b/src/vapi/types/chat_eval_assistant_message_mock_role.py new file mode 100644 index 00000000..500b7ec7 --- /dev/null +++ b/src/vapi/types/chat_eval_assistant_message_mock_role.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ChatEvalAssistantMessageMockRole = typing.Union[typing.Literal["assistant"], typing.Any] diff --git a/src/vapi/types/chat_eval_assistant_message_mock_tool_call.py b/src/vapi/types/chat_eval_assistant_message_mock_tool_call.py new file mode 100644 index 00000000..b37c18ad --- /dev/null +++ b/src/vapi/types/chat_eval_assistant_message_mock_tool_call.py @@ -0,0 +1,29 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class ChatEvalAssistantMessageMockToolCall(UncheckedBaseModel): + name: str = pydantic.Field() + """ + This is the name of the tool that will be called. + It should be one of the tools created in the organization. + """ + + arguments: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) + """ + This is the arguments that will be passed to the tool call. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/chat_eval_system_message_mock.py b/src/vapi/types/chat_eval_system_message_mock.py new file mode 100644 index 00000000..24f07060 --- /dev/null +++ b/src/vapi/types/chat_eval_system_message_mock.py @@ -0,0 +1,32 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .chat_eval_system_message_mock_role import ChatEvalSystemMessageMockRole + + +class ChatEvalSystemMessageMock(UncheckedBaseModel): + role: ChatEvalSystemMessageMockRole = pydantic.Field() + """ + This is the role of the message author. + For a mock system message, the role is always 'system' + @default 'system' + """ + + content: str = pydantic.Field() + """ + This is the content of the system message that would have been added in the middle of the conversation. + Do not include the assistant prompt as a part of this message. It will automatically be fetched during runtime. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/chat_eval_system_message_mock_role.py b/src/vapi/types/chat_eval_system_message_mock_role.py new file mode 100644 index 00000000..731c11ff --- /dev/null +++ b/src/vapi/types/chat_eval_system_message_mock_role.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ChatEvalSystemMessageMockRole = typing.Union[typing.Literal["system"], typing.Any] diff --git a/src/vapi/types/chat_eval_tool_response_message_evaluation.py b/src/vapi/types/chat_eval_tool_response_message_evaluation.py new file mode 100644 index 00000000..fb3db59d --- /dev/null +++ b/src/vapi/types/chat_eval_tool_response_message_evaluation.py @@ -0,0 +1,38 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .assistant_message_judge_plan_ai import AssistantMessageJudgePlanAi +from .chat_eval_tool_response_message_evaluation_role import ChatEvalToolResponseMessageEvaluationRole + + +class ChatEvalToolResponseMessageEvaluation(UncheckedBaseModel): + role: ChatEvalToolResponseMessageEvaluationRole = pydantic.Field() + """ + This is the role of the message author. + For a tool response message evaluation, the role is always 'tool' + @default 'tool' + """ + + judge_plan: typing_extensions.Annotated[ + AssistantMessageJudgePlanAi, + FieldMetadata(alias="judgePlan"), + pydantic.Field( + alias="judgePlan", + description="This is the judge plan that instructs how to evaluate the tool response message.\nThe tool response message can be evaluated with an LLM-as-judge by defining the evaluation criteria in a prompt.", + ), + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/chat_eval_tool_response_message_evaluation_role.py b/src/vapi/types/chat_eval_tool_response_message_evaluation_role.py new file mode 100644 index 00000000..826b5518 --- /dev/null +++ b/src/vapi/types/chat_eval_tool_response_message_evaluation_role.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ChatEvalToolResponseMessageEvaluationRole = typing.Union[typing.Literal["tool"], typing.Any] diff --git a/src/vapi/types/chat_eval_tool_response_message_mock.py b/src/vapi/types/chat_eval_tool_response_message_mock.py new file mode 100644 index 00000000..0c9d8029 --- /dev/null +++ b/src/vapi/types/chat_eval_tool_response_message_mock.py @@ -0,0 +1,31 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .chat_eval_tool_response_message_mock_role import ChatEvalToolResponseMessageMockRole + + +class ChatEvalToolResponseMessageMock(UncheckedBaseModel): + role: ChatEvalToolResponseMessageMockRole = pydantic.Field() + """ + This is the role of the message author. + For a mock tool response message, the role is always 'tool' + @default 'tool' + """ + + content: str = pydantic.Field() + """ + This is the content of the tool response message. JSON Objects should be stringified. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/chat_eval_tool_response_message_mock_role.py b/src/vapi/types/chat_eval_tool_response_message_mock_role.py new file mode 100644 index 00000000..bfd7b410 --- /dev/null +++ b/src/vapi/types/chat_eval_tool_response_message_mock_role.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ChatEvalToolResponseMessageMockRole = typing.Union[typing.Literal["tool"], typing.Any] diff --git a/src/vapi/types/chat_eval_user_message_mock.py b/src/vapi/types/chat_eval_user_message_mock.py new file mode 100644 index 00000000..2026894f --- /dev/null +++ b/src/vapi/types/chat_eval_user_message_mock.py @@ -0,0 +1,32 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .chat_eval_user_message_mock_role import ChatEvalUserMessageMockRole + + +class ChatEvalUserMessageMock(UncheckedBaseModel): + role: ChatEvalUserMessageMockRole = pydantic.Field() + """ + This is the role of the message author. + For a mock user message, the role is always 'user' + @default 'user' + """ + + content: str = pydantic.Field() + """ + This is the content of the user message. + This is the message that the user would have sent. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/chat_eval_user_message_mock_role.py b/src/vapi/types/chat_eval_user_message_mock_role.py new file mode 100644 index 00000000..0cfb184c --- /dev/null +++ b/src/vapi/types/chat_eval_user_message_mock_role.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ChatEvalUserMessageMockRole = typing.Union[typing.Literal["user"], typing.Any] diff --git a/src/vapi/types/chat_input.py b/src/vapi/types/chat_input.py new file mode 100644 index 00000000..8b3aa4ac --- /dev/null +++ b/src/vapi/types/chat_input.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .chat_input_one_item import ChatInputOneItem + +ChatInput = typing.Union[str, typing.List[ChatInputOneItem]] diff --git a/src/vapi/types/chat_input_one_item.py b/src/vapi/types/chat_input_one_item.py new file mode 100644 index 00000000..011d7902 --- /dev/null +++ b/src/vapi/types/chat_input_one_item.py @@ -0,0 +1,11 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .assistant_message import AssistantMessage +from .developer_message import DeveloperMessage +from .system_message import SystemMessage +from .tool_message import ToolMessage +from .user_message import UserMessage + +ChatInputOneItem = typing.Union[SystemMessage, UserMessage, AssistantMessage, ToolMessage, DeveloperMessage] diff --git a/src/vapi/types/chat_messages_item.py b/src/vapi/types/chat_messages_item.py new file mode 100644 index 00000000..0864c7b5 --- /dev/null +++ b/src/vapi/types/chat_messages_item.py @@ -0,0 +1,11 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .assistant_message import AssistantMessage +from .developer_message import DeveloperMessage +from .system_message import SystemMessage +from .tool_message import ToolMessage +from .user_message import UserMessage + +ChatMessagesItem = typing.Union[SystemMessage, UserMessage, AssistantMessage, ToolMessage, DeveloperMessage] diff --git a/src/vapi/types/chat_output_item.py b/src/vapi/types/chat_output_item.py new file mode 100644 index 00000000..d38973de --- /dev/null +++ b/src/vapi/types/chat_output_item.py @@ -0,0 +1,11 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .assistant_message import AssistantMessage +from .developer_message import DeveloperMessage +from .system_message import SystemMessage +from .tool_message import ToolMessage +from .user_message import UserMessage + +ChatOutputItem = typing.Union[SystemMessage, UserMessage, AssistantMessage, ToolMessage, DeveloperMessage] diff --git a/src/vapi/types/chat_paginated_response.py b/src/vapi/types/chat_paginated_response.py new file mode 100644 index 00000000..b21d41f2 --- /dev/null +++ b/src/vapi/types/chat_paginated_response.py @@ -0,0 +1,28 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .chat import Chat +from .pagination_meta import PaginationMeta + + +class ChatPaginatedResponse(UncheckedBaseModel): + results: typing.List[Chat] + metadata: PaginationMeta + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(ChatPaginatedResponse) diff --git a/src/vapi/types/chunk_plan.py b/src/vapi/types/chunk_plan.py index d4ce8a85..f2eed292 100644 --- a/src/vapi/types/chunk_plan.py +++ b/src/vapi/types/chunk_plan.py @@ -1,22 +1,22 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing + import pydantic import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.serialization import FieldMetadata -from .punctuation_boundary import PunctuationBoundary +from ..core.unchecked_base_model import UncheckedBaseModel from .format_plan import FormatPlan -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from .punctuation_boundary import PunctuationBoundary -class ChunkPlan(UniversalBaseModel): +class ChunkPlan(UncheckedBaseModel): enabled: typing.Optional[bool] = pydantic.Field(default=None) """ This determines whether the model output is chunked before being sent to the voice provider. Default `true`. Usage: - - To rely on the voice provider's audio generation logic, set this to `false`. - If seeing issues with quality, set this to `true`. @@ -25,40 +25,30 @@ class ChunkPlan(UniversalBaseModel): @default true """ - min_characters: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="minCharacters")] = ( - pydantic.Field(default=None) - ) - """ - This is the minimum number of characters in a chunk. - - Usage: - - - To increase quality, set this to a higher value. - - To decrease latency, set this to a lower value. - - @default 30 - """ - + min_characters: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minCharacters"), + pydantic.Field( + alias="minCharacters", + description="This is the minimum number of characters in a chunk.\n\nUsage:\n- To increase quality, set this to a higher value.\n- To decrease latency, set this to a lower value.\n\n@default 30", + ), + ] = None punctuation_boundaries: typing_extensions.Annotated[ - typing.Optional[typing.List[PunctuationBoundary]], FieldMetadata(alias="punctuationBoundaries") - ] = pydantic.Field(default=None) - """ - These are the punctuations that are considered valid boundaries for a chunk to be created. - - Usage: - - - To increase quality, constrain to fewer boundaries. - - To decrease latency, enable all. - - Default is automatically set to balance the trade-off between quality and latency based on the provider. - """ - - format_plan: typing_extensions.Annotated[typing.Optional[FormatPlan], FieldMetadata(alias="formatPlan")] = ( - pydantic.Field(default=None) - ) - """ - This is the plan for formatting the chunk before it is sent to the voice provider. - """ + typing.Optional[typing.List[PunctuationBoundary]], + FieldMetadata(alias="punctuationBoundaries"), + pydantic.Field( + alias="punctuationBoundaries", + description="These are the punctuations that are considered valid boundaries for a chunk to be created.\n\nUsage:\n- To increase quality, constrain to fewer boundaries.\n- To decrease latency, enable all.\n\nDefault is automatically set to balance the trade-off between quality and latency based on the provider.", + ), + ] = None + format_plan: typing_extensions.Annotated[ + typing.Optional[FormatPlan], + FieldMetadata(alias="formatPlan"), + pydantic.Field( + alias="formatPlan", + description="This is the plan for formatting the chunk before it is sent to the voice provider.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/client_inbound_message.py b/src/vapi/types/client_inbound_message.py index e872bc59..5b407292 100644 --- a/src/vapi/types/client_inbound_message.py +++ b/src/vapi/types/client_inbound_message.py @@ -1,13 +1,14 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -from .client_inbound_message_message import ClientInboundMessageMessage +import typing + import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 -import typing +from ..core.unchecked_base_model import UncheckedBaseModel +from .client_inbound_message_message import ClientInboundMessageMessage -class ClientInboundMessage(UniversalBaseModel): +class ClientInboundMessage(UncheckedBaseModel): message: ClientInboundMessageMessage = pydantic.Field() """ These are the messages that can be sent from client-side SDKs to control the call. diff --git a/src/vapi/types/client_inbound_message_add_message.py b/src/vapi/types/client_inbound_message_add_message.py index e7317363..9370c5d3 100644 --- a/src/vapi/types/client_inbound_message_add_message.py +++ b/src/vapi/types/client_inbound_message_add_message.py @@ -1,23 +1,30 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing + import pydantic -from .open_ai_message import OpenAiMessage +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .open_ai_message import OpenAiMessage -class ClientInboundMessageAddMessage(UniversalBaseModel): - type: typing.Literal["add-message"] = pydantic.Field(default="add-message") - """ - This is the type of the message. Send "add-message" message to add a message to the conversation history. - """ - +class ClientInboundMessageAddMessage(UncheckedBaseModel): message: OpenAiMessage = pydantic.Field() """ This is the message to add to the conversation. """ + trigger_response_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="triggerResponseEnabled"), + pydantic.Field( + alias="triggerResponseEnabled", + description="This is the flag to trigger a response, or to insert the message into the conversation history silently. Defaults to `true`.\n\nUsage:\n- Use `true` to trigger a response.\n- Use `false` to insert the message into the conversation history silently.\n\n@default true", + ), + ] = None + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/vapi/types/client_inbound_message_control.py b/src/vapi/types/client_inbound_message_control.py index 588c6b40..2c182766 100644 --- a/src/vapi/types/client_inbound_message_control.py +++ b/src/vapi/types/client_inbound_message_control.py @@ -1,22 +1,14 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing + import pydantic -from .client_inbound_message_control_control import ClientInboundMessageControlControl from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .client_inbound_message_control_control import ClientInboundMessageControlControl -class ClientInboundMessageControl(UniversalBaseModel): - type: typing.Literal["control"] = pydantic.Field(default="control") - """ - This is the type of the message. Send "control" message to control the assistant. `control` options are: - - - "mute-assistant" - mute the assistant - - "unmute-assistant" - unmute the assistant - - "say-first-message" - say the first message (this is used when video recording is enabled and the conversation is only started once the client side kicks off the recording) - """ - +class ClientInboundMessageControl(UncheckedBaseModel): control: ClientInboundMessageControlControl = pydantic.Field() """ This is the control action diff --git a/src/vapi/types/client_inbound_message_control_control.py b/src/vapi/types/client_inbound_message_control_control.py index 80817329..2b712a36 100644 --- a/src/vapi/types/client_inbound_message_control_control.py +++ b/src/vapi/types/client_inbound_message_control_control.py @@ -3,5 +3,6 @@ import typing ClientInboundMessageControlControl = typing.Union[ - typing.Literal["mute-assistant", "unmute-assistant", "say-first-message"], typing.Any + typing.Literal["mute-assistant", "unmute-assistant", "mute-customer", "unmute-customer", "say-first-message"], + typing.Any, ] diff --git a/src/vapi/types/client_inbound_message_end_call.py b/src/vapi/types/client_inbound_message_end_call.py new file mode 100644 index 00000000..6f180a33 --- /dev/null +++ b/src/vapi/types/client_inbound_message_end_call.py @@ -0,0 +1,18 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class ClientInboundMessageEndCall(UncheckedBaseModel): + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/client_inbound_message_message.py b/src/vapi/types/client_inbound_message_message.py index 76ef8ed7..c2b99d5f 100644 --- a/src/vapi/types/client_inbound_message_message.py +++ b/src/vapi/types/client_inbound_message_message.py @@ -1,10 +1,152 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .client_inbound_message_add_message import ClientInboundMessageAddMessage -from .client_inbound_message_control import ClientInboundMessageControl -from .client_inbound_message_say import ClientInboundMessageSay -ClientInboundMessageMessage = typing.Union[ - ClientInboundMessageAddMessage, ClientInboundMessageControl, ClientInboundMessageSay +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .client_inbound_message_control_control import ClientInboundMessageControlControl +from .client_inbound_message_send_transport_message_message import ClientInboundMessageSendTransportMessageMessage +from .client_inbound_message_transfer_destination import ClientInboundMessageTransferDestination +from .open_ai_message import OpenAiMessage + + +class ClientInboundMessageMessage_AddMessage(UncheckedBaseModel): + """ + These are the messages that can be sent from client-side SDKs to control the call. + """ + + type: typing.Literal["add-message"] = "add-message" + message: OpenAiMessage + trigger_response_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="triggerResponseEnabled"), + pydantic.Field(alias="triggerResponseEnabled"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientInboundMessageMessage_Control(UncheckedBaseModel): + """ + These are the messages that can be sent from client-side SDKs to control the call. + """ + + type: typing.Literal["control"] = "control" + control: ClientInboundMessageControlControl + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientInboundMessageMessage_Say(UncheckedBaseModel): + """ + These are the messages that can be sent from client-side SDKs to control the call. + """ + + type: typing.Literal["say"] = "say" + interrupt_assistant_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="interruptAssistantEnabled"), + pydantic.Field(alias="interruptAssistantEnabled"), + ] = None + content: typing.Optional[str] = None + end_call_after_spoken: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="endCallAfterSpoken"), pydantic.Field(alias="endCallAfterSpoken") + ] = None + interruptions_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="interruptionsEnabled"), pydantic.Field(alias="interruptionsEnabled") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientInboundMessageMessage_EndCall(UncheckedBaseModel): + """ + These are the messages that can be sent from client-side SDKs to control the call. + """ + + type: typing.Literal["end-call"] = "end-call" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientInboundMessageMessage_Transfer(UncheckedBaseModel): + """ + These are the messages that can be sent from client-side SDKs to control the call. + """ + + type: typing.Literal["transfer"] = "transfer" + destination: typing.Optional[ClientInboundMessageTransferDestination] = None + content: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientInboundMessageMessage_SendTransportMessage(UncheckedBaseModel): + """ + These are the messages that can be sent from client-side SDKs to control the call. + """ + + type: typing.Literal["send-transport-message"] = "send-transport-message" + message: ClientInboundMessageSendTransportMessageMessage + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ClientInboundMessageMessage = typing_extensions.Annotated[ + typing.Union[ + ClientInboundMessageMessage_AddMessage, + ClientInboundMessageMessage_Control, + ClientInboundMessageMessage_Say, + ClientInboundMessageMessage_EndCall, + ClientInboundMessageMessage_Transfer, + ClientInboundMessageMessage_SendTransportMessage, + ], + UnionMetadata(discriminant="type"), ] diff --git a/src/vapi/types/client_inbound_message_say.py b/src/vapi/types/client_inbound_message_say.py index 1e8360a4..44a68dfd 100644 --- a/src/vapi/types/client_inbound_message_say.py +++ b/src/vapi/types/client_inbound_message_say.py @@ -1,30 +1,41 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing + import pydantic import typing_extensions -from ..core.serialization import FieldMetadata from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class ClientInboundMessageSay(UniversalBaseModel): - type: typing.Optional[typing.Literal["say"]] = pydantic.Field(default=None) - """ - This is the type of the message. Send "say" message to make the assistant say something. - """ - +class ClientInboundMessageSay(UncheckedBaseModel): + interrupt_assistant_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="interruptAssistantEnabled"), + pydantic.Field( + alias="interruptAssistantEnabled", + description="This is the flag for whether the message should replace existing assistant speech.\n\n@default false", + ), + ] = None content: typing.Optional[str] = pydantic.Field(default=None) """ This is the content to say. """ end_call_after_spoken: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="endCallAfterSpoken") - ] = pydantic.Field(default=None) - """ - This is the flag to end call after content is spoken. - """ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpoken"), + pydantic.Field(alias="endCallAfterSpoken", description="This is the flag to end call after content is spoken."), + ] = None + interruptions_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="interruptionsEnabled"), + pydantic.Field( + alias="interruptionsEnabled", + description="This is the flag for whether the message is interruptible by the user.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/client_inbound_message_send_transport_message.py b/src/vapi/types/client_inbound_message_send_transport_message.py new file mode 100644 index 00000000..0e545077 --- /dev/null +++ b/src/vapi/types/client_inbound_message_send_transport_message.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .client_inbound_message_send_transport_message_message import ClientInboundMessageSendTransportMessageMessage + + +class ClientInboundMessageSendTransportMessage(UncheckedBaseModel): + message: ClientInboundMessageSendTransportMessageMessage = pydantic.Field() + """ + This is the transport-specific message to send. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/client_inbound_message_send_transport_message_message.py b/src/vapi/types/client_inbound_message_send_transport_message_message.py new file mode 100644 index 00000000..dc5d6bf2 --- /dev/null +++ b/src/vapi/types/client_inbound_message_send_transport_message_message.py @@ -0,0 +1,60 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .vapi_sip_transport_message_sip_verb import VapiSipTransportMessageSipVerb + + +class ClientInboundMessageSendTransportMessageMessage_VapiSip(UncheckedBaseModel): + """ + This is the transport-specific message to send. + """ + + transport: typing.Literal["vapi.sip"] = "vapi.sip" + sip_verb: typing_extensions.Annotated[ + VapiSipTransportMessageSipVerb, FieldMetadata(alias="sipVerb"), pydantic.Field(alias="sipVerb") + ] + headers: typing.Optional[typing.Dict[str, typing.Any]] = None + body: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientInboundMessageSendTransportMessageMessage_Twilio(UncheckedBaseModel): + """ + This is the transport-specific message to send. + """ + + transport: typing.Literal["twilio"] = "twilio" + twiml: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ClientInboundMessageSendTransportMessageMessage = typing_extensions.Annotated[ + typing.Union[ + ClientInboundMessageSendTransportMessageMessage_VapiSip, ClientInboundMessageSendTransportMessageMessage_Twilio + ], + UnionMetadata(discriminant="transport"), +] diff --git a/src/vapi/types/client_inbound_message_transfer.py b/src/vapi/types/client_inbound_message_transfer.py new file mode 100644 index 00000000..c7014fdc --- /dev/null +++ b/src/vapi/types/client_inbound_message_transfer.py @@ -0,0 +1,29 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .client_inbound_message_transfer_destination import ClientInboundMessageTransferDestination + + +class ClientInboundMessageTransfer(UncheckedBaseModel): + destination: typing.Optional[ClientInboundMessageTransferDestination] = pydantic.Field(default=None) + """ + This is the destination to transfer the call to. + """ + + content: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the content to say. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/client_inbound_message_transfer_destination.py b/src/vapi/types/client_inbound_message_transfer_destination.py new file mode 100644 index 00000000..3f212bdf --- /dev/null +++ b/src/vapi/types/client_inbound_message_transfer_destination.py @@ -0,0 +1,83 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .transfer_destination_number_message import TransferDestinationNumberMessage +from .transfer_destination_sip_message import TransferDestinationSipMessage +from .transfer_plan import TransferPlan + + +class ClientInboundMessageTransferDestination_Number(UncheckedBaseModel): + """ + This is the destination to transfer the call to. + """ + + type: typing.Literal["number"] = "number" + message: typing.Optional[TransferDestinationNumberMessage] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: str + extension: typing.Optional[str] = None + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientInboundMessageTransferDestination_Sip(UncheckedBaseModel): + """ + This is the destination to transfer the call to. + """ + + type: typing.Literal["sip"] = "sip" + message: typing.Optional[TransferDestinationSipMessage] = None + sip_uri: typing_extensions.Annotated[str, FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri")] + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + sip_headers: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="sipHeaders"), + pydantic.Field(alias="sipHeaders"), + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ClientInboundMessageTransferDestination = typing_extensions.Annotated[ + typing.Union[ClientInboundMessageTransferDestination_Number, ClientInboundMessageTransferDestination_Sip], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/client_message.py b/src/vapi/types/client_message.py index 55969dec..178a9dd9 100644 --- a/src/vapi/types/client_message.py +++ b/src/vapi/types/client_message.py @@ -1,13 +1,16 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -from .client_message_message import ClientMessageMessage -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from __future__ import annotations + import typing +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .client_message_message import ClientMessageMessage + -class ClientMessage(UniversalBaseModel): +class ClientMessage(UncheckedBaseModel): message: ClientMessageMessage = pydantic.Field() """ These are all the messages that can be sent to the client-side SDKs during the call. Configure the messages you'd like to receive in `assistant.clientMessages`. @@ -21,3 +24,6 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +update_forward_refs(ClientMessage) diff --git a/src/vapi/types/client_message_assistant_speech.py b/src/vapi/types/client_message_assistant_speech.py new file mode 100644 index 00000000..5400d09c --- /dev/null +++ b/src/vapi/types/client_message_assistant_speech.py @@ -0,0 +1,217 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .call import Call +from .client_message_assistant_speech_phone_number import ClientMessageAssistantSpeechPhoneNumber +from .client_message_assistant_speech_source import ClientMessageAssistantSpeechSource +from .client_message_assistant_speech_timing import ClientMessageAssistantSpeechTiming +from .client_message_assistant_speech_type import ClientMessageAssistantSpeechType +from .create_customer_dto import CreateCustomerDto + + +class ClientMessageAssistantSpeech(UncheckedBaseModel): + phone_number: typing_extensions.Annotated[ + typing.Optional[ClientMessageAssistantSpeechPhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: ClientMessageAssistantSpeechType = pydantic.Field() + """ + This is the type of the message. "assistant-speech" is sent as assistant audio is being played. + """ + + text: str = pydantic.Field() + """ + The full assistant text for the current turn. This is the complete text, + not an incremental delta — consumers should use `timing` metadata (e.g. + `wordsSpoken`) to determine which portion has been spoken so far. + """ + + turn: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the turn number of the assistant speech event (0-indexed). + """ + + source: typing.Optional[ClientMessageAssistantSpeechSource] = pydantic.Field(default=None) + """ + Indicates how the text was sourced. + """ + + timing: typing.Optional[ClientMessageAssistantSpeechTiming] = pydantic.Field(default=None) + """ + Optional timing metadata. Shape depends on `timing.type`: + + - `word-alignment` (ElevenLabs): per-character timing at playback + cadence. words[] includes space entries. Best consumed by tracking + a running character count: join timing.words, add to a char cursor, + and highlight text up to that position. No interpolation needed. + + - `word-progress` (Minimax with voice.subtitleType: 'word'): cursor- + based word count per TTS segment. Use wordsSpoken as the anchor, + interpolate forward using segmentDurationMs or timing.words until + the next event arrives. + + When absent, the event is a text-only fallback for providers without + word-level timing (e.g. Cartesia, Deepgram, Azure). Text emits once + per TTS chunk when audio is playing. Optionally interpolate a word + cursor at ~3.5 words/sec between events for approximate tracking. + """ + + timestamp: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the timestamp of the message. + """ + + call: typing.Optional[Call] = pydantic.Field(default=None) + """ + This is the call that the message is associated with. + """ + + customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) + """ + This is the customer that the message is associated with. + """ + + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) + """ + This is the assistant that the message is associated with. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ClientMessageAssistantSpeech, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/client_message_assistant_speech_phone_number.py b/src/vapi/types/client_message_assistant_speech_phone_number.py new file mode 100644 index 00000000..4deffe09 --- /dev/null +++ b/src/vapi/types/client_message_assistant_speech_phone_number.py @@ -0,0 +1,247 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ClientMessageAssistantSpeechPhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageAssistantSpeechPhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageAssistantSpeechPhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageAssistantSpeechPhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageAssistantSpeechPhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ClientMessageAssistantSpeechPhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ClientMessageAssistantSpeechPhoneNumber_ByoPhoneNumber, + ClientMessageAssistantSpeechPhoneNumber_Twilio, + ClientMessageAssistantSpeechPhoneNumber_Vonage, + ClientMessageAssistantSpeechPhoneNumber_Vapi, + ClientMessageAssistantSpeechPhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/client_message_assistant_speech_source.py b/src/vapi/types/client_message_assistant_speech_source.py new file mode 100644 index 00000000..e4c36b8e --- /dev/null +++ b/src/vapi/types/client_message_assistant_speech_source.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ClientMessageAssistantSpeechSource = typing.Union[typing.Literal["model", "force-say", "custom-voice"], typing.Any] diff --git a/src/vapi/types/client_message_assistant_speech_timing.py b/src/vapi/types/client_message_assistant_speech_timing.py new file mode 100644 index 00000000..fd0b8864 --- /dev/null +++ b/src/vapi/types/client_message_assistant_speech_timing.py @@ -0,0 +1,100 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .assistant_speech_word_timestamp import AssistantSpeechWordTimestamp + + +class ClientMessageAssistantSpeechTiming_WordAlignment(UncheckedBaseModel): + """ + Optional timing metadata. Shape depends on `timing.type`: + + - `word-alignment` (ElevenLabs): per-character timing at playback + cadence. words[] includes space entries. Best consumed by tracking + a running character count: join timing.words, add to a char cursor, + and highlight text up to that position. No interpolation needed. + + - `word-progress` (Minimax with voice.subtitleType: 'word'): cursor- + based word count per TTS segment. Use wordsSpoken as the anchor, + interpolate forward using segmentDurationMs or timing.words until + the next event arrives. + + When absent, the event is a text-only fallback for providers without + word-level timing (e.g. Cartesia, Deepgram, Azure). Text emits once + per TTS chunk when audio is playing. Optionally interpolate a word + cursor at ~3.5 words/sec between events for approximate tracking. + """ + + type: typing.Literal["word-alignment"] = "word-alignment" + words: typing.List[str] + words_start_times_ms: typing_extensions.Annotated[ + typing.List[float], FieldMetadata(alias="wordsStartTimesMs"), pydantic.Field(alias="wordsStartTimesMs") + ] + words_end_times_ms: typing_extensions.Annotated[ + typing.List[float], FieldMetadata(alias="wordsEndTimesMs"), pydantic.Field(alias="wordsEndTimesMs") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageAssistantSpeechTiming_WordProgress(UncheckedBaseModel): + """ + Optional timing metadata. Shape depends on `timing.type`: + + - `word-alignment` (ElevenLabs): per-character timing at playback + cadence. words[] includes space entries. Best consumed by tracking + a running character count: join timing.words, add to a char cursor, + and highlight text up to that position. No interpolation needed. + + - `word-progress` (Minimax with voice.subtitleType: 'word'): cursor- + based word count per TTS segment. Use wordsSpoken as the anchor, + interpolate forward using segmentDurationMs or timing.words until + the next event arrives. + + When absent, the event is a text-only fallback for providers without + word-level timing (e.g. Cartesia, Deepgram, Azure). Text emits once + per TTS chunk when audio is playing. Optionally interpolate a word + cursor at ~3.5 words/sec between events for approximate tracking. + """ + + type: typing.Literal["word-progress"] = "word-progress" + words_spoken: typing_extensions.Annotated[ + float, FieldMetadata(alias="wordsSpoken"), pydantic.Field(alias="wordsSpoken") + ] + total_words: typing_extensions.Annotated[ + float, FieldMetadata(alias="totalWords"), pydantic.Field(alias="totalWords") + ] + segment: typing.Optional[str] = None + segment_duration_ms: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="segmentDurationMs"), pydantic.Field(alias="segmentDurationMs") + ] = None + words: typing.Optional[typing.List[AssistantSpeechWordTimestamp]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ClientMessageAssistantSpeechTiming = typing_extensions.Annotated[ + typing.Union[ClientMessageAssistantSpeechTiming_WordAlignment, ClientMessageAssistantSpeechTiming_WordProgress], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/client_message_assistant_speech_type.py b/src/vapi/types/client_message_assistant_speech_type.py new file mode 100644 index 00000000..a861081f --- /dev/null +++ b/src/vapi/types/client_message_assistant_speech_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ClientMessageAssistantSpeechType = typing.Union[typing.Literal["assistant.speechStarted"], typing.Any] diff --git a/src/vapi/types/client_message_assistant_started.py b/src/vapi/types/client_message_assistant_started.py new file mode 100644 index 00000000..b6b55f0a --- /dev/null +++ b/src/vapi/types/client_message_assistant_started.py @@ -0,0 +1,184 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .call import Call +from .client_message_assistant_started_phone_number import ClientMessageAssistantStartedPhoneNumber +from .client_message_assistant_started_type import ClientMessageAssistantStartedType +from .create_customer_dto import CreateCustomerDto + + +class ClientMessageAssistantStarted(UncheckedBaseModel): + phone_number: typing_extensions.Annotated[ + typing.Optional[ClientMessageAssistantStartedPhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: ClientMessageAssistantStartedType = pydantic.Field() + """ + This is the type of the message. "assistant.started" is sent when the assistant is started. + """ + + timestamp: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the timestamp of the message. + """ + + call: typing.Optional[Call] = pydantic.Field(default=None) + """ + This is the call that the message is associated with. + """ + + customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) + """ + This is the customer that the message is associated with. + """ + + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) + """ + This is the assistant that the message is associated with. + """ + + new_assistant: typing_extensions.Annotated[ + "CreateAssistantDto", + FieldMetadata(alias="newAssistant"), + pydantic.Field(alias="newAssistant", description="This is the assistant that was updated."), + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ClientMessageAssistantStarted, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/client_message_assistant_started_phone_number.py b/src/vapi/types/client_message_assistant_started_phone_number.py new file mode 100644 index 00000000..ba31065f --- /dev/null +++ b/src/vapi/types/client_message_assistant_started_phone_number.py @@ -0,0 +1,247 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ClientMessageAssistantStartedPhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageAssistantStartedPhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageAssistantStartedPhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageAssistantStartedPhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageAssistantStartedPhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ClientMessageAssistantStartedPhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ClientMessageAssistantStartedPhoneNumber_ByoPhoneNumber, + ClientMessageAssistantStartedPhoneNumber_Twilio, + ClientMessageAssistantStartedPhoneNumber_Vonage, + ClientMessageAssistantStartedPhoneNumber_Vapi, + ClientMessageAssistantStartedPhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/client_message_assistant_started_type.py b/src/vapi/types/client_message_assistant_started_type.py new file mode 100644 index 00000000..bd69918a --- /dev/null +++ b/src/vapi/types/client_message_assistant_started_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ClientMessageAssistantStartedType = typing.Union[typing.Literal["assistant.started"], typing.Any] diff --git a/src/vapi/types/client_message_call_delete_failed.py b/src/vapi/types/client_message_call_delete_failed.py new file mode 100644 index 00000000..d58fc8be --- /dev/null +++ b/src/vapi/types/client_message_call_delete_failed.py @@ -0,0 +1,178 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .call import Call +from .client_message_call_delete_failed_phone_number import ClientMessageCallDeleteFailedPhoneNumber +from .client_message_call_delete_failed_type import ClientMessageCallDeleteFailedType +from .create_customer_dto import CreateCustomerDto + + +class ClientMessageCallDeleteFailed(UncheckedBaseModel): + phone_number: typing_extensions.Annotated[ + typing.Optional[ClientMessageCallDeleteFailedPhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: ClientMessageCallDeleteFailedType = pydantic.Field() + """ + This is the type of the message. "call.deleted" is sent when a call is deleted. + """ + + timestamp: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the timestamp of the message. + """ + + call: typing.Optional[Call] = pydantic.Field(default=None) + """ + This is the call that the message is associated with. + """ + + customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) + """ + This is the customer that the message is associated with. + """ + + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) + """ + This is the assistant that the message is associated with. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ClientMessageCallDeleteFailed, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/client_message_call_delete_failed_phone_number.py b/src/vapi/types/client_message_call_delete_failed_phone_number.py new file mode 100644 index 00000000..a6d53275 --- /dev/null +++ b/src/vapi/types/client_message_call_delete_failed_phone_number.py @@ -0,0 +1,247 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ClientMessageCallDeleteFailedPhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageCallDeleteFailedPhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageCallDeleteFailedPhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageCallDeleteFailedPhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageCallDeleteFailedPhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ClientMessageCallDeleteFailedPhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ClientMessageCallDeleteFailedPhoneNumber_ByoPhoneNumber, + ClientMessageCallDeleteFailedPhoneNumber_Twilio, + ClientMessageCallDeleteFailedPhoneNumber_Vonage, + ClientMessageCallDeleteFailedPhoneNumber_Vapi, + ClientMessageCallDeleteFailedPhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/client_message_call_delete_failed_type.py b/src/vapi/types/client_message_call_delete_failed_type.py new file mode 100644 index 00000000..bab51a02 --- /dev/null +++ b/src/vapi/types/client_message_call_delete_failed_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ClientMessageCallDeleteFailedType = typing.Union[typing.Literal["call.delete.failed"], typing.Any] diff --git a/src/vapi/types/client_message_call_deleted.py b/src/vapi/types/client_message_call_deleted.py new file mode 100644 index 00000000..3b988a2d --- /dev/null +++ b/src/vapi/types/client_message_call_deleted.py @@ -0,0 +1,178 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .call import Call +from .client_message_call_deleted_phone_number import ClientMessageCallDeletedPhoneNumber +from .client_message_call_deleted_type import ClientMessageCallDeletedType +from .create_customer_dto import CreateCustomerDto + + +class ClientMessageCallDeleted(UncheckedBaseModel): + phone_number: typing_extensions.Annotated[ + typing.Optional[ClientMessageCallDeletedPhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: ClientMessageCallDeletedType = pydantic.Field() + """ + This is the type of the message. "call.deleted" is sent when a call is deleted. + """ + + timestamp: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the timestamp of the message. + """ + + call: typing.Optional[Call] = pydantic.Field(default=None) + """ + This is the call that the message is associated with. + """ + + customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) + """ + This is the customer that the message is associated with. + """ + + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) + """ + This is the assistant that the message is associated with. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ClientMessageCallDeleted, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/client_message_call_deleted_phone_number.py b/src/vapi/types/client_message_call_deleted_phone_number.py new file mode 100644 index 00000000..d20f51a6 --- /dev/null +++ b/src/vapi/types/client_message_call_deleted_phone_number.py @@ -0,0 +1,247 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ClientMessageCallDeletedPhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageCallDeletedPhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageCallDeletedPhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageCallDeletedPhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageCallDeletedPhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ClientMessageCallDeletedPhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ClientMessageCallDeletedPhoneNumber_ByoPhoneNumber, + ClientMessageCallDeletedPhoneNumber_Twilio, + ClientMessageCallDeletedPhoneNumber_Vonage, + ClientMessageCallDeletedPhoneNumber_Vapi, + ClientMessageCallDeletedPhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/client_message_call_deleted_type.py b/src/vapi/types/client_message_call_deleted_type.py new file mode 100644 index 00000000..fdbbf35b --- /dev/null +++ b/src/vapi/types/client_message_call_deleted_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ClientMessageCallDeletedType = typing.Union[typing.Literal["call.deleted"], typing.Any] diff --git a/src/vapi/types/client_message_chat_created.py b/src/vapi/types/client_message_chat_created.py new file mode 100644 index 00000000..57b8d3e8 --- /dev/null +++ b/src/vapi/types/client_message_chat_created.py @@ -0,0 +1,184 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .call import Call +from .chat import Chat +from .client_message_chat_created_phone_number import ClientMessageChatCreatedPhoneNumber +from .client_message_chat_created_type import ClientMessageChatCreatedType +from .create_customer_dto import CreateCustomerDto + + +class ClientMessageChatCreated(UncheckedBaseModel): + phone_number: typing_extensions.Annotated[ + typing.Optional[ClientMessageChatCreatedPhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: ClientMessageChatCreatedType = pydantic.Field() + """ + This is the type of the message. "chat.created" is sent when a new chat is created. + """ + + timestamp: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the timestamp of the message. + """ + + call: typing.Optional[Call] = pydantic.Field(default=None) + """ + This is the call that the message is associated with. + """ + + customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) + """ + This is the customer that the message is associated with. + """ + + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) + """ + This is the assistant that the message is associated with. + """ + + chat: Chat = pydantic.Field() + """ + This is the chat that was created. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ClientMessageChatCreated, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/client_message_chat_created_phone_number.py b/src/vapi/types/client_message_chat_created_phone_number.py new file mode 100644 index 00000000..3d9ec08e --- /dev/null +++ b/src/vapi/types/client_message_chat_created_phone_number.py @@ -0,0 +1,247 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ClientMessageChatCreatedPhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageChatCreatedPhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageChatCreatedPhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageChatCreatedPhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageChatCreatedPhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ClientMessageChatCreatedPhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ClientMessageChatCreatedPhoneNumber_ByoPhoneNumber, + ClientMessageChatCreatedPhoneNumber_Twilio, + ClientMessageChatCreatedPhoneNumber_Vonage, + ClientMessageChatCreatedPhoneNumber_Vapi, + ClientMessageChatCreatedPhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/client_message_chat_created_type.py b/src/vapi/types/client_message_chat_created_type.py new file mode 100644 index 00000000..3f47eed2 --- /dev/null +++ b/src/vapi/types/client_message_chat_created_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ClientMessageChatCreatedType = typing.Union[typing.Literal["chat.created"], typing.Any] diff --git a/src/vapi/types/client_message_chat_deleted.py b/src/vapi/types/client_message_chat_deleted.py new file mode 100644 index 00000000..2530bcfb --- /dev/null +++ b/src/vapi/types/client_message_chat_deleted.py @@ -0,0 +1,184 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .call import Call +from .chat import Chat +from .client_message_chat_deleted_phone_number import ClientMessageChatDeletedPhoneNumber +from .client_message_chat_deleted_type import ClientMessageChatDeletedType +from .create_customer_dto import CreateCustomerDto + + +class ClientMessageChatDeleted(UncheckedBaseModel): + phone_number: typing_extensions.Annotated[ + typing.Optional[ClientMessageChatDeletedPhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: ClientMessageChatDeletedType = pydantic.Field() + """ + This is the type of the message. "chat.deleted" is sent when a chat is deleted. + """ + + timestamp: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the timestamp of the message. + """ + + call: typing.Optional[Call] = pydantic.Field(default=None) + """ + This is the call that the message is associated with. + """ + + customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) + """ + This is the customer that the message is associated with. + """ + + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) + """ + This is the assistant that the message is associated with. + """ + + chat: Chat = pydantic.Field() + """ + This is the chat that was deleted. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ClientMessageChatDeleted, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/client_message_chat_deleted_phone_number.py b/src/vapi/types/client_message_chat_deleted_phone_number.py new file mode 100644 index 00000000..4d3013e7 --- /dev/null +++ b/src/vapi/types/client_message_chat_deleted_phone_number.py @@ -0,0 +1,247 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ClientMessageChatDeletedPhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageChatDeletedPhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageChatDeletedPhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageChatDeletedPhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageChatDeletedPhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ClientMessageChatDeletedPhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ClientMessageChatDeletedPhoneNumber_ByoPhoneNumber, + ClientMessageChatDeletedPhoneNumber_Twilio, + ClientMessageChatDeletedPhoneNumber_Vonage, + ClientMessageChatDeletedPhoneNumber_Vapi, + ClientMessageChatDeletedPhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/client_message_chat_deleted_type.py b/src/vapi/types/client_message_chat_deleted_type.py new file mode 100644 index 00000000..d40ab4b3 --- /dev/null +++ b/src/vapi/types/client_message_chat_deleted_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ClientMessageChatDeletedType = typing.Union[typing.Literal["chat.deleted"], typing.Any] diff --git a/src/vapi/types/client_message_conversation_update.py b/src/vapi/types/client_message_conversation_update.py index e28b95bb..e0bba66d 100644 --- a/src/vapi/types/client_message_conversation_update.py +++ b/src/vapi/types/client_message_conversation_update.py @@ -1,17 +1,31 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +from __future__ import annotations + import typing + import pydantic -from .client_message_conversation_update_messages_item import ClientMessageConversationUpdateMessagesItem import typing_extensions -from .open_ai_message import OpenAiMessage +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.serialization import FieldMetadata -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .call import Call +from .client_message_conversation_update_messages_item import ClientMessageConversationUpdateMessagesItem +from .client_message_conversation_update_phone_number import ClientMessageConversationUpdatePhoneNumber +from .client_message_conversation_update_type import ClientMessageConversationUpdateType +from .create_customer_dto import CreateCustomerDto +from .open_ai_message import OpenAiMessage -class ClientMessageConversationUpdate(UniversalBaseModel): - type: typing.Literal["conversation-update"] = pydantic.Field(default="conversation-update") +class ClientMessageConversationUpdate(UncheckedBaseModel): + phone_number: typing_extensions.Annotated[ + typing.Optional[ClientMessageConversationUpdatePhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: ClientMessageConversationUpdateType = pydantic.Field() """ This is the type of the message. "conversation-update" is sent when an update is committed to the conversation history. """ @@ -22,10 +36,31 @@ class ClientMessageConversationUpdate(UniversalBaseModel): """ messages_open_ai_formatted: typing_extensions.Annotated[ - typing.List[OpenAiMessage], FieldMetadata(alias="messagesOpenAIFormatted") - ] = pydantic.Field() + typing.List[OpenAiMessage], + FieldMetadata(alias="messagesOpenAIFormatted"), + pydantic.Field( + alias="messagesOpenAIFormatted", + description="This is the most up-to-date conversation history at the time the message is sent, formatted for OpenAI.", + ), + ] + timestamp: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the timestamp of the message. + """ + + call: typing.Optional[Call] = pydantic.Field(default=None) """ - This is the most up-to-date conversation history at the time the message is sent, formatted for OpenAI. + This is the call that the message is associated with. + """ + + customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) + """ + This is the customer that the message is associated with. + """ + + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) + """ + This is the assistant that the message is associated with. """ if IS_PYDANTIC_V2: @@ -36,3 +71,123 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ClientMessageConversationUpdate, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/client_message_conversation_update_messages_item.py b/src/vapi/types/client_message_conversation_update_messages_item.py index b25bba00..75f76072 100644 --- a/src/vapi/types/client_message_conversation_update_messages_item.py +++ b/src/vapi/types/client_message_conversation_update_messages_item.py @@ -1,11 +1,12 @@ # This file was auto-generated by Fern from our API Definition. import typing -from .user_message import UserMessage -from .system_message import SystemMessage + from .bot_message import BotMessage +from .system_message import SystemMessage from .tool_call_message import ToolCallMessage from .tool_call_result_message import ToolCallResultMessage +from .user_message import UserMessage ClientMessageConversationUpdateMessagesItem = typing.Union[ UserMessage, SystemMessage, BotMessage, ToolCallMessage, ToolCallResultMessage diff --git a/src/vapi/types/client_message_conversation_update_phone_number.py b/src/vapi/types/client_message_conversation_update_phone_number.py new file mode 100644 index 00000000..8c9bc2be --- /dev/null +++ b/src/vapi/types/client_message_conversation_update_phone_number.py @@ -0,0 +1,247 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ClientMessageConversationUpdatePhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageConversationUpdatePhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageConversationUpdatePhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageConversationUpdatePhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageConversationUpdatePhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ClientMessageConversationUpdatePhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ClientMessageConversationUpdatePhoneNumber_ByoPhoneNumber, + ClientMessageConversationUpdatePhoneNumber_Twilio, + ClientMessageConversationUpdatePhoneNumber_Vonage, + ClientMessageConversationUpdatePhoneNumber_Vapi, + ClientMessageConversationUpdatePhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/client_message_conversation_update_type.py b/src/vapi/types/client_message_conversation_update_type.py new file mode 100644 index 00000000..5bfdb69a --- /dev/null +++ b/src/vapi/types/client_message_conversation_update_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ClientMessageConversationUpdateType = typing.Union[typing.Literal["conversation-update"], typing.Any] diff --git a/src/vapi/types/client_message_hang.py b/src/vapi/types/client_message_hang.py index 5f13a174..e569eefc 100644 --- a/src/vapi/types/client_message_hang.py +++ b/src/vapi/types/client_message_hang.py @@ -1,22 +1,57 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +from __future__ import annotations + import typing + import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .call import Call +from .client_message_hang_phone_number import ClientMessageHangPhoneNumber +from .client_message_hang_type import ClientMessageHangType +from .create_customer_dto import CreateCustomerDto -class ClientMessageHang(UniversalBaseModel): - type: typing.Literal["hang"] = pydantic.Field(default="hang") +class ClientMessageHang(UncheckedBaseModel): + phone_number: typing_extensions.Annotated[ + typing.Optional[ClientMessageHangPhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: ClientMessageHangType = pydantic.Field() """ This is the type of the message. "hang" is sent when the assistant is hanging due to a delay. The delay can be caused by many factors, such as: - - the model is too slow to respond - the voice is too slow to respond - the tool call is still waiting for a response from your server - etc. """ + timestamp: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the timestamp of the message. + """ + + call: typing.Optional[Call] = pydantic.Field(default=None) + """ + This is the call that the message is associated with. + """ + + customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) + """ + This is the customer that the message is associated with. + """ + + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) + """ + This is the assistant that the message is associated with. + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: @@ -25,3 +60,123 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ClientMessageHang, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/client_message_hang_phone_number.py b/src/vapi/types/client_message_hang_phone_number.py new file mode 100644 index 00000000..f1e04873 --- /dev/null +++ b/src/vapi/types/client_message_hang_phone_number.py @@ -0,0 +1,247 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ClientMessageHangPhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageHangPhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageHangPhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageHangPhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageHangPhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ClientMessageHangPhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ClientMessageHangPhoneNumber_ByoPhoneNumber, + ClientMessageHangPhoneNumber_Twilio, + ClientMessageHangPhoneNumber_Vonage, + ClientMessageHangPhoneNumber_Vapi, + ClientMessageHangPhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/client_message_hang_type.py b/src/vapi/types/client_message_hang_type.py new file mode 100644 index 00000000..440eb555 --- /dev/null +++ b/src/vapi/types/client_message_hang_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ClientMessageHangType = typing.Union[typing.Literal["hang"], typing.Any] diff --git a/src/vapi/types/client_message_language_change_detected.py b/src/vapi/types/client_message_language_change_detected.py new file mode 100644 index 00000000..662fcf6d --- /dev/null +++ b/src/vapi/types/client_message_language_change_detected.py @@ -0,0 +1,183 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .call import Call +from .client_message_language_change_detected_phone_number import ClientMessageLanguageChangeDetectedPhoneNumber +from .client_message_language_change_detected_type import ClientMessageLanguageChangeDetectedType +from .create_customer_dto import CreateCustomerDto + + +class ClientMessageLanguageChangeDetected(UncheckedBaseModel): + phone_number: typing_extensions.Annotated[ + typing.Optional[ClientMessageLanguageChangeDetectedPhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: ClientMessageLanguageChangeDetectedType = pydantic.Field() + """ + This is the type of the message. "language-change-detected" is sent when the transcriber is automatically switched based on the detected language. + """ + + timestamp: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the timestamp of the message. + """ + + call: typing.Optional[Call] = pydantic.Field(default=None) + """ + This is the call that the message is associated with. + """ + + customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) + """ + This is the customer that the message is associated with. + """ + + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) + """ + This is the assistant that the message is associated with. + """ + + language: str = pydantic.Field() + """ + This is the language the transcriber is switched to. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ClientMessageLanguageChangeDetected, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/client_message_language_change_detected_phone_number.py b/src/vapi/types/client_message_language_change_detected_phone_number.py new file mode 100644 index 00000000..e8096f09 --- /dev/null +++ b/src/vapi/types/client_message_language_change_detected_phone_number.py @@ -0,0 +1,247 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ClientMessageLanguageChangeDetectedPhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageLanguageChangeDetectedPhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageLanguageChangeDetectedPhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageLanguageChangeDetectedPhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageLanguageChangeDetectedPhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ClientMessageLanguageChangeDetectedPhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ClientMessageLanguageChangeDetectedPhoneNumber_ByoPhoneNumber, + ClientMessageLanguageChangeDetectedPhoneNumber_Twilio, + ClientMessageLanguageChangeDetectedPhoneNumber_Vonage, + ClientMessageLanguageChangeDetectedPhoneNumber_Vapi, + ClientMessageLanguageChangeDetectedPhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/client_message_language_change_detected_type.py b/src/vapi/types/client_message_language_change_detected_type.py new file mode 100644 index 00000000..9052661d --- /dev/null +++ b/src/vapi/types/client_message_language_change_detected_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ClientMessageLanguageChangeDetectedType = typing.Union[typing.Literal["language-change-detected"], typing.Any] diff --git a/src/vapi/types/client_message_message.py b/src/vapi/types/client_message_message.py index b632c55f..51891cab 100644 --- a/src/vapi/types/client_message_message.py +++ b/src/vapi/types/client_message_message.py @@ -1,19 +1,33 @@ # This file was auto-generated by Fern from our API Definition. import typing + +from .client_message_assistant_speech import ClientMessageAssistantSpeech +from .client_message_assistant_started import ClientMessageAssistantStarted +from .client_message_call_delete_failed import ClientMessageCallDeleteFailed +from .client_message_call_deleted import ClientMessageCallDeleted +from .client_message_chat_created import ClientMessageChatCreated +from .client_message_chat_deleted import ClientMessageChatDeleted from .client_message_conversation_update import ClientMessageConversationUpdate from .client_message_hang import ClientMessageHang +from .client_message_language_change_detected import ClientMessageLanguageChangeDetected from .client_message_metadata import ClientMessageMetadata from .client_message_model_output import ClientMessageModelOutput +from .client_message_session_created import ClientMessageSessionCreated +from .client_message_session_deleted import ClientMessageSessionDeleted +from .client_message_session_updated import ClientMessageSessionUpdated from .client_message_speech_update import ClientMessageSpeechUpdate -from .client_message_transcript import ClientMessageTranscript from .client_message_tool_calls import ClientMessageToolCalls from .client_message_tool_calls_result import ClientMessageToolCallsResult +from .client_message_transcript import ClientMessageTranscript +from .client_message_transfer_update import ClientMessageTransferUpdate from .client_message_user_interrupted import ClientMessageUserInterrupted -from .client_message_language_changed import ClientMessageLanguageChanged from .client_message_voice_input import ClientMessageVoiceInput +from .client_message_workflow_node_started import ClientMessageWorkflowNodeStarted ClientMessageMessage = typing.Union[ + ClientMessageWorkflowNodeStarted, + ClientMessageAssistantStarted, ClientMessageConversationUpdate, ClientMessageHang, ClientMessageMetadata, @@ -22,7 +36,16 @@ ClientMessageTranscript, ClientMessageToolCalls, ClientMessageToolCallsResult, + ClientMessageTransferUpdate, ClientMessageUserInterrupted, - ClientMessageLanguageChanged, + ClientMessageLanguageChangeDetected, ClientMessageVoiceInput, + ClientMessageAssistantSpeech, + ClientMessageChatCreated, + ClientMessageChatDeleted, + ClientMessageSessionCreated, + ClientMessageSessionUpdated, + ClientMessageSessionDeleted, + ClientMessageCallDeleted, + ClientMessageCallDeleteFailed, ] diff --git a/src/vapi/types/client_message_metadata.py b/src/vapi/types/client_message_metadata.py index 00881601..12a8582b 100644 --- a/src/vapi/types/client_message_metadata.py +++ b/src/vapi/types/client_message_metadata.py @@ -1,17 +1,53 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +from __future__ import annotations + import typing + import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .call import Call +from .client_message_metadata_phone_number import ClientMessageMetadataPhoneNumber +from .client_message_metadata_type import ClientMessageMetadataType +from .create_customer_dto import CreateCustomerDto -class ClientMessageMetadata(UniversalBaseModel): - type: typing.Literal["metadata"] = pydantic.Field(default="metadata") +class ClientMessageMetadata(UncheckedBaseModel): + phone_number: typing_extensions.Annotated[ + typing.Optional[ClientMessageMetadataPhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: ClientMessageMetadataType = pydantic.Field() """ This is the type of the message. "metadata" is sent to forward metadata to the client. """ + timestamp: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the timestamp of the message. + """ + + call: typing.Optional[Call] = pydantic.Field(default=None) + """ + This is the call that the message is associated with. + """ + + customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) + """ + This is the customer that the message is associated with. + """ + + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) + """ + This is the assistant that the message is associated with. + """ + metadata: str = pydantic.Field() """ This is the metadata content @@ -25,3 +61,123 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ClientMessageMetadata, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/client_message_metadata_phone_number.py b/src/vapi/types/client_message_metadata_phone_number.py new file mode 100644 index 00000000..5ff8e550 --- /dev/null +++ b/src/vapi/types/client_message_metadata_phone_number.py @@ -0,0 +1,247 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ClientMessageMetadataPhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageMetadataPhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageMetadataPhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageMetadataPhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageMetadataPhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ClientMessageMetadataPhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ClientMessageMetadataPhoneNumber_ByoPhoneNumber, + ClientMessageMetadataPhoneNumber_Twilio, + ClientMessageMetadataPhoneNumber_Vonage, + ClientMessageMetadataPhoneNumber_Vapi, + ClientMessageMetadataPhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/client_message_metadata_type.py b/src/vapi/types/client_message_metadata_type.py new file mode 100644 index 00000000..0fe849f4 --- /dev/null +++ b/src/vapi/types/client_message_metadata_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ClientMessageMetadataType = typing.Union[typing.Literal["metadata"], typing.Any] diff --git a/src/vapi/types/client_message_model_output.py b/src/vapi/types/client_message_model_output.py index ca87f582..e1ac2b14 100644 --- a/src/vapi/types/client_message_model_output.py +++ b/src/vapi/types/client_message_model_output.py @@ -1,18 +1,62 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +from __future__ import annotations + import typing + import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .call import Call +from .client_message_model_output_phone_number import ClientMessageModelOutputPhoneNumber +from .client_message_model_output_type import ClientMessageModelOutputType +from .create_customer_dto import CreateCustomerDto -class ClientMessageModelOutput(UniversalBaseModel): - type: typing.Literal["model-output"] = pydantic.Field(default="model-output") +class ClientMessageModelOutput(UncheckedBaseModel): + phone_number: typing_extensions.Annotated[ + typing.Optional[ClientMessageModelOutputPhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: ClientMessageModelOutputType = pydantic.Field() """ This is the type of the message. "model-output" is sent as the model outputs tokens. """ - output: typing.Dict[str, typing.Optional[typing.Any]] = pydantic.Field() + turn_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="turnId"), + pydantic.Field( + alias="turnId", + description="This is the unique identifier for the current LLM turn. All tokens from the same\nLLM response share the same turnId. Use this to group tokens and discard on interruption.", + ), + ] = None + timestamp: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the timestamp of the message. + """ + + call: typing.Optional[Call] = pydantic.Field(default=None) + """ + This is the call that the message is associated with. + """ + + customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) + """ + This is the customer that the message is associated with. + """ + + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) + """ + This is the assistant that the message is associated with. + """ + + output: typing.Dict[str, typing.Any] = pydantic.Field() """ This is the output of the model. It can be a token or tool call. """ @@ -25,3 +69,123 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ClientMessageModelOutput, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/client_message_model_output_phone_number.py b/src/vapi/types/client_message_model_output_phone_number.py new file mode 100644 index 00000000..888caf05 --- /dev/null +++ b/src/vapi/types/client_message_model_output_phone_number.py @@ -0,0 +1,247 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ClientMessageModelOutputPhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageModelOutputPhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageModelOutputPhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageModelOutputPhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageModelOutputPhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ClientMessageModelOutputPhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ClientMessageModelOutputPhoneNumber_ByoPhoneNumber, + ClientMessageModelOutputPhoneNumber_Twilio, + ClientMessageModelOutputPhoneNumber_Vonage, + ClientMessageModelOutputPhoneNumber_Vapi, + ClientMessageModelOutputPhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/client_message_model_output_type.py b/src/vapi/types/client_message_model_output_type.py new file mode 100644 index 00000000..7bc6babb --- /dev/null +++ b/src/vapi/types/client_message_model_output_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ClientMessageModelOutputType = typing.Union[typing.Literal["model-output"], typing.Any] diff --git a/src/vapi/types/client_message_session_created.py b/src/vapi/types/client_message_session_created.py new file mode 100644 index 00000000..47c35240 --- /dev/null +++ b/src/vapi/types/client_message_session_created.py @@ -0,0 +1,184 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .call import Call +from .client_message_session_created_phone_number import ClientMessageSessionCreatedPhoneNumber +from .client_message_session_created_type import ClientMessageSessionCreatedType +from .create_customer_dto import CreateCustomerDto +from .session import Session + + +class ClientMessageSessionCreated(UncheckedBaseModel): + phone_number: typing_extensions.Annotated[ + typing.Optional[ClientMessageSessionCreatedPhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: ClientMessageSessionCreatedType = pydantic.Field() + """ + This is the type of the message. "session.created" is sent when a new session is created. + """ + + timestamp: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the timestamp of the message. + """ + + call: typing.Optional[Call] = pydantic.Field(default=None) + """ + This is the call that the message is associated with. + """ + + customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) + """ + This is the customer that the message is associated with. + """ + + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) + """ + This is the assistant that the message is associated with. + """ + + session: Session = pydantic.Field() + """ + This is the session that was created. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ClientMessageSessionCreated, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/client_message_session_created_phone_number.py b/src/vapi/types/client_message_session_created_phone_number.py new file mode 100644 index 00000000..f4134bdc --- /dev/null +++ b/src/vapi/types/client_message_session_created_phone_number.py @@ -0,0 +1,247 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ClientMessageSessionCreatedPhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageSessionCreatedPhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageSessionCreatedPhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageSessionCreatedPhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageSessionCreatedPhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ClientMessageSessionCreatedPhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ClientMessageSessionCreatedPhoneNumber_ByoPhoneNumber, + ClientMessageSessionCreatedPhoneNumber_Twilio, + ClientMessageSessionCreatedPhoneNumber_Vonage, + ClientMessageSessionCreatedPhoneNumber_Vapi, + ClientMessageSessionCreatedPhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/client_message_session_created_type.py b/src/vapi/types/client_message_session_created_type.py new file mode 100644 index 00000000..cd96cb6a --- /dev/null +++ b/src/vapi/types/client_message_session_created_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ClientMessageSessionCreatedType = typing.Union[typing.Literal["session.created"], typing.Any] diff --git a/src/vapi/types/client_message_session_deleted.py b/src/vapi/types/client_message_session_deleted.py new file mode 100644 index 00000000..10391cfe --- /dev/null +++ b/src/vapi/types/client_message_session_deleted.py @@ -0,0 +1,184 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .call import Call +from .client_message_session_deleted_phone_number import ClientMessageSessionDeletedPhoneNumber +from .client_message_session_deleted_type import ClientMessageSessionDeletedType +from .create_customer_dto import CreateCustomerDto +from .session import Session + + +class ClientMessageSessionDeleted(UncheckedBaseModel): + phone_number: typing_extensions.Annotated[ + typing.Optional[ClientMessageSessionDeletedPhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: ClientMessageSessionDeletedType = pydantic.Field() + """ + This is the type of the message. "session.deleted" is sent when a session is deleted. + """ + + timestamp: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the timestamp of the message. + """ + + call: typing.Optional[Call] = pydantic.Field(default=None) + """ + This is the call that the message is associated with. + """ + + customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) + """ + This is the customer that the message is associated with. + """ + + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) + """ + This is the assistant that the message is associated with. + """ + + session: Session = pydantic.Field() + """ + This is the session that was deleted. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ClientMessageSessionDeleted, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/client_message_session_deleted_phone_number.py b/src/vapi/types/client_message_session_deleted_phone_number.py new file mode 100644 index 00000000..5c5ca710 --- /dev/null +++ b/src/vapi/types/client_message_session_deleted_phone_number.py @@ -0,0 +1,247 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ClientMessageSessionDeletedPhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageSessionDeletedPhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageSessionDeletedPhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageSessionDeletedPhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageSessionDeletedPhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ClientMessageSessionDeletedPhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ClientMessageSessionDeletedPhoneNumber_ByoPhoneNumber, + ClientMessageSessionDeletedPhoneNumber_Twilio, + ClientMessageSessionDeletedPhoneNumber_Vonage, + ClientMessageSessionDeletedPhoneNumber_Vapi, + ClientMessageSessionDeletedPhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/client_message_session_deleted_type.py b/src/vapi/types/client_message_session_deleted_type.py new file mode 100644 index 00000000..297c4f8e --- /dev/null +++ b/src/vapi/types/client_message_session_deleted_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ClientMessageSessionDeletedType = typing.Union[typing.Literal["session.deleted"], typing.Any] diff --git a/src/vapi/types/client_message_session_updated.py b/src/vapi/types/client_message_session_updated.py new file mode 100644 index 00000000..ac4cf1c4 --- /dev/null +++ b/src/vapi/types/client_message_session_updated.py @@ -0,0 +1,184 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .call import Call +from .client_message_session_updated_phone_number import ClientMessageSessionUpdatedPhoneNumber +from .client_message_session_updated_type import ClientMessageSessionUpdatedType +from .create_customer_dto import CreateCustomerDto +from .session import Session + + +class ClientMessageSessionUpdated(UncheckedBaseModel): + phone_number: typing_extensions.Annotated[ + typing.Optional[ClientMessageSessionUpdatedPhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: ClientMessageSessionUpdatedType = pydantic.Field() + """ + This is the type of the message. "session.updated" is sent when a session is updated. + """ + + timestamp: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the timestamp of the message. + """ + + call: typing.Optional[Call] = pydantic.Field(default=None) + """ + This is the call that the message is associated with. + """ + + customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) + """ + This is the customer that the message is associated with. + """ + + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) + """ + This is the assistant that the message is associated with. + """ + + session: Session = pydantic.Field() + """ + This is the session that was updated. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ClientMessageSessionUpdated, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/client_message_session_updated_phone_number.py b/src/vapi/types/client_message_session_updated_phone_number.py new file mode 100644 index 00000000..0ca77e54 --- /dev/null +++ b/src/vapi/types/client_message_session_updated_phone_number.py @@ -0,0 +1,247 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ClientMessageSessionUpdatedPhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageSessionUpdatedPhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageSessionUpdatedPhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageSessionUpdatedPhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageSessionUpdatedPhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ClientMessageSessionUpdatedPhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ClientMessageSessionUpdatedPhoneNumber_ByoPhoneNumber, + ClientMessageSessionUpdatedPhoneNumber_Twilio, + ClientMessageSessionUpdatedPhoneNumber_Vonage, + ClientMessageSessionUpdatedPhoneNumber_Vapi, + ClientMessageSessionUpdatedPhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/client_message_session_updated_type.py b/src/vapi/types/client_message_session_updated_type.py new file mode 100644 index 00000000..2ca3e8ec --- /dev/null +++ b/src/vapi/types/client_message_session_updated_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ClientMessageSessionUpdatedType = typing.Union[typing.Literal["session.updated"], typing.Any] diff --git a/src/vapi/types/client_message_speech_update.py b/src/vapi/types/client_message_speech_update.py index 22272778..71b0ab5b 100644 --- a/src/vapi/types/client_message_speech_update.py +++ b/src/vapi/types/client_message_speech_update.py @@ -1,15 +1,31 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +from __future__ import annotations + import typing + import pydantic -from .client_message_speech_update_status import ClientMessageSpeechUpdateStatus +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .call import Call +from .client_message_speech_update_phone_number import ClientMessageSpeechUpdatePhoneNumber from .client_message_speech_update_role import ClientMessageSpeechUpdateRole -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from .client_message_speech_update_status import ClientMessageSpeechUpdateStatus +from .client_message_speech_update_type import ClientMessageSpeechUpdateType +from .create_customer_dto import CreateCustomerDto -class ClientMessageSpeechUpdate(UniversalBaseModel): - type: typing.Literal["speech-update"] = pydantic.Field(default="speech-update") +class ClientMessageSpeechUpdate(UncheckedBaseModel): + phone_number: typing_extensions.Annotated[ + typing.Optional[ClientMessageSpeechUpdatePhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: ClientMessageSpeechUpdateType = pydantic.Field() """ This is the type of the message. "speech-update" is sent whenever assistant or user start or stop speaking. """ @@ -24,6 +40,31 @@ class ClientMessageSpeechUpdate(UniversalBaseModel): This is the role which the speech update is for. """ + turn: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the turn number of the speech update (0-indexed). + """ + + timestamp: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the timestamp of the message. + """ + + call: typing.Optional[Call] = pydantic.Field(default=None) + """ + This is the call that the message is associated with. + """ + + customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) + """ + This is the customer that the message is associated with. + """ + + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) + """ + This is the assistant that the message is associated with. + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: @@ -32,3 +73,123 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ClientMessageSpeechUpdate, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/client_message_speech_update_phone_number.py b/src/vapi/types/client_message_speech_update_phone_number.py new file mode 100644 index 00000000..569f4e01 --- /dev/null +++ b/src/vapi/types/client_message_speech_update_phone_number.py @@ -0,0 +1,247 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ClientMessageSpeechUpdatePhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageSpeechUpdatePhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageSpeechUpdatePhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageSpeechUpdatePhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageSpeechUpdatePhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ClientMessageSpeechUpdatePhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ClientMessageSpeechUpdatePhoneNumber_ByoPhoneNumber, + ClientMessageSpeechUpdatePhoneNumber_Twilio, + ClientMessageSpeechUpdatePhoneNumber_Vonage, + ClientMessageSpeechUpdatePhoneNumber_Vapi, + ClientMessageSpeechUpdatePhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/client_message_speech_update_type.py b/src/vapi/types/client_message_speech_update_type.py new file mode 100644 index 00000000..f9d05ac6 --- /dev/null +++ b/src/vapi/types/client_message_speech_update_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ClientMessageSpeechUpdateType = typing.Union[typing.Literal["speech-update"], typing.Any] diff --git a/src/vapi/types/client_message_tool_calls.py b/src/vapi/types/client_message_tool_calls.py index 745532a5..3a21d772 100644 --- a/src/vapi/types/client_message_tool_calls.py +++ b/src/vapi/types/client_message_tool_calls.py @@ -1,35 +1,71 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +from __future__ import annotations + import typing + import pydantic import typing_extensions -from .client_message_tool_calls_tool_with_tool_call_list_item import ClientMessageToolCallsToolWithToolCallListItem +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .call import Call +from .client_message_tool_calls_phone_number import ClientMessageToolCallsPhoneNumber +from .client_message_tool_calls_tool_with_tool_call_list_item import ClientMessageToolCallsToolWithToolCallListItem +from .client_message_tool_calls_type import ClientMessageToolCallsType +from .create_customer_dto import CreateCustomerDto from .tool_call import ToolCall -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -class ClientMessageToolCalls(UniversalBaseModel): - type: typing.Optional[typing.Literal["tool-calls"]] = pydantic.Field(default=None) +class ClientMessageToolCalls(UncheckedBaseModel): + phone_number: typing_extensions.Annotated[ + typing.Optional[ClientMessageToolCallsPhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: typing.Optional[ClientMessageToolCallsType] = pydantic.Field(default=None) """ This is the type of the message. "tool-calls" is sent to call a tool. """ tool_with_tool_call_list: typing_extensions.Annotated[ - typing.List[ClientMessageToolCallsToolWithToolCallListItem], FieldMetadata(alias="toolWithToolCallList") - ] = pydantic.Field() + typing.List[ClientMessageToolCallsToolWithToolCallListItem], + FieldMetadata(alias="toolWithToolCallList"), + pydantic.Field( + alias="toolWithToolCallList", + description="This is the list of tools calls that the model is requesting along with the original tool configuration.", + ), + ] + timestamp: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the timestamp of the message. + """ + + call: typing.Optional[Call] = pydantic.Field(default=None) """ - This is the list of tools calls that the model is requesting along with the original tool configuration. + This is the call that the message is associated with. """ - tool_call_list: typing_extensions.Annotated[typing.List[ToolCall], FieldMetadata(alias="toolCallList")] = ( - pydantic.Field() - ) + customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) """ - This is the list of tool calls that the model is requesting. + This is the customer that the message is associated with. """ + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) + """ + This is the assistant that the message is associated with. + """ + + tool_call_list: typing_extensions.Annotated[ + typing.List[ToolCall], + FieldMetadata(alias="toolCallList"), + pydantic.Field( + alias="toolCallList", description="This is the list of tool calls that the model is requesting." + ), + ] + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: @@ -38,3 +74,123 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ClientMessageToolCalls, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/client_message_tool_calls_phone_number.py b/src/vapi/types/client_message_tool_calls_phone_number.py new file mode 100644 index 00000000..ae440f32 --- /dev/null +++ b/src/vapi/types/client_message_tool_calls_phone_number.py @@ -0,0 +1,247 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ClientMessageToolCallsPhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageToolCallsPhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageToolCallsPhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageToolCallsPhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageToolCallsPhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ClientMessageToolCallsPhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ClientMessageToolCallsPhoneNumber_ByoPhoneNumber, + ClientMessageToolCallsPhoneNumber_Twilio, + ClientMessageToolCallsPhoneNumber_Vonage, + ClientMessageToolCallsPhoneNumber_Vapi, + ClientMessageToolCallsPhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/client_message_tool_calls_result.py b/src/vapi/types/client_message_tool_calls_result.py index f9df1e0d..8555e1b9 100644 --- a/src/vapi/types/client_message_tool_calls_result.py +++ b/src/vapi/types/client_message_tool_calls_result.py @@ -1,26 +1,59 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +from __future__ import annotations + import typing + import pydantic import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.serialization import FieldMetadata -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .call import Call +from .client_message_tool_calls_result_phone_number import ClientMessageToolCallsResultPhoneNumber +from .client_message_tool_calls_result_type import ClientMessageToolCallsResultType +from .create_customer_dto import CreateCustomerDto -class ClientMessageToolCallsResult(UniversalBaseModel): - type: typing.Literal["tool-calls-result"] = pydantic.Field(default="tool-calls-result") +class ClientMessageToolCallsResult(UncheckedBaseModel): + phone_number: typing_extensions.Annotated[ + typing.Optional[ClientMessageToolCallsResultPhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: ClientMessageToolCallsResultType = pydantic.Field() """ This is the type of the message. "tool-calls-result" is sent to forward the result of a tool call to the client. """ - tool_call_result: typing_extensions.Annotated[ - typing.Dict[str, typing.Optional[typing.Any]], FieldMetadata(alias="toolCallResult") - ] = pydantic.Field() + timestamp: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the timestamp of the message. + """ + + call: typing.Optional[Call] = pydantic.Field(default=None) + """ + This is the call that the message is associated with. + """ + + customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) """ - This is the result of the tool call. + This is the customer that the message is associated with. """ + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) + """ + This is the assistant that the message is associated with. + """ + + tool_call_result: typing_extensions.Annotated[ + typing.Dict[str, typing.Any], + FieldMetadata(alias="toolCallResult"), + pydantic.Field(alias="toolCallResult", description="This is the result of the tool call."), + ] + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: @@ -29,3 +62,123 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ClientMessageToolCallsResult, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/client_message_tool_calls_result_phone_number.py b/src/vapi/types/client_message_tool_calls_result_phone_number.py new file mode 100644 index 00000000..42578d64 --- /dev/null +++ b/src/vapi/types/client_message_tool_calls_result_phone_number.py @@ -0,0 +1,247 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ClientMessageToolCallsResultPhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageToolCallsResultPhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageToolCallsResultPhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageToolCallsResultPhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageToolCallsResultPhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ClientMessageToolCallsResultPhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ClientMessageToolCallsResultPhoneNumber_ByoPhoneNumber, + ClientMessageToolCallsResultPhoneNumber_Twilio, + ClientMessageToolCallsResultPhoneNumber_Vonage, + ClientMessageToolCallsResultPhoneNumber_Vapi, + ClientMessageToolCallsResultPhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/client_message_tool_calls_result_type.py b/src/vapi/types/client_message_tool_calls_result_type.py new file mode 100644 index 00000000..cc01de8e --- /dev/null +++ b/src/vapi/types/client_message_tool_calls_result_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ClientMessageToolCallsResultType = typing.Union[typing.Literal["tool-calls-result"], typing.Any] diff --git a/src/vapi/types/client_message_tool_calls_tool_with_tool_call_list_item.py b/src/vapi/types/client_message_tool_calls_tool_with_tool_call_list_item.py index a92203ec..0f071af7 100644 --- a/src/vapi/types/client_message_tool_calls_tool_with_tool_call_list_item.py +++ b/src/vapi/types/client_message_tool_calls_tool_with_tool_call_list_item.py @@ -1,10 +1,218 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .function_tool_with_tool_call import FunctionToolWithToolCall -from .ghl_tool_with_tool_call import GhlToolWithToolCall -from .make_tool_with_tool_call import MakeToolWithToolCall -ClientMessageToolCallsToolWithToolCallListItem = typing.Union[ - FunctionToolWithToolCall, GhlToolWithToolCall, MakeToolWithToolCall +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .bash_tool_with_tool_call_messages_item import BashToolWithToolCallMessagesItem +from .bash_tool_with_tool_call_name import BashToolWithToolCallName +from .bash_tool_with_tool_call_sub_type import BashToolWithToolCallSubType +from .computer_tool_with_tool_call_messages_item import ComputerToolWithToolCallMessagesItem +from .computer_tool_with_tool_call_name import ComputerToolWithToolCallName +from .computer_tool_with_tool_call_sub_type import ComputerToolWithToolCallSubType +from .function_tool_with_tool_call_messages_item import FunctionToolWithToolCallMessagesItem +from .ghl_tool_metadata import GhlToolMetadata +from .ghl_tool_with_tool_call_messages_item import GhlToolWithToolCallMessagesItem +from .google_calendar_create_event_tool_with_tool_call_messages_item import ( + GoogleCalendarCreateEventToolWithToolCallMessagesItem, +) +from .make_tool_metadata import MakeToolMetadata +from .make_tool_with_tool_call_messages_item import MakeToolWithToolCallMessagesItem +from .open_ai_function import OpenAiFunction +from .server import Server +from .text_editor_tool_with_tool_call_messages_item import TextEditorToolWithToolCallMessagesItem +from .text_editor_tool_with_tool_call_name import TextEditorToolWithToolCallName +from .text_editor_tool_with_tool_call_sub_type import TextEditorToolWithToolCallSubType +from .tool_call import ToolCall +from .tool_parameter import ToolParameter +from .tool_rejection_plan import ToolRejectionPlan +from .variable_extraction_plan import VariableExtractionPlan + + +class ClientMessageToolCallsToolWithToolCallListItem_Function(UncheckedBaseModel): + type: typing.Literal["function"] = "function" + messages: typing.Optional[typing.List[FunctionToolWithToolCallMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + tool_call: typing_extensions.Annotated[ToolCall, FieldMetadata(alias="toolCall"), pydantic.Field(alias="toolCall")] + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageToolCallsToolWithToolCallListItem_Ghl(UncheckedBaseModel): + type: typing.Literal["ghl"] = "ghl" + messages: typing.Optional[typing.List[GhlToolWithToolCallMessagesItem]] = None + tool_call: typing_extensions.Annotated[ToolCall, FieldMetadata(alias="toolCall"), pydantic.Field(alias="toolCall")] + metadata: GhlToolMetadata + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageToolCallsToolWithToolCallListItem_Make(UncheckedBaseModel): + type: typing.Literal["make"] = "make" + messages: typing.Optional[typing.List[MakeToolWithToolCallMessagesItem]] = None + tool_call: typing_extensions.Annotated[ToolCall, FieldMetadata(alias="toolCall"), pydantic.Field(alias="toolCall")] + metadata: MakeToolMetadata + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageToolCallsToolWithToolCallListItem_Bash(UncheckedBaseModel): + type: typing.Literal["bash"] = "bash" + messages: typing.Optional[typing.List[BashToolWithToolCallMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + BashToolWithToolCallSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + tool_call: typing_extensions.Annotated[ToolCall, FieldMetadata(alias="toolCall"), pydantic.Field(alias="toolCall")] + name: BashToolWithToolCallName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageToolCallsToolWithToolCallListItem_Computer(UncheckedBaseModel): + type: typing.Literal["computer"] = "computer" + messages: typing.Optional[typing.List[ComputerToolWithToolCallMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + ComputerToolWithToolCallSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + tool_call: typing_extensions.Annotated[ToolCall, FieldMetadata(alias="toolCall"), pydantic.Field(alias="toolCall")] + name: ComputerToolWithToolCallName + display_width_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayWidthPx"), pydantic.Field(alias="displayWidthPx") + ] + display_height_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayHeightPx"), pydantic.Field(alias="displayHeightPx") + ] + display_number: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="displayNumber"), pydantic.Field(alias="displayNumber") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageToolCallsToolWithToolCallListItem_TextEditor(UncheckedBaseModel): + type: typing.Literal["textEditor"] = "textEditor" + messages: typing.Optional[typing.List[TextEditorToolWithToolCallMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + TextEditorToolWithToolCallSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + tool_call: typing_extensions.Annotated[ToolCall, FieldMetadata(alias="toolCall"), pydantic.Field(alias="toolCall")] + name: TextEditorToolWithToolCallName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageToolCallsToolWithToolCallListItem_GoogleCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["google.calendar.event.create"] = "google.calendar.event.create" + messages: typing.Optional[typing.List[GoogleCalendarCreateEventToolWithToolCallMessagesItem]] = None + tool_call: typing_extensions.Annotated[ToolCall, FieldMetadata(alias="toolCall"), pydantic.Field(alias="toolCall")] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ClientMessageToolCallsToolWithToolCallListItem = typing_extensions.Annotated[ + typing.Union[ + ClientMessageToolCallsToolWithToolCallListItem_Function, + ClientMessageToolCallsToolWithToolCallListItem_Ghl, + ClientMessageToolCallsToolWithToolCallListItem_Make, + ClientMessageToolCallsToolWithToolCallListItem_Bash, + ClientMessageToolCallsToolWithToolCallListItem_Computer, + ClientMessageToolCallsToolWithToolCallListItem_TextEditor, + ClientMessageToolCallsToolWithToolCallListItem_GoogleCalendarEventCreate, + ], + UnionMetadata(discriminant="type"), ] +update_forward_refs(ClientMessageToolCallsToolWithToolCallListItem_Function) +update_forward_refs(ClientMessageToolCallsToolWithToolCallListItem_Ghl) +update_forward_refs(ClientMessageToolCallsToolWithToolCallListItem_Make) +update_forward_refs(ClientMessageToolCallsToolWithToolCallListItem_Bash) +update_forward_refs(ClientMessageToolCallsToolWithToolCallListItem_Computer) +update_forward_refs(ClientMessageToolCallsToolWithToolCallListItem_TextEditor) +update_forward_refs(ClientMessageToolCallsToolWithToolCallListItem_GoogleCalendarEventCreate) diff --git a/src/vapi/types/client_message_tool_calls_type.py b/src/vapi/types/client_message_tool_calls_type.py new file mode 100644 index 00000000..4f7f7b02 --- /dev/null +++ b/src/vapi/types/client_message_tool_calls_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ClientMessageToolCallsType = typing.Union[typing.Literal["tool-calls"], typing.Any] diff --git a/src/vapi/types/client_message_transcript.py b/src/vapi/types/client_message_transcript.py index e685e3ad..5cf1ecd8 100644 --- a/src/vapi/types/client_message_transcript.py +++ b/src/vapi/types/client_message_transcript.py @@ -1,38 +1,93 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +from __future__ import annotations + import typing + import pydantic -from .client_message_transcript_role import ClientMessageTranscriptRole import typing_extensions -from .client_message_transcript_transcript_type import ClientMessageTranscriptTranscriptType +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.serialization import FieldMetadata -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .call import Call +from .client_message_transcript_phone_number import ClientMessageTranscriptPhoneNumber +from .client_message_transcript_role import ClientMessageTranscriptRole +from .client_message_transcript_transcript_type import ClientMessageTranscriptTranscriptType +from .client_message_transcript_type import ClientMessageTranscriptType +from .create_customer_dto import CreateCustomerDto -class ClientMessageTranscript(UniversalBaseModel): - type: typing.Literal["transcript"] = pydantic.Field(default="transcript") +class ClientMessageTranscript(UncheckedBaseModel): + phone_number: typing_extensions.Annotated[ + typing.Optional[ClientMessageTranscriptPhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: ClientMessageTranscriptType = pydantic.Field() """ This is the type of the message. "transcript" is sent as transcriber outputs partial or final transcript. """ - role: ClientMessageTranscriptRole = pydantic.Field() + timestamp: typing.Optional[float] = pydantic.Field(default=None) """ - This is the role for which the transcript is for. + This is the timestamp of the message. """ - transcript_type: typing_extensions.Annotated[ - ClientMessageTranscriptTranscriptType, FieldMetadata(alias="transcriptType") - ] = pydantic.Field() + call: typing.Optional[Call] = pydantic.Field(default=None) + """ + This is the call that the message is associated with. """ - This is the type of the transcript. + + customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) + """ + This is the customer that the message is associated with. """ + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) + """ + This is the assistant that the message is associated with. + """ + + role: ClientMessageTranscriptRole = pydantic.Field() + """ + This is the role for which the transcript is for. + """ + + transcript_type: typing_extensions.Annotated[ + ClientMessageTranscriptTranscriptType, + FieldMetadata(alias="transcriptType"), + pydantic.Field(alias="transcriptType", description="This is the type of the transcript."), + ] transcript: str = pydantic.Field() """ This is the transcript content. """ + is_filtered: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="isFiltered"), + pydantic.Field( + alias="isFiltered", description="Indicates if the transcript was filtered for security reasons." + ), + ] = None + detected_threats: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="detectedThreats"), + pydantic.Field( + alias="detectedThreats", description="List of detected security threats if the transcript was filtered." + ), + ] = None + original_transcript: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="originalTranscript"), + pydantic.Field( + alias="originalTranscript", + description="The original transcript before filtering (only included if content was filtered).", + ), + ] = None + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: @@ -41,3 +96,123 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ClientMessageTranscript, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/client_message_transcript_phone_number.py b/src/vapi/types/client_message_transcript_phone_number.py new file mode 100644 index 00000000..626c2c99 --- /dev/null +++ b/src/vapi/types/client_message_transcript_phone_number.py @@ -0,0 +1,247 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ClientMessageTranscriptPhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageTranscriptPhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageTranscriptPhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageTranscriptPhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageTranscriptPhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ClientMessageTranscriptPhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ClientMessageTranscriptPhoneNumber_ByoPhoneNumber, + ClientMessageTranscriptPhoneNumber_Twilio, + ClientMessageTranscriptPhoneNumber_Vonage, + ClientMessageTranscriptPhoneNumber_Vapi, + ClientMessageTranscriptPhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/client_message_transcript_type.py b/src/vapi/types/client_message_transcript_type.py new file mode 100644 index 00000000..fe479617 --- /dev/null +++ b/src/vapi/types/client_message_transcript_type.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ClientMessageTranscriptType = typing.Union[ + typing.Literal["transcript", 'transcript[transcriptType="final"]'], typing.Any +] diff --git a/src/vapi/types/client_message_transfer_update.py b/src/vapi/types/client_message_transfer_update.py new file mode 100644 index 00000000..eef63337 --- /dev/null +++ b/src/vapi/types/client_message_transfer_update.py @@ -0,0 +1,211 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .call import Call +from .client_message_transfer_update_destination import ClientMessageTransferUpdateDestination +from .client_message_transfer_update_phone_number import ClientMessageTransferUpdatePhoneNumber +from .client_message_transfer_update_type import ClientMessageTransferUpdateType +from .create_customer_dto import CreateCustomerDto + + +class ClientMessageTransferUpdate(UncheckedBaseModel): + phone_number: typing_extensions.Annotated[ + typing.Optional[ClientMessageTransferUpdatePhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: ClientMessageTransferUpdateType = pydantic.Field() + """ + This is the type of the message. "transfer-update" is sent whenever a transfer happens. + """ + + destination: typing.Optional[ClientMessageTransferUpdateDestination] = pydantic.Field(default=None) + """ + This is the destination of the transfer. + """ + + timestamp: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the timestamp of the message. + """ + + call: typing.Optional[Call] = pydantic.Field(default=None) + """ + This is the call that the message is associated with. + """ + + customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) + """ + This is the customer that the message is associated with. + """ + + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) + """ + This is the assistant that the message is associated with. + """ + + to_assistant: typing_extensions.Annotated[ + typing.Optional["CreateAssistantDto"], + FieldMetadata(alias="toAssistant"), + pydantic.Field( + alias="toAssistant", + description='This is the assistant that the call is being transferred to. This is only sent if `destination.type` is "assistant".', + ), + ] = None + from_assistant: typing_extensions.Annotated[ + typing.Optional["CreateAssistantDto"], + FieldMetadata(alias="fromAssistant"), + pydantic.Field( + alias="fromAssistant", + description='This is the assistant that the call is being transferred from. This is only sent if `destination.type` is "assistant".', + ), + ] = None + to_step_record: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="toStepRecord"), + pydantic.Field(alias="toStepRecord", description="This is the step that the conversation moved to."), + ] = None + from_step_record: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="fromStepRecord"), + pydantic.Field(alias="fromStepRecord", description="This is the step that the conversation moved from. ="), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ClientMessageTransferUpdate, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/client_message_transfer_update_destination.py b/src/vapi/types/client_message_transfer_update_destination.py new file mode 100644 index 00000000..1483fd10 --- /dev/null +++ b/src/vapi/types/client_message_transfer_update_destination.py @@ -0,0 +1,114 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .transfer_destination_assistant_message import TransferDestinationAssistantMessage +from .transfer_destination_number_message import TransferDestinationNumberMessage +from .transfer_destination_sip_message import TransferDestinationSipMessage +from .transfer_mode import TransferMode +from .transfer_plan import TransferPlan + + +class ClientMessageTransferUpdateDestination_Assistant(UncheckedBaseModel): + """ + This is the destination of the transfer. + """ + + type: typing.Literal["assistant"] = "assistant" + message: typing.Optional[TransferDestinationAssistantMessage] = None + transfer_mode: typing_extensions.Annotated[ + typing.Optional[TransferMode], FieldMetadata(alias="transferMode"), pydantic.Field(alias="transferMode") + ] = None + assistant_name: typing_extensions.Annotated[ + str, FieldMetadata(alias="assistantName"), pydantic.Field(alias="assistantName") + ] + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageTransferUpdateDestination_Number(UncheckedBaseModel): + """ + This is the destination of the transfer. + """ + + type: typing.Literal["number"] = "number" + message: typing.Optional[TransferDestinationNumberMessage] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: str + extension: typing.Optional[str] = None + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageTransferUpdateDestination_Sip(UncheckedBaseModel): + """ + This is the destination of the transfer. + """ + + type: typing.Literal["sip"] = "sip" + message: typing.Optional[TransferDestinationSipMessage] = None + sip_uri: typing_extensions.Annotated[str, FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri")] + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + sip_headers: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="sipHeaders"), + pydantic.Field(alias="sipHeaders"), + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ClientMessageTransferUpdateDestination = typing_extensions.Annotated[ + typing.Union[ + ClientMessageTransferUpdateDestination_Assistant, + ClientMessageTransferUpdateDestination_Number, + ClientMessageTransferUpdateDestination_Sip, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/client_message_transfer_update_phone_number.py b/src/vapi/types/client_message_transfer_update_phone_number.py new file mode 100644 index 00000000..cbcb2633 --- /dev/null +++ b/src/vapi/types/client_message_transfer_update_phone_number.py @@ -0,0 +1,247 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ClientMessageTransferUpdatePhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageTransferUpdatePhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageTransferUpdatePhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageTransferUpdatePhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageTransferUpdatePhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ClientMessageTransferUpdatePhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ClientMessageTransferUpdatePhoneNumber_ByoPhoneNumber, + ClientMessageTransferUpdatePhoneNumber_Twilio, + ClientMessageTransferUpdatePhoneNumber_Vonage, + ClientMessageTransferUpdatePhoneNumber_Vapi, + ClientMessageTransferUpdatePhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/client_message_transfer_update_type.py b/src/vapi/types/client_message_transfer_update_type.py new file mode 100644 index 00000000..683cef8f --- /dev/null +++ b/src/vapi/types/client_message_transfer_update_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ClientMessageTransferUpdateType = typing.Union[typing.Literal["transfer-update"], typing.Any] diff --git a/src/vapi/types/client_message_user_interrupted.py b/src/vapi/types/client_message_user_interrupted.py index a78bc59a..d8362875 100644 --- a/src/vapi/types/client_message_user_interrupted.py +++ b/src/vapi/types/client_message_user_interrupted.py @@ -1,17 +1,61 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +from __future__ import annotations + import typing + import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .call import Call +from .client_message_user_interrupted_phone_number import ClientMessageUserInterruptedPhoneNumber +from .client_message_user_interrupted_type import ClientMessageUserInterruptedType +from .create_customer_dto import CreateCustomerDto -class ClientMessageUserInterrupted(UniversalBaseModel): - type: typing.Literal["user-interrupted"] = pydantic.Field(default="user-interrupted") +class ClientMessageUserInterrupted(UncheckedBaseModel): + phone_number: typing_extensions.Annotated[ + typing.Optional[ClientMessageUserInterruptedPhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: ClientMessageUserInterruptedType = pydantic.Field() """ This is the type of the message. "user-interrupted" is sent when the user interrupts the assistant. """ + turn_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="turnId"), + pydantic.Field( + alias="turnId", + description="This is the turnId of the LLM response that was interrupted. Matches the turnId\non model-output messages so clients can discard the interrupted turn's tokens.", + ), + ] = None + timestamp: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the timestamp of the message. + """ + + call: typing.Optional[Call] = pydantic.Field(default=None) + """ + This is the call that the message is associated with. + """ + + customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) + """ + This is the customer that the message is associated with. + """ + + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) + """ + This is the assistant that the message is associated with. + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: @@ -20,3 +64,123 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ClientMessageUserInterrupted, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/client_message_user_interrupted_phone_number.py b/src/vapi/types/client_message_user_interrupted_phone_number.py new file mode 100644 index 00000000..0489175a --- /dev/null +++ b/src/vapi/types/client_message_user_interrupted_phone_number.py @@ -0,0 +1,247 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ClientMessageUserInterruptedPhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageUserInterruptedPhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageUserInterruptedPhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageUserInterruptedPhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageUserInterruptedPhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ClientMessageUserInterruptedPhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ClientMessageUserInterruptedPhoneNumber_ByoPhoneNumber, + ClientMessageUserInterruptedPhoneNumber_Twilio, + ClientMessageUserInterruptedPhoneNumber_Vonage, + ClientMessageUserInterruptedPhoneNumber_Vapi, + ClientMessageUserInterruptedPhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/client_message_user_interrupted_type.py b/src/vapi/types/client_message_user_interrupted_type.py new file mode 100644 index 00000000..2c47e11b --- /dev/null +++ b/src/vapi/types/client_message_user_interrupted_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ClientMessageUserInterruptedType = typing.Union[typing.Literal["user-interrupted"], typing.Any] diff --git a/src/vapi/types/client_message_voice_input.py b/src/vapi/types/client_message_voice_input.py index 21ce9120..2046c898 100644 --- a/src/vapi/types/client_message_voice_input.py +++ b/src/vapi/types/client_message_voice_input.py @@ -1,17 +1,53 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +from __future__ import annotations + import typing + import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .call import Call +from .client_message_voice_input_phone_number import ClientMessageVoiceInputPhoneNumber +from .client_message_voice_input_type import ClientMessageVoiceInputType +from .create_customer_dto import CreateCustomerDto -class ClientMessageVoiceInput(UniversalBaseModel): - type: typing.Literal["voice-input"] = pydantic.Field(default="voice-input") +class ClientMessageVoiceInput(UncheckedBaseModel): + phone_number: typing_extensions.Annotated[ + typing.Optional[ClientMessageVoiceInputPhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: ClientMessageVoiceInputType = pydantic.Field() """ This is the type of the message. "voice-input" is sent when a generation is requested from voice provider. """ + timestamp: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the timestamp of the message. + """ + + call: typing.Optional[Call] = pydantic.Field(default=None) + """ + This is the call that the message is associated with. + """ + + customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) + """ + This is the customer that the message is associated with. + """ + + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) + """ + This is the assistant that the message is associated with. + """ + input: str = pydantic.Field() """ This is the voice input content @@ -25,3 +61,123 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ClientMessageVoiceInput, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/client_message_voice_input_phone_number.py b/src/vapi/types/client_message_voice_input_phone_number.py new file mode 100644 index 00000000..c2a24b46 --- /dev/null +++ b/src/vapi/types/client_message_voice_input_phone_number.py @@ -0,0 +1,247 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ClientMessageVoiceInputPhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageVoiceInputPhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageVoiceInputPhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageVoiceInputPhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageVoiceInputPhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ClientMessageVoiceInputPhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ClientMessageVoiceInputPhoneNumber_ByoPhoneNumber, + ClientMessageVoiceInputPhoneNumber_Twilio, + ClientMessageVoiceInputPhoneNumber_Vonage, + ClientMessageVoiceInputPhoneNumber_Vapi, + ClientMessageVoiceInputPhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/client_message_voice_input_type.py b/src/vapi/types/client_message_voice_input_type.py new file mode 100644 index 00000000..75357fb3 --- /dev/null +++ b/src/vapi/types/client_message_voice_input_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ClientMessageVoiceInputType = typing.Union[typing.Literal["voice-input"], typing.Any] diff --git a/src/vapi/types/client_message_workflow_node_started.py b/src/vapi/types/client_message_workflow_node_started.py new file mode 100644 index 00000000..b9e3d4f5 --- /dev/null +++ b/src/vapi/types/client_message_workflow_node_started.py @@ -0,0 +1,183 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .call import Call +from .client_message_workflow_node_started_phone_number import ClientMessageWorkflowNodeStartedPhoneNumber +from .client_message_workflow_node_started_type import ClientMessageWorkflowNodeStartedType +from .create_customer_dto import CreateCustomerDto + + +class ClientMessageWorkflowNodeStarted(UncheckedBaseModel): + phone_number: typing_extensions.Annotated[ + typing.Optional[ClientMessageWorkflowNodeStartedPhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: ClientMessageWorkflowNodeStartedType = pydantic.Field() + """ + This is the type of the message. "workflow.node.started" is sent when the active node changes. + """ + + timestamp: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the timestamp of the message. + """ + + call: typing.Optional[Call] = pydantic.Field(default=None) + """ + This is the call that the message is associated with. + """ + + customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) + """ + This is the customer that the message is associated with. + """ + + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) + """ + This is the assistant that the message is associated with. + """ + + node: typing.Dict[str, typing.Any] = pydantic.Field() + """ + This is the active node. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ClientMessageWorkflowNodeStarted, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/client_message_workflow_node_started_phone_number.py b/src/vapi/types/client_message_workflow_node_started_phone_number.py new file mode 100644 index 00000000..106d960b --- /dev/null +++ b/src/vapi/types/client_message_workflow_node_started_phone_number.py @@ -0,0 +1,247 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ClientMessageWorkflowNodeStartedPhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageWorkflowNodeStartedPhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageWorkflowNodeStartedPhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageWorkflowNodeStartedPhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ClientMessageWorkflowNodeStartedPhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ClientMessageWorkflowNodeStartedPhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ClientMessageWorkflowNodeStartedPhoneNumber_ByoPhoneNumber, + ClientMessageWorkflowNodeStartedPhoneNumber_Twilio, + ClientMessageWorkflowNodeStartedPhoneNumber_Vonage, + ClientMessageWorkflowNodeStartedPhoneNumber_Vapi, + ClientMessageWorkflowNodeStartedPhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/client_message_workflow_node_started_type.py b/src/vapi/types/client_message_workflow_node_started_type.py new file mode 100644 index 00000000..1271cf75 --- /dev/null +++ b/src/vapi/types/client_message_workflow_node_started_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ClientMessageWorkflowNodeStartedType = typing.Union[typing.Literal["workflow.node.started"], typing.Any] diff --git a/src/vapi/types/clone_voice_dto.py b/src/vapi/types/clone_voice_dto.py index c6b7df3a..6f1238c8 100644 --- a/src/vapi/types/clone_voice_dto.py +++ b/src/vapi/types/clone_voice_dto.py @@ -1,12 +1,13 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import pydantic import typing + +import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel -class CloneVoiceDto(UniversalBaseModel): +class CloneVoiceDto(UncheckedBaseModel): name: str = pydantic.Field() """ This is the name of the cloned voice in the provider account. diff --git a/src/vapi/types/cloudflare_credential.py b/src/vapi/types/cloudflare_credential.py new file mode 100644 index 00000000..f5cd15ec --- /dev/null +++ b/src/vapi/types/cloudflare_credential.py @@ -0,0 +1,91 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .cloudflare_credential_provider import CloudflareCredentialProvider +from .cloudflare_r_2_bucket_plan import CloudflareR2BucketPlan + + +class CloudflareCredential(UncheckedBaseModel): + provider: CloudflareCredentialProvider = pydantic.Field() + """ + Credential provider. Only allowed value is cloudflare + """ + + account_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="accountId"), + pydantic.Field(alias="accountId", description="Cloudflare Account Id."), + ] = None + api_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="Cloudflare API Key / Token."), + ] = None + account_email: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="accountEmail"), + pydantic.Field(alias="accountEmail", description="Cloudflare Account Email."), + ] = None + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="fallbackIndex"), + pydantic.Field( + alias="fallbackIndex", + description="This is the order in which this storage provider is tried during upload retries. Lower numbers are tried first in increasing order.", + ), + ] = None + id: str = pydantic.Field() + """ + This is the unique identifier for the credential. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + bucket_plan: typing_extensions.Annotated[ + typing.Optional[CloudflareR2BucketPlan], + FieldMetadata(alias="bucketPlan"), + pydantic.Field( + alias="bucketPlan", description="This is the bucket plan that can be provided to store call artifacts in R2" + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/cloudflare_credential_provider.py b/src/vapi/types/cloudflare_credential_provider.py new file mode 100644 index 00000000..65f751d6 --- /dev/null +++ b/src/vapi/types/cloudflare_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CloudflareCredentialProvider = typing.Union[typing.Literal["cloudflare"], typing.Any] diff --git a/src/vapi/types/cloudflare_r_2_bucket_plan.py b/src/vapi/types/cloudflare_r_2_bucket_plan.py new file mode 100644 index 00000000..d59f3003 --- /dev/null +++ b/src/vapi/types/cloudflare_r_2_bucket_plan.py @@ -0,0 +1,53 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class CloudflareR2BucketPlan(UncheckedBaseModel): + access_key_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="accessKeyId"), + pydantic.Field(alias="accessKeyId", description="Cloudflare R2 Access key ID."), + ] = None + secret_access_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="secretAccessKey"), + pydantic.Field( + alias="secretAccessKey", description="Cloudflare R2 access key secret. This is not returned in the API." + ), + ] = None + url: typing.Optional[str] = pydantic.Field(default=None) + """ + Cloudflare R2 base url. + """ + + name: str = pydantic.Field() + """ + This is the name of the bucket. + """ + + path: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the path where call artifacts will be stored. + + Usage: + - To store call artifacts in a specific folder, set this to the full path. Eg. "/folder-name1/folder-name2". + - To store call artifacts in the root of the bucket, leave this blank. + + @default "/" + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/code_tool.py b/src/vapi/types/code_tool.py new file mode 100644 index 00000000..16ec741c --- /dev/null +++ b/src/vapi/types/code_tool.py @@ -0,0 +1,132 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .code_tool_environment_variable import CodeToolEnvironmentVariable +from .code_tool_messages_item import CodeToolMessagesItem +from .open_ai_function import OpenAiFunction +from .server import Server +from .tool_rejection_plan import ToolRejectionPlan +from .variable_extraction_plan import VariableExtractionPlan + + +class CodeTool(UncheckedBaseModel): + messages: typing.Optional[typing.List[CodeToolMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + async_: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="async"), + pydantic.Field( + alias="async", + description="This determines if the tool is async.\n\n If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.\n\n If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.\n\n Defaults to synchronous (`false`).", + ), + ] = None + server: typing.Optional[Server] = pydantic.Field(default=None) + """ + + This is the server where a `tool-calls` webhook will be sent. + + Notes: + - Webhook is sent to this server when a tool call is made. + - Webhook contains the call, assistant, and phone number objects. + - Webhook contains the variables set on the assistant. + - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}. + - Webhook expects a response with tool call result. + """ + + code: str = pydantic.Field() + """ + TypeScript code to execute when the tool is called + """ + + environment_variables: typing_extensions.Annotated[ + typing.Optional[typing.List[CodeToolEnvironmentVariable]], + FieldMetadata(alias="environmentVariables"), + pydantic.Field( + alias="environmentVariables", description="Environment variables available in code via `env` object" + ), + ] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="timeoutSeconds"), + pydantic.Field( + alias="timeoutSeconds", + description="This is the timeout in seconds for the code execution. Defaults to 10 seconds.\nMaximum is 30 seconds to prevent abuse.\n\n@default 10", + ), + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="credentialId"), + pydantic.Field(alias="credentialId", description="Credential ID containing the Val Town API key"), + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan", description="Plan to extract variables from the tool response"), + ] = None + id: str = pydantic.Field() + """ + This is the unique identifier for the tool. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the organization that this tool belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the tool was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", description="This is the ISO 8601 date-time string of when the tool was last updated." + ), + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + function: typing.Optional[OpenAiFunction] = pydantic.Field(default=None) + """ + This is the function definition of the tool. + + For the Code tool, this defines the name, description, and parameters that the model + will use to understand when and how to call this tool. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(CodeTool) diff --git a/src/vapi/types/code_tool_environment_variable.py b/src/vapi/types/code_tool_environment_variable.py new file mode 100644 index 00000000..92d91b7e --- /dev/null +++ b/src/vapi/types/code_tool_environment_variable.py @@ -0,0 +1,28 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class CodeToolEnvironmentVariable(UncheckedBaseModel): + name: str = pydantic.Field() + """ + Name of the environment variable + """ + + value: str = pydantic.Field() + """ + Value of the environment variable. Supports Liquid templates. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/code_tool_messages_item.py b/src/vapi/types/code_tool_messages_item.py new file mode 100644 index 00000000..e7738826 --- /dev/null +++ b/src/vapi/types/code_tool_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class CodeToolMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CodeToolMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CodeToolMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CodeToolMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CodeToolMessagesItem = typing_extensions.Annotated[ + typing.Union[ + CodeToolMessagesItem_RequestStart, + CodeToolMessagesItem_RequestComplete, + CodeToolMessagesItem_RequestFailed, + CodeToolMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/compliance.py b/src/vapi/types/compliance.py new file mode 100644 index 00000000..04f76356 --- /dev/null +++ b/src/vapi/types/compliance.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .recording_consent import RecordingConsent + + +class Compliance(UncheckedBaseModel): + recording_consent: typing_extensions.Annotated[ + typing.Optional[RecordingConsent], + FieldMetadata(alias="recordingConsent"), + pydantic.Field( + alias="recordingConsent", + description="This is the recording consent of the call. Configure in `assistant.compliancePlan.recordingConsentPlan`.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/compliance_override.py b/src/vapi/types/compliance_override.py new file mode 100644 index 00000000..373a1c98 --- /dev/null +++ b/src/vapi/types/compliance_override.py @@ -0,0 +1,29 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class ComplianceOverride(UncheckedBaseModel): + force_store_on_hipaa_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="forceStoreOnHipaaEnabled"), + pydantic.Field( + alias="forceStoreOnHipaaEnabled", + description="Force storage for this output under HIPAA. Only enable if output contains no sensitive data.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/compliance_plan.py b/src/vapi/types/compliance_plan.py new file mode 100644 index 00000000..ad3dfb53 --- /dev/null +++ b/src/vapi/types/compliance_plan.py @@ -0,0 +1,52 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .compliance_plan_recording_consent_plan import CompliancePlanRecordingConsentPlan +from .security_filter_plan import SecurityFilterPlan + + +class CompliancePlan(UncheckedBaseModel): + hipaa_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="hipaaEnabled"), + pydantic.Field( + alias="hipaaEnabled", + description="When this is enabled, logs, recordings, and transcriptions will be stored in HIPAA-compliant storage. Defaults to false. Only HIPAA-compliant providers will be available for LLM, Voice, and Transcriber respectively. This setting is only honored if the organization is on an Enterprise subscription or has purchased the HIPAA add-on.", + ), + ] = None + pci_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="pciEnabled"), + pydantic.Field( + alias="pciEnabled", + description="When this is enabled, the user will be restricted to use PCI-compliant providers, and no logs or transcripts are stored.\nAt the end of the call, you will receive an end-of-call-report message to store on your server. Defaults to false.", + ), + ] = None + security_filter_plan: typing_extensions.Annotated[ + typing.Optional[SecurityFilterPlan], + FieldMetadata(alias="securityFilterPlan"), + pydantic.Field( + alias="securityFilterPlan", + description="This is the security filter plan for the assistant. It allows filtering of transcripts for security threats before sending to LLM.", + ), + ] = None + recording_consent_plan: typing_extensions.Annotated[ + typing.Optional[CompliancePlanRecordingConsentPlan], + FieldMetadata(alias="recordingConsentPlan"), + pydantic.Field(alias="recordingConsentPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/compliance_plan_recording_consent_plan.py b/src/vapi/types/compliance_plan_recording_consent_plan.py new file mode 100644 index 00000000..5227faf1 --- /dev/null +++ b/src/vapi/types/compliance_plan_recording_consent_plan.py @@ -0,0 +1,60 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .recording_consent_plan_stay_on_line_voice import RecordingConsentPlanStayOnLineVoice +from .recording_consent_plan_verbal_voice import RecordingConsentPlanVerbalVoice + + +class CompliancePlanRecordingConsentPlan_StayOnLine(UncheckedBaseModel): + type: typing.Literal["stay-on-line"] = "stay-on-line" + message: str + voice: typing.Optional[RecordingConsentPlanStayOnLineVoice] = None + wait_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="waitSeconds"), pydantic.Field(alias="waitSeconds") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CompliancePlanRecordingConsentPlan_Verbal(UncheckedBaseModel): + type: typing.Literal["verbal"] = "verbal" + message: str + voice: typing.Optional[RecordingConsentPlanVerbalVoice] = None + decline_tool: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="declineTool"), + pydantic.Field(alias="declineTool"), + ] = None + decline_tool_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="declineToolId"), pydantic.Field(alias="declineToolId") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CompliancePlanRecordingConsentPlan = typing_extensions.Annotated[ + typing.Union[CompliancePlanRecordingConsentPlan_StayOnLine, CompliancePlanRecordingConsentPlan_Verbal], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/computer_tool.py b/src/vapi/types/computer_tool.py new file mode 100644 index 00000000..6cfa96a1 --- /dev/null +++ b/src/vapi/types/computer_tool.py @@ -0,0 +1,111 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .computer_tool_messages_item import ComputerToolMessagesItem +from .computer_tool_name import ComputerToolName +from .computer_tool_sub_type import ComputerToolSubType +from .server import Server +from .tool_rejection_plan import ToolRejectionPlan + + +class ComputerTool(UncheckedBaseModel): + messages: typing.Optional[typing.List[ComputerToolMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + sub_type: typing_extensions.Annotated[ + ComputerToolSubType, + FieldMetadata(alias="subType"), + pydantic.Field(alias="subType", description="The sub type of tool."), + ] + server: typing.Optional[Server] = pydantic.Field(default=None) + """ + + This is the server where a `tool-calls` webhook will be sent. + + Notes: + - Webhook is sent to this server when a tool call is made. + - Webhook contains the call, assistant, and phone number objects. + - Webhook contains the variables set on the assistant. + - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}. + - Webhook expects a response with tool call result. + """ + + id: str = pydantic.Field() + """ + This is the unique identifier for the tool. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the organization that this tool belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the tool was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", description="This is the ISO 8601 date-time string of when the tool was last updated." + ), + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + name: ComputerToolName = pydantic.Field() + """ + The name of the tool, fixed to 'computer' + """ + + display_width_px: typing_extensions.Annotated[ + float, + FieldMetadata(alias="displayWidthPx"), + pydantic.Field(alias="displayWidthPx", description="The display width in pixels"), + ] + display_height_px: typing_extensions.Annotated[ + float, + FieldMetadata(alias="displayHeightPx"), + pydantic.Field(alias="displayHeightPx", description="The display height in pixels"), + ] + display_number: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="displayNumber"), + pydantic.Field(alias="displayNumber", description="Optional display number"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(ComputerTool) diff --git a/src/vapi/types/computer_tool_messages_item.py b/src/vapi/types/computer_tool_messages_item.py new file mode 100644 index 00000000..6376e76a --- /dev/null +++ b/src/vapi/types/computer_tool_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class ComputerToolMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ComputerToolMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ComputerToolMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ComputerToolMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ComputerToolMessagesItem = typing_extensions.Annotated[ + typing.Union[ + ComputerToolMessagesItem_RequestStart, + ComputerToolMessagesItem_RequestComplete, + ComputerToolMessagesItem_RequestFailed, + ComputerToolMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/computer_tool_name.py b/src/vapi/types/computer_tool_name.py new file mode 100644 index 00000000..2ad1b1a7 --- /dev/null +++ b/src/vapi/types/computer_tool_name.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ComputerToolName = typing.Union[typing.Literal["computer"], typing.Any] diff --git a/src/vapi/types/computer_tool_sub_type.py b/src/vapi/types/computer_tool_sub_type.py new file mode 100644 index 00000000..d1687a7d --- /dev/null +++ b/src/vapi/types/computer_tool_sub_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ComputerToolSubType = typing.Union[typing.Literal["computer_20241022"], typing.Any] diff --git a/src/vapi/types/computer_tool_with_tool_call.py b/src/vapi/types/computer_tool_with_tool_call.py new file mode 100644 index 00000000..9bf20f8e --- /dev/null +++ b/src/vapi/types/computer_tool_with_tool_call.py @@ -0,0 +1,86 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .computer_tool_with_tool_call_messages_item import ComputerToolWithToolCallMessagesItem +from .computer_tool_with_tool_call_name import ComputerToolWithToolCallName +from .computer_tool_with_tool_call_sub_type import ComputerToolWithToolCallSubType +from .server import Server +from .tool_call import ToolCall +from .tool_rejection_plan import ToolRejectionPlan + + +class ComputerToolWithToolCall(UncheckedBaseModel): + messages: typing.Optional[typing.List[ComputerToolWithToolCallMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + sub_type: typing_extensions.Annotated[ + ComputerToolWithToolCallSubType, + FieldMetadata(alias="subType"), + pydantic.Field(alias="subType", description="The sub type of tool."), + ] + server: typing.Optional[Server] = pydantic.Field(default=None) + """ + + This is the server where a `tool-calls` webhook will be sent. + + Notes: + - Webhook is sent to this server when a tool call is made. + - Webhook contains the call, assistant, and phone number objects. + - Webhook contains the variables set on the assistant. + - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}. + - Webhook expects a response with tool call result. + """ + + tool_call: typing_extensions.Annotated[ToolCall, FieldMetadata(alias="toolCall"), pydantic.Field(alias="toolCall")] + name: ComputerToolWithToolCallName = pydantic.Field() + """ + The name of the tool, fixed to 'computer' + """ + + display_width_px: typing_extensions.Annotated[ + float, + FieldMetadata(alias="displayWidthPx"), + pydantic.Field(alias="displayWidthPx", description="The display width in pixels"), + ] + display_height_px: typing_extensions.Annotated[ + float, + FieldMetadata(alias="displayHeightPx"), + pydantic.Field(alias="displayHeightPx", description="The display height in pixels"), + ] + display_number: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="displayNumber"), + pydantic.Field(alias="displayNumber", description="Optional display number"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(ComputerToolWithToolCall) diff --git a/src/vapi/types/computer_tool_with_tool_call_messages_item.py b/src/vapi/types/computer_tool_with_tool_call_messages_item.py new file mode 100644 index 00000000..cb85f2e9 --- /dev/null +++ b/src/vapi/types/computer_tool_with_tool_call_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class ComputerToolWithToolCallMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ComputerToolWithToolCallMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ComputerToolWithToolCallMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ComputerToolWithToolCallMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ComputerToolWithToolCallMessagesItem = typing_extensions.Annotated[ + typing.Union[ + ComputerToolWithToolCallMessagesItem_RequestStart, + ComputerToolWithToolCallMessagesItem_RequestComplete, + ComputerToolWithToolCallMessagesItem_RequestFailed, + ComputerToolWithToolCallMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/computer_tool_with_tool_call_name.py b/src/vapi/types/computer_tool_with_tool_call_name.py new file mode 100644 index 00000000..bd650952 --- /dev/null +++ b/src/vapi/types/computer_tool_with_tool_call_name.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ComputerToolWithToolCallName = typing.Union[typing.Literal["computer"], typing.Any] diff --git a/src/vapi/types/computer_tool_with_tool_call_sub_type.py b/src/vapi/types/computer_tool_with_tool_call_sub_type.py new file mode 100644 index 00000000..9c3074ac --- /dev/null +++ b/src/vapi/types/computer_tool_with_tool_call_sub_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ComputerToolWithToolCallSubType = typing.Union[typing.Literal["computer_20241022"], typing.Any] diff --git a/src/vapi/types/condition.py b/src/vapi/types/condition.py index dfe43897..930ea4ac 100644 --- a/src/vapi/types/condition.py +++ b/src/vapi/types/condition.py @@ -1,18 +1,14 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +import typing + import pydantic -from .condition_operator import ConditionOperator from ..core.pydantic_utilities import IS_PYDANTIC_V2 -import typing +from ..core.unchecked_base_model import UncheckedBaseModel +from .condition_operator import ConditionOperator -class Condition(UniversalBaseModel): - value: str = pydantic.Field() - """ - This is the value you want to compare against the parameter. - """ - +class Condition(UncheckedBaseModel): operator: ConditionOperator = pydantic.Field() """ This is the operator you want to use to compare the parameter and value. @@ -23,6 +19,11 @@ class Condition(UniversalBaseModel): This is the name of the parameter that you want to check. """ + value: str = pydantic.Field() + """ + This is the value you want to compare against the parameter. + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/vapi/types/context_engineering_plan_all.py b/src/vapi/types/context_engineering_plan_all.py new file mode 100644 index 00000000..317136bd --- /dev/null +++ b/src/vapi/types/context_engineering_plan_all.py @@ -0,0 +1,18 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class ContextEngineeringPlanAll(UncheckedBaseModel): + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/context_engineering_plan_last_n_messages.py b/src/vapi/types/context_engineering_plan_last_n_messages.py new file mode 100644 index 00000000..c82ee92f --- /dev/null +++ b/src/vapi/types/context_engineering_plan_last_n_messages.py @@ -0,0 +1,29 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class ContextEngineeringPlanLastNMessages(UncheckedBaseModel): + max_messages: typing_extensions.Annotated[ + float, + FieldMetadata(alias="maxMessages"), + pydantic.Field( + alias="maxMessages", + description="This is the maximum number of messages to include in the context engineering plan.", + ), + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/context_engineering_plan_none.py b/src/vapi/types/context_engineering_plan_none.py new file mode 100644 index 00000000..79cc8c20 --- /dev/null +++ b/src/vapi/types/context_engineering_plan_none.py @@ -0,0 +1,18 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class ContextEngineeringPlanNone(UncheckedBaseModel): + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/context_engineering_plan_user_and_assistant_messages.py b/src/vapi/types/context_engineering_plan_user_and_assistant_messages.py new file mode 100644 index 00000000..8110f585 --- /dev/null +++ b/src/vapi/types/context_engineering_plan_user_and_assistant_messages.py @@ -0,0 +1,18 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class ContextEngineeringPlanUserAndAssistantMessages(UncheckedBaseModel): + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/conversation_block.py b/src/vapi/types/conversation_block.py deleted file mode 100644 index 4e11f100..00000000 --- a/src/vapi/types/conversation_block.py +++ /dev/null @@ -1,109 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from ..core.pydantic_utilities import UniversalBaseModel -import typing -from .conversation_block_messages_item import ConversationBlockMessagesItem -import pydantic -import typing_extensions -from .json_schema import JsonSchema -from ..core.serialization import FieldMetadata -import datetime as dt -from ..core.pydantic_utilities import IS_PYDANTIC_V2 - - -class ConversationBlock(UniversalBaseModel): - messages: typing.Optional[typing.List[ConversationBlockMessagesItem]] = pydantic.Field(default=None) - """ - These are the pre-configured messages that will be spoken to the user while the block is running. - """ - - input_schema: typing_extensions.Annotated[typing.Optional[JsonSchema], FieldMetadata(alias="inputSchema")] = ( - pydantic.Field(default=None) - ) - """ - This is the input schema for the block. This is the input the block needs to run. It's given to the block as `steps[0].input` - - These are accessible as variables: - - - ({{input.propertyName}}) in context of the block execution (step) - - ({{stepName.input.propertyName}}) in context of the workflow - """ - - output_schema: typing_extensions.Annotated[typing.Optional[JsonSchema], FieldMetadata(alias="outputSchema")] = ( - pydantic.Field(default=None) - ) - """ - This is the output schema for the block. This is the output the block will return to the workflow (`{{stepName.output}}`). - - These are accessible as variables: - - - ({{output.propertyName}}) in context of the block execution (step) - - ({{stepName.output.propertyName}}) in context of the workflow (read caveat #1) - - ({{blockName.output.propertyName}}) in context of the workflow (read caveat #2) - - Caveats: - - 1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.output.propertyName}} will reference the latest usage of the step. - 2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.output.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow with steps. - """ - - type: typing.Literal["conversation"] = "conversation" - id: str = pydantic.Field() - """ - This is the unique identifier for the block. - """ - - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field() - """ - This is the unique identifier for the organization that this block belongs to. - """ - - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the block was created. - """ - - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the block was last updated. - """ - - name: typing.Optional[str] = pydantic.Field(default=None) - """ - This is the name of the block. This is just for your reference. - """ - - instruction: str = pydantic.Field() - """ - This is the instruction to the model. - - You can reference any variable in the context of the current block execution (step): - - - "{{input.your-property-name}}" for the current step's input - - "{{your-step-name.output.your-property-name}}" for another step's output (in the same workflow; read caveat #1) - - "{{your-step-name.input.your-property-name}}" for another step's input (in the same workflow; read caveat #1) - - "{{your-block-name.output.your-property-name}}" for another block's output (in the same workflow; read caveat #2) - - "{{your-block-name.input.your-property-name}}" for another block's input (in the same workflow; read caveat #2) - - "{{workflow.input.your-property-name}}" for the current workflow's input - - "{{global.your-property-name}}" for the global context - - This can be as simple or as complex as you want it to be. - - - "say hello and ask the user about their day!" - - "collect the user's first and last name" - - "user is {{input.firstName}} {{input.lastName}}. their age is {{input.age}}. ask them about their salary and if they might be interested in buying a house. we offer {{input.offer}}" - - Caveats: - - 1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.output/input.propertyName}} will reference the latest usage of the step. - 2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.output/input.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow with steps. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/vapi/types/conversation_block_messages_item.py b/src/vapi/types/conversation_block_messages_item.py deleted file mode 100644 index 9faecc43..00000000 --- a/src/vapi/types/conversation_block_messages_item.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from .block_start_message import BlockStartMessage -from .block_complete_message import BlockCompleteMessage - -ConversationBlockMessagesItem = typing.Union[BlockStartMessage, BlockCompleteMessage] diff --git a/src/vapi/types/conversation_node.py b/src/vapi/types/conversation_node.py new file mode 100644 index 00000000..511f8946 --- /dev/null +++ b/src/vapi/types/conversation_node.py @@ -0,0 +1,92 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .conversation_node_model import ConversationNodeModel +from .conversation_node_tools_item import ConversationNodeToolsItem +from .conversation_node_transcriber import ConversationNodeTranscriber +from .conversation_node_voice import ConversationNodeVoice +from .global_node_plan import GlobalNodePlan +from .variable_extraction_plan import VariableExtractionPlan + + +class ConversationNode(UncheckedBaseModel): + model: typing.Optional[ConversationNodeModel] = pydantic.Field(default=None) + """ + This is the model for the node. + + This overrides `workflow.model`. + """ + + transcriber: typing.Optional[ConversationNodeTranscriber] = pydantic.Field(default=None) + """ + This is the transcriber for the node. + + This overrides `workflow.transcriber`. + """ + + voice: typing.Optional[ConversationNodeVoice] = pydantic.Field(default=None) + """ + This is the voice for the node. + + This overrides `workflow.voice`. + """ + + tools: typing.Optional[typing.List[ConversationNodeToolsItem]] = pydantic.Field(default=None) + """ + These are the tools that the conversation node can use during the call. To use existing tools, use `toolIds`. + + Both `tools` and `toolIds` can be used together. + """ + + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="toolIds"), + pydantic.Field( + alias="toolIds", + description="These are the tools that the conversation node can use during the call. To use transient tools, use `tools`.\n\nBoth `tools` and `toolIds` can be used together.", + ), + ] = None + prompt: typing.Optional[str] = None + global_node_plan: typing_extensions.Annotated[ + typing.Optional[GlobalNodePlan], + FieldMetadata(alias="globalNodePlan"), + pydantic.Field(alias="globalNodePlan", description="This is the plan for the global node."), + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field( + alias="variableExtractionPlan", + description='This is the plan that controls the variable extraction from the user\'s responses.\n\nUsage:\nUse `schema` to specify what you want to extract from the user\'s responses.\n```json\n{\n "schema": {\n "type": "object",\n "properties": {\n "user": {\n "type": "object",\n "properties": {\n "name": {\n "type": "string"\n },\n "age": {\n "type": "number"\n }\n }\n }\n }\n }\n}\n```\n\nThis will be extracted as `{{ user.name }}` and `{{ user.age }}` respectively.\n\n(Optional) Use `aliases` to create new variables.\n\n```json\n{\n "aliases": [\n {\n "key": "userAge",\n "value": "{{user.age}}"\n },\n {\n "key": "userName",\n "value": "{{user.name}}"\n }\n ]\n}\n```\n\nThis will be extracted as `{{ userAge }}` and `{{ userName }}` respectively.\n\nNote: The `schema` field is required for Conversation nodes if you want to extract variables from the user\'s responses. `aliases` is just a convenience.', + ), + ] = None + name: str + is_start: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="isStart"), + pydantic.Field(alias="isStart", description="This is whether or not the node is the start of the workflow."), + ] = None + metadata: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) + """ + This is for metadata you want to store on the task. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(ConversationNode) diff --git a/src/vapi/types/conversation_node_model.py b/src/vapi/types/conversation_node_model.py new file mode 100644 index 00000000..419e725c --- /dev/null +++ b/src/vapi/types/conversation_node_model.py @@ -0,0 +1,161 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .anthropic_thinking_config import AnthropicThinkingConfig +from .workflow_anthropic_bedrock_model_model import WorkflowAnthropicBedrockModelModel +from .workflow_anthropic_model_model import WorkflowAnthropicModelModel +from .workflow_custom_model_metadata_send_mode import WorkflowCustomModelMetadataSendMode +from .workflow_google_model_model import WorkflowGoogleModelModel +from .workflow_open_ai_model_model import WorkflowOpenAiModelModel + + +class ConversationNodeModel_Openai(UncheckedBaseModel): + """ + This is the model for the node. + + This overrides `workflow.model`. + """ + + provider: typing.Literal["openai"] = "openai" + model: WorkflowOpenAiModelModel + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeModel_Anthropic(UncheckedBaseModel): + """ + This is the model for the node. + + This overrides `workflow.model`. + """ + + provider: typing.Literal["anthropic"] = "anthropic" + model: WorkflowAnthropicModelModel + thinking: typing.Optional[AnthropicThinkingConfig] = None + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeModel_AnthropicBedrock(UncheckedBaseModel): + """ + This is the model for the node. + + This overrides `workflow.model`. + """ + + provider: typing.Literal["anthropic-bedrock"] = "anthropic-bedrock" + model: WorkflowAnthropicBedrockModelModel + thinking: typing.Optional[AnthropicThinkingConfig] = None + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeModel_Google(UncheckedBaseModel): + """ + This is the model for the node. + + This overrides `workflow.model`. + """ + + provider: typing.Literal["google"] = "google" + model: WorkflowGoogleModelModel + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeModel_CustomLlm(UncheckedBaseModel): + """ + This is the model for the node. + + This overrides `workflow.model`. + """ + + provider: typing.Literal["custom-llm"] = "custom-llm" + metadata_send_mode: typing_extensions.Annotated[ + typing.Optional[WorkflowCustomModelMetadataSendMode], + FieldMetadata(alias="metadataSendMode"), + pydantic.Field(alias="metadataSendMode"), + ] = None + url: str + headers: typing.Optional[typing.Dict[str, typing.Any]] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + model: str + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ConversationNodeModel = typing_extensions.Annotated[ + typing.Union[ + ConversationNodeModel_Openai, + ConversationNodeModel_Anthropic, + ConversationNodeModel_AnthropicBedrock, + ConversationNodeModel_Google, + ConversationNodeModel_CustomLlm, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/conversation_node_tools_item.py b/src/vapi/types/conversation_node_tools_item.py new file mode 100644 index 00000000..95115148 --- /dev/null +++ b/src/vapi/types/conversation_node_tools_item.py @@ -0,0 +1,732 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .backoff_plan import BackoffPlan +from .code_tool_environment_variable import CodeToolEnvironmentVariable +from .create_api_request_tool_dto_messages_item import CreateApiRequestToolDtoMessagesItem +from .create_api_request_tool_dto_method import CreateApiRequestToolDtoMethod +from .create_bash_tool_dto_messages_item import CreateBashToolDtoMessagesItem +from .create_bash_tool_dto_name import CreateBashToolDtoName +from .create_bash_tool_dto_sub_type import CreateBashToolDtoSubType +from .create_code_tool_dto_messages_item import CreateCodeToolDtoMessagesItem +from .create_computer_tool_dto_messages_item import CreateComputerToolDtoMessagesItem +from .create_computer_tool_dto_name import CreateComputerToolDtoName +from .create_computer_tool_dto_sub_type import CreateComputerToolDtoSubType +from .create_dtmf_tool_dto_messages_item import CreateDtmfToolDtoMessagesItem +from .create_end_call_tool_dto_messages_item import CreateEndCallToolDtoMessagesItem +from .create_function_tool_dto_messages_item import CreateFunctionToolDtoMessagesItem +from .create_go_high_level_calendar_availability_tool_dto_messages_item import ( + CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem, +) +from .create_go_high_level_calendar_event_create_tool_dto_messages_item import ( + CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_create_tool_dto_messages_item import ( + CreateGoHighLevelContactCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_get_tool_dto_messages_item import CreateGoHighLevelContactGetToolDtoMessagesItem +from .create_google_calendar_check_availability_tool_dto_messages_item import ( + CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem, +) +from .create_google_calendar_create_event_tool_dto_messages_item import ( + CreateGoogleCalendarCreateEventToolDtoMessagesItem, +) +from .create_google_sheets_row_append_tool_dto_messages_item import CreateGoogleSheetsRowAppendToolDtoMessagesItem +from .create_handoff_tool_dto_messages_item import CreateHandoffToolDtoMessagesItem +from .create_mcp_tool_dto_messages_item import CreateMcpToolDtoMessagesItem +from .create_query_tool_dto_messages_item import CreateQueryToolDtoMessagesItem +from .create_sip_request_tool_dto_body import CreateSipRequestToolDtoBody +from .create_sip_request_tool_dto_messages_item import CreateSipRequestToolDtoMessagesItem +from .create_sip_request_tool_dto_verb import CreateSipRequestToolDtoVerb +from .create_slack_send_message_tool_dto_messages_item import CreateSlackSendMessageToolDtoMessagesItem +from .create_sms_tool_dto_messages_item import CreateSmsToolDtoMessagesItem +from .create_text_editor_tool_dto_messages_item import CreateTextEditorToolDtoMessagesItem +from .create_text_editor_tool_dto_name import CreateTextEditorToolDtoName +from .create_text_editor_tool_dto_sub_type import CreateTextEditorToolDtoSubType +from .create_transfer_call_tool_dto_destinations_item import CreateTransferCallToolDtoDestinationsItem +from .create_transfer_call_tool_dto_messages_item import CreateTransferCallToolDtoMessagesItem +from .create_voicemail_tool_dto_messages_item import CreateVoicemailToolDtoMessagesItem +from .knowledge_base import KnowledgeBase +from .mcp_tool_messages import McpToolMessages +from .mcp_tool_metadata import McpToolMetadata +from .open_ai_function import OpenAiFunction +from .server import Server +from .tool_parameter import ToolParameter +from .tool_rejection_plan import ToolRejectionPlan +from .variable_extraction_plan import VariableExtractionPlan + + +class ConversationNodeToolsItem_ApiRequest(UncheckedBaseModel): + type: typing.Literal["apiRequest"] = "apiRequest" + messages: typing.Optional[typing.List[CreateApiRequestToolDtoMessagesItem]] = None + method: CreateApiRequestToolDtoMethod + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + encrypted_paths: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="encryptedPaths"), pydantic.Field(alias="encryptedPaths") + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + name: typing.Optional[str] = None + description: typing.Optional[str] = None + url: str + body: typing.Optional["JsonSchema"] = None + headers: typing.Optional["JsonSchema"] = None + backoff_plan: typing_extensions.Annotated[ + typing.Optional[BackoffPlan], FieldMetadata(alias="backoffPlan"), pydantic.Field(alias="backoffPlan") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeToolsItem_Bash(UncheckedBaseModel): + type: typing.Literal["bash"] = "bash" + messages: typing.Optional[typing.List[CreateBashToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateBashToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateBashToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeToolsItem_Code(UncheckedBaseModel): + type: typing.Literal["code"] = "code" + messages: typing.Optional[typing.List[CreateCodeToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + code: str + environment_variables: typing_extensions.Annotated[ + typing.Optional[typing.List[CodeToolEnvironmentVariable]], + FieldMetadata(alias="environmentVariables"), + pydantic.Field(alias="environmentVariables"), + ] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeToolsItem_Computer(UncheckedBaseModel): + type: typing.Literal["computer"] = "computer" + messages: typing.Optional[typing.List[CreateComputerToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateComputerToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateComputerToolDtoName + display_width_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayWidthPx"), pydantic.Field(alias="displayWidthPx") + ] + display_height_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayHeightPx"), pydantic.Field(alias="displayHeightPx") + ] + display_number: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="displayNumber"), pydantic.Field(alias="displayNumber") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeToolsItem_Dtmf(UncheckedBaseModel): + type: typing.Literal["dtmf"] = "dtmf" + messages: typing.Optional[typing.List[CreateDtmfToolDtoMessagesItem]] = None + sip_info_dtmf_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="sipInfoDtmfEnabled"), pydantic.Field(alias="sipInfoDtmfEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeToolsItem_EndCall(UncheckedBaseModel): + type: typing.Literal["endCall"] = "endCall" + messages: typing.Optional[typing.List[CreateEndCallToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeToolsItem_Function(UncheckedBaseModel): + type: typing.Literal["function"] = "function" + messages: typing.Optional[typing.List[CreateFunctionToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeToolsItem_GohighlevelCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.availability.check"] = "gohighlevel.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeToolsItem_GohighlevelCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.event.create"] = "gohighlevel.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeToolsItem_GohighlevelContactCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.create"] = "gohighlevel.contact.create" + messages: typing.Optional[typing.List[CreateGoHighLevelContactCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeToolsItem_GohighlevelContactGet(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.get"] = "gohighlevel.contact.get" + messages: typing.Optional[typing.List[CreateGoHighLevelContactGetToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeToolsItem_GoogleCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["google.calendar.availability.check"] = "google.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeToolsItem_GoogleCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["google.calendar.event.create"] = "google.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoogleCalendarCreateEventToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeToolsItem_GoogleSheetsRowAppend(UncheckedBaseModel): + type: typing.Literal["google.sheets.row.append"] = "google.sheets.row.append" + messages: typing.Optional[typing.List[CreateGoogleSheetsRowAppendToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeToolsItem_Handoff(UncheckedBaseModel): + type: typing.Literal["handoff"] = "handoff" + messages: typing.Optional[typing.List[CreateHandoffToolDtoMessagesItem]] = None + default_result: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="defaultResult"), pydantic.Field(alias="defaultResult") + ] = None + destinations: typing.Optional[typing.List["CreateHandoffToolDtoDestinationsItem"]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeToolsItem_Mcp(UncheckedBaseModel): + type: typing.Literal["mcp"] = "mcp" + messages: typing.Optional[typing.List[CreateMcpToolDtoMessagesItem]] = None + server: typing.Optional[Server] = None + tool_messages: typing_extensions.Annotated[ + typing.Optional[typing.List[McpToolMessages]], + FieldMetadata(alias="toolMessages"), + pydantic.Field(alias="toolMessages"), + ] = None + metadata: typing.Optional[McpToolMetadata] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeToolsItem_Query(UncheckedBaseModel): + type: typing.Literal["query"] = "query" + messages: typing.Optional[typing.List[CreateQueryToolDtoMessagesItem]] = None + knowledge_bases: typing_extensions.Annotated[ + typing.Optional[typing.List[KnowledgeBase]], + FieldMetadata(alias="knowledgeBases"), + pydantic.Field(alias="knowledgeBases"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeToolsItem_SlackMessageSend(UncheckedBaseModel): + type: typing.Literal["slack.message.send"] = "slack.message.send" + messages: typing.Optional[typing.List[CreateSlackSendMessageToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeToolsItem_Sms(UncheckedBaseModel): + type: typing.Literal["sms"] = "sms" + messages: typing.Optional[typing.List[CreateSmsToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeToolsItem_TextEditor(UncheckedBaseModel): + type: typing.Literal["textEditor"] = "textEditor" + messages: typing.Optional[typing.List[CreateTextEditorToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateTextEditorToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateTextEditorToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeToolsItem_TransferCall(UncheckedBaseModel): + type: typing.Literal["transferCall"] = "transferCall" + messages: typing.Optional[typing.List[CreateTransferCallToolDtoMessagesItem]] = None + destinations: typing.Optional[typing.List[CreateTransferCallToolDtoDestinationsItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeToolsItem_SipRequest(UncheckedBaseModel): + type: typing.Literal["sipRequest"] = "sipRequest" + messages: typing.Optional[typing.List[CreateSipRequestToolDtoMessagesItem]] = None + verb: CreateSipRequestToolDtoVerb + headers: typing.Optional["JsonSchema"] = None + body: typing.Optional[CreateSipRequestToolDtoBody] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeToolsItem_Voicemail(UncheckedBaseModel): + type: typing.Literal["voicemail"] = "voicemail" + messages: typing.Optional[typing.List[CreateVoicemailToolDtoMessagesItem]] = None + beep_detection_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="beepDetectionEnabled"), pydantic.Field(alias="beepDetectionEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ConversationNodeToolsItem = typing_extensions.Annotated[ + typing.Union[ + ConversationNodeToolsItem_ApiRequest, + ConversationNodeToolsItem_Bash, + ConversationNodeToolsItem_Code, + ConversationNodeToolsItem_Computer, + ConversationNodeToolsItem_Dtmf, + ConversationNodeToolsItem_EndCall, + ConversationNodeToolsItem_Function, + ConversationNodeToolsItem_GohighlevelCalendarAvailabilityCheck, + ConversationNodeToolsItem_GohighlevelCalendarEventCreate, + ConversationNodeToolsItem_GohighlevelContactCreate, + ConversationNodeToolsItem_GohighlevelContactGet, + ConversationNodeToolsItem_GoogleCalendarAvailabilityCheck, + ConversationNodeToolsItem_GoogleCalendarEventCreate, + ConversationNodeToolsItem_GoogleSheetsRowAppend, + ConversationNodeToolsItem_Handoff, + ConversationNodeToolsItem_Mcp, + ConversationNodeToolsItem_Query, + ConversationNodeToolsItem_SlackMessageSend, + ConversationNodeToolsItem_Sms, + ConversationNodeToolsItem_TextEditor, + ConversationNodeToolsItem_TransferCall, + ConversationNodeToolsItem_SipRequest, + ConversationNodeToolsItem_Voicemail, + ], + UnionMetadata(discriminant="type"), +] +from .json_schema import JsonSchema # noqa: E402, I001 +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs(ConversationNodeToolsItem_ApiRequest, JsonSchema=JsonSchema) +update_forward_refs(ConversationNodeToolsItem_Bash) +update_forward_refs(ConversationNodeToolsItem_Code) +update_forward_refs(ConversationNodeToolsItem_Computer) +update_forward_refs(ConversationNodeToolsItem_Dtmf) +update_forward_refs(ConversationNodeToolsItem_EndCall) +update_forward_refs(ConversationNodeToolsItem_Function) +update_forward_refs(ConversationNodeToolsItem_GohighlevelCalendarAvailabilityCheck) +update_forward_refs(ConversationNodeToolsItem_GohighlevelCalendarEventCreate) +update_forward_refs(ConversationNodeToolsItem_GohighlevelContactCreate) +update_forward_refs(ConversationNodeToolsItem_GohighlevelContactGet) +update_forward_refs(ConversationNodeToolsItem_GoogleCalendarAvailabilityCheck) +update_forward_refs(ConversationNodeToolsItem_GoogleCalendarEventCreate) +update_forward_refs(ConversationNodeToolsItem_GoogleSheetsRowAppend) +update_forward_refs( + ConversationNodeToolsItem_Handoff, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs(ConversationNodeToolsItem_Mcp) +update_forward_refs(ConversationNodeToolsItem_Query) +update_forward_refs(ConversationNodeToolsItem_SlackMessageSend) +update_forward_refs(ConversationNodeToolsItem_Sms) +update_forward_refs(ConversationNodeToolsItem_TextEditor) +update_forward_refs(ConversationNodeToolsItem_TransferCall) +update_forward_refs(ConversationNodeToolsItem_SipRequest, JsonSchema=JsonSchema) +update_forward_refs(ConversationNodeToolsItem_Voicemail) diff --git a/src/vapi/types/conversation_node_transcriber.py b/src/vapi/types/conversation_node_transcriber.py new file mode 100644 index 00000000..f50aba8f --- /dev/null +++ b/src/vapi/types/conversation_node_transcriber.py @@ -0,0 +1,562 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .assembly_ai_transcriber_language import AssemblyAiTranscriberLanguage +from .assembly_ai_transcriber_speech_model import AssemblyAiTranscriberSpeechModel +from .azure_speech_transcriber_language import AzureSpeechTranscriberLanguage +from .azure_speech_transcriber_segmentation_strategy import AzureSpeechTranscriberSegmentationStrategy +from .cartesia_transcriber_language import CartesiaTranscriberLanguage +from .cartesia_transcriber_model import CartesiaTranscriberModel +from .deepgram_transcriber_language import DeepgramTranscriberLanguage +from .deepgram_transcriber_model import DeepgramTranscriberModel +from .eleven_labs_transcriber_language import ElevenLabsTranscriberLanguage +from .eleven_labs_transcriber_model import ElevenLabsTranscriberModel +from .fallback_transcriber_plan import FallbackTranscriberPlan +from .gladia_custom_vocabulary_config_dto import GladiaCustomVocabularyConfigDto +from .gladia_transcriber_language import GladiaTranscriberLanguage +from .gladia_transcriber_language_behaviour import GladiaTranscriberLanguageBehaviour +from .gladia_transcriber_languages import GladiaTranscriberLanguages +from .gladia_transcriber_model import GladiaTranscriberModel +from .gladia_transcriber_region import GladiaTranscriberRegion +from .google_transcriber_language import GoogleTranscriberLanguage +from .google_transcriber_model import GoogleTranscriberModel +from .open_ai_transcriber_language import OpenAiTranscriberLanguage +from .open_ai_transcriber_model import OpenAiTranscriberModel +from .server import Server +from .soniox_transcriber_language import SonioxTranscriberLanguage +from .soniox_transcriber_model import SonioxTranscriberModel +from .speechmatics_custom_vocabulary_item import SpeechmaticsCustomVocabularyItem +from .speechmatics_transcriber_language import SpeechmaticsTranscriberLanguage +from .speechmatics_transcriber_model import SpeechmaticsTranscriberModel +from .speechmatics_transcriber_numeral_style import SpeechmaticsTranscriberNumeralStyle +from .speechmatics_transcriber_operating_point import SpeechmaticsTranscriberOperatingPoint +from .speechmatics_transcriber_region import SpeechmaticsTranscriberRegion +from .talkscriber_transcriber_language import TalkscriberTranscriberLanguage +from .talkscriber_transcriber_model import TalkscriberTranscriberModel + + +class ConversationNodeTranscriber_AssemblyAi(UncheckedBaseModel): + """ + This is the transcriber for the node. + + This overrides `workflow.transcriber`. + """ + + provider: typing.Literal["assembly-ai"] = "assembly-ai" + language: typing.Optional[AssemblyAiTranscriberLanguage] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="confidenceThreshold"), pydantic.Field(alias="confidenceThreshold") + ] = None + format_turns: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="formatTurns"), pydantic.Field(alias="formatTurns") + ] = None + end_of_turn_confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="endOfTurnConfidenceThreshold"), + pydantic.Field(alias="endOfTurnConfidenceThreshold"), + ] = None + min_end_of_turn_silence_when_confident: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minEndOfTurnSilenceWhenConfident"), + pydantic.Field(alias="minEndOfTurnSilenceWhenConfident"), + ] = None + word_finalization_max_wait_time: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="wordFinalizationMaxWaitTime"), + pydantic.Field(alias="wordFinalizationMaxWaitTime"), + ] = None + max_turn_silence: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTurnSilence"), pydantic.Field(alias="maxTurnSilence") + ] = None + vad_assisted_endpointing_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="vadAssistedEndpointingEnabled"), + pydantic.Field(alias="vadAssistedEndpointingEnabled"), + ] = None + speech_model: typing_extensions.Annotated[ + typing.Optional[AssemblyAiTranscriberSpeechModel], + FieldMetadata(alias="speechModel"), + pydantic.Field(alias="speechModel"), + ] = None + realtime_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="realtimeUrl"), pydantic.Field(alias="realtimeUrl") + ] = None + word_boost: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="wordBoost"), pydantic.Field(alias="wordBoost") + ] = None + keyterms_prompt: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="keytermsPrompt"), pydantic.Field(alias="keytermsPrompt") + ] = None + end_utterance_silence_threshold: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="endUtteranceSilenceThreshold"), + pydantic.Field(alias="endUtteranceSilenceThreshold"), + ] = None + disable_partial_transcripts: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="disablePartialTranscripts"), + pydantic.Field(alias="disablePartialTranscripts"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeTranscriber_Azure(UncheckedBaseModel): + """ + This is the transcriber for the node. + + This overrides `workflow.transcriber`. + """ + + provider: typing.Literal["azure"] = "azure" + language: typing.Optional[AzureSpeechTranscriberLanguage] = None + segmentation_strategy: typing_extensions.Annotated[ + typing.Optional[AzureSpeechTranscriberSegmentationStrategy], + FieldMetadata(alias="segmentationStrategy"), + pydantic.Field(alias="segmentationStrategy"), + ] = None + segmentation_silence_timeout_ms: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="segmentationSilenceTimeoutMs"), + pydantic.Field(alias="segmentationSilenceTimeoutMs"), + ] = None + segmentation_maximum_time_ms: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="segmentationMaximumTimeMs"), + pydantic.Field(alias="segmentationMaximumTimeMs"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeTranscriber_CustomTranscriber(UncheckedBaseModel): + """ + This is the transcriber for the node. + + This overrides `workflow.transcriber`. + """ + + provider: typing.Literal["custom-transcriber"] = "custom-transcriber" + server: Server + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeTranscriber_Deepgram(UncheckedBaseModel): + """ + This is the transcriber for the node. + + This overrides `workflow.transcriber`. + """ + + provider: typing.Literal["deepgram"] = "deepgram" + model: typing.Optional[DeepgramTranscriberModel] = None + language: typing.Optional[DeepgramTranscriberLanguage] = None + smart_format: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smartFormat"), pydantic.Field(alias="smartFormat") + ] = None + mip_opt_out: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="mipOptOut"), pydantic.Field(alias="mipOptOut") + ] = None + numerals: typing.Optional[bool] = None + profanity_filter: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="profanityFilter"), pydantic.Field(alias="profanityFilter") + ] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="confidenceThreshold"), pydantic.Field(alias="confidenceThreshold") + ] = None + eager_eot_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="eagerEotThreshold"), pydantic.Field(alias="eagerEotThreshold") + ] = None + eot_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="eotThreshold"), pydantic.Field(alias="eotThreshold") + ] = None + eot_timeout_ms: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="eotTimeoutMs"), pydantic.Field(alias="eotTimeoutMs") + ] = None + keywords: typing.Optional[typing.List[str]] = None + keyterm: typing.Optional[typing.List[str]] = None + endpointing: typing.Optional[float] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeTranscriber_11Labs(UncheckedBaseModel): + """ + This is the transcriber for the node. + + This overrides `workflow.transcriber`. + """ + + provider: typing.Literal["11labs"] = "11labs" + model: typing.Optional[ElevenLabsTranscriberModel] = None + language: typing.Optional[ElevenLabsTranscriberLanguage] = None + silence_threshold_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="silenceThresholdSeconds"), + pydantic.Field(alias="silenceThresholdSeconds"), + ] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="confidenceThreshold"), pydantic.Field(alias="confidenceThreshold") + ] = None + min_speech_duration_ms: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="minSpeechDurationMs"), pydantic.Field(alias="minSpeechDurationMs") + ] = None + min_silence_duration_ms: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minSilenceDurationMs"), + pydantic.Field(alias="minSilenceDurationMs"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeTranscriber_Gladia(UncheckedBaseModel): + """ + This is the transcriber for the node. + + This overrides `workflow.transcriber`. + """ + + provider: typing.Literal["gladia"] = "gladia" + model: typing.Optional[GladiaTranscriberModel] = None + language_behaviour: typing_extensions.Annotated[ + typing.Optional[GladiaTranscriberLanguageBehaviour], + FieldMetadata(alias="languageBehaviour"), + pydantic.Field(alias="languageBehaviour"), + ] = None + language: typing.Optional[GladiaTranscriberLanguage] = None + languages: typing.Optional[GladiaTranscriberLanguages] = None + transcription_hint: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="transcriptionHint"), pydantic.Field(alias="transcriptionHint") + ] = None + prosody: typing.Optional[bool] = None + audio_enhancer: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="audioEnhancer"), pydantic.Field(alias="audioEnhancer") + ] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="confidenceThreshold"), pydantic.Field(alias="confidenceThreshold") + ] = None + endpointing: typing.Optional[float] = None + speech_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="speechThreshold"), pydantic.Field(alias="speechThreshold") + ] = None + custom_vocabulary_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="customVocabularyEnabled"), + pydantic.Field(alias="customVocabularyEnabled"), + ] = None + custom_vocabulary_config: typing_extensions.Annotated[ + typing.Optional[GladiaCustomVocabularyConfigDto], + FieldMetadata(alias="customVocabularyConfig"), + pydantic.Field(alias="customVocabularyConfig"), + ] = None + region: typing.Optional[GladiaTranscriberRegion] = None + receive_partial_transcripts: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="receivePartialTranscripts"), + pydantic.Field(alias="receivePartialTranscripts"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeTranscriber_Google(UncheckedBaseModel): + """ + This is the transcriber for the node. + + This overrides `workflow.transcriber`. + """ + + provider: typing.Literal["google"] = "google" + model: typing.Optional[GoogleTranscriberModel] = None + language: typing.Optional[GoogleTranscriberLanguage] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeTranscriber_Speechmatics(UncheckedBaseModel): + """ + This is the transcriber for the node. + + This overrides `workflow.transcriber`. + """ + + provider: typing.Literal["speechmatics"] = "speechmatics" + model: typing.Optional[SpeechmaticsTranscriberModel] = None + language: typing.Optional[SpeechmaticsTranscriberLanguage] = None + operating_point: typing_extensions.Annotated[ + typing.Optional[SpeechmaticsTranscriberOperatingPoint], + FieldMetadata(alias="operatingPoint"), + pydantic.Field(alias="operatingPoint"), + ] = None + region: typing.Optional[SpeechmaticsTranscriberRegion] = None + enable_diarization: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="enableDiarization"), pydantic.Field(alias="enableDiarization") + ] = None + max_delay: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxDelay"), pydantic.Field(alias="maxDelay") + ] = None + custom_vocabulary: typing_extensions.Annotated[ + typing.List[SpeechmaticsCustomVocabularyItem], + FieldMetadata(alias="customVocabulary"), + pydantic.Field(alias="customVocabulary"), + ] + numeral_style: typing_extensions.Annotated[ + typing.Optional[SpeechmaticsTranscriberNumeralStyle], + FieldMetadata(alias="numeralStyle"), + pydantic.Field(alias="numeralStyle"), + ] = None + end_of_turn_sensitivity: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="endOfTurnSensitivity"), + pydantic.Field(alias="endOfTurnSensitivity"), + ] = None + remove_disfluencies: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="removeDisfluencies"), pydantic.Field(alias="removeDisfluencies") + ] = None + minimum_speech_duration: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minimumSpeechDuration"), + pydantic.Field(alias="minimumSpeechDuration"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeTranscriber_Talkscriber(UncheckedBaseModel): + """ + This is the transcriber for the node. + + This overrides `workflow.transcriber`. + """ + + provider: typing.Literal["talkscriber"] = "talkscriber" + model: typing.Optional[TalkscriberTranscriberModel] = None + language: typing.Optional[TalkscriberTranscriberLanguage] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeTranscriber_Openai(UncheckedBaseModel): + """ + This is the transcriber for the node. + + This overrides `workflow.transcriber`. + """ + + provider: typing.Literal["openai"] = "openai" + model: OpenAiTranscriberModel + language: typing.Optional[OpenAiTranscriberLanguage] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeTranscriber_Cartesia(UncheckedBaseModel): + """ + This is the transcriber for the node. + + This overrides `workflow.transcriber`. + """ + + provider: typing.Literal["cartesia"] = "cartesia" + model: typing.Optional[CartesiaTranscriberModel] = None + language: typing.Optional[CartesiaTranscriberLanguage] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeTranscriber_Soniox(UncheckedBaseModel): + """ + This is the transcriber for the node. + + This overrides `workflow.transcriber`. + """ + + provider: typing.Literal["soniox"] = "soniox" + model: typing.Optional[SonioxTranscriberModel] = None + language: typing.Optional[SonioxTranscriberLanguage] = None + language_hints_strict: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="languageHintsStrict"), pydantic.Field(alias="languageHintsStrict") + ] = None + max_endpoint_delay_ms: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxEndpointDelayMs"), pydantic.Field(alias="maxEndpointDelayMs") + ] = None + custom_vocabulary: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="customVocabulary"), + pydantic.Field(alias="customVocabulary"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ConversationNodeTranscriber = typing_extensions.Annotated[ + typing.Union[ + ConversationNodeTranscriber_AssemblyAi, + ConversationNodeTranscriber_Azure, + ConversationNodeTranscriber_CustomTranscriber, + ConversationNodeTranscriber_Deepgram, + ConversationNodeTranscriber_11Labs, + ConversationNodeTranscriber_Gladia, + ConversationNodeTranscriber_Google, + ConversationNodeTranscriber_Speechmatics, + ConversationNodeTranscriber_Talkscriber, + ConversationNodeTranscriber_Openai, + ConversationNodeTranscriber_Cartesia, + ConversationNodeTranscriber_Soniox, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/conversation_node_voice.py b/src/vapi/types/conversation_node_voice.py new file mode 100644 index 00000000..e02faa59 --- /dev/null +++ b/src/vapi/types/conversation_node_voice.py @@ -0,0 +1,776 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .azure_voice_id import AzureVoiceId +from .cartesia_experimental_controls import CartesiaExperimentalControls +from .cartesia_generation_config import CartesiaGenerationConfig +from .cartesia_voice_language import CartesiaVoiceLanguage +from .cartesia_voice_model import CartesiaVoiceModel +from .chunk_plan import ChunkPlan +from .deepgram_voice_id import DeepgramVoiceId +from .deepgram_voice_model import DeepgramVoiceModel +from .eleven_labs_pronunciation_dictionary_locator import ElevenLabsPronunciationDictionaryLocator +from .eleven_labs_voice_id import ElevenLabsVoiceId +from .eleven_labs_voice_model import ElevenLabsVoiceModel +from .fallback_plan import FallbackPlan +from .hume_voice_model import HumeVoiceModel +from .inworld_voice_language_code import InworldVoiceLanguageCode +from .inworld_voice_model import InworldVoiceModel +from .inworld_voice_voice_id import InworldVoiceVoiceId +from .lmnt_voice_id import LmntVoiceId +from .lmnt_voice_language import LmntVoiceLanguage +from .minimax_voice_language_boost import MinimaxVoiceLanguageBoost +from .minimax_voice_model import MinimaxVoiceModel +from .minimax_voice_region import MinimaxVoiceRegion +from .minimax_voice_subtitle_type import MinimaxVoiceSubtitleType +from .neuphonic_voice_model import NeuphonicVoiceModel +from .open_ai_voice_id import OpenAiVoiceId +from .open_ai_voice_model import OpenAiVoiceModel +from .play_ht_voice_emotion import PlayHtVoiceEmotion +from .play_ht_voice_id import PlayHtVoiceId +from .play_ht_voice_language import PlayHtVoiceLanguage +from .play_ht_voice_model import PlayHtVoiceModel +from .rime_ai_voice_id import RimeAiVoiceId +from .rime_ai_voice_language import RimeAiVoiceLanguage +from .rime_ai_voice_model import RimeAiVoiceModel +from .server import Server +from .sesame_voice_model import SesameVoiceModel +from .smallest_ai_voice_id import SmallestAiVoiceId +from .smallest_ai_voice_model import SmallestAiVoiceModel +from .tavus_conversation_properties import TavusConversationProperties +from .tavus_voice_voice_id import TavusVoiceVoiceId +from .vapi_pronunciation_dictionary_locator import VapiPronunciationDictionaryLocator +from .vapi_voice_voice_id import VapiVoiceVoiceId +from .well_said_voice_model import WellSaidVoiceModel + + +class ConversationNodeVoice_Azure(UncheckedBaseModel): + """ + This is the voice for the node. + + This overrides `workflow.voice`. + """ + + provider: typing.Literal["azure"] = "azure" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[AzureVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + speed: typing.Optional[float] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeVoice_Cartesia(UncheckedBaseModel): + """ + This is the voice for the node. + + This overrides `workflow.voice`. + """ + + provider: typing.Literal["cartesia"] = "cartesia" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[CartesiaVoiceModel] = None + language: typing.Optional[CartesiaVoiceLanguage] = None + experimental_controls: typing_extensions.Annotated[ + typing.Optional[CartesiaExperimentalControls], + FieldMetadata(alias="experimentalControls"), + pydantic.Field(alias="experimentalControls"), + ] = None + generation_config: typing_extensions.Annotated[ + typing.Optional[CartesiaGenerationConfig], + FieldMetadata(alias="generationConfig"), + pydantic.Field(alias="generationConfig"), + ] = None + pronunciation_dict_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="pronunciationDictId"), pydantic.Field(alias="pronunciationDictId") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeVoice_CustomVoice(UncheckedBaseModel): + """ + This is the voice for the node. + + This overrides `workflow.voice`. + """ + + provider: typing.Literal["custom-voice"] = "custom-voice" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + server: Server + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeVoice_Deepgram(UncheckedBaseModel): + """ + This is the voice for the node. + + This overrides `workflow.voice`. + """ + + provider: typing.Literal["deepgram"] = "deepgram" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + DeepgramVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[DeepgramVoiceModel] = None + mip_opt_out: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="mipOptOut"), pydantic.Field(alias="mipOptOut") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeVoice_11Labs(UncheckedBaseModel): + """ + This is the voice for the node. + + This overrides `workflow.voice`. + """ + + provider: typing.Literal["11labs"] = "11labs" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + ElevenLabsVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + stability: typing.Optional[float] = None + similarity_boost: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="similarityBoost"), pydantic.Field(alias="similarityBoost") + ] = None + style: typing.Optional[float] = None + use_speaker_boost: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="useSpeakerBoost"), pydantic.Field(alias="useSpeakerBoost") + ] = None + speed: typing.Optional[float] = None + optimize_streaming_latency: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="optimizeStreamingLatency"), + pydantic.Field(alias="optimizeStreamingLatency"), + ] = None + enable_ssml_parsing: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="enableSsmlParsing"), pydantic.Field(alias="enableSsmlParsing") + ] = None + auto_mode: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="autoMode"), pydantic.Field(alias="autoMode") + ] = None + model: typing.Optional[ElevenLabsVoiceModel] = None + language: typing.Optional[str] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + pronunciation_dictionary_locators: typing_extensions.Annotated[ + typing.Optional[typing.List[ElevenLabsPronunciationDictionaryLocator]], + FieldMetadata(alias="pronunciationDictionaryLocators"), + pydantic.Field(alias="pronunciationDictionaryLocators"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeVoice_Hume(UncheckedBaseModel): + """ + This is the voice for the node. + + This overrides `workflow.voice`. + """ + + provider: typing.Literal["hume"] = "hume" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + model: typing.Optional[HumeVoiceModel] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + is_custom_hume_voice: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="isCustomHumeVoice"), pydantic.Field(alias="isCustomHumeVoice") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + description: typing.Optional[str] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeVoice_Lmnt(UncheckedBaseModel): + """ + This is the voice for the node. + + This overrides `workflow.voice`. + """ + + provider: typing.Literal["lmnt"] = "lmnt" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[LmntVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + speed: typing.Optional[float] = None + language: typing.Optional[LmntVoiceLanguage] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeVoice_Neuphonic(UncheckedBaseModel): + """ + This is the voice for the node. + + This overrides `workflow.voice`. + """ + + provider: typing.Literal["neuphonic"] = "neuphonic" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[NeuphonicVoiceModel] = None + language: typing.Dict[str, typing.Any] + speed: typing.Optional[float] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeVoice_Openai(UncheckedBaseModel): + """ + This is the voice for the node. + + This overrides `workflow.voice`. + """ + + provider: typing.Literal["openai"] = "openai" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + OpenAiVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[OpenAiVoiceModel] = None + instructions: typing.Optional[str] = None + speed: typing.Optional[float] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeVoice_Playht(UncheckedBaseModel): + """ + This is the voice for the node. + + This overrides `workflow.voice`. + """ + + provider: typing.Literal["playht"] = "playht" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + PlayHtVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + speed: typing.Optional[float] = None + temperature: typing.Optional[float] = None + emotion: typing.Optional[PlayHtVoiceEmotion] = None + voice_guidance: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="voiceGuidance"), pydantic.Field(alias="voiceGuidance") + ] = None + style_guidance: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="styleGuidance"), pydantic.Field(alias="styleGuidance") + ] = None + text_guidance: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="textGuidance"), pydantic.Field(alias="textGuidance") + ] = None + model: typing.Optional[PlayHtVoiceModel] = None + language: typing.Optional[PlayHtVoiceLanguage] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeVoice_Wellsaid(UncheckedBaseModel): + """ + This is the voice for the node. + + This overrides `workflow.voice`. + """ + + provider: typing.Literal["wellsaid"] = "wellsaid" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[WellSaidVoiceModel] = None + enable_ssml: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="enableSsml"), pydantic.Field(alias="enableSsml") + ] = None + library_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="libraryIds"), pydantic.Field(alias="libraryIds") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeVoice_RimeAi(UncheckedBaseModel): + """ + This is the voice for the node. + + This overrides `workflow.voice`. + """ + + provider: typing.Literal["rime-ai"] = "rime-ai" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + RimeAiVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[RimeAiVoiceModel] = None + speed: typing.Optional[float] = None + pause_between_brackets: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="pauseBetweenBrackets"), pydantic.Field(alias="pauseBetweenBrackets") + ] = None + phonemize_between_brackets: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="phonemizeBetweenBrackets"), + pydantic.Field(alias="phonemizeBetweenBrackets"), + ] = None + reduce_latency: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="reduceLatency"), pydantic.Field(alias="reduceLatency") + ] = None + inline_speed_alpha: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="inlineSpeedAlpha"), pydantic.Field(alias="inlineSpeedAlpha") + ] = None + language: typing.Optional[RimeAiVoiceLanguage] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeVoice_SmallestAi(UncheckedBaseModel): + """ + This is the voice for the node. + + This overrides `workflow.voice`. + """ + + provider: typing.Literal["smallest-ai"] = "smallest-ai" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + SmallestAiVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[SmallestAiVoiceModel] = None + speed: typing.Optional[float] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeVoice_Tavus(UncheckedBaseModel): + """ + This is the voice for the node. + + This overrides `workflow.voice`. + """ + + provider: typing.Literal["tavus"] = "tavus" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + TavusVoiceVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + persona_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="personaId"), pydantic.Field(alias="personaId") + ] = None + callback_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callbackUrl"), pydantic.Field(alias="callbackUrl") + ] = None + conversation_name: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="conversationName"), pydantic.Field(alias="conversationName") + ] = None + conversational_context: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="conversationalContext"), + pydantic.Field(alias="conversationalContext"), + ] = None + custom_greeting: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="customGreeting"), pydantic.Field(alias="customGreeting") + ] = None + properties: typing.Optional[TavusConversationProperties] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeVoice_Vapi(UncheckedBaseModel): + """ + This is the voice for the node. + + This overrides `workflow.voice`. + """ + + provider: typing.Literal["vapi"] = "vapi" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + VapiVoiceVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + speed: typing.Optional[float] = None + pronunciation_dictionary: typing_extensions.Annotated[ + typing.Optional[typing.List[VapiPronunciationDictionaryLocator]], + FieldMetadata(alias="pronunciationDictionary"), + pydantic.Field(alias="pronunciationDictionary"), + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeVoice_Sesame(UncheckedBaseModel): + """ + This is the voice for the node. + + This overrides `workflow.voice`. + """ + + provider: typing.Literal["sesame"] = "sesame" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: SesameVoiceModel + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeVoice_Inworld(UncheckedBaseModel): + """ + This is the voice for the node. + + This overrides `workflow.voice`. + """ + + provider: typing.Literal["inworld"] = "inworld" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + InworldVoiceVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[InworldVoiceModel] = None + language_code: typing_extensions.Annotated[ + typing.Optional[InworldVoiceLanguageCode], + FieldMetadata(alias="languageCode"), + pydantic.Field(alias="languageCode"), + ] = None + temperature: typing.Optional[float] = None + speaking_rate: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="speakingRate"), pydantic.Field(alias="speakingRate") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ConversationNodeVoice_Minimax(UncheckedBaseModel): + """ + This is the voice for the node. + + This overrides `workflow.voice`. + """ + + provider: typing.Literal["minimax"] = "minimax" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[MinimaxVoiceModel] = None + emotion: typing.Optional[str] = None + subtitle_type: typing_extensions.Annotated[ + typing.Optional[MinimaxVoiceSubtitleType], + FieldMetadata(alias="subtitleType"), + pydantic.Field(alias="subtitleType"), + ] = None + pitch: typing.Optional[float] = None + speed: typing.Optional[float] = None + volume: typing.Optional[float] = None + region: typing.Optional[MinimaxVoiceRegion] = None + language_boost: typing_extensions.Annotated[ + typing.Optional[MinimaxVoiceLanguageBoost], + FieldMetadata(alias="languageBoost"), + pydantic.Field(alias="languageBoost"), + ] = None + text_normalization_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="textNormalizationEnabled"), + pydantic.Field(alias="textNormalizationEnabled"), + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ConversationNodeVoice = typing_extensions.Annotated[ + typing.Union[ + ConversationNodeVoice_Azure, + ConversationNodeVoice_Cartesia, + ConversationNodeVoice_CustomVoice, + ConversationNodeVoice_Deepgram, + ConversationNodeVoice_11Labs, + ConversationNodeVoice_Hume, + ConversationNodeVoice_Lmnt, + ConversationNodeVoice_Neuphonic, + ConversationNodeVoice_Openai, + ConversationNodeVoice_Playht, + ConversationNodeVoice_Wellsaid, + ConversationNodeVoice_RimeAi, + ConversationNodeVoice_SmallestAi, + ConversationNodeVoice_Tavus, + ConversationNodeVoice_Vapi, + ConversationNodeVoice_Sesame, + ConversationNodeVoice_Inworld, + ConversationNodeVoice_Minimax, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/cost_breakdown.py b/src/vapi/types/cost_breakdown.py index 406d5775..3b6b04c7 100644 --- a/src/vapi/types/cost_breakdown.py +++ b/src/vapi/types/cost_breakdown.py @@ -1,15 +1,16 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing + import pydantic import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel from .analysis_cost_breakdown import AnalysisCostBreakdown -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -class CostBreakdown(UniversalBaseModel): +class CostBreakdown(UncheckedBaseModel): transport: typing.Optional[float] = pydantic.Field(default=None) """ This is the cost of the transport provider, like Twilio or Vonage. @@ -35,38 +36,43 @@ class CostBreakdown(UniversalBaseModel): This is the cost of Vapi. """ - total: typing.Optional[float] = pydantic.Field(default=None) + chat: typing.Optional[float] = pydantic.Field(default=None) """ - This is the total cost of the call. + This is the cost of chat interactions. """ - llm_prompt_tokens: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="llmPromptTokens")] = ( - pydantic.Field(default=None) - ) + total: typing.Optional[float] = pydantic.Field(default=None) """ - This is the LLM prompt tokens used for the call. + This is the total cost of the call. """ + llm_prompt_tokens: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="llmPromptTokens"), + pydantic.Field(alias="llmPromptTokens", description="This is the LLM prompt tokens used for the call."), + ] = None llm_completion_tokens: typing_extensions.Annotated[ - typing.Optional[float], FieldMetadata(alias="llmCompletionTokens") - ] = pydantic.Field(default=None) - """ - This is the LLM completion tokens used for the call. - """ - - tts_characters: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="ttsCharacters")] = ( - pydantic.Field(default=None) - ) - """ - This is the TTS characters used for the call. - """ - + typing.Optional[float], + FieldMetadata(alias="llmCompletionTokens"), + pydantic.Field(alias="llmCompletionTokens", description="This is the LLM completion tokens used for the call."), + ] = None + llm_cached_prompt_tokens: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="llmCachedPromptTokens"), + pydantic.Field( + alias="llmCachedPromptTokens", description="This is the LLM cached prompt tokens used for the call." + ), + ] = None + tts_characters: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="ttsCharacters"), + pydantic.Field(alias="ttsCharacters", description="This is the TTS characters used for the call."), + ] = None analysis_cost_breakdown: typing_extensions.Annotated[ - typing.Optional[AnalysisCostBreakdown], FieldMetadata(alias="analysisCostBreakdown") - ] = pydantic.Field(default=None) - """ - This is the cost of the analysis. - """ + typing.Optional[AnalysisCostBreakdown], + FieldMetadata(alias="analysisCostBreakdown"), + pydantic.Field(alias="analysisCostBreakdown", description="This is the cost of the analysis."), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/create_anthropic_bedrock_credential_dto.py b/src/vapi/types/create_anthropic_bedrock_credential_dto.py new file mode 100644 index 00000000..cdaf6232 --- /dev/null +++ b/src/vapi/types/create_anthropic_bedrock_credential_dto.py @@ -0,0 +1,42 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_anthropic_bedrock_credential_dto_authentication_plan import ( + CreateAnthropicBedrockCredentialDtoAuthenticationPlan, +) +from .create_anthropic_bedrock_credential_dto_region import CreateAnthropicBedrockCredentialDtoRegion + + +class CreateAnthropicBedrockCredentialDto(UncheckedBaseModel): + region: CreateAnthropicBedrockCredentialDtoRegion = pydantic.Field() + """ + AWS region where Bedrock is configured. + """ + + authentication_plan: typing_extensions.Annotated[ + CreateAnthropicBedrockCredentialDtoAuthenticationPlan, + FieldMetadata(alias="authenticationPlan"), + pydantic.Field( + alias="authenticationPlan", + description="Authentication method - either direct IAM credentials or cross-account role assumption.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_anthropic_bedrock_credential_dto_authentication_plan.py b/src/vapi/types/create_anthropic_bedrock_credential_dto_authentication_plan.py new file mode 100644 index 00000000..cd4b6e6c --- /dev/null +++ b/src/vapi/types/create_anthropic_bedrock_credential_dto_authentication_plan.py @@ -0,0 +1,64 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class CreateAnthropicBedrockCredentialDtoAuthenticationPlan_AwsIam(UncheckedBaseModel): + """ + Authentication method - either direct IAM credentials or cross-account role assumption. + """ + + type: typing.Literal["aws-iam"] = "aws-iam" + aws_access_key_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="awsAccessKeyId"), pydantic.Field(alias="awsAccessKeyId") + ] + aws_secret_access_key: typing_extensions.Annotated[ + str, FieldMetadata(alias="awsSecretAccessKey"), pydantic.Field(alias="awsSecretAccessKey") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAnthropicBedrockCredentialDtoAuthenticationPlan_AwsSts(UncheckedBaseModel): + """ + Authentication method - either direct IAM credentials or cross-account role assumption. + """ + + type: typing.Literal["aws-sts"] = "aws-sts" + role_arn: typing_extensions.Annotated[str, FieldMetadata(alias="roleArn"), pydantic.Field(alias="roleArn")] + external_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="externalId"), pydantic.Field(alias="externalId") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateAnthropicBedrockCredentialDtoAuthenticationPlan = typing_extensions.Annotated[ + typing.Union[ + CreateAnthropicBedrockCredentialDtoAuthenticationPlan_AwsIam, + CreateAnthropicBedrockCredentialDtoAuthenticationPlan_AwsSts, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/create_anthropic_bedrock_credential_dto_region.py b/src/vapi/types/create_anthropic_bedrock_credential_dto_region.py new file mode 100644 index 00000000..b8ee3464 --- /dev/null +++ b/src/vapi/types/create_anthropic_bedrock_credential_dto_region.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CreateAnthropicBedrockCredentialDtoRegion = typing.Union[ + typing.Literal["us-east-1", "us-west-2", "eu-west-1", "eu-west-3", "ap-northeast-1", "ap-southeast-2"], typing.Any +] diff --git a/src/vapi/types/create_anthropic_credential_dto.py b/src/vapi/types/create_anthropic_credential_dto.py index 43d9dd3f..26546982 100644 --- a/src/vapi/types/create_anthropic_credential_dto.py +++ b/src/vapi/types/create_anthropic_credential_dto.py @@ -1,18 +1,23 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class CreateAnthropicCredentialDto(UniversalBaseModel): - provider: typing.Literal["anthropic"] = "anthropic" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() +class CreateAnthropicCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is not returned in the API. + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/create_anyscale_credential_dto.py b/src/vapi/types/create_anyscale_credential_dto.py index b99dedeb..6dd35cbc 100644 --- a/src/vapi/types/create_anyscale_credential_dto.py +++ b/src/vapi/types/create_anyscale_credential_dto.py @@ -1,18 +1,23 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class CreateAnyscaleCredentialDto(UniversalBaseModel): - provider: typing.Literal["anyscale"] = "anyscale" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() +class CreateAnyscaleCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is not returned in the API. + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/create_api_request_tool_dto.py b/src/vapi/types/create_api_request_tool_dto.py new file mode 100644 index 00000000..69909fd6 --- /dev/null +++ b/src/vapi/types/create_api_request_tool_dto.py @@ -0,0 +1,119 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .backoff_plan import BackoffPlan +from .create_api_request_tool_dto_messages_item import CreateApiRequestToolDtoMessagesItem +from .create_api_request_tool_dto_method import CreateApiRequestToolDtoMethod +from .tool_parameter import ToolParameter +from .tool_rejection_plan import ToolRejectionPlan +from .variable_extraction_plan import VariableExtractionPlan + + +class CreateApiRequestToolDto(UncheckedBaseModel): + messages: typing.Optional[typing.List[CreateApiRequestToolDtoMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + method: CreateApiRequestToolDtoMethod + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="timeoutSeconds"), + pydantic.Field( + alias="timeoutSeconds", + description="This is the timeout in seconds for the request. Defaults to 20 seconds.\n\n@default 20", + ), + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="credentialId"), + pydantic.Field(alias="credentialId", description="The credential ID for API request authentication"), + ] = None + encrypted_paths: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="encryptedPaths"), + pydantic.Field( + alias="encryptedPaths", + description="This is the paths to encrypt in the request body if credentialId and encryptionPlan are defined.", + ), + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = pydantic.Field(default=None) + """ + Static key-value pairs merged into the request body. Values support Liquid templates. + """ + + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the tool. This will be passed to the model. + + Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 40. + """ + + description: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the description of the tool. This will be passed to the model. + """ + + url: str = pydantic.Field() + """ + This is where the request will be sent. + """ + + body: typing.Optional["JsonSchema"] = pydantic.Field(default=None) + """ + This is the body of the request. + """ + + headers: typing.Optional["JsonSchema"] = pydantic.Field(default=None) + """ + These are the headers to send with the request. + """ + + backoff_plan: typing_extensions.Annotated[ + typing.Optional[BackoffPlan], + FieldMetadata(alias="backoffPlan"), + pydantic.Field( + alias="backoffPlan", + description="This is the backoff plan if the request fails. Defaults to undefined (the request will not be retried).\n\n@default undefined (the request will not be retried)", + ), + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field( + alias="variableExtractionPlan", + description='This is the plan to extract variables from the tool\'s response. These will be accessible during the call and stored in `call.artifact.variableValues` after the call.\n\nUsage:\n1. Use `aliases` to extract variables from the tool\'s response body. (Most common case)\n\n```json\n{\n "aliases": [\n {\n "key": "customerName",\n "value": "{{customer.name}}"\n },\n {\n "key": "customerAge",\n "value": "{{customer.age}}"\n }\n ]\n}\n```\n\nThe tool response body is made available to the liquid template.\n\n2. Use `aliases` to extract variables from the tool\'s response body if the response is an array.\n\n```json\n{\n "aliases": [\n {\n "key": "customerName",\n "value": "{{$[0].name}}"\n },\n {\n "key": "customerAge",\n "value": "{{$[0].age}}"\n }\n ]\n}\n```\n\n$ is a shorthand for the tool\'s response body. `$[0]` is the first item in the array. `$[n]` is the nth item in the array. Note, $ is available regardless of the response body type (both object and array).\n\n3. Use `aliases` to extract variables from the tool\'s response headers.\n\n```json\n{\n "aliases": [\n {\n "key": "customerName",\n "value": "{{tool.response.headers.customer-name}}"\n },\n {\n "key": "customerAge",\n "value": "{{tool.response.headers.customer-age}}"\n }\n ]\n}\n```\n\n`tool.response` is made available to the liquid template. Particularly, both `tool.response.headers` and `tool.response.body` are available. Note, `tool.response` is available regardless of the response body type (both object and array).\n\n4. Use `schema` to extract a large portion of the tool\'s response body.\n\n4.1. If you hit example.com and it returns `{"name": "John", "age": 30}`, then you can specify the schema as:\n\n```json\n{\n "schema": {\n "type": "object",\n "properties": {\n "name": {\n "type": "string"\n },\n "age": {\n "type": "number"\n }\n }\n }\n}\n```\nThese will be extracted as `{{ name }}` and `{{ age }}` respectively. To emphasize, object properties are extracted as direct global variables.\n\n4.2. If you hit example.com and it returns `{"name": {"first": "John", "last": "Doe"}}`, then you can specify the schema as:\n\n```json\n{\n "schema": {\n "type": "object",\n "properties": {\n "name": {\n "type": "object",\n "properties": {\n "first": {\n "type": "string"\n },\n "last": {\n "type": "string"\n }\n }\n }\n }\n }\n}\n```\n\nThese will be extracted as `{{ name }}`. And, `{{ name.first }}` and `{{ name.last }}` will be accessible.\n\n4.3. If you hit example.com and it returns `["94123", "94124"]`, then you can specify the schema as:\n\n```json\n{\n "schema": {\n "type": "array",\n "title": "zipCodes",\n "items": {\n "type": "string"\n }\n }\n}\n```\n\nThis will be extracted as `{{ zipCodes }}`. To access the array items, you can use `{{ zipCodes[0] }}` and `{{ zipCodes[1] }}`.\n\n4.4. If you hit example.com and it returns `[{"name": "John", "age": 30, "zipCodes": ["94123", "94124"]}, {"name": "Jane", "age": 25, "zipCodes": ["94125", "94126"]}]`, then you can specify the schema as:\n\n```json\n{\n "schema": {\n "type": "array",\n "title": "people",\n "items": {\n "type": "object",\n "properties": {\n "name": {\n "type": "string"\n },\n "age": {\n "type": "number"\n },\n "zipCodes": {\n "type": "array",\n "items": {\n "type": "string"\n }\n }\n }\n }\n }\n}\n```\n\nThis will be extracted as `{{ people }}`. To access the array items, you can use `{{ people[n].name }}`, `{{ people[n].age }}`, `{{ people[n].zipCodes }}`, `{{ people[n].zipCodes[0] }}` and `{{ people[n].zipCodes[1] }}`.\n\nNote: Both `aliases` and `schema` can be used together.', + ), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .json_schema import JsonSchema # noqa: E402, I001 + +update_forward_refs(CreateApiRequestToolDto, JsonSchema=JsonSchema) diff --git a/src/vapi/types/create_api_request_tool_dto_messages_item.py b/src/vapi/types/create_api_request_tool_dto_messages_item.py new file mode 100644 index 00000000..92d96428 --- /dev/null +++ b/src/vapi/types/create_api_request_tool_dto_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class CreateApiRequestToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateApiRequestToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateApiRequestToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateApiRequestToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateApiRequestToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + CreateApiRequestToolDtoMessagesItem_RequestStart, + CreateApiRequestToolDtoMessagesItem_RequestComplete, + CreateApiRequestToolDtoMessagesItem_RequestFailed, + CreateApiRequestToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/create_api_request_tool_dto_method.py b/src/vapi/types/create_api_request_tool_dto_method.py new file mode 100644 index 00000000..666b73dc --- /dev/null +++ b/src/vapi/types/create_api_request_tool_dto_method.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CreateApiRequestToolDtoMethod = typing.Union[typing.Literal["POST", "GET", "PUT", "PATCH", "DELETE"], typing.Any] diff --git a/src/vapi/types/create_assembly_ai_credential_dto.py b/src/vapi/types/create_assembly_ai_credential_dto.py new file mode 100644 index 00000000..0f72f23b --- /dev/null +++ b/src/vapi/types/create_assembly_ai_credential_dto.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class CreateAssemblyAiCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_assistant_dto.py b/src/vapi/types/create_assistant_dto.py index e54ec790..45076aed 100644 --- a/src/vapi/types/create_assistant_dto.py +++ b/src/vapi/types/create_assistant_dto.py @@ -1,40 +1,42 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -from .callback_step import CallbackStep -from .create_workflow_block_dto import CreateWorkflowBlockDto -from .handoff_step import HandoffStep + import typing -from .create_assistant_dto_transcriber import CreateAssistantDtoTranscriber + import pydantic -from .create_assistant_dto_model import CreateAssistantDtoModel -from .create_assistant_dto_voice import CreateAssistantDtoVoice import typing_extensions -from .create_assistant_dto_first_message_mode import CreateAssistantDtoFirstMessageMode +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.serialization import FieldMetadata -from .create_assistant_dto_client_messages_item import CreateAssistantDtoClientMessagesItem -from .create_assistant_dto_server_messages_item import CreateAssistantDtoServerMessagesItem -from .create_assistant_dto_background_sound import CreateAssistantDtoBackgroundSound -from .transport_configuration_twilio import TransportConfigurationTwilio -from .twilio_voicemail_detection import TwilioVoicemailDetection +from ..core.unchecked_base_model import UncheckedBaseModel from .analysis_plan import AnalysisPlan from .artifact_plan import ArtifactPlan -from .message_plan import MessagePlan +from .background_speech_denoising_plan import BackgroundSpeechDenoisingPlan +from .compliance_plan import CompliancePlan +from .create_assistant_dto_background_sound import CreateAssistantDtoBackgroundSound +from .create_assistant_dto_client_messages_item import CreateAssistantDtoClientMessagesItem +from .create_assistant_dto_credentials_item import CreateAssistantDtoCredentialsItem +from .create_assistant_dto_first_message_mode import CreateAssistantDtoFirstMessageMode +from .create_assistant_dto_server_messages_item import CreateAssistantDtoServerMessagesItem +from .create_assistant_dto_transcriber import CreateAssistantDtoTranscriber +from .create_assistant_dto_voice import CreateAssistantDtoVoice +from .create_assistant_dto_voicemail_detection import CreateAssistantDtoVoicemailDetection +from .keypad_input_plan import KeypadInputPlan +from .langfuse_observability_plan import LangfuseObservabilityPlan +from .monitor_plan import MonitorPlan +from .server import Server from .start_speaking_plan import StartSpeakingPlan from .stop_speaking_plan import StopSpeakingPlan -from .monitor_plan import MonitorPlan -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.pydantic_utilities import update_forward_refs +from .transport_configuration_twilio import TransportConfigurationTwilio -class CreateAssistantDto(UniversalBaseModel): +class CreateAssistantDto(UncheckedBaseModel): transcriber: typing.Optional[CreateAssistantDtoTranscriber] = pydantic.Field(default=None) """ These are the options for the assistant's transcriber. """ - model: typing.Optional[CreateAssistantDtoModel] = pydantic.Field(default=None) + model: typing.Optional["CreateAssistantDtoModel"] = pydantic.Field(default=None) """ These are the options for the assistant's LLM. """ @@ -44,105 +46,99 @@ class CreateAssistantDto(UniversalBaseModel): These are the options for the assistant's voice. """ + first_message: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="firstMessage"), + pydantic.Field( + alias="firstMessage", + description="This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.).\n\nIf unspecified, assistant will wait for user to speak and use the model to respond once they speak.", + ), + ] = None + first_message_interruptions_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="firstMessageInterruptionsEnabled"), + pydantic.Field(alias="firstMessageInterruptionsEnabled"), + ] = None first_message_mode: typing_extensions.Annotated[ - typing.Optional[CreateAssistantDtoFirstMessageMode], FieldMetadata(alias="firstMessageMode") - ] = pydantic.Field(default=None) - """ - This is the mode for the first message. Default is 'assistant-speaks-first'. - - Use: - - - 'assistant-speaks-first' to have the assistant speak first. - - 'assistant-waits-for-user' to have the assistant wait for the user to speak first. - - 'assistant-speaks-first-with-model-generated-message' to have the assistant speak first with a message generated by the model based on the conversation state. (`assistant.model.messages` at call start, `call.messages` at squad transfer points). - - @default 'assistant-speaks-first' - """ - - hipaa_enabled: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="hipaaEnabled")] = ( - pydantic.Field(default=None) - ) - """ - When this is enabled, no logs, recordings, or transcriptions will be stored. At the end of the call, you will still receive an end-of-call-report message to store on your server. Defaults to false. - """ - + typing.Optional[CreateAssistantDtoFirstMessageMode], + FieldMetadata(alias="firstMessageMode"), + pydantic.Field( + alias="firstMessageMode", + description="This is the mode for the first message. Default is 'assistant-speaks-first'.\n\nUse:\n- 'assistant-speaks-first' to have the assistant speak first.\n- 'assistant-waits-for-user' to have the assistant wait for the user to speak first.\n- 'assistant-speaks-first-with-model-generated-message' to have the assistant speak first with a message generated by the model based on the conversation state. (`assistant.model.messages` at call start, `call.messages` at squad transfer points).\n\n@default 'assistant-speaks-first'", + ), + ] = None + voicemail_detection: typing_extensions.Annotated[ + typing.Optional[CreateAssistantDtoVoicemailDetection], + FieldMetadata(alias="voicemailDetection"), + pydantic.Field( + alias="voicemailDetection", + description="These are the settings to configure or disable voicemail detection. Alternatively, voicemail detection can be configured using the model.tools=[VoicemailTool].\nBy default, voicemail detection is disabled.", + ), + ] = None client_messages: typing_extensions.Annotated[ - typing.Optional[typing.List[CreateAssistantDtoClientMessagesItem]], FieldMetadata(alias="clientMessages") - ] = pydantic.Field(default=None) - """ - These are the messages that will be sent to your Client SDKs. Default is conversation-update,function-call,hang,model-output,speech-update,status-update,transcript,tool-calls,user-interrupted,voice-input. You can check the shape of the messages in ClientMessage schema. - """ - + typing.Optional[typing.List[CreateAssistantDtoClientMessagesItem]], + FieldMetadata(alias="clientMessages"), + pydantic.Field( + alias="clientMessages", + description="These are the messages that will be sent to your Client SDKs. Default is conversation-update,function-call,hang,model-output,speech-update,status-update,transfer-update,transcript,tool-calls,user-interrupted,voice-input,workflow.node.started,assistant.started. You can check the shape of the messages in ClientMessage schema.", + ), + ] = None server_messages: typing_extensions.Annotated[ - typing.Optional[typing.List[CreateAssistantDtoServerMessagesItem]], FieldMetadata(alias="serverMessages") - ] = pydantic.Field(default=None) - """ - These are the messages that will be sent to your Server URL. Default is conversation-update,end-of-call-report,function-call,hang,speech-update,status-update,tool-calls,transfer-destination-request,user-interrupted. You can check the shape of the messages in ServerMessage schema. - """ - - silence_timeout_seconds: typing_extensions.Annotated[ - typing.Optional[float], FieldMetadata(alias="silenceTimeoutSeconds") - ] = pydantic.Field(default=None) - """ - How many seconds of silence to wait before ending the call. Defaults to 30. - - @default 30 - """ - + typing.Optional[typing.List[CreateAssistantDtoServerMessagesItem]], + FieldMetadata(alias="serverMessages"), + pydantic.Field( + alias="serverMessages", + description="These are the messages that will be sent to your Server URL. Default is conversation-update,end-of-call-report,function-call,hang,speech-update,status-update,tool-calls,transfer-destination-request,handoff-destination-request,user-interrupted,assistant.started. You can check the shape of the messages in ServerMessage schema.", + ), + ] = None max_duration_seconds: typing_extensions.Annotated[ - typing.Optional[float], FieldMetadata(alias="maxDurationSeconds") - ] = pydantic.Field(default=None) - """ - This is the maximum number of seconds that the call will last. When the call reaches this duration, it will be ended. - - @default 600 (10 minutes) - """ - + typing.Optional[float], + FieldMetadata(alias="maxDurationSeconds"), + pydantic.Field( + alias="maxDurationSeconds", + description="This is the maximum number of seconds that the call will last. When the call reaches this duration, it will be ended.\n\n@default 600 (10 minutes)", + ), + ] = None background_sound: typing_extensions.Annotated[ - typing.Optional[CreateAssistantDtoBackgroundSound], FieldMetadata(alias="backgroundSound") - ] = pydantic.Field(default=None) - """ - This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'. - """ - - backchanneling_enabled: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="backchannelingEnabled") - ] = pydantic.Field(default=None) - """ - This determines whether the model says 'mhmm', 'ahem' etc. while user is speaking. - - Default `false` while in beta. - - @default false - """ - - background_denoising_enabled: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="backgroundDenoisingEnabled") - ] = pydantic.Field(default=None) - """ - This enables filtering of noise and background speech while the user is talking. - - Default `false` while in beta. - - @default false - """ - + typing.Optional[CreateAssistantDtoBackgroundSound], + FieldMetadata(alias="backgroundSound"), + pydantic.Field( + alias="backgroundSound", + description="This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'.\nYou can also provide a custom sound by providing a URL to an audio file.", + ), + ] = None model_output_in_messages_enabled: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="modelOutputInMessagesEnabled") - ] = pydantic.Field(default=None) + typing.Optional[bool], + FieldMetadata(alias="modelOutputInMessagesEnabled"), + pydantic.Field( + alias="modelOutputInMessagesEnabled", + description="This determines whether the model's output is used in conversation history rather than the transcription of assistant's speech.\n\n@default false", + ), + ] = None + transport_configurations: typing_extensions.Annotated[ + typing.Optional[typing.List[TransportConfigurationTwilio]], + FieldMetadata(alias="transportConfigurations"), + pydantic.Field( + alias="transportConfigurations", + description="These are the configurations to be passed to the transport providers of assistant's calls, like Twilio. You can store multiple configurations for different transport providers. For a call, only the configuration matching the call transport provider is used.", + ), + ] = None + observability_plan: typing_extensions.Annotated[ + typing.Optional[LangfuseObservabilityPlan], + FieldMetadata(alias="observabilityPlan"), + pydantic.Field( + alias="observabilityPlan", + description="This is the plan for observability of assistant's calls.\n\nCurrently, only Langfuse is supported.", + ), + ] = None + credentials: typing.Optional[typing.List[CreateAssistantDtoCredentialsItem]] = pydantic.Field(default=None) """ - This determines whether the model's output is used in conversation history rather than the transcription of assistant's speech. - - Default `false` while in beta. - - @default false + These are dynamic credentials that will be used for the assistant calls. By default, all the credentials are available for use in the call but you can supplement an additional credentials using this. Dynamic credentials override existing credentials. """ - transport_configurations: typing_extensions.Annotated[ - typing.Optional[typing.List[TransportConfigurationTwilio]], FieldMetadata(alias="transportConfigurations") - ] = pydantic.Field(default=None) + hooks: typing.Optional[typing.List["CreateAssistantDtoHooksItem"]] = pydantic.Field(default=None) """ - These are the configurations to be passed to the transport providers of assistant's calls, like Twilio. You can store multiple configurations for different transport providers. For a call, only the configuration matching the call transport provider is used. + This is a set of actions that will be performed on certain events. """ name: typing.Optional[str] = pydantic.Field(default=None) @@ -152,147 +148,110 @@ class CreateAssistantDto(UniversalBaseModel): This is required when you want to transfer between assistants in a call. """ - first_message: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="firstMessage")] = ( - pydantic.Field(default=None) - ) - """ - This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.). - - If unspecified, assistant will wait for user to speak and use the model to respond once they speak. - """ - - voicemail_detection: typing_extensions.Annotated[ - typing.Optional[TwilioVoicemailDetection], FieldMetadata(alias="voicemailDetection") - ] = pydantic.Field(default=None) - """ - These are the settings to configure or disable voicemail detection. Alternatively, voicemail detection can be configured using the model.tools=[VoicemailTool]. - This uses Twilio's built-in detection while the VoicemailTool relies on the model to detect if a voicemail was reached. - You can use neither of them, one of them, or both of them. By default, Twilio built-in detection is enabled while VoicemailTool is not. - """ - - voicemail_message: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="voicemailMessage")] = ( - pydantic.Field(default=None) - ) - """ - This is the message that the assistant will say if the call is forwarded to voicemail. - - If unspecified, it will hang up. - """ - - end_call_message: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="endCallMessage")] = ( - pydantic.Field(default=None) - ) - """ - This is the message that the assistant will say if it ends the call. - - If unspecified, it will hang up without saying anything. - """ - + voicemail_message: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="voicemailMessage"), + pydantic.Field( + alias="voicemailMessage", + description="This is the message that the assistant will say if the call is forwarded to voicemail.\n\nIf unspecified, it will hang up.", + ), + ] = None + end_call_message: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="endCallMessage"), + pydantic.Field( + alias="endCallMessage", + description="This is the message that the assistant will say if it ends the call.\n\nIf unspecified, it will hang up without saying anything.", + ), + ] = None end_call_phrases: typing_extensions.Annotated[ - typing.Optional[typing.List[str]], FieldMetadata(alias="endCallPhrases") - ] = pydantic.Field(default=None) - """ - This list contains phrases that, if spoken by the assistant, will trigger the call to be hung up. Case insensitive. - """ - - metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None) + typing.Optional[typing.List[str]], + FieldMetadata(alias="endCallPhrases"), + pydantic.Field( + alias="endCallPhrases", + description="This list contains phrases that, if spoken by the assistant, will trigger the call to be hung up. Case insensitive.", + ), + ] = None + compliance_plan: typing_extensions.Annotated[ + typing.Optional[CompliancePlan], FieldMetadata(alias="compliancePlan"), pydantic.Field(alias="compliancePlan") + ] = None + metadata: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) """ This is for metadata you want to store on the assistant. """ - server_url: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="serverUrl")] = pydantic.Field( - default=None - ) - """ - This is the URL Vapi will communicate with via HTTP GET and POST Requests. This is used for retrieving context, function calling, and end-of-call reports. - - All requests will be sent with the call object among other things relevant to that message. You can find more details in the Server URL documentation. - - This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: tool.server.url > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl - """ - - server_url_secret: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="serverUrlSecret")] = ( - pydantic.Field(default=None) - ) - """ - This is the secret you can set that Vapi will send with every request to your server. Will be sent as a header called x-vapi-secret. - - Same precedence logic as serverUrl. - """ - - analysis_plan: typing_extensions.Annotated[typing.Optional[AnalysisPlan], FieldMetadata(alias="analysisPlan")] = ( - pydantic.Field(default=None) - ) - """ - This is the plan for analysis of assistant's calls. Stored in `call.analysis`. - """ - - artifact_plan: typing_extensions.Annotated[typing.Optional[ArtifactPlan], FieldMetadata(alias="artifactPlan")] = ( - pydantic.Field(default=None) - ) - """ - This is the plan for artifacts generated during assistant's calls. Stored in `call.artifact`. - - Note: `recordingEnabled` is currently at the root level. It will be moved to `artifactPlan` in the future, but will remain backwards compatible. - """ - - message_plan: typing_extensions.Annotated[typing.Optional[MessagePlan], FieldMetadata(alias="messagePlan")] = ( - pydantic.Field(default=None) - ) - """ - This is the plan for static predefined messages that can be spoken by the assistant during the call, like `idleMessages`. - - Note: `firstMessage`, `voicemailMessage`, and `endCallMessage` are currently at the root level. They will be moved to `messagePlan` in the future, but will remain backwards compatible. - """ - + background_speech_denoising_plan: typing_extensions.Annotated[ + typing.Optional[BackgroundSpeechDenoisingPlan], + FieldMetadata(alias="backgroundSpeechDenoisingPlan"), + pydantic.Field( + alias="backgroundSpeechDenoisingPlan", + description="This enables filtering of noise and background speech while the user is talking.\n\nFeatures:\n- Smart denoising using Krisp\n- Fourier denoising\n\nSmart denoising can be combined with or used independently of Fourier denoising.\n\nOrder of precedence:\n- Smart denoising\n- Fourier denoising", + ), + ] = None + analysis_plan: typing_extensions.Annotated[ + typing.Optional[AnalysisPlan], + FieldMetadata(alias="analysisPlan"), + pydantic.Field( + alias="analysisPlan", + description="This is the plan for analysis of assistant's calls. Stored in `call.analysis`.", + ), + ] = None + artifact_plan: typing_extensions.Annotated[ + typing.Optional[ArtifactPlan], + FieldMetadata(alias="artifactPlan"), + pydantic.Field( + alias="artifactPlan", + description="This is the plan for artifacts generated during assistant's calls. Stored in `call.artifact`.", + ), + ] = None start_speaking_plan: typing_extensions.Annotated[ - typing.Optional[StartSpeakingPlan], FieldMetadata(alias="startSpeakingPlan") - ] = pydantic.Field(default=None) - """ - This is the plan for when the assistant should start talking. - - You should configure this if you're running into these issues: - - - The assistant is too slow to start talking after the customer is done speaking. - - The assistant is too fast to start talking after the customer is done speaking. - - The assistant is so fast that it's actually interrupting the customer. - """ - + typing.Optional[StartSpeakingPlan], + FieldMetadata(alias="startSpeakingPlan"), + pydantic.Field( + alias="startSpeakingPlan", + description="This is the plan for when the assistant should start talking.\n\nYou should configure this if you're running into these issues:\n- The assistant is too slow to start talking after the customer is done speaking.\n- The assistant is too fast to start talking after the customer is done speaking.\n- The assistant is so fast that it's actually interrupting the customer.", + ), + ] = None stop_speaking_plan: typing_extensions.Annotated[ - typing.Optional[StopSpeakingPlan], FieldMetadata(alias="stopSpeakingPlan") - ] = pydantic.Field(default=None) - """ - This is the plan for when assistant should stop talking on customer interruption. - - You should configure this if you're running into these issues: - - - The assistant is too slow to recognize customer's interruption. - - The assistant is too fast to recognize customer's interruption. - - The assistant is getting interrupted by phrases that are just acknowledgments. - - The assistant is getting interrupted by background noises. - - The assistant is not properly stopping -- it starts talking right after getting interrupted. - """ - - monitor_plan: typing_extensions.Annotated[typing.Optional[MonitorPlan], FieldMetadata(alias="monitorPlan")] = ( - pydantic.Field(default=None) - ) - """ - This is the plan for real-time monitoring of the assistant's calls. - - Usage: + typing.Optional[StopSpeakingPlan], + FieldMetadata(alias="stopSpeakingPlan"), + pydantic.Field( + alias="stopSpeakingPlan", + description="This is the plan for when assistant should stop talking on customer interruption.\n\nYou should configure this if you're running into these issues:\n- The assistant is too slow to recognize customer's interruption.\n- The assistant is too fast to recognize customer's interruption.\n- The assistant is getting interrupted by phrases that are just acknowledgments.\n- The assistant is getting interrupted by background noises.\n- The assistant is not properly stopping -- it starts talking right after getting interrupted.", + ), + ] = None + monitor_plan: typing_extensions.Annotated[ + typing.Optional[MonitorPlan], + FieldMetadata(alias="monitorPlan"), + pydantic.Field( + alias="monitorPlan", + description="This is the plan for real-time monitoring of the assistant's calls.\n\nUsage:\n- To enable live listening of the assistant's calls, set `monitorPlan.listenEnabled` to `true`.\n- To enable live control of the assistant's calls, set `monitorPlan.controlEnabled` to `true`.\n- To attach monitors to the assistant, set `monitorPlan.monitorIds` to the set of monitor ids.", + ), + ] = None + credential_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="credentialIds"), + pydantic.Field( + alias="credentialIds", + description="These are the credentials that will be used for the assistant calls. By default, all the credentials are available for use in the call but you can provide a subset using this.", + ), + ] = None + server: typing.Optional[Server] = pydantic.Field(default=None) + """ + This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema. - - To enable live listening of the assistant's calls, set `monitorPlan.listenEnabled` to `true`. - - To enable live control of the assistant's calls, set `monitorPlan.controlEnabled` to `true`. + The order of precedence is: - Note, `serverMessages`, `clientMessages`, `serverUrl` and `serverUrlSecret` are currently at the root level but will be moved to `monitorPlan` in the future. Will remain backwards compatible + 1. assistant.server.url + 2. phoneNumber.serverUrl + 3. org.serverUrl """ - credential_ids: typing_extensions.Annotated[ - typing.Optional[typing.List[str]], FieldMetadata(alias="credentialIds") - ] = pydantic.Field(default=None) - """ - These are the credentials that will be used for the assistant calls. By default, all the credentials are available for use in the call but you can provide a subset using this. - """ + keypad_input_plan: typing_extensions.Annotated[ + typing.Optional[KeypadInputPlan], + FieldMetadata(alias="keypadInputPlan"), + pydantic.Field(alias="keypadInputPlan"), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -304,6 +263,119 @@ class Config: extra = pydantic.Extra.allow -update_forward_refs(CallbackStep, CreateAssistantDto=CreateAssistantDto) -update_forward_refs(CreateWorkflowBlockDto, CreateAssistantDto=CreateAssistantDto) -update_forward_refs(HandoffStep, CreateAssistantDto=CreateAssistantDto) +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + CreateAssistantDto, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/create_assistant_dto_background_sound.py b/src/vapi/types/create_assistant_dto_background_sound.py index 6a0c5ef3..ce7f05d7 100644 --- a/src/vapi/types/create_assistant_dto_background_sound.py +++ b/src/vapi/types/create_assistant_dto_background_sound.py @@ -2,4 +2,6 @@ import typing -CreateAssistantDtoBackgroundSound = typing.Union[typing.Literal["off", "office"], typing.Any] +from .create_assistant_dto_background_sound_zero import CreateAssistantDtoBackgroundSoundZero + +CreateAssistantDtoBackgroundSound = typing.Union[CreateAssistantDtoBackgroundSoundZero, str] diff --git a/src/vapi/types/create_assistant_dto_background_sound_zero.py b/src/vapi/types/create_assistant_dto_background_sound_zero.py new file mode 100644 index 00000000..d7dc88d6 --- /dev/null +++ b/src/vapi/types/create_assistant_dto_background_sound_zero.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CreateAssistantDtoBackgroundSoundZero = typing.Union[typing.Literal["off", "office"], typing.Any] diff --git a/src/vapi/types/create_assistant_dto_client_messages_item.py b/src/vapi/types/create_assistant_dto_client_messages_item.py index aff96446..b015a342 100644 --- a/src/vapi/types/create_assistant_dto_client_messages_item.py +++ b/src/vapi/types/create_assistant_dto_client_messages_item.py @@ -5,6 +5,7 @@ CreateAssistantDtoClientMessagesItem = typing.Union[ typing.Literal[ "conversation-update", + "assistant.speechStarted", "function-call", "function-call-result", "hang", @@ -16,8 +17,12 @@ "transcript", "tool-calls", "tool-calls-result", + "tool.completed", + "transfer-update", "user-interrupted", "voice-input", + "workflow.node.started", + "assistant.started", ], typing.Any, ] diff --git a/src/vapi/types/create_assistant_dto_credentials_item.py b/src/vapi/types/create_assistant_dto_credentials_item.py new file mode 100644 index 00000000..9eceeebe --- /dev/null +++ b/src/vapi/types/create_assistant_dto_credentials_item.py @@ -0,0 +1,1070 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .azure_blob_storage_bucket_plan import AzureBlobStorageBucketPlan +from .bucket_plan import BucketPlan +from .cloudflare_r_2_bucket_plan import CloudflareR2BucketPlan +from .create_anthropic_bedrock_credential_dto_authentication_plan import ( + CreateAnthropicBedrockCredentialDtoAuthenticationPlan, +) +from .create_anthropic_bedrock_credential_dto_region import CreateAnthropicBedrockCredentialDtoRegion +from .create_azure_credential_dto_region import CreateAzureCredentialDtoRegion +from .create_azure_credential_dto_service import CreateAzureCredentialDtoService +from .create_azure_open_ai_credential_dto_models_item import CreateAzureOpenAiCredentialDtoModelsItem +from .create_azure_open_ai_credential_dto_region import CreateAzureOpenAiCredentialDtoRegion +from .create_custom_credential_dto_authentication_plan import CreateCustomCredentialDtoAuthenticationPlan +from .create_custom_credential_dto_encryption_plan import CreateCustomCredentialDtoEncryptionPlan +from .create_webhook_credential_dto_authentication_plan import CreateWebhookCredentialDtoAuthenticationPlan +from .gcp_key import GcpKey +from .o_auth_2_authentication_plan import OAuth2AuthenticationPlan +from .oauth_2_authentication_session import Oauth2AuthenticationSession +from .sbc_configuration import SbcConfiguration +from .sip_trunk_gateway import SipTrunkGateway +from .sip_trunk_outbound_authentication_plan import SipTrunkOutboundAuthenticationPlan +from .supabase_bucket_plan import SupabaseBucketPlan + + +class CreateAssistantDtoCredentialsItem_11Labs(UncheckedBaseModel): + provider: typing.Literal["11labs"] = "11labs" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_Anthropic(UncheckedBaseModel): + provider: typing.Literal["anthropic"] = "anthropic" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_AnthropicBedrock(UncheckedBaseModel): + provider: typing.Literal["anthropic-bedrock"] = "anthropic-bedrock" + region: CreateAnthropicBedrockCredentialDtoRegion + authentication_plan: typing_extensions.Annotated[ + CreateAnthropicBedrockCredentialDtoAuthenticationPlan, + FieldMetadata(alias="authenticationPlan"), + pydantic.Field(alias="authenticationPlan"), + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_Anyscale(UncheckedBaseModel): + provider: typing.Literal["anyscale"] = "anyscale" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_AssemblyAi(UncheckedBaseModel): + provider: typing.Literal["assembly-ai"] = "assembly-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_AzureOpenai(UncheckedBaseModel): + provider: typing.Literal["azure-openai"] = "azure-openai" + region: CreateAzureOpenAiCredentialDtoRegion + models: typing.List[CreateAzureOpenAiCredentialDtoModelsItem] + open_ai_key: typing_extensions.Annotated[str, FieldMetadata(alias="openAIKey"), pydantic.Field(alias="openAIKey")] + ocp_apim_subscription_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="ocpApimSubscriptionKey"), + pydantic.Field(alias="ocpApimSubscriptionKey"), + ] = None + open_ai_endpoint: typing_extensions.Annotated[ + str, FieldMetadata(alias="openAIEndpoint"), pydantic.Field(alias="openAIEndpoint") + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_Azure(UncheckedBaseModel): + provider: typing.Literal["azure"] = "azure" + service: CreateAzureCredentialDtoService + region: typing.Optional[CreateAzureCredentialDtoRegion] = None + api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey") + ] = None + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="fallbackIndex"), pydantic.Field(alias="fallbackIndex") + ] = None + bucket_plan: typing_extensions.Annotated[ + typing.Optional[AzureBlobStorageBucketPlan], + FieldMetadata(alias="bucketPlan"), + pydantic.Field(alias="bucketPlan"), + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_ByoSipTrunk(UncheckedBaseModel): + provider: typing.Literal["byo-sip-trunk"] = "byo-sip-trunk" + gateways: typing.List[SipTrunkGateway] + outbound_authentication_plan: typing_extensions.Annotated[ + typing.Optional[SipTrunkOutboundAuthenticationPlan], + FieldMetadata(alias="outboundAuthenticationPlan"), + pydantic.Field(alias="outboundAuthenticationPlan"), + ] = None + outbound_leading_plus_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="outboundLeadingPlusEnabled"), + pydantic.Field(alias="outboundLeadingPlusEnabled"), + ] = None + tech_prefix: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="techPrefix"), pydantic.Field(alias="techPrefix") + ] = None + sip_diversion_header: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipDiversionHeader"), pydantic.Field(alias="sipDiversionHeader") + ] = None + sbc_configuration: typing_extensions.Annotated[ + typing.Optional[SbcConfiguration], + FieldMetadata(alias="sbcConfiguration"), + pydantic.Field(alias="sbcConfiguration"), + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_Cartesia(UncheckedBaseModel): + provider: typing.Literal["cartesia"] = "cartesia" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_Cerebras(UncheckedBaseModel): + provider: typing.Literal["cerebras"] = "cerebras" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_Cloudflare(UncheckedBaseModel): + provider: typing.Literal["cloudflare"] = "cloudflare" + account_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="accountId"), pydantic.Field(alias="accountId") + ] = None + api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey") + ] = None + account_email: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="accountEmail"), pydantic.Field(alias="accountEmail") + ] = None + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="fallbackIndex"), pydantic.Field(alias="fallbackIndex") + ] = None + bucket_plan: typing_extensions.Annotated[ + typing.Optional[CloudflareR2BucketPlan], FieldMetadata(alias="bucketPlan"), pydantic.Field(alias="bucketPlan") + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_CustomLlm(UncheckedBaseModel): + provider: typing.Literal["custom-llm"] = "custom-llm" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + authentication_plan: typing_extensions.Annotated[ + typing.Optional[OAuth2AuthenticationPlan], + FieldMetadata(alias="authenticationPlan"), + pydantic.Field(alias="authenticationPlan"), + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_Deepgram(UncheckedBaseModel): + provider: typing.Literal["deepgram"] = "deepgram" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + api_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="apiUrl"), pydantic.Field(alias="apiUrl") + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_Deepinfra(UncheckedBaseModel): + provider: typing.Literal["deepinfra"] = "deepinfra" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_DeepSeek(UncheckedBaseModel): + provider: typing.Literal["deep-seek"] = "deep-seek" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_Gcp(UncheckedBaseModel): + provider: typing.Literal["gcp"] = "gcp" + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="fallbackIndex"), pydantic.Field(alias="fallbackIndex") + ] = None + gcp_key: typing_extensions.Annotated[GcpKey, FieldMetadata(alias="gcpKey"), pydantic.Field(alias="gcpKey")] + region: typing.Optional[str] = None + bucket_plan: typing_extensions.Annotated[ + typing.Optional[BucketPlan], FieldMetadata(alias="bucketPlan"), pydantic.Field(alias="bucketPlan") + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_Gladia(UncheckedBaseModel): + provider: typing.Literal["gladia"] = "gladia" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_Gohighlevel(UncheckedBaseModel): + provider: typing.Literal["gohighlevel"] = "gohighlevel" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_Google(UncheckedBaseModel): + provider: typing.Literal["google"] = "google" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_Groq(UncheckedBaseModel): + provider: typing.Literal["groq"] = "groq" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_InflectionAi(UncheckedBaseModel): + provider: typing.Literal["inflection-ai"] = "inflection-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_Langfuse(UncheckedBaseModel): + provider: typing.Literal["langfuse"] = "langfuse" + public_key: typing_extensions.Annotated[str, FieldMetadata(alias="publicKey"), pydantic.Field(alias="publicKey")] + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + api_url: typing_extensions.Annotated[str, FieldMetadata(alias="apiUrl"), pydantic.Field(alias="apiUrl")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_Lmnt(UncheckedBaseModel): + provider: typing.Literal["lmnt"] = "lmnt" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_Make(UncheckedBaseModel): + provider: typing.Literal["make"] = "make" + team_id: typing_extensions.Annotated[str, FieldMetadata(alias="teamId"), pydantic.Field(alias="teamId")] + region: str + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_Openai(UncheckedBaseModel): + provider: typing.Literal["openai"] = "openai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_Openrouter(UncheckedBaseModel): + provider: typing.Literal["openrouter"] = "openrouter" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_PerplexityAi(UncheckedBaseModel): + provider: typing.Literal["perplexity-ai"] = "perplexity-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_Playht(UncheckedBaseModel): + provider: typing.Literal["playht"] = "playht" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + user_id: typing_extensions.Annotated[str, FieldMetadata(alias="userId"), pydantic.Field(alias="userId")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_RimeAi(UncheckedBaseModel): + provider: typing.Literal["rime-ai"] = "rime-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_Runpod(UncheckedBaseModel): + provider: typing.Literal["runpod"] = "runpod" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_S3(UncheckedBaseModel): + provider: typing.Literal["s3"] = "s3" + aws_access_key_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="awsAccessKeyId"), pydantic.Field(alias="awsAccessKeyId") + ] + aws_secret_access_key: typing_extensions.Annotated[ + str, FieldMetadata(alias="awsSecretAccessKey"), pydantic.Field(alias="awsSecretAccessKey") + ] + region: str + s_3_bucket_name: typing_extensions.Annotated[ + str, FieldMetadata(alias="s3BucketName"), pydantic.Field(alias="s3BucketName") + ] + s_3_path_prefix: typing_extensions.Annotated[ + str, FieldMetadata(alias="s3PathPrefix"), pydantic.Field(alias="s3PathPrefix") + ] + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="fallbackIndex"), pydantic.Field(alias="fallbackIndex") + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_Supabase(UncheckedBaseModel): + provider: typing.Literal["supabase"] = "supabase" + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="fallbackIndex"), pydantic.Field(alias="fallbackIndex") + ] = None + bucket_plan: typing_extensions.Annotated[ + typing.Optional[SupabaseBucketPlan], FieldMetadata(alias="bucketPlan"), pydantic.Field(alias="bucketPlan") + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_SmallestAi(UncheckedBaseModel): + provider: typing.Literal["smallest-ai"] = "smallest-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_Tavus(UncheckedBaseModel): + provider: typing.Literal["tavus"] = "tavus" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_TogetherAi(UncheckedBaseModel): + provider: typing.Literal["together-ai"] = "together-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_Twilio(UncheckedBaseModel): + provider: typing.Literal["twilio"] = "twilio" + auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="authToken"), pydantic.Field(alias="authToken") + ] = None + api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey") + ] = None + api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="apiSecret"), pydantic.Field(alias="apiSecret") + ] = None + account_sid: typing_extensions.Annotated[str, FieldMetadata(alias="accountSid"), pydantic.Field(alias="accountSid")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_Vonage(UncheckedBaseModel): + provider: typing.Literal["vonage"] = "vonage" + api_secret: typing_extensions.Annotated[str, FieldMetadata(alias="apiSecret"), pydantic.Field(alias="apiSecret")] + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_Webhook(UncheckedBaseModel): + provider: typing.Literal["webhook"] = "webhook" + authentication_plan: typing_extensions.Annotated[ + CreateWebhookCredentialDtoAuthenticationPlan, + FieldMetadata(alias="authenticationPlan"), + pydantic.Field(alias="authenticationPlan"), + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_CustomCredential(UncheckedBaseModel): + provider: typing.Literal["custom-credential"] = "custom-credential" + authentication_plan: typing_extensions.Annotated[ + CreateCustomCredentialDtoAuthenticationPlan, + FieldMetadata(alias="authenticationPlan"), + pydantic.Field(alias="authenticationPlan"), + ] + encryption_plan: typing_extensions.Annotated[ + typing.Optional[CreateCustomCredentialDtoEncryptionPlan], + FieldMetadata(alias="encryptionPlan"), + pydantic.Field(alias="encryptionPlan"), + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_Xai(UncheckedBaseModel): + provider: typing.Literal["xai"] = "xai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_Neuphonic(UncheckedBaseModel): + provider: typing.Literal["neuphonic"] = "neuphonic" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_Hume(UncheckedBaseModel): + provider: typing.Literal["hume"] = "hume" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_Mistral(UncheckedBaseModel): + provider: typing.Literal["mistral"] = "mistral" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_Speechmatics(UncheckedBaseModel): + provider: typing.Literal["speechmatics"] = "speechmatics" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_Soniox(UncheckedBaseModel): + provider: typing.Literal["soniox"] = "soniox" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_Trieve(UncheckedBaseModel): + provider: typing.Literal["trieve"] = "trieve" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_GoogleCalendarOauth2Client(UncheckedBaseModel): + provider: typing.Literal["google.calendar.oauth2-client"] = "google.calendar.oauth2-client" + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_GoogleCalendarOauth2Authorization(UncheckedBaseModel): + provider: typing.Literal["google.calendar.oauth2-authorization"] = "google.calendar.oauth2-authorization" + authorization_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="authorizationId"), pydantic.Field(alias="authorizationId") + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_GoogleSheetsOauth2Authorization(UncheckedBaseModel): + provider: typing.Literal["google.sheets.oauth2-authorization"] = "google.sheets.oauth2-authorization" + authorization_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="authorizationId"), pydantic.Field(alias="authorizationId") + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_SlackOauth2Authorization(UncheckedBaseModel): + provider: typing.Literal["slack.oauth2-authorization"] = "slack.oauth2-authorization" + authorization_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="authorizationId"), pydantic.Field(alias="authorizationId") + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_GhlOauth2Authorization(UncheckedBaseModel): + provider: typing.Literal["ghl.oauth2-authorization"] = "ghl.oauth2-authorization" + authentication_session: typing_extensions.Annotated[ + Oauth2AuthenticationSession, + FieldMetadata(alias="authenticationSession"), + pydantic.Field(alias="authenticationSession"), + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_Inworld(UncheckedBaseModel): + provider: typing.Literal["inworld"] = "inworld" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_Minimax(UncheckedBaseModel): + provider: typing.Literal["minimax"] = "minimax" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + group_id: typing_extensions.Annotated[str, FieldMetadata(alias="groupId"), pydantic.Field(alias="groupId")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_Wellsaid(UncheckedBaseModel): + provider: typing.Literal["wellsaid"] = "wellsaid" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_Email(UncheckedBaseModel): + provider: typing.Literal["email"] = "email" + email: str + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoCredentialsItem_SlackWebhook(UncheckedBaseModel): + provider: typing.Literal["slack-webhook"] = "slack-webhook" + webhook_url: typing_extensions.Annotated[str, FieldMetadata(alias="webhookUrl"), pydantic.Field(alias="webhookUrl")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateAssistantDtoCredentialsItem = typing_extensions.Annotated[ + typing.Union[ + CreateAssistantDtoCredentialsItem_11Labs, + CreateAssistantDtoCredentialsItem_Anthropic, + CreateAssistantDtoCredentialsItem_AnthropicBedrock, + CreateAssistantDtoCredentialsItem_Anyscale, + CreateAssistantDtoCredentialsItem_AssemblyAi, + CreateAssistantDtoCredentialsItem_AzureOpenai, + CreateAssistantDtoCredentialsItem_Azure, + CreateAssistantDtoCredentialsItem_ByoSipTrunk, + CreateAssistantDtoCredentialsItem_Cartesia, + CreateAssistantDtoCredentialsItem_Cerebras, + CreateAssistantDtoCredentialsItem_Cloudflare, + CreateAssistantDtoCredentialsItem_CustomLlm, + CreateAssistantDtoCredentialsItem_Deepgram, + CreateAssistantDtoCredentialsItem_Deepinfra, + CreateAssistantDtoCredentialsItem_DeepSeek, + CreateAssistantDtoCredentialsItem_Gcp, + CreateAssistantDtoCredentialsItem_Gladia, + CreateAssistantDtoCredentialsItem_Gohighlevel, + CreateAssistantDtoCredentialsItem_Google, + CreateAssistantDtoCredentialsItem_Groq, + CreateAssistantDtoCredentialsItem_InflectionAi, + CreateAssistantDtoCredentialsItem_Langfuse, + CreateAssistantDtoCredentialsItem_Lmnt, + CreateAssistantDtoCredentialsItem_Make, + CreateAssistantDtoCredentialsItem_Openai, + CreateAssistantDtoCredentialsItem_Openrouter, + CreateAssistantDtoCredentialsItem_PerplexityAi, + CreateAssistantDtoCredentialsItem_Playht, + CreateAssistantDtoCredentialsItem_RimeAi, + CreateAssistantDtoCredentialsItem_Runpod, + CreateAssistantDtoCredentialsItem_S3, + CreateAssistantDtoCredentialsItem_Supabase, + CreateAssistantDtoCredentialsItem_SmallestAi, + CreateAssistantDtoCredentialsItem_Tavus, + CreateAssistantDtoCredentialsItem_TogetherAi, + CreateAssistantDtoCredentialsItem_Twilio, + CreateAssistantDtoCredentialsItem_Vonage, + CreateAssistantDtoCredentialsItem_Webhook, + CreateAssistantDtoCredentialsItem_CustomCredential, + CreateAssistantDtoCredentialsItem_Xai, + CreateAssistantDtoCredentialsItem_Neuphonic, + CreateAssistantDtoCredentialsItem_Hume, + CreateAssistantDtoCredentialsItem_Mistral, + CreateAssistantDtoCredentialsItem_Speechmatics, + CreateAssistantDtoCredentialsItem_Soniox, + CreateAssistantDtoCredentialsItem_Trieve, + CreateAssistantDtoCredentialsItem_GoogleCalendarOauth2Client, + CreateAssistantDtoCredentialsItem_GoogleCalendarOauth2Authorization, + CreateAssistantDtoCredentialsItem_GoogleSheetsOauth2Authorization, + CreateAssistantDtoCredentialsItem_SlackOauth2Authorization, + CreateAssistantDtoCredentialsItem_GhlOauth2Authorization, + CreateAssistantDtoCredentialsItem_Inworld, + CreateAssistantDtoCredentialsItem_Minimax, + CreateAssistantDtoCredentialsItem_Wellsaid, + CreateAssistantDtoCredentialsItem_Email, + CreateAssistantDtoCredentialsItem_SlackWebhook, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/create_assistant_dto_hooks_item.py b/src/vapi/types/create_assistant_dto_hooks_item.py new file mode 100644 index 00000000..df491931 --- /dev/null +++ b/src/vapi/types/create_assistant_dto_hooks_item.py @@ -0,0 +1,19 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +if typing.TYPE_CHECKING: + from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted + from .call_hook_call_ending import CallHookCallEnding + from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted + from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout + from .session_created_hook import SessionCreatedHook +CreateAssistantDtoHooksItem = typing.Union[ + "CallHookCallEnding", + "CallHookAssistantSpeechInterrupted", + "CallHookCustomerSpeechInterrupted", + "CallHookCustomerSpeechTimeout", + "SessionCreatedHook", +] diff --git a/src/vapi/types/create_assistant_dto_model.py b/src/vapi/types/create_assistant_dto_model.py index 7ee059a2..bf9e84ca 100644 --- a/src/vapi/types/create_assistant_dto_model.py +++ b/src/vapi/types/create_assistant_dto_model.py @@ -1,26 +1,1733 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .anyscale_model import AnyscaleModel -from .anthropic_model import AnthropicModel -from .custom_llm_model import CustomLlmModel -from .deep_infra_model import DeepInfraModel -from .groq_model import GroqModel -from .open_ai_model import OpenAiModel -from .open_router_model import OpenRouterModel -from .perplexity_ai_model import PerplexityAiModel -from .together_ai_model import TogetherAiModel -from .vapi_model import VapiModel - -CreateAssistantDtoModel = typing.Union[ - AnyscaleModel, - AnthropicModel, - CustomLlmModel, - DeepInfraModel, - GroqModel, - OpenAiModel, - OpenRouterModel, - PerplexityAiModel, - TogetherAiModel, - VapiModel, + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .anthropic_bedrock_model_model import AnthropicBedrockModelModel +from .anthropic_model_model import AnthropicModelModel +from .anthropic_thinking_config import AnthropicThinkingConfig +from .cerebras_model_model import CerebrasModelModel +from .create_custom_knowledge_base_dto import CreateCustomKnowledgeBaseDto +from .custom_llm_model_metadata_send_mode import CustomLlmModelMetadataSendMode +from .deep_seek_model_model import DeepSeekModelModel +from .google_model_model import GoogleModelModel +from .google_realtime_config import GoogleRealtimeConfig +from .groq_model_model import GroqModelModel +from .inflection_ai_model_model import InflectionAiModelModel +from .minimax_llm_model_model import MinimaxLlmModelModel +from .open_ai_message import OpenAiMessage +from .open_ai_model_fallback_models_item import OpenAiModelFallbackModelsItem +from .open_ai_model_model import OpenAiModelModel +from .open_ai_model_prompt_cache_retention import OpenAiModelPromptCacheRetention +from .open_ai_model_tool_strict_compatibility_mode import OpenAiModelToolStrictCompatibilityMode +from .xai_model_model import XaiModelModel + + +class CreateAssistantDtoModel_Anthropic(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["anthropic"] = "anthropic" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["AnthropicModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: AnthropicModelModel + thinking: typing.Optional[AnthropicThinkingConfig] = None + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoModel_AnthropicBedrock(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["anthropic-bedrock"] = "anthropic-bedrock" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["AnthropicBedrockModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: AnthropicBedrockModelModel + thinking: typing.Optional[AnthropicThinkingConfig] = None + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoModel_Anyscale(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["anyscale"] = "anyscale" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["AnyscaleModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: str + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoModel_Cerebras(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["cerebras"] = "cerebras" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["CerebrasModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: CerebrasModelModel + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoModel_CustomLlm(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["custom-llm"] = "custom-llm" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["CustomLlmModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + metadata_send_mode: typing_extensions.Annotated[ + typing.Optional[CustomLlmModelMetadataSendMode], + FieldMetadata(alias="metadataSendMode"), + pydantic.Field(alias="metadataSendMode"), + ] = None + headers: typing.Optional[typing.Dict[str, str]] = None + url: str + word_level_confidence_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="wordLevelConfidenceEnabled"), + pydantic.Field(alias="wordLevelConfidenceEnabled"), + ] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + model: str + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoModel_Deepinfra(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["deepinfra"] = "deepinfra" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["DeepInfraModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: str + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoModel_DeepSeek(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["deep-seek"] = "deep-seek" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["DeepSeekModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: DeepSeekModelModel + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoModel_Google(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["google"] = "google" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["GoogleModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: GoogleModelModel + realtime_config: typing_extensions.Annotated[ + typing.Optional[GoogleRealtimeConfig], + FieldMetadata(alias="realtimeConfig"), + pydantic.Field(alias="realtimeConfig"), + ] = None + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoModel_Groq(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["groq"] = "groq" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["GroqModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: GroqModelModel + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoModel_InflectionAi(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["inflection-ai"] = "inflection-ai" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["InflectionAiModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: InflectionAiModelModel + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoModel_Minimax(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["minimax"] = "minimax" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["MinimaxLlmModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: MinimaxLlmModelModel + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoModel_Openai(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["openai"] = "openai" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["OpenAiModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: OpenAiModelModel + fallback_models: typing_extensions.Annotated[ + typing.Optional[typing.List[OpenAiModelFallbackModelsItem]], + FieldMetadata(alias="fallbackModels"), + pydantic.Field(alias="fallbackModels"), + ] = None + tool_strict_compatibility_mode: typing_extensions.Annotated[ + typing.Optional[OpenAiModelToolStrictCompatibilityMode], + FieldMetadata(alias="toolStrictCompatibilityMode"), + pydantic.Field(alias="toolStrictCompatibilityMode"), + ] = None + prompt_cache_retention: typing_extensions.Annotated[ + typing.Optional[OpenAiModelPromptCacheRetention], + FieldMetadata(alias="promptCacheRetention"), + pydantic.Field(alias="promptCacheRetention"), + ] = None + prompt_cache_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="promptCacheKey"), pydantic.Field(alias="promptCacheKey") + ] = None + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoModel_Openrouter(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["openrouter"] = "openrouter" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["OpenRouterModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: str + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoModel_PerplexityAi(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["perplexity-ai"] = "perplexity-ai" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["PerplexityAiModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: str + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoModel_TogetherAi(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["together-ai"] = "together-ai" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["TogetherAiModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: str + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoModel_Xai(UncheckedBaseModel): + """ + These are the options for the assistant's LLM. + """ + + provider: typing.Literal["xai"] = "xai" + messages: typing.Optional[typing.List[OpenAiMessage]] = None + tools: typing.Optional[typing.List["XaiModelToolsItem"]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase"), + ] = None + model: XaiModelModel + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field(alias="emotionRecognitionEnabled"), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numFastTurns"), pydantic.Field(alias="numFastTurns") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateAssistantDtoModel = typing_extensions.Annotated[ + typing.Union[ + CreateAssistantDtoModel_Anthropic, + CreateAssistantDtoModel_AnthropicBedrock, + CreateAssistantDtoModel_Anyscale, + CreateAssistantDtoModel_Cerebras, + CreateAssistantDtoModel_CustomLlm, + CreateAssistantDtoModel_Deepinfra, + CreateAssistantDtoModel_DeepSeek, + CreateAssistantDtoModel_Google, + CreateAssistantDtoModel_Groq, + CreateAssistantDtoModel_InflectionAi, + CreateAssistantDtoModel_Minimax, + CreateAssistantDtoModel_Openai, + CreateAssistantDtoModel_Openrouter, + CreateAssistantDtoModel_PerplexityAi, + CreateAssistantDtoModel_TogetherAi, + CreateAssistantDtoModel_Xai, + ], + UnionMetadata(discriminant="provider"), ] +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 + +update_forward_refs( + CreateAssistantDtoModel_Anthropic, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + CreateAssistantDtoModel_AnthropicBedrock, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + CreateAssistantDtoModel_Anyscale, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + CreateAssistantDtoModel_Cerebras, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + CreateAssistantDtoModel_CustomLlm, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + CreateAssistantDtoModel_Deepinfra, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + CreateAssistantDtoModel_DeepSeek, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + CreateAssistantDtoModel_Google, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + CreateAssistantDtoModel_Groq, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + CreateAssistantDtoModel_InflectionAi, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + CreateAssistantDtoModel_Minimax, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + CreateAssistantDtoModel_Openai, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + CreateAssistantDtoModel_Openrouter, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + CreateAssistantDtoModel_PerplexityAi, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + CreateAssistantDtoModel_TogetherAi, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + CreateAssistantDtoModel_Xai, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/create_assistant_dto_server_messages_item.py b/src/vapi/types/create_assistant_dto_server_messages_item.py index 1b33b848..5eabffd0 100644 --- a/src/vapi/types/create_assistant_dto_server_messages_item.py +++ b/src/vapi/types/create_assistant_dto_server_messages_item.py @@ -9,6 +9,7 @@ "function-call", "hang", "language-changed", + "language-change-detected", "model-output", "phone-call-control", "speech-update", diff --git a/src/vapi/types/create_assistant_dto_transcriber.py b/src/vapi/types/create_assistant_dto_transcriber.py index f4e52c66..4fde2680 100644 --- a/src/vapi/types/create_assistant_dto_transcriber.py +++ b/src/vapi/types/create_assistant_dto_transcriber.py @@ -1,8 +1,538 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .deepgram_transcriber import DeepgramTranscriber -from .gladia_transcriber import GladiaTranscriber -from .talkscriber_transcriber import TalkscriberTranscriber -CreateAssistantDtoTranscriber = typing.Union[DeepgramTranscriber, GladiaTranscriber, TalkscriberTranscriber] +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .assembly_ai_transcriber_language import AssemblyAiTranscriberLanguage +from .assembly_ai_transcriber_speech_model import AssemblyAiTranscriberSpeechModel +from .azure_speech_transcriber_language import AzureSpeechTranscriberLanguage +from .azure_speech_transcriber_segmentation_strategy import AzureSpeechTranscriberSegmentationStrategy +from .cartesia_transcriber_language import CartesiaTranscriberLanguage +from .cartesia_transcriber_model import CartesiaTranscriberModel +from .deepgram_transcriber_language import DeepgramTranscriberLanguage +from .deepgram_transcriber_model import DeepgramTranscriberModel +from .eleven_labs_transcriber_language import ElevenLabsTranscriberLanguage +from .eleven_labs_transcriber_model import ElevenLabsTranscriberModel +from .fallback_transcriber_plan import FallbackTranscriberPlan +from .gladia_custom_vocabulary_config_dto import GladiaCustomVocabularyConfigDto +from .gladia_transcriber_language import GladiaTranscriberLanguage +from .gladia_transcriber_language_behaviour import GladiaTranscriberLanguageBehaviour +from .gladia_transcriber_languages import GladiaTranscriberLanguages +from .gladia_transcriber_model import GladiaTranscriberModel +from .gladia_transcriber_region import GladiaTranscriberRegion +from .google_transcriber_language import GoogleTranscriberLanguage +from .google_transcriber_model import GoogleTranscriberModel +from .open_ai_transcriber_language import OpenAiTranscriberLanguage +from .open_ai_transcriber_model import OpenAiTranscriberModel +from .server import Server +from .soniox_transcriber_language import SonioxTranscriberLanguage +from .soniox_transcriber_model import SonioxTranscriberModel +from .speechmatics_custom_vocabulary_item import SpeechmaticsCustomVocabularyItem +from .speechmatics_transcriber_language import SpeechmaticsTranscriberLanguage +from .speechmatics_transcriber_model import SpeechmaticsTranscriberModel +from .speechmatics_transcriber_numeral_style import SpeechmaticsTranscriberNumeralStyle +from .speechmatics_transcriber_operating_point import SpeechmaticsTranscriberOperatingPoint +from .speechmatics_transcriber_region import SpeechmaticsTranscriberRegion +from .talkscriber_transcriber_language import TalkscriberTranscriberLanguage +from .talkscriber_transcriber_model import TalkscriberTranscriberModel + + +class CreateAssistantDtoTranscriber_AssemblyAi(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["assembly-ai"] = "assembly-ai" + language: typing.Optional[AssemblyAiTranscriberLanguage] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="confidenceThreshold"), pydantic.Field(alias="confidenceThreshold") + ] = None + format_turns: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="formatTurns"), pydantic.Field(alias="formatTurns") + ] = None + end_of_turn_confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="endOfTurnConfidenceThreshold"), + pydantic.Field(alias="endOfTurnConfidenceThreshold"), + ] = None + min_end_of_turn_silence_when_confident: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minEndOfTurnSilenceWhenConfident"), + pydantic.Field(alias="minEndOfTurnSilenceWhenConfident"), + ] = None + word_finalization_max_wait_time: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="wordFinalizationMaxWaitTime"), + pydantic.Field(alias="wordFinalizationMaxWaitTime"), + ] = None + max_turn_silence: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTurnSilence"), pydantic.Field(alias="maxTurnSilence") + ] = None + vad_assisted_endpointing_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="vadAssistedEndpointingEnabled"), + pydantic.Field(alias="vadAssistedEndpointingEnabled"), + ] = None + speech_model: typing_extensions.Annotated[ + typing.Optional[AssemblyAiTranscriberSpeechModel], + FieldMetadata(alias="speechModel"), + pydantic.Field(alias="speechModel"), + ] = None + realtime_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="realtimeUrl"), pydantic.Field(alias="realtimeUrl") + ] = None + word_boost: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="wordBoost"), pydantic.Field(alias="wordBoost") + ] = None + keyterms_prompt: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="keytermsPrompt"), pydantic.Field(alias="keytermsPrompt") + ] = None + end_utterance_silence_threshold: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="endUtteranceSilenceThreshold"), + pydantic.Field(alias="endUtteranceSilenceThreshold"), + ] = None + disable_partial_transcripts: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="disablePartialTranscripts"), + pydantic.Field(alias="disablePartialTranscripts"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoTranscriber_Azure(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["azure"] = "azure" + language: typing.Optional[AzureSpeechTranscriberLanguage] = None + segmentation_strategy: typing_extensions.Annotated[ + typing.Optional[AzureSpeechTranscriberSegmentationStrategy], + FieldMetadata(alias="segmentationStrategy"), + pydantic.Field(alias="segmentationStrategy"), + ] = None + segmentation_silence_timeout_ms: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="segmentationSilenceTimeoutMs"), + pydantic.Field(alias="segmentationSilenceTimeoutMs"), + ] = None + segmentation_maximum_time_ms: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="segmentationMaximumTimeMs"), + pydantic.Field(alias="segmentationMaximumTimeMs"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoTranscriber_CustomTranscriber(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["custom-transcriber"] = "custom-transcriber" + server: Server + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoTranscriber_Deepgram(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["deepgram"] = "deepgram" + model: typing.Optional[DeepgramTranscriberModel] = None + language: typing.Optional[DeepgramTranscriberLanguage] = None + smart_format: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smartFormat"), pydantic.Field(alias="smartFormat") + ] = None + mip_opt_out: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="mipOptOut"), pydantic.Field(alias="mipOptOut") + ] = None + numerals: typing.Optional[bool] = None + profanity_filter: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="profanityFilter"), pydantic.Field(alias="profanityFilter") + ] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="confidenceThreshold"), pydantic.Field(alias="confidenceThreshold") + ] = None + eager_eot_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="eagerEotThreshold"), pydantic.Field(alias="eagerEotThreshold") + ] = None + eot_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="eotThreshold"), pydantic.Field(alias="eotThreshold") + ] = None + eot_timeout_ms: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="eotTimeoutMs"), pydantic.Field(alias="eotTimeoutMs") + ] = None + keywords: typing.Optional[typing.List[str]] = None + keyterm: typing.Optional[typing.List[str]] = None + endpointing: typing.Optional[float] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoTranscriber_11Labs(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["11labs"] = "11labs" + model: typing.Optional[ElevenLabsTranscriberModel] = None + language: typing.Optional[ElevenLabsTranscriberLanguage] = None + silence_threshold_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="silenceThresholdSeconds"), + pydantic.Field(alias="silenceThresholdSeconds"), + ] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="confidenceThreshold"), pydantic.Field(alias="confidenceThreshold") + ] = None + min_speech_duration_ms: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="minSpeechDurationMs"), pydantic.Field(alias="minSpeechDurationMs") + ] = None + min_silence_duration_ms: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minSilenceDurationMs"), + pydantic.Field(alias="minSilenceDurationMs"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoTranscriber_Gladia(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["gladia"] = "gladia" + model: typing.Optional[GladiaTranscriberModel] = None + language_behaviour: typing_extensions.Annotated[ + typing.Optional[GladiaTranscriberLanguageBehaviour], + FieldMetadata(alias="languageBehaviour"), + pydantic.Field(alias="languageBehaviour"), + ] = None + language: typing.Optional[GladiaTranscriberLanguage] = None + languages: typing.Optional[GladiaTranscriberLanguages] = None + transcription_hint: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="transcriptionHint"), pydantic.Field(alias="transcriptionHint") + ] = None + prosody: typing.Optional[bool] = None + audio_enhancer: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="audioEnhancer"), pydantic.Field(alias="audioEnhancer") + ] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="confidenceThreshold"), pydantic.Field(alias="confidenceThreshold") + ] = None + endpointing: typing.Optional[float] = None + speech_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="speechThreshold"), pydantic.Field(alias="speechThreshold") + ] = None + custom_vocabulary_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="customVocabularyEnabled"), + pydantic.Field(alias="customVocabularyEnabled"), + ] = None + custom_vocabulary_config: typing_extensions.Annotated[ + typing.Optional[GladiaCustomVocabularyConfigDto], + FieldMetadata(alias="customVocabularyConfig"), + pydantic.Field(alias="customVocabularyConfig"), + ] = None + region: typing.Optional[GladiaTranscriberRegion] = None + receive_partial_transcripts: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="receivePartialTranscripts"), + pydantic.Field(alias="receivePartialTranscripts"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoTranscriber_Google(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["google"] = "google" + model: typing.Optional[GoogleTranscriberModel] = None + language: typing.Optional[GoogleTranscriberLanguage] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoTranscriber_Speechmatics(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["speechmatics"] = "speechmatics" + model: typing.Optional[SpeechmaticsTranscriberModel] = None + language: typing.Optional[SpeechmaticsTranscriberLanguage] = None + operating_point: typing_extensions.Annotated[ + typing.Optional[SpeechmaticsTranscriberOperatingPoint], + FieldMetadata(alias="operatingPoint"), + pydantic.Field(alias="operatingPoint"), + ] = None + region: typing.Optional[SpeechmaticsTranscriberRegion] = None + enable_diarization: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="enableDiarization"), pydantic.Field(alias="enableDiarization") + ] = None + max_delay: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxDelay"), pydantic.Field(alias="maxDelay") + ] = None + custom_vocabulary: typing_extensions.Annotated[ + typing.List[SpeechmaticsCustomVocabularyItem], + FieldMetadata(alias="customVocabulary"), + pydantic.Field(alias="customVocabulary"), + ] + numeral_style: typing_extensions.Annotated[ + typing.Optional[SpeechmaticsTranscriberNumeralStyle], + FieldMetadata(alias="numeralStyle"), + pydantic.Field(alias="numeralStyle"), + ] = None + end_of_turn_sensitivity: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="endOfTurnSensitivity"), + pydantic.Field(alias="endOfTurnSensitivity"), + ] = None + remove_disfluencies: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="removeDisfluencies"), pydantic.Field(alias="removeDisfluencies") + ] = None + minimum_speech_duration: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minimumSpeechDuration"), + pydantic.Field(alias="minimumSpeechDuration"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoTranscriber_Talkscriber(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["talkscriber"] = "talkscriber" + model: typing.Optional[TalkscriberTranscriberModel] = None + language: typing.Optional[TalkscriberTranscriberLanguage] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoTranscriber_Openai(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["openai"] = "openai" + model: OpenAiTranscriberModel + language: typing.Optional[OpenAiTranscriberLanguage] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoTranscriber_Cartesia(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["cartesia"] = "cartesia" + model: typing.Optional[CartesiaTranscriberModel] = None + language: typing.Optional[CartesiaTranscriberLanguage] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoTranscriber_Soniox(UncheckedBaseModel): + """ + These are the options for the assistant's transcriber. + """ + + provider: typing.Literal["soniox"] = "soniox" + model: typing.Optional[SonioxTranscriberModel] = None + language: typing.Optional[SonioxTranscriberLanguage] = None + language_hints_strict: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="languageHintsStrict"), pydantic.Field(alias="languageHintsStrict") + ] = None + max_endpoint_delay_ms: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxEndpointDelayMs"), pydantic.Field(alias="maxEndpointDelayMs") + ] = None + custom_vocabulary: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="customVocabulary"), + pydantic.Field(alias="customVocabulary"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateAssistantDtoTranscriber = typing_extensions.Annotated[ + typing.Union[ + CreateAssistantDtoTranscriber_AssemblyAi, + CreateAssistantDtoTranscriber_Azure, + CreateAssistantDtoTranscriber_CustomTranscriber, + CreateAssistantDtoTranscriber_Deepgram, + CreateAssistantDtoTranscriber_11Labs, + CreateAssistantDtoTranscriber_Gladia, + CreateAssistantDtoTranscriber_Google, + CreateAssistantDtoTranscriber_Speechmatics, + CreateAssistantDtoTranscriber_Talkscriber, + CreateAssistantDtoTranscriber_Openai, + CreateAssistantDtoTranscriber_Cartesia, + CreateAssistantDtoTranscriber_Soniox, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/create_assistant_dto_voice.py b/src/vapi/types/create_assistant_dto_voice.py index 4646ebc1..e15cdd34 100644 --- a/src/vapi/types/create_assistant_dto_voice.py +++ b/src/vapi/types/create_assistant_dto_voice.py @@ -1,24 +1,740 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .azure_voice import AzureVoice -from .cartesia_voice import CartesiaVoice -from .deepgram_voice import DeepgramVoice -from .eleven_labs_voice import ElevenLabsVoice -from .lmnt_voice import LmntVoice -from .neets_voice import NeetsVoice -from .open_ai_voice import OpenAiVoice -from .play_ht_voice import PlayHtVoice -from .rime_ai_voice import RimeAiVoice - -CreateAssistantDtoVoice = typing.Union[ - AzureVoice, - CartesiaVoice, - DeepgramVoice, - ElevenLabsVoice, - LmntVoice, - NeetsVoice, - OpenAiVoice, - PlayHtVoice, - RimeAiVoice, + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .azure_voice_id import AzureVoiceId +from .cartesia_experimental_controls import CartesiaExperimentalControls +from .cartesia_generation_config import CartesiaGenerationConfig +from .cartesia_voice_language import CartesiaVoiceLanguage +from .cartesia_voice_model import CartesiaVoiceModel +from .chunk_plan import ChunkPlan +from .deepgram_voice_id import DeepgramVoiceId +from .deepgram_voice_model import DeepgramVoiceModel +from .eleven_labs_pronunciation_dictionary_locator import ElevenLabsPronunciationDictionaryLocator +from .eleven_labs_voice_id import ElevenLabsVoiceId +from .eleven_labs_voice_model import ElevenLabsVoiceModel +from .fallback_plan import FallbackPlan +from .hume_voice_model import HumeVoiceModel +from .inworld_voice_language_code import InworldVoiceLanguageCode +from .inworld_voice_model import InworldVoiceModel +from .inworld_voice_voice_id import InworldVoiceVoiceId +from .lmnt_voice_id import LmntVoiceId +from .lmnt_voice_language import LmntVoiceLanguage +from .minimax_voice_language_boost import MinimaxVoiceLanguageBoost +from .minimax_voice_model import MinimaxVoiceModel +from .minimax_voice_region import MinimaxVoiceRegion +from .minimax_voice_subtitle_type import MinimaxVoiceSubtitleType +from .neuphonic_voice_model import NeuphonicVoiceModel +from .open_ai_voice_id import OpenAiVoiceId +from .open_ai_voice_model import OpenAiVoiceModel +from .play_ht_voice_emotion import PlayHtVoiceEmotion +from .play_ht_voice_id import PlayHtVoiceId +from .play_ht_voice_language import PlayHtVoiceLanguage +from .play_ht_voice_model import PlayHtVoiceModel +from .rime_ai_voice_id import RimeAiVoiceId +from .rime_ai_voice_language import RimeAiVoiceLanguage +from .rime_ai_voice_model import RimeAiVoiceModel +from .server import Server +from .sesame_voice_model import SesameVoiceModel +from .smallest_ai_voice_id import SmallestAiVoiceId +from .smallest_ai_voice_model import SmallestAiVoiceModel +from .tavus_conversation_properties import TavusConversationProperties +from .tavus_voice_voice_id import TavusVoiceVoiceId +from .vapi_pronunciation_dictionary_locator import VapiPronunciationDictionaryLocator +from .vapi_voice_voice_id import VapiVoiceVoiceId +from .well_said_voice_model import WellSaidVoiceModel + + +class CreateAssistantDtoVoice_Azure(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["azure"] = "azure" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[AzureVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + speed: typing.Optional[float] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoVoice_Cartesia(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["cartesia"] = "cartesia" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[CartesiaVoiceModel] = None + language: typing.Optional[CartesiaVoiceLanguage] = None + experimental_controls: typing_extensions.Annotated[ + typing.Optional[CartesiaExperimentalControls], + FieldMetadata(alias="experimentalControls"), + pydantic.Field(alias="experimentalControls"), + ] = None + generation_config: typing_extensions.Annotated[ + typing.Optional[CartesiaGenerationConfig], + FieldMetadata(alias="generationConfig"), + pydantic.Field(alias="generationConfig"), + ] = None + pronunciation_dict_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="pronunciationDictId"), pydantic.Field(alias="pronunciationDictId") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoVoice_CustomVoice(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["custom-voice"] = "custom-voice" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + server: Server + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoVoice_Deepgram(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["deepgram"] = "deepgram" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + DeepgramVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[DeepgramVoiceModel] = None + mip_opt_out: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="mipOptOut"), pydantic.Field(alias="mipOptOut") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoVoice_11Labs(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["11labs"] = "11labs" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + ElevenLabsVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + stability: typing.Optional[float] = None + similarity_boost: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="similarityBoost"), pydantic.Field(alias="similarityBoost") + ] = None + style: typing.Optional[float] = None + use_speaker_boost: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="useSpeakerBoost"), pydantic.Field(alias="useSpeakerBoost") + ] = None + speed: typing.Optional[float] = None + optimize_streaming_latency: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="optimizeStreamingLatency"), + pydantic.Field(alias="optimizeStreamingLatency"), + ] = None + enable_ssml_parsing: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="enableSsmlParsing"), pydantic.Field(alias="enableSsmlParsing") + ] = None + auto_mode: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="autoMode"), pydantic.Field(alias="autoMode") + ] = None + model: typing.Optional[ElevenLabsVoiceModel] = None + language: typing.Optional[str] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + pronunciation_dictionary_locators: typing_extensions.Annotated[ + typing.Optional[typing.List[ElevenLabsPronunciationDictionaryLocator]], + FieldMetadata(alias="pronunciationDictionaryLocators"), + pydantic.Field(alias="pronunciationDictionaryLocators"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoVoice_Hume(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["hume"] = "hume" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + model: typing.Optional[HumeVoiceModel] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + is_custom_hume_voice: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="isCustomHumeVoice"), pydantic.Field(alias="isCustomHumeVoice") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + description: typing.Optional[str] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoVoice_Lmnt(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["lmnt"] = "lmnt" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[LmntVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + speed: typing.Optional[float] = None + language: typing.Optional[LmntVoiceLanguage] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoVoice_Neuphonic(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["neuphonic"] = "neuphonic" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[NeuphonicVoiceModel] = None + language: typing.Dict[str, typing.Any] + speed: typing.Optional[float] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoVoice_Openai(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["openai"] = "openai" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + OpenAiVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[OpenAiVoiceModel] = None + instructions: typing.Optional[str] = None + speed: typing.Optional[float] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoVoice_Playht(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["playht"] = "playht" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + PlayHtVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + speed: typing.Optional[float] = None + temperature: typing.Optional[float] = None + emotion: typing.Optional[PlayHtVoiceEmotion] = None + voice_guidance: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="voiceGuidance"), pydantic.Field(alias="voiceGuidance") + ] = None + style_guidance: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="styleGuidance"), pydantic.Field(alias="styleGuidance") + ] = None + text_guidance: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="textGuidance"), pydantic.Field(alias="textGuidance") + ] = None + model: typing.Optional[PlayHtVoiceModel] = None + language: typing.Optional[PlayHtVoiceLanguage] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoVoice_Wellsaid(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["wellsaid"] = "wellsaid" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[WellSaidVoiceModel] = None + enable_ssml: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="enableSsml"), pydantic.Field(alias="enableSsml") + ] = None + library_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="libraryIds"), pydantic.Field(alias="libraryIds") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoVoice_RimeAi(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["rime-ai"] = "rime-ai" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + RimeAiVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[RimeAiVoiceModel] = None + speed: typing.Optional[float] = None + pause_between_brackets: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="pauseBetweenBrackets"), pydantic.Field(alias="pauseBetweenBrackets") + ] = None + phonemize_between_brackets: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="phonemizeBetweenBrackets"), + pydantic.Field(alias="phonemizeBetweenBrackets"), + ] = None + reduce_latency: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="reduceLatency"), pydantic.Field(alias="reduceLatency") + ] = None + inline_speed_alpha: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="inlineSpeedAlpha"), pydantic.Field(alias="inlineSpeedAlpha") + ] = None + language: typing.Optional[RimeAiVoiceLanguage] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoVoice_SmallestAi(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["smallest-ai"] = "smallest-ai" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + SmallestAiVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[SmallestAiVoiceModel] = None + speed: typing.Optional[float] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoVoice_Tavus(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["tavus"] = "tavus" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + TavusVoiceVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + persona_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="personaId"), pydantic.Field(alias="personaId") + ] = None + callback_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callbackUrl"), pydantic.Field(alias="callbackUrl") + ] = None + conversation_name: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="conversationName"), pydantic.Field(alias="conversationName") + ] = None + conversational_context: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="conversationalContext"), + pydantic.Field(alias="conversationalContext"), + ] = None + custom_greeting: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="customGreeting"), pydantic.Field(alias="customGreeting") + ] = None + properties: typing.Optional[TavusConversationProperties] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoVoice_Vapi(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["vapi"] = "vapi" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + VapiVoiceVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + speed: typing.Optional[float] = None + pronunciation_dictionary: typing_extensions.Annotated[ + typing.Optional[typing.List[VapiPronunciationDictionaryLocator]], + FieldMetadata(alias="pronunciationDictionary"), + pydantic.Field(alias="pronunciationDictionary"), + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoVoice_Sesame(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["sesame"] = "sesame" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: SesameVoiceModel + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoVoice_Inworld(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["inworld"] = "inworld" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + InworldVoiceVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[InworldVoiceModel] = None + language_code: typing_extensions.Annotated[ + typing.Optional[InworldVoiceLanguageCode], + FieldMetadata(alias="languageCode"), + pydantic.Field(alias="languageCode"), + ] = None + temperature: typing.Optional[float] = None + speaking_rate: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="speakingRate"), pydantic.Field(alias="speakingRate") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateAssistantDtoVoice_Minimax(UncheckedBaseModel): + """ + These are the options for the assistant's voice. + """ + + provider: typing.Literal["minimax"] = "minimax" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[MinimaxVoiceModel] = None + emotion: typing.Optional[str] = None + subtitle_type: typing_extensions.Annotated[ + typing.Optional[MinimaxVoiceSubtitleType], + FieldMetadata(alias="subtitleType"), + pydantic.Field(alias="subtitleType"), + ] = None + pitch: typing.Optional[float] = None + speed: typing.Optional[float] = None + volume: typing.Optional[float] = None + region: typing.Optional[MinimaxVoiceRegion] = None + language_boost: typing_extensions.Annotated[ + typing.Optional[MinimaxVoiceLanguageBoost], + FieldMetadata(alias="languageBoost"), + pydantic.Field(alias="languageBoost"), + ] = None + text_normalization_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="textNormalizationEnabled"), + pydantic.Field(alias="textNormalizationEnabled"), + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateAssistantDtoVoice = typing_extensions.Annotated[ + typing.Union[ + CreateAssistantDtoVoice_Azure, + CreateAssistantDtoVoice_Cartesia, + CreateAssistantDtoVoice_CustomVoice, + CreateAssistantDtoVoice_Deepgram, + CreateAssistantDtoVoice_11Labs, + CreateAssistantDtoVoice_Hume, + CreateAssistantDtoVoice_Lmnt, + CreateAssistantDtoVoice_Neuphonic, + CreateAssistantDtoVoice_Openai, + CreateAssistantDtoVoice_Playht, + CreateAssistantDtoVoice_Wellsaid, + CreateAssistantDtoVoice_RimeAi, + CreateAssistantDtoVoice_SmallestAi, + CreateAssistantDtoVoice_Tavus, + CreateAssistantDtoVoice_Vapi, + CreateAssistantDtoVoice_Sesame, + CreateAssistantDtoVoice_Inworld, + CreateAssistantDtoVoice_Minimax, + ], + UnionMetadata(discriminant="provider"), ] diff --git a/src/vapi/types/create_assistant_dto_voicemail_detection.py b/src/vapi/types/create_assistant_dto_voicemail_detection.py new file mode 100644 index 00000000..1f1ba81a --- /dev/null +++ b/src/vapi/types/create_assistant_dto_voicemail_detection.py @@ -0,0 +1,17 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .create_assistant_dto_voicemail_detection_zero import CreateAssistantDtoVoicemailDetectionZero +from .google_voicemail_detection_plan import GoogleVoicemailDetectionPlan +from .open_ai_voicemail_detection_plan import OpenAiVoicemailDetectionPlan +from .twilio_voicemail_detection_plan import TwilioVoicemailDetectionPlan +from .vapi_voicemail_detection_plan import VapiVoicemailDetectionPlan + +CreateAssistantDtoVoicemailDetection = typing.Union[ + CreateAssistantDtoVoicemailDetectionZero, + GoogleVoicemailDetectionPlan, + OpenAiVoicemailDetectionPlan, + TwilioVoicemailDetectionPlan, + VapiVoicemailDetectionPlan, +] diff --git a/src/vapi/types/create_assistant_dto_voicemail_detection_zero.py b/src/vapi/types/create_assistant_dto_voicemail_detection_zero.py new file mode 100644 index 00000000..9c3b0f67 --- /dev/null +++ b/src/vapi/types/create_assistant_dto_voicemail_detection_zero.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CreateAssistantDtoVoicemailDetectionZero = typing.Union[typing.Literal["off"], typing.Any] diff --git a/src/vapi/types/create_azure_credential_dto.py b/src/vapi/types/create_azure_credential_dto.py new file mode 100644 index 00000000..ef98c5aa --- /dev/null +++ b/src/vapi/types/create_azure_credential_dto.py @@ -0,0 +1,59 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .azure_blob_storage_bucket_plan import AzureBlobStorageBucketPlan +from .create_azure_credential_dto_region import CreateAzureCredentialDtoRegion +from .create_azure_credential_dto_service import CreateAzureCredentialDtoService + + +class CreateAzureCredentialDto(UncheckedBaseModel): + service: CreateAzureCredentialDtoService = pydantic.Field() + """ + This is the service being used in Azure. + """ + + region: typing.Optional[CreateAzureCredentialDtoRegion] = pydantic.Field(default=None) + """ + This is the region of the Azure resource. + """ + + api_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] = None + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="fallbackIndex"), + pydantic.Field( + alias="fallbackIndex", + description="This is the order in which this storage provider is tried during upload retries. Lower numbers are tried first in increasing order.", + ), + ] = None + bucket_plan: typing_extensions.Annotated[ + typing.Optional[AzureBlobStorageBucketPlan], + FieldMetadata(alias="bucketPlan"), + pydantic.Field( + alias="bucketPlan", + description="This is the bucket plan that can be provided to store call artifacts in Azure Blob Storage.", + ), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_azure_credential_dto_region.py b/src/vapi/types/create_azure_credential_dto_region.py new file mode 100644 index 00000000..703cefd2 --- /dev/null +++ b/src/vapi/types/create_azure_credential_dto_region.py @@ -0,0 +1,32 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CreateAzureCredentialDtoRegion = typing.Union[ + typing.Literal[ + "australiaeast", + "canadaeast", + "canadacentral", + "centralus", + "eastus2", + "eastus", + "france", + "germanywestcentral", + "india", + "japaneast", + "japanwest", + "northcentralus", + "norway", + "polandcentral", + "southcentralus", + "spaincentral", + "swedencentral", + "switzerland", + "uaenorth", + "uk", + "westeurope", + "westus", + "westus3", + ], + typing.Any, +] diff --git a/src/vapi/types/create_azure_credential_dto_service.py b/src/vapi/types/create_azure_credential_dto_service.py new file mode 100644 index 00000000..09b54cb4 --- /dev/null +++ b/src/vapi/types/create_azure_credential_dto_service.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CreateAzureCredentialDtoService = typing.Union[typing.Literal["speech", "blob_storage"], typing.Any] diff --git a/src/vapi/types/create_azure_open_ai_credential_dto.py b/src/vapi/types/create_azure_open_ai_credential_dto.py index 41822faf..25355ab3 100644 --- a/src/vapi/types/create_azure_open_ai_credential_dto.py +++ b/src/vapi/types/create_azure_open_ai_credential_dto.py @@ -1,26 +1,37 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -from .create_azure_open_ai_credential_dto_region import CreateAzureOpenAiCredentialDtoRegion -from .create_azure_open_ai_credential_dto_models_item import CreateAzureOpenAiCredentialDtoModelsItem -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_azure_open_ai_credential_dto_models_item import CreateAzureOpenAiCredentialDtoModelsItem +from .create_azure_open_ai_credential_dto_region import CreateAzureOpenAiCredentialDtoRegion -class CreateAzureOpenAiCredentialDto(UniversalBaseModel): - provider: typing.Literal["azure-openai"] = "azure-openai" +class CreateAzureOpenAiCredentialDto(UncheckedBaseModel): region: CreateAzureOpenAiCredentialDtoRegion models: typing.List[CreateAzureOpenAiCredentialDtoModelsItem] - open_ai_key: typing_extensions.Annotated[str, FieldMetadata(alias="openAIKey")] = pydantic.Field() + open_ai_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="openAIKey"), + pydantic.Field(alias="openAIKey", description="This is not returned in the API."), + ] + ocp_apim_subscription_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="ocpApimSubscriptionKey"), + pydantic.Field(alias="ocpApimSubscriptionKey", description="This is not returned in the API."), + ] = None + open_ai_endpoint: typing_extensions.Annotated[ + str, FieldMetadata(alias="openAIEndpoint"), pydantic.Field(alias="openAIEndpoint") + ] + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is not returned in the API. + This is the name of credential. This is just for your reference. """ - open_ai_endpoint: typing_extensions.Annotated[str, FieldMetadata(alias="openAIEndpoint")] - if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/vapi/types/create_azure_open_ai_credential_dto_models_item.py b/src/vapi/types/create_azure_open_ai_credential_dto_models_item.py index 97e3f649..d8fe2d3f 100644 --- a/src/vapi/types/create_azure_open_ai_credential_dto_models_item.py +++ b/src/vapi/types/create_azure_open_ai_credential_dto_models_item.py @@ -4,8 +4,23 @@ CreateAzureOpenAiCredentialDtoModelsItem = typing.Union[ typing.Literal[ - "gpt-4o-mini-2024-07-18", + "gpt-5.4", + "gpt-5.4-mini", + "gpt-5.4-nano", + "gpt-5.2", + "gpt-5.2-chat", + "gpt-5.1", + "gpt-5.1-chat", + "gpt-5", + "gpt-5-mini", + "gpt-5-nano", + "gpt-4.1-2025-04-14", + "gpt-4.1-mini-2025-04-14", + "gpt-4.1-nano-2025-04-14", + "gpt-4o-2024-11-20", + "gpt-4o-2024-08-06", "gpt-4o-2024-05-13", + "gpt-4o-mini-2024-07-18", "gpt-4-turbo-2024-04-09", "gpt-4-0125-preview", "gpt-4-1106-preview", diff --git a/src/vapi/types/create_azure_open_ai_credential_dto_region.py b/src/vapi/types/create_azure_open_ai_credential_dto_region.py index 208ea509..1dda4639 100644 --- a/src/vapi/types/create_azure_open_ai_credential_dto_region.py +++ b/src/vapi/types/create_azure_open_ai_credential_dto_region.py @@ -4,19 +4,27 @@ CreateAzureOpenAiCredentialDtoRegion = typing.Union[ typing.Literal[ - "australia", - "canada", + "australiaeast", + "canadaeast", + "canadacentral", + "centralus", "eastus2", "eastus", "france", + "germanywestcentral", "india", - "japan", + "japaneast", + "japanwest", "northcentralus", "norway", + "polandcentral", "southcentralus", - "sweden", + "spaincentral", + "swedencentral", "switzerland", + "uaenorth", "uk", + "westeurope", "westus", "westus3", ], diff --git a/src/vapi/types/create_bar_insight_from_call_table_dto.py b/src/vapi/types/create_bar_insight_from_call_table_dto.py new file mode 100644 index 00000000..398c1c73 --- /dev/null +++ b/src/vapi/types/create_bar_insight_from_call_table_dto.py @@ -0,0 +1,70 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .bar_insight_metadata import BarInsightMetadata +from .create_bar_insight_from_call_table_dto_group_by import CreateBarInsightFromCallTableDtoGroupBy +from .create_bar_insight_from_call_table_dto_queries_item import CreateBarInsightFromCallTableDtoQueriesItem +from .insight_formula import InsightFormula +from .insight_time_range_with_step import InsightTimeRangeWithStep + + +class CreateBarInsightFromCallTableDto(UncheckedBaseModel): + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the Insight. + """ + + formulas: typing.Optional[typing.List[InsightFormula]] = pydantic.Field(default=None) + """ + Formulas are mathematical expressions applied on the data returned by the queries to transform them before being used to create the insight. + The formulas needs to be a valid mathematical expression, supported by MathJS - https://mathjs.org/docs/expressions/syntax.html + A formula is created by using the query names as the variable. + The formulas must contain at least one query name in the LiquidJS format {{query_name}} or {{['query name']}} which will be substituted with the query result. + For example, if you have 2 queries, 'Was Booking Made' and 'Average Call Duration', you can create a formula like this: + ``` + {{['Query 1']}} / {{['Query 2']}} * 100 + ``` + + ``` + ({{[Query 1]}} * 10) + {{[Query 2]}} + ``` + This will take the + + You can also use the query names as the variable in the formula. + """ + + metadata: typing.Optional[BarInsightMetadata] = pydantic.Field(default=None) + """ + This is the metadata for the insight. + """ + + time_range: typing_extensions.Annotated[ + typing.Optional[InsightTimeRangeWithStep], FieldMetadata(alias="timeRange"), pydantic.Field(alias="timeRange") + ] = None + group_by: typing_extensions.Annotated[ + typing.Optional[CreateBarInsightFromCallTableDtoGroupBy], + FieldMetadata(alias="groupBy"), + pydantic.Field( + alias="groupBy", + description="This is the group by column for the insight when table is `call`.\nThese are the columns to group the results by.\nAll results are grouped by the time range step by default.", + ), + ] = None + queries: typing.List[CreateBarInsightFromCallTableDtoQueriesItem] = pydantic.Field() + """ + These are the queries to run to generate the insight. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_bar_insight_from_call_table_dto_group_by.py b/src/vapi/types/create_bar_insight_from_call_table_dto_group_by.py new file mode 100644 index 00000000..ed0a5884 --- /dev/null +++ b/src/vapi/types/create_bar_insight_from_call_table_dto_group_by.py @@ -0,0 +1,18 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CreateBarInsightFromCallTableDtoGroupBy = typing.Union[ + typing.Literal[ + "assistantId", + "workflowId", + "squadId", + "phoneNumberId", + "type", + "endedReason", + "customerNumber", + "campaignId", + "artifact.structuredOutputs[OutputID]", + ], + typing.Any, +] diff --git a/src/vapi/types/create_bar_insight_from_call_table_dto_queries_item.py b/src/vapi/types/create_bar_insight_from_call_table_dto_queries_item.py new file mode 100644 index 00000000..09459701 --- /dev/null +++ b/src/vapi/types/create_bar_insight_from_call_table_dto_queries_item.py @@ -0,0 +1,15 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .json_query_on_call_table_with_number_type_column import JsonQueryOnCallTableWithNumberTypeColumn +from .json_query_on_call_table_with_string_type_column import JsonQueryOnCallTableWithStringTypeColumn +from .json_query_on_call_table_with_structured_output_column import JsonQueryOnCallTableWithStructuredOutputColumn +from .json_query_on_events_table import JsonQueryOnEventsTable + +CreateBarInsightFromCallTableDtoQueriesItem = typing.Union[ + JsonQueryOnCallTableWithStringTypeColumn, + JsonQueryOnCallTableWithNumberTypeColumn, + JsonQueryOnCallTableWithStructuredOutputColumn, + JsonQueryOnEventsTable, +] diff --git a/src/vapi/types/create_bash_tool_dto.py b/src/vapi/types/create_bash_tool_dto.py new file mode 100644 index 00000000..8ee12163 --- /dev/null +++ b/src/vapi/types/create_bash_tool_dto.py @@ -0,0 +1,69 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_bash_tool_dto_messages_item import CreateBashToolDtoMessagesItem +from .create_bash_tool_dto_name import CreateBashToolDtoName +from .create_bash_tool_dto_sub_type import CreateBashToolDtoSubType +from .server import Server +from .tool_rejection_plan import ToolRejectionPlan + + +class CreateBashToolDto(UncheckedBaseModel): + messages: typing.Optional[typing.List[CreateBashToolDtoMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + sub_type: typing_extensions.Annotated[ + CreateBashToolDtoSubType, + FieldMetadata(alias="subType"), + pydantic.Field(alias="subType", description="The sub type of tool."), + ] + server: typing.Optional[Server] = pydantic.Field(default=None) + """ + + This is the server where a `tool-calls` webhook will be sent. + + Notes: + - Webhook is sent to this server when a tool call is made. + - Webhook contains the call, assistant, and phone number objects. + - Webhook contains the variables set on the assistant. + - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}. + - Webhook expects a response with tool call result. + """ + + name: CreateBashToolDtoName = pydantic.Field() + """ + The name of the tool, fixed to 'bash' + """ + + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(CreateBashToolDto) diff --git a/src/vapi/types/create_bash_tool_dto_messages_item.py b/src/vapi/types/create_bash_tool_dto_messages_item.py new file mode 100644 index 00000000..f7725445 --- /dev/null +++ b/src/vapi/types/create_bash_tool_dto_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class CreateBashToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateBashToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateBashToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateBashToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateBashToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + CreateBashToolDtoMessagesItem_RequestStart, + CreateBashToolDtoMessagesItem_RequestComplete, + CreateBashToolDtoMessagesItem_RequestFailed, + CreateBashToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/create_bash_tool_dto_name.py b/src/vapi/types/create_bash_tool_dto_name.py new file mode 100644 index 00000000..24fa1e1f --- /dev/null +++ b/src/vapi/types/create_bash_tool_dto_name.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CreateBashToolDtoName = typing.Union[typing.Literal["bash"], typing.Any] diff --git a/src/vapi/types/create_bash_tool_dto_sub_type.py b/src/vapi/types/create_bash_tool_dto_sub_type.py new file mode 100644 index 00000000..3ca3e30b --- /dev/null +++ b/src/vapi/types/create_bash_tool_dto_sub_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CreateBashToolDtoSubType = typing.Union[typing.Literal["bash_20241022"], typing.Any] diff --git a/src/vapi/types/create_byo_phone_number_dto.py b/src/vapi/types/create_byo_phone_number_dto.py index adeb0443..fda1fb3d 100644 --- a/src/vapi/types/create_byo_phone_number_dto.py +++ b/src/vapi/types/create_byo_phone_number_dto.py @@ -1,98 +1,90 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions import typing -from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .server import Server -class CreateByoPhoneNumberDto(UniversalBaseModel): +class CreateByoPhoneNumberDto(UncheckedBaseModel): fallback_destination: typing_extensions.Annotated[ - typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], FieldMetadata(alias="fallbackDestination") - ] = pydantic.Field(default=None) + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field( + alias="fallbackDestination", + description="This is the fallback destination an inbound call will be transferred to if:\n1. `assistantId` is not set\n2. `squadId` is not set\n3. and, `assistant-request` message to the `serverUrl` fails\n\nIf this is not set and above conditions are met, the inbound call is hung up with an error message.", + ), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = pydantic.Field(default=None) """ - This is the fallback destination an inbound call will be transferred to if: - - 1. `assistantId` is not set - 2. `squadId` is not set - 3. and, `assistant-request` message to the `serverUrl` fails - - If this is not set and above conditions are met, the inbound call is hung up with an error message. + This is the hooks that will be used for incoming calls to this phone number. """ - provider: typing.Literal["byo-phone-number"] = "byo-phone-number" number_e_164_check_enabled: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="numberE164CheckEnabled") - ] = pydantic.Field(default=None) - """ - This is the flag to toggle the E164 check for the `number` field. This is an advanced property which should be used if you know your use case requires it. - - Use cases: - - - `false`: To allow non-E164 numbers like `+001234567890`, `1234`, or `abc`. This is useful for dialing out to non-E164 numbers on your SIP trunks. - - `true` (default): To allow only E164 numbers like `+14155551234`. This is standard for PSTN calls. - - If `false`, the `number` is still required to only contain alphanumeric characters (regex: `/^\+?[a-zA-Z0-9]+$/`). - - @default true (E164 check is enabled) - """ - + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field( + alias="numberE164CheckEnabled", + description="This is the flag to toggle the E164 check for the `number` field. This is an advanced property which should be used if you know your use case requires it.\n\nUse cases:\n- `false`: To allow non-E164 numbers like `+001234567890`, `1234`, or `abc`. This is useful for dialing out to non-E164 numbers on your SIP trunks.\n- `true` (default): To allow only E164 numbers like `+14155551234`. This is standard for PSTN calls.\n\nIf `false`, the `number` is still required to only contain alphanumeric characters (regex: `/^\\+?[a-zA-Z0-9]+$/`).\n\n@default true (E164 check is enabled)", + ), + ] = None number: typing.Optional[str] = pydantic.Field(default=None) """ This is the number of the customer. """ - credential_id: typing_extensions.Annotated[str, FieldMetadata(alias="credentialId")] = pydantic.Field() - """ - This is the credential of your own SIP trunk or Carrier (type `byo-sip-trunk`) which can be used to make calls to this phone number. - - You can add the SIP trunk or Carrier credential in the Provider Credentials page on the Dashboard to get the credentialId. - """ - + credential_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="credentialId"), + pydantic.Field( + alias="credentialId", + description="This is the credential of your own SIP trunk or Carrier (type `byo-sip-trunk`) which can be used to make calls to this phone number.\n\nYou can add the SIP trunk or Carrier credential in the Provider Credentials page on the Dashboard to get the credentialId.", + ), + ] name: typing.Optional[str] = pydantic.Field(default=None) """ This is the name of the phone number. This is just for your own reference. """ - assistant_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="assistantId")] = ( - pydantic.Field(default=None) - ) - """ - This is the assistant that will be used for incoming calls to this phone number. - - If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected. - """ - - squad_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="squadId")] = pydantic.Field( - default=None - ) - """ - This is the squad that will be used for incoming calls to this phone number. - - If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected. - """ - - server_url: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="serverUrl")] = pydantic.Field( - default=None - ) - """ - This is the server URL where messages will be sent for calls on this number. This includes the `assistant-request` message. + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assistantId"), + pydantic.Field( + alias="assistantId", + description="This is the assistant that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="workflowId"), + pydantic.Field( + alias="workflowId", + description="This is the workflow that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="squadId"), + pydantic.Field( + alias="squadId", + description="This is the squad that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + server: typing.Optional[Server] = pydantic.Field(default=None) + """ + This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema. - You can see the shape of the messages sent in `ServerMessage`. - - This overrides the `org.serverUrl`. Order of precedence: tool.server.url > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl. - """ - - server_url_secret: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="serverUrlSecret")] = ( - pydantic.Field(default=None) - ) - """ - This is the secret Vapi will send with every message to your server. It's sent as a header called x-vapi-secret. + The order of precedence is: - Same precedence logic as serverUrl. + 1. assistant.server + 2. phoneNumber.server + 3. org.server """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/create_byo_phone_number_dto_fallback_destination.py b/src/vapi/types/create_byo_phone_number_dto_fallback_destination.py index a6166fe7..10db49ae 100644 --- a/src/vapi/types/create_byo_phone_number_dto_fallback_destination.py +++ b/src/vapi/types/create_byo_phone_number_dto_fallback_destination.py @@ -1,7 +1,93 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .transfer_destination_number import TransferDestinationNumber -from .transfer_destination_sip import TransferDestinationSip -CreateByoPhoneNumberDtoFallbackDestination = typing.Union[TransferDestinationNumber, TransferDestinationSip] +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .transfer_destination_number_message import TransferDestinationNumberMessage +from .transfer_destination_sip_message import TransferDestinationSipMessage +from .transfer_plan import TransferPlan + + +class CreateByoPhoneNumberDtoFallbackDestination_Number(UncheckedBaseModel): + """ + This is the fallback destination an inbound call will be transferred to if: + 1. `assistantId` is not set + 2. `squadId` is not set + 3. and, `assistant-request` message to the `serverUrl` fails + + If this is not set and above conditions are met, the inbound call is hung up with an error message. + """ + + type: typing.Literal["number"] = "number" + message: typing.Optional[TransferDestinationNumberMessage] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: str + extension: typing.Optional[str] = None + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateByoPhoneNumberDtoFallbackDestination_Sip(UncheckedBaseModel): + """ + This is the fallback destination an inbound call will be transferred to if: + 1. `assistantId` is not set + 2. `squadId` is not set + 3. and, `assistant-request` message to the `serverUrl` fails + + If this is not set and above conditions are met, the inbound call is hung up with an error message. + """ + + type: typing.Literal["sip"] = "sip" + message: typing.Optional[TransferDestinationSipMessage] = None + sip_uri: typing_extensions.Annotated[str, FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri")] + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + sip_headers: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="sipHeaders"), + pydantic.Field(alias="sipHeaders"), + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateByoPhoneNumberDtoFallbackDestination = typing_extensions.Annotated[ + typing.Union[CreateByoPhoneNumberDtoFallbackDestination_Number, CreateByoPhoneNumberDtoFallbackDestination_Sip], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/create_byo_phone_number_dto_hooks_item.py b/src/vapi/types/create_byo_phone_number_dto_hooks_item.py new file mode 100644 index 00000000..bf9b0bd9 --- /dev/null +++ b/src/vapi/types/create_byo_phone_number_dto_hooks_item.py @@ -0,0 +1,50 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .phone_number_call_ending_hook_filter import PhoneNumberCallEndingHookFilter +from .phone_number_call_ringing_hook_filter import PhoneNumberCallRingingHookFilter +from .phone_number_hook_call_ending_do import PhoneNumberHookCallEndingDo +from .phone_number_hook_call_ringing_do_item import PhoneNumberHookCallRingingDoItem + + +class CreateByoPhoneNumberDtoHooksItem_CallRinging(UncheckedBaseModel): + on: typing.Literal["call.ringing"] = "call.ringing" + filters: typing.Optional[typing.List[PhoneNumberCallRingingHookFilter]] = None + do: typing.List[PhoneNumberHookCallRingingDoItem] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateByoPhoneNumberDtoHooksItem_CallEnding(UncheckedBaseModel): + on: typing.Literal["call.ending"] = "call.ending" + filters: typing.Optional[typing.List[PhoneNumberCallEndingHookFilter]] = None + do: typing.Optional[PhoneNumberHookCallEndingDo] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateByoPhoneNumberDtoHooksItem = typing_extensions.Annotated[ + typing.Union[CreateByoPhoneNumberDtoHooksItem_CallRinging, CreateByoPhoneNumberDtoHooksItem_CallEnding], + UnionMetadata(discriminant="on"), +] diff --git a/src/vapi/types/create_byo_sip_trunk_credential_dto.py b/src/vapi/types/create_byo_sip_trunk_credential_dto.py index 6fd17ca8..fc5ab245 100644 --- a/src/vapi/types/create_byo_sip_trunk_credential_dto.py +++ b/src/vapi/types/create_byo_sip_trunk_credential_dto.py @@ -1,57 +1,66 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing + import pydantic -from .sip_trunk_gateway import SipTrunkGateway import typing_extensions -from .sip_trunk_outbound_authentication_plan import SipTrunkOutboundAuthenticationPlan +from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel from .sbc_configuration import SbcConfiguration -from ..core.pydantic_utilities import IS_PYDANTIC_V2 - +from .sip_trunk_gateway import SipTrunkGateway +from .sip_trunk_outbound_authentication_plan import SipTrunkOutboundAuthenticationPlan -class CreateByoSipTrunkCredentialDto(UniversalBaseModel): - provider: typing.Optional[typing.Literal["byo-sip-trunk"]] = pydantic.Field(default=None) - """ - This can be used to bring your own SIP trunks or to connect to a Carrier. - """ +class CreateByoSipTrunkCredentialDto(UncheckedBaseModel): gateways: typing.List[SipTrunkGateway] = pydantic.Field() """ This is the list of SIP trunk's gateways. """ - name: typing.Optional[str] = pydantic.Field(default=None) - """ - This is the name of the SIP trunk. This is just for your reference. - """ - outbound_authentication_plan: typing_extensions.Annotated[ - typing.Optional[SipTrunkOutboundAuthenticationPlan], FieldMetadata(alias="outboundAuthenticationPlan") - ] = pydantic.Field(default=None) - """ - This can be used to configure the outbound authentication if required by the SIP trunk. - """ - + typing.Optional[SipTrunkOutboundAuthenticationPlan], + FieldMetadata(alias="outboundAuthenticationPlan"), + pydantic.Field( + alias="outboundAuthenticationPlan", + description="This can be used to configure the outbound authentication if required by the SIP trunk.", + ), + ] = None outbound_leading_plus_enabled: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="outboundLeadingPlusEnabled") - ] = pydantic.Field(default=None) - """ - This ensures the outbound origination attempts have a leading plus. Defaults to false to match conventional telecom behavior. - - Usage: - - - Vonage/Twilio requires leading plus for all outbound calls. Set this to true. - - @default false - """ - + typing.Optional[bool], + FieldMetadata(alias="outboundLeadingPlusEnabled"), + pydantic.Field( + alias="outboundLeadingPlusEnabled", + description="This ensures the outbound origination attempts have a leading plus. Defaults to false to match conventional telecom behavior.\n\nUsage:\n- Vonage/Twilio requires leading plus for all outbound calls. Set this to true.\n\n@default false", + ), + ] = None + tech_prefix: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="techPrefix"), + pydantic.Field( + alias="techPrefix", + description="This can be used to configure the tech prefix on outbound calls. This is an advanced property.", + ), + ] = None + sip_diversion_header: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="sipDiversionHeader"), + pydantic.Field( + alias="sipDiversionHeader", + description="This can be used to enable the SIP diversion header for authenticating the calling number if the SIP trunk supports it. This is an advanced property.", + ), + ] = None sbc_configuration: typing_extensions.Annotated[ - typing.Optional[SbcConfiguration], FieldMetadata(alias="sbcConfiguration") - ] = pydantic.Field(default=None) + typing.Optional[SbcConfiguration], + FieldMetadata(alias="sbcConfiguration"), + pydantic.Field( + alias="sbcConfiguration", + description="This is an advanced configuration for enterprise deployments. This uses the onprem SBC to trunk into the SIP trunk's `gateways`, rather than the managed SBC provided by Vapi.", + ), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is an advanced configuration for enterprise deployments. This uses the onprem SBC to trunk into the SIP trunk's `gateways`, rather than the managed SBC provided by Vapi. + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/create_cartesia_credential_dto.py b/src/vapi/types/create_cartesia_credential_dto.py index 7c275ca5..64c92c12 100644 --- a/src/vapi/types/create_cartesia_credential_dto.py +++ b/src/vapi/types/create_cartesia_credential_dto.py @@ -1,18 +1,23 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class CreateCartesiaCredentialDto(UniversalBaseModel): - provider: typing.Literal["cartesia"] = "cartesia" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() +class CreateCartesiaCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is not returned in the API. + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/create_cerebras_credential_dto.py b/src/vapi/types/create_cerebras_credential_dto.py new file mode 100644 index 00000000..be5e49d4 --- /dev/null +++ b/src/vapi/types/create_cerebras_credential_dto.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class CreateCerebrasCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_chat_stream_response.py b/src/vapi/types/create_chat_stream_response.py new file mode 100644 index 00000000..7e2227d7 --- /dev/null +++ b/src/vapi/types/create_chat_stream_response.py @@ -0,0 +1,44 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class CreateChatStreamResponse(UncheckedBaseModel): + id: str = pydantic.Field() + """ + This is the unique identifier for the streaming response. + """ + + session_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="sessionId"), + pydantic.Field( + alias="sessionId", + description="This is the ID of the session that will be used for the chat.\nHelps track conversation context across multiple messages.", + ), + ] = None + path: str = pydantic.Field() + """ + This is the path to the content being updated. + Format: `chat.output[{contentIndex}].content` where contentIndex identifies the specific content item. + """ + + delta: str = pydantic.Field() + """ + This is the incremental content chunk being streamed. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_cloudflare_credential_dto.py b/src/vapi/types/create_cloudflare_credential_dto.py new file mode 100644 index 00000000..9c4ef265 --- /dev/null +++ b/src/vapi/types/create_cloudflare_credential_dto.py @@ -0,0 +1,56 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .cloudflare_r_2_bucket_plan import CloudflareR2BucketPlan + + +class CreateCloudflareCredentialDto(UncheckedBaseModel): + account_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="accountId"), + pydantic.Field(alias="accountId", description="Cloudflare Account Id."), + ] = None + api_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="Cloudflare API Key / Token."), + ] = None + account_email: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="accountEmail"), + pydantic.Field(alias="accountEmail", description="Cloudflare Account Email."), + ] = None + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="fallbackIndex"), + pydantic.Field( + alias="fallbackIndex", + description="This is the order in which this storage provider is tried during upload retries. Lower numbers are tried first in increasing order.", + ), + ] = None + bucket_plan: typing_extensions.Annotated[ + typing.Optional[CloudflareR2BucketPlan], + FieldMetadata(alias="bucketPlan"), + pydantic.Field( + alias="bucketPlan", description="This is the bucket plan that can be provided to store call artifacts in R2" + ), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_code_tool_dto.py b/src/vapi/types/create_code_tool_dto.py new file mode 100644 index 00000000..fda5eb66 --- /dev/null +++ b/src/vapi/types/create_code_tool_dto.py @@ -0,0 +1,106 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .code_tool_environment_variable import CodeToolEnvironmentVariable +from .create_code_tool_dto_messages_item import CreateCodeToolDtoMessagesItem +from .open_ai_function import OpenAiFunction +from .server import Server +from .tool_rejection_plan import ToolRejectionPlan +from .variable_extraction_plan import VariableExtractionPlan + + +class CreateCodeToolDto(UncheckedBaseModel): + messages: typing.Optional[typing.List[CreateCodeToolDtoMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + async_: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="async"), + pydantic.Field( + alias="async", + description="This determines if the tool is async.\n\n If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.\n\n If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.\n\n Defaults to synchronous (`false`).", + ), + ] = None + server: typing.Optional[Server] = pydantic.Field(default=None) + """ + + This is the server where a `tool-calls` webhook will be sent. + + Notes: + - Webhook is sent to this server when a tool call is made. + - Webhook contains the call, assistant, and phone number objects. + - Webhook contains the variables set on the assistant. + - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}. + - Webhook expects a response with tool call result. + """ + + code: str = pydantic.Field() + """ + TypeScript code to execute when the tool is called + """ + + environment_variables: typing_extensions.Annotated[ + typing.Optional[typing.List[CodeToolEnvironmentVariable]], + FieldMetadata(alias="environmentVariables"), + pydantic.Field( + alias="environmentVariables", description="Environment variables available in code via `env` object" + ), + ] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="timeoutSeconds"), + pydantic.Field( + alias="timeoutSeconds", + description="This is the timeout in seconds for the code execution. Defaults to 10 seconds.\nMaximum is 30 seconds to prevent abuse.\n\n@default 10", + ), + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="credentialId"), + pydantic.Field(alias="credentialId", description="Credential ID containing the Val Town API key"), + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan", description="Plan to extract variables from the tool response"), + ] = None + function: typing.Optional[OpenAiFunction] = pydantic.Field(default=None) + """ + This is the function definition of the tool. + + For the Code tool, this defines the name, description, and parameters that the model + will use to understand when and how to call this tool. + """ + + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(CreateCodeToolDto) diff --git a/src/vapi/types/create_code_tool_dto_messages_item.py b/src/vapi/types/create_code_tool_dto_messages_item.py new file mode 100644 index 00000000..28f65629 --- /dev/null +++ b/src/vapi/types/create_code_tool_dto_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class CreateCodeToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateCodeToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateCodeToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateCodeToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateCodeToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + CreateCodeToolDtoMessagesItem_RequestStart, + CreateCodeToolDtoMessagesItem_RequestComplete, + CreateCodeToolDtoMessagesItem_RequestFailed, + CreateCodeToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/create_computer_tool_dto.py b/src/vapi/types/create_computer_tool_dto.py new file mode 100644 index 00000000..fcc30798 --- /dev/null +++ b/src/vapi/types/create_computer_tool_dto.py @@ -0,0 +1,84 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_computer_tool_dto_messages_item import CreateComputerToolDtoMessagesItem +from .create_computer_tool_dto_name import CreateComputerToolDtoName +from .create_computer_tool_dto_sub_type import CreateComputerToolDtoSubType +from .server import Server +from .tool_rejection_plan import ToolRejectionPlan + + +class CreateComputerToolDto(UncheckedBaseModel): + messages: typing.Optional[typing.List[CreateComputerToolDtoMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + sub_type: typing_extensions.Annotated[ + CreateComputerToolDtoSubType, + FieldMetadata(alias="subType"), + pydantic.Field(alias="subType", description="The sub type of tool."), + ] + server: typing.Optional[Server] = pydantic.Field(default=None) + """ + + This is the server where a `tool-calls` webhook will be sent. + + Notes: + - Webhook is sent to this server when a tool call is made. + - Webhook contains the call, assistant, and phone number objects. + - Webhook contains the variables set on the assistant. + - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}. + - Webhook expects a response with tool call result. + """ + + name: CreateComputerToolDtoName = pydantic.Field() + """ + The name of the tool, fixed to 'computer' + """ + + display_width_px: typing_extensions.Annotated[ + float, + FieldMetadata(alias="displayWidthPx"), + pydantic.Field(alias="displayWidthPx", description="The display width in pixels"), + ] + display_height_px: typing_extensions.Annotated[ + float, + FieldMetadata(alias="displayHeightPx"), + pydantic.Field(alias="displayHeightPx", description="The display height in pixels"), + ] + display_number: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="displayNumber"), + pydantic.Field(alias="displayNumber", description="Optional display number"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(CreateComputerToolDto) diff --git a/src/vapi/types/create_computer_tool_dto_messages_item.py b/src/vapi/types/create_computer_tool_dto_messages_item.py new file mode 100644 index 00000000..2899cb39 --- /dev/null +++ b/src/vapi/types/create_computer_tool_dto_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class CreateComputerToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateComputerToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateComputerToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateComputerToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateComputerToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + CreateComputerToolDtoMessagesItem_RequestStart, + CreateComputerToolDtoMessagesItem_RequestComplete, + CreateComputerToolDtoMessagesItem_RequestFailed, + CreateComputerToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/create_computer_tool_dto_name.py b/src/vapi/types/create_computer_tool_dto_name.py new file mode 100644 index 00000000..b4d575f3 --- /dev/null +++ b/src/vapi/types/create_computer_tool_dto_name.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CreateComputerToolDtoName = typing.Union[typing.Literal["computer"], typing.Any] diff --git a/src/vapi/types/create_computer_tool_dto_sub_type.py b/src/vapi/types/create_computer_tool_dto_sub_type.py new file mode 100644 index 00000000..bc7633a9 --- /dev/null +++ b/src/vapi/types/create_computer_tool_dto_sub_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CreateComputerToolDtoSubType = typing.Union[typing.Literal["computer_20241022"], typing.Any] diff --git a/src/vapi/types/create_conversation_block_dto.py b/src/vapi/types/create_conversation_block_dto.py deleted file mode 100644 index 99640487..00000000 --- a/src/vapi/types/create_conversation_block_dto.py +++ /dev/null @@ -1,88 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from ..core.pydantic_utilities import UniversalBaseModel -import typing -from .create_conversation_block_dto_messages_item import CreateConversationBlockDtoMessagesItem -import pydantic -import typing_extensions -from .json_schema import JsonSchema -from ..core.serialization import FieldMetadata -from ..core.pydantic_utilities import IS_PYDANTIC_V2 - - -class CreateConversationBlockDto(UniversalBaseModel): - messages: typing.Optional[typing.List[CreateConversationBlockDtoMessagesItem]] = pydantic.Field(default=None) - """ - These are the pre-configured messages that will be spoken to the user while the block is running. - """ - - input_schema: typing_extensions.Annotated[typing.Optional[JsonSchema], FieldMetadata(alias="inputSchema")] = ( - pydantic.Field(default=None) - ) - """ - This is the input schema for the block. This is the input the block needs to run. It's given to the block as `steps[0].input` - - These are accessible as variables: - - - ({{input.propertyName}}) in context of the block execution (step) - - ({{stepName.input.propertyName}}) in context of the workflow - """ - - output_schema: typing_extensions.Annotated[typing.Optional[JsonSchema], FieldMetadata(alias="outputSchema")] = ( - pydantic.Field(default=None) - ) - """ - This is the output schema for the block. This is the output the block will return to the workflow (`{{stepName.output}}`). - - These are accessible as variables: - - - ({{output.propertyName}}) in context of the block execution (step) - - ({{stepName.output.propertyName}}) in context of the workflow (read caveat #1) - - ({{blockName.output.propertyName}}) in context of the workflow (read caveat #2) - - Caveats: - - 1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.output.propertyName}} will reference the latest usage of the step. - 2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.output.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow with steps. - """ - - type: typing.Literal["conversation"] = "conversation" - instruction: str = pydantic.Field() - """ - This is the instruction to the model. - - You can reference any variable in the context of the current block execution (step): - - - "{{input.your-property-name}}" for the current step's input - - "{{your-step-name.output.your-property-name}}" for another step's output (in the same workflow; read caveat #1) - - "{{your-step-name.input.your-property-name}}" for another step's input (in the same workflow; read caveat #1) - - "{{your-block-name.output.your-property-name}}" for another block's output (in the same workflow; read caveat #2) - - "{{your-block-name.input.your-property-name}}" for another block's input (in the same workflow; read caveat #2) - - "{{workflow.input.your-property-name}}" for the current workflow's input - - "{{global.your-property-name}}" for the global context - - This can be as simple or as complex as you want it to be. - - - "say hello and ask the user about their day!" - - "collect the user's first and last name" - - "user is {{input.firstName}} {{input.lastName}}. their age is {{input.age}}. ask them about their salary and if they might be interested in buying a house. we offer {{input.offer}}" - - Caveats: - - 1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.output/input.propertyName}} will reference the latest usage of the step. - 2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.output/input.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow with steps. - """ - - name: typing.Optional[str] = pydantic.Field(default=None) - """ - This is the name of the block. This is just for your reference. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_conversation_block_dto_messages_item.py b/src/vapi/types/create_conversation_block_dto_messages_item.py deleted file mode 100644 index 0b18f7a6..00000000 --- a/src/vapi/types/create_conversation_block_dto_messages_item.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from .block_start_message import BlockStartMessage -from .block_complete_message import BlockCompleteMessage - -CreateConversationBlockDtoMessagesItem = typing.Union[BlockStartMessage, BlockCompleteMessage] diff --git a/src/vapi/types/create_custom_credential_dto.py b/src/vapi/types/create_custom_credential_dto.py new file mode 100644 index 00000000..e6d386d7 --- /dev/null +++ b/src/vapi/types/create_custom_credential_dto.py @@ -0,0 +1,43 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_custom_credential_dto_authentication_plan import CreateCustomCredentialDtoAuthenticationPlan +from .create_custom_credential_dto_encryption_plan import CreateCustomCredentialDtoEncryptionPlan + + +class CreateCustomCredentialDto(UncheckedBaseModel): + authentication_plan: typing_extensions.Annotated[ + CreateCustomCredentialDtoAuthenticationPlan, + FieldMetadata(alias="authenticationPlan"), + pydantic.Field( + alias="authenticationPlan", + description="This is the authentication plan. Supports OAuth2 RFC 6749, HMAC signing, and Bearer authentication.", + ), + ] + encryption_plan: typing_extensions.Annotated[ + typing.Optional[CreateCustomCredentialDtoEncryptionPlan], + FieldMetadata(alias="encryptionPlan"), + pydantic.Field( + alias="encryptionPlan", + description="This is the encryption plan for encrypting sensitive data. Currently supports public-key encryption.", + ), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_custom_credential_dto_authentication_plan.py b/src/vapi/types/create_custom_credential_dto_authentication_plan.py new file mode 100644 index 00000000..f0777010 --- /dev/null +++ b/src/vapi/types/create_custom_credential_dto_authentication_plan.py @@ -0,0 +1,115 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .hmac_authentication_plan_algorithm import HmacAuthenticationPlanAlgorithm +from .hmac_authentication_plan_signature_encoding import HmacAuthenticationPlanSignatureEncoding + + +class CreateCustomCredentialDtoAuthenticationPlan_Oauth2(UncheckedBaseModel): + """ + This is the authentication plan. Supports OAuth2 RFC 6749, HMAC signing, and Bearer authentication. + """ + + type: typing.Literal["oauth2"] = "oauth2" + url: str + client_id: typing_extensions.Annotated[str, FieldMetadata(alias="clientId"), pydantic.Field(alias="clientId")] + client_secret: typing_extensions.Annotated[ + str, FieldMetadata(alias="clientSecret"), pydantic.Field(alias="clientSecret") + ] + scope: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateCustomCredentialDtoAuthenticationPlan_Hmac(UncheckedBaseModel): + """ + This is the authentication plan. Supports OAuth2 RFC 6749, HMAC signing, and Bearer authentication. + """ + + type: typing.Literal["hmac"] = "hmac" + secret_key: typing_extensions.Annotated[str, FieldMetadata(alias="secretKey"), pydantic.Field(alias="secretKey")] + algorithm: HmacAuthenticationPlanAlgorithm + signature_header: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="signatureHeader"), pydantic.Field(alias="signatureHeader") + ] = None + timestamp_header: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="timestampHeader"), pydantic.Field(alias="timestampHeader") + ] = None + signature_prefix: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="signaturePrefix"), pydantic.Field(alias="signaturePrefix") + ] = None + include_timestamp: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="includeTimestamp"), pydantic.Field(alias="includeTimestamp") + ] = None + payload_format: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="payloadFormat"), pydantic.Field(alias="payloadFormat") + ] = None + message_id_header: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="messageIdHeader"), pydantic.Field(alias="messageIdHeader") + ] = None + signature_encoding: typing_extensions.Annotated[ + typing.Optional[HmacAuthenticationPlanSignatureEncoding], + FieldMetadata(alias="signatureEncoding"), + pydantic.Field(alias="signatureEncoding"), + ] = None + secret_is_base_64: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="secretIsBase64"), pydantic.Field(alias="secretIsBase64") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateCustomCredentialDtoAuthenticationPlan_Bearer(UncheckedBaseModel): + """ + This is the authentication plan. Supports OAuth2 RFC 6749, HMAC signing, and Bearer authentication. + """ + + type: typing.Literal["bearer"] = "bearer" + token: str + header_name: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="headerName"), pydantic.Field(alias="headerName") + ] = None + bearer_prefix_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="bearerPrefixEnabled"), pydantic.Field(alias="bearerPrefixEnabled") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateCustomCredentialDtoAuthenticationPlan = typing_extensions.Annotated[ + typing.Union[ + CreateCustomCredentialDtoAuthenticationPlan_Oauth2, + CreateCustomCredentialDtoAuthenticationPlan_Hmac, + CreateCustomCredentialDtoAuthenticationPlan_Bearer, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/create_custom_credential_dto_encryption_plan.py b/src/vapi/types/create_custom_credential_dto_encryption_plan.py new file mode 100644 index 00000000..4895a2d2 --- /dev/null +++ b/src/vapi/types/create_custom_credential_dto_encryption_plan.py @@ -0,0 +1,37 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .public_key_encryption_plan_algorithm import PublicKeyEncryptionPlanAlgorithm +from .public_key_encryption_plan_public_key import PublicKeyEncryptionPlanPublicKey + + +class CreateCustomCredentialDtoEncryptionPlan_PublicKey(UncheckedBaseModel): + """ + This is the encryption plan for encrypting sensitive data. Currently supports public-key encryption. + """ + + type: typing.Literal["public-key"] = "public-key" + algorithm: PublicKeyEncryptionPlanAlgorithm + public_key: typing_extensions.Annotated[ + PublicKeyEncryptionPlanPublicKey, FieldMetadata(alias="publicKey"), pydantic.Field(alias="publicKey") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateCustomCredentialDtoEncryptionPlan = CreateCustomCredentialDtoEncryptionPlan_PublicKey diff --git a/src/vapi/types/create_custom_knowledge_base_dto.py b/src/vapi/types/create_custom_knowledge_base_dto.py new file mode 100644 index 00000000..8617f8e3 --- /dev/null +++ b/src/vapi/types/create_custom_knowledge_base_dto.py @@ -0,0 +1,68 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_custom_knowledge_base_dto_provider import CreateCustomKnowledgeBaseDtoProvider +from .server import Server + + +class CreateCustomKnowledgeBaseDto(UncheckedBaseModel): + provider: CreateCustomKnowledgeBaseDtoProvider = pydantic.Field() + """ + This knowledge base is bring your own knowledge base implementation. + """ + + server: Server = pydantic.Field() + """ + This is where the knowledge base request will be sent. + + Request Example: + + POST https://{server.url} + Content-Type: application/json + + { + "messsage": { + "type": "knowledge-base-request", + "messages": [ + { + "role": "user", + "content": "Why is ocean blue?" + } + ], + ...other metadata about the call... + } + } + + Response Expected: + ``` + { + "message": { + "role": "assistant", + "content": "The ocean is blue because water absorbs everything but blue.", + }, // YOU CAN RETURN THE EXACT RESPONSE TO SPEAK + "documents": [ + { + "content": "The ocean is blue primarily because water absorbs colors in the red part of the light spectrum and scatters the blue light, making it more visible to our eyes.", + "similarity": 1 + }, + { + "content": "Blue light is scattered more by the water molecules than other colors, enhancing the blue appearance of the ocean.", + "similarity": .5 + } + ] // OR, YOU CAN RETURN AN ARRAY OF DOCUMENTS THAT WILL BE SENT TO THE MODEL + } + ``` + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_custom_knowledge_base_dto_provider.py b/src/vapi/types/create_custom_knowledge_base_dto_provider.py new file mode 100644 index 00000000..86ccf921 --- /dev/null +++ b/src/vapi/types/create_custom_knowledge_base_dto_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CreateCustomKnowledgeBaseDtoProvider = typing.Union[typing.Literal["custom-knowledge-base"], typing.Any] diff --git a/src/vapi/types/create_custom_llm_credential_dto.py b/src/vapi/types/create_custom_llm_credential_dto.py index ad87dd7e..ce7847c0 100644 --- a/src/vapi/types/create_custom_llm_credential_dto.py +++ b/src/vapi/types/create_custom_llm_credential_dto.py @@ -1,18 +1,32 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .o_auth_2_authentication_plan import OAuth2AuthenticationPlan -class CreateCustomLlmCredentialDto(UniversalBaseModel): - provider: typing.Literal["custom-llm"] = "custom-llm" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() +class CreateCustomLlmCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + authentication_plan: typing_extensions.Annotated[ + typing.Optional[OAuth2AuthenticationPlan], + FieldMetadata(alias="authenticationPlan"), + pydantic.Field( + alias="authenticationPlan", + description="This is the authentication plan. Currently supports OAuth2 RFC 6749. To use Bearer authentication, use apiKey", + ), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is not returned in the API. + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/create_customer_dto.py b/src/vapi/types/create_customer_dto.py index e0481e48..4ae74d04 100644 --- a/src/vapi/types/create_customer_dto.py +++ b/src/vapi/types/create_customer_dto.py @@ -1,47 +1,48 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions +from __future__ import annotations + import typing -from ..core.serialization import FieldMetadata + import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class CreateCustomerDto(UniversalBaseModel): +class CreateCustomerDto(UncheckedBaseModel): number_e_164_check_enabled: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="numberE164CheckEnabled") - ] = pydantic.Field(default=None) - """ - This is the flag to toggle the E164 check for the `number` field. This is an advanced property which should be used if you know your use case requires it. - - Use cases: - - - `false`: To allow non-E164 numbers like `+001234567890`, `1234`, or `abc`. This is useful for dialing out to non-E164 numbers on your SIP trunks. - - `true` (default): To allow only E164 numbers like `+14155551234`. This is standard for PSTN calls. - - If `false`, the `number` is still required to only contain alphanumeric characters (regex: `/^\+?[a-zA-Z0-9]+$/`). - - @default true (E164 check is enabled) - """ - + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field( + alias="numberE164CheckEnabled", + description="This is the flag to toggle the E164 check for the `number` field. This is an advanced property which should be used if you know your use case requires it.\n\nUse cases:\n- `false`: To allow non-E164 numbers like `+001234567890`, `1234`, or `abc`. This is useful for dialing out to non-E164 numbers on your SIP trunks.\n- `true` (default): To allow only E164 numbers like `+14155551234`. This is standard for PSTN calls.\n\nIf `false`, the `number` is still required to only contain alphanumeric characters (regex: `/^\\+?[a-zA-Z0-9]+$/`).\n\n@default true (E164 check is enabled)", + ), + ] = None extension: typing.Optional[str] = pydantic.Field(default=None) """ This is the extension that will be dialed after the call is answered. """ + assistant_overrides: typing_extensions.Annotated[ + typing.Optional["AssistantOverrides"], + FieldMetadata(alias="assistantOverrides"), + pydantic.Field( + alias="assistantOverrides", + description="These are the overrides for the assistant's settings and template variables specific to this customer.\nThis allows customization of the assistant's behavior for individual customers in batch calls.", + ), + ] = None number: typing.Optional[str] = pydantic.Field(default=None) """ This is the number of the customer. """ - sip_uri: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="sipUri")] = pydantic.Field( - default=None - ) - """ - This is the SIP URI of the customer. - """ - + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="sipUri"), + pydantic.Field(alias="sipUri", description="This is the SIP URI of the customer."), + ] = None name: typing.Optional[str] = pydantic.Field(default=None) """ This is the name of the customer. This is just for your own reference. @@ -49,6 +50,17 @@ class CreateCustomerDto(UniversalBaseModel): For SIP inbound calls, this is extracted from the `From` SIP header with format `"Display Name" `. """ + email: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the email of the customer. + """ + + external_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="externalId"), + pydantic.Field(alias="externalId", description="This is the external ID of the customer."), + ] = None + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: @@ -57,3 +69,123 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + CreateCustomerDto, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/create_deep_infra_credential_dto.py b/src/vapi/types/create_deep_infra_credential_dto.py index 96a3da02..d672fd6d 100644 --- a/src/vapi/types/create_deep_infra_credential_dto.py +++ b/src/vapi/types/create_deep_infra_credential_dto.py @@ -1,18 +1,23 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class CreateDeepInfraCredentialDto(UniversalBaseModel): - provider: typing.Literal["deepinfra"] = "deepinfra" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() +class CreateDeepInfraCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is not returned in the API. + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/create_deep_seek_credential_dto.py b/src/vapi/types/create_deep_seek_credential_dto.py new file mode 100644 index 00000000..40aa70ab --- /dev/null +++ b/src/vapi/types/create_deep_seek_credential_dto.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class CreateDeepSeekCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_deepgram_credential_dto.py b/src/vapi/types/create_deepgram_credential_dto.py index 884c0d0a..7e8a9200 100644 --- a/src/vapi/types/create_deepgram_credential_dto.py +++ b/src/vapi/types/create_deepgram_credential_dto.py @@ -1,25 +1,31 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class CreateDeepgramCredentialDto(UniversalBaseModel): - provider: typing.Literal["deepgram"] = "deepgram" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() - """ - This is not returned in the API. - """ - - api_url: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="apiUrl")] = pydantic.Field( - default=None - ) +class CreateDeepgramCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + api_url: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiUrl"), + pydantic.Field( + alias="apiUrl", + description="This can be used to point to an onprem Deepgram instance. Defaults to api.deepgram.com.", + ), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) """ - This can be used to point to an onprem Deepgram instance. Defaults to api.deepgram.com. + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/create_dtmf_tool_dto.py b/src/vapi/types/create_dtmf_tool_dto.py index 16c12f74..f5de8980 100644 --- a/src/vapi/types/create_dtmf_tool_dto.py +++ b/src/vapi/types/create_dtmf_tool_dto.py @@ -1,30 +1,19 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions +from __future__ import annotations + import typing -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel from .create_dtmf_tool_dto_messages_item import CreateDtmfToolDtoMessagesItem -from .open_ai_function import OpenAiFunction -from .server import Server -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from .tool_rejection_plan import ToolRejectionPlan -class CreateDtmfToolDto(UniversalBaseModel): - async_: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="async")] = pydantic.Field( - default=None - ) - """ - This determines if the tool is async. - - If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server. - - If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server. - - Defaults to synchronous (`false`). - """ - +class CreateDtmfToolDto(UncheckedBaseModel): messages: typing.Optional[typing.List[CreateDtmfToolDtoMessagesItem]] = pydantic.Field(default=None) """ These are the messages that will be spoken to the user as the tool is running. @@ -32,24 +21,22 @@ class CreateDtmfToolDto(UniversalBaseModel): For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. """ - type: typing.Literal["dtmf"] = "dtmf" - function: typing.Optional[OpenAiFunction] = pydantic.Field(default=None) - """ - This is the function definition of the tool. - - For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on tool-specific fields like `tool.destinations`. But, even in those cases, you can provide a custom function definition for advanced use cases. - - An example of an advanced use case is if you want to customize the message that's spoken for `endCall` tool. You can specify a function where it returns an argument "reason". Then, in `messages` array, you can have many "request-complete" messages. One of these messages will be triggered if the `messages[].conditions` matches the "reason" argument. - """ - - server: typing.Optional[Server] = pydantic.Field(default=None) - """ - This is the server that will be hit when this tool is requested by the model. - - All requests will be sent with the call object among other things. You can find more details in the Server URL documentation. - - This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: highest tool.server.url, then assistant.serverUrl, then phoneNumber.serverUrl, then org.serverUrl. - """ + sip_info_dtmf_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="sipInfoDtmfEnabled"), + pydantic.Field( + alias="sipInfoDtmfEnabled", + description="This enables sending DTMF tones via SIP INFO messages instead of RFC 2833 (RTP events). When enabled, DTMF digits will be sent using the SIP INFO method, which can be more reliable in some network configurations. Only relevant when using the `vapi.sip` transport.", + ), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -59,3 +46,6 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +update_forward_refs(CreateDtmfToolDto) diff --git a/src/vapi/types/create_dtmf_tool_dto_messages_item.py b/src/vapi/types/create_dtmf_tool_dto_messages_item.py index 1d74222d..2ccee01b 100644 --- a/src/vapi/types/create_dtmf_tool_dto_messages_item.py +++ b/src/vapi/types/create_dtmf_tool_dto_messages_item.py @@ -1,11 +1,104 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .tool_message_start import ToolMessageStart -from .tool_message_complete import ToolMessageComplete -from .tool_message_failed import ToolMessageFailed -from .tool_message_delayed import ToolMessageDelayed -CreateDtmfToolDtoMessagesItem = typing.Union[ - ToolMessageStart, ToolMessageComplete, ToolMessageFailed, ToolMessageDelayed +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class CreateDtmfToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateDtmfToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateDtmfToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateDtmfToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateDtmfToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + CreateDtmfToolDtoMessagesItem_RequestStart, + CreateDtmfToolDtoMessagesItem_RequestComplete, + CreateDtmfToolDtoMessagesItem_RequestFailed, + CreateDtmfToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), ] diff --git a/src/vapi/types/create_eleven_labs_credential_dto.py b/src/vapi/types/create_eleven_labs_credential_dto.py index 12aeedcb..838be877 100644 --- a/src/vapi/types/create_eleven_labs_credential_dto.py +++ b/src/vapi/types/create_eleven_labs_credential_dto.py @@ -1,18 +1,23 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class CreateElevenLabsCredentialDto(UniversalBaseModel): - provider: typing.Literal["11labs"] = "11labs" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() +class CreateElevenLabsCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is not returned in the API. + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/create_email_credential_dto.py b/src/vapi/types/create_email_credential_dto.py new file mode 100644 index 00000000..c0c4843d --- /dev/null +++ b/src/vapi/types/create_email_credential_dto.py @@ -0,0 +1,28 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class CreateEmailCredentialDto(UncheckedBaseModel): + email: str = pydantic.Field() + """ + The recipient email address for alerts + """ + + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_end_call_tool_dto.py b/src/vapi/types/create_end_call_tool_dto.py index 7a4eb682..d1492cdf 100644 --- a/src/vapi/types/create_end_call_tool_dto.py +++ b/src/vapi/types/create_end_call_tool_dto.py @@ -1,30 +1,19 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions +from __future__ import annotations + import typing -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel from .create_end_call_tool_dto_messages_item import CreateEndCallToolDtoMessagesItem -from .open_ai_function import OpenAiFunction -from .server import Server -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from .tool_rejection_plan import ToolRejectionPlan -class CreateEndCallToolDto(UniversalBaseModel): - async_: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="async")] = pydantic.Field( - default=None - ) - """ - This determines if the tool is async. - - If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server. - - If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server. - - Defaults to synchronous (`false`). - """ - +class CreateEndCallToolDto(UncheckedBaseModel): messages: typing.Optional[typing.List[CreateEndCallToolDtoMessagesItem]] = pydantic.Field(default=None) """ These are the messages that will be spoken to the user as the tool is running. @@ -32,24 +21,14 @@ class CreateEndCallToolDto(UniversalBaseModel): For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. """ - type: typing.Literal["endCall"] = "endCall" - function: typing.Optional[OpenAiFunction] = pydantic.Field(default=None) - """ - This is the function definition of the tool. - - For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on tool-specific fields like `tool.destinations`. But, even in those cases, you can provide a custom function definition for advanced use cases. - - An example of an advanced use case is if you want to customize the message that's spoken for `endCall` tool. You can specify a function where it returns an argument "reason". Then, in `messages` array, you can have many "request-complete" messages. One of these messages will be triggered if the `messages[].conditions` matches the "reason" argument. - """ - - server: typing.Optional[Server] = pydantic.Field(default=None) - """ - This is the server that will be hit when this tool is requested by the model. - - All requests will be sent with the call object among other things. You can find more details in the Server URL documentation. - - This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: highest tool.server.url, then assistant.serverUrl, then phoneNumber.serverUrl, then org.serverUrl. - """ + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -59,3 +38,6 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +update_forward_refs(CreateEndCallToolDto) diff --git a/src/vapi/types/create_end_call_tool_dto_messages_item.py b/src/vapi/types/create_end_call_tool_dto_messages_item.py index b65129e1..b15a3719 100644 --- a/src/vapi/types/create_end_call_tool_dto_messages_item.py +++ b/src/vapi/types/create_end_call_tool_dto_messages_item.py @@ -1,11 +1,104 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .tool_message_start import ToolMessageStart -from .tool_message_complete import ToolMessageComplete -from .tool_message_failed import ToolMessageFailed -from .tool_message_delayed import ToolMessageDelayed -CreateEndCallToolDtoMessagesItem = typing.Union[ - ToolMessageStart, ToolMessageComplete, ToolMessageFailed, ToolMessageDelayed +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class CreateEndCallToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateEndCallToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateEndCallToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateEndCallToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateEndCallToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + CreateEndCallToolDtoMessagesItem_RequestStart, + CreateEndCallToolDtoMessagesItem_RequestComplete, + CreateEndCallToolDtoMessagesItem_RequestFailed, + CreateEndCallToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), ] diff --git a/src/vapi/types/create_eval_dto.py b/src/vapi/types/create_eval_dto.py new file mode 100644 index 00000000..9b5d1eab --- /dev/null +++ b/src/vapi/types/create_eval_dto.py @@ -0,0 +1,47 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_eval_dto_messages_item import CreateEvalDtoMessagesItem +from .create_eval_dto_type import CreateEvalDtoType + + +class CreateEvalDto(UncheckedBaseModel): + messages: typing.List[CreateEvalDtoMessagesItem] = pydantic.Field() + """ + This is the mock conversation that will be used to evaluate the flow of the conversation. + + Mock Messages are used to simulate the flow of the conversation + + Evaluation Messages are used as checkpoints in the flow where the model's response to previous conversation needs to be evaluated to check the content and tool calls + """ + + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the eval. + It helps identify what the eval is checking for. + """ + + description: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the description of the eval. + This helps describe the eval and its purpose in detail. It will not be used to evaluate the flow of the conversation. + """ + + type: CreateEvalDtoType = pydantic.Field() + """ + This is the type of the eval. + Currently it is fixed to `chat.mockConversation`. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_eval_dto_messages_item.py b/src/vapi/types/create_eval_dto_messages_item.py new file mode 100644 index 00000000..0840dde2 --- /dev/null +++ b/src/vapi/types/create_eval_dto_messages_item.py @@ -0,0 +1,19 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .chat_eval_assistant_message_evaluation import ChatEvalAssistantMessageEvaluation +from .chat_eval_assistant_message_mock import ChatEvalAssistantMessageMock +from .chat_eval_system_message_mock import ChatEvalSystemMessageMock +from .chat_eval_tool_response_message_evaluation import ChatEvalToolResponseMessageEvaluation +from .chat_eval_tool_response_message_mock import ChatEvalToolResponseMessageMock +from .chat_eval_user_message_mock import ChatEvalUserMessageMock + +CreateEvalDtoMessagesItem = typing.Union[ + ChatEvalAssistantMessageMock, + ChatEvalSystemMessageMock, + ChatEvalToolResponseMessageMock, + ChatEvalToolResponseMessageEvaluation, + ChatEvalUserMessageMock, + ChatEvalAssistantMessageEvaluation, +] diff --git a/src/vapi/types/create_eval_dto_type.py b/src/vapi/types/create_eval_dto_type.py new file mode 100644 index 00000000..eda5b661 --- /dev/null +++ b/src/vapi/types/create_eval_dto_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CreateEvalDtoType = typing.Union[typing.Literal["chat.mockConversation"], typing.Any] diff --git a/src/vapi/types/create_function_tool_dto.py b/src/vapi/types/create_function_tool_dto.py index 531083bd..0561b3ee 100644 --- a/src/vapi/types/create_function_tool_dto.py +++ b/src/vapi/types/create_function_tool_dto.py @@ -1,30 +1,23 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions +from __future__ import annotations + import typing -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel from .create_function_tool_dto_messages_item import CreateFunctionToolDtoMessagesItem from .open_ai_function import OpenAiFunction from .server import Server -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from .tool_parameter import ToolParameter +from .tool_rejection_plan import ToolRejectionPlan +from .variable_extraction_plan import VariableExtractionPlan -class CreateFunctionToolDto(UniversalBaseModel): - async_: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="async")] = pydantic.Field( - default=None - ) - """ - This determines if the tool is async. - - If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server. - - If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server. - - Defaults to synchronous (`false`). - """ - +class CreateFunctionToolDto(UncheckedBaseModel): messages: typing.Optional[typing.List[CreateFunctionToolDtoMessagesItem]] = pydantic.Field(default=None) """ These are the messages that will be spoken to the user as the tool is running. @@ -32,25 +25,51 @@ class CreateFunctionToolDto(UniversalBaseModel): For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. """ - type: typing.Literal["function"] = "function" - function: typing.Optional[OpenAiFunction] = pydantic.Field(default=None) + async_: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="async"), + pydantic.Field( + alias="async", + description="This determines if the tool is async.\n\n If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.\n\n If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.\n\n Defaults to synchronous (`false`).", + ), + ] = None + server: typing.Optional[Server] = pydantic.Field(default=None) """ - This is the function definition of the tool. - For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on tool-specific fields like `tool.destinations`. But, even in those cases, you can provide a custom function definition for advanced use cases. + This is the server where a `tool-calls` webhook will be sent. - An example of an advanced use case is if you want to customize the message that's spoken for `endCall` tool. You can specify a function where it returns an argument "reason". Then, in `messages` array, you can have many "request-complete" messages. One of these messages will be triggered if the `messages[].conditions` matches the "reason" argument. + Notes: + - Webhook is sent to this server when a tool call is made. + - Webhook contains the call, assistant, and phone number objects. + - Webhook contains the variables set on the assistant. + - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}. + - Webhook expects a response with tool call result. """ - server: typing.Optional[Server] = pydantic.Field(default=None) + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan", description="Plan to extract variables from the tool response"), + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = pydantic.Field(default=None) """ - This is the server that will be hit when this tool is requested by the model. - - All requests will be sent with the call object among other things. You can find more details in the Server URL documentation. - - This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: highest tool.server.url, then assistant.serverUrl, then phoneNumber.serverUrl, then org.serverUrl. + Static key-value pairs merged into the request body. Values support Liquid templates. """ + function: typing.Optional[OpenAiFunction] = pydantic.Field(default=None) + """ + This is the function definition of the tool. + """ + + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: @@ -59,3 +78,6 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +update_forward_refs(CreateFunctionToolDto) diff --git a/src/vapi/types/create_function_tool_dto_messages_item.py b/src/vapi/types/create_function_tool_dto_messages_item.py index ad4f4cae..92d272c2 100644 --- a/src/vapi/types/create_function_tool_dto_messages_item.py +++ b/src/vapi/types/create_function_tool_dto_messages_item.py @@ -1,11 +1,104 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .tool_message_start import ToolMessageStart -from .tool_message_complete import ToolMessageComplete -from .tool_message_failed import ToolMessageFailed -from .tool_message_delayed import ToolMessageDelayed -CreateFunctionToolDtoMessagesItem = typing.Union[ - ToolMessageStart, ToolMessageComplete, ToolMessageFailed, ToolMessageDelayed +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class CreateFunctionToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateFunctionToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateFunctionToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateFunctionToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateFunctionToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + CreateFunctionToolDtoMessagesItem_RequestStart, + CreateFunctionToolDtoMessagesItem_RequestComplete, + CreateFunctionToolDtoMessagesItem_RequestFailed, + CreateFunctionToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), ] diff --git a/src/vapi/types/create_gcp_credential_dto.py b/src/vapi/types/create_gcp_credential_dto.py index 8869673b..c489e885 100644 --- a/src/vapi/types/create_gcp_credential_dto.py +++ b/src/vapi/types/create_gcp_credential_dto.py @@ -1,34 +1,44 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing + import pydantic import typing_extensions -from .gcp_key import GcpKey +from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel from .bucket_plan import BucketPlan -from ..core.pydantic_utilities import IS_PYDANTIC_V2 - +from .gcp_key import GcpKey -class CreateGcpCredentialDto(UniversalBaseModel): - provider: typing.Literal["gcp"] = "gcp" - name: typing.Optional[str] = pydantic.Field(default=None) - """ - This is the name of the GCP credential. This is just for your reference. - """ - gcp_key: typing_extensions.Annotated[GcpKey, FieldMetadata(alias="gcpKey")] = pydantic.Field() +class CreateGcpCredentialDto(UncheckedBaseModel): + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="fallbackIndex"), + pydantic.Field( + alias="fallbackIndex", + description="This is the order in which this storage provider is tried during upload retries. Lower numbers are tried first in increasing order.", + ), + ] = None + gcp_key: typing_extensions.Annotated[ + GcpKey, + FieldMetadata(alias="gcpKey"), + pydantic.Field( + alias="gcpKey", + description="This is the GCP key. This is the JSON that can be generated in the Google Cloud Console at https://console.cloud.google.com/iam-admin/serviceaccounts/details//keys.\n\nThe schema is identical to the JSON that GCP outputs.", + ), + ] + region: typing.Optional[str] = pydantic.Field(default=None) """ - This is the GCP key. This is the JSON that can be generated in the Google Cloud Console at https://console.cloud.google.com/iam-admin/serviceaccounts/details//keys. - - The schema is identical to the JSON that GCP outputs. + This is the region of the GCP resource. """ - bucket_plan: typing_extensions.Annotated[typing.Optional[BucketPlan], FieldMetadata(alias="bucketPlan")] = ( - pydantic.Field(default=None) - ) + bucket_plan: typing_extensions.Annotated[ + typing.Optional[BucketPlan], FieldMetadata(alias="bucketPlan"), pydantic.Field(alias="bucketPlan") + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is the bucket plan that can be provided to store call artifacts in GCP. + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/create_ghl_tool_dto.py b/src/vapi/types/create_ghl_tool_dto.py index 3a1edca3..4e23e908 100644 --- a/src/vapi/types/create_ghl_tool_dto.py +++ b/src/vapi/types/create_ghl_tool_dto.py @@ -1,31 +1,21 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions +from __future__ import annotations + import typing -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel from .create_ghl_tool_dto_messages_item import CreateGhlToolDtoMessagesItem +from .create_ghl_tool_dto_type import CreateGhlToolDtoType from .ghl_tool_metadata import GhlToolMetadata -from .open_ai_function import OpenAiFunction -from .server import Server -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from .tool_rejection_plan import ToolRejectionPlan -class CreateGhlToolDto(UniversalBaseModel): - async_: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="async")] = pydantic.Field( - default=None - ) - """ - This determines if the tool is async. - - If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server. - - If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server. - - Defaults to synchronous (`false`). - """ - +class CreateGhlToolDto(UncheckedBaseModel): messages: typing.Optional[typing.List[CreateGhlToolDtoMessagesItem]] = pydantic.Field(default=None) """ These are the messages that will be spoken to the user as the tool is running. @@ -33,25 +23,20 @@ class CreateGhlToolDto(UniversalBaseModel): For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. """ - type: typing.Literal["ghl"] = "ghl" - metadata: GhlToolMetadata - function: typing.Optional[OpenAiFunction] = pydantic.Field(default=None) + type: CreateGhlToolDtoType = pydantic.Field() """ - This is the function definition of the tool. - - For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on tool-specific fields like `tool.destinations`. But, even in those cases, you can provide a custom function definition for advanced use cases. - - An example of an advanced use case is if you want to customize the message that's spoken for `endCall` tool. You can specify a function where it returns an argument "reason". Then, in `messages` array, you can have many "request-complete" messages. One of these messages will be triggered if the `messages[].conditions` matches the "reason" argument. + The type of tool. "ghl" for GHL tool. """ - server: typing.Optional[Server] = pydantic.Field(default=None) - """ - This is the server that will be hit when this tool is requested by the model. - - All requests will be sent with the call object among other things. You can find more details in the Server URL documentation. - - This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: highest tool.server.url, then assistant.serverUrl, then phoneNumber.serverUrl, then org.serverUrl. - """ + metadata: GhlToolMetadata + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -61,3 +46,6 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +update_forward_refs(CreateGhlToolDto) diff --git a/src/vapi/types/create_ghl_tool_dto_messages_item.py b/src/vapi/types/create_ghl_tool_dto_messages_item.py index e33f3910..2bdcaa0c 100644 --- a/src/vapi/types/create_ghl_tool_dto_messages_item.py +++ b/src/vapi/types/create_ghl_tool_dto_messages_item.py @@ -1,11 +1,104 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .tool_message_start import ToolMessageStart -from .tool_message_complete import ToolMessageComplete -from .tool_message_failed import ToolMessageFailed -from .tool_message_delayed import ToolMessageDelayed -CreateGhlToolDtoMessagesItem = typing.Union[ - ToolMessageStart, ToolMessageComplete, ToolMessageFailed, ToolMessageDelayed +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class CreateGhlToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateGhlToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateGhlToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateGhlToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateGhlToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + CreateGhlToolDtoMessagesItem_RequestStart, + CreateGhlToolDtoMessagesItem_RequestComplete, + CreateGhlToolDtoMessagesItem_RequestFailed, + CreateGhlToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), ] diff --git a/src/vapi/types/create_ghl_tool_dto_type.py b/src/vapi/types/create_ghl_tool_dto_type.py new file mode 100644 index 00000000..575da151 --- /dev/null +++ b/src/vapi/types/create_ghl_tool_dto_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CreateGhlToolDtoType = typing.Union[typing.Literal["ghl"], typing.Any] diff --git a/src/vapi/types/create_gladia_credential_dto.py b/src/vapi/types/create_gladia_credential_dto.py index 798377f7..c445e83a 100644 --- a/src/vapi/types/create_gladia_credential_dto.py +++ b/src/vapi/types/create_gladia_credential_dto.py @@ -1,18 +1,23 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class CreateGladiaCredentialDto(UniversalBaseModel): - provider: typing.Literal["gladia"] = "gladia" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() +class CreateGladiaCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is not returned in the API. + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/create_go_high_level_calendar_availability_tool_dto.py b/src/vapi/types/create_go_high_level_calendar_availability_tool_dto.py new file mode 100644 index 00000000..a693d3f8 --- /dev/null +++ b/src/vapi/types/create_go_high_level_calendar_availability_tool_dto.py @@ -0,0 +1,47 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_go_high_level_calendar_availability_tool_dto_messages_item import ( + CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem, +) +from .tool_rejection_plan import ToolRejectionPlan + + +class CreateGoHighLevelCalendarAvailabilityToolDto(UncheckedBaseModel): + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem]] = pydantic.Field( + default=None + ) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(CreateGoHighLevelCalendarAvailabilityToolDto) diff --git a/src/vapi/types/create_go_high_level_calendar_availability_tool_dto_messages_item.py b/src/vapi/types/create_go_high_level_calendar_availability_tool_dto_messages_item.py new file mode 100644 index 00000000..a555af71 --- /dev/null +++ b/src/vapi/types/create_go_high_level_calendar_availability_tool_dto_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestStart, + CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestComplete, + CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestFailed, + CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/create_go_high_level_calendar_event_create_tool_dto.py b/src/vapi/types/create_go_high_level_calendar_event_create_tool_dto.py new file mode 100644 index 00000000..4b4351f0 --- /dev/null +++ b/src/vapi/types/create_go_high_level_calendar_event_create_tool_dto.py @@ -0,0 +1,47 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_go_high_level_calendar_event_create_tool_dto_messages_item import ( + CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem, +) +from .tool_rejection_plan import ToolRejectionPlan + + +class CreateGoHighLevelCalendarEventCreateToolDto(UncheckedBaseModel): + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem]] = pydantic.Field( + default=None + ) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(CreateGoHighLevelCalendarEventCreateToolDto) diff --git a/src/vapi/types/create_go_high_level_calendar_event_create_tool_dto_messages_item.py b/src/vapi/types/create_go_high_level_calendar_event_create_tool_dto_messages_item.py new file mode 100644 index 00000000..dbbf137a --- /dev/null +++ b/src/vapi/types/create_go_high_level_calendar_event_create_tool_dto_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestStart, + CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestComplete, + CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestFailed, + CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/create_go_high_level_contact_create_tool_dto.py b/src/vapi/types/create_go_high_level_contact_create_tool_dto.py new file mode 100644 index 00000000..1e69f2ad --- /dev/null +++ b/src/vapi/types/create_go_high_level_contact_create_tool_dto.py @@ -0,0 +1,47 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_go_high_level_contact_create_tool_dto_messages_item import ( + CreateGoHighLevelContactCreateToolDtoMessagesItem, +) +from .tool_rejection_plan import ToolRejectionPlan + + +class CreateGoHighLevelContactCreateToolDto(UncheckedBaseModel): + messages: typing.Optional[typing.List[CreateGoHighLevelContactCreateToolDtoMessagesItem]] = pydantic.Field( + default=None + ) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(CreateGoHighLevelContactCreateToolDto) diff --git a/src/vapi/types/create_go_high_level_contact_create_tool_dto_messages_item.py b/src/vapi/types/create_go_high_level_contact_create_tool_dto_messages_item.py new file mode 100644 index 00000000..20085383 --- /dev/null +++ b/src/vapi/types/create_go_high_level_contact_create_tool_dto_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class CreateGoHighLevelContactCreateToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateGoHighLevelContactCreateToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateGoHighLevelContactCreateToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateGoHighLevelContactCreateToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateGoHighLevelContactCreateToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + CreateGoHighLevelContactCreateToolDtoMessagesItem_RequestStart, + CreateGoHighLevelContactCreateToolDtoMessagesItem_RequestComplete, + CreateGoHighLevelContactCreateToolDtoMessagesItem_RequestFailed, + CreateGoHighLevelContactCreateToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/create_go_high_level_contact_get_tool_dto.py b/src/vapi/types/create_go_high_level_contact_get_tool_dto.py new file mode 100644 index 00000000..506250ec --- /dev/null +++ b/src/vapi/types/create_go_high_level_contact_get_tool_dto.py @@ -0,0 +1,45 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_go_high_level_contact_get_tool_dto_messages_item import CreateGoHighLevelContactGetToolDtoMessagesItem +from .tool_rejection_plan import ToolRejectionPlan + + +class CreateGoHighLevelContactGetToolDto(UncheckedBaseModel): + messages: typing.Optional[typing.List[CreateGoHighLevelContactGetToolDtoMessagesItem]] = pydantic.Field( + default=None + ) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(CreateGoHighLevelContactGetToolDto) diff --git a/src/vapi/types/create_go_high_level_contact_get_tool_dto_messages_item.py b/src/vapi/types/create_go_high_level_contact_get_tool_dto_messages_item.py new file mode 100644 index 00000000..07d17513 --- /dev/null +++ b/src/vapi/types/create_go_high_level_contact_get_tool_dto_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class CreateGoHighLevelContactGetToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateGoHighLevelContactGetToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateGoHighLevelContactGetToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateGoHighLevelContactGetToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateGoHighLevelContactGetToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + CreateGoHighLevelContactGetToolDtoMessagesItem_RequestStart, + CreateGoHighLevelContactGetToolDtoMessagesItem_RequestComplete, + CreateGoHighLevelContactGetToolDtoMessagesItem_RequestFailed, + CreateGoHighLevelContactGetToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/create_go_high_level_credential_dto.py b/src/vapi/types/create_go_high_level_credential_dto.py index 2b3a7c70..02f0c970 100644 --- a/src/vapi/types/create_go_high_level_credential_dto.py +++ b/src/vapi/types/create_go_high_level_credential_dto.py @@ -1,18 +1,23 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class CreateGoHighLevelCredentialDto(UniversalBaseModel): - provider: typing.Literal["gohighlevel"] = "gohighlevel" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() +class CreateGoHighLevelCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is not returned in the API. + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/create_go_high_level_mcp_credential_dto.py b/src/vapi/types/create_go_high_level_mcp_credential_dto.py new file mode 100644 index 00000000..d68307d2 --- /dev/null +++ b/src/vapi/types/create_go_high_level_mcp_credential_dto.py @@ -0,0 +1,33 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .oauth_2_authentication_session import Oauth2AuthenticationSession + + +class CreateGoHighLevelMcpCredentialDto(UncheckedBaseModel): + authentication_session: typing_extensions.Annotated[ + Oauth2AuthenticationSession, + FieldMetadata(alias="authenticationSession"), + pydantic.Field( + alias="authenticationSession", description="This is the authentication session for the credential." + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_google_calendar_check_availability_tool_dto.py b/src/vapi/types/create_google_calendar_check_availability_tool_dto.py new file mode 100644 index 00000000..d7e06af2 --- /dev/null +++ b/src/vapi/types/create_google_calendar_check_availability_tool_dto.py @@ -0,0 +1,47 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_google_calendar_check_availability_tool_dto_messages_item import ( + CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem, +) +from .tool_rejection_plan import ToolRejectionPlan + + +class CreateGoogleCalendarCheckAvailabilityToolDto(UncheckedBaseModel): + messages: typing.Optional[typing.List[CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem]] = pydantic.Field( + default=None + ) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(CreateGoogleCalendarCheckAvailabilityToolDto) diff --git a/src/vapi/types/create_google_calendar_check_availability_tool_dto_messages_item.py b/src/vapi/types/create_google_calendar_check_availability_tool_dto_messages_item.py new file mode 100644 index 00000000..0f3ca5c5 --- /dev/null +++ b/src/vapi/types/create_google_calendar_check_availability_tool_dto_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestStart, + CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestComplete, + CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestFailed, + CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/create_google_calendar_create_event_tool_dto.py b/src/vapi/types/create_google_calendar_create_event_tool_dto.py new file mode 100644 index 00000000..82baf381 --- /dev/null +++ b/src/vapi/types/create_google_calendar_create_event_tool_dto.py @@ -0,0 +1,47 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_google_calendar_create_event_tool_dto_messages_item import ( + CreateGoogleCalendarCreateEventToolDtoMessagesItem, +) +from .tool_rejection_plan import ToolRejectionPlan + + +class CreateGoogleCalendarCreateEventToolDto(UncheckedBaseModel): + messages: typing.Optional[typing.List[CreateGoogleCalendarCreateEventToolDtoMessagesItem]] = pydantic.Field( + default=None + ) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(CreateGoogleCalendarCreateEventToolDto) diff --git a/src/vapi/types/create_google_calendar_create_event_tool_dto_messages_item.py b/src/vapi/types/create_google_calendar_create_event_tool_dto_messages_item.py new file mode 100644 index 00000000..90f8cda8 --- /dev/null +++ b/src/vapi/types/create_google_calendar_create_event_tool_dto_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class CreateGoogleCalendarCreateEventToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateGoogleCalendarCreateEventToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateGoogleCalendarCreateEventToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateGoogleCalendarCreateEventToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateGoogleCalendarCreateEventToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + CreateGoogleCalendarCreateEventToolDtoMessagesItem_RequestStart, + CreateGoogleCalendarCreateEventToolDtoMessagesItem_RequestComplete, + CreateGoogleCalendarCreateEventToolDtoMessagesItem_RequestFailed, + CreateGoogleCalendarCreateEventToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/create_google_calendar_o_auth_2_authorization_credential_dto.py b/src/vapi/types/create_google_calendar_o_auth_2_authorization_credential_dto.py new file mode 100644 index 00000000..fd9d35cb --- /dev/null +++ b/src/vapi/types/create_google_calendar_o_auth_2_authorization_credential_dto.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class CreateGoogleCalendarOAuth2AuthorizationCredentialDto(UncheckedBaseModel): + authorization_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="authorizationId"), + pydantic.Field(alias="authorizationId", description="The authorization ID for the OAuth2 authorization"), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_google_calendar_o_auth_2_client_credential_dto.py b/src/vapi/types/create_google_calendar_o_auth_2_client_credential_dto.py new file mode 100644 index 00000000..e01d67ad --- /dev/null +++ b/src/vapi/types/create_google_calendar_o_auth_2_client_credential_dto.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class CreateGoogleCalendarOAuth2ClientCredentialDto(UncheckedBaseModel): + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_google_credential_dto.py b/src/vapi/types/create_google_credential_dto.py new file mode 100644 index 00000000..5851939b --- /dev/null +++ b/src/vapi/types/create_google_credential_dto.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class CreateGoogleCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_google_sheets_o_auth_2_authorization_credential_dto.py b/src/vapi/types/create_google_sheets_o_auth_2_authorization_credential_dto.py new file mode 100644 index 00000000..cb89677c --- /dev/null +++ b/src/vapi/types/create_google_sheets_o_auth_2_authorization_credential_dto.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class CreateGoogleSheetsOAuth2AuthorizationCredentialDto(UncheckedBaseModel): + authorization_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="authorizationId"), + pydantic.Field(alias="authorizationId", description="The authorization ID for the OAuth2 authorization"), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_google_sheets_row_append_tool_dto.py b/src/vapi/types/create_google_sheets_row_append_tool_dto.py new file mode 100644 index 00000000..ffbf6551 --- /dev/null +++ b/src/vapi/types/create_google_sheets_row_append_tool_dto.py @@ -0,0 +1,45 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_google_sheets_row_append_tool_dto_messages_item import CreateGoogleSheetsRowAppendToolDtoMessagesItem +from .tool_rejection_plan import ToolRejectionPlan + + +class CreateGoogleSheetsRowAppendToolDto(UncheckedBaseModel): + messages: typing.Optional[typing.List[CreateGoogleSheetsRowAppendToolDtoMessagesItem]] = pydantic.Field( + default=None + ) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(CreateGoogleSheetsRowAppendToolDto) diff --git a/src/vapi/types/create_google_sheets_row_append_tool_dto_messages_item.py b/src/vapi/types/create_google_sheets_row_append_tool_dto_messages_item.py new file mode 100644 index 00000000..71f52189 --- /dev/null +++ b/src/vapi/types/create_google_sheets_row_append_tool_dto_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class CreateGoogleSheetsRowAppendToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateGoogleSheetsRowAppendToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateGoogleSheetsRowAppendToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateGoogleSheetsRowAppendToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateGoogleSheetsRowAppendToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + CreateGoogleSheetsRowAppendToolDtoMessagesItem_RequestStart, + CreateGoogleSheetsRowAppendToolDtoMessagesItem_RequestComplete, + CreateGoogleSheetsRowAppendToolDtoMessagesItem_RequestFailed, + CreateGoogleSheetsRowAppendToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/create_groq_credential_dto.py b/src/vapi/types/create_groq_credential_dto.py index 40d67a76..eb951766 100644 --- a/src/vapi/types/create_groq_credential_dto.py +++ b/src/vapi/types/create_groq_credential_dto.py @@ -1,18 +1,23 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class CreateGroqCredentialDto(UniversalBaseModel): - provider: typing.Literal["groq"] = "groq" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() +class CreateGroqCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is not returned in the API. + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/create_handoff_tool_dto.py b/src/vapi/types/create_handoff_tool_dto.py new file mode 100644 index 00000000..2b5ba862 --- /dev/null +++ b/src/vapi/types/create_handoff_tool_dto.py @@ -0,0 +1,441 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_handoff_tool_dto_messages_item import CreateHandoffToolDtoMessagesItem +from .open_ai_function import OpenAiFunction +from .tool_rejection_plan import ToolRejectionPlan + + +class CreateHandoffToolDto(UncheckedBaseModel): + messages: typing.Optional[typing.List[CreateHandoffToolDtoMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + default_result: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="defaultResult"), + pydantic.Field( + alias="defaultResult", + description="This is the default local tool result message used when no runtime handoff result override is returned.", + ), + ] = None + destinations: typing.Optional[typing.List["CreateHandoffToolDtoDestinationsItem"]] = pydantic.Field(default=None) + """ + These are the destinations that the call can be handed off to. + + Usage: + 1. Single destination + + Use `assistantId` to handoff the call to a saved assistant, or `assistantName` to handoff the call to an assistant in the same squad. + + ```json + { + "tools": [ + { + "type": "handoff", + "destinations": [ + { + "type": "assistant", + "assistantId": "assistant-123", // or "assistantName": "Assistant123" + "description": "customer wants to be handed off to assistant-123", + "contextEngineeringPlan": { + "type": "all" + } + } + ], + } + ] + } + ``` + + 2. Multiple destinations + + 2.1. Multiple Tools, Each With One Destination (OpenAI recommended) + + ```json + { + "tools": [ + { + "type": "handoff", + "destinations": [ + { + "type": "assistant", + "assistantId": "assistant-123", + "description": "customer wants to be handed off to assistant-123", + "contextEngineeringPlan": { + "type": "all" + } + }, + ], + }, + { + "type": "handoff", + "destinations": [ + { + "type": "assistant", + "assistantId": "assistant-456", + "description": "customer wants to be handed off to assistant-456", + "contextEngineeringPlan": { + "type": "all" + } + } + ], + } + ] + } + ``` + + 2.2. One Tool, Multiple Destinations (Anthropic recommended) + + ```json + { + "tools": [ + { + "type": "handoff", + "destinations": [ + { + "type": "assistant", + "assistantId": "assistant-123", + "description": "customer wants to be handed off to assistant-123", + "contextEngineeringPlan": { + "type": "all" + } + }, + { + "type": "assistant", + "assistantId": "assistant-456", + "description": "customer wants to be handed off to assistant-456", + "contextEngineeringPlan": { + "type": "all" + } + } + ], + } + ] + } + ``` + + 3. Dynamic destination + + 3.1 To determine the destination dynamically, supply a `dynamic` handoff destination type and a `server` object. + VAPI will send a handoff-destination-request webhook to the `server.url`. + The response from the server will be used as the destination (if valid). + + ```json + { + "tools": [ + { + "type": "handoff", + "destinations": [ + { + "type": "dynamic", + "server": { + "url": "https://example.com" + } + } + ], + } + ] + } + ``` + + 3.2. To pass custom parameters to the server, you can use the `function` object. + + ```json + { + "tools": [ + { + "type": "handoff", + "destinations": [ + { + "type": "dynamic", + "server": { + "url": "https://example.com" + }, + } + ], + "function": { + "name": "handoff", + "description": "Call this function when the customer is ready to be handed off to the next assistant", + "parameters": { + "type": "object", + "properties": { + "destination": { + "type": "string", + "description": "Use dynamic when customer is ready to be handed off to the next assistant", + "enum": ["dynamic"] + }, + "customerAreaCode": { + "type": "number", + "description": "Area code of the customer" + }, + "customerIntent": { + "type": "string", + "enum": ["new-customer", "existing-customer"], + "description": "Use new-customer when customer is a new customer, existing-customer when customer is an existing customer" + }, + "customerSentiment": { + "type": "string", + "enum": ["positive", "negative", "neutral"], + "description": "Use positive when customer is happy, negative when customer is unhappy, neutral when customer is neutral" + } + } + } + } + } + ] + } + ``` + + The properties `customerAreaCode`, `customerIntent`, and `customerSentiment` will be passed to the server in the webhook request body. + """ + + function: typing.Optional[OpenAiFunction] = pydantic.Field(default=None) + """ + This is the optional function definition that will be passed to the LLM. + If this is not defined, we will construct this based on the other properties. + + For example, given the following tools definition: + ```json + { + "tools": [ + { + "type": "handoff", + "destinations": [ + { + "type": "assistant", + "assistantId": "assistant-123", + "description": "customer wants to be handed off to assistant-123", + "contextEngineeringPlan": { + "type": "all" + } + }, + { + "type": "assistant", + "assistantId": "assistant-456", + "description": "customer wants to be handed off to assistant-456", + "contextEngineeringPlan": { + "type": "all" + } + } + ], + } + ] + } + ``` + + We will construct the following function definition: + ```json + { + "function": { + "name": "handoff_to_assistant-123", + "description": " + Use this function to handoff the call to the next assistant. + Only use it when instructions explicitly ask you to use the handoff_to_assistant function. + DO NOT call this function unless you are instructed to do so. + Here are the destinations you can handoff the call to: + 1. assistant-123. When: customer wants to be handed off to assistant-123 + 2. assistant-456. When: customer wants to be handed off to assistant-456 + ", + "parameters": { + "type": "object", + "properties": { + "destination": { + "type": "string", + "description": "Options: assistant-123 (customer wants to be handed off to assistant-123), assistant-456 (customer wants to be handed off to assistant-456)", + "enum": ["assistant-123", "assistant-456"] + }, + }, + "required": ["destination"] + } + } + } + ``` + + To override this function, please provide an OpenAI function definition and refer to it in the system prompt. + You may override parts of the function definition (i.e. you may only want to change the function name for your prompt). + If you choose to override the function parameters, it must include `destination` as a required parameter, and it must evaluate to either an assistantId, assistantName, or a the string literal `dynamic`. + + To pass custom parameters to the server in a dynamic handoff, you can use the function parameters, with `dynamic` as the destination. + ```json + { + "function": { + "name": "dynamic_handoff", + "description": " + Call this function when the customer is ready to be handed off to the next assistant + ", + "parameters": { + "type": "object", + "properties": { + "destination": { + "type": "string", + "enum": ["dynamic"] + }, + "customerAreaCode": { + "type": "number", + "description": "Area code of the customer" + }, + "customerIntent": { + "type": "string", + "enum": ["new-customer", "existing-customer"], + "description": "Use new-customer when customer is a new customer, existing-customer when customer is an existing customer" + }, + "customerSentiment": { + "type": "string", + "enum": ["positive", "negative", "neutral"], + "description": "Use positive when customer is happy, negative when customer is unhappy, neutral when customer is neutral" + } + }, + "required": ["destination", "customerAreaCode", "customerIntent", "customerSentiment"] + } + } + } + ``` + """ + + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + CreateHandoffToolDto, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/create_handoff_tool_dto_destinations_item.py b/src/vapi/types/create_handoff_tool_dto_destinations_item.py new file mode 100644 index 00000000..4732aa99 --- /dev/null +++ b/src/vapi/types/create_handoff_tool_dto_destinations_item.py @@ -0,0 +1,287 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .handoff_destination_assistant_context_engineering_plan import HandoffDestinationAssistantContextEngineeringPlan +from .handoff_destination_squad_context_engineering_plan import HandoffDestinationSquadContextEngineeringPlan +from .server import Server +from .variable_extraction_plan import VariableExtractionPlan + + +class CreateHandoffToolDtoDestinationsItem_Assistant(UncheckedBaseModel): + type: typing.Literal["assistant"] = "assistant" + context_engineering_plan: typing_extensions.Annotated[ + typing.Optional[HandoffDestinationAssistantContextEngineeringPlan], + FieldMetadata(alias="contextEngineeringPlan"), + pydantic.Field(alias="contextEngineeringPlan"), + ] = None + assistant_name: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantName"), pydantic.Field(alias="assistantName") + ] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + assistant: typing.Optional["CreateAssistantDto"] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + assistant_overrides: typing_extensions.Annotated[ + typing.Optional["AssistantOverrides"], + FieldMetadata(alias="assistantOverrides"), + pydantic.Field(alias="assistantOverrides"), + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateHandoffToolDtoDestinationsItem_Dynamic(UncheckedBaseModel): + type: typing.Literal["dynamic"] = "dynamic" + server: typing.Optional[Server] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateHandoffToolDtoDestinationsItem_Squad(UncheckedBaseModel): + type: typing.Literal["squad"] = "squad" + context_engineering_plan: typing_extensions.Annotated[ + typing.Optional[HandoffDestinationSquadContextEngineeringPlan], + FieldMetadata(alias="contextEngineeringPlan"), + pydantic.Field(alias="contextEngineeringPlan"), + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + squad: typing.Optional["CreateSquadDto"] = None + entry_assistant_name: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="entryAssistantName"), pydantic.Field(alias="entryAssistantName") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + squad_overrides: typing_extensions.Annotated[ + typing.Optional["AssistantOverrides"], + FieldMetadata(alias="squadOverrides"), + pydantic.Field(alias="squadOverrides"), + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateHandoffToolDtoDestinationsItem = typing_extensions.Annotated[ + typing.Union[ + CreateHandoffToolDtoDestinationsItem_Assistant, + CreateHandoffToolDtoDestinationsItem_Dynamic, + CreateHandoffToolDtoDestinationsItem_Squad, + ], + UnionMetadata(discriminant="type"), +] +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 + +update_forward_refs( + CreateHandoffToolDtoDestinationsItem_Assistant, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + CreateHandoffToolDtoDestinationsItem_Squad, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/create_handoff_tool_dto_messages_item.py b/src/vapi/types/create_handoff_tool_dto_messages_item.py new file mode 100644 index 00000000..39558560 --- /dev/null +++ b/src/vapi/types/create_handoff_tool_dto_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class CreateHandoffToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateHandoffToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateHandoffToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateHandoffToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateHandoffToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + CreateHandoffToolDtoMessagesItem_RequestStart, + CreateHandoffToolDtoMessagesItem_RequestComplete, + CreateHandoffToolDtoMessagesItem_RequestFailed, + CreateHandoffToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/create_hume_credential_dto.py b/src/vapi/types/create_hume_credential_dto.py new file mode 100644 index 00000000..1aad6a61 --- /dev/null +++ b/src/vapi/types/create_hume_credential_dto.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class CreateHumeCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_inflection_ai_credential_dto.py b/src/vapi/types/create_inflection_ai_credential_dto.py new file mode 100644 index 00000000..12378154 --- /dev/null +++ b/src/vapi/types/create_inflection_ai_credential_dto.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class CreateInflectionAiCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_inworld_credential_dto.py b/src/vapi/types/create_inworld_credential_dto.py new file mode 100644 index 00000000..37bc7f47 --- /dev/null +++ b/src/vapi/types/create_inworld_credential_dto.py @@ -0,0 +1,33 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class CreateInworldCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field( + alias="apiKey", + description="This is the Inworld Basic (Base64) authentication token. This is not returned in the API.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_langfuse_credential_dto.py b/src/vapi/types/create_langfuse_credential_dto.py new file mode 100644 index 00000000..969407c6 --- /dev/null +++ b/src/vapi/types/create_langfuse_credential_dto.py @@ -0,0 +1,43 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class CreateLangfuseCredentialDto(UncheckedBaseModel): + public_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="publicKey"), + pydantic.Field(alias="publicKey", description="The public key for Langfuse project. Eg: pk-lf-..."), + ] + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field( + alias="apiKey", + description="The secret key for Langfuse project. Eg: sk-lf-... .This is not returned in the API.", + ), + ] + api_url: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiUrl"), + pydantic.Field(alias="apiUrl", description="The host URL for Langfuse project. Eg: https://cloud.langfuse.com"), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_line_insight_from_call_table_dto.py b/src/vapi/types/create_line_insight_from_call_table_dto.py new file mode 100644 index 00000000..eb9104f1 --- /dev/null +++ b/src/vapi/types/create_line_insight_from_call_table_dto.py @@ -0,0 +1,70 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_line_insight_from_call_table_dto_group_by import CreateLineInsightFromCallTableDtoGroupBy +from .create_line_insight_from_call_table_dto_queries_item import CreateLineInsightFromCallTableDtoQueriesItem +from .insight_formula import InsightFormula +from .insight_time_range_with_step import InsightTimeRangeWithStep +from .line_insight_metadata import LineInsightMetadata + + +class CreateLineInsightFromCallTableDto(UncheckedBaseModel): + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the Insight. + """ + + formulas: typing.Optional[typing.List[InsightFormula]] = pydantic.Field(default=None) + """ + Formulas are mathematical expressions applied on the data returned by the queries to transform them before being used to create the insight. + The formulas needs to be a valid mathematical expression, supported by MathJS - https://mathjs.org/docs/expressions/syntax.html + A formula is created by using the query names as the variable. + The formulas must contain at least one query name in the LiquidJS format {{query_name}} or {{['query name']}} which will be substituted with the query result. + For example, if you have 2 queries, 'Was Booking Made' and 'Average Call Duration', you can create a formula like this: + ``` + {{['Query 1']}} / {{['Query 2']}} * 100 + ``` + + ``` + ({{[Query 1]}} * 10) + {{[Query 2]}} + ``` + This will take the + + You can also use the query names as the variable in the formula. + """ + + metadata: typing.Optional[LineInsightMetadata] = pydantic.Field(default=None) + """ + This is the metadata for the insight. + """ + + time_range: typing_extensions.Annotated[ + typing.Optional[InsightTimeRangeWithStep], FieldMetadata(alias="timeRange"), pydantic.Field(alias="timeRange") + ] = None + group_by: typing_extensions.Annotated[ + typing.Optional[CreateLineInsightFromCallTableDtoGroupBy], + FieldMetadata(alias="groupBy"), + pydantic.Field( + alias="groupBy", + description="This is the group by column for the insight when table is `call`.\nThese are the columns to group the results by.\nAll results are grouped by the time range step by default.", + ), + ] = None + queries: typing.List[CreateLineInsightFromCallTableDtoQueriesItem] = pydantic.Field() + """ + These are the queries to run to generate the insight. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_line_insight_from_call_table_dto_group_by.py b/src/vapi/types/create_line_insight_from_call_table_dto_group_by.py new file mode 100644 index 00000000..e0fdd532 --- /dev/null +++ b/src/vapi/types/create_line_insight_from_call_table_dto_group_by.py @@ -0,0 +1,18 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CreateLineInsightFromCallTableDtoGroupBy = typing.Union[ + typing.Literal[ + "assistantId", + "workflowId", + "squadId", + "phoneNumberId", + "type", + "endedReason", + "customerNumber", + "campaignId", + "artifact.structuredOutputs[OutputID]", + ], + typing.Any, +] diff --git a/src/vapi/types/create_line_insight_from_call_table_dto_queries_item.py b/src/vapi/types/create_line_insight_from_call_table_dto_queries_item.py new file mode 100644 index 00000000..2e97f4c9 --- /dev/null +++ b/src/vapi/types/create_line_insight_from_call_table_dto_queries_item.py @@ -0,0 +1,13 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .json_query_on_call_table_with_number_type_column import JsonQueryOnCallTableWithNumberTypeColumn +from .json_query_on_call_table_with_string_type_column import JsonQueryOnCallTableWithStringTypeColumn +from .json_query_on_call_table_with_structured_output_column import JsonQueryOnCallTableWithStructuredOutputColumn + +CreateLineInsightFromCallTableDtoQueriesItem = typing.Union[ + JsonQueryOnCallTableWithStringTypeColumn, + JsonQueryOnCallTableWithNumberTypeColumn, + JsonQueryOnCallTableWithStructuredOutputColumn, +] diff --git a/src/vapi/types/create_lmnt_credential_dto.py b/src/vapi/types/create_lmnt_credential_dto.py index cb3e516b..5c09af82 100644 --- a/src/vapi/types/create_lmnt_credential_dto.py +++ b/src/vapi/types/create_lmnt_credential_dto.py @@ -1,18 +1,23 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class CreateLmntCredentialDto(UniversalBaseModel): - provider: typing.Literal["lmnt"] = "lmnt" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() +class CreateLmntCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is not returned in the API. + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/create_make_credential_dto.py b/src/vapi/types/create_make_credential_dto.py index 461f9c8d..fdb7061c 100644 --- a/src/vapi/types/create_make_credential_dto.py +++ b/src/vapi/types/create_make_credential_dto.py @@ -1,28 +1,31 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class CreateMakeCredentialDto(UniversalBaseModel): - provider: typing.Literal["make"] = "make" - team_id: typing_extensions.Annotated[str, FieldMetadata(alias="teamId")] = pydantic.Field() - """ - Team ID - """ - +class CreateMakeCredentialDto(UncheckedBaseModel): + team_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="teamId"), pydantic.Field(alias="teamId", description="Team ID") + ] region: str = pydantic.Field() """ Region of your application. For example: eu1, eu2, us1, us2 """ - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is not returned in the API. + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/create_make_tool_dto.py b/src/vapi/types/create_make_tool_dto.py index edb626ac..067e4605 100644 --- a/src/vapi/types/create_make_tool_dto.py +++ b/src/vapi/types/create_make_tool_dto.py @@ -1,31 +1,21 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions +from __future__ import annotations + import typing -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel from .create_make_tool_dto_messages_item import CreateMakeToolDtoMessagesItem +from .create_make_tool_dto_type import CreateMakeToolDtoType from .make_tool_metadata import MakeToolMetadata -from .open_ai_function import OpenAiFunction -from .server import Server -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from .tool_rejection_plan import ToolRejectionPlan -class CreateMakeToolDto(UniversalBaseModel): - async_: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="async")] = pydantic.Field( - default=None - ) - """ - This determines if the tool is async. - - If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server. - - If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server. - - Defaults to synchronous (`false`). - """ - +class CreateMakeToolDto(UncheckedBaseModel): messages: typing.Optional[typing.List[CreateMakeToolDtoMessagesItem]] = pydantic.Field(default=None) """ These are the messages that will be spoken to the user as the tool is running. @@ -33,25 +23,20 @@ class CreateMakeToolDto(UniversalBaseModel): For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. """ - type: typing.Literal["make"] = "make" - metadata: MakeToolMetadata - function: typing.Optional[OpenAiFunction] = pydantic.Field(default=None) + type: CreateMakeToolDtoType = pydantic.Field() """ - This is the function definition of the tool. - - For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on tool-specific fields like `tool.destinations`. But, even in those cases, you can provide a custom function definition for advanced use cases. - - An example of an advanced use case is if you want to customize the message that's spoken for `endCall` tool. You can specify a function where it returns an argument "reason". Then, in `messages` array, you can have many "request-complete" messages. One of these messages will be triggered if the `messages[].conditions` matches the "reason" argument. + The type of tool. "make" for Make tool. """ - server: typing.Optional[Server] = pydantic.Field(default=None) - """ - This is the server that will be hit when this tool is requested by the model. - - All requests will be sent with the call object among other things. You can find more details in the Server URL documentation. - - This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: highest tool.server.url, then assistant.serverUrl, then phoneNumber.serverUrl, then org.serverUrl. - """ + metadata: MakeToolMetadata + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -61,3 +46,6 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +update_forward_refs(CreateMakeToolDto) diff --git a/src/vapi/types/create_make_tool_dto_messages_item.py b/src/vapi/types/create_make_tool_dto_messages_item.py index 137c49cb..1f28a53b 100644 --- a/src/vapi/types/create_make_tool_dto_messages_item.py +++ b/src/vapi/types/create_make_tool_dto_messages_item.py @@ -1,11 +1,104 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .tool_message_start import ToolMessageStart -from .tool_message_complete import ToolMessageComplete -from .tool_message_failed import ToolMessageFailed -from .tool_message_delayed import ToolMessageDelayed -CreateMakeToolDtoMessagesItem = typing.Union[ - ToolMessageStart, ToolMessageComplete, ToolMessageFailed, ToolMessageDelayed +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class CreateMakeToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateMakeToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateMakeToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateMakeToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateMakeToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + CreateMakeToolDtoMessagesItem_RequestStart, + CreateMakeToolDtoMessagesItem_RequestComplete, + CreateMakeToolDtoMessagesItem_RequestFailed, + CreateMakeToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), ] diff --git a/src/vapi/types/create_make_tool_dto_type.py b/src/vapi/types/create_make_tool_dto_type.py new file mode 100644 index 00000000..513491f9 --- /dev/null +++ b/src/vapi/types/create_make_tool_dto_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CreateMakeToolDtoType = typing.Union[typing.Literal["make"], typing.Any] diff --git a/src/vapi/types/create_mcp_tool_dto.py b/src/vapi/types/create_mcp_tool_dto.py new file mode 100644 index 00000000..6ac92cfb --- /dev/null +++ b/src/vapi/types/create_mcp_tool_dto.py @@ -0,0 +1,68 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_mcp_tool_dto_messages_item import CreateMcpToolDtoMessagesItem +from .mcp_tool_messages import McpToolMessages +from .mcp_tool_metadata import McpToolMetadata +from .server import Server +from .tool_rejection_plan import ToolRejectionPlan + + +class CreateMcpToolDto(UncheckedBaseModel): + messages: typing.Optional[typing.List[CreateMcpToolDtoMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + server: typing.Optional[Server] = pydantic.Field(default=None) + """ + + This is the server where a `tool-calls` webhook will be sent. + + Notes: + - Webhook is sent to this server when a tool call is made. + - Webhook contains the call, assistant, and phone number objects. + - Webhook contains the variables set on the assistant. + - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}. + - Webhook expects a response with tool call result. + """ + + tool_messages: typing_extensions.Annotated[ + typing.Optional[typing.List[McpToolMessages]], + FieldMetadata(alias="toolMessages"), + pydantic.Field( + alias="toolMessages", + description="Per-tool message overrides for individual tools loaded from the MCP server. Set messages to an empty array to suppress messages for a specific tool. Tools not listed here will use the default messages from the parent tool.", + ), + ] = None + metadata: typing.Optional[McpToolMetadata] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(CreateMcpToolDto) diff --git a/src/vapi/types/create_mcp_tool_dto_messages_item.py b/src/vapi/types/create_mcp_tool_dto_messages_item.py new file mode 100644 index 00000000..86707cd9 --- /dev/null +++ b/src/vapi/types/create_mcp_tool_dto_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class CreateMcpToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateMcpToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateMcpToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateMcpToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateMcpToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + CreateMcpToolDtoMessagesItem_RequestStart, + CreateMcpToolDtoMessagesItem_RequestComplete, + CreateMcpToolDtoMessagesItem_RequestFailed, + CreateMcpToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/create_minimax_credential_dto.py b/src/vapi/types/create_minimax_credential_dto.py new file mode 100644 index 00000000..01a1b6e0 --- /dev/null +++ b/src/vapi/types/create_minimax_credential_dto.py @@ -0,0 +1,35 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class CreateMinimaxCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + group_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="groupId"), + pydantic.Field(alias="groupId", description="This is the Minimax Group ID."), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_mistral_credential_dto.py b/src/vapi/types/create_mistral_credential_dto.py new file mode 100644 index 00000000..560b2d92 --- /dev/null +++ b/src/vapi/types/create_mistral_credential_dto.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class CreateMistralCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_neuphonic_credential_dto.py b/src/vapi/types/create_neuphonic_credential_dto.py new file mode 100644 index 00000000..1777609e --- /dev/null +++ b/src/vapi/types/create_neuphonic_credential_dto.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class CreateNeuphonicCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_open_ai_credential_dto.py b/src/vapi/types/create_open_ai_credential_dto.py index 0e19c57e..4721ea8f 100644 --- a/src/vapi/types/create_open_ai_credential_dto.py +++ b/src/vapi/types/create_open_ai_credential_dto.py @@ -1,18 +1,23 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class CreateOpenAiCredentialDto(UniversalBaseModel): - provider: typing.Literal["openai"] = "openai" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() +class CreateOpenAiCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is not returned in the API. + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/create_open_router_credential_dto.py b/src/vapi/types/create_open_router_credential_dto.py index 99858298..f7fcb77e 100644 --- a/src/vapi/types/create_open_router_credential_dto.py +++ b/src/vapi/types/create_open_router_credential_dto.py @@ -1,18 +1,23 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class CreateOpenRouterCredentialDto(UniversalBaseModel): - provider: typing.Literal["openrouter"] = "openrouter" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() +class CreateOpenRouterCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is not returned in the API. + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/create_org_dto.py b/src/vapi/types/create_org_dto.py index 16f64359..92af97bc 100644 --- a/src/vapi/types/create_org_dto.py +++ b/src/vapi/types/create_org_dto.py @@ -1,57 +1,76 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions import typing -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .compliance_plan import CompliancePlan +from .create_org_dto_channel import CreateOrgDtoChannel +from .server import Server -class CreateOrgDto(UniversalBaseModel): - hipaa_enabled: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="hipaaEnabled")] = ( - pydantic.Field(default=None) - ) - """ - When this is enabled, no logs, recordings, or transcriptions will be stored. At the end of the call, you will still receive an end-of-call-report message to store on your server. Defaults to false. - When HIPAA is enabled, only OpenAI/Custom LLM or Azure Providers will be available for LLM and Voice respectively. - This is due to the compliance requirements of HIPAA. Other providers may not meet these requirements. - """ - +class CreateOrgDto(UncheckedBaseModel): + hipaa_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="hipaaEnabled"), + pydantic.Field( + alias="hipaaEnabled", + description="When this is enabled, logs, recordings, and transcriptions will be stored in HIPAA-compliant storage. Defaults to false.\nWhen HIPAA is enabled, only HIPAA-compliant providers will be available for LLM, Voice, and Transcriber respectively.\nThis is due to the compliance requirements of HIPAA. Other providers may not meet these requirements.", + ), + ] = None + subscription_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="subscriptionId"), + pydantic.Field(alias="subscriptionId", description="This is the ID of the subscription the org belongs to."), + ] = None name: typing.Optional[str] = pydantic.Field(default=None) """ This is the name of the org. This is just for your own reference. """ - billing_limit: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="billingLimit")] = ( - pydantic.Field(default=None) - ) + channel: typing.Optional[CreateOrgDtoChannel] = pydantic.Field(default=None) """ - This is the monthly billing limit for the org. To go beyond $1000/mo, please contact us at support@vapi.ai. + This is the channel of the org. There is the cluster the API traffic for the org will be directed. """ - server_url: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="serverUrl")] = pydantic.Field( - default=None - ) + billing_limit: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="billingLimit"), + pydantic.Field( + alias="billingLimit", + description="This is the monthly billing limit for the org. To go beyond $1000/mo, please contact us at support@vapi.ai.", + ), + ] = None + server: typing.Optional[Server] = pydantic.Field(default=None) """ - This is the URL Vapi will communicate with via HTTP GET and POST Requests. This is used for retrieving context, function calling, and end-of-call reports. + This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema. - All requests will be sent with the call object among other things relevant to that message. You can find more details in the Server URL documentation. - """ - - server_url_secret: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="serverUrlSecret")] = ( - pydantic.Field(default=None) - ) - """ - This is the secret you can set that Vapi will send with every request to your server. Will be sent as a header called x-vapi-secret. + The order of precedence is: + + 1. assistant.server + 2. phoneNumber.server + 3. org.server """ - concurrency_limit: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="concurrencyLimit")] = ( - pydantic.Field(default=None) - ) - """ - This is the concurrency limit for the org. This is the maximum number of calls that can be active at any given time. To go beyond 10, please contact us at support@vapi.ai. - """ + concurrency_limit: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="concurrencyLimit"), + pydantic.Field( + alias="concurrencyLimit", + description="This is the concurrency limit for the org. This is the maximum number of calls that can be active at any given time. To go beyond 10, please contact us at support@vapi.ai.", + ), + ] = None + compliance_plan: typing_extensions.Annotated[ + typing.Optional[CompliancePlan], + FieldMetadata(alias="compliancePlan"), + pydantic.Field( + alias="compliancePlan", + description="Stores the information about the compliance plan enforced at the organization level. Currently pciEnabled is supported through this field.\nWhen this is enabled, any logs, recordings, or transcriptions will be shipped to the customer endpoints if provided else lost.\nAt the end of the call, you will receive an end-of-call-report message to store on your server, if webhook is provided.\nDefaults to false.\nWhen PCI is enabled, only PCI-compliant Providers will be available for LLM, Voice and transcribers.\nThis is due to the compliance requirements of PCI. Other providers may not meet these requirements.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/create_org_dto_channel.py b/src/vapi/types/create_org_dto_channel.py new file mode 100644 index 00000000..402fced9 --- /dev/null +++ b/src/vapi/types/create_org_dto_channel.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CreateOrgDtoChannel = typing.Union[typing.Literal["daily", "default", "weekly", "intuit", "hcs"], typing.Any] diff --git a/src/vapi/types/create_outbound_call_dto.py b/src/vapi/types/create_outbound_call_dto.py index 6c0d05e7..22245053 100644 --- a/src/vapi/types/create_outbound_call_dto.py +++ b/src/vapi/types/create_outbound_call_dto.py @@ -1,87 +1,146 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -from .callback_step import CallbackStep -from .create_workflow_block_dto import CreateWorkflowBlockDto -from .handoff_step import HandoffStep + import typing + import pydantic import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.serialization import FieldMetadata -from .create_assistant_dto import CreateAssistantDto -from .assistant_overrides import AssistantOverrides -from .create_squad_dto import CreateSquadDto -from .import_twilio_phone_number_dto import ImportTwilioPhoneNumberDto +from ..core.unchecked_base_model import UncheckedBaseModel from .create_customer_dto import CreateCustomerDto -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.pydantic_utilities import update_forward_refs +from .create_workflow_dto import CreateWorkflowDto +from .import_twilio_phone_number_dto import ImportTwilioPhoneNumberDto +from .schedule_plan import SchedulePlan +from .workflow_overrides import WorkflowOverrides -class CreateOutboundCallDto(UniversalBaseModel): +class CreateOutboundCallDto(UncheckedBaseModel): + customers: typing.Optional[typing.List[CreateCustomerDto]] = pydantic.Field(default=None) + """ + This is used to issue batch calls to multiple customers. + + Only relevant for `outboundPhoneCall`. To call a single customer, use `customer` instead. + """ + name: typing.Optional[str] = pydantic.Field(default=None) """ This is the name of the call. This is just for your own reference. """ - assistant_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="assistantId")] = ( - pydantic.Field(default=None) - ) + schedule_plan: typing_extensions.Annotated[ + typing.Optional[SchedulePlan], + FieldMetadata(alias="schedulePlan"), + pydantic.Field(alias="schedulePlan", description="This is the schedule plan of the call."), + ] = None + transport: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) """ - This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead. + This is the transport of the call. """ - assistant: typing.Optional[CreateAssistantDto] = pydantic.Field(default=None) + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assistantId"), + pydantic.Field( + alias="assistantId", + description="This is the assistant ID that will be used for the call. To use a transient assistant, use `assistant` instead.\n\nTo start a call with:\n- Assistant, use `assistantId` or `assistant`\n- Squad, use `squadId` or `squad`\n- Workflow, use `workflowId` or `workflow`", + ), + ] = None + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) """ This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. + + To start a call with: + - Assistant, use `assistant` + - Squad, use `squad` + - Workflow, use `workflow` """ assistant_overrides: typing_extensions.Annotated[ - typing.Optional[AssistantOverrides], FieldMetadata(alias="assistantOverrides") - ] = pydantic.Field(default=None) - """ - These are the overrides for the `assistant` or `assistantId`'s settings and template variables. - """ - - squad_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="squadId")] = pydantic.Field( - default=None - ) - """ - This is the squad that will be used for the call. To use a transient squad, use `squad` instead. - """ - - squad: typing.Optional[CreateSquadDto] = pydantic.Field(default=None) + typing.Optional["AssistantOverrides"], + FieldMetadata(alias="assistantOverrides"), + pydantic.Field( + alias="assistantOverrides", + description="These are the overrides for the `assistant` or `assistantId`'s settings and template variables.", + ), + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="squadId"), + pydantic.Field( + alias="squadId", + description="This is the squad that will be used for the call. To use a transient squad, use `squad` instead.\n\nTo start a call with:\n- Assistant, use `assistant` or `assistantId`\n- Squad, use `squad` or `squadId`\n- Workflow, use `workflow` or `workflowId`", + ), + ] = None + squad: typing.Optional["CreateSquadDto"] = pydantic.Field(default=None) """ This is a squad that will be used for the call. To use an existing squad, use `squadId` instead. - """ - - phone_number_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="phoneNumberId")] = ( - pydantic.Field(default=None) - ) - """ - This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead. - - Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type. - """ - - phone_number: typing_extensions.Annotated[ - typing.Optional[ImportTwilioPhoneNumberDto], FieldMetadata(alias="phoneNumber") - ] = pydantic.Field(default=None) - """ - This is the phone number that will be used for the call. To use an existing number, use `phoneNumberId` instead. - Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type. + To start a call with: + - Assistant, use `assistant` or `assistantId` + - Squad, use `squad` or `squadId` + - Workflow, use `workflow` or `workflowId` """ - customer_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="customerId")] = pydantic.Field( - default=None - ) + squad_overrides: typing_extensions.Annotated[ + typing.Optional["AssistantOverrides"], + FieldMetadata(alias="squadOverrides"), + pydantic.Field( + alias="squadOverrides", + description="These are the overrides for the `squad` or `squadId`'s member settings and template variables.\nThis will apply to all members of the squad.", + ), + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="workflowId"), + pydantic.Field( + alias="workflowId", + description="This is the workflow that will be used for the call. To use a transient workflow, use `workflow` instead.\n\nTo start a call with:\n- Assistant, use `assistant` or `assistantId`\n- Squad, use `squad` or `squadId`\n- Workflow, use `workflow` or `workflowId`", + ), + ] = None + workflow: typing.Optional[CreateWorkflowDto] = pydantic.Field(default=None) """ - This is the customer that will be called. To call a transient customer , use `customer` instead. + This is a workflow that will be used for the call. To use an existing workflow, use `workflowId` instead. - Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type. + To start a call with: + - Assistant, use `assistant` or `assistantId` + - Squad, use `squad` or `squadId` + - Workflow, use `workflow` or `workflowId` """ + workflow_overrides: typing_extensions.Annotated[ + typing.Optional[WorkflowOverrides], + FieldMetadata(alias="workflowOverrides"), + pydantic.Field( + alias="workflowOverrides", + description="These are the overrides for the `workflow` or `workflowId`'s settings and template variables.", + ), + ] = None + phone_number_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="phoneNumberId"), + pydantic.Field( + alias="phoneNumberId", + description="This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead.\n\nOnly relevant for `outboundPhoneCall` and `inboundPhoneCall` type.", + ), + ] = None + phone_number: typing_extensions.Annotated[ + typing.Optional[ImportTwilioPhoneNumberDto], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", + description="This is the phone number that will be used for the call. To use an existing number, use `phoneNumberId` instead.\n\nOnly relevant for `outboundPhoneCall` and `inboundPhoneCall` type.", + ), + ] = None + customer_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="customerId"), + pydantic.Field( + alias="customerId", + description="This is the customer that will be called. To call a transient customer , use `customer` instead.\n\nOnly relevant for `outboundPhoneCall` and `inboundPhoneCall` type.", + ), + ] = None customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) """ This is the customer that will be called. To call an existing customer, use `customerId` instead. @@ -99,6 +158,121 @@ class Config: extra = pydantic.Extra.allow -update_forward_refs(CallbackStep, CreateOutboundCallDto=CreateOutboundCallDto) -update_forward_refs(CreateWorkflowBlockDto, CreateOutboundCallDto=CreateOutboundCallDto) -update_forward_refs(HandoffStep, CreateOutboundCallDto=CreateOutboundCallDto) +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + CreateOutboundCallDto, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/create_output_tool_dto.py b/src/vapi/types/create_output_tool_dto.py index ab37cf01..fa920630 100644 --- a/src/vapi/types/create_output_tool_dto.py +++ b/src/vapi/types/create_output_tool_dto.py @@ -1,30 +1,20 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions +from __future__ import annotations + import typing -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel from .create_output_tool_dto_messages_item import CreateOutputToolDtoMessagesItem -from .open_ai_function import OpenAiFunction -from .server import Server -from ..core.pydantic_utilities import IS_PYDANTIC_V2 - +from .create_output_tool_dto_type import CreateOutputToolDtoType +from .tool_rejection_plan import ToolRejectionPlan -class CreateOutputToolDto(UniversalBaseModel): - async_: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="async")] = pydantic.Field( - default=None - ) - """ - This determines if the tool is async. - - If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server. - - If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server. - - Defaults to synchronous (`false`). - """ +class CreateOutputToolDto(UncheckedBaseModel): messages: typing.Optional[typing.List[CreateOutputToolDtoMessagesItem]] = pydantic.Field(default=None) """ These are the messages that will be spoken to the user as the tool is running. @@ -32,24 +22,19 @@ class CreateOutputToolDto(UniversalBaseModel): For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. """ - type: typing.Literal["output"] = "output" - function: typing.Optional[OpenAiFunction] = pydantic.Field(default=None) + type: CreateOutputToolDtoType = pydantic.Field() """ - This is the function definition of the tool. - - For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on tool-specific fields like `tool.destinations`. But, even in those cases, you can provide a custom function definition for advanced use cases. - - An example of an advanced use case is if you want to customize the message that's spoken for `endCall` tool. You can specify a function where it returns an argument "reason". Then, in `messages` array, you can have many "request-complete" messages. One of these messages will be triggered if the `messages[].conditions` matches the "reason" argument. + The type of tool. "output" for Output tool. """ - server: typing.Optional[Server] = pydantic.Field(default=None) - """ - This is the server that will be hit when this tool is requested by the model. - - All requests will be sent with the call object among other things. You can find more details in the Server URL documentation. - - This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: highest tool.server.url, then assistant.serverUrl, then phoneNumber.serverUrl, then org.serverUrl. - """ + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -59,3 +44,6 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +update_forward_refs(CreateOutputToolDto) diff --git a/src/vapi/types/create_output_tool_dto_messages_item.py b/src/vapi/types/create_output_tool_dto_messages_item.py index ce3fe13b..1ff399f4 100644 --- a/src/vapi/types/create_output_tool_dto_messages_item.py +++ b/src/vapi/types/create_output_tool_dto_messages_item.py @@ -1,11 +1,104 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .tool_message_start import ToolMessageStart -from .tool_message_complete import ToolMessageComplete -from .tool_message_failed import ToolMessageFailed -from .tool_message_delayed import ToolMessageDelayed -CreateOutputToolDtoMessagesItem = typing.Union[ - ToolMessageStart, ToolMessageComplete, ToolMessageFailed, ToolMessageDelayed +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class CreateOutputToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateOutputToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateOutputToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateOutputToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateOutputToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + CreateOutputToolDtoMessagesItem_RequestStart, + CreateOutputToolDtoMessagesItem_RequestComplete, + CreateOutputToolDtoMessagesItem_RequestFailed, + CreateOutputToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), ] diff --git a/src/vapi/types/create_output_tool_dto_type.py b/src/vapi/types/create_output_tool_dto_type.py new file mode 100644 index 00000000..81160a33 --- /dev/null +++ b/src/vapi/types/create_output_tool_dto_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CreateOutputToolDtoType = typing.Union[typing.Literal["output"], typing.Any] diff --git a/src/vapi/types/create_perplexity_ai_credential_dto.py b/src/vapi/types/create_perplexity_ai_credential_dto.py index b47d72fd..a541e0be 100644 --- a/src/vapi/types/create_perplexity_ai_credential_dto.py +++ b/src/vapi/types/create_perplexity_ai_credential_dto.py @@ -1,18 +1,23 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class CreatePerplexityAiCredentialDto(UniversalBaseModel): - provider: typing.Literal["perplexity-ai"] = "perplexity-ai" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() +class CreatePerplexityAiCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is not returned in the API. + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/create_personality_dto.py b/src/vapi/types/create_personality_dto.py new file mode 100644 index 00000000..6b16783e --- /dev/null +++ b/src/vapi/types/create_personality_dto.py @@ -0,0 +1,158 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel + + +class CreatePersonalityDto(UncheckedBaseModel): + name: str = pydantic.Field() + """ + This is the name of the personality (e.g., "Confused Carl", "Rude Rob"). + """ + + assistant: "CreateAssistantDto" = pydantic.Field() + """ + This is the full assistant configuration for this personality. + It defines the tester's voice, model, behavior via system prompt, and other settings. + """ + + path: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional folder path for organizing personalities. + Supports up to 3 levels (e.g., "dept/feature/variant"). + Maps to GitOps resource folder structure. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + CreatePersonalityDto, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/create_pie_insight_from_call_table_dto.py b/src/vapi/types/create_pie_insight_from_call_table_dto.py new file mode 100644 index 00000000..fbcb9b30 --- /dev/null +++ b/src/vapi/types/create_pie_insight_from_call_table_dto.py @@ -0,0 +1,64 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_pie_insight_from_call_table_dto_group_by import CreatePieInsightFromCallTableDtoGroupBy +from .create_pie_insight_from_call_table_dto_queries_item import CreatePieInsightFromCallTableDtoQueriesItem +from .insight_formula import InsightFormula +from .insight_time_range import InsightTimeRange + + +class CreatePieInsightFromCallTableDto(UncheckedBaseModel): + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the Insight. + """ + + formulas: typing.Optional[typing.List[InsightFormula]] = pydantic.Field(default=None) + """ + Formulas are mathematical expressions applied on the data returned by the queries to transform them before being used to create the insight. + The formulas needs to be a valid mathematical expression, supported by MathJS - https://mathjs.org/docs/expressions/syntax.html + A formula is created by using the query names as the variable. + The formulas must contain at least one query name in the LiquidJS format {{query_name}} or {{['query name']}} which will be substituted with the query result. + For example, if you have 2 queries, 'Was Booking Made' and 'Average Call Duration', you can create a formula like this: + ``` + {{['Query 1']}} / {{['Query 2']}} * 100 + ``` + + ``` + ({{[Query 1]}} * 10) + {{[Query 2]}} + ``` + This will take the + + You can also use the query names as the variable in the formula. + """ + + time_range: typing_extensions.Annotated[ + typing.Optional[InsightTimeRange], FieldMetadata(alias="timeRange"), pydantic.Field(alias="timeRange") + ] = None + group_by: typing_extensions.Annotated[ + typing.Optional[CreatePieInsightFromCallTableDtoGroupBy], + FieldMetadata(alias="groupBy"), + pydantic.Field( + alias="groupBy", + description="This is the group by column for the insight when table is `call`.\nThese are the columns to group the results by.\nAll results are grouped by the time range step by default.", + ), + ] = None + queries: typing.List[CreatePieInsightFromCallTableDtoQueriesItem] = pydantic.Field() + """ + These are the queries to run to generate the insight. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_pie_insight_from_call_table_dto_group_by.py b/src/vapi/types/create_pie_insight_from_call_table_dto_group_by.py new file mode 100644 index 00000000..108d5c93 --- /dev/null +++ b/src/vapi/types/create_pie_insight_from_call_table_dto_group_by.py @@ -0,0 +1,18 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CreatePieInsightFromCallTableDtoGroupBy = typing.Union[ + typing.Literal[ + "assistantId", + "workflowId", + "squadId", + "phoneNumberId", + "type", + "endedReason", + "customerNumber", + "campaignId", + "artifact.structuredOutputs[OutputID]", + ], + typing.Any, +] diff --git a/src/vapi/types/create_pie_insight_from_call_table_dto_queries_item.py b/src/vapi/types/create_pie_insight_from_call_table_dto_queries_item.py new file mode 100644 index 00000000..b2ea1918 --- /dev/null +++ b/src/vapi/types/create_pie_insight_from_call_table_dto_queries_item.py @@ -0,0 +1,13 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .json_query_on_call_table_with_number_type_column import JsonQueryOnCallTableWithNumberTypeColumn +from .json_query_on_call_table_with_string_type_column import JsonQueryOnCallTableWithStringTypeColumn +from .json_query_on_call_table_with_structured_output_column import JsonQueryOnCallTableWithStructuredOutputColumn + +CreatePieInsightFromCallTableDtoQueriesItem = typing.Union[ + JsonQueryOnCallTableWithStringTypeColumn, + JsonQueryOnCallTableWithNumberTypeColumn, + JsonQueryOnCallTableWithStructuredOutputColumn, +] diff --git a/src/vapi/types/create_play_ht_credential_dto.py b/src/vapi/types/create_play_ht_credential_dto.py index 79b83a6c..8ee9d10a 100644 --- a/src/vapi/types/create_play_ht_credential_dto.py +++ b/src/vapi/types/create_play_ht_credential_dto.py @@ -1,22 +1,26 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class CreatePlayHtCredentialDto(UniversalBaseModel): - provider: typing.Literal["playht"] = "playht" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() +class CreatePlayHtCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + user_id: typing_extensions.Annotated[str, FieldMetadata(alias="userId"), pydantic.Field(alias="userId")] + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is not returned in the API. + This is the name of credential. This is just for your reference. """ - user_id: typing_extensions.Annotated[str, FieldMetadata(alias="userId")] - if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/vapi/types/create_query_tool_dto.py b/src/vapi/types/create_query_tool_dto.py new file mode 100644 index 00000000..31c6a7d9 --- /dev/null +++ b/src/vapi/types/create_query_tool_dto.py @@ -0,0 +1,49 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_query_tool_dto_messages_item import CreateQueryToolDtoMessagesItem +from .knowledge_base import KnowledgeBase +from .tool_rejection_plan import ToolRejectionPlan + + +class CreateQueryToolDto(UncheckedBaseModel): + messages: typing.Optional[typing.List[CreateQueryToolDtoMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + knowledge_bases: typing_extensions.Annotated[ + typing.Optional[typing.List[KnowledgeBase]], + FieldMetadata(alias="knowledgeBases"), + pydantic.Field(alias="knowledgeBases", description="The knowledge bases to query"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(CreateQueryToolDto) diff --git a/src/vapi/types/create_query_tool_dto_messages_item.py b/src/vapi/types/create_query_tool_dto_messages_item.py new file mode 100644 index 00000000..69f5e694 --- /dev/null +++ b/src/vapi/types/create_query_tool_dto_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class CreateQueryToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateQueryToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateQueryToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateQueryToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateQueryToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + CreateQueryToolDtoMessagesItem_RequestStart, + CreateQueryToolDtoMessagesItem_RequestComplete, + CreateQueryToolDtoMessagesItem_RequestFailed, + CreateQueryToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/create_rime_ai_credential_dto.py b/src/vapi/types/create_rime_ai_credential_dto.py index ce70aba2..b7e180ca 100644 --- a/src/vapi/types/create_rime_ai_credential_dto.py +++ b/src/vapi/types/create_rime_ai_credential_dto.py @@ -1,18 +1,23 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class CreateRimeAiCredentialDto(UniversalBaseModel): - provider: typing.Literal["rime-ai"] = "rime-ai" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() +class CreateRimeAiCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is not returned in the API. + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/create_runpod_credential_dto.py b/src/vapi/types/create_runpod_credential_dto.py index e3cdfed7..54d4f669 100644 --- a/src/vapi/types/create_runpod_credential_dto.py +++ b/src/vapi/types/create_runpod_credential_dto.py @@ -1,18 +1,23 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class CreateRunpodCredentialDto(UniversalBaseModel): - provider: typing.Literal["runpod"] = "runpod" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() +class CreateRunpodCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is not returned in the API. + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/create_s_3_credential_dto.py b/src/vapi/types/create_s_3_credential_dto.py index 3e56e58d..532e8ad6 100644 --- a/src/vapi/types/create_s_3_credential_dto.py +++ b/src/vapi/types/create_s_3_credential_dto.py @@ -1,44 +1,55 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing + import pydantic import typing_extensions -from ..core.serialization import FieldMetadata from ..core.pydantic_utilities import IS_PYDANTIC_V2 - - -class CreateS3CredentialDto(UniversalBaseModel): - provider: typing.Literal["s3"] = pydantic.Field(default="s3") - """ - Credential provider. Only allowed value is s3 - """ - - aws_access_key_id: typing_extensions.Annotated[str, FieldMetadata(alias="awsAccessKeyId")] = pydantic.Field() - """ - AWS access key ID. - """ - - aws_secret_access_key: typing_extensions.Annotated[str, FieldMetadata(alias="awsSecretAccessKey")] = ( - pydantic.Field() - ) - """ - AWS access key secret. This is not returned in the API. - """ - +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class CreateS3CredentialDto(UncheckedBaseModel): + aws_access_key_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="awsAccessKeyId"), + pydantic.Field(alias="awsAccessKeyId", description="AWS access key ID."), + ] + aws_secret_access_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="awsSecretAccessKey"), + pydantic.Field( + alias="awsSecretAccessKey", description="AWS access key secret. This is not returned in the API." + ), + ] region: str = pydantic.Field() """ AWS region in which the S3 bucket is located. """ - s_3_bucket_name: typing_extensions.Annotated[str, FieldMetadata(alias="s3BucketName")] = pydantic.Field() - """ - AWS S3 bucket name. - """ - - s_3_path_prefix: typing_extensions.Annotated[str, FieldMetadata(alias="s3PathPrefix")] = pydantic.Field() - """ - The path prefix for the uploaded recording. Ex. "recordings/" + s_3_bucket_name: typing_extensions.Annotated[ + str, + FieldMetadata(alias="s3BucketName"), + pydantic.Field(alias="s3BucketName", description="AWS S3 bucket name."), + ] + s_3_path_prefix: typing_extensions.Annotated[ + str, + FieldMetadata(alias="s3PathPrefix"), + pydantic.Field( + alias="s3PathPrefix", description='The path prefix for the uploaded recording. Ex. "recordings/"' + ), + ] + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="fallbackIndex"), + pydantic.Field( + alias="fallbackIndex", + description="This is the order in which this storage provider is tried during upload retries. Lower numbers are tried first in increasing order.", + ), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/create_scenario_dto.py b/src/vapi/types/create_scenario_dto.py new file mode 100644 index 00000000..8777ec93 --- /dev/null +++ b/src/vapi/types/create_scenario_dto.py @@ -0,0 +1,185 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_scenario_dto_hooks_item import CreateScenarioDtoHooksItem +from .evaluation_plan_item import EvaluationPlanItem +from .scenario_tool_mock import ScenarioToolMock + + +class CreateScenarioDto(UncheckedBaseModel): + name: str = pydantic.Field() + """ + This is the name of the scenario. + """ + + instructions: str = pydantic.Field() + """ + This is the script/instructions for the tester to follow during the simulation. + """ + + evaluations: typing.List[EvaluationPlanItem] = pydantic.Field() + """ + This is the structured output-based evaluation plan for the simulation. + Each item defines a structured output to extract and evaluate against an expected value. + """ + + hooks: typing.Optional[typing.List[CreateScenarioDtoHooksItem]] = pydantic.Field(default=None) + """ + Hooks to run on simulation lifecycle events + """ + + target_overrides: typing_extensions.Annotated[ + typing.Optional["AssistantOverrides"], + FieldMetadata(alias="targetOverrides"), + pydantic.Field( + alias="targetOverrides", description="Overrides to inject into the simulated target assistant or squad" + ), + ] = None + tool_mocks: typing_extensions.Annotated[ + typing.Optional[typing.List[ScenarioToolMock]], + FieldMetadata(alias="toolMocks"), + pydantic.Field(alias="toolMocks", description="Scenario-level tool call mocks to use during simulations."), + ] = None + path: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional folder path for organizing scenarios. + Supports up to 3 levels (e.g., "dept/feature/variant"). + Maps to GitOps resource folder structure. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + CreateScenarioDto, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/create_scenario_dto_hooks_item.py b/src/vapi/types/create_scenario_dto_hooks_item.py new file mode 100644 index 00000000..996acc48 --- /dev/null +++ b/src/vapi/types/create_scenario_dto_hooks_item.py @@ -0,0 +1,45 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .simulation_hook_webhook_action import SimulationHookWebhookAction + + +class CreateScenarioDtoHooksItem_SimulationRunStarted(UncheckedBaseModel): + on: typing.Literal["simulation.run.started"] = "simulation.run.started" + do: typing.List[SimulationHookWebhookAction] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateScenarioDtoHooksItem_SimulationRunEnded(UncheckedBaseModel): + on: typing.Literal["simulation.run.ended"] = "simulation.run.ended" + do: typing.List[SimulationHookWebhookAction] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateScenarioDtoHooksItem = typing_extensions.Annotated[ + typing.Union[CreateScenarioDtoHooksItem_SimulationRunStarted, CreateScenarioDtoHooksItem_SimulationRunEnded], + UnionMetadata(discriminant="on"), +] diff --git a/src/vapi/types/create_scorecard_dto.py b/src/vapi/types/create_scorecard_dto.py new file mode 100644 index 00000000..36becc72 --- /dev/null +++ b/src/vapi/types/create_scorecard_dto.py @@ -0,0 +1,46 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .scorecard_metric import ScorecardMetric + + +class CreateScorecardDto(UncheckedBaseModel): + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the scorecard. It is only for user reference and will not be used for any evaluation. + """ + + description: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the description of the scorecard. It is only for user reference and will not be used for any evaluation. + """ + + metrics: typing.List[ScorecardMetric] = pydantic.Field() + """ + These are the metrics that will be used to evaluate the scorecard. + Each metric will have a set of conditions and points that will be used to generate the score. + """ + + assistant_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="assistantIds"), + pydantic.Field( + alias="assistantIds", + description="These are the assistant IDs that this scorecard is linked to.\nWhen linked to assistants, this scorecard will be available for evaluation during those assistants' calls.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_sesame_voice_dto.py b/src/vapi/types/create_sesame_voice_dto.py new file mode 100644 index 00000000..e32c1855 --- /dev/null +++ b/src/vapi/types/create_sesame_voice_dto.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class CreateSesameVoiceDto(UncheckedBaseModel): + voice_name: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="voiceName"), + pydantic.Field(alias="voiceName", description="The name of the voice."), + ] = None + transcription: typing.Optional[str] = pydantic.Field(default=None) + """ + The transcript of the utterance. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_simulation_dto.py b/src/vapi/types/create_simulation_dto.py new file mode 100644 index 00000000..72125ce0 --- /dev/null +++ b/src/vapi/types/create_simulation_dto.py @@ -0,0 +1,44 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class CreateSimulationDto(UncheckedBaseModel): + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is an optional friendly name for the simulation. + """ + + scenario_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="scenarioId"), + pydantic.Field(alias="scenarioId", description="This is the ID of the scenario to use for this simulation."), + ] + personality_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="personalityId"), + pydantic.Field( + alias="personalityId", description="This is the ID of the personality to use for this simulation." + ), + ] + path: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional folder path for organizing simulations. + Supports up to 3 levels (e.g., "dept/feature/variant"). + Maps to GitOps resource folder structure. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_simulation_run_dto.py b/src/vapi/types/create_simulation_run_dto.py new file mode 100644 index 00000000..2c72c364 --- /dev/null +++ b/src/vapi/types/create_simulation_run_dto.py @@ -0,0 +1,46 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_simulation_run_dto_simulations_item import CreateSimulationRunDtoSimulationsItem +from .create_simulation_run_dto_target import CreateSimulationRunDtoTarget +from .simulation_run_transport_configuration import SimulationRunTransportConfiguration + + +class CreateSimulationRunDto(UncheckedBaseModel): + simulations: typing.List[CreateSimulationRunDtoSimulationsItem] = pydantic.Field() + """ + Array of simulations and/or suites to run + """ + + target: CreateSimulationRunDtoTarget = pydantic.Field() + """ + Target to test against + """ + + iterations: typing.Optional[float] = pydantic.Field(default=None) + """ + Number of times to run each simulation (default: 1) + """ + + transport: typing.Optional[SimulationRunTransportConfiguration] = pydantic.Field(default=None) + """ + Transport configuration for the simulation runs + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(CreateSimulationRunDto) diff --git a/src/vapi/types/create_simulation_run_dto_simulations_item.py b/src/vapi/types/create_simulation_run_dto_simulations_item.py new file mode 100644 index 00000000..7d6ec518 --- /dev/null +++ b/src/vapi/types/create_simulation_run_dto_simulations_item.py @@ -0,0 +1,66 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_personality_dto import CreatePersonalityDto +from .create_scenario_dto import CreateScenarioDto + + +class CreateSimulationRunDtoSimulationsItem_Simulation(UncheckedBaseModel): + type: typing.Literal["simulation"] = "simulation" + simulation_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="simulationId"), pydantic.Field(alias="simulationId") + ] = None + scenario_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="scenarioId"), pydantic.Field(alias="scenarioId") + ] = None + scenario: typing.Optional[CreateScenarioDto] = None + personality_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="personalityId"), pydantic.Field(alias="personalityId") + ] = None + personality: typing.Optional[CreatePersonalityDto] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateSimulationRunDtoSimulationsItem_SimulationSuite(UncheckedBaseModel): + type: typing.Literal["simulationSuite"] = "simulationSuite" + simulation_suite_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="simulationSuiteId"), pydantic.Field(alias="simulationSuiteId") + ] = None + suite_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="suiteId"), pydantic.Field(alias="suiteId") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateSimulationRunDtoSimulationsItem = typing_extensions.Annotated[ + typing.Union[ + CreateSimulationRunDtoSimulationsItem_Simulation, CreateSimulationRunDtoSimulationsItem_SimulationSuite + ], + UnionMetadata(discriminant="type"), +] +update_forward_refs(CreateSimulationRunDtoSimulationsItem_Simulation) diff --git a/src/vapi/types/create_simulation_run_dto_target.py b/src/vapi/types/create_simulation_run_dto_target.py new file mode 100644 index 00000000..7b0dd3ba --- /dev/null +++ b/src/vapi/types/create_simulation_run_dto_target.py @@ -0,0 +1,237 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class CreateSimulationRunDtoTarget_Assistant(UncheckedBaseModel): + """ + Target to test against + """ + + type: typing.Literal["assistant"] = "assistant" + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + assistant: typing.Optional["CreateAssistantDto"] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateSimulationRunDtoTarget_Squad(UncheckedBaseModel): + """ + Target to test against + """ + + type: typing.Literal["squad"] = "squad" + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + squad: typing.Optional["CreateSquadDto"] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateSimulationRunDtoTarget = typing_extensions.Annotated[ + typing.Union[CreateSimulationRunDtoTarget_Assistant, CreateSimulationRunDtoTarget_Squad], + UnionMetadata(discriminant="type"), +] +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + CreateSimulationRunDtoTarget_Assistant, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + CreateSimulationRunDtoTarget_Squad, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/create_simulation_suite_dto.py b/src/vapi/types/create_simulation_suite_dto.py new file mode 100644 index 00000000..78e71b02 --- /dev/null +++ b/src/vapi/types/create_simulation_suite_dto.py @@ -0,0 +1,44 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class CreateSimulationSuiteDto(UncheckedBaseModel): + name: str = pydantic.Field() + """ + This is the name of the simulation suite. + """ + + slack_webhook_url: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="slackWebhookUrl"), + pydantic.Field(alias="slackWebhookUrl", description="This is the Slack webhook URL for notifications."), + ] = None + simulation_ids: typing_extensions.Annotated[ + typing.List[str], + FieldMetadata(alias="simulationIds"), + pydantic.Field( + alias="simulationIds", description="This is the list of simulation IDs to include in the suite." + ), + ] + path: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional folder path for organizing simulation suites. + Supports up to 3 levels (e.g., "dept/feature/variant"). + Maps to GitOps resource folder structure. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_sip_request_tool_dto.py b/src/vapi/types/create_sip_request_tool_dto.py new file mode 100644 index 00000000..cd9c1db5 --- /dev/null +++ b/src/vapi/types/create_sip_request_tool_dto.py @@ -0,0 +1,62 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_sip_request_tool_dto_body import CreateSipRequestToolDtoBody +from .create_sip_request_tool_dto_messages_item import CreateSipRequestToolDtoMessagesItem +from .create_sip_request_tool_dto_verb import CreateSipRequestToolDtoVerb +from .tool_rejection_plan import ToolRejectionPlan + + +class CreateSipRequestToolDto(UncheckedBaseModel): + messages: typing.Optional[typing.List[CreateSipRequestToolDtoMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + verb: CreateSipRequestToolDtoVerb = pydantic.Field() + """ + The SIP method to send. + """ + + headers: typing.Optional["JsonSchema"] = pydantic.Field(default=None) + """ + JSON schema for headers the model should populate when sending the SIP request. + """ + + body: typing.Optional[CreateSipRequestToolDtoBody] = pydantic.Field(default=None) + """ + Body to include in the SIP request. Either a literal string body, or a JSON schema describing a structured body that the model should populate. + """ + + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .json_schema import JsonSchema # noqa: E402, I001 + +update_forward_refs(CreateSipRequestToolDto, JsonSchema=JsonSchema) diff --git a/src/vapi/types/create_sip_request_tool_dto_body.py b/src/vapi/types/create_sip_request_tool_dto_body.py new file mode 100644 index 00000000..019ddfac --- /dev/null +++ b/src/vapi/types/create_sip_request_tool_dto_body.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .json_schema import JsonSchema + +CreateSipRequestToolDtoBody = typing.Union[str, JsonSchema] diff --git a/src/vapi/types/create_sip_request_tool_dto_messages_item.py b/src/vapi/types/create_sip_request_tool_dto_messages_item.py new file mode 100644 index 00000000..b0cd6313 --- /dev/null +++ b/src/vapi/types/create_sip_request_tool_dto_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class CreateSipRequestToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateSipRequestToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateSipRequestToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateSipRequestToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateSipRequestToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + CreateSipRequestToolDtoMessagesItem_RequestStart, + CreateSipRequestToolDtoMessagesItem_RequestComplete, + CreateSipRequestToolDtoMessagesItem_RequestFailed, + CreateSipRequestToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/create_sip_request_tool_dto_verb.py b/src/vapi/types/create_sip_request_tool_dto_verb.py new file mode 100644 index 00000000..83d5b727 --- /dev/null +++ b/src/vapi/types/create_sip_request_tool_dto_verb.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CreateSipRequestToolDtoVerb = typing.Union[typing.Literal["INFO", "MESSAGE", "NOTIFY"], typing.Any] diff --git a/src/vapi/types/create_slack_o_auth_2_authorization_credential_dto.py b/src/vapi/types/create_slack_o_auth_2_authorization_credential_dto.py new file mode 100644 index 00000000..7393ca35 --- /dev/null +++ b/src/vapi/types/create_slack_o_auth_2_authorization_credential_dto.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class CreateSlackOAuth2AuthorizationCredentialDto(UncheckedBaseModel): + authorization_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="authorizationId"), + pydantic.Field(alias="authorizationId", description="The authorization ID for the OAuth2 authorization"), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_slack_send_message_tool_dto.py b/src/vapi/types/create_slack_send_message_tool_dto.py new file mode 100644 index 00000000..bb3d6c57 --- /dev/null +++ b/src/vapi/types/create_slack_send_message_tool_dto.py @@ -0,0 +1,43 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_slack_send_message_tool_dto_messages_item import CreateSlackSendMessageToolDtoMessagesItem +from .tool_rejection_plan import ToolRejectionPlan + + +class CreateSlackSendMessageToolDto(UncheckedBaseModel): + messages: typing.Optional[typing.List[CreateSlackSendMessageToolDtoMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(CreateSlackSendMessageToolDto) diff --git a/src/vapi/types/create_slack_send_message_tool_dto_messages_item.py b/src/vapi/types/create_slack_send_message_tool_dto_messages_item.py new file mode 100644 index 00000000..fe479570 --- /dev/null +++ b/src/vapi/types/create_slack_send_message_tool_dto_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class CreateSlackSendMessageToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateSlackSendMessageToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateSlackSendMessageToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateSlackSendMessageToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateSlackSendMessageToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + CreateSlackSendMessageToolDtoMessagesItem_RequestStart, + CreateSlackSendMessageToolDtoMessagesItem_RequestComplete, + CreateSlackSendMessageToolDtoMessagesItem_RequestFailed, + CreateSlackSendMessageToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/create_slack_webhook_credential_dto.py b/src/vapi/types/create_slack_webhook_credential_dto.py new file mode 100644 index 00000000..36f8a9df --- /dev/null +++ b/src/vapi/types/create_slack_webhook_credential_dto.py @@ -0,0 +1,33 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class CreateSlackWebhookCredentialDto(UncheckedBaseModel): + webhook_url: typing_extensions.Annotated[ + str, + FieldMetadata(alias="webhookUrl"), + pydantic.Field( + alias="webhookUrl", + description="Slack incoming webhook URL. See https://api.slack.com/messaging/webhooks for setup instructions. This is not returned in the API.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_smallest_ai_credential_dto.py b/src/vapi/types/create_smallest_ai_credential_dto.py new file mode 100644 index 00000000..e55d7ebf --- /dev/null +++ b/src/vapi/types/create_smallest_ai_credential_dto.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class CreateSmallestAiCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_sms_tool_dto.py b/src/vapi/types/create_sms_tool_dto.py new file mode 100644 index 00000000..ca68db5c --- /dev/null +++ b/src/vapi/types/create_sms_tool_dto.py @@ -0,0 +1,43 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_sms_tool_dto_messages_item import CreateSmsToolDtoMessagesItem +from .tool_rejection_plan import ToolRejectionPlan + + +class CreateSmsToolDto(UncheckedBaseModel): + messages: typing.Optional[typing.List[CreateSmsToolDtoMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(CreateSmsToolDto) diff --git a/src/vapi/types/create_sms_tool_dto_messages_item.py b/src/vapi/types/create_sms_tool_dto_messages_item.py new file mode 100644 index 00000000..dbd5fb9d --- /dev/null +++ b/src/vapi/types/create_sms_tool_dto_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class CreateSmsToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateSmsToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateSmsToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateSmsToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateSmsToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + CreateSmsToolDtoMessagesItem_RequestStart, + CreateSmsToolDtoMessagesItem_RequestComplete, + CreateSmsToolDtoMessagesItem_RequestFailed, + CreateSmsToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/create_soniox_credential_dto.py b/src/vapi/types/create_soniox_credential_dto.py new file mode 100644 index 00000000..ac5d79dd --- /dev/null +++ b/src/vapi/types/create_soniox_credential_dto.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class CreateSonioxCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_speechmatics_credential_dto.py b/src/vapi/types/create_speechmatics_credential_dto.py new file mode 100644 index 00000000..89279ca5 --- /dev/null +++ b/src/vapi/types/create_speechmatics_credential_dto.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class CreateSpeechmaticsCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_squad_dto.py b/src/vapi/types/create_squad_dto.py index 045e0de8..3ee99012 100644 --- a/src/vapi/types/create_squad_dto.py +++ b/src/vapi/types/create_squad_dto.py @@ -1,27 +1,23 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -from .callback_step import CallbackStep -from .create_workflow_block_dto import CreateWorkflowBlockDto -from .handoff_step import HandoffStep + import typing + import pydantic -from .squad_member_dto import SquadMemberDto import typing_extensions -from .assistant_overrides import AssistantOverrides +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.serialization import FieldMetadata -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.pydantic_utilities import update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel -class CreateSquadDto(UniversalBaseModel): +class CreateSquadDto(UncheckedBaseModel): name: typing.Optional[str] = pydantic.Field(default=None) """ This is the name of the squad. """ - members: typing.List[SquadMemberDto] = pydantic.Field() + members: typing.List["SquadMemberDto"] = pydantic.Field() """ This is the list of assistants that make up the squad. @@ -29,13 +25,13 @@ class CreateSquadDto(UniversalBaseModel): """ members_overrides: typing_extensions.Annotated[ - typing.Optional[AssistantOverrides], FieldMetadata(alias="membersOverrides") - ] = pydantic.Field(default=None) - """ - This can be used to override all the assistants' settings and provide values for their template variables. - - Both `membersOverrides` and `members[n].assistantOverrides` can be used together. First, `members[n].assistantOverrides` is applied. Then, `membersOverrides` is applied as a global override. - """ + typing.Optional["AssistantOverrides"], + FieldMetadata(alias="membersOverrides"), + pydantic.Field( + alias="membersOverrides", + description="This can be used to override all the assistants' settings and provide values for their template variables.\n\nBoth `membersOverrides` and `members[n].assistantOverrides` can be used together. First, `members[n].assistantOverrides` is applied. Then, `membersOverrides` is applied as a global override.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -47,6 +43,119 @@ class Config: extra = pydantic.Extra.allow -update_forward_refs(CallbackStep, CreateSquadDto=CreateSquadDto) -update_forward_refs(CreateWorkflowBlockDto, CreateSquadDto=CreateSquadDto) -update_forward_refs(HandoffStep, CreateSquadDto=CreateSquadDto) +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + CreateSquadDto, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/create_structured_output_dto.py b/src/vapi/types/create_structured_output_dto.py new file mode 100644 index 00000000..7617a878 --- /dev/null +++ b/src/vapi/types/create_structured_output_dto.py @@ -0,0 +1,116 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .compliance_override import ComplianceOverride +from .create_structured_output_dto_model import CreateStructuredOutputDtoModel +from .create_structured_output_dto_type import CreateStructuredOutputDtoType + + +class CreateStructuredOutputDto(UncheckedBaseModel): + type: typing.Optional[CreateStructuredOutputDtoType] = pydantic.Field(default=None) + """ + This is the type of structured output. + + - 'ai': Uses an LLM to extract structured data from the conversation (default). + - 'regex': Uses a regex pattern to extract data from the transcript without an LLM. + + Defaults to 'ai' if not specified. + """ + + regex: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the regex pattern to match against the transcript. + + Only used when type is 'regex'. Supports both raw patterns (e.g. '\\d+') and + regex literal format (e.g. '/\\d+/gi'). Uses RE2 syntax for safety. + + The result depends on the schema type: + - boolean: true if the pattern matches, false otherwise + - string: the first match or first capture group + - number/integer: the first match parsed as a number + - array: all matches + """ + + model: typing.Optional[CreateStructuredOutputDtoModel] = pydantic.Field(default=None) + """ + This is the model that will be used to extract the structured output. + + To provide your own custom system and user prompts for structured output extraction, populate the messages array with your system and user messages. You can specify liquid templating in your system and user messages. + Between the system or user messages, you must reference either 'transcript' or 'messages' with the `{{}}` syntax to access the conversation history. + Between the system or user messages, you must reference a variation of the structured output with the `{{}}` syntax to access the structured output definition. + i.e.: + `{{structuredOutput}}` + `{{structuredOutput.name}}` + `{{structuredOutput.description}}` + `{{structuredOutput.schema}}` + + If model is not specified, GPT-4.1 will be used by default for extraction, utilizing default system and user prompts. + If messages or required fields are not specified, the default system and user prompts will be used. + """ + + compliance_plan: typing_extensions.Annotated[ + typing.Optional[ComplianceOverride], + FieldMetadata(alias="compliancePlan"), + pydantic.Field( + alias="compliancePlan", + description="Compliance configuration for this output. Only enable overrides if no sensitive data will be stored.", + ), + ] = None + name: str = pydantic.Field() + """ + This is the name of the structured output. + """ + + schema_: typing_extensions.Annotated[ + "JsonSchema", + FieldMetadata(alias="schema"), + pydantic.Field( + alias="schema", + description="This is the JSON Schema definition for the structured output.\n\nThis is required when creating a structured output. Defines the structure and validation rules for the data that will be extracted. Supports all JSON Schema features including:\n- Objects and nested properties\n- Arrays and array validation\n- String, number, boolean, and null types\n- Enums and const values\n- Validation constraints (min/max, patterns, etc.)\n- Composition with allOf, anyOf, oneOf", + ), + ] + description: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the description of what the structured output extracts. + + Use this to provide context about what data will be extracted and how it will be used. + """ + + assistant_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="assistantIds"), + pydantic.Field( + alias="assistantIds", + description="These are the assistant IDs that this structured output is linked to.\n\nWhen linked to assistants, this structured output will be available for extraction during those assistant's calls.", + ), + ] = None + workflow_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="workflowIds"), + pydantic.Field( + alias="workflowIds", + description="These are the workflow IDs that this structured output is linked to.\n\nWhen linked to workflows, this structured output will be available for extraction during those workflow's execution.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .json_schema import JsonSchema # noqa: E402, I001 + +update_forward_refs(CreateStructuredOutputDto, JsonSchema=JsonSchema) diff --git a/src/vapi/types/create_structured_output_dto_model.py b/src/vapi/types/create_structured_output_dto_model.py new file mode 100644 index 00000000..f60aaee4 --- /dev/null +++ b/src/vapi/types/create_structured_output_dto_model.py @@ -0,0 +1,211 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .anthropic_thinking_config import AnthropicThinkingConfig +from .workflow_anthropic_bedrock_model_model import WorkflowAnthropicBedrockModelModel +from .workflow_anthropic_model_model import WorkflowAnthropicModelModel +from .workflow_custom_model_metadata_send_mode import WorkflowCustomModelMetadataSendMode +from .workflow_google_model_model import WorkflowGoogleModelModel +from .workflow_open_ai_model_model import WorkflowOpenAiModelModel + + +class CreateStructuredOutputDtoModel_Openai(UncheckedBaseModel): + """ + This is the model that will be used to extract the structured output. + + To provide your own custom system and user prompts for structured output extraction, populate the messages array with your system and user messages. You can specify liquid templating in your system and user messages. + Between the system or user messages, you must reference either 'transcript' or 'messages' with the `{{}}` syntax to access the conversation history. + Between the system or user messages, you must reference a variation of the structured output with the `{{}}` syntax to access the structured output definition. + i.e.: + `{{structuredOutput}}` + `{{structuredOutput.name}}` + `{{structuredOutput.description}}` + `{{structuredOutput.schema}}` + + If model is not specified, GPT-4.1 will be used by default for extraction, utilizing default system and user prompts. + If messages or required fields are not specified, the default system and user prompts will be used. + """ + + provider: typing.Literal["openai"] = "openai" + model: WorkflowOpenAiModelModel + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateStructuredOutputDtoModel_Anthropic(UncheckedBaseModel): + """ + This is the model that will be used to extract the structured output. + + To provide your own custom system and user prompts for structured output extraction, populate the messages array with your system and user messages. You can specify liquid templating in your system and user messages. + Between the system or user messages, you must reference either 'transcript' or 'messages' with the `{{}}` syntax to access the conversation history. + Between the system or user messages, you must reference a variation of the structured output with the `{{}}` syntax to access the structured output definition. + i.e.: + `{{structuredOutput}}` + `{{structuredOutput.name}}` + `{{structuredOutput.description}}` + `{{structuredOutput.schema}}` + + If model is not specified, GPT-4.1 will be used by default for extraction, utilizing default system and user prompts. + If messages or required fields are not specified, the default system and user prompts will be used. + """ + + provider: typing.Literal["anthropic"] = "anthropic" + model: WorkflowAnthropicModelModel + thinking: typing.Optional[AnthropicThinkingConfig] = None + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateStructuredOutputDtoModel_AnthropicBedrock(UncheckedBaseModel): + """ + This is the model that will be used to extract the structured output. + + To provide your own custom system and user prompts for structured output extraction, populate the messages array with your system and user messages. You can specify liquid templating in your system and user messages. + Between the system or user messages, you must reference either 'transcript' or 'messages' with the `{{}}` syntax to access the conversation history. + Between the system or user messages, you must reference a variation of the structured output with the `{{}}` syntax to access the structured output definition. + i.e.: + `{{structuredOutput}}` + `{{structuredOutput.name}}` + `{{structuredOutput.description}}` + `{{structuredOutput.schema}}` + + If model is not specified, GPT-4.1 will be used by default for extraction, utilizing default system and user prompts. + If messages or required fields are not specified, the default system and user prompts will be used. + """ + + provider: typing.Literal["anthropic-bedrock"] = "anthropic-bedrock" + model: WorkflowAnthropicBedrockModelModel + thinking: typing.Optional[AnthropicThinkingConfig] = None + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateStructuredOutputDtoModel_Google(UncheckedBaseModel): + """ + This is the model that will be used to extract the structured output. + + To provide your own custom system and user prompts for structured output extraction, populate the messages array with your system and user messages. You can specify liquid templating in your system and user messages. + Between the system or user messages, you must reference either 'transcript' or 'messages' with the `{{}}` syntax to access the conversation history. + Between the system or user messages, you must reference a variation of the structured output with the `{{}}` syntax to access the structured output definition. + i.e.: + `{{structuredOutput}}` + `{{structuredOutput.name}}` + `{{structuredOutput.description}}` + `{{structuredOutput.schema}}` + + If model is not specified, GPT-4.1 will be used by default for extraction, utilizing default system and user prompts. + If messages or required fields are not specified, the default system and user prompts will be used. + """ + + provider: typing.Literal["google"] = "google" + model: WorkflowGoogleModelModel + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateStructuredOutputDtoModel_CustomLlm(UncheckedBaseModel): + """ + This is the model that will be used to extract the structured output. + + To provide your own custom system and user prompts for structured output extraction, populate the messages array with your system and user messages. You can specify liquid templating in your system and user messages. + Between the system or user messages, you must reference either 'transcript' or 'messages' with the `{{}}` syntax to access the conversation history. + Between the system or user messages, you must reference a variation of the structured output with the `{{}}` syntax to access the structured output definition. + i.e.: + `{{structuredOutput}}` + `{{structuredOutput.name}}` + `{{structuredOutput.description}}` + `{{structuredOutput.schema}}` + + If model is not specified, GPT-4.1 will be used by default for extraction, utilizing default system and user prompts. + If messages or required fields are not specified, the default system and user prompts will be used. + """ + + provider: typing.Literal["custom-llm"] = "custom-llm" + metadata_send_mode: typing_extensions.Annotated[ + typing.Optional[WorkflowCustomModelMetadataSendMode], + FieldMetadata(alias="metadataSendMode"), + pydantic.Field(alias="metadataSendMode"), + ] = None + url: str + headers: typing.Optional[typing.Dict[str, typing.Any]] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + model: str + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateStructuredOutputDtoModel = typing_extensions.Annotated[ + typing.Union[ + CreateStructuredOutputDtoModel_Openai, + CreateStructuredOutputDtoModel_Anthropic, + CreateStructuredOutputDtoModel_AnthropicBedrock, + CreateStructuredOutputDtoModel_Google, + CreateStructuredOutputDtoModel_CustomLlm, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/create_structured_output_dto_type.py b/src/vapi/types/create_structured_output_dto_type.py new file mode 100644 index 00000000..bf1f948e --- /dev/null +++ b/src/vapi/types/create_structured_output_dto_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CreateStructuredOutputDtoType = typing.Union[typing.Literal["ai", "regex"], typing.Any] diff --git a/src/vapi/types/create_supabase_credential_dto.py b/src/vapi/types/create_supabase_credential_dto.py new file mode 100644 index 00000000..e5f0cda8 --- /dev/null +++ b/src/vapi/types/create_supabase_credential_dto.py @@ -0,0 +1,37 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .supabase_bucket_plan import SupabaseBucketPlan + + +class CreateSupabaseCredentialDto(UncheckedBaseModel): + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="fallbackIndex"), + pydantic.Field( + alias="fallbackIndex", + description="This is the order in which this storage provider is tried during upload retries. Lower numbers are tried first in increasing order.", + ), + ] = None + bucket_plan: typing_extensions.Annotated[ + typing.Optional[SupabaseBucketPlan], FieldMetadata(alias="bucketPlan"), pydantic.Field(alias="bucketPlan") + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_tavus_credential_dto.py b/src/vapi/types/create_tavus_credential_dto.py new file mode 100644 index 00000000..152268ab --- /dev/null +++ b/src/vapi/types/create_tavus_credential_dto.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class CreateTavusCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_telnyx_phone_number_dto.py b/src/vapi/types/create_telnyx_phone_number_dto.py new file mode 100644 index 00000000..8815bd6e --- /dev/null +++ b/src/vapi/types/create_telnyx_phone_number_dto.py @@ -0,0 +1,89 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .server import Server + + +class CreateTelnyxPhoneNumberDto(UncheckedBaseModel): + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field( + alias="fallbackDestination", + description="This is the fallback destination an inbound call will be transferred to if:\n1. `assistantId` is not set\n2. `squadId` is not set\n3. and, `assistant-request` message to the `serverUrl` fails\n\nIf this is not set and above conditions are met, the inbound call is hung up with an error message.", + ), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = pydantic.Field(default=None) + """ + This is the hooks that will be used for incoming calls to this phone number. + """ + + number: str = pydantic.Field() + """ + These are the digits of the phone number you own on your Telnyx. + """ + + credential_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="credentialId"), + pydantic.Field( + alias="credentialId", + description="This is the credential you added in dashboard.vapi.ai/keys. This is used to configure the number to send inbound calls to Vapi, make outbound calls and do live call updates like transfers and hangups.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the phone number. This is just for your own reference. + """ + + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assistantId"), + pydantic.Field( + alias="assistantId", + description="This is the assistant that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="workflowId"), + pydantic.Field( + alias="workflowId", + description="This is the workflow that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="squadId"), + pydantic.Field( + alias="squadId", + description="This is the squad that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + server: typing.Optional[Server] = pydantic.Field(default=None) + """ + This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema. + + The order of precedence is: + + 1. assistant.server + 2. phoneNumber.server + 3. org.server + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_telnyx_phone_number_dto_fallback_destination.py b/src/vapi/types/create_telnyx_phone_number_dto_fallback_destination.py new file mode 100644 index 00000000..4cd04f60 --- /dev/null +++ b/src/vapi/types/create_telnyx_phone_number_dto_fallback_destination.py @@ -0,0 +1,95 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .transfer_destination_number_message import TransferDestinationNumberMessage +from .transfer_destination_sip_message import TransferDestinationSipMessage +from .transfer_plan import TransferPlan + + +class CreateTelnyxPhoneNumberDtoFallbackDestination_Number(UncheckedBaseModel): + """ + This is the fallback destination an inbound call will be transferred to if: + 1. `assistantId` is not set + 2. `squadId` is not set + 3. and, `assistant-request` message to the `serverUrl` fails + + If this is not set and above conditions are met, the inbound call is hung up with an error message. + """ + + type: typing.Literal["number"] = "number" + message: typing.Optional[TransferDestinationNumberMessage] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: str + extension: typing.Optional[str] = None + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateTelnyxPhoneNumberDtoFallbackDestination_Sip(UncheckedBaseModel): + """ + This is the fallback destination an inbound call will be transferred to if: + 1. `assistantId` is not set + 2. `squadId` is not set + 3. and, `assistant-request` message to the `serverUrl` fails + + If this is not set and above conditions are met, the inbound call is hung up with an error message. + """ + + type: typing.Literal["sip"] = "sip" + message: typing.Optional[TransferDestinationSipMessage] = None + sip_uri: typing_extensions.Annotated[str, FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri")] + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + sip_headers: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="sipHeaders"), + pydantic.Field(alias="sipHeaders"), + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateTelnyxPhoneNumberDtoFallbackDestination = typing_extensions.Annotated[ + typing.Union[ + CreateTelnyxPhoneNumberDtoFallbackDestination_Number, CreateTelnyxPhoneNumberDtoFallbackDestination_Sip + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/create_telnyx_phone_number_dto_hooks_item.py b/src/vapi/types/create_telnyx_phone_number_dto_hooks_item.py new file mode 100644 index 00000000..ea6db442 --- /dev/null +++ b/src/vapi/types/create_telnyx_phone_number_dto_hooks_item.py @@ -0,0 +1,50 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .phone_number_call_ending_hook_filter import PhoneNumberCallEndingHookFilter +from .phone_number_call_ringing_hook_filter import PhoneNumberCallRingingHookFilter +from .phone_number_hook_call_ending_do import PhoneNumberHookCallEndingDo +from .phone_number_hook_call_ringing_do_item import PhoneNumberHookCallRingingDoItem + + +class CreateTelnyxPhoneNumberDtoHooksItem_CallRinging(UncheckedBaseModel): + on: typing.Literal["call.ringing"] = "call.ringing" + filters: typing.Optional[typing.List[PhoneNumberCallRingingHookFilter]] = None + do: typing.List[PhoneNumberHookCallRingingDoItem] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateTelnyxPhoneNumberDtoHooksItem_CallEnding(UncheckedBaseModel): + on: typing.Literal["call.ending"] = "call.ending" + filters: typing.Optional[typing.List[PhoneNumberCallEndingHookFilter]] = None + do: typing.Optional[PhoneNumberHookCallEndingDo] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateTelnyxPhoneNumberDtoHooksItem = typing_extensions.Annotated[ + typing.Union[CreateTelnyxPhoneNumberDtoHooksItem_CallRinging, CreateTelnyxPhoneNumberDtoHooksItem_CallEnding], + UnionMetadata(discriminant="on"), +] diff --git a/src/vapi/types/create_test_suite_dto.py b/src/vapi/types/create_test_suite_dto.py new file mode 100644 index 00000000..ddbdc623 --- /dev/null +++ b/src/vapi/types/create_test_suite_dto.py @@ -0,0 +1,56 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .target_plan import TargetPlan +from .tester_plan import TesterPlan + + +class CreateTestSuiteDto(UncheckedBaseModel): + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the test suite. + """ + + phone_number_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="phoneNumberId"), + pydantic.Field( + alias="phoneNumberId", description="This is the phone number ID associated with this test suite." + ), + ] = None + tester_plan: typing_extensions.Annotated[ + typing.Optional[TesterPlan], + FieldMetadata(alias="testerPlan"), + pydantic.Field( + alias="testerPlan", + description="Override the default tester plan by providing custom assistant configuration for the test agent.\n\nWe recommend only using this if you are confident, as we have already set sensible defaults on the tester plan.", + ), + ] = None + target_plan: typing_extensions.Annotated[ + typing.Optional[TargetPlan], + FieldMetadata(alias="targetPlan"), + pydantic.Field( + alias="targetPlan", + description="These are the configuration for the assistant / phone number that is being tested.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(CreateTestSuiteDto) diff --git a/src/vapi/types/create_test_suite_run_dto.py b/src/vapi/types/create_test_suite_run_dto.py new file mode 100644 index 00000000..3b2a83ae --- /dev/null +++ b/src/vapi/types/create_test_suite_run_dto.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class CreateTestSuiteRunDto(UncheckedBaseModel): + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the test suite run. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_test_suite_test_chat_dto.py b/src/vapi/types/create_test_suite_test_chat_dto.py new file mode 100644 index 00000000..af27c800 --- /dev/null +++ b/src/vapi/types/create_test_suite_test_chat_dto.py @@ -0,0 +1,47 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_test_suite_test_chat_dto_type import CreateTestSuiteTestChatDtoType +from .test_suite_test_scorer_ai import TestSuiteTestScorerAi + + +class CreateTestSuiteTestChatDto(UncheckedBaseModel): + scorers: typing.List[TestSuiteTestScorerAi] = pydantic.Field() + """ + These are the scorers used to evaluate the test. + """ + + type: CreateTestSuiteTestChatDtoType = pydantic.Field() + """ + This is the type of the test, which must be chat. + """ + + script: str = pydantic.Field() + """ + This is the script to be used for the chat test. + """ + + num_attempts: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="numAttempts"), + pydantic.Field(alias="numAttempts", description="This is the number of attempts allowed for the test."), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the test. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_test_suite_test_chat_dto_type.py b/src/vapi/types/create_test_suite_test_chat_dto_type.py new file mode 100644 index 00000000..a7e01d33 --- /dev/null +++ b/src/vapi/types/create_test_suite_test_chat_dto_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CreateTestSuiteTestChatDtoType = typing.Union[typing.Literal["chat"], typing.Any] diff --git a/src/vapi/types/create_test_suite_test_voice_dto.py b/src/vapi/types/create_test_suite_test_voice_dto.py new file mode 100644 index 00000000..0a8a45c6 --- /dev/null +++ b/src/vapi/types/create_test_suite_test_voice_dto.py @@ -0,0 +1,47 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_test_suite_test_voice_dto_type import CreateTestSuiteTestVoiceDtoType +from .test_suite_test_scorer_ai import TestSuiteTestScorerAi + + +class CreateTestSuiteTestVoiceDto(UncheckedBaseModel): + scorers: typing.List[TestSuiteTestScorerAi] = pydantic.Field() + """ + These are the scorers used to evaluate the test. + """ + + type: CreateTestSuiteTestVoiceDtoType = pydantic.Field() + """ + This is the type of the test, which must be voice. + """ + + script: str = pydantic.Field() + """ + This is the script to be used for the voice test. + """ + + num_attempts: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="numAttempts"), + pydantic.Field(alias="numAttempts", description="This is the number of attempts allowed for the test."), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the test. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_test_suite_test_voice_dto_type.py b/src/vapi/types/create_test_suite_test_voice_dto_type.py new file mode 100644 index 00000000..d027035c --- /dev/null +++ b/src/vapi/types/create_test_suite_test_voice_dto_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CreateTestSuiteTestVoiceDtoType = typing.Union[typing.Literal["voice"], typing.Any] diff --git a/src/vapi/types/create_text_editor_tool_dto.py b/src/vapi/types/create_text_editor_tool_dto.py new file mode 100644 index 00000000..39ee8ec5 --- /dev/null +++ b/src/vapi/types/create_text_editor_tool_dto.py @@ -0,0 +1,69 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_text_editor_tool_dto_messages_item import CreateTextEditorToolDtoMessagesItem +from .create_text_editor_tool_dto_name import CreateTextEditorToolDtoName +from .create_text_editor_tool_dto_sub_type import CreateTextEditorToolDtoSubType +from .server import Server +from .tool_rejection_plan import ToolRejectionPlan + + +class CreateTextEditorToolDto(UncheckedBaseModel): + messages: typing.Optional[typing.List[CreateTextEditorToolDtoMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + sub_type: typing_extensions.Annotated[ + CreateTextEditorToolDtoSubType, + FieldMetadata(alias="subType"), + pydantic.Field(alias="subType", description="The sub type of tool."), + ] + server: typing.Optional[Server] = pydantic.Field(default=None) + """ + + This is the server where a `tool-calls` webhook will be sent. + + Notes: + - Webhook is sent to this server when a tool call is made. + - Webhook contains the call, assistant, and phone number objects. + - Webhook contains the variables set on the assistant. + - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}. + - Webhook expects a response with tool call result. + """ + + name: CreateTextEditorToolDtoName = pydantic.Field() + """ + The name of the tool, fixed to 'str_replace_editor' + """ + + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(CreateTextEditorToolDto) diff --git a/src/vapi/types/create_text_editor_tool_dto_messages_item.py b/src/vapi/types/create_text_editor_tool_dto_messages_item.py new file mode 100644 index 00000000..927bc6c8 --- /dev/null +++ b/src/vapi/types/create_text_editor_tool_dto_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class CreateTextEditorToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateTextEditorToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateTextEditorToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateTextEditorToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateTextEditorToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + CreateTextEditorToolDtoMessagesItem_RequestStart, + CreateTextEditorToolDtoMessagesItem_RequestComplete, + CreateTextEditorToolDtoMessagesItem_RequestFailed, + CreateTextEditorToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/create_text_editor_tool_dto_name.py b/src/vapi/types/create_text_editor_tool_dto_name.py new file mode 100644 index 00000000..a043af86 --- /dev/null +++ b/src/vapi/types/create_text_editor_tool_dto_name.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CreateTextEditorToolDtoName = typing.Union[typing.Literal["str_replace_editor"], typing.Any] diff --git a/src/vapi/types/create_text_editor_tool_dto_sub_type.py b/src/vapi/types/create_text_editor_tool_dto_sub_type.py new file mode 100644 index 00000000..16f02926 --- /dev/null +++ b/src/vapi/types/create_text_editor_tool_dto_sub_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CreateTextEditorToolDtoSubType = typing.Union[typing.Literal["text_editor_20241022"], typing.Any] diff --git a/src/vapi/types/create_text_insight_from_call_table_dto.py b/src/vapi/types/create_text_insight_from_call_table_dto.py new file mode 100644 index 00000000..3be58a20 --- /dev/null +++ b/src/vapi/types/create_text_insight_from_call_table_dto.py @@ -0,0 +1,55 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_text_insight_from_call_table_dto_queries_item import CreateTextInsightFromCallTableDtoQueriesItem +from .insight_time_range import InsightTimeRange + + +class CreateTextInsightFromCallTableDto(UncheckedBaseModel): + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the Insight. + """ + + formula: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) + """ + Formulas are mathematical expressions applied on the data returned by the queries to transform them before being used to create the insight. + The formulas needs to be a valid mathematical expression, supported by MathJS - https://mathjs.org/docs/expressions/syntax.html + A formula is created by using the query names as the variable. + The formulas must contain at least one query name in the LiquidJS format {{query_name}} or {{['query name']}} which will be substituted with the query result. + For example, if you have 2 queries, 'Was Booking Made' and 'Average Call Duration', you can create a formula like this: + ``` + {{['Query 1']}} / {{['Query 2']}} * 100 + ``` + + ``` + ({{[Query 1]}} * 10) + {{[Query 2]}} + ``` + This will take the + + You can also use the query names as the variable in the formula. + """ + + time_range: typing_extensions.Annotated[ + typing.Optional[InsightTimeRange], FieldMetadata(alias="timeRange"), pydantic.Field(alias="timeRange") + ] = None + queries: typing.List[CreateTextInsightFromCallTableDtoQueriesItem] = pydantic.Field() + """ + These are the queries to run to generate the insight. + For Text Insights, we only allow a single query, or require a formula if multiple queries are provided + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_text_insight_from_call_table_dto_queries_item.py b/src/vapi/types/create_text_insight_from_call_table_dto_queries_item.py new file mode 100644 index 00000000..d43c48b4 --- /dev/null +++ b/src/vapi/types/create_text_insight_from_call_table_dto_queries_item.py @@ -0,0 +1,13 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .json_query_on_call_table_with_number_type_column import JsonQueryOnCallTableWithNumberTypeColumn +from .json_query_on_call_table_with_string_type_column import JsonQueryOnCallTableWithStringTypeColumn +from .json_query_on_call_table_with_structured_output_column import JsonQueryOnCallTableWithStructuredOutputColumn + +CreateTextInsightFromCallTableDtoQueriesItem = typing.Union[ + JsonQueryOnCallTableWithStringTypeColumn, + JsonQueryOnCallTableWithNumberTypeColumn, + JsonQueryOnCallTableWithStructuredOutputColumn, +] diff --git a/src/vapi/types/create_together_ai_credential_dto.py b/src/vapi/types/create_together_ai_credential_dto.py index 4f4c4c21..da5c2797 100644 --- a/src/vapi/types/create_together_ai_credential_dto.py +++ b/src/vapi/types/create_together_ai_credential_dto.py @@ -1,18 +1,23 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class CreateTogetherAiCredentialDto(UniversalBaseModel): - provider: typing.Literal["together-ai"] = "together-ai" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() +class CreateTogetherAiCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is not returned in the API. + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/create_token_dto.py b/src/vapi/types/create_token_dto.py index 14ff97c3..920f7efd 100644 --- a/src/vapi/types/create_token_dto.py +++ b/src/vapi/types/create_token_dto.py @@ -1,14 +1,15 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -from .create_token_dto_tag import CreateTokenDtoTag + import pydantic -from .token_restrictions import TokenRestrictions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_token_dto_tag import CreateTokenDtoTag +from .token_restrictions import TokenRestrictions -class CreateTokenDto(UniversalBaseModel): +class CreateTokenDto(UncheckedBaseModel): tag: typing.Optional[CreateTokenDtoTag] = pydantic.Field(default=None) """ This is the tag for the token. It represents its scope. diff --git a/src/vapi/types/create_tool_call_block_dto.py b/src/vapi/types/create_tool_call_block_dto.py deleted file mode 100644 index 36f99131..00000000 --- a/src/vapi/types/create_tool_call_block_dto.py +++ /dev/null @@ -1,75 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from ..core.pydantic_utilities import UniversalBaseModel -import typing -from .create_tool_call_block_dto_messages_item import CreateToolCallBlockDtoMessagesItem -import pydantic -import typing_extensions -from .json_schema import JsonSchema -from ..core.serialization import FieldMetadata -from .create_tool_call_block_dto_tool import CreateToolCallBlockDtoTool -from ..core.pydantic_utilities import IS_PYDANTIC_V2 - - -class CreateToolCallBlockDto(UniversalBaseModel): - messages: typing.Optional[typing.List[CreateToolCallBlockDtoMessagesItem]] = pydantic.Field(default=None) - """ - These are the pre-configured messages that will be spoken to the user while the block is running. - """ - - input_schema: typing_extensions.Annotated[typing.Optional[JsonSchema], FieldMetadata(alias="inputSchema")] = ( - pydantic.Field(default=None) - ) - """ - This is the input schema for the block. This is the input the block needs to run. It's given to the block as `steps[0].input` - - These are accessible as variables: - - - ({{input.propertyName}}) in context of the block execution (step) - - ({{stepName.input.propertyName}}) in context of the workflow - """ - - output_schema: typing_extensions.Annotated[typing.Optional[JsonSchema], FieldMetadata(alias="outputSchema")] = ( - pydantic.Field(default=None) - ) - """ - This is the output schema for the block. This is the output the block will return to the workflow (`{{stepName.output}}`). - - These are accessible as variables: - - - ({{output.propertyName}}) in context of the block execution (step) - - ({{stepName.output.propertyName}}) in context of the workflow (read caveat #1) - - ({{blockName.output.propertyName}}) in context of the workflow (read caveat #2) - - Caveats: - - 1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.output.propertyName}} will reference the latest usage of the step. - 2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.output.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow with steps. - """ - - type: typing.Literal["tool-call"] = "tool-call" - tool: typing.Optional[CreateToolCallBlockDtoTool] = pydantic.Field(default=None) - """ - This is the tool that the block will call. To use an existing tool, use `toolId`. - """ - - tool_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="toolId")] = pydantic.Field( - default=None - ) - """ - This is the id of the tool that the block will call. To use a transient tool, use `tool`. - """ - - name: typing.Optional[str] = pydantic.Field(default=None) - """ - This is the name of the block. This is just for your reference. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_tool_call_block_dto_messages_item.py b/src/vapi/types/create_tool_call_block_dto_messages_item.py deleted file mode 100644 index ab6a258d..00000000 --- a/src/vapi/types/create_tool_call_block_dto_messages_item.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from .block_start_message import BlockStartMessage -from .block_complete_message import BlockCompleteMessage - -CreateToolCallBlockDtoMessagesItem = typing.Union[BlockStartMessage, BlockCompleteMessage] diff --git a/src/vapi/types/create_tool_call_block_dto_tool.py b/src/vapi/types/create_tool_call_block_dto_tool.py deleted file mode 100644 index 6a6c1bae..00000000 --- a/src/vapi/types/create_tool_call_block_dto_tool.py +++ /dev/null @@ -1,20 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from .create_dtmf_tool_dto import CreateDtmfToolDto -from .create_end_call_tool_dto import CreateEndCallToolDto -from .create_voicemail_tool_dto import CreateVoicemailToolDto -from .create_function_tool_dto import CreateFunctionToolDto -from .create_ghl_tool_dto import CreateGhlToolDto -from .create_make_tool_dto import CreateMakeToolDto -from .create_transfer_call_tool_dto import CreateTransferCallToolDto - -CreateToolCallBlockDtoTool = typing.Union[ - CreateDtmfToolDto, - CreateEndCallToolDto, - CreateVoicemailToolDto, - CreateFunctionToolDto, - CreateGhlToolDto, - CreateMakeToolDto, - CreateTransferCallToolDto, -] diff --git a/src/vapi/types/create_tool_template_dto.py b/src/vapi/types/create_tool_template_dto.py index 8dcbea33..c35d5aa8 100644 --- a/src/vapi/types/create_tool_template_dto.py +++ b/src/vapi/types/create_tool_template_dto.py @@ -1,26 +1,32 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +from __future__ import annotations + import typing -from .create_tool_template_dto_details import CreateToolTemplateDtoDetails + +import pydantic import typing_extensions -from .create_tool_template_dto_provider_details import CreateToolTemplateDtoProviderDetails +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.serialization import FieldMetadata -from .tool_template_metadata import ToolTemplateMetadata -from .create_tool_template_dto_visibility import CreateToolTemplateDtoVisibility -import pydantic +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_tool_template_dto_details import CreateToolTemplateDtoDetails from .create_tool_template_dto_provider import CreateToolTemplateDtoProvider -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from .create_tool_template_dto_provider_details import CreateToolTemplateDtoProviderDetails +from .create_tool_template_dto_type import CreateToolTemplateDtoType +from .create_tool_template_dto_visibility import CreateToolTemplateDtoVisibility +from .tool_template_metadata import ToolTemplateMetadata -class CreateToolTemplateDto(UniversalBaseModel): +class CreateToolTemplateDto(UncheckedBaseModel): details: typing.Optional[CreateToolTemplateDtoDetails] = None provider_details: typing_extensions.Annotated[ - typing.Optional[CreateToolTemplateDtoProviderDetails], FieldMetadata(alias="providerDetails") + typing.Optional[CreateToolTemplateDtoProviderDetails], + FieldMetadata(alias="providerDetails"), + pydantic.Field(alias="providerDetails"), ] = None metadata: typing.Optional[ToolTemplateMetadata] = None visibility: typing.Optional[CreateToolTemplateDtoVisibility] = None - type: typing.Literal["tool"] = "tool" + type: CreateToolTemplateDtoType name: typing.Optional[str] = pydantic.Field(default=None) """ The name of the template. This is just for your own reference. @@ -36,3 +42,6 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +update_forward_refs(CreateToolTemplateDto) diff --git a/src/vapi/types/create_tool_template_dto_details.py b/src/vapi/types/create_tool_template_dto_details.py index 0f62ff9e..38bb12a4 100644 --- a/src/vapi/types/create_tool_template_dto_details.py +++ b/src/vapi/types/create_tool_template_dto_details.py @@ -1,20 +1,732 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .create_dtmf_tool_dto import CreateDtmfToolDto -from .create_end_call_tool_dto import CreateEndCallToolDto -from .create_voicemail_tool_dto import CreateVoicemailToolDto -from .create_function_tool_dto import CreateFunctionToolDto -from .create_ghl_tool_dto import CreateGhlToolDto -from .create_make_tool_dto import CreateMakeToolDto -from .create_transfer_call_tool_dto import CreateTransferCallToolDto - -CreateToolTemplateDtoDetails = typing.Union[ - CreateDtmfToolDto, - CreateEndCallToolDto, - CreateVoicemailToolDto, - CreateFunctionToolDto, - CreateGhlToolDto, - CreateMakeToolDto, - CreateTransferCallToolDto, + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .backoff_plan import BackoffPlan +from .code_tool_environment_variable import CodeToolEnvironmentVariable +from .create_api_request_tool_dto_messages_item import CreateApiRequestToolDtoMessagesItem +from .create_api_request_tool_dto_method import CreateApiRequestToolDtoMethod +from .create_bash_tool_dto_messages_item import CreateBashToolDtoMessagesItem +from .create_bash_tool_dto_name import CreateBashToolDtoName +from .create_bash_tool_dto_sub_type import CreateBashToolDtoSubType +from .create_code_tool_dto_messages_item import CreateCodeToolDtoMessagesItem +from .create_computer_tool_dto_messages_item import CreateComputerToolDtoMessagesItem +from .create_computer_tool_dto_name import CreateComputerToolDtoName +from .create_computer_tool_dto_sub_type import CreateComputerToolDtoSubType +from .create_dtmf_tool_dto_messages_item import CreateDtmfToolDtoMessagesItem +from .create_end_call_tool_dto_messages_item import CreateEndCallToolDtoMessagesItem +from .create_function_tool_dto_messages_item import CreateFunctionToolDtoMessagesItem +from .create_go_high_level_calendar_availability_tool_dto_messages_item import ( + CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem, +) +from .create_go_high_level_calendar_event_create_tool_dto_messages_item import ( + CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_create_tool_dto_messages_item import ( + CreateGoHighLevelContactCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_get_tool_dto_messages_item import CreateGoHighLevelContactGetToolDtoMessagesItem +from .create_google_calendar_check_availability_tool_dto_messages_item import ( + CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem, +) +from .create_google_calendar_create_event_tool_dto_messages_item import ( + CreateGoogleCalendarCreateEventToolDtoMessagesItem, +) +from .create_google_sheets_row_append_tool_dto_messages_item import CreateGoogleSheetsRowAppendToolDtoMessagesItem +from .create_handoff_tool_dto_messages_item import CreateHandoffToolDtoMessagesItem +from .create_mcp_tool_dto_messages_item import CreateMcpToolDtoMessagesItem +from .create_query_tool_dto_messages_item import CreateQueryToolDtoMessagesItem +from .create_sip_request_tool_dto_body import CreateSipRequestToolDtoBody +from .create_sip_request_tool_dto_messages_item import CreateSipRequestToolDtoMessagesItem +from .create_sip_request_tool_dto_verb import CreateSipRequestToolDtoVerb +from .create_slack_send_message_tool_dto_messages_item import CreateSlackSendMessageToolDtoMessagesItem +from .create_sms_tool_dto_messages_item import CreateSmsToolDtoMessagesItem +from .create_text_editor_tool_dto_messages_item import CreateTextEditorToolDtoMessagesItem +from .create_text_editor_tool_dto_name import CreateTextEditorToolDtoName +from .create_text_editor_tool_dto_sub_type import CreateTextEditorToolDtoSubType +from .create_transfer_call_tool_dto_destinations_item import CreateTransferCallToolDtoDestinationsItem +from .create_transfer_call_tool_dto_messages_item import CreateTransferCallToolDtoMessagesItem +from .create_voicemail_tool_dto_messages_item import CreateVoicemailToolDtoMessagesItem +from .knowledge_base import KnowledgeBase +from .mcp_tool_messages import McpToolMessages +from .mcp_tool_metadata import McpToolMetadata +from .open_ai_function import OpenAiFunction +from .server import Server +from .tool_parameter import ToolParameter +from .tool_rejection_plan import ToolRejectionPlan +from .variable_extraction_plan import VariableExtractionPlan + + +class CreateToolTemplateDtoDetails_ApiRequest(UncheckedBaseModel): + type: typing.Literal["apiRequest"] = "apiRequest" + messages: typing.Optional[typing.List[CreateApiRequestToolDtoMessagesItem]] = None + method: CreateApiRequestToolDtoMethod + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + encrypted_paths: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="encryptedPaths"), pydantic.Field(alias="encryptedPaths") + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + name: typing.Optional[str] = None + description: typing.Optional[str] = None + url: str + body: typing.Optional["JsonSchema"] = None + headers: typing.Optional["JsonSchema"] = None + backoff_plan: typing_extensions.Annotated[ + typing.Optional[BackoffPlan], FieldMetadata(alias="backoffPlan"), pydantic.Field(alias="backoffPlan") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolTemplateDtoDetails_Bash(UncheckedBaseModel): + type: typing.Literal["bash"] = "bash" + messages: typing.Optional[typing.List[CreateBashToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateBashToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateBashToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolTemplateDtoDetails_Code(UncheckedBaseModel): + type: typing.Literal["code"] = "code" + messages: typing.Optional[typing.List[CreateCodeToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + code: str + environment_variables: typing_extensions.Annotated[ + typing.Optional[typing.List[CodeToolEnvironmentVariable]], + FieldMetadata(alias="environmentVariables"), + pydantic.Field(alias="environmentVariables"), + ] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolTemplateDtoDetails_Computer(UncheckedBaseModel): + type: typing.Literal["computer"] = "computer" + messages: typing.Optional[typing.List[CreateComputerToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateComputerToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateComputerToolDtoName + display_width_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayWidthPx"), pydantic.Field(alias="displayWidthPx") + ] + display_height_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayHeightPx"), pydantic.Field(alias="displayHeightPx") + ] + display_number: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="displayNumber"), pydantic.Field(alias="displayNumber") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolTemplateDtoDetails_Dtmf(UncheckedBaseModel): + type: typing.Literal["dtmf"] = "dtmf" + messages: typing.Optional[typing.List[CreateDtmfToolDtoMessagesItem]] = None + sip_info_dtmf_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="sipInfoDtmfEnabled"), pydantic.Field(alias="sipInfoDtmfEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolTemplateDtoDetails_EndCall(UncheckedBaseModel): + type: typing.Literal["endCall"] = "endCall" + messages: typing.Optional[typing.List[CreateEndCallToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolTemplateDtoDetails_Function(UncheckedBaseModel): + type: typing.Literal["function"] = "function" + messages: typing.Optional[typing.List[CreateFunctionToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolTemplateDtoDetails_GohighlevelCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.availability.check"] = "gohighlevel.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolTemplateDtoDetails_GohighlevelCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.event.create"] = "gohighlevel.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolTemplateDtoDetails_GohighlevelContactCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.create"] = "gohighlevel.contact.create" + messages: typing.Optional[typing.List[CreateGoHighLevelContactCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolTemplateDtoDetails_GohighlevelContactGet(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.get"] = "gohighlevel.contact.get" + messages: typing.Optional[typing.List[CreateGoHighLevelContactGetToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolTemplateDtoDetails_GoogleCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["google.calendar.availability.check"] = "google.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolTemplateDtoDetails_GoogleCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["google.calendar.event.create"] = "google.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoogleCalendarCreateEventToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolTemplateDtoDetails_GoogleSheetsRowAppend(UncheckedBaseModel): + type: typing.Literal["google.sheets.row.append"] = "google.sheets.row.append" + messages: typing.Optional[typing.List[CreateGoogleSheetsRowAppendToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolTemplateDtoDetails_Handoff(UncheckedBaseModel): + type: typing.Literal["handoff"] = "handoff" + messages: typing.Optional[typing.List[CreateHandoffToolDtoMessagesItem]] = None + default_result: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="defaultResult"), pydantic.Field(alias="defaultResult") + ] = None + destinations: typing.Optional[typing.List["CreateHandoffToolDtoDestinationsItem"]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolTemplateDtoDetails_Mcp(UncheckedBaseModel): + type: typing.Literal["mcp"] = "mcp" + messages: typing.Optional[typing.List[CreateMcpToolDtoMessagesItem]] = None + server: typing.Optional[Server] = None + tool_messages: typing_extensions.Annotated[ + typing.Optional[typing.List[McpToolMessages]], + FieldMetadata(alias="toolMessages"), + pydantic.Field(alias="toolMessages"), + ] = None + metadata: typing.Optional[McpToolMetadata] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolTemplateDtoDetails_Query(UncheckedBaseModel): + type: typing.Literal["query"] = "query" + messages: typing.Optional[typing.List[CreateQueryToolDtoMessagesItem]] = None + knowledge_bases: typing_extensions.Annotated[ + typing.Optional[typing.List[KnowledgeBase]], + FieldMetadata(alias="knowledgeBases"), + pydantic.Field(alias="knowledgeBases"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolTemplateDtoDetails_SlackMessageSend(UncheckedBaseModel): + type: typing.Literal["slack.message.send"] = "slack.message.send" + messages: typing.Optional[typing.List[CreateSlackSendMessageToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolTemplateDtoDetails_Sms(UncheckedBaseModel): + type: typing.Literal["sms"] = "sms" + messages: typing.Optional[typing.List[CreateSmsToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolTemplateDtoDetails_TextEditor(UncheckedBaseModel): + type: typing.Literal["textEditor"] = "textEditor" + messages: typing.Optional[typing.List[CreateTextEditorToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateTextEditorToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateTextEditorToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolTemplateDtoDetails_TransferCall(UncheckedBaseModel): + type: typing.Literal["transferCall"] = "transferCall" + messages: typing.Optional[typing.List[CreateTransferCallToolDtoMessagesItem]] = None + destinations: typing.Optional[typing.List[CreateTransferCallToolDtoDestinationsItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolTemplateDtoDetails_SipRequest(UncheckedBaseModel): + type: typing.Literal["sipRequest"] = "sipRequest" + messages: typing.Optional[typing.List[CreateSipRequestToolDtoMessagesItem]] = None + verb: CreateSipRequestToolDtoVerb + headers: typing.Optional["JsonSchema"] = None + body: typing.Optional[CreateSipRequestToolDtoBody] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolTemplateDtoDetails_Voicemail(UncheckedBaseModel): + type: typing.Literal["voicemail"] = "voicemail" + messages: typing.Optional[typing.List[CreateVoicemailToolDtoMessagesItem]] = None + beep_detection_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="beepDetectionEnabled"), pydantic.Field(alias="beepDetectionEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateToolTemplateDtoDetails = typing_extensions.Annotated[ + typing.Union[ + CreateToolTemplateDtoDetails_ApiRequest, + CreateToolTemplateDtoDetails_Bash, + CreateToolTemplateDtoDetails_Code, + CreateToolTemplateDtoDetails_Computer, + CreateToolTemplateDtoDetails_Dtmf, + CreateToolTemplateDtoDetails_EndCall, + CreateToolTemplateDtoDetails_Function, + CreateToolTemplateDtoDetails_GohighlevelCalendarAvailabilityCheck, + CreateToolTemplateDtoDetails_GohighlevelCalendarEventCreate, + CreateToolTemplateDtoDetails_GohighlevelContactCreate, + CreateToolTemplateDtoDetails_GohighlevelContactGet, + CreateToolTemplateDtoDetails_GoogleCalendarAvailabilityCheck, + CreateToolTemplateDtoDetails_GoogleCalendarEventCreate, + CreateToolTemplateDtoDetails_GoogleSheetsRowAppend, + CreateToolTemplateDtoDetails_Handoff, + CreateToolTemplateDtoDetails_Mcp, + CreateToolTemplateDtoDetails_Query, + CreateToolTemplateDtoDetails_SlackMessageSend, + CreateToolTemplateDtoDetails_Sms, + CreateToolTemplateDtoDetails_TextEditor, + CreateToolTemplateDtoDetails_TransferCall, + CreateToolTemplateDtoDetails_SipRequest, + CreateToolTemplateDtoDetails_Voicemail, + ], + UnionMetadata(discriminant="type"), ] +from .json_schema import JsonSchema # noqa: E402, I001 +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs(CreateToolTemplateDtoDetails_ApiRequest, JsonSchema=JsonSchema) +update_forward_refs(CreateToolTemplateDtoDetails_Bash) +update_forward_refs(CreateToolTemplateDtoDetails_Code) +update_forward_refs(CreateToolTemplateDtoDetails_Computer) +update_forward_refs(CreateToolTemplateDtoDetails_Dtmf) +update_forward_refs(CreateToolTemplateDtoDetails_EndCall) +update_forward_refs(CreateToolTemplateDtoDetails_Function) +update_forward_refs(CreateToolTemplateDtoDetails_GohighlevelCalendarAvailabilityCheck) +update_forward_refs(CreateToolTemplateDtoDetails_GohighlevelCalendarEventCreate) +update_forward_refs(CreateToolTemplateDtoDetails_GohighlevelContactCreate) +update_forward_refs(CreateToolTemplateDtoDetails_GohighlevelContactGet) +update_forward_refs(CreateToolTemplateDtoDetails_GoogleCalendarAvailabilityCheck) +update_forward_refs(CreateToolTemplateDtoDetails_GoogleCalendarEventCreate) +update_forward_refs(CreateToolTemplateDtoDetails_GoogleSheetsRowAppend) +update_forward_refs( + CreateToolTemplateDtoDetails_Handoff, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs(CreateToolTemplateDtoDetails_Mcp) +update_forward_refs(CreateToolTemplateDtoDetails_Query) +update_forward_refs(CreateToolTemplateDtoDetails_SlackMessageSend) +update_forward_refs(CreateToolTemplateDtoDetails_Sms) +update_forward_refs(CreateToolTemplateDtoDetails_TextEditor) +update_forward_refs(CreateToolTemplateDtoDetails_TransferCall) +update_forward_refs(CreateToolTemplateDtoDetails_SipRequest, JsonSchema=JsonSchema) +update_forward_refs(CreateToolTemplateDtoDetails_Voicemail) diff --git a/src/vapi/types/create_tool_template_dto_provider_details.py b/src/vapi/types/create_tool_template_dto_provider_details.py index ab633dbe..dbeb567f 100644 --- a/src/vapi/types/create_tool_template_dto_provider_details.py +++ b/src/vapi/types/create_tool_template_dto_provider_details.py @@ -1,10 +1,244 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .make_tool_provider_details import MakeToolProviderDetails -from .ghl_tool_provider_details import GhlToolProviderDetails -from .function_tool_provider_details import FunctionToolProviderDetails -CreateToolTemplateDtoProviderDetails = typing.Union[ - MakeToolProviderDetails, GhlToolProviderDetails, FunctionToolProviderDetails +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .tool_template_setup import ToolTemplateSetup + + +class CreateToolTemplateDtoProviderDetails_Make(UncheckedBaseModel): + type: typing.Literal["make"] = "make" + template_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="templateUrl"), pydantic.Field(alias="templateUrl") + ] = None + setup_instructions: typing_extensions.Annotated[ + typing.Optional[typing.List[ToolTemplateSetup]], + FieldMetadata(alias="setupInstructions"), + pydantic.Field(alias="setupInstructions"), + ] = None + scenario_id: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="scenarioId"), pydantic.Field(alias="scenarioId") + ] = None + scenario_name: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="scenarioName"), pydantic.Field(alias="scenarioName") + ] = None + trigger_hook_id: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="triggerHookId"), pydantic.Field(alias="triggerHookId") + ] = None + trigger_hook_name: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="triggerHookName"), pydantic.Field(alias="triggerHookName") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolTemplateDtoProviderDetails_Ghl(UncheckedBaseModel): + type: typing.Literal["ghl"] = "ghl" + template_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="templateUrl"), pydantic.Field(alias="templateUrl") + ] = None + setup_instructions: typing_extensions.Annotated[ + typing.Optional[typing.List[ToolTemplateSetup]], + FieldMetadata(alias="setupInstructions"), + pydantic.Field(alias="setupInstructions"), + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + workflow_name: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowName"), pydantic.Field(alias="workflowName") + ] = None + webhook_hook_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="webhookHookId"), pydantic.Field(alias="webhookHookId") + ] = None + webhook_hook_name: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="webhookHookName"), pydantic.Field(alias="webhookHookName") + ] = None + location_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="locationId"), pydantic.Field(alias="locationId") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolTemplateDtoProviderDetails_Function(UncheckedBaseModel): + type: typing.Literal["function"] = "function" + template_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="templateUrl"), pydantic.Field(alias="templateUrl") + ] = None + setup_instructions: typing_extensions.Annotated[ + typing.Optional[typing.List[ToolTemplateSetup]], + FieldMetadata(alias="setupInstructions"), + pydantic.Field(alias="setupInstructions"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolTemplateDtoProviderDetails_GoogleCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["google.calendar.event.create"] = "google.calendar.event.create" + template_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="templateUrl"), pydantic.Field(alias="templateUrl") + ] = None + setup_instructions: typing_extensions.Annotated[ + typing.Optional[typing.List[ToolTemplateSetup]], + FieldMetadata(alias="setupInstructions"), + pydantic.Field(alias="setupInstructions"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolTemplateDtoProviderDetails_GoogleSheetsRowAppend(UncheckedBaseModel): + type: typing.Literal["google.sheets.row.append"] = "google.sheets.row.append" + template_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="templateUrl"), pydantic.Field(alias="templateUrl") + ] = None + setup_instructions: typing_extensions.Annotated[ + typing.Optional[typing.List[ToolTemplateSetup]], + FieldMetadata(alias="setupInstructions"), + pydantic.Field(alias="setupInstructions"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolTemplateDtoProviderDetails_GohighlevelCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.availability.check"] = "gohighlevel.calendar.availability.check" + template_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="templateUrl"), pydantic.Field(alias="templateUrl") + ] = None + setup_instructions: typing_extensions.Annotated[ + typing.Optional[typing.List[ToolTemplateSetup]], + FieldMetadata(alias="setupInstructions"), + pydantic.Field(alias="setupInstructions"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolTemplateDtoProviderDetails_GohighlevelCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.event.create"] = "gohighlevel.calendar.event.create" + template_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="templateUrl"), pydantic.Field(alias="templateUrl") + ] = None + setup_instructions: typing_extensions.Annotated[ + typing.Optional[typing.List[ToolTemplateSetup]], + FieldMetadata(alias="setupInstructions"), + pydantic.Field(alias="setupInstructions"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolTemplateDtoProviderDetails_GohighlevelContactCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.create"] = "gohighlevel.contact.create" + template_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="templateUrl"), pydantic.Field(alias="templateUrl") + ] = None + setup_instructions: typing_extensions.Annotated[ + typing.Optional[typing.List[ToolTemplateSetup]], + FieldMetadata(alias="setupInstructions"), + pydantic.Field(alias="setupInstructions"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateToolTemplateDtoProviderDetails_GohighlevelContactGet(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.get"] = "gohighlevel.contact.get" + template_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="templateUrl"), pydantic.Field(alias="templateUrl") + ] = None + setup_instructions: typing_extensions.Annotated[ + typing.Optional[typing.List[ToolTemplateSetup]], + FieldMetadata(alias="setupInstructions"), + pydantic.Field(alias="setupInstructions"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateToolTemplateDtoProviderDetails = typing_extensions.Annotated[ + typing.Union[ + CreateToolTemplateDtoProviderDetails_Make, + CreateToolTemplateDtoProviderDetails_Ghl, + CreateToolTemplateDtoProviderDetails_Function, + CreateToolTemplateDtoProviderDetails_GoogleCalendarEventCreate, + CreateToolTemplateDtoProviderDetails_GoogleSheetsRowAppend, + CreateToolTemplateDtoProviderDetails_GohighlevelCalendarAvailabilityCheck, + CreateToolTemplateDtoProviderDetails_GohighlevelCalendarEventCreate, + CreateToolTemplateDtoProviderDetails_GohighlevelContactCreate, + CreateToolTemplateDtoProviderDetails_GohighlevelContactGet, + ], + UnionMetadata(discriminant="type"), ] diff --git a/src/vapi/types/create_tool_template_dto_type.py b/src/vapi/types/create_tool_template_dto_type.py new file mode 100644 index 00000000..0729666a --- /dev/null +++ b/src/vapi/types/create_tool_template_dto_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CreateToolTemplateDtoType = typing.Union[typing.Literal["tool"], typing.Any] diff --git a/src/vapi/types/create_transfer_call_tool_dto.py b/src/vapi/types/create_transfer_call_tool_dto.py index b865a031..8c1caa44 100644 --- a/src/vapi/types/create_transfer_call_tool_dto.py +++ b/src/vapi/types/create_transfer_call_tool_dto.py @@ -1,31 +1,20 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions +from __future__ import annotations + import typing -from ..core.serialization import FieldMetadata + import pydantic -from .create_transfer_call_tool_dto_messages_item import CreateTransferCallToolDtoMessagesItem +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel from .create_transfer_call_tool_dto_destinations_item import CreateTransferCallToolDtoDestinationsItem -from .open_ai_function import OpenAiFunction -from .server import Server -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from .create_transfer_call_tool_dto_messages_item import CreateTransferCallToolDtoMessagesItem +from .tool_rejection_plan import ToolRejectionPlan -class CreateTransferCallToolDto(UniversalBaseModel): - async_: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="async")] = pydantic.Field( - default=None - ) - """ - This determines if the tool is async. - - If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server. - - If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server. - - Defaults to synchronous (`false`). - """ - +class CreateTransferCallToolDto(UncheckedBaseModel): messages: typing.Optional[typing.List[CreateTransferCallToolDtoMessagesItem]] = pydantic.Field(default=None) """ These are the messages that will be spoken to the user as the tool is running. @@ -33,29 +22,19 @@ class CreateTransferCallToolDto(UniversalBaseModel): For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. """ - type: typing.Literal["transferCall"] = "transferCall" destinations: typing.Optional[typing.List[CreateTransferCallToolDtoDestinationsItem]] = pydantic.Field(default=None) """ These are the destinations that the call can be transferred to. If no destinations are provided, server.url will be used to get the transfer destination once the tool is called. """ - function: typing.Optional[OpenAiFunction] = pydantic.Field(default=None) - """ - This is the function definition of the tool. - - For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on tool-specific fields like `tool.destinations`. But, even in those cases, you can provide a custom function definition for advanced use cases. - - An example of an advanced use case is if you want to customize the message that's spoken for `endCall` tool. You can specify a function where it returns an argument "reason". Then, in `messages` array, you can have many "request-complete" messages. One of these messages will be triggered if the `messages[].conditions` matches the "reason" argument. - """ - - server: typing.Optional[Server] = pydantic.Field(default=None) - """ - This is the server that will be hit when this tool is requested by the model. - - All requests will be sent with the call object among other things. You can find more details in the Server URL documentation. - - This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: highest tool.server.url, then assistant.serverUrl, then phoneNumber.serverUrl, then org.serverUrl. - """ + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -65,3 +44,6 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +update_forward_refs(CreateTransferCallToolDto) diff --git a/src/vapi/types/create_transfer_call_tool_dto_destinations_item.py b/src/vapi/types/create_transfer_call_tool_dto_destinations_item.py index 45a4fc36..f4587dad 100644 --- a/src/vapi/types/create_transfer_call_tool_dto_destinations_item.py +++ b/src/vapi/types/create_transfer_call_tool_dto_destinations_item.py @@ -1,11 +1,102 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .transfer_destination_assistant import TransferDestinationAssistant -from .transfer_destination_step import TransferDestinationStep -from .transfer_destination_number import TransferDestinationNumber -from .transfer_destination_sip import TransferDestinationSip -CreateTransferCallToolDtoDestinationsItem = typing.Union[ - TransferDestinationAssistant, TransferDestinationStep, TransferDestinationNumber, TransferDestinationSip +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .transfer_destination_assistant_message import TransferDestinationAssistantMessage +from .transfer_destination_number_message import TransferDestinationNumberMessage +from .transfer_destination_sip_message import TransferDestinationSipMessage +from .transfer_mode import TransferMode +from .transfer_plan import TransferPlan + + +class CreateTransferCallToolDtoDestinationsItem_Assistant(UncheckedBaseModel): + type: typing.Literal["assistant"] = "assistant" + message: typing.Optional[TransferDestinationAssistantMessage] = None + transfer_mode: typing_extensions.Annotated[ + typing.Optional[TransferMode], FieldMetadata(alias="transferMode"), pydantic.Field(alias="transferMode") + ] = None + assistant_name: typing_extensions.Annotated[ + str, FieldMetadata(alias="assistantName"), pydantic.Field(alias="assistantName") + ] + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateTransferCallToolDtoDestinationsItem_Number(UncheckedBaseModel): + type: typing.Literal["number"] = "number" + message: typing.Optional[TransferDestinationNumberMessage] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: str + extension: typing.Optional[str] = None + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateTransferCallToolDtoDestinationsItem_Sip(UncheckedBaseModel): + type: typing.Literal["sip"] = "sip" + message: typing.Optional[TransferDestinationSipMessage] = None + sip_uri: typing_extensions.Annotated[str, FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri")] + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + sip_headers: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="sipHeaders"), + pydantic.Field(alias="sipHeaders"), + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateTransferCallToolDtoDestinationsItem = typing_extensions.Annotated[ + typing.Union[ + CreateTransferCallToolDtoDestinationsItem_Assistant, + CreateTransferCallToolDtoDestinationsItem_Number, + CreateTransferCallToolDtoDestinationsItem_Sip, + ], + UnionMetadata(discriminant="type"), ] diff --git a/src/vapi/types/create_transfer_call_tool_dto_messages_item.py b/src/vapi/types/create_transfer_call_tool_dto_messages_item.py index eda491b2..87130caa 100644 --- a/src/vapi/types/create_transfer_call_tool_dto_messages_item.py +++ b/src/vapi/types/create_transfer_call_tool_dto_messages_item.py @@ -1,11 +1,104 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .tool_message_start import ToolMessageStart -from .tool_message_complete import ToolMessageComplete -from .tool_message_failed import ToolMessageFailed -from .tool_message_delayed import ToolMessageDelayed -CreateTransferCallToolDtoMessagesItem = typing.Union[ - ToolMessageStart, ToolMessageComplete, ToolMessageFailed, ToolMessageDelayed +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class CreateTransferCallToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateTransferCallToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateTransferCallToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateTransferCallToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateTransferCallToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + CreateTransferCallToolDtoMessagesItem_RequestStart, + CreateTransferCallToolDtoMessagesItem_RequestComplete, + CreateTransferCallToolDtoMessagesItem_RequestFailed, + CreateTransferCallToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), ] diff --git a/src/vapi/types/create_trieve_credential_dto.py b/src/vapi/types/create_trieve_credential_dto.py new file mode 100644 index 00000000..009d1912 --- /dev/null +++ b/src/vapi/types/create_trieve_credential_dto.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class CreateTrieveCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_trieve_knowledge_base_dto.py b/src/vapi/types/create_trieve_knowledge_base_dto.py new file mode 100644 index 00000000..0707708d --- /dev/null +++ b/src/vapi/types/create_trieve_knowledge_base_dto.py @@ -0,0 +1,52 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_trieve_knowledge_base_dto_provider import CreateTrieveKnowledgeBaseDtoProvider +from .trieve_knowledge_base_import import TrieveKnowledgeBaseImport +from .trieve_knowledge_base_search_plan import TrieveKnowledgeBaseSearchPlan + + +class CreateTrieveKnowledgeBaseDto(UncheckedBaseModel): + provider: CreateTrieveKnowledgeBaseDtoProvider = pydantic.Field() + """ + This knowledge base is provided by Trieve. + + To learn more about Trieve, visit https://trieve.ai. + """ + + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the knowledge base. + """ + + search_plan: typing_extensions.Annotated[ + typing.Optional[TrieveKnowledgeBaseSearchPlan], + FieldMetadata(alias="searchPlan"), + pydantic.Field( + alias="searchPlan", + description="This is the searching plan used when searching for relevant chunks from the vector store.\n\nYou should configure this if you're running into these issues:\n- Too much unnecessary context is being fed as knowledge base context.\n- Not enough relevant context is being fed as knowledge base context.", + ), + ] = None + create_plan: typing_extensions.Annotated[ + typing.Optional[TrieveKnowledgeBaseImport], + FieldMetadata(alias="createPlan"), + pydantic.Field( + alias="createPlan", + description="This is the plan if you want us to create/import a new vector store using Trieve.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_trieve_knowledge_base_dto_provider.py b/src/vapi/types/create_trieve_knowledge_base_dto_provider.py new file mode 100644 index 00000000..6ae19187 --- /dev/null +++ b/src/vapi/types/create_trieve_knowledge_base_dto_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CreateTrieveKnowledgeBaseDtoProvider = typing.Union[typing.Literal["trieve"], typing.Any] diff --git a/src/vapi/types/create_twilio_credential_dto.py b/src/vapi/types/create_twilio_credential_dto.py index 0a11e75a..cdc97641 100644 --- a/src/vapi/types/create_twilio_credential_dto.py +++ b/src/vapi/types/create_twilio_credential_dto.py @@ -1,22 +1,36 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class CreateTwilioCredentialDto(UniversalBaseModel): - provider: typing.Literal["twilio"] = "twilio" - auth_token: typing_extensions.Annotated[str, FieldMetadata(alias="authToken")] = pydantic.Field() +class CreateTwilioCredentialDto(UncheckedBaseModel): + auth_token: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="authToken"), + pydantic.Field(alias="authToken", description="This is not returned in the API."), + ] = None + api_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] = None + api_secret: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiSecret"), + pydantic.Field(alias="apiSecret", description="This is not returned in the API."), + ] = None + account_sid: typing_extensions.Annotated[str, FieldMetadata(alias="accountSid"), pydantic.Field(alias="accountSid")] + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is not returned in the API. + This is the name of credential. This is just for your reference. """ - account_sid: typing_extensions.Annotated[str, FieldMetadata(alias="accountSid")] - if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/vapi/types/create_twilio_phone_number_dto.py b/src/vapi/types/create_twilio_phone_number_dto.py index 3bece8fd..ccc99ff1 100644 --- a/src/vapi/types/create_twilio_phone_number_dto.py +++ b/src/vapi/types/create_twilio_phone_number_dto.py @@ -1,85 +1,102 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions import typing -from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .server import Server -class CreateTwilioPhoneNumberDto(UniversalBaseModel): +class CreateTwilioPhoneNumberDto(UncheckedBaseModel): fallback_destination: typing_extensions.Annotated[ - typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], FieldMetadata(alias="fallbackDestination") - ] = pydantic.Field(default=None) + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field( + alias="fallbackDestination", + description="This is the fallback destination an inbound call will be transferred to if:\n1. `assistantId` is not set\n2. `squadId` is not set\n3. and, `assistant-request` message to the `serverUrl` fails\n\nIf this is not set and above conditions are met, the inbound call is hung up with an error message.", + ), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = pydantic.Field(default=None) """ - This is the fallback destination an inbound call will be transferred to if: - - 1. `assistantId` is not set - 2. `squadId` is not set - 3. and, `assistant-request` message to the `serverUrl` fails - - If this is not set and above conditions are met, the inbound call is hung up with an error message. + This is the hooks that will be used for incoming calls to this phone number. """ - provider: typing.Literal["twilio"] = "twilio" + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="smsEnabled"), + pydantic.Field( + alias="smsEnabled", + description="Controls whether Vapi sets the messaging webhook URL on the Twilio number during import.\n\nIf set to `false`, Vapi will not update the Twilio messaging URL, leaving it as is.\nIf `true` or omitted (default), Vapi will configure both the voice and messaging URLs.\n\n@default true", + ), + ] = None number: str = pydantic.Field() """ These are the digits of the phone number you own on your Twilio. """ - twilio_account_sid: typing_extensions.Annotated[str, FieldMetadata(alias="twilioAccountSid")] = pydantic.Field() - """ - This is the Twilio Account SID for the phone number. - """ - - twilio_auth_token: typing_extensions.Annotated[str, FieldMetadata(alias="twilioAuthToken")] = pydantic.Field() - """ - This is the Twilio Auth Token for the phone number. - """ - + twilio_account_sid: typing_extensions.Annotated[ + str, + FieldMetadata(alias="twilioAccountSid"), + pydantic.Field(alias="twilioAccountSid", description="This is the Twilio Account SID for the phone number."), + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="twilioAuthToken"), + pydantic.Field(alias="twilioAuthToken", description="This is the Twilio Auth Token for the phone number."), + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="twilioApiKey"), + pydantic.Field(alias="twilioApiKey", description="This is the Twilio API Key for the phone number."), + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="twilioApiSecret"), + pydantic.Field(alias="twilioApiSecret", description="This is the Twilio API Secret for the phone number."), + ] = None name: typing.Optional[str] = pydantic.Field(default=None) """ This is the name of the phone number. This is just for your own reference. """ - assistant_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="assistantId")] = ( - pydantic.Field(default=None) - ) - """ - This is the assistant that will be used for incoming calls to this phone number. - - If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected. - """ - - squad_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="squadId")] = pydantic.Field( - default=None - ) - """ - This is the squad that will be used for incoming calls to this phone number. - - If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected. - """ - - server_url: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="serverUrl")] = pydantic.Field( - default=None - ) - """ - This is the server URL where messages will be sent for calls on this number. This includes the `assistant-request` message. - - You can see the shape of the messages sent in `ServerMessage`. + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assistantId"), + pydantic.Field( + alias="assistantId", + description="This is the assistant that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="workflowId"), + pydantic.Field( + alias="workflowId", + description="This is the workflow that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="squadId"), + pydantic.Field( + alias="squadId", + description="This is the squad that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + server: typing.Optional[Server] = pydantic.Field(default=None) + """ + This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema. - This overrides the `org.serverUrl`. Order of precedence: tool.server.url > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl. - """ - - server_url_secret: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="serverUrlSecret")] = ( - pydantic.Field(default=None) - ) - """ - This is the secret Vapi will send with every message to your server. It's sent as a header called x-vapi-secret. + The order of precedence is: - Same precedence logic as serverUrl. + 1. assistant.server + 2. phoneNumber.server + 3. org.server """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/create_twilio_phone_number_dto_fallback_destination.py b/src/vapi/types/create_twilio_phone_number_dto_fallback_destination.py index 253fed49..dfb14804 100644 --- a/src/vapi/types/create_twilio_phone_number_dto_fallback_destination.py +++ b/src/vapi/types/create_twilio_phone_number_dto_fallback_destination.py @@ -1,7 +1,95 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .transfer_destination_number import TransferDestinationNumber -from .transfer_destination_sip import TransferDestinationSip -CreateTwilioPhoneNumberDtoFallbackDestination = typing.Union[TransferDestinationNumber, TransferDestinationSip] +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .transfer_destination_number_message import TransferDestinationNumberMessage +from .transfer_destination_sip_message import TransferDestinationSipMessage +from .transfer_plan import TransferPlan + + +class CreateTwilioPhoneNumberDtoFallbackDestination_Number(UncheckedBaseModel): + """ + This is the fallback destination an inbound call will be transferred to if: + 1. `assistantId` is not set + 2. `squadId` is not set + 3. and, `assistant-request` message to the `serverUrl` fails + + If this is not set and above conditions are met, the inbound call is hung up with an error message. + """ + + type: typing.Literal["number"] = "number" + message: typing.Optional[TransferDestinationNumberMessage] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: str + extension: typing.Optional[str] = None + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateTwilioPhoneNumberDtoFallbackDestination_Sip(UncheckedBaseModel): + """ + This is the fallback destination an inbound call will be transferred to if: + 1. `assistantId` is not set + 2. `squadId` is not set + 3. and, `assistant-request` message to the `serverUrl` fails + + If this is not set and above conditions are met, the inbound call is hung up with an error message. + """ + + type: typing.Literal["sip"] = "sip" + message: typing.Optional[TransferDestinationSipMessage] = None + sip_uri: typing_extensions.Annotated[str, FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri")] + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + sip_headers: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="sipHeaders"), + pydantic.Field(alias="sipHeaders"), + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateTwilioPhoneNumberDtoFallbackDestination = typing_extensions.Annotated[ + typing.Union[ + CreateTwilioPhoneNumberDtoFallbackDestination_Number, CreateTwilioPhoneNumberDtoFallbackDestination_Sip + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/create_twilio_phone_number_dto_hooks_item.py b/src/vapi/types/create_twilio_phone_number_dto_hooks_item.py new file mode 100644 index 00000000..33c23d44 --- /dev/null +++ b/src/vapi/types/create_twilio_phone_number_dto_hooks_item.py @@ -0,0 +1,50 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .phone_number_call_ending_hook_filter import PhoneNumberCallEndingHookFilter +from .phone_number_call_ringing_hook_filter import PhoneNumberCallRingingHookFilter +from .phone_number_hook_call_ending_do import PhoneNumberHookCallEndingDo +from .phone_number_hook_call_ringing_do_item import PhoneNumberHookCallRingingDoItem + + +class CreateTwilioPhoneNumberDtoHooksItem_CallRinging(UncheckedBaseModel): + on: typing.Literal["call.ringing"] = "call.ringing" + filters: typing.Optional[typing.List[PhoneNumberCallRingingHookFilter]] = None + do: typing.List[PhoneNumberHookCallRingingDoItem] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateTwilioPhoneNumberDtoHooksItem_CallEnding(UncheckedBaseModel): + on: typing.Literal["call.ending"] = "call.ending" + filters: typing.Optional[typing.List[PhoneNumberCallEndingHookFilter]] = None + do: typing.Optional[PhoneNumberHookCallEndingDo] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateTwilioPhoneNumberDtoHooksItem = typing_extensions.Annotated[ + typing.Union[CreateTwilioPhoneNumberDtoHooksItem_CallRinging, CreateTwilioPhoneNumberDtoHooksItem_CallEnding], + UnionMetadata(discriminant="on"), +] diff --git a/src/vapi/types/create_vapi_phone_number_dto.py b/src/vapi/types/create_vapi_phone_number_dto.py index 1c2b5bde..07436061 100644 --- a/src/vapi/types/create_vapi_phone_number_dto.py +++ b/src/vapi/types/create_vapi_phone_number_dto.py @@ -1,34 +1,52 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions import typing -from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication -class CreateVapiPhoneNumberDto(UniversalBaseModel): +class CreateVapiPhoneNumberDto(UncheckedBaseModel): fallback_destination: typing_extensions.Annotated[ - typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], FieldMetadata(alias="fallbackDestination") - ] = pydantic.Field(default=None) + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field( + alias="fallbackDestination", + description="This is the fallback destination an inbound call will be transferred to if:\n1. `assistantId` is not set\n2. `squadId` is not set\n3. and, `assistant-request` message to the `serverUrl` fails\n\nIf this is not set and above conditions are met, the inbound call is hung up with an error message.", + ), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = pydantic.Field(default=None) """ - This is the fallback destination an inbound call will be transferred to if: - - 1. `assistantId` is not set - 2. `squadId` is not set - 3. and, `assistant-request` message to the `serverUrl` fails - - If this is not set and above conditions are met, the inbound call is hung up with an error message. + This is the hooks that will be used for incoming calls to this phone number. """ - provider: typing.Literal["vapi"] = "vapi" - sip_uri: typing_extensions.Annotated[str, FieldMetadata(alias="sipUri")] = pydantic.Field() + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field( + alias="numberDesiredAreaCode", description="This is the area code of the phone number to purchase." + ), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="sipUri"), + pydantic.Field( + alias="sipUri", + description="This is the SIP URI of the phone number. You can SIP INVITE this. The assistant attached to this number will answer.\n\nThis is case-insensitive.", + ), + ] = None + authentication: typing.Optional[SipAuthentication] = pydantic.Field(default=None) """ - This is the SIP URI of the phone number. You can SIP INVITE this. The assistant attached to this number will answer. + This enables authentication for incoming SIP INVITE requests to the `sipUri`. - This is case-insensitive. + If not set, any username/password to the 401 challenge of the SIP INVITE will be accepted. """ name: typing.Optional[str] = pydantic.Field(default=None) @@ -36,42 +54,39 @@ class CreateVapiPhoneNumberDto(UniversalBaseModel): This is the name of the phone number. This is just for your own reference. """ - assistant_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="assistantId")] = ( - pydantic.Field(default=None) - ) + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assistantId"), + pydantic.Field( + alias="assistantId", + description="This is the assistant that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="workflowId"), + pydantic.Field( + alias="workflowId", + description="This is the workflow that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="squadId"), + pydantic.Field( + alias="squadId", + description="This is the squad that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + server: typing.Optional[Server] = pydantic.Field(default=None) """ - This is the assistant that will be used for incoming calls to this phone number. + This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema. - If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected. - """ - - squad_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="squadId")] = pydantic.Field( - default=None - ) - """ - This is the squad that will be used for incoming calls to this phone number. - - If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected. - """ - - server_url: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="serverUrl")] = pydantic.Field( - default=None - ) - """ - This is the server URL where messages will be sent for calls on this number. This includes the `assistant-request` message. - - You can see the shape of the messages sent in `ServerMessage`. - - This overrides the `org.serverUrl`. Order of precedence: tool.server.url > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl. - """ - - server_url_secret: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="serverUrlSecret")] = ( - pydantic.Field(default=None) - ) - """ - This is the secret Vapi will send with every message to your server. It's sent as a header called x-vapi-secret. + The order of precedence is: - Same precedence logic as serverUrl. + 1. assistant.server + 2. phoneNumber.server + 3. org.server """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/create_vapi_phone_number_dto_fallback_destination.py b/src/vapi/types/create_vapi_phone_number_dto_fallback_destination.py index 302e8b97..6f709c04 100644 --- a/src/vapi/types/create_vapi_phone_number_dto_fallback_destination.py +++ b/src/vapi/types/create_vapi_phone_number_dto_fallback_destination.py @@ -1,7 +1,93 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .transfer_destination_number import TransferDestinationNumber -from .transfer_destination_sip import TransferDestinationSip -CreateVapiPhoneNumberDtoFallbackDestination = typing.Union[TransferDestinationNumber, TransferDestinationSip] +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .transfer_destination_number_message import TransferDestinationNumberMessage +from .transfer_destination_sip_message import TransferDestinationSipMessage +from .transfer_plan import TransferPlan + + +class CreateVapiPhoneNumberDtoFallbackDestination_Number(UncheckedBaseModel): + """ + This is the fallback destination an inbound call will be transferred to if: + 1. `assistantId` is not set + 2. `squadId` is not set + 3. and, `assistant-request` message to the `serverUrl` fails + + If this is not set and above conditions are met, the inbound call is hung up with an error message. + """ + + type: typing.Literal["number"] = "number" + message: typing.Optional[TransferDestinationNumberMessage] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: str + extension: typing.Optional[str] = None + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateVapiPhoneNumberDtoFallbackDestination_Sip(UncheckedBaseModel): + """ + This is the fallback destination an inbound call will be transferred to if: + 1. `assistantId` is not set + 2. `squadId` is not set + 3. and, `assistant-request` message to the `serverUrl` fails + + If this is not set and above conditions are met, the inbound call is hung up with an error message. + """ + + type: typing.Literal["sip"] = "sip" + message: typing.Optional[TransferDestinationSipMessage] = None + sip_uri: typing_extensions.Annotated[str, FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri")] + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + sip_headers: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="sipHeaders"), + pydantic.Field(alias="sipHeaders"), + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateVapiPhoneNumberDtoFallbackDestination = typing_extensions.Annotated[ + typing.Union[CreateVapiPhoneNumberDtoFallbackDestination_Number, CreateVapiPhoneNumberDtoFallbackDestination_Sip], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/create_vapi_phone_number_dto_hooks_item.py b/src/vapi/types/create_vapi_phone_number_dto_hooks_item.py new file mode 100644 index 00000000..6193afb6 --- /dev/null +++ b/src/vapi/types/create_vapi_phone_number_dto_hooks_item.py @@ -0,0 +1,50 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .phone_number_call_ending_hook_filter import PhoneNumberCallEndingHookFilter +from .phone_number_call_ringing_hook_filter import PhoneNumberCallRingingHookFilter +from .phone_number_hook_call_ending_do import PhoneNumberHookCallEndingDo +from .phone_number_hook_call_ringing_do_item import PhoneNumberHookCallRingingDoItem + + +class CreateVapiPhoneNumberDtoHooksItem_CallRinging(UncheckedBaseModel): + on: typing.Literal["call.ringing"] = "call.ringing" + filters: typing.Optional[typing.List[PhoneNumberCallRingingHookFilter]] = None + do: typing.List[PhoneNumberHookCallRingingDoItem] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateVapiPhoneNumberDtoHooksItem_CallEnding(UncheckedBaseModel): + on: typing.Literal["call.ending"] = "call.ending" + filters: typing.Optional[typing.List[PhoneNumberCallEndingHookFilter]] = None + do: typing.Optional[PhoneNumberHookCallEndingDo] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateVapiPhoneNumberDtoHooksItem = typing_extensions.Annotated[ + typing.Union[CreateVapiPhoneNumberDtoHooksItem_CallRinging, CreateVapiPhoneNumberDtoHooksItem_CallEnding], + UnionMetadata(discriminant="on"), +] diff --git a/src/vapi/types/create_voicemail_tool_dto.py b/src/vapi/types/create_voicemail_tool_dto.py index 504e6e9e..33d3e113 100644 --- a/src/vapi/types/create_voicemail_tool_dto.py +++ b/src/vapi/types/create_voicemail_tool_dto.py @@ -1,30 +1,19 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions +from __future__ import annotations + import typing -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel from .create_voicemail_tool_dto_messages_item import CreateVoicemailToolDtoMessagesItem -from .open_ai_function import OpenAiFunction -from .server import Server -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from .tool_rejection_plan import ToolRejectionPlan -class CreateVoicemailToolDto(UniversalBaseModel): - async_: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="async")] = pydantic.Field( - default=None - ) - """ - This determines if the tool is async. - - If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server. - - If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server. - - Defaults to synchronous (`false`). - """ - +class CreateVoicemailToolDto(UncheckedBaseModel): messages: typing.Optional[typing.List[CreateVoicemailToolDtoMessagesItem]] = pydantic.Field(default=None) """ These are the messages that will be spoken to the user as the tool is running. @@ -32,28 +21,22 @@ class CreateVoicemailToolDto(UniversalBaseModel): For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. """ - type: typing.Literal["voicemail"] = pydantic.Field(default="voicemail") - """ - The type of tool. "voicemail". This uses the model itself to determine if a voicemil was reached. Can be used alternatively/alongside with TwilioVoicemailDetection - """ - - function: typing.Optional[OpenAiFunction] = pydantic.Field(default=None) - """ - This is the function definition of the tool. - - For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on tool-specific fields like `tool.destinations`. But, even in those cases, you can provide a custom function definition for advanced use cases. - - An example of an advanced use case is if you want to customize the message that's spoken for `endCall` tool. You can specify a function where it returns an argument "reason". Then, in `messages` array, you can have many "request-complete" messages. One of these messages will be triggered if the `messages[].conditions` matches the "reason" argument. - """ - - server: typing.Optional[Server] = pydantic.Field(default=None) - """ - This is the server that will be hit when this tool is requested by the model. - - All requests will be sent with the call object among other things. You can find more details in the Server URL documentation. - - This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: highest tool.server.url, then assistant.serverUrl, then phoneNumber.serverUrl, then org.serverUrl. - """ + beep_detection_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="beepDetectionEnabled"), + pydantic.Field( + alias="beepDetectionEnabled", + description="This is the flag that enables beep detection for voicemail detection and applies only for twilio based calls.\n\n@default false", + ), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -63,3 +46,6 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +update_forward_refs(CreateVoicemailToolDto) diff --git a/src/vapi/types/create_voicemail_tool_dto_messages_item.py b/src/vapi/types/create_voicemail_tool_dto_messages_item.py index c7dfdf6d..35827a5f 100644 --- a/src/vapi/types/create_voicemail_tool_dto_messages_item.py +++ b/src/vapi/types/create_voicemail_tool_dto_messages_item.py @@ -1,11 +1,104 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .tool_message_start import ToolMessageStart -from .tool_message_complete import ToolMessageComplete -from .tool_message_failed import ToolMessageFailed -from .tool_message_delayed import ToolMessageDelayed -CreateVoicemailToolDtoMessagesItem = typing.Union[ - ToolMessageStart, ToolMessageComplete, ToolMessageFailed, ToolMessageDelayed +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class CreateVoicemailToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateVoicemailToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateVoicemailToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateVoicemailToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateVoicemailToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + CreateVoicemailToolDtoMessagesItem_RequestStart, + CreateVoicemailToolDtoMessagesItem_RequestComplete, + CreateVoicemailToolDtoMessagesItem_RequestFailed, + CreateVoicemailToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), ] diff --git a/src/vapi/types/create_vonage_credential_dto.py b/src/vapi/types/create_vonage_credential_dto.py index ad1e492f..23e1d481 100644 --- a/src/vapi/types/create_vonage_credential_dto.py +++ b/src/vapi/types/create_vonage_credential_dto.py @@ -1,22 +1,26 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class CreateVonageCredentialDto(UniversalBaseModel): - provider: typing.Literal["vonage"] = "vonage" - api_secret: typing_extensions.Annotated[str, FieldMetadata(alias="apiSecret")] = pydantic.Field() +class CreateVonageCredentialDto(UncheckedBaseModel): + api_secret: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiSecret"), + pydantic.Field(alias="apiSecret", description="This is not returned in the API."), + ] + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is not returned in the API. + This is the name of credential. This is just for your reference. """ - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] - if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/vapi/types/create_vonage_phone_number_dto.py b/src/vapi/types/create_vonage_phone_number_dto.py index 2936e3a1..166577a1 100644 --- a/src/vapi/types/create_vonage_phone_number_dto.py +++ b/src/vapi/types/create_vonage_phone_number_dto.py @@ -1,80 +1,82 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions import typing -from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server -class CreateVonagePhoneNumberDto(UniversalBaseModel): +class CreateVonagePhoneNumberDto(UncheckedBaseModel): fallback_destination: typing_extensions.Annotated[ - typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], FieldMetadata(alias="fallbackDestination") - ] = pydantic.Field(default=None) + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field( + alias="fallbackDestination", + description="This is the fallback destination an inbound call will be transferred to if:\n1. `assistantId` is not set\n2. `squadId` is not set\n3. and, `assistant-request` message to the `serverUrl` fails\n\nIf this is not set and above conditions are met, the inbound call is hung up with an error message.", + ), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = pydantic.Field(default=None) """ - This is the fallback destination an inbound call will be transferred to if: - - 1. `assistantId` is not set - 2. `squadId` is not set - 3. and, `assistant-request` message to the `serverUrl` fails - - If this is not set and above conditions are met, the inbound call is hung up with an error message. + This is the hooks that will be used for incoming calls to this phone number. """ - provider: typing.Literal["vonage"] = "vonage" number: str = pydantic.Field() """ These are the digits of the phone number you own on your Vonage. """ - credential_id: typing_extensions.Annotated[str, FieldMetadata(alias="credentialId")] = pydantic.Field() - """ - This is the credential that is used to make outgoing calls, and do operations like call transfer and hang up. - """ - + credential_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="credentialId"), + pydantic.Field( + alias="credentialId", + description="This is the credential you added in dashboard.vapi.ai/keys. This is used to configure the number to send inbound calls to Vapi, make outbound calls and do live call updates like transfers and hangups.", + ), + ] name: typing.Optional[str] = pydantic.Field(default=None) """ This is the name of the phone number. This is just for your own reference. """ - assistant_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="assistantId")] = ( - pydantic.Field(default=None) - ) - """ - This is the assistant that will be used for incoming calls to this phone number. + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assistantId"), + pydantic.Field( + alias="assistantId", + description="This is the assistant that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="workflowId"), + pydantic.Field( + alias="workflowId", + description="This is the workflow that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="squadId"), + pydantic.Field( + alias="squadId", + description="This is the squad that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + server: typing.Optional[Server] = pydantic.Field(default=None) + """ + This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema. - If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected. - """ - - squad_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="squadId")] = pydantic.Field( - default=None - ) - """ - This is the squad that will be used for incoming calls to this phone number. - - If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected. - """ - - server_url: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="serverUrl")] = pydantic.Field( - default=None - ) - """ - This is the server URL where messages will be sent for calls on this number. This includes the `assistant-request` message. - - You can see the shape of the messages sent in `ServerMessage`. - - This overrides the `org.serverUrl`. Order of precedence: tool.server.url > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl. - """ - - server_url_secret: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="serverUrlSecret")] = ( - pydantic.Field(default=None) - ) - """ - This is the secret Vapi will send with every message to your server. It's sent as a header called x-vapi-secret. + The order of precedence is: - Same precedence logic as serverUrl. + 1. assistant.server + 2. phoneNumber.server + 3. org.server """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/create_vonage_phone_number_dto_fallback_destination.py b/src/vapi/types/create_vonage_phone_number_dto_fallback_destination.py index c04cd6c8..2e87ecf0 100644 --- a/src/vapi/types/create_vonage_phone_number_dto_fallback_destination.py +++ b/src/vapi/types/create_vonage_phone_number_dto_fallback_destination.py @@ -1,7 +1,95 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .transfer_destination_number import TransferDestinationNumber -from .transfer_destination_sip import TransferDestinationSip -CreateVonagePhoneNumberDtoFallbackDestination = typing.Union[TransferDestinationNumber, TransferDestinationSip] +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .transfer_destination_number_message import TransferDestinationNumberMessage +from .transfer_destination_sip_message import TransferDestinationSipMessage +from .transfer_plan import TransferPlan + + +class CreateVonagePhoneNumberDtoFallbackDestination_Number(UncheckedBaseModel): + """ + This is the fallback destination an inbound call will be transferred to if: + 1. `assistantId` is not set + 2. `squadId` is not set + 3. and, `assistant-request` message to the `serverUrl` fails + + If this is not set and above conditions are met, the inbound call is hung up with an error message. + """ + + type: typing.Literal["number"] = "number" + message: typing.Optional[TransferDestinationNumberMessage] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: str + extension: typing.Optional[str] = None + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateVonagePhoneNumberDtoFallbackDestination_Sip(UncheckedBaseModel): + """ + This is the fallback destination an inbound call will be transferred to if: + 1. `assistantId` is not set + 2. `squadId` is not set + 3. and, `assistant-request` message to the `serverUrl` fails + + If this is not set and above conditions are met, the inbound call is hung up with an error message. + """ + + type: typing.Literal["sip"] = "sip" + message: typing.Optional[TransferDestinationSipMessage] = None + sip_uri: typing_extensions.Annotated[str, FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri")] + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + sip_headers: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="sipHeaders"), + pydantic.Field(alias="sipHeaders"), + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateVonagePhoneNumberDtoFallbackDestination = typing_extensions.Annotated[ + typing.Union[ + CreateVonagePhoneNumberDtoFallbackDestination_Number, CreateVonagePhoneNumberDtoFallbackDestination_Sip + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/create_vonage_phone_number_dto_hooks_item.py b/src/vapi/types/create_vonage_phone_number_dto_hooks_item.py new file mode 100644 index 00000000..c8b613cb --- /dev/null +++ b/src/vapi/types/create_vonage_phone_number_dto_hooks_item.py @@ -0,0 +1,50 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .phone_number_call_ending_hook_filter import PhoneNumberCallEndingHookFilter +from .phone_number_call_ringing_hook_filter import PhoneNumberCallRingingHookFilter +from .phone_number_hook_call_ending_do import PhoneNumberHookCallEndingDo +from .phone_number_hook_call_ringing_do_item import PhoneNumberHookCallRingingDoItem + + +class CreateVonagePhoneNumberDtoHooksItem_CallRinging(UncheckedBaseModel): + on: typing.Literal["call.ringing"] = "call.ringing" + filters: typing.Optional[typing.List[PhoneNumberCallRingingHookFilter]] = None + do: typing.List[PhoneNumberHookCallRingingDoItem] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateVonagePhoneNumberDtoHooksItem_CallEnding(UncheckedBaseModel): + on: typing.Literal["call.ending"] = "call.ending" + filters: typing.Optional[typing.List[PhoneNumberCallEndingHookFilter]] = None + do: typing.Optional[PhoneNumberHookCallEndingDo] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateVonagePhoneNumberDtoHooksItem = typing_extensions.Annotated[ + typing.Union[CreateVonagePhoneNumberDtoHooksItem_CallRinging, CreateVonagePhoneNumberDtoHooksItem_CallEnding], + UnionMetadata(discriminant="on"), +] diff --git a/src/vapi/types/create_web_call_dto.py b/src/vapi/types/create_web_call_dto.py index 0ba28ee2..831ffd2f 100644 --- a/src/vapi/types/create_web_call_dto.py +++ b/src/vapi/types/create_web_call_dto.py @@ -1,52 +1,102 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -from .callback_step import CallbackStep -from .create_workflow_block_dto import CreateWorkflowBlockDto -from .handoff_step import HandoffStep -import typing_extensions + import typing -from ..core.serialization import FieldMetadata -import pydantic -from .create_assistant_dto import CreateAssistantDto -from .assistant_overrides import AssistantOverrides -from .create_squad_dto import CreateSquadDto -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.pydantic_utilities import update_forward_refs +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_workflow_dto import CreateWorkflowDto +from .workflow_overrides import WorkflowOverrides -class CreateWebCallDto(UniversalBaseModel): - assistant_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="assistantId")] = ( - pydantic.Field(default=None) - ) - """ - This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead. - """ - assistant: typing.Optional[CreateAssistantDto] = pydantic.Field(default=None) +class CreateWebCallDto(UncheckedBaseModel): + room_delete_on_user_leave_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="roomDeleteOnUserLeaveEnabled"), + pydantic.Field(alias="roomDeleteOnUserLeaveEnabled"), + ] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assistantId"), + pydantic.Field( + alias="assistantId", + description="This is the assistant ID that will be used for the call. To use a transient assistant, use `assistant` instead.\n\nTo start a call with:\n- Assistant, use `assistantId` or `assistant`\n- Squad, use `squadId` or `squad`\n- Workflow, use `workflowId` or `workflow`", + ), + ] = None + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) """ This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. + + To start a call with: + - Assistant, use `assistant` + - Squad, use `squad` + - Workflow, use `workflow` """ assistant_overrides: typing_extensions.Annotated[ - typing.Optional[AssistantOverrides], FieldMetadata(alias="assistantOverrides") - ] = pydantic.Field(default=None) + typing.Optional["AssistantOverrides"], + FieldMetadata(alias="assistantOverrides"), + pydantic.Field( + alias="assistantOverrides", + description="These are the overrides for the `assistant` or `assistantId`'s settings and template variables.", + ), + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="squadId"), + pydantic.Field( + alias="squadId", + description="This is the squad that will be used for the call. To use a transient squad, use `squad` instead.\n\nTo start a call with:\n- Assistant, use `assistant` or `assistantId`\n- Squad, use `squad` or `squadId`\n- Workflow, use `workflow` or `workflowId`", + ), + ] = None + squad: typing.Optional["CreateSquadDto"] = pydantic.Field(default=None) """ - These are the overrides for the `assistant` or `assistantId`'s settings and template variables. + This is a squad that will be used for the call. To use an existing squad, use `squadId` instead. + + To start a call with: + - Assistant, use `assistant` or `assistantId` + - Squad, use `squad` or `squadId` + - Workflow, use `workflow` or `workflowId` """ - squad_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="squadId")] = pydantic.Field( - default=None - ) + squad_overrides: typing_extensions.Annotated[ + typing.Optional["AssistantOverrides"], + FieldMetadata(alias="squadOverrides"), + pydantic.Field( + alias="squadOverrides", + description="These are the overrides for the `squad` or `squadId`'s member settings and template variables.\nThis will apply to all members of the squad.", + ), + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="workflowId"), + pydantic.Field( + alias="workflowId", + description="This is the workflow that will be used for the call. To use a transient workflow, use `workflow` instead.\n\nTo start a call with:\n- Assistant, use `assistant` or `assistantId`\n- Squad, use `squad` or `squadId`\n- Workflow, use `workflow` or `workflowId`", + ), + ] = None + workflow: typing.Optional[CreateWorkflowDto] = pydantic.Field(default=None) """ - This is the squad that will be used for the call. To use a transient squad, use `squad` instead. + This is a workflow that will be used for the call. To use an existing workflow, use `workflowId` instead. + + To start a call with: + - Assistant, use `assistant` or `assistantId` + - Squad, use `squad` or `squadId` + - Workflow, use `workflow` or `workflowId` """ - squad: typing.Optional[CreateSquadDto] = pydantic.Field(default=None) - """ - This is a squad that will be used for the call. To use an existing squad, use `squadId` instead. - """ + workflow_overrides: typing_extensions.Annotated[ + typing.Optional[WorkflowOverrides], + FieldMetadata(alias="workflowOverrides"), + pydantic.Field( + alias="workflowOverrides", + description="These are the overrides for the `workflow` or `workflowId`'s settings and template variables.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -58,6 +108,121 @@ class Config: extra = pydantic.Extra.allow -update_forward_refs(CallbackStep, CreateWebCallDto=CreateWebCallDto) -update_forward_refs(CreateWorkflowBlockDto, CreateWebCallDto=CreateWebCallDto) -update_forward_refs(HandoffStep, CreateWebCallDto=CreateWebCallDto) +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + CreateWebCallDto, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/create_web_chat_dto.py b/src/vapi/types/create_web_chat_dto.py new file mode 100644 index 00000000..d4ea2f3f --- /dev/null +++ b/src/vapi/types/create_web_chat_dto.py @@ -0,0 +1,209 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .chat_assistant_overrides import ChatAssistantOverrides +from .create_web_chat_dto_input import CreateWebChatDtoInput +from .create_web_customer_dto import CreateWebCustomerDto + + +class CreateWebChatDto(UncheckedBaseModel): + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assistantId"), + pydantic.Field( + alias="assistantId", + description="This is the assistant ID to use for this chat. To use a transient assistant, use `assistant` instead.", + ), + ] = None + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) + """ + This is the transient assistant configuration for this chat. To use an existing assistant, use `assistantId` instead. + """ + + session_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="sessionId"), + pydantic.Field( + alias="sessionId", + description="This is the ID of the session that will be used for the chat.\nIf provided, the conversation will continue from the previous state.\nIf not provided or expired, a new session will be created.", + ), + ] = None + session_expiration_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="sessionExpirationSeconds"), + pydantic.Field( + alias="sessionExpirationSeconds", + description="This is the expiration time for the session. This can ONLY be set if starting a new chat and therefore a new session is created.\nIf session already exists, this will be ignored and NOT be updated for the existing session. Use PATCH /session/:id to update the session expiration time.", + ), + ] = None + assistant_overrides: typing_extensions.Annotated[ + typing.Optional[ChatAssistantOverrides], + FieldMetadata(alias="assistantOverrides"), + pydantic.Field( + alias="assistantOverrides", + description="These are the variable values that will be used to replace template variables in the assistant messages.\nOnly variable substitution is supported in web chat - other assistant properties cannot be overridden.", + ), + ] = None + customer: typing.Optional[CreateWebCustomerDto] = pydantic.Field(default=None) + """ + This is the customer information for the chat. + Used to automatically manage sessions for repeat customers. + """ + + input: CreateWebChatDtoInput = pydantic.Field() + """ + This is the input text for the chat. + Can be a string or an array of chat messages. + """ + + stream: typing.Optional[bool] = pydantic.Field(default=None) + """ + This is a flag that determines whether the response should be streamed. + When true, the response will be sent as chunks of text. + """ + + session_end: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="sessionEnd"), + pydantic.Field( + alias="sessionEnd", + description="This is a flag to indicate end of session. When true, the session will be marked as completed and the chat will be ended.\nUsed to end session to send End-of-session report to the customer.\nWhen flag is set to true, any messages sent will not be processed and session will directly be marked as completed.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + CreateWebChatDto, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/create_web_chat_dto_input.py b/src/vapi/types/create_web_chat_dto_input.py new file mode 100644 index 00000000..bce48239 --- /dev/null +++ b/src/vapi/types/create_web_chat_dto_input.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .create_web_chat_dto_input_one_item import CreateWebChatDtoInputOneItem + +CreateWebChatDtoInput = typing.Union[str, typing.List[CreateWebChatDtoInputOneItem]] diff --git a/src/vapi/types/create_web_chat_dto_input_one_item.py b/src/vapi/types/create_web_chat_dto_input_one_item.py new file mode 100644 index 00000000..3065b0d7 --- /dev/null +++ b/src/vapi/types/create_web_chat_dto_input_one_item.py @@ -0,0 +1,11 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .assistant_message import AssistantMessage +from .developer_message import DeveloperMessage +from .system_message import SystemMessage +from .tool_message import ToolMessage +from .user_message import UserMessage + +CreateWebChatDtoInputOneItem = typing.Union[SystemMessage, UserMessage, AssistantMessage, ToolMessage, DeveloperMessage] diff --git a/src/vapi/types/create_web_customer_dto.py b/src/vapi/types/create_web_customer_dto.py new file mode 100644 index 00000000..ef2f5483 --- /dev/null +++ b/src/vapi/types/create_web_customer_dto.py @@ -0,0 +1,70 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .chat_assistant_overrides import ChatAssistantOverrides + + +class CreateWebCustomerDto(UncheckedBaseModel): + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field( + alias="numberE164CheckEnabled", + description="This is the flag to toggle the E164 check for the `number` field. This is an advanced property which should be used if you know your use case requires it.\n\nUse cases:\n- `false`: To allow non-E164 numbers like `+001234567890`, `1234`, or `abc`. This is useful for dialing out to non-E164 numbers on your SIP trunks.\n- `true` (default): To allow only E164 numbers like `+14155551234`. This is standard for PSTN calls.\n\nIf `false`, the `number` is still required to only contain alphanumeric characters (regex: `/^\\+?[a-zA-Z0-9]+$/`).\n\n@default true (E164 check is enabled)", + ), + ] = None + extension: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the extension that will be dialed after the call is answered. + """ + + assistant_overrides: typing_extensions.Annotated[ + typing.Optional[ChatAssistantOverrides], + FieldMetadata(alias="assistantOverrides"), + pydantic.Field( + alias="assistantOverrides", + description="These are the variable values that will be used to replace template variables in the assistant messages.\nOnly variable substitution is supported in web chat - other assistant properties cannot be overridden.", + ), + ] = None + number: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the number of the customer. + """ + + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="sipUri"), + pydantic.Field(alias="sipUri", description="This is the SIP URI of the customer."), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the customer. This is just for your own reference. + + For SIP inbound calls, this is extracted from the `From` SIP header with format `"Display Name" `. + """ + + email: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the email of the customer. + """ + + external_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="externalId"), + pydantic.Field(alias="externalId", description="This is the external ID of the customer."), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_webhook_credential_dto.py b/src/vapi/types/create_webhook_credential_dto.py new file mode 100644 index 00000000..93618d69 --- /dev/null +++ b/src/vapi/types/create_webhook_credential_dto.py @@ -0,0 +1,34 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_webhook_credential_dto_authentication_plan import CreateWebhookCredentialDtoAuthenticationPlan + + +class CreateWebhookCredentialDto(UncheckedBaseModel): + authentication_plan: typing_extensions.Annotated[ + CreateWebhookCredentialDtoAuthenticationPlan, + FieldMetadata(alias="authenticationPlan"), + pydantic.Field( + alias="authenticationPlan", + description="This is the authentication plan. Supports OAuth2 RFC 6749, HMAC signing, and Bearer authentication.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_webhook_credential_dto_authentication_plan.py b/src/vapi/types/create_webhook_credential_dto_authentication_plan.py new file mode 100644 index 00000000..b86d037a --- /dev/null +++ b/src/vapi/types/create_webhook_credential_dto_authentication_plan.py @@ -0,0 +1,115 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .hmac_authentication_plan_algorithm import HmacAuthenticationPlanAlgorithm +from .hmac_authentication_plan_signature_encoding import HmacAuthenticationPlanSignatureEncoding + + +class CreateWebhookCredentialDtoAuthenticationPlan_Oauth2(UncheckedBaseModel): + """ + This is the authentication plan. Supports OAuth2 RFC 6749, HMAC signing, and Bearer authentication. + """ + + type: typing.Literal["oauth2"] = "oauth2" + url: str + client_id: typing_extensions.Annotated[str, FieldMetadata(alias="clientId"), pydantic.Field(alias="clientId")] + client_secret: typing_extensions.Annotated[ + str, FieldMetadata(alias="clientSecret"), pydantic.Field(alias="clientSecret") + ] + scope: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWebhookCredentialDtoAuthenticationPlan_Hmac(UncheckedBaseModel): + """ + This is the authentication plan. Supports OAuth2 RFC 6749, HMAC signing, and Bearer authentication. + """ + + type: typing.Literal["hmac"] = "hmac" + secret_key: typing_extensions.Annotated[str, FieldMetadata(alias="secretKey"), pydantic.Field(alias="secretKey")] + algorithm: HmacAuthenticationPlanAlgorithm + signature_header: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="signatureHeader"), pydantic.Field(alias="signatureHeader") + ] = None + timestamp_header: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="timestampHeader"), pydantic.Field(alias="timestampHeader") + ] = None + signature_prefix: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="signaturePrefix"), pydantic.Field(alias="signaturePrefix") + ] = None + include_timestamp: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="includeTimestamp"), pydantic.Field(alias="includeTimestamp") + ] = None + payload_format: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="payloadFormat"), pydantic.Field(alias="payloadFormat") + ] = None + message_id_header: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="messageIdHeader"), pydantic.Field(alias="messageIdHeader") + ] = None + signature_encoding: typing_extensions.Annotated[ + typing.Optional[HmacAuthenticationPlanSignatureEncoding], + FieldMetadata(alias="signatureEncoding"), + pydantic.Field(alias="signatureEncoding"), + ] = None + secret_is_base_64: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="secretIsBase64"), pydantic.Field(alias="secretIsBase64") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWebhookCredentialDtoAuthenticationPlan_Bearer(UncheckedBaseModel): + """ + This is the authentication plan. Supports OAuth2 RFC 6749, HMAC signing, and Bearer authentication. + """ + + type: typing.Literal["bearer"] = "bearer" + token: str + header_name: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="headerName"), pydantic.Field(alias="headerName") + ] = None + bearer_prefix_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="bearerPrefixEnabled"), pydantic.Field(alias="bearerPrefixEnabled") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateWebhookCredentialDtoAuthenticationPlan = typing_extensions.Annotated[ + typing.Union[ + CreateWebhookCredentialDtoAuthenticationPlan_Oauth2, + CreateWebhookCredentialDtoAuthenticationPlan_Hmac, + CreateWebhookCredentialDtoAuthenticationPlan_Bearer, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/create_well_said_credential_dto.py b/src/vapi/types/create_well_said_credential_dto.py new file mode 100644 index 00000000..e58a0859 --- /dev/null +++ b/src/vapi/types/create_well_said_credential_dto.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class CreateWellSaidCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/create_workflow_block_dto.py b/src/vapi/types/create_workflow_block_dto.py deleted file mode 100644 index 670aa235..00000000 --- a/src/vapi/types/create_workflow_block_dto.py +++ /dev/null @@ -1,78 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -import typing -from .create_workflow_block_dto_messages_item import CreateWorkflowBlockDtoMessagesItem -import pydantic -import typing_extensions -from .json_schema import JsonSchema -from ..core.serialization import FieldMetadata -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.pydantic_utilities import update_forward_refs - - -class CreateWorkflowBlockDto(UniversalBaseModel): - messages: typing.Optional[typing.List[CreateWorkflowBlockDtoMessagesItem]] = pydantic.Field(default=None) - """ - These are the pre-configured messages that will be spoken to the user while the block is running. - """ - - input_schema: typing_extensions.Annotated[typing.Optional[JsonSchema], FieldMetadata(alias="inputSchema")] = ( - pydantic.Field(default=None) - ) - """ - This is the input schema for the block. This is the input the block needs to run. It's given to the block as `steps[0].input` - - These are accessible as variables: - - - ({{input.propertyName}}) in context of the block execution (step) - - ({{stepName.input.propertyName}}) in context of the workflow - """ - - output_schema: typing_extensions.Annotated[typing.Optional[JsonSchema], FieldMetadata(alias="outputSchema")] = ( - pydantic.Field(default=None) - ) - """ - This is the output schema for the block. This is the output the block will return to the workflow (`{{stepName.output}}`). - - These are accessible as variables: - - - ({{output.propertyName}}) in context of the block execution (step) - - ({{stepName.output.propertyName}}) in context of the workflow (read caveat #1) - - ({{blockName.output.propertyName}}) in context of the workflow (read caveat #2) - - Caveats: - - 1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.output.propertyName}} will reference the latest usage of the step. - 2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.output.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow with steps. - """ - - type: typing.Literal["workflow"] = "workflow" - steps: typing.Optional[typing.List["CreateWorkflowBlockDtoStepsItem"]] = pydantic.Field(default=None) - """ - These are the steps in the workflow. - """ - - name: typing.Optional[str] = pydantic.Field(default=None) - """ - This is the name of the block. This is just for your reference. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .callback_step import CallbackStep # noqa: E402 -from .handoff_step import HandoffStep # noqa: E402 -from .create_workflow_block_dto_steps_item import CreateWorkflowBlockDtoStepsItem # noqa: E402 - -update_forward_refs(CallbackStep, CreateWorkflowBlockDto=CreateWorkflowBlockDto) -update_forward_refs(HandoffStep, CreateWorkflowBlockDto=CreateWorkflowBlockDto) -update_forward_refs(CreateWorkflowBlockDto) diff --git a/src/vapi/types/create_workflow_block_dto_messages_item.py b/src/vapi/types/create_workflow_block_dto_messages_item.py deleted file mode 100644 index ee845b76..00000000 --- a/src/vapi/types/create_workflow_block_dto_messages_item.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from .block_start_message import BlockStartMessage -from .block_complete_message import BlockCompleteMessage - -CreateWorkflowBlockDtoMessagesItem = typing.Union[BlockStartMessage, BlockCompleteMessage] diff --git a/src/vapi/types/create_workflow_block_dto_steps_item.py b/src/vapi/types/create_workflow_block_dto_steps_item.py deleted file mode 100644 index 0483aca1..00000000 --- a/src/vapi/types/create_workflow_block_dto_steps_item.py +++ /dev/null @@ -1,10 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations -import typing -import typing - -if typing.TYPE_CHECKING: - from .handoff_step import HandoffStep - from .callback_step import CallbackStep -CreateWorkflowBlockDtoStepsItem = typing.Union["HandoffStep", "CallbackStep"] diff --git a/src/vapi/types/create_workflow_dto.py b/src/vapi/types/create_workflow_dto.py new file mode 100644 index 00000000..8d0d6a6d --- /dev/null +++ b/src/vapi/types/create_workflow_dto.py @@ -0,0 +1,204 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .analysis_plan import AnalysisPlan +from .artifact_plan import ArtifactPlan +from .background_speech_denoising_plan import BackgroundSpeechDenoisingPlan +from .compliance_plan import CompliancePlan +from .create_workflow_dto_background_sound import CreateWorkflowDtoBackgroundSound +from .create_workflow_dto_credentials_item import CreateWorkflowDtoCredentialsItem +from .create_workflow_dto_hooks_item import CreateWorkflowDtoHooksItem +from .create_workflow_dto_model import CreateWorkflowDtoModel +from .create_workflow_dto_nodes_item import CreateWorkflowDtoNodesItem +from .create_workflow_dto_transcriber import CreateWorkflowDtoTranscriber +from .create_workflow_dto_voice import CreateWorkflowDtoVoice +from .create_workflow_dto_voicemail_detection import CreateWorkflowDtoVoicemailDetection +from .edge import Edge +from .keypad_input_plan import KeypadInputPlan +from .langfuse_observability_plan import LangfuseObservabilityPlan +from .monitor_plan import MonitorPlan +from .server import Server +from .start_speaking_plan import StartSpeakingPlan +from .stop_speaking_plan import StopSpeakingPlan + + +class CreateWorkflowDto(UncheckedBaseModel): + nodes: typing.List[CreateWorkflowDtoNodesItem] + model: typing.Optional[CreateWorkflowDtoModel] = pydantic.Field(default=None) + """ + This is the model for the workflow. + + This can be overridden at node level using `nodes[n].model`. + """ + + transcriber: typing.Optional[CreateWorkflowDtoTranscriber] = pydantic.Field(default=None) + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + voice: typing.Optional[CreateWorkflowDtoVoice] = pydantic.Field(default=None) + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + observability_plan: typing_extensions.Annotated[ + typing.Optional[LangfuseObservabilityPlan], + FieldMetadata(alias="observabilityPlan"), + pydantic.Field( + alias="observabilityPlan", + description="This is the plan for observability of workflow's calls.\n\nCurrently, only Langfuse is supported.", + ), + ] = None + background_sound: typing_extensions.Annotated[ + typing.Optional[CreateWorkflowDtoBackgroundSound], + FieldMetadata(alias="backgroundSound"), + pydantic.Field( + alias="backgroundSound", + description="This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'.\nYou can also provide a custom sound by providing a URL to an audio file.", + ), + ] = None + hooks: typing.Optional[typing.List[CreateWorkflowDtoHooksItem]] = pydantic.Field(default=None) + """ + This is a set of actions that will be performed on certain events. + """ + + credentials: typing.Optional[typing.List[CreateWorkflowDtoCredentialsItem]] = pydantic.Field(default=None) + """ + These are dynamic credentials that will be used for the workflow calls. By default, all the credentials are available for use in the call but you can supplement an additional credentials using this. Dynamic credentials override existing credentials. + """ + + voicemail_detection: typing_extensions.Annotated[ + typing.Optional[CreateWorkflowDtoVoicemailDetection], + FieldMetadata(alias="voicemailDetection"), + pydantic.Field( + alias="voicemailDetection", description="This is the voicemail detection plan for the workflow." + ), + ] = None + max_duration_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="maxDurationSeconds"), + pydantic.Field( + alias="maxDurationSeconds", + description="This is the maximum duration of the call in seconds.\n\nAfter this duration, the call will automatically end.\n\nDefault is 1800 (30 minutes), max is 43200 (12 hours), and min is 10 seconds.", + ), + ] = None + name: str + edges: typing.List[Edge] + global_prompt: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="globalPrompt"), pydantic.Field(alias="globalPrompt") + ] = None + server: typing.Optional[Server] = pydantic.Field(default=None) + """ + This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema. + + The order of precedence is: + + 1. tool.server + 2. workflow.server / assistant.server + 3. phoneNumber.server + 4. org.server + """ + + compliance_plan: typing_extensions.Annotated[ + typing.Optional[CompliancePlan], + FieldMetadata(alias="compliancePlan"), + pydantic.Field( + alias="compliancePlan", + description="This is the compliance plan for the workflow. It allows you to configure HIPAA and other compliance settings.", + ), + ] = None + analysis_plan: typing_extensions.Annotated[ + typing.Optional[AnalysisPlan], + FieldMetadata(alias="analysisPlan"), + pydantic.Field( + alias="analysisPlan", + description="This is the plan for analysis of workflow's calls. Stored in `call.analysis`.", + ), + ] = None + artifact_plan: typing_extensions.Annotated[ + typing.Optional[ArtifactPlan], + FieldMetadata(alias="artifactPlan"), + pydantic.Field( + alias="artifactPlan", + description="This is the plan for artifacts generated during workflow's calls. Stored in `call.artifact`.", + ), + ] = None + start_speaking_plan: typing_extensions.Annotated[ + typing.Optional[StartSpeakingPlan], + FieldMetadata(alias="startSpeakingPlan"), + pydantic.Field( + alias="startSpeakingPlan", + description="This is the plan for when the workflow nodes should start talking.\n\nYou should configure this if you're running into these issues:\n- The assistant is too slow to start talking after the customer is done speaking.\n- The assistant is too fast to start talking after the customer is done speaking.\n- The assistant is so fast that it's actually interrupting the customer.", + ), + ] = None + stop_speaking_plan: typing_extensions.Annotated[ + typing.Optional[StopSpeakingPlan], + FieldMetadata(alias="stopSpeakingPlan"), + pydantic.Field( + alias="stopSpeakingPlan", + description="This is the plan for when workflow nodes should stop talking on customer interruption.\n\nYou should configure this if you're running into these issues:\n- The assistant is too slow to recognize customer's interruption.\n- The assistant is too fast to recognize customer's interruption.\n- The assistant is getting interrupted by phrases that are just acknowledgments.\n- The assistant is getting interrupted by background noises.\n- The assistant is not properly stopping -- it starts talking right after getting interrupted.", + ), + ] = None + monitor_plan: typing_extensions.Annotated[ + typing.Optional[MonitorPlan], + FieldMetadata(alias="monitorPlan"), + pydantic.Field( + alias="monitorPlan", + description="This is the plan for real-time monitoring of the workflow's calls.\n\nUsage:\n- To enable live listening of the workflow's calls, set `monitorPlan.listenEnabled` to `true`.\n- To enable live control of the workflow's calls, set `monitorPlan.controlEnabled` to `true`.", + ), + ] = None + background_speech_denoising_plan: typing_extensions.Annotated[ + typing.Optional[BackgroundSpeechDenoisingPlan], + FieldMetadata(alias="backgroundSpeechDenoisingPlan"), + pydantic.Field( + alias="backgroundSpeechDenoisingPlan", + description="This enables filtering of noise and background speech while the user is talking.\n\nFeatures:\n- Smart denoising using Krisp\n- Fourier denoising\n\nBoth can be used together. Order of precedence:\n- Smart denoising\n- Fourier denoising", + ), + ] = None + credential_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="credentialIds"), + pydantic.Field( + alias="credentialIds", + description="These are the credentials that will be used for the workflow calls. By default, all the credentials are available for use in the call but you can provide a subset using this.", + ), + ] = None + keypad_input_plan: typing_extensions.Annotated[ + typing.Optional[KeypadInputPlan], + FieldMetadata(alias="keypadInputPlan"), + pydantic.Field( + alias="keypadInputPlan", description="This is the plan for keypad input handling during workflow calls." + ), + ] = None + voicemail_message: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="voicemailMessage"), + pydantic.Field( + alias="voicemailMessage", + description="This is the message that the assistant will say if the call is forwarded to voicemail.\n\nIf unspecified, it will hang up.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(CreateWorkflowDto) diff --git a/src/vapi/types/create_workflow_dto_background_sound.py b/src/vapi/types/create_workflow_dto_background_sound.py new file mode 100644 index 00000000..c3251bb2 --- /dev/null +++ b/src/vapi/types/create_workflow_dto_background_sound.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .create_workflow_dto_background_sound_zero import CreateWorkflowDtoBackgroundSoundZero + +CreateWorkflowDtoBackgroundSound = typing.Union[CreateWorkflowDtoBackgroundSoundZero, str] diff --git a/src/vapi/types/create_workflow_dto_background_sound_zero.py b/src/vapi/types/create_workflow_dto_background_sound_zero.py new file mode 100644 index 00000000..8818aabb --- /dev/null +++ b/src/vapi/types/create_workflow_dto_background_sound_zero.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CreateWorkflowDtoBackgroundSoundZero = typing.Union[typing.Literal["off", "office"], typing.Any] diff --git a/src/vapi/types/create_workflow_dto_credentials_item.py b/src/vapi/types/create_workflow_dto_credentials_item.py new file mode 100644 index 00000000..5dcc2800 --- /dev/null +++ b/src/vapi/types/create_workflow_dto_credentials_item.py @@ -0,0 +1,1070 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .azure_blob_storage_bucket_plan import AzureBlobStorageBucketPlan +from .bucket_plan import BucketPlan +from .cloudflare_r_2_bucket_plan import CloudflareR2BucketPlan +from .create_anthropic_bedrock_credential_dto_authentication_plan import ( + CreateAnthropicBedrockCredentialDtoAuthenticationPlan, +) +from .create_anthropic_bedrock_credential_dto_region import CreateAnthropicBedrockCredentialDtoRegion +from .create_azure_credential_dto_region import CreateAzureCredentialDtoRegion +from .create_azure_credential_dto_service import CreateAzureCredentialDtoService +from .create_azure_open_ai_credential_dto_models_item import CreateAzureOpenAiCredentialDtoModelsItem +from .create_azure_open_ai_credential_dto_region import CreateAzureOpenAiCredentialDtoRegion +from .create_custom_credential_dto_authentication_plan import CreateCustomCredentialDtoAuthenticationPlan +from .create_custom_credential_dto_encryption_plan import CreateCustomCredentialDtoEncryptionPlan +from .create_webhook_credential_dto_authentication_plan import CreateWebhookCredentialDtoAuthenticationPlan +from .gcp_key import GcpKey +from .o_auth_2_authentication_plan import OAuth2AuthenticationPlan +from .oauth_2_authentication_session import Oauth2AuthenticationSession +from .sbc_configuration import SbcConfiguration +from .sip_trunk_gateway import SipTrunkGateway +from .sip_trunk_outbound_authentication_plan import SipTrunkOutboundAuthenticationPlan +from .supabase_bucket_plan import SupabaseBucketPlan + + +class CreateWorkflowDtoCredentialsItem_11Labs(UncheckedBaseModel): + provider: typing.Literal["11labs"] = "11labs" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_Anthropic(UncheckedBaseModel): + provider: typing.Literal["anthropic"] = "anthropic" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_AnthropicBedrock(UncheckedBaseModel): + provider: typing.Literal["anthropic-bedrock"] = "anthropic-bedrock" + region: CreateAnthropicBedrockCredentialDtoRegion + authentication_plan: typing_extensions.Annotated[ + CreateAnthropicBedrockCredentialDtoAuthenticationPlan, + FieldMetadata(alias="authenticationPlan"), + pydantic.Field(alias="authenticationPlan"), + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_Anyscale(UncheckedBaseModel): + provider: typing.Literal["anyscale"] = "anyscale" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_AssemblyAi(UncheckedBaseModel): + provider: typing.Literal["assembly-ai"] = "assembly-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_AzureOpenai(UncheckedBaseModel): + provider: typing.Literal["azure-openai"] = "azure-openai" + region: CreateAzureOpenAiCredentialDtoRegion + models: typing.List[CreateAzureOpenAiCredentialDtoModelsItem] + open_ai_key: typing_extensions.Annotated[str, FieldMetadata(alias="openAIKey"), pydantic.Field(alias="openAIKey")] + ocp_apim_subscription_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="ocpApimSubscriptionKey"), + pydantic.Field(alias="ocpApimSubscriptionKey"), + ] = None + open_ai_endpoint: typing_extensions.Annotated[ + str, FieldMetadata(alias="openAIEndpoint"), pydantic.Field(alias="openAIEndpoint") + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_Azure(UncheckedBaseModel): + provider: typing.Literal["azure"] = "azure" + service: CreateAzureCredentialDtoService + region: typing.Optional[CreateAzureCredentialDtoRegion] = None + api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey") + ] = None + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="fallbackIndex"), pydantic.Field(alias="fallbackIndex") + ] = None + bucket_plan: typing_extensions.Annotated[ + typing.Optional[AzureBlobStorageBucketPlan], + FieldMetadata(alias="bucketPlan"), + pydantic.Field(alias="bucketPlan"), + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_ByoSipTrunk(UncheckedBaseModel): + provider: typing.Literal["byo-sip-trunk"] = "byo-sip-trunk" + gateways: typing.List[SipTrunkGateway] + outbound_authentication_plan: typing_extensions.Annotated[ + typing.Optional[SipTrunkOutboundAuthenticationPlan], + FieldMetadata(alias="outboundAuthenticationPlan"), + pydantic.Field(alias="outboundAuthenticationPlan"), + ] = None + outbound_leading_plus_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="outboundLeadingPlusEnabled"), + pydantic.Field(alias="outboundLeadingPlusEnabled"), + ] = None + tech_prefix: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="techPrefix"), pydantic.Field(alias="techPrefix") + ] = None + sip_diversion_header: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipDiversionHeader"), pydantic.Field(alias="sipDiversionHeader") + ] = None + sbc_configuration: typing_extensions.Annotated[ + typing.Optional[SbcConfiguration], + FieldMetadata(alias="sbcConfiguration"), + pydantic.Field(alias="sbcConfiguration"), + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_Cartesia(UncheckedBaseModel): + provider: typing.Literal["cartesia"] = "cartesia" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_Cerebras(UncheckedBaseModel): + provider: typing.Literal["cerebras"] = "cerebras" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_Cloudflare(UncheckedBaseModel): + provider: typing.Literal["cloudflare"] = "cloudflare" + account_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="accountId"), pydantic.Field(alias="accountId") + ] = None + api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey") + ] = None + account_email: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="accountEmail"), pydantic.Field(alias="accountEmail") + ] = None + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="fallbackIndex"), pydantic.Field(alias="fallbackIndex") + ] = None + bucket_plan: typing_extensions.Annotated[ + typing.Optional[CloudflareR2BucketPlan], FieldMetadata(alias="bucketPlan"), pydantic.Field(alias="bucketPlan") + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_CustomLlm(UncheckedBaseModel): + provider: typing.Literal["custom-llm"] = "custom-llm" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + authentication_plan: typing_extensions.Annotated[ + typing.Optional[OAuth2AuthenticationPlan], + FieldMetadata(alias="authenticationPlan"), + pydantic.Field(alias="authenticationPlan"), + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_Deepgram(UncheckedBaseModel): + provider: typing.Literal["deepgram"] = "deepgram" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + api_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="apiUrl"), pydantic.Field(alias="apiUrl") + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_Deepinfra(UncheckedBaseModel): + provider: typing.Literal["deepinfra"] = "deepinfra" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_DeepSeek(UncheckedBaseModel): + provider: typing.Literal["deep-seek"] = "deep-seek" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_Gcp(UncheckedBaseModel): + provider: typing.Literal["gcp"] = "gcp" + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="fallbackIndex"), pydantic.Field(alias="fallbackIndex") + ] = None + gcp_key: typing_extensions.Annotated[GcpKey, FieldMetadata(alias="gcpKey"), pydantic.Field(alias="gcpKey")] + region: typing.Optional[str] = None + bucket_plan: typing_extensions.Annotated[ + typing.Optional[BucketPlan], FieldMetadata(alias="bucketPlan"), pydantic.Field(alias="bucketPlan") + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_Gladia(UncheckedBaseModel): + provider: typing.Literal["gladia"] = "gladia" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_Gohighlevel(UncheckedBaseModel): + provider: typing.Literal["gohighlevel"] = "gohighlevel" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_Google(UncheckedBaseModel): + provider: typing.Literal["google"] = "google" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_Groq(UncheckedBaseModel): + provider: typing.Literal["groq"] = "groq" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_InflectionAi(UncheckedBaseModel): + provider: typing.Literal["inflection-ai"] = "inflection-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_Langfuse(UncheckedBaseModel): + provider: typing.Literal["langfuse"] = "langfuse" + public_key: typing_extensions.Annotated[str, FieldMetadata(alias="publicKey"), pydantic.Field(alias="publicKey")] + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + api_url: typing_extensions.Annotated[str, FieldMetadata(alias="apiUrl"), pydantic.Field(alias="apiUrl")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_Lmnt(UncheckedBaseModel): + provider: typing.Literal["lmnt"] = "lmnt" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_Make(UncheckedBaseModel): + provider: typing.Literal["make"] = "make" + team_id: typing_extensions.Annotated[str, FieldMetadata(alias="teamId"), pydantic.Field(alias="teamId")] + region: str + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_Openai(UncheckedBaseModel): + provider: typing.Literal["openai"] = "openai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_Openrouter(UncheckedBaseModel): + provider: typing.Literal["openrouter"] = "openrouter" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_PerplexityAi(UncheckedBaseModel): + provider: typing.Literal["perplexity-ai"] = "perplexity-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_Playht(UncheckedBaseModel): + provider: typing.Literal["playht"] = "playht" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + user_id: typing_extensions.Annotated[str, FieldMetadata(alias="userId"), pydantic.Field(alias="userId")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_RimeAi(UncheckedBaseModel): + provider: typing.Literal["rime-ai"] = "rime-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_Runpod(UncheckedBaseModel): + provider: typing.Literal["runpod"] = "runpod" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_S3(UncheckedBaseModel): + provider: typing.Literal["s3"] = "s3" + aws_access_key_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="awsAccessKeyId"), pydantic.Field(alias="awsAccessKeyId") + ] + aws_secret_access_key: typing_extensions.Annotated[ + str, FieldMetadata(alias="awsSecretAccessKey"), pydantic.Field(alias="awsSecretAccessKey") + ] + region: str + s_3_bucket_name: typing_extensions.Annotated[ + str, FieldMetadata(alias="s3BucketName"), pydantic.Field(alias="s3BucketName") + ] + s_3_path_prefix: typing_extensions.Annotated[ + str, FieldMetadata(alias="s3PathPrefix"), pydantic.Field(alias="s3PathPrefix") + ] + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="fallbackIndex"), pydantic.Field(alias="fallbackIndex") + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_Supabase(UncheckedBaseModel): + provider: typing.Literal["supabase"] = "supabase" + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="fallbackIndex"), pydantic.Field(alias="fallbackIndex") + ] = None + bucket_plan: typing_extensions.Annotated[ + typing.Optional[SupabaseBucketPlan], FieldMetadata(alias="bucketPlan"), pydantic.Field(alias="bucketPlan") + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_SmallestAi(UncheckedBaseModel): + provider: typing.Literal["smallest-ai"] = "smallest-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_Tavus(UncheckedBaseModel): + provider: typing.Literal["tavus"] = "tavus" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_TogetherAi(UncheckedBaseModel): + provider: typing.Literal["together-ai"] = "together-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_Twilio(UncheckedBaseModel): + provider: typing.Literal["twilio"] = "twilio" + auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="authToken"), pydantic.Field(alias="authToken") + ] = None + api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey") + ] = None + api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="apiSecret"), pydantic.Field(alias="apiSecret") + ] = None + account_sid: typing_extensions.Annotated[str, FieldMetadata(alias="accountSid"), pydantic.Field(alias="accountSid")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_Vonage(UncheckedBaseModel): + provider: typing.Literal["vonage"] = "vonage" + api_secret: typing_extensions.Annotated[str, FieldMetadata(alias="apiSecret"), pydantic.Field(alias="apiSecret")] + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_Webhook(UncheckedBaseModel): + provider: typing.Literal["webhook"] = "webhook" + authentication_plan: typing_extensions.Annotated[ + CreateWebhookCredentialDtoAuthenticationPlan, + FieldMetadata(alias="authenticationPlan"), + pydantic.Field(alias="authenticationPlan"), + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_CustomCredential(UncheckedBaseModel): + provider: typing.Literal["custom-credential"] = "custom-credential" + authentication_plan: typing_extensions.Annotated[ + CreateCustomCredentialDtoAuthenticationPlan, + FieldMetadata(alias="authenticationPlan"), + pydantic.Field(alias="authenticationPlan"), + ] + encryption_plan: typing_extensions.Annotated[ + typing.Optional[CreateCustomCredentialDtoEncryptionPlan], + FieldMetadata(alias="encryptionPlan"), + pydantic.Field(alias="encryptionPlan"), + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_Xai(UncheckedBaseModel): + provider: typing.Literal["xai"] = "xai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_Neuphonic(UncheckedBaseModel): + provider: typing.Literal["neuphonic"] = "neuphonic" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_Hume(UncheckedBaseModel): + provider: typing.Literal["hume"] = "hume" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_Mistral(UncheckedBaseModel): + provider: typing.Literal["mistral"] = "mistral" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_Speechmatics(UncheckedBaseModel): + provider: typing.Literal["speechmatics"] = "speechmatics" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_Soniox(UncheckedBaseModel): + provider: typing.Literal["soniox"] = "soniox" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_Trieve(UncheckedBaseModel): + provider: typing.Literal["trieve"] = "trieve" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_GoogleCalendarOauth2Client(UncheckedBaseModel): + provider: typing.Literal["google.calendar.oauth2-client"] = "google.calendar.oauth2-client" + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_GoogleCalendarOauth2Authorization(UncheckedBaseModel): + provider: typing.Literal["google.calendar.oauth2-authorization"] = "google.calendar.oauth2-authorization" + authorization_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="authorizationId"), pydantic.Field(alias="authorizationId") + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_GoogleSheetsOauth2Authorization(UncheckedBaseModel): + provider: typing.Literal["google.sheets.oauth2-authorization"] = "google.sheets.oauth2-authorization" + authorization_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="authorizationId"), pydantic.Field(alias="authorizationId") + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_SlackOauth2Authorization(UncheckedBaseModel): + provider: typing.Literal["slack.oauth2-authorization"] = "slack.oauth2-authorization" + authorization_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="authorizationId"), pydantic.Field(alias="authorizationId") + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_GhlOauth2Authorization(UncheckedBaseModel): + provider: typing.Literal["ghl.oauth2-authorization"] = "ghl.oauth2-authorization" + authentication_session: typing_extensions.Annotated[ + Oauth2AuthenticationSession, + FieldMetadata(alias="authenticationSession"), + pydantic.Field(alias="authenticationSession"), + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_Inworld(UncheckedBaseModel): + provider: typing.Literal["inworld"] = "inworld" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_Minimax(UncheckedBaseModel): + provider: typing.Literal["minimax"] = "minimax" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + group_id: typing_extensions.Annotated[str, FieldMetadata(alias="groupId"), pydantic.Field(alias="groupId")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_Wellsaid(UncheckedBaseModel): + provider: typing.Literal["wellsaid"] = "wellsaid" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_Email(UncheckedBaseModel): + provider: typing.Literal["email"] = "email" + email: str + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoCredentialsItem_SlackWebhook(UncheckedBaseModel): + provider: typing.Literal["slack-webhook"] = "slack-webhook" + webhook_url: typing_extensions.Annotated[str, FieldMetadata(alias="webhookUrl"), pydantic.Field(alias="webhookUrl")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateWorkflowDtoCredentialsItem = typing_extensions.Annotated[ + typing.Union[ + CreateWorkflowDtoCredentialsItem_11Labs, + CreateWorkflowDtoCredentialsItem_Anthropic, + CreateWorkflowDtoCredentialsItem_AnthropicBedrock, + CreateWorkflowDtoCredentialsItem_Anyscale, + CreateWorkflowDtoCredentialsItem_AssemblyAi, + CreateWorkflowDtoCredentialsItem_AzureOpenai, + CreateWorkflowDtoCredentialsItem_Azure, + CreateWorkflowDtoCredentialsItem_ByoSipTrunk, + CreateWorkflowDtoCredentialsItem_Cartesia, + CreateWorkflowDtoCredentialsItem_Cerebras, + CreateWorkflowDtoCredentialsItem_Cloudflare, + CreateWorkflowDtoCredentialsItem_CustomLlm, + CreateWorkflowDtoCredentialsItem_Deepgram, + CreateWorkflowDtoCredentialsItem_Deepinfra, + CreateWorkflowDtoCredentialsItem_DeepSeek, + CreateWorkflowDtoCredentialsItem_Gcp, + CreateWorkflowDtoCredentialsItem_Gladia, + CreateWorkflowDtoCredentialsItem_Gohighlevel, + CreateWorkflowDtoCredentialsItem_Google, + CreateWorkflowDtoCredentialsItem_Groq, + CreateWorkflowDtoCredentialsItem_InflectionAi, + CreateWorkflowDtoCredentialsItem_Langfuse, + CreateWorkflowDtoCredentialsItem_Lmnt, + CreateWorkflowDtoCredentialsItem_Make, + CreateWorkflowDtoCredentialsItem_Openai, + CreateWorkflowDtoCredentialsItem_Openrouter, + CreateWorkflowDtoCredentialsItem_PerplexityAi, + CreateWorkflowDtoCredentialsItem_Playht, + CreateWorkflowDtoCredentialsItem_RimeAi, + CreateWorkflowDtoCredentialsItem_Runpod, + CreateWorkflowDtoCredentialsItem_S3, + CreateWorkflowDtoCredentialsItem_Supabase, + CreateWorkflowDtoCredentialsItem_SmallestAi, + CreateWorkflowDtoCredentialsItem_Tavus, + CreateWorkflowDtoCredentialsItem_TogetherAi, + CreateWorkflowDtoCredentialsItem_Twilio, + CreateWorkflowDtoCredentialsItem_Vonage, + CreateWorkflowDtoCredentialsItem_Webhook, + CreateWorkflowDtoCredentialsItem_CustomCredential, + CreateWorkflowDtoCredentialsItem_Xai, + CreateWorkflowDtoCredentialsItem_Neuphonic, + CreateWorkflowDtoCredentialsItem_Hume, + CreateWorkflowDtoCredentialsItem_Mistral, + CreateWorkflowDtoCredentialsItem_Speechmatics, + CreateWorkflowDtoCredentialsItem_Soniox, + CreateWorkflowDtoCredentialsItem_Trieve, + CreateWorkflowDtoCredentialsItem_GoogleCalendarOauth2Client, + CreateWorkflowDtoCredentialsItem_GoogleCalendarOauth2Authorization, + CreateWorkflowDtoCredentialsItem_GoogleSheetsOauth2Authorization, + CreateWorkflowDtoCredentialsItem_SlackOauth2Authorization, + CreateWorkflowDtoCredentialsItem_GhlOauth2Authorization, + CreateWorkflowDtoCredentialsItem_Inworld, + CreateWorkflowDtoCredentialsItem_Minimax, + CreateWorkflowDtoCredentialsItem_Wellsaid, + CreateWorkflowDtoCredentialsItem_Email, + CreateWorkflowDtoCredentialsItem_SlackWebhook, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/create_workflow_dto_hooks_item.py b/src/vapi/types/create_workflow_dto_hooks_item.py new file mode 100644 index 00000000..44f86c25 --- /dev/null +++ b/src/vapi/types/create_workflow_dto_hooks_item.py @@ -0,0 +1,17 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted +from .call_hook_call_ending import CallHookCallEnding +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout +from .call_hook_model_response_timeout import CallHookModelResponseTimeout + +CreateWorkflowDtoHooksItem = typing.Union[ + CallHookCallEnding, + CallHookAssistantSpeechInterrupted, + CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechTimeout, + CallHookModelResponseTimeout, +] diff --git a/src/vapi/types/create_workflow_dto_model.py b/src/vapi/types/create_workflow_dto_model.py new file mode 100644 index 00000000..f2355606 --- /dev/null +++ b/src/vapi/types/create_workflow_dto_model.py @@ -0,0 +1,161 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .anthropic_thinking_config import AnthropicThinkingConfig +from .workflow_anthropic_bedrock_model_model import WorkflowAnthropicBedrockModelModel +from .workflow_anthropic_model_model import WorkflowAnthropicModelModel +from .workflow_custom_model_metadata_send_mode import WorkflowCustomModelMetadataSendMode +from .workflow_google_model_model import WorkflowGoogleModelModel +from .workflow_open_ai_model_model import WorkflowOpenAiModelModel + + +class CreateWorkflowDtoModel_Openai(UncheckedBaseModel): + """ + This is the model for the workflow. + + This can be overridden at node level using `nodes[n].model`. + """ + + provider: typing.Literal["openai"] = "openai" + model: WorkflowOpenAiModelModel + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoModel_Anthropic(UncheckedBaseModel): + """ + This is the model for the workflow. + + This can be overridden at node level using `nodes[n].model`. + """ + + provider: typing.Literal["anthropic"] = "anthropic" + model: WorkflowAnthropicModelModel + thinking: typing.Optional[AnthropicThinkingConfig] = None + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoModel_AnthropicBedrock(UncheckedBaseModel): + """ + This is the model for the workflow. + + This can be overridden at node level using `nodes[n].model`. + """ + + provider: typing.Literal["anthropic-bedrock"] = "anthropic-bedrock" + model: WorkflowAnthropicBedrockModelModel + thinking: typing.Optional[AnthropicThinkingConfig] = None + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoModel_Google(UncheckedBaseModel): + """ + This is the model for the workflow. + + This can be overridden at node level using `nodes[n].model`. + """ + + provider: typing.Literal["google"] = "google" + model: WorkflowGoogleModelModel + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoModel_CustomLlm(UncheckedBaseModel): + """ + This is the model for the workflow. + + This can be overridden at node level using `nodes[n].model`. + """ + + provider: typing.Literal["custom-llm"] = "custom-llm" + metadata_send_mode: typing_extensions.Annotated[ + typing.Optional[WorkflowCustomModelMetadataSendMode], + FieldMetadata(alias="metadataSendMode"), + pydantic.Field(alias="metadataSendMode"), + ] = None + url: str + headers: typing.Optional[typing.Dict[str, typing.Any]] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + model: str + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateWorkflowDtoModel = typing_extensions.Annotated[ + typing.Union[ + CreateWorkflowDtoModel_Openai, + CreateWorkflowDtoModel_Anthropic, + CreateWorkflowDtoModel_AnthropicBedrock, + CreateWorkflowDtoModel_Google, + CreateWorkflowDtoModel_CustomLlm, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/create_workflow_dto_nodes_item.py b/src/vapi/types/create_workflow_dto_nodes_item.py new file mode 100644 index 00000000..0948ab03 --- /dev/null +++ b/src/vapi/types/create_workflow_dto_nodes_item.py @@ -0,0 +1,82 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .conversation_node_model import ConversationNodeModel +from .conversation_node_tools_item import ConversationNodeToolsItem +from .conversation_node_transcriber import ConversationNodeTranscriber +from .conversation_node_voice import ConversationNodeVoice +from .global_node_plan import GlobalNodePlan +from .tool_node_tool import ToolNodeTool +from .variable_extraction_plan import VariableExtractionPlan + + +class CreateWorkflowDtoNodesItem_Conversation(UncheckedBaseModel): + type: typing.Literal["conversation"] = "conversation" + model: typing.Optional[ConversationNodeModel] = None + transcriber: typing.Optional[ConversationNodeTranscriber] = None + voice: typing.Optional[ConversationNodeVoice] = None + tools: typing.Optional[typing.List[ConversationNodeToolsItem]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + prompt: typing.Optional[str] = None + global_node_plan: typing_extensions.Annotated[ + typing.Optional[GlobalNodePlan], FieldMetadata(alias="globalNodePlan"), pydantic.Field(alias="globalNodePlan") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + name: str + is_start: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="isStart"), pydantic.Field(alias="isStart") + ] = None + metadata: typing.Optional[typing.Dict[str, typing.Any]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoNodesItem_Tool(UncheckedBaseModel): + type: typing.Literal["tool"] = "tool" + tool: typing.Optional[ToolNodeTool] = None + tool_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="toolId"), pydantic.Field(alias="toolId") + ] = None + name: str + is_start: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="isStart"), pydantic.Field(alias="isStart") + ] = None + metadata: typing.Optional[typing.Dict[str, typing.Any]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateWorkflowDtoNodesItem = typing_extensions.Annotated[ + typing.Union[CreateWorkflowDtoNodesItem_Conversation, CreateWorkflowDtoNodesItem_Tool], + UnionMetadata(discriminant="type"), +] +update_forward_refs(CreateWorkflowDtoNodesItem_Conversation) +update_forward_refs(CreateWorkflowDtoNodesItem_Tool) diff --git a/src/vapi/types/create_workflow_dto_transcriber.py b/src/vapi/types/create_workflow_dto_transcriber.py new file mode 100644 index 00000000..0129b154 --- /dev/null +++ b/src/vapi/types/create_workflow_dto_transcriber.py @@ -0,0 +1,562 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .assembly_ai_transcriber_language import AssemblyAiTranscriberLanguage +from .assembly_ai_transcriber_speech_model import AssemblyAiTranscriberSpeechModel +from .azure_speech_transcriber_language import AzureSpeechTranscriberLanguage +from .azure_speech_transcriber_segmentation_strategy import AzureSpeechTranscriberSegmentationStrategy +from .cartesia_transcriber_language import CartesiaTranscriberLanguage +from .cartesia_transcriber_model import CartesiaTranscriberModel +from .deepgram_transcriber_language import DeepgramTranscriberLanguage +from .deepgram_transcriber_model import DeepgramTranscriberModel +from .eleven_labs_transcriber_language import ElevenLabsTranscriberLanguage +from .eleven_labs_transcriber_model import ElevenLabsTranscriberModel +from .fallback_transcriber_plan import FallbackTranscriberPlan +from .gladia_custom_vocabulary_config_dto import GladiaCustomVocabularyConfigDto +from .gladia_transcriber_language import GladiaTranscriberLanguage +from .gladia_transcriber_language_behaviour import GladiaTranscriberLanguageBehaviour +from .gladia_transcriber_languages import GladiaTranscriberLanguages +from .gladia_transcriber_model import GladiaTranscriberModel +from .gladia_transcriber_region import GladiaTranscriberRegion +from .google_transcriber_language import GoogleTranscriberLanguage +from .google_transcriber_model import GoogleTranscriberModel +from .open_ai_transcriber_language import OpenAiTranscriberLanguage +from .open_ai_transcriber_model import OpenAiTranscriberModel +from .server import Server +from .soniox_transcriber_language import SonioxTranscriberLanguage +from .soniox_transcriber_model import SonioxTranscriberModel +from .speechmatics_custom_vocabulary_item import SpeechmaticsCustomVocabularyItem +from .speechmatics_transcriber_language import SpeechmaticsTranscriberLanguage +from .speechmatics_transcriber_model import SpeechmaticsTranscriberModel +from .speechmatics_transcriber_numeral_style import SpeechmaticsTranscriberNumeralStyle +from .speechmatics_transcriber_operating_point import SpeechmaticsTranscriberOperatingPoint +from .speechmatics_transcriber_region import SpeechmaticsTranscriberRegion +from .talkscriber_transcriber_language import TalkscriberTranscriberLanguage +from .talkscriber_transcriber_model import TalkscriberTranscriberModel + + +class CreateWorkflowDtoTranscriber_AssemblyAi(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["assembly-ai"] = "assembly-ai" + language: typing.Optional[AssemblyAiTranscriberLanguage] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="confidenceThreshold"), pydantic.Field(alias="confidenceThreshold") + ] = None + format_turns: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="formatTurns"), pydantic.Field(alias="formatTurns") + ] = None + end_of_turn_confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="endOfTurnConfidenceThreshold"), + pydantic.Field(alias="endOfTurnConfidenceThreshold"), + ] = None + min_end_of_turn_silence_when_confident: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minEndOfTurnSilenceWhenConfident"), + pydantic.Field(alias="minEndOfTurnSilenceWhenConfident"), + ] = None + word_finalization_max_wait_time: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="wordFinalizationMaxWaitTime"), + pydantic.Field(alias="wordFinalizationMaxWaitTime"), + ] = None + max_turn_silence: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTurnSilence"), pydantic.Field(alias="maxTurnSilence") + ] = None + vad_assisted_endpointing_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="vadAssistedEndpointingEnabled"), + pydantic.Field(alias="vadAssistedEndpointingEnabled"), + ] = None + speech_model: typing_extensions.Annotated[ + typing.Optional[AssemblyAiTranscriberSpeechModel], + FieldMetadata(alias="speechModel"), + pydantic.Field(alias="speechModel"), + ] = None + realtime_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="realtimeUrl"), pydantic.Field(alias="realtimeUrl") + ] = None + word_boost: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="wordBoost"), pydantic.Field(alias="wordBoost") + ] = None + keyterms_prompt: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="keytermsPrompt"), pydantic.Field(alias="keytermsPrompt") + ] = None + end_utterance_silence_threshold: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="endUtteranceSilenceThreshold"), + pydantic.Field(alias="endUtteranceSilenceThreshold"), + ] = None + disable_partial_transcripts: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="disablePartialTranscripts"), + pydantic.Field(alias="disablePartialTranscripts"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoTranscriber_Azure(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["azure"] = "azure" + language: typing.Optional[AzureSpeechTranscriberLanguage] = None + segmentation_strategy: typing_extensions.Annotated[ + typing.Optional[AzureSpeechTranscriberSegmentationStrategy], + FieldMetadata(alias="segmentationStrategy"), + pydantic.Field(alias="segmentationStrategy"), + ] = None + segmentation_silence_timeout_ms: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="segmentationSilenceTimeoutMs"), + pydantic.Field(alias="segmentationSilenceTimeoutMs"), + ] = None + segmentation_maximum_time_ms: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="segmentationMaximumTimeMs"), + pydantic.Field(alias="segmentationMaximumTimeMs"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoTranscriber_CustomTranscriber(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["custom-transcriber"] = "custom-transcriber" + server: Server + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoTranscriber_Deepgram(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["deepgram"] = "deepgram" + model: typing.Optional[DeepgramTranscriberModel] = None + language: typing.Optional[DeepgramTranscriberLanguage] = None + smart_format: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smartFormat"), pydantic.Field(alias="smartFormat") + ] = None + mip_opt_out: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="mipOptOut"), pydantic.Field(alias="mipOptOut") + ] = None + numerals: typing.Optional[bool] = None + profanity_filter: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="profanityFilter"), pydantic.Field(alias="profanityFilter") + ] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="confidenceThreshold"), pydantic.Field(alias="confidenceThreshold") + ] = None + eager_eot_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="eagerEotThreshold"), pydantic.Field(alias="eagerEotThreshold") + ] = None + eot_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="eotThreshold"), pydantic.Field(alias="eotThreshold") + ] = None + eot_timeout_ms: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="eotTimeoutMs"), pydantic.Field(alias="eotTimeoutMs") + ] = None + keywords: typing.Optional[typing.List[str]] = None + keyterm: typing.Optional[typing.List[str]] = None + endpointing: typing.Optional[float] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoTranscriber_11Labs(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["11labs"] = "11labs" + model: typing.Optional[ElevenLabsTranscriberModel] = None + language: typing.Optional[ElevenLabsTranscriberLanguage] = None + silence_threshold_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="silenceThresholdSeconds"), + pydantic.Field(alias="silenceThresholdSeconds"), + ] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="confidenceThreshold"), pydantic.Field(alias="confidenceThreshold") + ] = None + min_speech_duration_ms: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="minSpeechDurationMs"), pydantic.Field(alias="minSpeechDurationMs") + ] = None + min_silence_duration_ms: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minSilenceDurationMs"), + pydantic.Field(alias="minSilenceDurationMs"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoTranscriber_Gladia(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["gladia"] = "gladia" + model: typing.Optional[GladiaTranscriberModel] = None + language_behaviour: typing_extensions.Annotated[ + typing.Optional[GladiaTranscriberLanguageBehaviour], + FieldMetadata(alias="languageBehaviour"), + pydantic.Field(alias="languageBehaviour"), + ] = None + language: typing.Optional[GladiaTranscriberLanguage] = None + languages: typing.Optional[GladiaTranscriberLanguages] = None + transcription_hint: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="transcriptionHint"), pydantic.Field(alias="transcriptionHint") + ] = None + prosody: typing.Optional[bool] = None + audio_enhancer: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="audioEnhancer"), pydantic.Field(alias="audioEnhancer") + ] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="confidenceThreshold"), pydantic.Field(alias="confidenceThreshold") + ] = None + endpointing: typing.Optional[float] = None + speech_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="speechThreshold"), pydantic.Field(alias="speechThreshold") + ] = None + custom_vocabulary_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="customVocabularyEnabled"), + pydantic.Field(alias="customVocabularyEnabled"), + ] = None + custom_vocabulary_config: typing_extensions.Annotated[ + typing.Optional[GladiaCustomVocabularyConfigDto], + FieldMetadata(alias="customVocabularyConfig"), + pydantic.Field(alias="customVocabularyConfig"), + ] = None + region: typing.Optional[GladiaTranscriberRegion] = None + receive_partial_transcripts: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="receivePartialTranscripts"), + pydantic.Field(alias="receivePartialTranscripts"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoTranscriber_Google(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["google"] = "google" + model: typing.Optional[GoogleTranscriberModel] = None + language: typing.Optional[GoogleTranscriberLanguage] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoTranscriber_Speechmatics(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["speechmatics"] = "speechmatics" + model: typing.Optional[SpeechmaticsTranscriberModel] = None + language: typing.Optional[SpeechmaticsTranscriberLanguage] = None + operating_point: typing_extensions.Annotated[ + typing.Optional[SpeechmaticsTranscriberOperatingPoint], + FieldMetadata(alias="operatingPoint"), + pydantic.Field(alias="operatingPoint"), + ] = None + region: typing.Optional[SpeechmaticsTranscriberRegion] = None + enable_diarization: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="enableDiarization"), pydantic.Field(alias="enableDiarization") + ] = None + max_delay: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxDelay"), pydantic.Field(alias="maxDelay") + ] = None + custom_vocabulary: typing_extensions.Annotated[ + typing.List[SpeechmaticsCustomVocabularyItem], + FieldMetadata(alias="customVocabulary"), + pydantic.Field(alias="customVocabulary"), + ] + numeral_style: typing_extensions.Annotated[ + typing.Optional[SpeechmaticsTranscriberNumeralStyle], + FieldMetadata(alias="numeralStyle"), + pydantic.Field(alias="numeralStyle"), + ] = None + end_of_turn_sensitivity: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="endOfTurnSensitivity"), + pydantic.Field(alias="endOfTurnSensitivity"), + ] = None + remove_disfluencies: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="removeDisfluencies"), pydantic.Field(alias="removeDisfluencies") + ] = None + minimum_speech_duration: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minimumSpeechDuration"), + pydantic.Field(alias="minimumSpeechDuration"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoTranscriber_Talkscriber(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["talkscriber"] = "talkscriber" + model: typing.Optional[TalkscriberTranscriberModel] = None + language: typing.Optional[TalkscriberTranscriberLanguage] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoTranscriber_Openai(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["openai"] = "openai" + model: OpenAiTranscriberModel + language: typing.Optional[OpenAiTranscriberLanguage] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoTranscriber_Cartesia(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["cartesia"] = "cartesia" + model: typing.Optional[CartesiaTranscriberModel] = None + language: typing.Optional[CartesiaTranscriberLanguage] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoTranscriber_Soniox(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["soniox"] = "soniox" + model: typing.Optional[SonioxTranscriberModel] = None + language: typing.Optional[SonioxTranscriberLanguage] = None + language_hints_strict: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="languageHintsStrict"), pydantic.Field(alias="languageHintsStrict") + ] = None + max_endpoint_delay_ms: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxEndpointDelayMs"), pydantic.Field(alias="maxEndpointDelayMs") + ] = None + custom_vocabulary: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="customVocabulary"), + pydantic.Field(alias="customVocabulary"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateWorkflowDtoTranscriber = typing_extensions.Annotated[ + typing.Union[ + CreateWorkflowDtoTranscriber_AssemblyAi, + CreateWorkflowDtoTranscriber_Azure, + CreateWorkflowDtoTranscriber_CustomTranscriber, + CreateWorkflowDtoTranscriber_Deepgram, + CreateWorkflowDtoTranscriber_11Labs, + CreateWorkflowDtoTranscriber_Gladia, + CreateWorkflowDtoTranscriber_Google, + CreateWorkflowDtoTranscriber_Speechmatics, + CreateWorkflowDtoTranscriber_Talkscriber, + CreateWorkflowDtoTranscriber_Openai, + CreateWorkflowDtoTranscriber_Cartesia, + CreateWorkflowDtoTranscriber_Soniox, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/create_workflow_dto_voice.py b/src/vapi/types/create_workflow_dto_voice.py new file mode 100644 index 00000000..098c6169 --- /dev/null +++ b/src/vapi/types/create_workflow_dto_voice.py @@ -0,0 +1,776 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .azure_voice_id import AzureVoiceId +from .cartesia_experimental_controls import CartesiaExperimentalControls +from .cartesia_generation_config import CartesiaGenerationConfig +from .cartesia_voice_language import CartesiaVoiceLanguage +from .cartesia_voice_model import CartesiaVoiceModel +from .chunk_plan import ChunkPlan +from .deepgram_voice_id import DeepgramVoiceId +from .deepgram_voice_model import DeepgramVoiceModel +from .eleven_labs_pronunciation_dictionary_locator import ElevenLabsPronunciationDictionaryLocator +from .eleven_labs_voice_id import ElevenLabsVoiceId +from .eleven_labs_voice_model import ElevenLabsVoiceModel +from .fallback_plan import FallbackPlan +from .hume_voice_model import HumeVoiceModel +from .inworld_voice_language_code import InworldVoiceLanguageCode +from .inworld_voice_model import InworldVoiceModel +from .inworld_voice_voice_id import InworldVoiceVoiceId +from .lmnt_voice_id import LmntVoiceId +from .lmnt_voice_language import LmntVoiceLanguage +from .minimax_voice_language_boost import MinimaxVoiceLanguageBoost +from .minimax_voice_model import MinimaxVoiceModel +from .minimax_voice_region import MinimaxVoiceRegion +from .minimax_voice_subtitle_type import MinimaxVoiceSubtitleType +from .neuphonic_voice_model import NeuphonicVoiceModel +from .open_ai_voice_id import OpenAiVoiceId +from .open_ai_voice_model import OpenAiVoiceModel +from .play_ht_voice_emotion import PlayHtVoiceEmotion +from .play_ht_voice_id import PlayHtVoiceId +from .play_ht_voice_language import PlayHtVoiceLanguage +from .play_ht_voice_model import PlayHtVoiceModel +from .rime_ai_voice_id import RimeAiVoiceId +from .rime_ai_voice_language import RimeAiVoiceLanguage +from .rime_ai_voice_model import RimeAiVoiceModel +from .server import Server +from .sesame_voice_model import SesameVoiceModel +from .smallest_ai_voice_id import SmallestAiVoiceId +from .smallest_ai_voice_model import SmallestAiVoiceModel +from .tavus_conversation_properties import TavusConversationProperties +from .tavus_voice_voice_id import TavusVoiceVoiceId +from .vapi_pronunciation_dictionary_locator import VapiPronunciationDictionaryLocator +from .vapi_voice_voice_id import VapiVoiceVoiceId +from .well_said_voice_model import WellSaidVoiceModel + + +class CreateWorkflowDtoVoice_Azure(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["azure"] = "azure" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[AzureVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + speed: typing.Optional[float] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoVoice_Cartesia(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["cartesia"] = "cartesia" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[CartesiaVoiceModel] = None + language: typing.Optional[CartesiaVoiceLanguage] = None + experimental_controls: typing_extensions.Annotated[ + typing.Optional[CartesiaExperimentalControls], + FieldMetadata(alias="experimentalControls"), + pydantic.Field(alias="experimentalControls"), + ] = None + generation_config: typing_extensions.Annotated[ + typing.Optional[CartesiaGenerationConfig], + FieldMetadata(alias="generationConfig"), + pydantic.Field(alias="generationConfig"), + ] = None + pronunciation_dict_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="pronunciationDictId"), pydantic.Field(alias="pronunciationDictId") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoVoice_CustomVoice(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["custom-voice"] = "custom-voice" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + server: Server + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoVoice_Deepgram(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["deepgram"] = "deepgram" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + DeepgramVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[DeepgramVoiceModel] = None + mip_opt_out: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="mipOptOut"), pydantic.Field(alias="mipOptOut") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoVoice_11Labs(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["11labs"] = "11labs" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + ElevenLabsVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + stability: typing.Optional[float] = None + similarity_boost: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="similarityBoost"), pydantic.Field(alias="similarityBoost") + ] = None + style: typing.Optional[float] = None + use_speaker_boost: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="useSpeakerBoost"), pydantic.Field(alias="useSpeakerBoost") + ] = None + speed: typing.Optional[float] = None + optimize_streaming_latency: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="optimizeStreamingLatency"), + pydantic.Field(alias="optimizeStreamingLatency"), + ] = None + enable_ssml_parsing: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="enableSsmlParsing"), pydantic.Field(alias="enableSsmlParsing") + ] = None + auto_mode: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="autoMode"), pydantic.Field(alias="autoMode") + ] = None + model: typing.Optional[ElevenLabsVoiceModel] = None + language: typing.Optional[str] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + pronunciation_dictionary_locators: typing_extensions.Annotated[ + typing.Optional[typing.List[ElevenLabsPronunciationDictionaryLocator]], + FieldMetadata(alias="pronunciationDictionaryLocators"), + pydantic.Field(alias="pronunciationDictionaryLocators"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoVoice_Hume(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["hume"] = "hume" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + model: typing.Optional[HumeVoiceModel] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + is_custom_hume_voice: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="isCustomHumeVoice"), pydantic.Field(alias="isCustomHumeVoice") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + description: typing.Optional[str] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoVoice_Lmnt(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["lmnt"] = "lmnt" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[LmntVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + speed: typing.Optional[float] = None + language: typing.Optional[LmntVoiceLanguage] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoVoice_Neuphonic(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["neuphonic"] = "neuphonic" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[NeuphonicVoiceModel] = None + language: typing.Dict[str, typing.Any] + speed: typing.Optional[float] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoVoice_Openai(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["openai"] = "openai" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + OpenAiVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[OpenAiVoiceModel] = None + instructions: typing.Optional[str] = None + speed: typing.Optional[float] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoVoice_Playht(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["playht"] = "playht" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + PlayHtVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + speed: typing.Optional[float] = None + temperature: typing.Optional[float] = None + emotion: typing.Optional[PlayHtVoiceEmotion] = None + voice_guidance: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="voiceGuidance"), pydantic.Field(alias="voiceGuidance") + ] = None + style_guidance: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="styleGuidance"), pydantic.Field(alias="styleGuidance") + ] = None + text_guidance: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="textGuidance"), pydantic.Field(alias="textGuidance") + ] = None + model: typing.Optional[PlayHtVoiceModel] = None + language: typing.Optional[PlayHtVoiceLanguage] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoVoice_Wellsaid(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["wellsaid"] = "wellsaid" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[WellSaidVoiceModel] = None + enable_ssml: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="enableSsml"), pydantic.Field(alias="enableSsml") + ] = None + library_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="libraryIds"), pydantic.Field(alias="libraryIds") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoVoice_RimeAi(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["rime-ai"] = "rime-ai" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + RimeAiVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[RimeAiVoiceModel] = None + speed: typing.Optional[float] = None + pause_between_brackets: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="pauseBetweenBrackets"), pydantic.Field(alias="pauseBetweenBrackets") + ] = None + phonemize_between_brackets: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="phonemizeBetweenBrackets"), + pydantic.Field(alias="phonemizeBetweenBrackets"), + ] = None + reduce_latency: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="reduceLatency"), pydantic.Field(alias="reduceLatency") + ] = None + inline_speed_alpha: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="inlineSpeedAlpha"), pydantic.Field(alias="inlineSpeedAlpha") + ] = None + language: typing.Optional[RimeAiVoiceLanguage] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoVoice_SmallestAi(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["smallest-ai"] = "smallest-ai" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + SmallestAiVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[SmallestAiVoiceModel] = None + speed: typing.Optional[float] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoVoice_Tavus(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["tavus"] = "tavus" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + TavusVoiceVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + persona_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="personaId"), pydantic.Field(alias="personaId") + ] = None + callback_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callbackUrl"), pydantic.Field(alias="callbackUrl") + ] = None + conversation_name: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="conversationName"), pydantic.Field(alias="conversationName") + ] = None + conversational_context: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="conversationalContext"), + pydantic.Field(alias="conversationalContext"), + ] = None + custom_greeting: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="customGreeting"), pydantic.Field(alias="customGreeting") + ] = None + properties: typing.Optional[TavusConversationProperties] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoVoice_Vapi(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["vapi"] = "vapi" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + VapiVoiceVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + speed: typing.Optional[float] = None + pronunciation_dictionary: typing_extensions.Annotated[ + typing.Optional[typing.List[VapiPronunciationDictionaryLocator]], + FieldMetadata(alias="pronunciationDictionary"), + pydantic.Field(alias="pronunciationDictionary"), + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoVoice_Sesame(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["sesame"] = "sesame" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: SesameVoiceModel + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoVoice_Inworld(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["inworld"] = "inworld" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + InworldVoiceVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[InworldVoiceModel] = None + language_code: typing_extensions.Annotated[ + typing.Optional[InworldVoiceLanguageCode], + FieldMetadata(alias="languageCode"), + pydantic.Field(alias="languageCode"), + ] = None + temperature: typing.Optional[float] = None + speaking_rate: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="speakingRate"), pydantic.Field(alias="speakingRate") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CreateWorkflowDtoVoice_Minimax(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["minimax"] = "minimax" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[MinimaxVoiceModel] = None + emotion: typing.Optional[str] = None + subtitle_type: typing_extensions.Annotated[ + typing.Optional[MinimaxVoiceSubtitleType], + FieldMetadata(alias="subtitleType"), + pydantic.Field(alias="subtitleType"), + ] = None + pitch: typing.Optional[float] = None + speed: typing.Optional[float] = None + volume: typing.Optional[float] = None + region: typing.Optional[MinimaxVoiceRegion] = None + language_boost: typing_extensions.Annotated[ + typing.Optional[MinimaxVoiceLanguageBoost], + FieldMetadata(alias="languageBoost"), + pydantic.Field(alias="languageBoost"), + ] = None + text_normalization_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="textNormalizationEnabled"), + pydantic.Field(alias="textNormalizationEnabled"), + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CreateWorkflowDtoVoice = typing_extensions.Annotated[ + typing.Union[ + CreateWorkflowDtoVoice_Azure, + CreateWorkflowDtoVoice_Cartesia, + CreateWorkflowDtoVoice_CustomVoice, + CreateWorkflowDtoVoice_Deepgram, + CreateWorkflowDtoVoice_11Labs, + CreateWorkflowDtoVoice_Hume, + CreateWorkflowDtoVoice_Lmnt, + CreateWorkflowDtoVoice_Neuphonic, + CreateWorkflowDtoVoice_Openai, + CreateWorkflowDtoVoice_Playht, + CreateWorkflowDtoVoice_Wellsaid, + CreateWorkflowDtoVoice_RimeAi, + CreateWorkflowDtoVoice_SmallestAi, + CreateWorkflowDtoVoice_Tavus, + CreateWorkflowDtoVoice_Vapi, + CreateWorkflowDtoVoice_Sesame, + CreateWorkflowDtoVoice_Inworld, + CreateWorkflowDtoVoice_Minimax, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/create_workflow_dto_voicemail_detection.py b/src/vapi/types/create_workflow_dto_voicemail_detection.py new file mode 100644 index 00000000..ae032997 --- /dev/null +++ b/src/vapi/types/create_workflow_dto_voicemail_detection.py @@ -0,0 +1,17 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .create_workflow_dto_voicemail_detection_zero import CreateWorkflowDtoVoicemailDetectionZero +from .google_voicemail_detection_plan import GoogleVoicemailDetectionPlan +from .open_ai_voicemail_detection_plan import OpenAiVoicemailDetectionPlan +from .twilio_voicemail_detection_plan import TwilioVoicemailDetectionPlan +from .vapi_voicemail_detection_plan import VapiVoicemailDetectionPlan + +CreateWorkflowDtoVoicemailDetection = typing.Union[ + CreateWorkflowDtoVoicemailDetectionZero, + GoogleVoicemailDetectionPlan, + OpenAiVoicemailDetectionPlan, + TwilioVoicemailDetectionPlan, + VapiVoicemailDetectionPlan, +] diff --git a/src/vapi/types/create_workflow_dto_voicemail_detection_zero.py b/src/vapi/types/create_workflow_dto_voicemail_detection_zero.py new file mode 100644 index 00000000..012e3cc6 --- /dev/null +++ b/src/vapi/types/create_workflow_dto_voicemail_detection_zero.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CreateWorkflowDtoVoicemailDetectionZero = typing.Union[typing.Literal["off"], typing.Any] diff --git a/src/vapi/types/create_x_ai_credential_dto.py b/src/vapi/types/create_x_ai_credential_dto.py new file mode 100644 index 00000000..7ee391b9 --- /dev/null +++ b/src/vapi/types/create_x_ai_credential_dto.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class CreateXAiCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/credential_action_request.py b/src/vapi/types/credential_action_request.py new file mode 100644 index 00000000..f257aa27 --- /dev/null +++ b/src/vapi/types/credential_action_request.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class CredentialActionRequest(UncheckedBaseModel): + action_name: str + input: typing.Dict[str, typing.Any] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/credential_end_user.py b/src/vapi/types/credential_end_user.py new file mode 100644 index 00000000..3d062c3e --- /dev/null +++ b/src/vapi/types/credential_end_user.py @@ -0,0 +1,29 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class CredentialEndUser(UncheckedBaseModel): + end_user_email: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="endUserEmail"), pydantic.Field(alias="endUserEmail") + ] = None + end_user_id: typing_extensions.Annotated[str, FieldMetadata(alias="endUserId"), pydantic.Field(alias="endUserId")] + organization_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="organizationId"), pydantic.Field(alias="organizationId") + ] + tags: typing.Optional[typing.Dict[str, typing.Any]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/credential_session_error.py b/src/vapi/types/credential_session_error.py new file mode 100644 index 00000000..c9829368 --- /dev/null +++ b/src/vapi/types/credential_session_error.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class CredentialSessionError(UncheckedBaseModel): + type: str + description: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/credential_session_response.py b/src/vapi/types/credential_session_response.py new file mode 100644 index 00000000..b16ffdb0 --- /dev/null +++ b/src/vapi/types/credential_session_response.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class CredentialSessionResponse(UncheckedBaseModel): + session_token: typing_extensions.Annotated[ + str, FieldMetadata(alias="sessionToken"), pydantic.Field(alias="sessionToken") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/credential_webhook_dto.py b/src/vapi/types/credential_webhook_dto.py new file mode 100644 index 00000000..70bcab14 --- /dev/null +++ b/src/vapi/types/credential_webhook_dto.py @@ -0,0 +1,46 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .credential_end_user import CredentialEndUser +from .credential_session_error import CredentialSessionError +from .credential_webhook_dto_auth_mode import CredentialWebhookDtoAuthMode +from .credential_webhook_dto_operation import CredentialWebhookDtoOperation +from .credential_webhook_dto_type import CredentialWebhookDtoType + + +class CredentialWebhookDto(UncheckedBaseModel): + type: CredentialWebhookDtoType + operation: CredentialWebhookDtoOperation + from_: typing_extensions.Annotated[str, FieldMetadata(alias="from"), pydantic.Field(alias="from")] + connection_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="connectionId"), pydantic.Field(alias="connectionId") + ] + auth_mode: typing_extensions.Annotated[ + CredentialWebhookDtoAuthMode, FieldMetadata(alias="authMode"), pydantic.Field(alias="authMode") + ] + provider_config_key: typing_extensions.Annotated[ + str, FieldMetadata(alias="providerConfigKey"), pydantic.Field(alias="providerConfigKey") + ] + provider: str + environment: str + success: bool + end_user: typing_extensions.Annotated[ + CredentialEndUser, FieldMetadata(alias="endUser"), pydantic.Field(alias="endUser") + ] + error: typing.Optional[CredentialSessionError] = None + tags: typing.Optional[typing.Dict[str, typing.Any]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/credential_webhook_dto_auth_mode.py b/src/vapi/types/credential_webhook_dto_auth_mode.py new file mode 100644 index 00000000..056c4f73 --- /dev/null +++ b/src/vapi/types/credential_webhook_dto_auth_mode.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CredentialWebhookDtoAuthMode = typing.Union[typing.Literal["OAUTH2", "API_KEY", "BASIC"], typing.Any] diff --git a/src/vapi/types/credential_webhook_dto_operation.py b/src/vapi/types/credential_webhook_dto_operation.py new file mode 100644 index 00000000..4f7e9241 --- /dev/null +++ b/src/vapi/types/credential_webhook_dto_operation.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CredentialWebhookDtoOperation = typing.Union[typing.Literal["creation", "override", "refresh"], typing.Any] diff --git a/src/vapi/types/credential_webhook_dto_type.py b/src/vapi/types/credential_webhook_dto_type.py new file mode 100644 index 00000000..28ecf9a2 --- /dev/null +++ b/src/vapi/types/credential_webhook_dto_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CredentialWebhookDtoType = typing.Union[typing.Literal["auth", "sync", "forward"], typing.Any] diff --git a/src/vapi/types/custom_credential.py b/src/vapi/types/custom_credential.py new file mode 100644 index 00000000..98734e37 --- /dev/null +++ b/src/vapi/types/custom_credential.py @@ -0,0 +1,82 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .custom_credential_authentication_plan import CustomCredentialAuthenticationPlan +from .custom_credential_encryption_plan import CustomCredentialEncryptionPlan +from .custom_credential_provider import CustomCredentialProvider +from .oauth_2_authentication_session import Oauth2AuthenticationSession + + +class CustomCredential(UncheckedBaseModel): + provider: CustomCredentialProvider + authentication_plan: typing_extensions.Annotated[ + CustomCredentialAuthenticationPlan, + FieldMetadata(alias="authenticationPlan"), + pydantic.Field( + alias="authenticationPlan", + description="This is the authentication plan. Supports OAuth2 RFC 6749, HMAC signing, and Bearer authentication.", + ), + ] + encryption_plan: typing_extensions.Annotated[ + typing.Optional[CustomCredentialEncryptionPlan], + FieldMetadata(alias="encryptionPlan"), + pydantic.Field( + alias="encryptionPlan", + description="This is the encryption plan for encrypting sensitive data. Currently supports public-key encryption.", + ), + ] = None + id: str = pydantic.Field() + """ + This is the unique identifier for the credential. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + authentication_session: typing_extensions.Annotated[ + Oauth2AuthenticationSession, + FieldMetadata(alias="authenticationSession"), + pydantic.Field( + alias="authenticationSession", + description="This is the authentication session for the credential. Available for credentials that have an authentication plan.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/custom_credential_authentication_plan.py b/src/vapi/types/custom_credential_authentication_plan.py new file mode 100644 index 00000000..1a22678d --- /dev/null +++ b/src/vapi/types/custom_credential_authentication_plan.py @@ -0,0 +1,115 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .hmac_authentication_plan_algorithm import HmacAuthenticationPlanAlgorithm +from .hmac_authentication_plan_signature_encoding import HmacAuthenticationPlanSignatureEncoding + + +class CustomCredentialAuthenticationPlan_Oauth2(UncheckedBaseModel): + """ + This is the authentication plan. Supports OAuth2 RFC 6749, HMAC signing, and Bearer authentication. + """ + + type: typing.Literal["oauth2"] = "oauth2" + url: str + client_id: typing_extensions.Annotated[str, FieldMetadata(alias="clientId"), pydantic.Field(alias="clientId")] + client_secret: typing_extensions.Annotated[ + str, FieldMetadata(alias="clientSecret"), pydantic.Field(alias="clientSecret") + ] + scope: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CustomCredentialAuthenticationPlan_Hmac(UncheckedBaseModel): + """ + This is the authentication plan. Supports OAuth2 RFC 6749, HMAC signing, and Bearer authentication. + """ + + type: typing.Literal["hmac"] = "hmac" + secret_key: typing_extensions.Annotated[str, FieldMetadata(alias="secretKey"), pydantic.Field(alias="secretKey")] + algorithm: HmacAuthenticationPlanAlgorithm + signature_header: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="signatureHeader"), pydantic.Field(alias="signatureHeader") + ] = None + timestamp_header: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="timestampHeader"), pydantic.Field(alias="timestampHeader") + ] = None + signature_prefix: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="signaturePrefix"), pydantic.Field(alias="signaturePrefix") + ] = None + include_timestamp: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="includeTimestamp"), pydantic.Field(alias="includeTimestamp") + ] = None + payload_format: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="payloadFormat"), pydantic.Field(alias="payloadFormat") + ] = None + message_id_header: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="messageIdHeader"), pydantic.Field(alias="messageIdHeader") + ] = None + signature_encoding: typing_extensions.Annotated[ + typing.Optional[HmacAuthenticationPlanSignatureEncoding], + FieldMetadata(alias="signatureEncoding"), + pydantic.Field(alias="signatureEncoding"), + ] = None + secret_is_base_64: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="secretIsBase64"), pydantic.Field(alias="secretIsBase64") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CustomCredentialAuthenticationPlan_Bearer(UncheckedBaseModel): + """ + This is the authentication plan. Supports OAuth2 RFC 6749, HMAC signing, and Bearer authentication. + """ + + type: typing.Literal["bearer"] = "bearer" + token: str + header_name: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="headerName"), pydantic.Field(alias="headerName") + ] = None + bearer_prefix_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="bearerPrefixEnabled"), pydantic.Field(alias="bearerPrefixEnabled") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CustomCredentialAuthenticationPlan = typing_extensions.Annotated[ + typing.Union[ + CustomCredentialAuthenticationPlan_Oauth2, + CustomCredentialAuthenticationPlan_Hmac, + CustomCredentialAuthenticationPlan_Bearer, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/custom_credential_encryption_plan.py b/src/vapi/types/custom_credential_encryption_plan.py new file mode 100644 index 00000000..a31ce617 --- /dev/null +++ b/src/vapi/types/custom_credential_encryption_plan.py @@ -0,0 +1,37 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .public_key_encryption_plan_algorithm import PublicKeyEncryptionPlanAlgorithm +from .public_key_encryption_plan_public_key import PublicKeyEncryptionPlanPublicKey + + +class CustomCredentialEncryptionPlan_PublicKey(UncheckedBaseModel): + """ + This is the encryption plan for encrypting sensitive data. Currently supports public-key encryption. + """ + + type: typing.Literal["public-key"] = "public-key" + algorithm: PublicKeyEncryptionPlanAlgorithm + public_key: typing_extensions.Annotated[ + PublicKeyEncryptionPlanPublicKey, FieldMetadata(alias="publicKey"), pydantic.Field(alias="publicKey") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CustomCredentialEncryptionPlan = CustomCredentialEncryptionPlan_PublicKey diff --git a/src/vapi/types/custom_credential_provider.py b/src/vapi/types/custom_credential_provider.py new file mode 100644 index 00000000..b92e54fe --- /dev/null +++ b/src/vapi/types/custom_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CustomCredentialProvider = typing.Union[typing.Literal["custom-credential"], typing.Any] diff --git a/src/vapi/types/custom_endpointing_model_smart_endpointing_plan.py b/src/vapi/types/custom_endpointing_model_smart_endpointing_plan.py new file mode 100644 index 00000000..730ad9c7 --- /dev/null +++ b/src/vapi/types/custom_endpointing_model_smart_endpointing_plan.py @@ -0,0 +1,57 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .custom_endpointing_model_smart_endpointing_plan_provider import CustomEndpointingModelSmartEndpointingPlanProvider +from .server import Server + + +class CustomEndpointingModelSmartEndpointingPlan(UncheckedBaseModel): + provider: CustomEndpointingModelSmartEndpointingPlanProvider = pydantic.Field() + """ + This is the provider for the smart endpointing plan. Use `custom-endpointing-model` for custom endpointing providers that are not natively supported. + """ + + server: typing.Optional[Server] = pydantic.Field(default=None) + """ + This is where the endpointing request will be sent. If not provided, will be sent to `assistant.server`. If that does not exist either, will be sent to `org.server`. + + Request Example: + + POST https://{server.url} + Content-Type: application/json + + { + "message": { + "type": "call.endpointing.request", + "messages": [ + { + "role": "user", + "message": "Hello, how are you?", + "time": 1234567890, + "secondsFromStart": 0 + } + ], + ...other metadata about the call... + } + } + + Response Expected: + { + "timeoutSeconds": 0.5 + } + + The timeout is the number of seconds to wait before considering the user's speech as finished. The endpointing timeout is automatically reset each time a new transcript is received (and another `call.endpointing.request` is sent). + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/custom_endpointing_model_smart_endpointing_plan_provider.py b/src/vapi/types/custom_endpointing_model_smart_endpointing_plan_provider.py new file mode 100644 index 00000000..ae7c9150 --- /dev/null +++ b/src/vapi/types/custom_endpointing_model_smart_endpointing_plan_provider.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CustomEndpointingModelSmartEndpointingPlanProvider = typing.Union[ + typing.Literal["vapi", "livekit", "custom-endpointing-model"], typing.Any +] diff --git a/src/vapi/types/custom_knowledge_base.py b/src/vapi/types/custom_knowledge_base.py new file mode 100644 index 00000000..8daadcf1 --- /dev/null +++ b/src/vapi/types/custom_knowledge_base.py @@ -0,0 +1,81 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .custom_knowledge_base_provider import CustomKnowledgeBaseProvider +from .server import Server + + +class CustomKnowledgeBase(UncheckedBaseModel): + provider: CustomKnowledgeBaseProvider = pydantic.Field() + """ + This knowledge base is bring your own knowledge base implementation. + """ + + server: Server = pydantic.Field() + """ + This is where the knowledge base request will be sent. + + Request Example: + + POST https://{server.url} + Content-Type: application/json + + { + "messsage": { + "type": "knowledge-base-request", + "messages": [ + { + "role": "user", + "content": "Why is ocean blue?" + } + ], + ...other metadata about the call... + } + } + + Response Expected: + ``` + { + "message": { + "role": "assistant", + "content": "The ocean is blue because water absorbs everything but blue.", + }, // YOU CAN RETURN THE EXACT RESPONSE TO SPEAK + "documents": [ + { + "content": "The ocean is blue primarily because water absorbs colors in the red part of the light spectrum and scatters the blue light, making it more visible to our eyes.", + "similarity": 1 + }, + { + "content": "Blue light is scattered more by the water molecules than other colors, enhancing the blue appearance of the ocean.", + "similarity": .5 + } + ] // OR, YOU CAN RETURN AN ARRAY OF DOCUMENTS THAT WILL BE SENT TO THE MODEL + } + ``` + """ + + id: str = pydantic.Field() + """ + This is the id of the knowledge base. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field(alias="orgId", description="This is the org id of the knowledge base."), + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/custom_knowledge_base_provider.py b/src/vapi/types/custom_knowledge_base_provider.py new file mode 100644 index 00000000..11b243bc --- /dev/null +++ b/src/vapi/types/custom_knowledge_base_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CustomKnowledgeBaseProvider = typing.Union[typing.Literal["custom-knowledge-base"], typing.Any] diff --git a/src/vapi/types/custom_llm_credential.py b/src/vapi/types/custom_llm_credential.py index 0e9c3a27..c60fdbfb 100644 --- a/src/vapi/types/custom_llm_credential.py +++ b/src/vapi/types/custom_llm_credential.py @@ -1,39 +1,71 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +import datetime as dt import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic -import datetime as dt +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .custom_llm_credential_provider import CustomLlmCredentialProvider +from .o_auth_2_authentication_plan import OAuth2AuthenticationPlan +from .oauth_2_authentication_session import Oauth2AuthenticationSession -class CustomLlmCredential(UniversalBaseModel): - provider: typing.Literal["custom-llm"] = "custom-llm" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() - """ - This is not returned in the API. - """ - +class CustomLlmCredential(UncheckedBaseModel): + provider: CustomLlmCredentialProvider + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + authentication_plan: typing_extensions.Annotated[ + typing.Optional[OAuth2AuthenticationPlan], + FieldMetadata(alias="authenticationPlan"), + pydantic.Field( + alias="authenticationPlan", + description="This is the authentication plan. Currently supports OAuth2 RFC 6749. To use Bearer authentication, use apiKey", + ), + ] = None id: str = pydantic.Field() """ This is the unique identifier for the credential. """ - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field() - """ - This is the unique identifier for the org that this credential belongs to. - """ - - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the credential was created. - """ - - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + authentication_session: typing_extensions.Annotated[ + typing.Optional[Oauth2AuthenticationSession], + FieldMetadata(alias="authenticationSession"), + pydantic.Field( + alias="authenticationSession", + description="This is the authentication session for the credential. Available for credentials that have an authentication plan.", + ), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is the ISO 8601 date-time string of when the assistant was last updated. + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/custom_llm_credential_provider.py b/src/vapi/types/custom_llm_credential_provider.py new file mode 100644 index 00000000..8ea64572 --- /dev/null +++ b/src/vapi/types/custom_llm_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CustomLlmCredentialProvider = typing.Union[typing.Literal["custom-llm"], typing.Any] diff --git a/src/vapi/types/custom_llm_model.py b/src/vapi/types/custom_llm_model.py index d7f98dd5..04176e19 100644 --- a/src/vapi/types/custom_llm_model.py +++ b/src/vapi/types/custom_llm_model.py @@ -1,57 +1,56 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +from __future__ import annotations + import typing -from .open_ai_message import OpenAiMessage + import pydantic -from .custom_llm_model_tools_item import CustomLlmModelToolsItem import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_custom_knowledge_base_dto import CreateCustomKnowledgeBaseDto from .custom_llm_model_metadata_send_mode import CustomLlmModelMetadataSendMode -from .knowledge_base import KnowledgeBase -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from .open_ai_message import OpenAiMessage -class CustomLlmModel(UniversalBaseModel): +class CustomLlmModel(UncheckedBaseModel): messages: typing.Optional[typing.List[OpenAiMessage]] = pydantic.Field(default=None) """ This is the starting state for the conversation. """ - tools: typing.Optional[typing.List[CustomLlmModelToolsItem]] = pydantic.Field(default=None) + tools: typing.Optional[typing.List["CustomLlmModelToolsItem"]] = pydantic.Field(default=None) """ These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`. Both `tools` and `toolIds` can be used together. """ - tool_ids: typing_extensions.Annotated[typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds")] = ( - pydantic.Field(default=None) - ) - """ - These are the tools that the assistant can use during the call. To use transient tools, use `tools`. - - Both `tools` and `toolIds` can be used together. - """ - - provider: typing.Literal["custom-llm"] = pydantic.Field(default="custom-llm") - """ - This is the provider that will be used for the model. Any service, including your own server, that is compatible with the OpenAI API can be used. - """ - + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="toolIds"), + pydantic.Field( + alias="toolIds", + description="These are the tools that the assistant can use during the call. To use transient tools, use `tools`.\n\nBoth `tools` and `toolIds` can be used together.", + ), + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase", description="These are the options for the knowledge base."), + ] = None metadata_send_mode: typing_extensions.Annotated[ - typing.Optional[CustomLlmModelMetadataSendMode], FieldMetadata(alias="metadataSendMode") - ] = pydantic.Field(default=None) + typing.Optional[CustomLlmModelMetadataSendMode], + FieldMetadata(alias="metadataSendMode"), + pydantic.Field( + alias="metadataSendMode", + description="This determines whether metadata is sent in requests to the custom provider.\n\n- `off` will not send any metadata. payload will look like `{ messages }`\n- `variable` will send `assistant.metadata` as a variable on the payload. payload will look like `{ messages, metadata }`\n- `destructured` will send `assistant.metadata` fields directly on the payload. payload will look like `{ messages, ...metadata }`\n\nFurther, `variable` and `destructured` will send `call`, `phoneNumber`, and `customer` objects in the payload.\n\nDefault is `variable`.", + ), + ] = None + headers: typing.Optional[typing.Dict[str, str]] = pydantic.Field(default=None) """ - This determines whether metadata is sent in requests to the custom provider. - - - `off` will not send any metadata. payload will look like `{ messages }` - - `variable` will send `assistant.metadata` as a variable on the payload. payload will look like `{ messages, metadata }` - - `destructured` will send `assistant.metadata` fields directly on the payload. payload will look like `{ messages, ...metadata }` - - Further, `variable` and `destructured` will send `call`, `phoneNumber`, and `customer` objects in the payload. - - Default is `variable`. + Custom headers to send with requests. These headers can override default OpenAI headers except for Authorization (which should be specified using a custom-llm credential). """ url: str = pydantic.Field() @@ -59,6 +58,22 @@ class CustomLlmModel(UniversalBaseModel): These is the URL we'll use for the OpenAI client's `baseURL`. Ex. https://openrouter.ai/api/v1 """ + word_level_confidence_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="wordLevelConfidenceEnabled"), + pydantic.Field( + alias="wordLevelConfidenceEnabled", + description="This determines whether the transcriber's word level confidence is sent in requests to the custom provider. Default is false.\nThis only works for Deepgram transcribers.", + ), + ] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="timeoutSeconds"), + pydantic.Field( + alias="timeoutSeconds", + description="This sets the timeout for the connection to the custom provider without needing to stream any tokens back. Default is 20 seconds.", + ), + ] = None model: str = pydantic.Field() """ This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b @@ -69,41 +84,30 @@ class CustomLlmModel(UniversalBaseModel): This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency. """ - knowledge_base: typing_extensions.Annotated[ - typing.Optional[KnowledgeBase], FieldMetadata(alias="knowledgeBase") - ] = pydantic.Field(default=None) - """ - These are the options for the knowledge base. - """ - - max_tokens: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="maxTokens")] = pydantic.Field( - default=None - ) - """ - This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250. - """ - + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="maxTokens"), + pydantic.Field( + alias="maxTokens", + description="This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.", + ), + ] = None emotion_recognition_enabled: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="emotionRecognitionEnabled") - ] = pydantic.Field(default=None) - """ - This determines whether we detect user's emotion while they speak and send it as an additional info to model. - - Default `false` because the model is usually are good at understanding the user's emotion from text. - - @default false - """ - - num_fast_turns: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="numFastTurns")] = ( - pydantic.Field(default=None) - ) - """ - This sets how many turns at the start of the conversation to use a smaller, faster model from the same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai. - - Default is 0. - - @default 0 - """ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field( + alias="emotionRecognitionEnabled", + description="This determines whether we detect user's emotion while they speak and send it as an additional info to model.\n\nDefault `false` because the model is usually are good at understanding the user's emotion from text.\n\n@default false", + ), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="numFastTurns"), + pydantic.Field( + alias="numFastTurns", + description="This sets how many turns at the start of the conversation to use a smaller, faster model from the same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai.\n\nDefault is 0.\n\n@default 0", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -113,3 +117,121 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + CustomLlmModel, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/custom_llm_model_tools_item.py b/src/vapi/types/custom_llm_model_tools_item.py index 0dcb901b..aaf37e10 100644 --- a/src/vapi/types/custom_llm_model_tools_item.py +++ b/src/vapi/types/custom_llm_model_tools_item.py @@ -1,20 +1,731 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .create_dtmf_tool_dto import CreateDtmfToolDto -from .create_end_call_tool_dto import CreateEndCallToolDto -from .create_voicemail_tool_dto import CreateVoicemailToolDto -from .create_function_tool_dto import CreateFunctionToolDto -from .create_ghl_tool_dto import CreateGhlToolDto -from .create_make_tool_dto import CreateMakeToolDto -from .create_transfer_call_tool_dto import CreateTransferCallToolDto - -CustomLlmModelToolsItem = typing.Union[ - CreateDtmfToolDto, - CreateEndCallToolDto, - CreateVoicemailToolDto, - CreateFunctionToolDto, - CreateGhlToolDto, - CreateMakeToolDto, - CreateTransferCallToolDto, + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .backoff_plan import BackoffPlan +from .code_tool_environment_variable import CodeToolEnvironmentVariable +from .create_api_request_tool_dto_messages_item import CreateApiRequestToolDtoMessagesItem +from .create_api_request_tool_dto_method import CreateApiRequestToolDtoMethod +from .create_bash_tool_dto_messages_item import CreateBashToolDtoMessagesItem +from .create_bash_tool_dto_name import CreateBashToolDtoName +from .create_bash_tool_dto_sub_type import CreateBashToolDtoSubType +from .create_code_tool_dto_messages_item import CreateCodeToolDtoMessagesItem +from .create_computer_tool_dto_messages_item import CreateComputerToolDtoMessagesItem +from .create_computer_tool_dto_name import CreateComputerToolDtoName +from .create_computer_tool_dto_sub_type import CreateComputerToolDtoSubType +from .create_dtmf_tool_dto_messages_item import CreateDtmfToolDtoMessagesItem +from .create_end_call_tool_dto_messages_item import CreateEndCallToolDtoMessagesItem +from .create_function_tool_dto_messages_item import CreateFunctionToolDtoMessagesItem +from .create_go_high_level_calendar_availability_tool_dto_messages_item import ( + CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem, +) +from .create_go_high_level_calendar_event_create_tool_dto_messages_item import ( + CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_create_tool_dto_messages_item import ( + CreateGoHighLevelContactCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_get_tool_dto_messages_item import CreateGoHighLevelContactGetToolDtoMessagesItem +from .create_google_calendar_check_availability_tool_dto_messages_item import ( + CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem, +) +from .create_google_calendar_create_event_tool_dto_messages_item import ( + CreateGoogleCalendarCreateEventToolDtoMessagesItem, +) +from .create_google_sheets_row_append_tool_dto_messages_item import CreateGoogleSheetsRowAppendToolDtoMessagesItem +from .create_handoff_tool_dto_messages_item import CreateHandoffToolDtoMessagesItem +from .create_mcp_tool_dto_messages_item import CreateMcpToolDtoMessagesItem +from .create_query_tool_dto_messages_item import CreateQueryToolDtoMessagesItem +from .create_sip_request_tool_dto_body import CreateSipRequestToolDtoBody +from .create_sip_request_tool_dto_messages_item import CreateSipRequestToolDtoMessagesItem +from .create_sip_request_tool_dto_verb import CreateSipRequestToolDtoVerb +from .create_slack_send_message_tool_dto_messages_item import CreateSlackSendMessageToolDtoMessagesItem +from .create_sms_tool_dto_messages_item import CreateSmsToolDtoMessagesItem +from .create_text_editor_tool_dto_messages_item import CreateTextEditorToolDtoMessagesItem +from .create_text_editor_tool_dto_name import CreateTextEditorToolDtoName +from .create_text_editor_tool_dto_sub_type import CreateTextEditorToolDtoSubType +from .create_transfer_call_tool_dto_destinations_item import CreateTransferCallToolDtoDestinationsItem +from .create_transfer_call_tool_dto_messages_item import CreateTransferCallToolDtoMessagesItem +from .create_voicemail_tool_dto_messages_item import CreateVoicemailToolDtoMessagesItem +from .knowledge_base import KnowledgeBase +from .mcp_tool_messages import McpToolMessages +from .mcp_tool_metadata import McpToolMetadata +from .open_ai_function import OpenAiFunction +from .server import Server +from .tool_parameter import ToolParameter +from .tool_rejection_plan import ToolRejectionPlan +from .variable_extraction_plan import VariableExtractionPlan + + +class CustomLlmModelToolsItem_ApiRequest(UncheckedBaseModel): + type: typing.Literal["apiRequest"] = "apiRequest" + messages: typing.Optional[typing.List[CreateApiRequestToolDtoMessagesItem]] = None + method: CreateApiRequestToolDtoMethod + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + encrypted_paths: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="encryptedPaths"), pydantic.Field(alias="encryptedPaths") + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + name: typing.Optional[str] = None + description: typing.Optional[str] = None + url: str + body: typing.Optional["JsonSchema"] = None + headers: typing.Optional["JsonSchema"] = None + backoff_plan: typing_extensions.Annotated[ + typing.Optional[BackoffPlan], FieldMetadata(alias="backoffPlan"), pydantic.Field(alias="backoffPlan") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CustomLlmModelToolsItem_Bash(UncheckedBaseModel): + type: typing.Literal["bash"] = "bash" + messages: typing.Optional[typing.List[CreateBashToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateBashToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateBashToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CustomLlmModelToolsItem_Code(UncheckedBaseModel): + type: typing.Literal["code"] = "code" + messages: typing.Optional[typing.List[CreateCodeToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + code: str + environment_variables: typing_extensions.Annotated[ + typing.Optional[typing.List[CodeToolEnvironmentVariable]], + FieldMetadata(alias="environmentVariables"), + pydantic.Field(alias="environmentVariables"), + ] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CustomLlmModelToolsItem_Computer(UncheckedBaseModel): + type: typing.Literal["computer"] = "computer" + messages: typing.Optional[typing.List[CreateComputerToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateComputerToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateComputerToolDtoName + display_width_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayWidthPx"), pydantic.Field(alias="displayWidthPx") + ] + display_height_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayHeightPx"), pydantic.Field(alias="displayHeightPx") + ] + display_number: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="displayNumber"), pydantic.Field(alias="displayNumber") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CustomLlmModelToolsItem_Dtmf(UncheckedBaseModel): + type: typing.Literal["dtmf"] = "dtmf" + messages: typing.Optional[typing.List[CreateDtmfToolDtoMessagesItem]] = None + sip_info_dtmf_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="sipInfoDtmfEnabled"), pydantic.Field(alias="sipInfoDtmfEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CustomLlmModelToolsItem_EndCall(UncheckedBaseModel): + type: typing.Literal["endCall"] = "endCall" + messages: typing.Optional[typing.List[CreateEndCallToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CustomLlmModelToolsItem_Function(UncheckedBaseModel): + type: typing.Literal["function"] = "function" + messages: typing.Optional[typing.List[CreateFunctionToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CustomLlmModelToolsItem_GohighlevelCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.availability.check"] = "gohighlevel.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CustomLlmModelToolsItem_GohighlevelCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.event.create"] = "gohighlevel.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CustomLlmModelToolsItem_GohighlevelContactCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.create"] = "gohighlevel.contact.create" + messages: typing.Optional[typing.List[CreateGoHighLevelContactCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CustomLlmModelToolsItem_GohighlevelContactGet(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.get"] = "gohighlevel.contact.get" + messages: typing.Optional[typing.List[CreateGoHighLevelContactGetToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CustomLlmModelToolsItem_GoogleCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["google.calendar.availability.check"] = "google.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CustomLlmModelToolsItem_GoogleCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["google.calendar.event.create"] = "google.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoogleCalendarCreateEventToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CustomLlmModelToolsItem_GoogleSheetsRowAppend(UncheckedBaseModel): + type: typing.Literal["google.sheets.row.append"] = "google.sheets.row.append" + messages: typing.Optional[typing.List[CreateGoogleSheetsRowAppendToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CustomLlmModelToolsItem_Handoff(UncheckedBaseModel): + type: typing.Literal["handoff"] = "handoff" + messages: typing.Optional[typing.List[CreateHandoffToolDtoMessagesItem]] = None + default_result: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="defaultResult"), pydantic.Field(alias="defaultResult") + ] = None + destinations: typing.Optional[typing.List["CreateHandoffToolDtoDestinationsItem"]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CustomLlmModelToolsItem_Mcp(UncheckedBaseModel): + type: typing.Literal["mcp"] = "mcp" + messages: typing.Optional[typing.List[CreateMcpToolDtoMessagesItem]] = None + server: typing.Optional[Server] = None + tool_messages: typing_extensions.Annotated[ + typing.Optional[typing.List[McpToolMessages]], + FieldMetadata(alias="toolMessages"), + pydantic.Field(alias="toolMessages"), + ] = None + metadata: typing.Optional[McpToolMetadata] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CustomLlmModelToolsItem_Query(UncheckedBaseModel): + type: typing.Literal["query"] = "query" + messages: typing.Optional[typing.List[CreateQueryToolDtoMessagesItem]] = None + knowledge_bases: typing_extensions.Annotated[ + typing.Optional[typing.List[KnowledgeBase]], + FieldMetadata(alias="knowledgeBases"), + pydantic.Field(alias="knowledgeBases"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CustomLlmModelToolsItem_SlackMessageSend(UncheckedBaseModel): + type: typing.Literal["slack.message.send"] = "slack.message.send" + messages: typing.Optional[typing.List[CreateSlackSendMessageToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CustomLlmModelToolsItem_Sms(UncheckedBaseModel): + type: typing.Literal["sms"] = "sms" + messages: typing.Optional[typing.List[CreateSmsToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CustomLlmModelToolsItem_TextEditor(UncheckedBaseModel): + type: typing.Literal["textEditor"] = "textEditor" + messages: typing.Optional[typing.List[CreateTextEditorToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateTextEditorToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateTextEditorToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CustomLlmModelToolsItem_TransferCall(UncheckedBaseModel): + type: typing.Literal["transferCall"] = "transferCall" + messages: typing.Optional[typing.List[CreateTransferCallToolDtoMessagesItem]] = None + destinations: typing.Optional[typing.List[CreateTransferCallToolDtoDestinationsItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CustomLlmModelToolsItem_SipRequest(UncheckedBaseModel): + type: typing.Literal["sipRequest"] = "sipRequest" + messages: typing.Optional[typing.List[CreateSipRequestToolDtoMessagesItem]] = None + verb: CreateSipRequestToolDtoVerb + headers: typing.Optional["JsonSchema"] = None + body: typing.Optional[CreateSipRequestToolDtoBody] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class CustomLlmModelToolsItem_Voicemail(UncheckedBaseModel): + type: typing.Literal["voicemail"] = "voicemail" + messages: typing.Optional[typing.List[CreateVoicemailToolDtoMessagesItem]] = None + beep_detection_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="beepDetectionEnabled"), pydantic.Field(alias="beepDetectionEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +CustomLlmModelToolsItem = typing_extensions.Annotated[ + typing.Union[ + CustomLlmModelToolsItem_ApiRequest, + CustomLlmModelToolsItem_Bash, + CustomLlmModelToolsItem_Code, + CustomLlmModelToolsItem_Computer, + CustomLlmModelToolsItem_Dtmf, + CustomLlmModelToolsItem_EndCall, + CustomLlmModelToolsItem_Function, + CustomLlmModelToolsItem_GohighlevelCalendarAvailabilityCheck, + CustomLlmModelToolsItem_GohighlevelCalendarEventCreate, + CustomLlmModelToolsItem_GohighlevelContactCreate, + CustomLlmModelToolsItem_GohighlevelContactGet, + CustomLlmModelToolsItem_GoogleCalendarAvailabilityCheck, + CustomLlmModelToolsItem_GoogleCalendarEventCreate, + CustomLlmModelToolsItem_GoogleSheetsRowAppend, + CustomLlmModelToolsItem_Handoff, + CustomLlmModelToolsItem_Mcp, + CustomLlmModelToolsItem_Query, + CustomLlmModelToolsItem_SlackMessageSend, + CustomLlmModelToolsItem_Sms, + CustomLlmModelToolsItem_TextEditor, + CustomLlmModelToolsItem_TransferCall, + CustomLlmModelToolsItem_SipRequest, + CustomLlmModelToolsItem_Voicemail, + ], + UnionMetadata(discriminant="type"), ] +from .json_schema import JsonSchema # noqa: E402, I001 +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs(CustomLlmModelToolsItem_ApiRequest, JsonSchema=JsonSchema) +update_forward_refs(CustomLlmModelToolsItem_Bash) +update_forward_refs(CustomLlmModelToolsItem_Code) +update_forward_refs(CustomLlmModelToolsItem_Computer) +update_forward_refs(CustomLlmModelToolsItem_Dtmf) +update_forward_refs(CustomLlmModelToolsItem_EndCall) +update_forward_refs(CustomLlmModelToolsItem_Function) +update_forward_refs(CustomLlmModelToolsItem_GohighlevelCalendarAvailabilityCheck) +update_forward_refs(CustomLlmModelToolsItem_GohighlevelCalendarEventCreate) +update_forward_refs(CustomLlmModelToolsItem_GohighlevelContactCreate) +update_forward_refs(CustomLlmModelToolsItem_GohighlevelContactGet) +update_forward_refs(CustomLlmModelToolsItem_GoogleCalendarAvailabilityCheck) +update_forward_refs(CustomLlmModelToolsItem_GoogleCalendarEventCreate) +update_forward_refs(CustomLlmModelToolsItem_GoogleSheetsRowAppend) +update_forward_refs( + CustomLlmModelToolsItem_Handoff, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs(CustomLlmModelToolsItem_Mcp) +update_forward_refs(CustomLlmModelToolsItem_Query) +update_forward_refs(CustomLlmModelToolsItem_SlackMessageSend) +update_forward_refs(CustomLlmModelToolsItem_Sms) +update_forward_refs(CustomLlmModelToolsItem_TextEditor) +update_forward_refs(CustomLlmModelToolsItem_TransferCall) +update_forward_refs(CustomLlmModelToolsItem_SipRequest, JsonSchema=JsonSchema) +update_forward_refs(CustomLlmModelToolsItem_Voicemail) diff --git a/src/vapi/types/custom_message.py b/src/vapi/types/custom_message.py new file mode 100644 index 00000000..8668d547 --- /dev/null +++ b/src/vapi/types/custom_message.py @@ -0,0 +1,41 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .custom_message_type import CustomMessageType +from .text_content import TextContent + + +class CustomMessage(UncheckedBaseModel): + contents: typing.Optional[typing.List[TextContent]] = pydantic.Field(default=None) + """ + This is an alternative to the `content` property. It allows to specify variants of the same content, one per language. + + Usage: + - If your assistants are multilingual, you can provide content for each language. + - If you don't provide content for a language, the first item in the array will be automatically translated to the active language at that moment. + + This will override the `content` property. + """ + + type: CustomMessageType = pydantic.Field() + """ + This is a custom message. + """ + + content: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the content that the assistant will say when this message is triggered. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/custom_message_type.py b/src/vapi/types/custom_message_type.py new file mode 100644 index 00000000..2c8a8103 --- /dev/null +++ b/src/vapi/types/custom_message_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CustomMessageType = typing.Union[typing.Literal["custom-message"], typing.Any] diff --git a/src/vapi/types/custom_transcriber.py b/src/vapi/types/custom_transcriber.py new file mode 100644 index 00000000..a0b86096 --- /dev/null +++ b/src/vapi/types/custom_transcriber.py @@ -0,0 +1,73 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .fallback_transcriber_plan import FallbackTranscriberPlan +from .server import Server + + +class CustomTranscriber(UncheckedBaseModel): + server: Server = pydantic.Field() + """ + This is where the transcription request will be sent. + + Usage: + 1. Vapi will initiate a websocket connection with `server.url`. + + 2. Vapi will send an initial text frame with the sample rate. Format: + ``` + { + "type": "start", + "encoding": "linear16", // 16-bit raw PCM format + "container": "raw", + "sampleRate": {{sampleRate}}, + "channels": 2 // customer is channel 0, assistant is channel 1 + } + ``` + + 3. Vapi will send the audio data in 16-bit raw PCM format as binary frames. + + 4. You can read the messages something like this: + ``` + ws.on('message', (data, isBinary) => { + if (isBinary) { + pcmBuffer = Buffer.concat([pcmBuffer, data]); + console.log(`Received PCM data, buffer size: ${pcmBuffer.length}`); + } else { + console.log('Received message:', JSON.parse(data.toString())); + } + }); + ``` + + 5. You will respond with transcriptions as you have them. Format: + ``` + { + "type": "transcriber-response", + "transcription": "Hello, world!", + "channel": "customer" | "assistant" + } + ``` + """ + + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field( + alias="fallbackPlan", + description="This is the plan for transcriber provider fallbacks in the event that the primary transcriber provider fails.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/custom_voice.py b/src/vapi/types/custom_voice.py new file mode 100644 index 00000000..ba9eef7f --- /dev/null +++ b/src/vapi/types/custom_voice.py @@ -0,0 +1,81 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .chunk_plan import ChunkPlan +from .fallback_plan import FallbackPlan +from .server import Server + + +class CustomVoice(UncheckedBaseModel): + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="cachingEnabled"), + pydantic.Field( + alias="cachingEnabled", description="This is the flag to toggle voice caching for the assistant." + ), + ] = None + voice_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="voiceId"), + pydantic.Field( + alias="voiceId", + description="This is the provider-specific ID that will be used. This is passed in the voice request payload to identify the voice to use.", + ), + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], + FieldMetadata(alias="chunkPlan"), + pydantic.Field( + alias="chunkPlan", + description="This is the plan for chunking the model output before it is sent to the voice provider.", + ), + ] = None + server: Server = pydantic.Field() + """ + This is where the voice request will be sent. + + Request Example: + + POST https://{server.url} + Content-Type: application/json + + { + "message": { + "type": "voice-request", + "text": "Hello, world!", + "sampleRate": 24000, + ...other metadata about the call... + } + } + + Response Expected: 1-channel 16-bit raw PCM audio at the sample rate specified in the request. Here is how the response will be piped to the transport: + ``` + response.on('data', (chunk: Buffer) => { + outputStream.write(chunk); + }); + ``` + """ + + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field( + alias="fallbackPlan", + description="This is the plan for voice provider fallbacks in the event that the primary voice provider fails.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/customer_custom_endpointing_rule.py b/src/vapi/types/customer_custom_endpointing_rule.py new file mode 100644 index 00000000..79aa7ceb --- /dev/null +++ b/src/vapi/types/customer_custom_endpointing_rule.py @@ -0,0 +1,49 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .regex_option import RegexOption + + +class CustomerCustomEndpointingRule(UncheckedBaseModel): + regex: str = pydantic.Field() + """ + This is the regex pattern to match. + + Note: + - This works by using the `RegExp.test` method in Node.JS. Eg. `/hello/.test("hello there")` will return `true`. + + Hot tip: + - In JavaScript, escape `\\` when sending the regex pattern. Eg. `"hello\\sthere"` will be sent over the wire as `"hellosthere"`. Send `"hello\\\\sthere"` instead. + - `RegExp.test` does substring matching, so `/cat/.test("I love cats")` will return `true`. To do full string matching, send "^cat$". + """ + + regex_options: typing_extensions.Annotated[ + typing.Optional[typing.List[RegexOption]], + FieldMetadata(alias="regexOptions"), + pydantic.Field( + alias="regexOptions", + description="These are the options for the regex match. Defaults to all disabled.\n\n@default []", + ), + ] = None + timeout_seconds: typing_extensions.Annotated[ + float, + FieldMetadata(alias="timeoutSeconds"), + pydantic.Field( + alias="timeoutSeconds", description="This is the endpointing timeout in seconds, if the rule is matched." + ), + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/customer_speech_timeout_options.py b/src/vapi/types/customer_speech_timeout_options.py new file mode 100644 index 00000000..4c4b3d89 --- /dev/null +++ b/src/vapi/types/customer_speech_timeout_options.py @@ -0,0 +1,45 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class CustomerSpeechTimeoutOptions(UncheckedBaseModel): + timeout_seconds: typing_extensions.Annotated[ + float, + FieldMetadata(alias="timeoutSeconds"), + pydantic.Field( + alias="timeoutSeconds", + description="This is the timeout in seconds before action is triggered.\nThe clock starts when the assistant finishes speaking and remains active until the user speaks.\n\n@default 7.5", + ), + ] + trigger_max_count: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="triggerMaxCount"), + pydantic.Field( + alias="triggerMaxCount", + description="This is the maximum number of times the hook will trigger in a call.\n\n@default 3", + ), + ] = None + trigger_reset_mode: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="triggerResetMode"), + pydantic.Field( + alias="triggerResetMode", + description="This is whether the counter for hook trigger resets the user speaks.\n\n@default never", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/deep_infra_credential.py b/src/vapi/types/deep_infra_credential.py index d4660c05..70bcde32 100644 --- a/src/vapi/types/deep_infra_credential.py +++ b/src/vapi/types/deep_infra_credential.py @@ -1,39 +1,53 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +import datetime as dt import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic -import datetime as dt +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .deep_infra_credential_provider import DeepInfraCredentialProvider -class DeepInfraCredential(UniversalBaseModel): - provider: typing.Literal["deepinfra"] = "deepinfra" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() - """ - This is not returned in the API. - """ - +class DeepInfraCredential(UncheckedBaseModel): + provider: DeepInfraCredentialProvider + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] id: str = pydantic.Field() """ This is the unique identifier for the credential. """ - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field() - """ - This is the unique identifier for the org that this credential belongs to. - """ - - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the credential was created. - """ - - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the assistant was last updated. + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/deep_infra_credential_provider.py b/src/vapi/types/deep_infra_credential_provider.py new file mode 100644 index 00000000..b3aa1787 --- /dev/null +++ b/src/vapi/types/deep_infra_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +DeepInfraCredentialProvider = typing.Union[typing.Literal["deepinfra"], typing.Any] diff --git a/src/vapi/types/deep_infra_model.py b/src/vapi/types/deep_infra_model.py index a42efedf..98ee2064 100644 --- a/src/vapi/types/deep_infra_model.py +++ b/src/vapi/types/deep_infra_model.py @@ -1,39 +1,44 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +from __future__ import annotations + import typing -from .open_ai_message import OpenAiMessage + import pydantic -from .deep_infra_model_tools_item import DeepInfraModelToolsItem import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.serialization import FieldMetadata -from .knowledge_base import KnowledgeBase -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_custom_knowledge_base_dto import CreateCustomKnowledgeBaseDto +from .open_ai_message import OpenAiMessage -class DeepInfraModel(UniversalBaseModel): +class DeepInfraModel(UncheckedBaseModel): messages: typing.Optional[typing.List[OpenAiMessage]] = pydantic.Field(default=None) """ This is the starting state for the conversation. """ - tools: typing.Optional[typing.List[DeepInfraModelToolsItem]] = pydantic.Field(default=None) + tools: typing.Optional[typing.List["DeepInfraModelToolsItem"]] = pydantic.Field(default=None) """ These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`. Both `tools` and `toolIds` can be used together. """ - tool_ids: typing_extensions.Annotated[typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds")] = ( - pydantic.Field(default=None) - ) - """ - These are the tools that the assistant can use during the call. To use transient tools, use `tools`. - - Both `tools` and `toolIds` can be used together. - """ - - provider: typing.Literal["deepinfra"] = "deepinfra" + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="toolIds"), + pydantic.Field( + alias="toolIds", + description="These are the tools that the assistant can use during the call. To use transient tools, use `tools`.\n\nBoth `tools` and `toolIds` can be used together.", + ), + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase", description="These are the options for the knowledge base."), + ] = None model: str = pydantic.Field() """ This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b @@ -44,41 +49,30 @@ class DeepInfraModel(UniversalBaseModel): This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency. """ - knowledge_base: typing_extensions.Annotated[ - typing.Optional[KnowledgeBase], FieldMetadata(alias="knowledgeBase") - ] = pydantic.Field(default=None) - """ - These are the options for the knowledge base. - """ - - max_tokens: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="maxTokens")] = pydantic.Field( - default=None - ) - """ - This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250. - """ - + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="maxTokens"), + pydantic.Field( + alias="maxTokens", + description="This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.", + ), + ] = None emotion_recognition_enabled: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="emotionRecognitionEnabled") - ] = pydantic.Field(default=None) - """ - This determines whether we detect user's emotion while they speak and send it as an additional info to model. - - Default `false` because the model is usually are good at understanding the user's emotion from text. - - @default false - """ - - num_fast_turns: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="numFastTurns")] = ( - pydantic.Field(default=None) - ) - """ - This sets how many turns at the start of the conversation to use a smaller, faster model from the same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai. - - Default is 0. - - @default 0 - """ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field( + alias="emotionRecognitionEnabled", + description="This determines whether we detect user's emotion while they speak and send it as an additional info to model.\n\nDefault `false` because the model is usually are good at understanding the user's emotion from text.\n\n@default false", + ), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="numFastTurns"), + pydantic.Field( + alias="numFastTurns", + description="This sets how many turns at the start of the conversation to use a smaller, faster model from the same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai.\n\nDefault is 0.\n\n@default 0", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -88,3 +82,121 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + DeepInfraModel, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/deep_infra_model_tools_item.py b/src/vapi/types/deep_infra_model_tools_item.py index 645f4fe1..a6596db5 100644 --- a/src/vapi/types/deep_infra_model_tools_item.py +++ b/src/vapi/types/deep_infra_model_tools_item.py @@ -1,20 +1,731 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .create_dtmf_tool_dto import CreateDtmfToolDto -from .create_end_call_tool_dto import CreateEndCallToolDto -from .create_voicemail_tool_dto import CreateVoicemailToolDto -from .create_function_tool_dto import CreateFunctionToolDto -from .create_ghl_tool_dto import CreateGhlToolDto -from .create_make_tool_dto import CreateMakeToolDto -from .create_transfer_call_tool_dto import CreateTransferCallToolDto - -DeepInfraModelToolsItem = typing.Union[ - CreateDtmfToolDto, - CreateEndCallToolDto, - CreateVoicemailToolDto, - CreateFunctionToolDto, - CreateGhlToolDto, - CreateMakeToolDto, - CreateTransferCallToolDto, + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .backoff_plan import BackoffPlan +from .code_tool_environment_variable import CodeToolEnvironmentVariable +from .create_api_request_tool_dto_messages_item import CreateApiRequestToolDtoMessagesItem +from .create_api_request_tool_dto_method import CreateApiRequestToolDtoMethod +from .create_bash_tool_dto_messages_item import CreateBashToolDtoMessagesItem +from .create_bash_tool_dto_name import CreateBashToolDtoName +from .create_bash_tool_dto_sub_type import CreateBashToolDtoSubType +from .create_code_tool_dto_messages_item import CreateCodeToolDtoMessagesItem +from .create_computer_tool_dto_messages_item import CreateComputerToolDtoMessagesItem +from .create_computer_tool_dto_name import CreateComputerToolDtoName +from .create_computer_tool_dto_sub_type import CreateComputerToolDtoSubType +from .create_dtmf_tool_dto_messages_item import CreateDtmfToolDtoMessagesItem +from .create_end_call_tool_dto_messages_item import CreateEndCallToolDtoMessagesItem +from .create_function_tool_dto_messages_item import CreateFunctionToolDtoMessagesItem +from .create_go_high_level_calendar_availability_tool_dto_messages_item import ( + CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem, +) +from .create_go_high_level_calendar_event_create_tool_dto_messages_item import ( + CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_create_tool_dto_messages_item import ( + CreateGoHighLevelContactCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_get_tool_dto_messages_item import CreateGoHighLevelContactGetToolDtoMessagesItem +from .create_google_calendar_check_availability_tool_dto_messages_item import ( + CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem, +) +from .create_google_calendar_create_event_tool_dto_messages_item import ( + CreateGoogleCalendarCreateEventToolDtoMessagesItem, +) +from .create_google_sheets_row_append_tool_dto_messages_item import CreateGoogleSheetsRowAppendToolDtoMessagesItem +from .create_handoff_tool_dto_messages_item import CreateHandoffToolDtoMessagesItem +from .create_mcp_tool_dto_messages_item import CreateMcpToolDtoMessagesItem +from .create_query_tool_dto_messages_item import CreateQueryToolDtoMessagesItem +from .create_sip_request_tool_dto_body import CreateSipRequestToolDtoBody +from .create_sip_request_tool_dto_messages_item import CreateSipRequestToolDtoMessagesItem +from .create_sip_request_tool_dto_verb import CreateSipRequestToolDtoVerb +from .create_slack_send_message_tool_dto_messages_item import CreateSlackSendMessageToolDtoMessagesItem +from .create_sms_tool_dto_messages_item import CreateSmsToolDtoMessagesItem +from .create_text_editor_tool_dto_messages_item import CreateTextEditorToolDtoMessagesItem +from .create_text_editor_tool_dto_name import CreateTextEditorToolDtoName +from .create_text_editor_tool_dto_sub_type import CreateTextEditorToolDtoSubType +from .create_transfer_call_tool_dto_destinations_item import CreateTransferCallToolDtoDestinationsItem +from .create_transfer_call_tool_dto_messages_item import CreateTransferCallToolDtoMessagesItem +from .create_voicemail_tool_dto_messages_item import CreateVoicemailToolDtoMessagesItem +from .knowledge_base import KnowledgeBase +from .mcp_tool_messages import McpToolMessages +from .mcp_tool_metadata import McpToolMetadata +from .open_ai_function import OpenAiFunction +from .server import Server +from .tool_parameter import ToolParameter +from .tool_rejection_plan import ToolRejectionPlan +from .variable_extraction_plan import VariableExtractionPlan + + +class DeepInfraModelToolsItem_ApiRequest(UncheckedBaseModel): + type: typing.Literal["apiRequest"] = "apiRequest" + messages: typing.Optional[typing.List[CreateApiRequestToolDtoMessagesItem]] = None + method: CreateApiRequestToolDtoMethod + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + encrypted_paths: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="encryptedPaths"), pydantic.Field(alias="encryptedPaths") + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + name: typing.Optional[str] = None + description: typing.Optional[str] = None + url: str + body: typing.Optional["JsonSchema"] = None + headers: typing.Optional["JsonSchema"] = None + backoff_plan: typing_extensions.Annotated[ + typing.Optional[BackoffPlan], FieldMetadata(alias="backoffPlan"), pydantic.Field(alias="backoffPlan") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeepInfraModelToolsItem_Bash(UncheckedBaseModel): + type: typing.Literal["bash"] = "bash" + messages: typing.Optional[typing.List[CreateBashToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateBashToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateBashToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeepInfraModelToolsItem_Code(UncheckedBaseModel): + type: typing.Literal["code"] = "code" + messages: typing.Optional[typing.List[CreateCodeToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + code: str + environment_variables: typing_extensions.Annotated[ + typing.Optional[typing.List[CodeToolEnvironmentVariable]], + FieldMetadata(alias="environmentVariables"), + pydantic.Field(alias="environmentVariables"), + ] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeepInfraModelToolsItem_Computer(UncheckedBaseModel): + type: typing.Literal["computer"] = "computer" + messages: typing.Optional[typing.List[CreateComputerToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateComputerToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateComputerToolDtoName + display_width_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayWidthPx"), pydantic.Field(alias="displayWidthPx") + ] + display_height_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayHeightPx"), pydantic.Field(alias="displayHeightPx") + ] + display_number: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="displayNumber"), pydantic.Field(alias="displayNumber") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeepInfraModelToolsItem_Dtmf(UncheckedBaseModel): + type: typing.Literal["dtmf"] = "dtmf" + messages: typing.Optional[typing.List[CreateDtmfToolDtoMessagesItem]] = None + sip_info_dtmf_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="sipInfoDtmfEnabled"), pydantic.Field(alias="sipInfoDtmfEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeepInfraModelToolsItem_EndCall(UncheckedBaseModel): + type: typing.Literal["endCall"] = "endCall" + messages: typing.Optional[typing.List[CreateEndCallToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeepInfraModelToolsItem_Function(UncheckedBaseModel): + type: typing.Literal["function"] = "function" + messages: typing.Optional[typing.List[CreateFunctionToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeepInfraModelToolsItem_GohighlevelCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.availability.check"] = "gohighlevel.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeepInfraModelToolsItem_GohighlevelCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.event.create"] = "gohighlevel.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeepInfraModelToolsItem_GohighlevelContactCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.create"] = "gohighlevel.contact.create" + messages: typing.Optional[typing.List[CreateGoHighLevelContactCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeepInfraModelToolsItem_GohighlevelContactGet(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.get"] = "gohighlevel.contact.get" + messages: typing.Optional[typing.List[CreateGoHighLevelContactGetToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeepInfraModelToolsItem_GoogleCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["google.calendar.availability.check"] = "google.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeepInfraModelToolsItem_GoogleCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["google.calendar.event.create"] = "google.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoogleCalendarCreateEventToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeepInfraModelToolsItem_GoogleSheetsRowAppend(UncheckedBaseModel): + type: typing.Literal["google.sheets.row.append"] = "google.sheets.row.append" + messages: typing.Optional[typing.List[CreateGoogleSheetsRowAppendToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeepInfraModelToolsItem_Handoff(UncheckedBaseModel): + type: typing.Literal["handoff"] = "handoff" + messages: typing.Optional[typing.List[CreateHandoffToolDtoMessagesItem]] = None + default_result: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="defaultResult"), pydantic.Field(alias="defaultResult") + ] = None + destinations: typing.Optional[typing.List["CreateHandoffToolDtoDestinationsItem"]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeepInfraModelToolsItem_Mcp(UncheckedBaseModel): + type: typing.Literal["mcp"] = "mcp" + messages: typing.Optional[typing.List[CreateMcpToolDtoMessagesItem]] = None + server: typing.Optional[Server] = None + tool_messages: typing_extensions.Annotated[ + typing.Optional[typing.List[McpToolMessages]], + FieldMetadata(alias="toolMessages"), + pydantic.Field(alias="toolMessages"), + ] = None + metadata: typing.Optional[McpToolMetadata] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeepInfraModelToolsItem_Query(UncheckedBaseModel): + type: typing.Literal["query"] = "query" + messages: typing.Optional[typing.List[CreateQueryToolDtoMessagesItem]] = None + knowledge_bases: typing_extensions.Annotated[ + typing.Optional[typing.List[KnowledgeBase]], + FieldMetadata(alias="knowledgeBases"), + pydantic.Field(alias="knowledgeBases"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeepInfraModelToolsItem_SlackMessageSend(UncheckedBaseModel): + type: typing.Literal["slack.message.send"] = "slack.message.send" + messages: typing.Optional[typing.List[CreateSlackSendMessageToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeepInfraModelToolsItem_Sms(UncheckedBaseModel): + type: typing.Literal["sms"] = "sms" + messages: typing.Optional[typing.List[CreateSmsToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeepInfraModelToolsItem_TextEditor(UncheckedBaseModel): + type: typing.Literal["textEditor"] = "textEditor" + messages: typing.Optional[typing.List[CreateTextEditorToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateTextEditorToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateTextEditorToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeepInfraModelToolsItem_TransferCall(UncheckedBaseModel): + type: typing.Literal["transferCall"] = "transferCall" + messages: typing.Optional[typing.List[CreateTransferCallToolDtoMessagesItem]] = None + destinations: typing.Optional[typing.List[CreateTransferCallToolDtoDestinationsItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeepInfraModelToolsItem_SipRequest(UncheckedBaseModel): + type: typing.Literal["sipRequest"] = "sipRequest" + messages: typing.Optional[typing.List[CreateSipRequestToolDtoMessagesItem]] = None + verb: CreateSipRequestToolDtoVerb + headers: typing.Optional["JsonSchema"] = None + body: typing.Optional[CreateSipRequestToolDtoBody] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeepInfraModelToolsItem_Voicemail(UncheckedBaseModel): + type: typing.Literal["voicemail"] = "voicemail" + messages: typing.Optional[typing.List[CreateVoicemailToolDtoMessagesItem]] = None + beep_detection_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="beepDetectionEnabled"), pydantic.Field(alias="beepDetectionEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +DeepInfraModelToolsItem = typing_extensions.Annotated[ + typing.Union[ + DeepInfraModelToolsItem_ApiRequest, + DeepInfraModelToolsItem_Bash, + DeepInfraModelToolsItem_Code, + DeepInfraModelToolsItem_Computer, + DeepInfraModelToolsItem_Dtmf, + DeepInfraModelToolsItem_EndCall, + DeepInfraModelToolsItem_Function, + DeepInfraModelToolsItem_GohighlevelCalendarAvailabilityCheck, + DeepInfraModelToolsItem_GohighlevelCalendarEventCreate, + DeepInfraModelToolsItem_GohighlevelContactCreate, + DeepInfraModelToolsItem_GohighlevelContactGet, + DeepInfraModelToolsItem_GoogleCalendarAvailabilityCheck, + DeepInfraModelToolsItem_GoogleCalendarEventCreate, + DeepInfraModelToolsItem_GoogleSheetsRowAppend, + DeepInfraModelToolsItem_Handoff, + DeepInfraModelToolsItem_Mcp, + DeepInfraModelToolsItem_Query, + DeepInfraModelToolsItem_SlackMessageSend, + DeepInfraModelToolsItem_Sms, + DeepInfraModelToolsItem_TextEditor, + DeepInfraModelToolsItem_TransferCall, + DeepInfraModelToolsItem_SipRequest, + DeepInfraModelToolsItem_Voicemail, + ], + UnionMetadata(discriminant="type"), ] +from .json_schema import JsonSchema # noqa: E402, I001 +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs(DeepInfraModelToolsItem_ApiRequest, JsonSchema=JsonSchema) +update_forward_refs(DeepInfraModelToolsItem_Bash) +update_forward_refs(DeepInfraModelToolsItem_Code) +update_forward_refs(DeepInfraModelToolsItem_Computer) +update_forward_refs(DeepInfraModelToolsItem_Dtmf) +update_forward_refs(DeepInfraModelToolsItem_EndCall) +update_forward_refs(DeepInfraModelToolsItem_Function) +update_forward_refs(DeepInfraModelToolsItem_GohighlevelCalendarAvailabilityCheck) +update_forward_refs(DeepInfraModelToolsItem_GohighlevelCalendarEventCreate) +update_forward_refs(DeepInfraModelToolsItem_GohighlevelContactCreate) +update_forward_refs(DeepInfraModelToolsItem_GohighlevelContactGet) +update_forward_refs(DeepInfraModelToolsItem_GoogleCalendarAvailabilityCheck) +update_forward_refs(DeepInfraModelToolsItem_GoogleCalendarEventCreate) +update_forward_refs(DeepInfraModelToolsItem_GoogleSheetsRowAppend) +update_forward_refs( + DeepInfraModelToolsItem_Handoff, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs(DeepInfraModelToolsItem_Mcp) +update_forward_refs(DeepInfraModelToolsItem_Query) +update_forward_refs(DeepInfraModelToolsItem_SlackMessageSend) +update_forward_refs(DeepInfraModelToolsItem_Sms) +update_forward_refs(DeepInfraModelToolsItem_TextEditor) +update_forward_refs(DeepInfraModelToolsItem_TransferCall) +update_forward_refs(DeepInfraModelToolsItem_SipRequest, JsonSchema=JsonSchema) +update_forward_refs(DeepInfraModelToolsItem_Voicemail) diff --git a/src/vapi/types/deep_seek_credential.py b/src/vapi/types/deep_seek_credential.py new file mode 100644 index 00000000..fc9b34c0 --- /dev/null +++ b/src/vapi/types/deep_seek_credential.py @@ -0,0 +1,60 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .deep_seek_credential_provider import DeepSeekCredentialProvider + + +class DeepSeekCredential(UncheckedBaseModel): + provider: DeepSeekCredentialProvider + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + id: str = pydantic.Field() + """ + This is the unique identifier for the credential. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/deep_seek_credential_provider.py b/src/vapi/types/deep_seek_credential_provider.py new file mode 100644 index 00000000..70ba211a --- /dev/null +++ b/src/vapi/types/deep_seek_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +DeepSeekCredentialProvider = typing.Union[typing.Literal["deep-seek"], typing.Any] diff --git a/src/vapi/types/deep_seek_model.py b/src/vapi/types/deep_seek_model.py new file mode 100644 index 00000000..c44da98f --- /dev/null +++ b/src/vapi/types/deep_seek_model.py @@ -0,0 +1,203 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_custom_knowledge_base_dto import CreateCustomKnowledgeBaseDto +from .deep_seek_model_model import DeepSeekModelModel +from .open_ai_message import OpenAiMessage + + +class DeepSeekModel(UncheckedBaseModel): + messages: typing.Optional[typing.List[OpenAiMessage]] = pydantic.Field(default=None) + """ + This is the starting state for the conversation. + """ + + tools: typing.Optional[typing.List["DeepSeekModelToolsItem"]] = pydantic.Field(default=None) + """ + These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`. + + Both `tools` and `toolIds` can be used together. + """ + + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="toolIds"), + pydantic.Field( + alias="toolIds", + description="These are the tools that the assistant can use during the call. To use transient tools, use `tools`.\n\nBoth `tools` and `toolIds` can be used together.", + ), + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase", description="These are the options for the knowledge base."), + ] = None + model: DeepSeekModelModel = pydantic.Field() + """ + This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b + """ + + temperature: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency. + """ + + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="maxTokens"), + pydantic.Field( + alias="maxTokens", + description="This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.", + ), + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field( + alias="emotionRecognitionEnabled", + description="This determines whether we detect user's emotion while they speak and send it as an additional info to model.\n\nDefault `false` because the model is usually are good at understanding the user's emotion from text.\n\n@default false", + ), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="numFastTurns"), + pydantic.Field( + alias="numFastTurns", + description="This sets how many turns at the start of the conversation to use a smaller, faster model from the same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai.\n\nDefault is 0.\n\n@default 0", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + DeepSeekModel, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/deep_seek_model_model.py b/src/vapi/types/deep_seek_model_model.py new file mode 100644 index 00000000..542caf3d --- /dev/null +++ b/src/vapi/types/deep_seek_model_model.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +DeepSeekModelModel = typing.Union[typing.Literal["deepseek-chat", "deepseek-reasoner"], typing.Any] diff --git a/src/vapi/types/deep_seek_model_tools_item.py b/src/vapi/types/deep_seek_model_tools_item.py new file mode 100644 index 00000000..1bc54684 --- /dev/null +++ b/src/vapi/types/deep_seek_model_tools_item.py @@ -0,0 +1,731 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .backoff_plan import BackoffPlan +from .code_tool_environment_variable import CodeToolEnvironmentVariable +from .create_api_request_tool_dto_messages_item import CreateApiRequestToolDtoMessagesItem +from .create_api_request_tool_dto_method import CreateApiRequestToolDtoMethod +from .create_bash_tool_dto_messages_item import CreateBashToolDtoMessagesItem +from .create_bash_tool_dto_name import CreateBashToolDtoName +from .create_bash_tool_dto_sub_type import CreateBashToolDtoSubType +from .create_code_tool_dto_messages_item import CreateCodeToolDtoMessagesItem +from .create_computer_tool_dto_messages_item import CreateComputerToolDtoMessagesItem +from .create_computer_tool_dto_name import CreateComputerToolDtoName +from .create_computer_tool_dto_sub_type import CreateComputerToolDtoSubType +from .create_dtmf_tool_dto_messages_item import CreateDtmfToolDtoMessagesItem +from .create_end_call_tool_dto_messages_item import CreateEndCallToolDtoMessagesItem +from .create_function_tool_dto_messages_item import CreateFunctionToolDtoMessagesItem +from .create_go_high_level_calendar_availability_tool_dto_messages_item import ( + CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem, +) +from .create_go_high_level_calendar_event_create_tool_dto_messages_item import ( + CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_create_tool_dto_messages_item import ( + CreateGoHighLevelContactCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_get_tool_dto_messages_item import CreateGoHighLevelContactGetToolDtoMessagesItem +from .create_google_calendar_check_availability_tool_dto_messages_item import ( + CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem, +) +from .create_google_calendar_create_event_tool_dto_messages_item import ( + CreateGoogleCalendarCreateEventToolDtoMessagesItem, +) +from .create_google_sheets_row_append_tool_dto_messages_item import CreateGoogleSheetsRowAppendToolDtoMessagesItem +from .create_handoff_tool_dto_messages_item import CreateHandoffToolDtoMessagesItem +from .create_mcp_tool_dto_messages_item import CreateMcpToolDtoMessagesItem +from .create_query_tool_dto_messages_item import CreateQueryToolDtoMessagesItem +from .create_sip_request_tool_dto_body import CreateSipRequestToolDtoBody +from .create_sip_request_tool_dto_messages_item import CreateSipRequestToolDtoMessagesItem +from .create_sip_request_tool_dto_verb import CreateSipRequestToolDtoVerb +from .create_slack_send_message_tool_dto_messages_item import CreateSlackSendMessageToolDtoMessagesItem +from .create_sms_tool_dto_messages_item import CreateSmsToolDtoMessagesItem +from .create_text_editor_tool_dto_messages_item import CreateTextEditorToolDtoMessagesItem +from .create_text_editor_tool_dto_name import CreateTextEditorToolDtoName +from .create_text_editor_tool_dto_sub_type import CreateTextEditorToolDtoSubType +from .create_transfer_call_tool_dto_destinations_item import CreateTransferCallToolDtoDestinationsItem +from .create_transfer_call_tool_dto_messages_item import CreateTransferCallToolDtoMessagesItem +from .create_voicemail_tool_dto_messages_item import CreateVoicemailToolDtoMessagesItem +from .knowledge_base import KnowledgeBase +from .mcp_tool_messages import McpToolMessages +from .mcp_tool_metadata import McpToolMetadata +from .open_ai_function import OpenAiFunction +from .server import Server +from .tool_parameter import ToolParameter +from .tool_rejection_plan import ToolRejectionPlan +from .variable_extraction_plan import VariableExtractionPlan + + +class DeepSeekModelToolsItem_ApiRequest(UncheckedBaseModel): + type: typing.Literal["apiRequest"] = "apiRequest" + messages: typing.Optional[typing.List[CreateApiRequestToolDtoMessagesItem]] = None + method: CreateApiRequestToolDtoMethod + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + encrypted_paths: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="encryptedPaths"), pydantic.Field(alias="encryptedPaths") + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + name: typing.Optional[str] = None + description: typing.Optional[str] = None + url: str + body: typing.Optional["JsonSchema"] = None + headers: typing.Optional["JsonSchema"] = None + backoff_plan: typing_extensions.Annotated[ + typing.Optional[BackoffPlan], FieldMetadata(alias="backoffPlan"), pydantic.Field(alias="backoffPlan") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeepSeekModelToolsItem_Bash(UncheckedBaseModel): + type: typing.Literal["bash"] = "bash" + messages: typing.Optional[typing.List[CreateBashToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateBashToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateBashToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeepSeekModelToolsItem_Code(UncheckedBaseModel): + type: typing.Literal["code"] = "code" + messages: typing.Optional[typing.List[CreateCodeToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + code: str + environment_variables: typing_extensions.Annotated[ + typing.Optional[typing.List[CodeToolEnvironmentVariable]], + FieldMetadata(alias="environmentVariables"), + pydantic.Field(alias="environmentVariables"), + ] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeepSeekModelToolsItem_Computer(UncheckedBaseModel): + type: typing.Literal["computer"] = "computer" + messages: typing.Optional[typing.List[CreateComputerToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateComputerToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateComputerToolDtoName + display_width_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayWidthPx"), pydantic.Field(alias="displayWidthPx") + ] + display_height_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayHeightPx"), pydantic.Field(alias="displayHeightPx") + ] + display_number: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="displayNumber"), pydantic.Field(alias="displayNumber") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeepSeekModelToolsItem_Dtmf(UncheckedBaseModel): + type: typing.Literal["dtmf"] = "dtmf" + messages: typing.Optional[typing.List[CreateDtmfToolDtoMessagesItem]] = None + sip_info_dtmf_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="sipInfoDtmfEnabled"), pydantic.Field(alias="sipInfoDtmfEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeepSeekModelToolsItem_EndCall(UncheckedBaseModel): + type: typing.Literal["endCall"] = "endCall" + messages: typing.Optional[typing.List[CreateEndCallToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeepSeekModelToolsItem_Function(UncheckedBaseModel): + type: typing.Literal["function"] = "function" + messages: typing.Optional[typing.List[CreateFunctionToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeepSeekModelToolsItem_GohighlevelCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.availability.check"] = "gohighlevel.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeepSeekModelToolsItem_GohighlevelCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.event.create"] = "gohighlevel.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeepSeekModelToolsItem_GohighlevelContactCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.create"] = "gohighlevel.contact.create" + messages: typing.Optional[typing.List[CreateGoHighLevelContactCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeepSeekModelToolsItem_GohighlevelContactGet(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.get"] = "gohighlevel.contact.get" + messages: typing.Optional[typing.List[CreateGoHighLevelContactGetToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeepSeekModelToolsItem_GoogleCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["google.calendar.availability.check"] = "google.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeepSeekModelToolsItem_GoogleCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["google.calendar.event.create"] = "google.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoogleCalendarCreateEventToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeepSeekModelToolsItem_GoogleSheetsRowAppend(UncheckedBaseModel): + type: typing.Literal["google.sheets.row.append"] = "google.sheets.row.append" + messages: typing.Optional[typing.List[CreateGoogleSheetsRowAppendToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeepSeekModelToolsItem_Handoff(UncheckedBaseModel): + type: typing.Literal["handoff"] = "handoff" + messages: typing.Optional[typing.List[CreateHandoffToolDtoMessagesItem]] = None + default_result: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="defaultResult"), pydantic.Field(alias="defaultResult") + ] = None + destinations: typing.Optional[typing.List["CreateHandoffToolDtoDestinationsItem"]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeepSeekModelToolsItem_Mcp(UncheckedBaseModel): + type: typing.Literal["mcp"] = "mcp" + messages: typing.Optional[typing.List[CreateMcpToolDtoMessagesItem]] = None + server: typing.Optional[Server] = None + tool_messages: typing_extensions.Annotated[ + typing.Optional[typing.List[McpToolMessages]], + FieldMetadata(alias="toolMessages"), + pydantic.Field(alias="toolMessages"), + ] = None + metadata: typing.Optional[McpToolMetadata] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeepSeekModelToolsItem_Query(UncheckedBaseModel): + type: typing.Literal["query"] = "query" + messages: typing.Optional[typing.List[CreateQueryToolDtoMessagesItem]] = None + knowledge_bases: typing_extensions.Annotated[ + typing.Optional[typing.List[KnowledgeBase]], + FieldMetadata(alias="knowledgeBases"), + pydantic.Field(alias="knowledgeBases"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeepSeekModelToolsItem_SlackMessageSend(UncheckedBaseModel): + type: typing.Literal["slack.message.send"] = "slack.message.send" + messages: typing.Optional[typing.List[CreateSlackSendMessageToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeepSeekModelToolsItem_Sms(UncheckedBaseModel): + type: typing.Literal["sms"] = "sms" + messages: typing.Optional[typing.List[CreateSmsToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeepSeekModelToolsItem_TextEditor(UncheckedBaseModel): + type: typing.Literal["textEditor"] = "textEditor" + messages: typing.Optional[typing.List[CreateTextEditorToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateTextEditorToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateTextEditorToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeepSeekModelToolsItem_TransferCall(UncheckedBaseModel): + type: typing.Literal["transferCall"] = "transferCall" + messages: typing.Optional[typing.List[CreateTransferCallToolDtoMessagesItem]] = None + destinations: typing.Optional[typing.List[CreateTransferCallToolDtoDestinationsItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeepSeekModelToolsItem_SipRequest(UncheckedBaseModel): + type: typing.Literal["sipRequest"] = "sipRequest" + messages: typing.Optional[typing.List[CreateSipRequestToolDtoMessagesItem]] = None + verb: CreateSipRequestToolDtoVerb + headers: typing.Optional["JsonSchema"] = None + body: typing.Optional[CreateSipRequestToolDtoBody] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DeepSeekModelToolsItem_Voicemail(UncheckedBaseModel): + type: typing.Literal["voicemail"] = "voicemail" + messages: typing.Optional[typing.List[CreateVoicemailToolDtoMessagesItem]] = None + beep_detection_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="beepDetectionEnabled"), pydantic.Field(alias="beepDetectionEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +DeepSeekModelToolsItem = typing_extensions.Annotated[ + typing.Union[ + DeepSeekModelToolsItem_ApiRequest, + DeepSeekModelToolsItem_Bash, + DeepSeekModelToolsItem_Code, + DeepSeekModelToolsItem_Computer, + DeepSeekModelToolsItem_Dtmf, + DeepSeekModelToolsItem_EndCall, + DeepSeekModelToolsItem_Function, + DeepSeekModelToolsItem_GohighlevelCalendarAvailabilityCheck, + DeepSeekModelToolsItem_GohighlevelCalendarEventCreate, + DeepSeekModelToolsItem_GohighlevelContactCreate, + DeepSeekModelToolsItem_GohighlevelContactGet, + DeepSeekModelToolsItem_GoogleCalendarAvailabilityCheck, + DeepSeekModelToolsItem_GoogleCalendarEventCreate, + DeepSeekModelToolsItem_GoogleSheetsRowAppend, + DeepSeekModelToolsItem_Handoff, + DeepSeekModelToolsItem_Mcp, + DeepSeekModelToolsItem_Query, + DeepSeekModelToolsItem_SlackMessageSend, + DeepSeekModelToolsItem_Sms, + DeepSeekModelToolsItem_TextEditor, + DeepSeekModelToolsItem_TransferCall, + DeepSeekModelToolsItem_SipRequest, + DeepSeekModelToolsItem_Voicemail, + ], + UnionMetadata(discriminant="type"), +] +from .json_schema import JsonSchema # noqa: E402, I001 +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs(DeepSeekModelToolsItem_ApiRequest, JsonSchema=JsonSchema) +update_forward_refs(DeepSeekModelToolsItem_Bash) +update_forward_refs(DeepSeekModelToolsItem_Code) +update_forward_refs(DeepSeekModelToolsItem_Computer) +update_forward_refs(DeepSeekModelToolsItem_Dtmf) +update_forward_refs(DeepSeekModelToolsItem_EndCall) +update_forward_refs(DeepSeekModelToolsItem_Function) +update_forward_refs(DeepSeekModelToolsItem_GohighlevelCalendarAvailabilityCheck) +update_forward_refs(DeepSeekModelToolsItem_GohighlevelCalendarEventCreate) +update_forward_refs(DeepSeekModelToolsItem_GohighlevelContactCreate) +update_forward_refs(DeepSeekModelToolsItem_GohighlevelContactGet) +update_forward_refs(DeepSeekModelToolsItem_GoogleCalendarAvailabilityCheck) +update_forward_refs(DeepSeekModelToolsItem_GoogleCalendarEventCreate) +update_forward_refs(DeepSeekModelToolsItem_GoogleSheetsRowAppend) +update_forward_refs( + DeepSeekModelToolsItem_Handoff, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs(DeepSeekModelToolsItem_Mcp) +update_forward_refs(DeepSeekModelToolsItem_Query) +update_forward_refs(DeepSeekModelToolsItem_SlackMessageSend) +update_forward_refs(DeepSeekModelToolsItem_Sms) +update_forward_refs(DeepSeekModelToolsItem_TextEditor) +update_forward_refs(DeepSeekModelToolsItem_TransferCall) +update_forward_refs(DeepSeekModelToolsItem_SipRequest, JsonSchema=JsonSchema) +update_forward_refs(DeepSeekModelToolsItem_Voicemail) diff --git a/src/vapi/types/deepgram_credential.py b/src/vapi/types/deepgram_credential.py index d2d18091..71bbf3f2 100644 --- a/src/vapi/types/deepgram_credential.py +++ b/src/vapi/types/deepgram_credential.py @@ -1,47 +1,63 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +import datetime as dt import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic -import datetime as dt +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .deepgram_credential_provider import DeepgramCredentialProvider -class DeepgramCredential(UniversalBaseModel): - provider: typing.Literal["deepgram"] = "deepgram" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() - """ - This is not returned in the API. - """ - +class DeepgramCredential(UncheckedBaseModel): + provider: DeepgramCredentialProvider + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] id: str = pydantic.Field() """ This is the unique identifier for the credential. """ - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field() + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is the unique identifier for the org that this credential belongs to. + This is the name of credential. This is just for your reference. """ - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the credential was created. - """ - - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the assistant was last updated. - """ - - api_url: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="apiUrl")] = pydantic.Field( - default=None - ) - """ - This can be used to point to an onprem Deepgram instance. Defaults to api.deepgram.com. - """ + api_url: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiUrl"), + pydantic.Field( + alias="apiUrl", + description="This can be used to point to an onprem Deepgram instance. Defaults to api.deepgram.com.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/deepgram_credential_provider.py b/src/vapi/types/deepgram_credential_provider.py new file mode 100644 index 00000000..2a2d599e --- /dev/null +++ b/src/vapi/types/deepgram_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +DeepgramCredentialProvider = typing.Union[typing.Literal["deepgram"], typing.Any] diff --git a/src/vapi/types/deepgram_transcriber.py b/src/vapi/types/deepgram_transcriber.py index 7409f781..f0501e5b 100644 --- a/src/vapi/types/deepgram_transcriber.py +++ b/src/vapi/types/deepgram_transcriber.py @@ -1,21 +1,18 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing + import pydantic -from .deepgram_transcriber_model import DeepgramTranscriberModel -from .deepgram_transcriber_language import DeepgramTranscriberLanguage import typing_extensions -from ..core.serialization import FieldMetadata from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .deepgram_transcriber_language import DeepgramTranscriberLanguage +from .deepgram_transcriber_model import DeepgramTranscriberModel +from .fallback_transcriber_plan import FallbackTranscriberPlan -class DeepgramTranscriber(UniversalBaseModel): - provider: typing.Literal["deepgram"] = pydantic.Field(default="deepgram") - """ - This is the transcription provider that will be used. - """ - +class DeepgramTranscriber(UncheckedBaseModel): model: typing.Optional[DeepgramTranscriberModel] = pydantic.Field(default=None) """ This is the Deepgram model that will be used. A list of models can be found here: https://developers.deepgram.com/docs/models-languages-overview @@ -26,23 +23,77 @@ class DeepgramTranscriber(UniversalBaseModel): This is the language that will be set for the transcription. The list of languages Deepgram supports can be found here: https://developers.deepgram.com/docs/models-languages-overview """ - smart_format: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="smartFormat")] = ( - pydantic.Field(default=None) - ) + smart_format: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="smartFormat"), + pydantic.Field( + alias="smartFormat", + description="This will be use smart format option provided by Deepgram. It's default disabled because it can sometimes format numbers as times but it's getting better.", + ), + ] = None + mip_opt_out: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="mipOptOut"), + pydantic.Field( + alias="mipOptOut", + description="If set to true, this will add mip_opt_out=true as a query parameter of all API requests. See https://developers.deepgram.com/docs/the-deepgram-model-improvement-partnership-program#want-to-opt-out\n\nThis will only be used if you are using your own Deepgram API key.\n\n@default false", + ), + ] = None + numerals: typing.Optional[bool] = pydantic.Field(default=None) """ - This will be use smart format option provided by Deepgram. It's default disabled because it can sometimes format numbers as times but it's getting better. + If set to true, this will cause deepgram to convert spoken numbers to literal numerals. For example, "my phone number is nine-seven-two..." would become "my phone number is 972..." + + @default false """ - language_detection_enabled: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="languageDetectionEnabled") - ] = pydantic.Field(default=None) + profanity_filter: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="profanityFilter"), + pydantic.Field( + alias="profanityFilter", + description='If set to true, Deepgram will replace profanity in transcripts with surrounding asterisks, e.g. "f***".\n\n@default false', + ), + ] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="confidenceThreshold"), + pydantic.Field( + alias="confidenceThreshold", + description="Transcripts below this confidence threshold will be discarded.\n\n@default 0.4", + ), + ] = None + eager_eot_threshold: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="eagerEotThreshold"), + pydantic.Field( + alias="eagerEotThreshold", + description="Eager end-of-turn confidence required to fire a eager end-of-turn event. Setting a value here will enable EagerEndOfTurn and SpeechResumed events. It is disabled by default. Only used with Flux models.", + ), + ] = None + eot_threshold: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="eotThreshold"), + pydantic.Field( + alias="eotThreshold", + description="End-of-turn confidence required to finish a turn. Only used with Flux models.\n\n@default 0.7", + ), + ] = None + eot_timeout_ms: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="eotTimeoutMs"), + pydantic.Field( + alias="eotTimeoutMs", + description="A turn will be finished when this much time has passed after speech, regardless of EOT confidence. Only used with Flux models.\n\n@default 5000", + ), + ] = None + keywords: typing.Optional[typing.List[str]] = pydantic.Field(default=None) """ - This enables or disables language detection. If true, swaps transcribers to detected language automatically. Defaults to false. + These keywords are passed to the transcription model to help it pick up use-case specific words. Anything that may not be a common word, like your company name, should be added here. """ - keywords: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + keyterm: typing.Optional[typing.List[str]] = pydantic.Field(default=None) """ - These keywords are passed to the transcription model to help it pick up use-case specific words. Anything that may not be a common word, like your company name, should be added here. + Keyterm Prompting allows you improve Keyword Recall Rate (KRR) for important keyterms or phrases up to 90%. """ endpointing: typing.Optional[float] = pydantic.Field(default=None) @@ -50,7 +101,6 @@ class DeepgramTranscriber(UniversalBaseModel): This is the timeout after which Deepgram will send transcription on user silence. You can read in-depth documentation here: https://developers.deepgram.com/docs/endpointing. Here are the most important bits: - - Defaults to 10. This is recommended for most use cases to optimize for latency. - 10 can cause some missing transcriptions since because of the shorter context. This mostly happens for one-word utterances. For those uses cases, it's recommended to try 300. It will add a bit of latency but the quality and reliability of the experience will be better. - If neither 10 nor 300 work, contact support@vapi.ai and we'll find another solution. @@ -58,6 +108,15 @@ class DeepgramTranscriber(UniversalBaseModel): @default 10 """ + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field( + alias="fallbackPlan", + description="This is the plan for transcriber provider fallbacks in the event that the primary transcriber provider fails.", + ), + ] = None + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/vapi/types/deepgram_transcriber_model.py b/src/vapi/types/deepgram_transcriber_model.py index 596d585b..ec3a972d 100644 --- a/src/vapi/types/deepgram_transcriber_model.py +++ b/src/vapi/types/deepgram_transcriber_model.py @@ -4,6 +4,10 @@ DeepgramTranscriberModel = typing.Union[ typing.Literal[ + "flux-general-en", + "nova-3", + "nova-3-general", + "nova-3-medical", "nova-2", "nova-2-general", "nova-2-meeting", @@ -32,6 +36,7 @@ "base-conversationalai", "base-voicemail", "base-video", + "whisper", ], typing.Any, ] diff --git a/src/vapi/types/deepgram_voice.py b/src/vapi/types/deepgram_voice.py index f3becc52..b44489d7 100644 --- a/src/vapi/types/deepgram_voice.py +++ b/src/vapi/types/deepgram_voice.py @@ -1,41 +1,60 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions import typing -from ..core.serialization import FieldMetadata + import pydantic -from .deepgram_voice_id import DeepgramVoiceId -from .chunk_plan import ChunkPlan +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .chunk_plan import ChunkPlan +from .deepgram_voice_id import DeepgramVoiceId +from .deepgram_voice_model import DeepgramVoiceModel +from .fallback_plan import FallbackPlan -class DeepgramVoice(UniversalBaseModel): - filler_injection_enabled: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="fillerInjectionEnabled") - ] = pydantic.Field(default=None) - """ - This determines whether fillers are injected into the model output before inputting it into the voice provider. - - Default `false` because you can achieve better results with prompting the model. - """ - - provider: typing.Literal["deepgram"] = pydantic.Field(default="deepgram") - """ - This is the voice provider that will be used. - """ - - voice_id: typing_extensions.Annotated[DeepgramVoiceId, FieldMetadata(alias="voiceId")] = pydantic.Field() +class DeepgramVoice(UncheckedBaseModel): + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="cachingEnabled"), + pydantic.Field( + alias="cachingEnabled", description="This is the flag to toggle voice caching for the assistant." + ), + ] = None + voice_id: typing_extensions.Annotated[ + DeepgramVoiceId, + FieldMetadata(alias="voiceId"), + pydantic.Field(alias="voiceId", description="This is the provider-specific ID that will be used."), + ] + model: typing.Optional[DeepgramVoiceModel] = pydantic.Field(default=None) """ - This is the provider-specific ID that will be used. + This is the model that will be used. Defaults to 'aura-2' when not specified. """ - chunk_plan: typing_extensions.Annotated[typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan")] = ( - pydantic.Field(default=None) - ) - """ - This is the plan for chunking the model output before it is sent to the voice provider. - """ + mip_opt_out: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="mipOptOut"), + pydantic.Field( + alias="mipOptOut", + description="If set to true, this will add mip_opt_out=true as a query parameter of all API requests. See https://developers.deepgram.com/docs/the-deepgram-model-improvement-partnership-program#want-to-opt-out\n\nThis will only be used if you are using your own Deepgram API key.\n\n@default false", + ), + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], + FieldMetadata(alias="chunkPlan"), + pydantic.Field( + alias="chunkPlan", + description="This is the plan for chunking the model output before it is sent to the voice provider.", + ), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field( + alias="fallbackPlan", + description="This is the plan for voice provider fallbacks in the event that the primary voice provider fails.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/deepgram_voice_id.py b/src/vapi/types/deepgram_voice_id.py index fc28b6cd..9c96997c 100644 --- a/src/vapi/types/deepgram_voice_id.py +++ b/src/vapi/types/deepgram_voice_id.py @@ -1,6 +1,64 @@ # This file was auto-generated by Fern from our API Definition. import typing -from .deepgram_voice_id_enum import DeepgramVoiceIdEnum -DeepgramVoiceId = typing.Union[DeepgramVoiceIdEnum, str] +DeepgramVoiceId = typing.Union[ + typing.Literal[ + "asteria", + "luna", + "stella", + "athena", + "hera", + "orion", + "arcas", + "perseus", + "angus", + "orpheus", + "helios", + "zeus", + "thalia", + "andromeda", + "helena", + "apollo", + "aries", + "amalthea", + "atlas", + "aurora", + "callista", + "cora", + "cordelia", + "delia", + "draco", + "electra", + "harmonia", + "hermes", + "hyperion", + "iris", + "janus", + "juno", + "jupiter", + "mars", + "minerva", + "neptune", + "odysseus", + "ophelia", + "pandora", + "phoebe", + "pluto", + "saturn", + "selene", + "theia", + "vesta", + "celeste", + "estrella", + "nestor", + "sirio", + "carina", + "alvaro", + "diana", + "aquila", + "selena", + "javier", + ], + typing.Any, +] diff --git a/src/vapi/types/deepgram_voice_id_enum.py b/src/vapi/types/deepgram_voice_id_enum.py deleted file mode 100644 index 06d6eb84..00000000 --- a/src/vapi/types/deepgram_voice_id_enum.py +++ /dev/null @@ -1,10 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -DeepgramVoiceIdEnum = typing.Union[ - typing.Literal[ - "asteria", "luna", "stella", "athena", "hera", "orion", "arcas", "perseus", "angus", "orpheus", "helios", "zeus" - ], - typing.Any, -] diff --git a/src/vapi/types/deepgram_voice_model.py b/src/vapi/types/deepgram_voice_model.py new file mode 100644 index 00000000..77dcff42 --- /dev/null +++ b/src/vapi/types/deepgram_voice_model.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +DeepgramVoiceModel = typing.Union[typing.Literal["aura", "aura-2"], typing.Any] diff --git a/src/vapi/types/developer_message.py b/src/vapi/types/developer_message.py new file mode 100644 index 00000000..ab5ca480 --- /dev/null +++ b/src/vapi/types/developer_message.py @@ -0,0 +1,39 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .developer_message_role import DeveloperMessageRole + + +class DeveloperMessage(UncheckedBaseModel): + role: DeveloperMessageRole = pydantic.Field() + """ + This is the role of the message author + """ + + content: str = pydantic.Field() + """ + This is the content of the developer message + """ + + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is an optional name for the participant + """ + + metadata: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) + """ + This is an optional metadata for the message + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/developer_message_role.py b/src/vapi/types/developer_message_role.py new file mode 100644 index 00000000..8ae45a50 --- /dev/null +++ b/src/vapi/types/developer_message_role.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +DeveloperMessageRole = typing.Union[typing.Literal["developer"], typing.Any] diff --git a/src/vapi/types/dial_plan_entry.py b/src/vapi/types/dial_plan_entry.py new file mode 100644 index 00000000..6ab312e5 --- /dev/null +++ b/src/vapi/types/dial_plan_entry.py @@ -0,0 +1,38 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_customer_dto import CreateCustomerDto + + +class DialPlanEntry(UncheckedBaseModel): + phone_number_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="phoneNumberId"), + pydantic.Field( + alias="phoneNumberId", description="The phone number ID to use for calling the customers in this entry." + ), + ] + customers: typing.List[CreateCustomerDto] = pydantic.Field() + """ + The list of customers to call using this phone number. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(DialPlanEntry) diff --git a/src/vapi/types/dtmf_tool.py b/src/vapi/types/dtmf_tool.py index 69d864a8..5a86c146 100644 --- a/src/vapi/types/dtmf_tool.py +++ b/src/vapi/types/dtmf_tool.py @@ -1,31 +1,20 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions +from __future__ import annotations + +import datetime as dt import typing -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel from .dtmf_tool_messages_item import DtmfToolMessagesItem -import datetime as dt -from .open_ai_function import OpenAiFunction -from .server import Server -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from .tool_rejection_plan import ToolRejectionPlan -class DtmfTool(UniversalBaseModel): - async_: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="async")] = pydantic.Field( - default=None - ) - """ - This determines if the tool is async. - - If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server. - - If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server. - - Defaults to synchronous (`false`). - """ - +class DtmfTool(UncheckedBaseModel): messages: typing.Optional[typing.List[DtmfToolMessagesItem]] = pydantic.Field(default=None) """ These are the messages that will be spoken to the user as the tool is running. @@ -33,44 +22,48 @@ class DtmfTool(UniversalBaseModel): For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. """ - type: typing.Literal["dtmf"] = "dtmf" + sip_info_dtmf_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="sipInfoDtmfEnabled"), + pydantic.Field( + alias="sipInfoDtmfEnabled", + description="This enables sending DTMF tones via SIP INFO messages instead of RFC 2833 (RTP events). When enabled, DTMF digits will be sent using the SIP INFO method, which can be more reliable in some network configurations. Only relevant when using the `vapi.sip` transport.", + ), + ] = None id: str = pydantic.Field() """ This is the unique identifier for the tool. """ - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field() - """ - This is the unique identifier for the organization that this tool belongs to. - """ - - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the tool was created. - """ - - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the tool was last updated. - """ - - function: typing.Optional[OpenAiFunction] = pydantic.Field(default=None) - """ - This is the function definition of the tool. - - For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on tool-specific fields like `tool.destinations`. But, even in those cases, you can provide a custom function definition for advanced use cases. - - An example of an advanced use case is if you want to customize the message that's spoken for `endCall` tool. You can specify a function where it returns an argument "reason". Then, in `messages` array, you can have many "request-complete" messages. One of these messages will be triggered if the `messages[].conditions` matches the "reason" argument. - """ - - server: typing.Optional[Server] = pydantic.Field(default=None) - """ - This is the server that will be hit when this tool is requested by the model. - - All requests will be sent with the call object among other things. You can find more details in the Server URL documentation. - - This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: highest tool.server.url, then assistant.serverUrl, then phoneNumber.serverUrl, then org.serverUrl. - """ + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the organization that this tool belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the tool was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", description="This is the ISO 8601 date-time string of when the tool was last updated." + ), + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -80,3 +73,6 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +update_forward_refs(DtmfTool) diff --git a/src/vapi/types/dtmf_tool_messages_item.py b/src/vapi/types/dtmf_tool_messages_item.py index 8bdf3e8a..b1c300e0 100644 --- a/src/vapi/types/dtmf_tool_messages_item.py +++ b/src/vapi/types/dtmf_tool_messages_item.py @@ -1,9 +1,104 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .tool_message_start import ToolMessageStart -from .tool_message_complete import ToolMessageComplete -from .tool_message_failed import ToolMessageFailed -from .tool_message_delayed import ToolMessageDelayed -DtmfToolMessagesItem = typing.Union[ToolMessageStart, ToolMessageComplete, ToolMessageFailed, ToolMessageDelayed] +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class DtmfToolMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DtmfToolMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DtmfToolMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class DtmfToolMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +DtmfToolMessagesItem = typing_extensions.Annotated[ + typing.Union[ + DtmfToolMessagesItem_RequestStart, + DtmfToolMessagesItem_RequestComplete, + DtmfToolMessagesItem_RequestFailed, + DtmfToolMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/edge.py b/src/vapi/types/edge.py new file mode 100644 index 00000000..87364adb --- /dev/null +++ b/src/vapi/types/edge.py @@ -0,0 +1,29 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .ai_edge_condition import AiEdgeCondition + + +class Edge(UncheckedBaseModel): + condition: typing.Optional[AiEdgeCondition] = None + from_: typing_extensions.Annotated[str, FieldMetadata(alias="from"), pydantic.Field(alias="from")] + to: str + metadata: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) + """ + This is for metadata you want to store on the edge. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/eleven_labs_credential.py b/src/vapi/types/eleven_labs_credential.py index 5a4f707e..4cc8db6b 100644 --- a/src/vapi/types/eleven_labs_credential.py +++ b/src/vapi/types/eleven_labs_credential.py @@ -1,39 +1,52 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +import datetime as dt import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic -import datetime as dt +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class ElevenLabsCredential(UniversalBaseModel): +class ElevenLabsCredential(UncheckedBaseModel): provider: typing.Literal["11labs"] = "11labs" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() - """ - This is not returned in the API. - """ - + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] id: str = pydantic.Field() """ This is the unique identifier for the credential. """ - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field() - """ - This is the unique identifier for the org that this credential belongs to. - """ - - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the credential was created. - """ - - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the assistant was last updated. + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/eleven_labs_pronunciation_dictionary.py b/src/vapi/types/eleven_labs_pronunciation_dictionary.py new file mode 100644 index 00000000..cb7871a6 --- /dev/null +++ b/src/vapi/types/eleven_labs_pronunciation_dictionary.py @@ -0,0 +1,63 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .eleven_labs_pronunciation_dictionary_permission_on_resource import ( + ElevenLabsPronunciationDictionaryPermissionOnResource, +) + + +class ElevenLabsPronunciationDictionary(UncheckedBaseModel): + pronunciation_dictionary_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="pronunciationDictionaryId"), + pydantic.Field(alias="pronunciationDictionaryId", description="The ID of the pronunciation dictionary"), + ] + dictionary_name: typing_extensions.Annotated[ + str, + FieldMetadata(alias="dictionaryName"), + pydantic.Field(alias="dictionaryName", description="The name of the pronunciation dictionary"), + ] + created_by: typing_extensions.Annotated[ + str, + FieldMetadata(alias="createdBy"), + pydantic.Field(alias="createdBy", description="The user ID of the creator"), + ] + creation_time_unix: typing_extensions.Annotated[ + float, + FieldMetadata(alias="creationTimeUnix"), + pydantic.Field(alias="creationTimeUnix", description="The creation time in Unix timestamp"), + ] + version_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="versionId"), + pydantic.Field(alias="versionId", description="The version ID of the pronunciation dictionary"), + ] + version_rules_num: typing_extensions.Annotated[ + float, + FieldMetadata(alias="versionRulesNum"), + pydantic.Field(alias="versionRulesNum", description="The number of rules in this version"), + ] + permission_on_resource: typing_extensions.Annotated[ + typing.Optional[ElevenLabsPronunciationDictionaryPermissionOnResource], + FieldMetadata(alias="permissionOnResource"), + pydantic.Field(alias="permissionOnResource", description="The permission level on this resource"), + ] = None + description: typing.Optional[str] = pydantic.Field(default=None) + """ + The description of the pronunciation dictionary + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/eleven_labs_pronunciation_dictionary_locator.py b/src/vapi/types/eleven_labs_pronunciation_dictionary_locator.py new file mode 100644 index 00000000..4cceab2a --- /dev/null +++ b/src/vapi/types/eleven_labs_pronunciation_dictionary_locator.py @@ -0,0 +1,33 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class ElevenLabsPronunciationDictionaryLocator(UncheckedBaseModel): + pronunciation_dictionary_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="pronunciationDictionaryId"), + pydantic.Field( + alias="pronunciationDictionaryId", description="This is the ID of the pronunciation dictionary to use." + ), + ] + version_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="versionId"), + pydantic.Field(alias="versionId", description="This is the version ID of the pronunciation dictionary to use."), + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/eleven_labs_pronunciation_dictionary_permission_on_resource.py b/src/vapi/types/eleven_labs_pronunciation_dictionary_permission_on_resource.py new file mode 100644 index 00000000..33e7685e --- /dev/null +++ b/src/vapi/types/eleven_labs_pronunciation_dictionary_permission_on_resource.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ElevenLabsPronunciationDictionaryPermissionOnResource = typing.Union[ + typing.Literal["admin", "editor", "viewer"], typing.Any +] diff --git a/src/vapi/types/eleven_labs_transcriber.py b/src/vapi/types/eleven_labs_transcriber.py new file mode 100644 index 00000000..7f51440c --- /dev/null +++ b/src/vapi/types/eleven_labs_transcriber.py @@ -0,0 +1,72 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .eleven_labs_transcriber_language import ElevenLabsTranscriberLanguage +from .eleven_labs_transcriber_model import ElevenLabsTranscriberModel +from .fallback_transcriber_plan import FallbackTranscriberPlan + + +class ElevenLabsTranscriber(UncheckedBaseModel): + model: typing.Optional[ElevenLabsTranscriberModel] = pydantic.Field(default=None) + """ + This is the model that will be used for the transcription. + """ + + language: typing.Optional[ElevenLabsTranscriberLanguage] = pydantic.Field(default=None) + """ + This is the language that will be used for the transcription. + """ + + silence_threshold_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="silenceThresholdSeconds"), + pydantic.Field( + alias="silenceThresholdSeconds", + description="This is the number of seconds of silence before VAD commits (0.3-3.0).", + ), + ] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="confidenceThreshold"), + pydantic.Field( + alias="confidenceThreshold", + description="This is the VAD sensitivity (0.1-0.9, lower indicates more sensitive).", + ), + ] = None + min_speech_duration_ms: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minSpeechDurationMs"), + pydantic.Field( + alias="minSpeechDurationMs", description="This is the minimum speech duration for VAD (50-2000ms)." + ), + ] = None + min_silence_duration_ms: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minSilenceDurationMs"), + pydantic.Field( + alias="minSilenceDurationMs", description="This is the minimum silence duration for VAD (50-2000ms)." + ), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field( + alias="fallbackPlan", + description="This is the plan for transcriber provider fallbacks in the event that the primary transcriber provider fails.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/eleven_labs_transcriber_language.py b/src/vapi/types/eleven_labs_transcriber_language.py new file mode 100644 index 00000000..bf7c5e41 --- /dev/null +++ b/src/vapi/types/eleven_labs_transcriber_language.py @@ -0,0 +1,194 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ElevenLabsTranscriberLanguage = typing.Union[ + typing.Literal[ + "aa", + "ab", + "ae", + "af", + "ak", + "am", + "an", + "ar", + "as", + "av", + "ay", + "az", + "ba", + "be", + "bg", + "bh", + "bi", + "bm", + "bn", + "bo", + "br", + "bs", + "ca", + "ce", + "ch", + "co", + "cr", + "cs", + "cu", + "cv", + "cy", + "da", + "de", + "dv", + "dz", + "ee", + "el", + "en", + "eo", + "es", + "et", + "eu", + "fa", + "ff", + "fi", + "fj", + "fo", + "fr", + "fy", + "ga", + "gd", + "gl", + "gn", + "gu", + "gv", + "ha", + "he", + "hi", + "ho", + "hr", + "ht", + "hu", + "hy", + "hz", + "ia", + "id", + "ie", + "ig", + "ii", + "ik", + "io", + "is", + "it", + "iu", + "ja", + "jv", + "ka", + "kg", + "ki", + "kj", + "kk", + "kl", + "km", + "kn", + "ko", + "kr", + "ks", + "ku", + "kv", + "kw", + "ky", + "la", + "lb", + "lg", + "li", + "ln", + "lo", + "lt", + "lu", + "lv", + "mg", + "mh", + "mi", + "mk", + "ml", + "mn", + "mr", + "ms", + "mt", + "my", + "na", + "nb", + "nd", + "ne", + "ng", + "nl", + "nn", + "no", + "nr", + "nv", + "ny", + "oc", + "oj", + "om", + "or", + "os", + "pa", + "pi", + "pl", + "ps", + "pt", + "qu", + "rm", + "rn", + "ro", + "ru", + "rw", + "sa", + "sc", + "sd", + "se", + "sg", + "si", + "sk", + "sl", + "sm", + "sn", + "so", + "sq", + "sr", + "ss", + "st", + "su", + "sv", + "sw", + "ta", + "te", + "tg", + "th", + "ti", + "tk", + "tl", + "tn", + "to", + "tr", + "ts", + "tt", + "tw", + "ty", + "ug", + "uk", + "ur", + "uz", + "ve", + "vi", + "vo", + "wa", + "wo", + "xh", + "yi", + "yue", + "yo", + "za", + "zh", + "zu", + ], + typing.Any, +] diff --git a/src/vapi/types/eleven_labs_transcriber_model.py b/src/vapi/types/eleven_labs_transcriber_model.py new file mode 100644 index 00000000..13db54f7 --- /dev/null +++ b/src/vapi/types/eleven_labs_transcriber_model.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ElevenLabsTranscriberModel = typing.Union[typing.Literal["scribe_v1", "scribe_v2", "scribe_v2_realtime"], typing.Any] diff --git a/src/vapi/types/eleven_labs_voice.py b/src/vapi/types/eleven_labs_voice.py index 66200316..e7fb8a50 100644 --- a/src/vapi/types/eleven_labs_voice.py +++ b/src/vapi/types/eleven_labs_voice.py @@ -1,76 +1,81 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions import typing -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .chunk_plan import ChunkPlan +from .eleven_labs_pronunciation_dictionary_locator import ElevenLabsPronunciationDictionaryLocator from .eleven_labs_voice_id import ElevenLabsVoiceId from .eleven_labs_voice_model import ElevenLabsVoiceModel -from .chunk_plan import ChunkPlan -from ..core.pydantic_utilities import IS_PYDANTIC_V2 - - -class ElevenLabsVoice(UniversalBaseModel): - filler_injection_enabled: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="fillerInjectionEnabled") - ] = pydantic.Field(default=None) - """ - This determines whether fillers are injected into the model output before inputting it into the voice provider. - - Default `false` because you can achieve better results with prompting the model. - """ - - provider: typing.Literal["11labs"] = pydantic.Field(default="11labs") - """ - This is the voice provider that will be used. - """ - - voice_id: typing_extensions.Annotated[ElevenLabsVoiceId, FieldMetadata(alias="voiceId")] = pydantic.Field() - """ - This is the provider-specific ID that will be used. Ensure the Voice is present in your 11Labs Voice Library. - """ - +from .fallback_plan import FallbackPlan + + +class ElevenLabsVoice(UncheckedBaseModel): + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="cachingEnabled"), + pydantic.Field( + alias="cachingEnabled", description="This is the flag to toggle voice caching for the assistant." + ), + ] = None + voice_id: typing_extensions.Annotated[ + ElevenLabsVoiceId, + FieldMetadata(alias="voiceId"), + pydantic.Field( + alias="voiceId", + description="This is the provider-specific ID that will be used. Ensure the Voice is present in your 11Labs Voice Library.", + ), + ] stability: typing.Optional[float] = pydantic.Field(default=None) """ Defines the stability for voice settings. """ - similarity_boost: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="similarityBoost")] = ( - pydantic.Field(default=None) - ) - """ - Defines the similarity boost for voice settings. - """ - + similarity_boost: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="similarityBoost"), + pydantic.Field(alias="similarityBoost", description="Defines the similarity boost for voice settings."), + ] = None style: typing.Optional[float] = pydantic.Field(default=None) """ Defines the style for voice settings. """ - use_speaker_boost: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="useSpeakerBoost")] = ( - pydantic.Field(default=None) - ) + use_speaker_boost: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="useSpeakerBoost"), + pydantic.Field(alias="useSpeakerBoost", description="Defines the use speaker boost for voice settings."), + ] = None + speed: typing.Optional[float] = pydantic.Field(default=None) """ - Defines the use speaker boost for voice settings. + Defines the speed for voice settings. """ optimize_streaming_latency: typing_extensions.Annotated[ - typing.Optional[float], FieldMetadata(alias="optimizeStreamingLatency") - ] = pydantic.Field(default=None) - """ - Defines the optimize streaming latency for voice settings. Defaults to 3. - """ - + typing.Optional[float], + FieldMetadata(alias="optimizeStreamingLatency"), + pydantic.Field( + alias="optimizeStreamingLatency", + description="Defines the optimize streaming latency for voice settings. Defaults to 3.", + ), + ] = None enable_ssml_parsing: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="enableSsmlParsing") - ] = pydantic.Field(default=None) - """ - This enables the use of https://elevenlabs.io/docs/speech-synthesis/prompting#pronunciation. Defaults to false to save latency. - - @default false - """ - + typing.Optional[bool], + FieldMetadata(alias="enableSsmlParsing"), + pydantic.Field( + alias="enableSsmlParsing", + description="This enables the use of https://elevenlabs.io/docs/speech-synthesis/prompting#pronunciation. Defaults to false to save latency.\n\n@default false", + ), + ] = None + auto_mode: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="autoMode"), + pydantic.Field(alias="autoMode", description="Defines the auto mode for voice settings. Defaults to false."), + ] = None model: typing.Optional[ElevenLabsVoiceModel] = pydantic.Field(default=None) """ This is the model that will be used. Defaults to 'eleven_turbo_v2' if not specified. @@ -81,12 +86,29 @@ class ElevenLabsVoice(UniversalBaseModel): This is the language (ISO 639-1) that is enforced for the model. Currently only Turbo v2.5 supports language enforcement. For other models, an error will be returned if language code is provided. """ - chunk_plan: typing_extensions.Annotated[typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan")] = ( - pydantic.Field(default=None) - ) - """ - This is the plan for chunking the model output before it is sent to the voice provider. - """ + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], + FieldMetadata(alias="chunkPlan"), + pydantic.Field( + alias="chunkPlan", + description="This is the plan for chunking the model output before it is sent to the voice provider.", + ), + ] = None + pronunciation_dictionary_locators: typing_extensions.Annotated[ + typing.Optional[typing.List[ElevenLabsPronunciationDictionaryLocator]], + FieldMetadata(alias="pronunciationDictionaryLocators"), + pydantic.Field( + alias="pronunciationDictionaryLocators", description="This is the pronunciation dictionary locators to use." + ), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field( + alias="fallbackPlan", + description="This is the plan for voice provider fallbacks in the event that the primary voice provider fails.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/eleven_labs_voice_id.py b/src/vapi/types/eleven_labs_voice_id.py index 633af95f..71e8e4df 100644 --- a/src/vapi/types/eleven_labs_voice_id.py +++ b/src/vapi/types/eleven_labs_voice_id.py @@ -1,6 +1,7 @@ # This file was auto-generated by Fern from our API Definition. import typing + from .eleven_labs_voice_id_enum import ElevenLabsVoiceIdEnum ElevenLabsVoiceId = typing.Union[ElevenLabsVoiceIdEnum, str] diff --git a/src/vapi/types/eleven_labs_voice_model.py b/src/vapi/types/eleven_labs_voice_model.py index b22563d2..f6c54343 100644 --- a/src/vapi/types/eleven_labs_voice_model.py +++ b/src/vapi/types/eleven_labs_voice_model.py @@ -3,6 +3,14 @@ import typing ElevenLabsVoiceModel = typing.Union[ - typing.Literal["eleven_multilingual_v2", "eleven_turbo_v2", "eleven_turbo_v2_5", "eleven_monolingual_v1"], + typing.Literal[ + "eleven_multilingual_v2", + "eleven_turbo_v2", + "eleven_turbo_v2_5", + "eleven_flash_v2", + "eleven_flash_v2_5", + "eleven_monolingual_v1", + "eleven_v3", + ], typing.Any, ] diff --git a/src/vapi/types/email_credential.py b/src/vapi/types/email_credential.py new file mode 100644 index 00000000..48c6c2e5 --- /dev/null +++ b/src/vapi/types/email_credential.py @@ -0,0 +1,60 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .email_credential_provider import EmailCredentialProvider + + +class EmailCredential(UncheckedBaseModel): + provider: EmailCredentialProvider + email: str = pydantic.Field() + """ + The recipient email address for alerts + """ + + id: str = pydantic.Field() + """ + This is the unique identifier for the credential. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/email_credential_provider.py b/src/vapi/types/email_credential_provider.py new file mode 100644 index 00000000..09d5324b --- /dev/null +++ b/src/vapi/types/email_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +EmailCredentialProvider = typing.Union[typing.Literal["email"], typing.Any] diff --git a/src/vapi/types/end_call_tool.py b/src/vapi/types/end_call_tool.py index 6e69a1c1..5135c00c 100644 --- a/src/vapi/types/end_call_tool.py +++ b/src/vapi/types/end_call_tool.py @@ -1,31 +1,20 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions +from __future__ import annotations + +import datetime as dt import typing -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel from .end_call_tool_messages_item import EndCallToolMessagesItem -import datetime as dt -from .open_ai_function import OpenAiFunction -from .server import Server -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from .tool_rejection_plan import ToolRejectionPlan -class EndCallTool(UniversalBaseModel): - async_: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="async")] = pydantic.Field( - default=None - ) - """ - This determines if the tool is async. - - If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server. - - If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server. - - Defaults to synchronous (`false`). - """ - +class EndCallTool(UncheckedBaseModel): messages: typing.Optional[typing.List[EndCallToolMessagesItem]] = pydantic.Field(default=None) """ These are the messages that will be spoken to the user as the tool is running. @@ -33,44 +22,40 @@ class EndCallTool(UniversalBaseModel): For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. """ - type: typing.Literal["endCall"] = "endCall" id: str = pydantic.Field() """ This is the unique identifier for the tool. """ - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field() - """ - This is the unique identifier for the organization that this tool belongs to. - """ - - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the tool was created. - """ - - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the tool was last updated. - """ - - function: typing.Optional[OpenAiFunction] = pydantic.Field(default=None) - """ - This is the function definition of the tool. - - For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on tool-specific fields like `tool.destinations`. But, even in those cases, you can provide a custom function definition for advanced use cases. - - An example of an advanced use case is if you want to customize the message that's spoken for `endCall` tool. You can specify a function where it returns an argument "reason". Then, in `messages` array, you can have many "request-complete" messages. One of these messages will be triggered if the `messages[].conditions` matches the "reason" argument. - """ - - server: typing.Optional[Server] = pydantic.Field(default=None) - """ - This is the server that will be hit when this tool is requested by the model. - - All requests will be sent with the call object among other things. You can find more details in the Server URL documentation. - - This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: highest tool.server.url, then assistant.serverUrl, then phoneNumber.serverUrl, then org.serverUrl. - """ + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the organization that this tool belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the tool was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", description="This is the ISO 8601 date-time string of when the tool was last updated." + ), + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -80,3 +65,6 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +update_forward_refs(EndCallTool) diff --git a/src/vapi/types/end_call_tool_messages_item.py b/src/vapi/types/end_call_tool_messages_item.py index 02d93707..f557c95f 100644 --- a/src/vapi/types/end_call_tool_messages_item.py +++ b/src/vapi/types/end_call_tool_messages_item.py @@ -1,9 +1,104 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .tool_message_start import ToolMessageStart -from .tool_message_complete import ToolMessageComplete -from .tool_message_failed import ToolMessageFailed -from .tool_message_delayed import ToolMessageDelayed -EndCallToolMessagesItem = typing.Union[ToolMessageStart, ToolMessageComplete, ToolMessageFailed, ToolMessageDelayed] +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class EndCallToolMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class EndCallToolMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class EndCallToolMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class EndCallToolMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +EndCallToolMessagesItem = typing_extensions.Annotated[ + typing.Union[ + EndCallToolMessagesItem_RequestStart, + EndCallToolMessagesItem_RequestComplete, + EndCallToolMessagesItem_RequestFailed, + EndCallToolMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/endpointed_speech_low_confidence_options.py b/src/vapi/types/endpointed_speech_low_confidence_options.py new file mode 100644 index 00000000..fa975628 --- /dev/null +++ b/src/vapi/types/endpointed_speech_low_confidence_options.py @@ -0,0 +1,37 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class EndpointedSpeechLowConfidenceOptions(UncheckedBaseModel): + confidence_min: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="confidenceMin"), + pydantic.Field( + alias="confidenceMin", + description="This is the minimum confidence threshold.\nTranscripts with confidence below this value will be discarded.\n\n@default confidenceMax - 0.2", + ), + ] = None + confidence_max: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="confidenceMax"), + pydantic.Field( + alias="confidenceMax", + description="This is the maximum confidence threshold.\nTranscripts with confidence at or above this value will be processed normally.\n\n@default transcriber's confidenceThreshold", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/eval.py b/src/vapi/types/eval.py new file mode 100644 index 00000000..723830d3 --- /dev/null +++ b/src/vapi/types/eval.py @@ -0,0 +1,58 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .eval_messages_item import EvalMessagesItem +from .eval_type import EvalType + + +class Eval(UncheckedBaseModel): + messages: typing.List[EvalMessagesItem] = pydantic.Field() + """ + This is the mock conversation that will be used to evaluate the flow of the conversation. + + Mock Messages are used to simulate the flow of the conversation + + Evaluation Messages are used as checkpoints in the flow where the model's response to previous conversation needs to be evaluated to check the content and tool calls + """ + + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the eval. + It helps identify what the eval is checking for. + """ + + description: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the description of the eval. + This helps describe the eval and its purpose in detail. It will not be used to evaluate the flow of the conversation. + """ + + type: EvalType = pydantic.Field() + """ + This is the type of the eval. + Currently it is fixed to `chat.mockConversation`. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/eval_anthropic_model.py b/src/vapi/types/eval_anthropic_model.py new file mode 100644 index 00000000..9a4866d6 --- /dev/null +++ b/src/vapi/types/eval_anthropic_model.py @@ -0,0 +1,58 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .anthropic_thinking_config import AnthropicThinkingConfig +from .eval_anthropic_model_model import EvalAnthropicModelModel + + +class EvalAnthropicModel(UncheckedBaseModel): + model: EvalAnthropicModelModel = pydantic.Field() + """ + This is the specific model that will be used. + """ + + thinking: typing.Optional[AnthropicThinkingConfig] = pydantic.Field(default=None) + """ + This is the optional configuration for Anthropic's thinking feature. + + - If provided, `maxTokens` must be greater than `thinking.budgetTokens`. + """ + + temperature: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the temperature of the model. For LLM-as-a-judge, it's recommended to set it between 0 - 0.3 to avoid hallucinations and ensure the model judges the output correctly based on the instructions. + """ + + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="maxTokens"), + pydantic.Field( + alias="maxTokens", + description="This is the max tokens of the model.\nIf your Judge instructions return `true` or `false` takes only 1 token (as per the OpenAI Tokenizer), and therefore is recommended to set it to a low number to force the model to return a short response.", + ), + ] = None + messages: typing.List[typing.Dict[str, typing.Any]] = pydantic.Field() + """ + These are the messages which will instruct the AI Judge on how to evaluate the assistant message. + The LLM-Judge must respond with "pass" or "fail" to indicate if the assistant message passes the eval. + + To access the messages in the mock conversation, use the LiquidJS variable `{{messages}}`. + The assistant message to be evaluated will be passed as the last message in the `messages` array and can be accessed using `{{messages[-1]}}`. + + It is recommended to use the system message to instruct the LLM how to evaluate the assistant message, and then use the first user message to pass the assistant message to be evaluated. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/eval_anthropic_model_model.py b/src/vapi/types/eval_anthropic_model_model.py new file mode 100644 index 00000000..2d85cb6e --- /dev/null +++ b/src/vapi/types/eval_anthropic_model_model.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +EvalAnthropicModelModel = typing.Union[ + typing.Literal[ + "claude-3-opus-20240229", + "claude-3-sonnet-20240229", + "claude-3-haiku-20240307", + "claude-3-5-sonnet-20240620", + "claude-3-5-sonnet-20241022", + "claude-3-5-haiku-20241022", + "claude-3-7-sonnet-20250219", + "claude-opus-4-20250514", + "claude-opus-4-5-20251101", + "claude-opus-4-6", + "claude-sonnet-4-20250514", + "claude-sonnet-4-5-20250929", + "claude-sonnet-4-6", + "claude-haiku-4-5-20251001", + ], + typing.Any, +] diff --git a/src/vapi/types/eval_custom_model.py b/src/vapi/types/eval_custom_model.py new file mode 100644 index 00000000..38f6edd0 --- /dev/null +++ b/src/vapi/types/eval_custom_model.py @@ -0,0 +1,67 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class EvalCustomModel(UncheckedBaseModel): + url: str = pydantic.Field() + """ + These is the URL we'll use for the OpenAI client's `baseURL`. Ex. https://openrouter.ai/api/v1 + """ + + headers: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) + """ + These are the headers we'll use for the OpenAI client's `headers`. + """ + + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="timeoutSeconds"), + pydantic.Field( + alias="timeoutSeconds", + description="This sets the timeout for the connection to the custom provider without needing to stream any tokens back. Default is 20 seconds.", + ), + ] = None + model: str = pydantic.Field() + """ + This is the name of the model. Ex. gpt-4o + """ + + temperature: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the temperature of the model. For LLM-as-a-judge, it's recommended to set it between 0 - 0.3 to avoid hallucinations and ensure the model judges the output correctly based on the instructions. + """ + + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="maxTokens"), + pydantic.Field( + alias="maxTokens", + description="This is the max tokens of the model.\nIf your Judge instructions return `true` or `false` takes only 1 token (as per the OpenAI Tokenizer), and therefore is recommended to set it to a low number to force the model to return a short response.", + ), + ] = None + messages: typing.List[typing.Dict[str, typing.Any]] = pydantic.Field() + """ + These are the messages which will instruct the AI Judge on how to evaluate the assistant message. + The LLM-Judge must respond with "pass" or "fail" to indicate if the assistant message passes the eval. + + To access the messages in the mock conversation, use the LiquidJS variable `{{messages}}`. + The assistant message to be evaluated will be passed as the last message in the `messages` array and can be accessed using `{{messages[-1]}}`. + + It is recommended to use the system message to instruct the LLM how to evaluate the assistant message, and then use the first user message to pass the assistant message to be evaluated. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/eval_google_model.py b/src/vapi/types/eval_google_model.py new file mode 100644 index 00000000..f4d4e6bf --- /dev/null +++ b/src/vapi/types/eval_google_model.py @@ -0,0 +1,50 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .eval_google_model_model import EvalGoogleModelModel + + +class EvalGoogleModel(UncheckedBaseModel): + model: EvalGoogleModelModel = pydantic.Field() + """ + This is the name of the model. Ex. gpt-4o + """ + + temperature: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the temperature of the model. For LLM-as-a-judge, it's recommended to set it between 0 - 0.3 to avoid hallucinations and ensure the model judges the output correctly based on the instructions. + """ + + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="maxTokens"), + pydantic.Field( + alias="maxTokens", + description="This is the max tokens of the model.\nIf your Judge instructions return `true` or `false` takes only 1 token (as per the OpenAI Tokenizer), and therefore is recommended to set it to a low number to force the model to return a short response.", + ), + ] = None + messages: typing.List[typing.Dict[str, typing.Any]] = pydantic.Field() + """ + These are the messages which will instruct the AI Judge on how to evaluate the assistant message. + The LLM-Judge must respond with "pass" or "fail" to indicate if the assistant message passes the eval. + + To access the messages in the mock conversation, use the LiquidJS variable `{{messages}}`. + The assistant message to be evaluated will be passed as the last message in the `messages` array and can be accessed using `{{messages[-1]}}`. + + It is recommended to use the system message to instruct the LLM how to evaluate the assistant message, and then use the first user message to pass the assistant message to be evaluated. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/eval_google_model_model.py b/src/vapi/types/eval_google_model_model.py new file mode 100644 index 00000000..e8e9236e --- /dev/null +++ b/src/vapi/types/eval_google_model_model.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +EvalGoogleModelModel = typing.Union[ + typing.Literal[ + "gemini-3-flash-preview", + "gemini-2.5-pro", + "gemini-2.5-flash", + "gemini-2.5-flash-lite", + "gemini-2.0-flash-thinking-exp", + "gemini-2.0-pro-exp-02-05", + "gemini-2.0-flash", + "gemini-2.0-flash-lite", + "gemini-2.0-flash-exp", + "gemini-2.0-flash-realtime-exp", + "gemini-1.5-flash", + "gemini-1.5-flash-002", + "gemini-1.5-pro", + "gemini-1.5-pro-002", + "gemini-1.0-pro", + ], + typing.Any, +] diff --git a/src/vapi/types/eval_groq_model.py b/src/vapi/types/eval_groq_model.py new file mode 100644 index 00000000..9e251095 --- /dev/null +++ b/src/vapi/types/eval_groq_model.py @@ -0,0 +1,56 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .eval_groq_model_model import EvalGroqModelModel +from .eval_groq_model_provider import EvalGroqModelProvider + + +class EvalGroqModel(UncheckedBaseModel): + provider: EvalGroqModelProvider = pydantic.Field() + """ + This is the provider of the model (`groq`). + """ + + model: EvalGroqModelModel = pydantic.Field() + """ + This is the name of the model. Ex. gpt-4o + """ + + temperature: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the temperature of the model. For LLM-as-a-judge, it's recommended to set it between 0 - 0.3 to avoid hallucinations and ensure the model judges the output correctly based on the instructions. + """ + + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="maxTokens"), + pydantic.Field( + alias="maxTokens", + description="This is the max tokens of the model.\nIf your Judge instructions return `true` or `false` takes only 1 token (as per the OpenAI Tokenizer), and therefore is recommended to set it to a low number to force the model to return a short response.", + ), + ] = None + messages: typing.List[typing.Dict[str, typing.Any]] = pydantic.Field() + """ + These are the messages which will instruct the AI Judge on how to evaluate the assistant message. + The LLM-Judge must respond with "pass" or "fail" to indicate if the assistant message passes the eval. + + To access the messages in the mock conversation, use the LiquidJS variable `{{messages}}`. + The assistant message to be evaluated will be passed as the last message in the `messages` array and can be accessed using `{{messages[-1]}}`. + + It is recommended to use the system message to instruct the LLM how to evaluate the assistant message, and then use the first user message to pass the assistant message to be evaluated. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/eval_groq_model_model.py b/src/vapi/types/eval_groq_model_model.py new file mode 100644 index 00000000..7254324c --- /dev/null +++ b/src/vapi/types/eval_groq_model_model.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +EvalGroqModelModel = typing.Union[ + typing.Literal[ + "openai/gpt-oss-20b", + "openai/gpt-oss-120b", + "deepseek-r1-distill-llama-70b", + "llama-3.3-70b-versatile", + "llama-3.1-405b-reasoning", + "llama-3.1-8b-instant", + "llama3-8b-8192", + "llama3-70b-8192", + "gemma2-9b-it", + "moonshotai/kimi-k2-instruct-0905", + "meta-llama/llama-4-maverick-17b-128e-instruct", + "meta-llama/llama-4-scout-17b-16e-instruct", + "mistral-saba-24b", + "compound-beta", + "compound-beta-mini", + ], + typing.Any, +] diff --git a/src/vapi/types/eval_groq_model_provider.py b/src/vapi/types/eval_groq_model_provider.py new file mode 100644 index 00000000..9d240725 --- /dev/null +++ b/src/vapi/types/eval_groq_model_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +EvalGroqModelProvider = typing.Union[typing.Literal["groq"], typing.Any] diff --git a/src/vapi/types/eval_messages_item.py b/src/vapi/types/eval_messages_item.py new file mode 100644 index 00000000..8e195e5c --- /dev/null +++ b/src/vapi/types/eval_messages_item.py @@ -0,0 +1,19 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .chat_eval_assistant_message_evaluation import ChatEvalAssistantMessageEvaluation +from .chat_eval_assistant_message_mock import ChatEvalAssistantMessageMock +from .chat_eval_system_message_mock import ChatEvalSystemMessageMock +from .chat_eval_tool_response_message_evaluation import ChatEvalToolResponseMessageEvaluation +from .chat_eval_tool_response_message_mock import ChatEvalToolResponseMessageMock +from .chat_eval_user_message_mock import ChatEvalUserMessageMock + +EvalMessagesItem = typing.Union[ + ChatEvalAssistantMessageMock, + ChatEvalSystemMessageMock, + ChatEvalToolResponseMessageMock, + ChatEvalToolResponseMessageEvaluation, + ChatEvalUserMessageMock, + ChatEvalAssistantMessageEvaluation, +] diff --git a/src/vapi/types/eval_model_list_options.py b/src/vapi/types/eval_model_list_options.py new file mode 100644 index 00000000..ab7a6b31 --- /dev/null +++ b/src/vapi/types/eval_model_list_options.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .eval_model_list_options_provider import EvalModelListOptionsProvider + + +class EvalModelListOptions(UncheckedBaseModel): + provider: EvalModelListOptionsProvider = pydantic.Field() + """ + This is the provider of the model. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/eval_model_list_options_provider.py b/src/vapi/types/eval_model_list_options_provider.py new file mode 100644 index 00000000..f09adb16 --- /dev/null +++ b/src/vapi/types/eval_model_list_options_provider.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +EvalModelListOptionsProvider = typing.Union[ + typing.Literal["openai", "anthropic", "google", "groq", "custom-llm"], typing.Any +] diff --git a/src/vapi/types/eval_open_ai_model.py b/src/vapi/types/eval_open_ai_model.py new file mode 100644 index 00000000..5ecb8eed --- /dev/null +++ b/src/vapi/types/eval_open_ai_model.py @@ -0,0 +1,53 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .eval_open_ai_model_model import EvalOpenAiModelModel + + +class EvalOpenAiModel(UncheckedBaseModel): + model: EvalOpenAiModelModel = pydantic.Field() + """ + This is the OpenAI model that will be used. + + When using Vapi OpenAI or your own Azure Credentials, you have the option to specify the region for the selected model. This shouldn't be specified unless you have a specific reason to do so. Vapi will automatically find the fastest region that make sense. + This is helpful when you are required to comply with Data Residency rules. Learn more about Azure regions here https://azure.microsoft.com/en-us/explore/global-infrastructure/data-residency/. + """ + + temperature: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the temperature of the model. For LLM-as-a-judge, it's recommended to set it between 0 - 0.3 to avoid hallucinations and ensure the model judges the output correctly based on the instructions. + """ + + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="maxTokens"), + pydantic.Field( + alias="maxTokens", + description="This is the max tokens of the model.\nIf your Judge instructions return `true` or `false` takes only 1 token (as per the OpenAI Tokenizer), and therefore is recommended to set it to a low number to force the model to return a short response.", + ), + ] = None + messages: typing.List[typing.Dict[str, typing.Any]] = pydantic.Field() + """ + These are the messages which will instruct the AI Judge on how to evaluate the assistant message. + The LLM-Judge must respond with "pass" or "fail" to indicate if the assistant message passes the eval. + + To access the messages in the mock conversation, use the LiquidJS variable `{{messages}}`. + The assistant message to be evaluated will be passed as the last message in the `messages` array and can be accessed using `{{messages[-1]}}`. + + It is recommended to use the system message to instruct the LLM how to evaluate the assistant message, and then use the first user message to pass the assistant message to be evaluated. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/eval_open_ai_model_model.py b/src/vapi/types/eval_open_ai_model_model.py new file mode 100644 index 00000000..f56b54c3 --- /dev/null +++ b/src/vapi/types/eval_open_ai_model_model.py @@ -0,0 +1,122 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +EvalOpenAiModelModel = typing.Union[ + typing.Literal[ + "gpt-5.4", + "gpt-5.4-mini", + "gpt-5.4-nano", + "gpt-5.2", + "gpt-5.2-chat-latest", + "gpt-5.1", + "gpt-5.1-chat-latest", + "gpt-5", + "gpt-5-chat-latest", + "gpt-5-mini", + "gpt-5-nano", + "gpt-4.1-2025-04-14", + "gpt-4.1-mini-2025-04-14", + "gpt-4.1-nano-2025-04-14", + "gpt-4.1", + "gpt-4.1-mini", + "gpt-4.1-nano", + "chatgpt-4o-latest", + "o3", + "o3-mini", + "o4-mini", + "o1-mini", + "o1-mini-2024-09-12", + "gpt-4o-mini-2024-07-18", + "gpt-4o-mini", + "gpt-4o", + "gpt-4o-2024-05-13", + "gpt-4o-2024-08-06", + "gpt-4o-2024-11-20", + "gpt-4-turbo", + "gpt-4-turbo-2024-04-09", + "gpt-4-turbo-preview", + "gpt-4-0125-preview", + "gpt-4-1106-preview", + "gpt-4", + "gpt-4-0613", + "gpt-3.5-turbo", + "gpt-3.5-turbo-0125", + "gpt-3.5-turbo-1106", + "gpt-3.5-turbo-16k", + "gpt-3.5-turbo-0613", + "gpt-4.1-2025-04-14:westus", + "gpt-4.1-2025-04-14:eastus2", + "gpt-4.1-2025-04-14:eastus", + "gpt-4.1-2025-04-14:westus3", + "gpt-4.1-2025-04-14:northcentralus", + "gpt-4.1-2025-04-14:southcentralus", + "gpt-4.1-2025-04-14:westeurope", + "gpt-4.1-2025-04-14:germanywestcentral", + "gpt-4.1-2025-04-14:polandcentral", + "gpt-4.1-2025-04-14:spaincentral", + "gpt-4.1-mini-2025-04-14:westus", + "gpt-4.1-mini-2025-04-14:eastus2", + "gpt-4.1-mini-2025-04-14:eastus", + "gpt-4.1-mini-2025-04-14:westus3", + "gpt-4.1-mini-2025-04-14:northcentralus", + "gpt-4.1-mini-2025-04-14:southcentralus", + "gpt-4.1-mini-2025-04-14:westeurope", + "gpt-4.1-mini-2025-04-14:germanywestcentral", + "gpt-4.1-mini-2025-04-14:polandcentral", + "gpt-4.1-mini-2025-04-14:spaincentral", + "gpt-4.1-nano-2025-04-14:westus", + "gpt-4.1-nano-2025-04-14:eastus2", + "gpt-4.1-nano-2025-04-14:westus3", + "gpt-4.1-nano-2025-04-14:northcentralus", + "gpt-4.1-nano-2025-04-14:southcentralus", + "gpt-4o-2024-11-20:swedencentral", + "gpt-4o-2024-11-20:westus", + "gpt-4o-2024-11-20:eastus2", + "gpt-4o-2024-11-20:eastus", + "gpt-4o-2024-11-20:westus3", + "gpt-4o-2024-11-20:southcentralus", + "gpt-4o-2024-11-20:westeurope", + "gpt-4o-2024-11-20:germanywestcentral", + "gpt-4o-2024-11-20:polandcentral", + "gpt-4o-2024-11-20:spaincentral", + "gpt-4o-2024-08-06:westus", + "gpt-4o-2024-08-06:westus3", + "gpt-4o-2024-08-06:eastus", + "gpt-4o-2024-08-06:eastus2", + "gpt-4o-2024-08-06:northcentralus", + "gpt-4o-2024-08-06:southcentralus", + "gpt-4o-mini-2024-07-18:westus", + "gpt-4o-mini-2024-07-18:westus3", + "gpt-4o-mini-2024-07-18:eastus", + "gpt-4o-mini-2024-07-18:eastus2", + "gpt-4o-mini-2024-07-18:northcentralus", + "gpt-4o-mini-2024-07-18:southcentralus", + "gpt-4o-2024-05-13:eastus2", + "gpt-4o-2024-05-13:eastus", + "gpt-4o-2024-05-13:northcentralus", + "gpt-4o-2024-05-13:southcentralus", + "gpt-4o-2024-05-13:westus3", + "gpt-4o-2024-05-13:westus", + "gpt-4-turbo-2024-04-09:eastus2", + "gpt-4-0125-preview:eastus", + "gpt-4-0125-preview:northcentralus", + "gpt-4-0125-preview:southcentralus", + "gpt-4-1106-preview:australiaeast", + "gpt-4-1106-preview:canadaeast", + "gpt-4-1106-preview:france", + "gpt-4-1106-preview:india", + "gpt-4-1106-preview:norway", + "gpt-4-1106-preview:swedencentral", + "gpt-4-1106-preview:uk", + "gpt-4-1106-preview:westus", + "gpt-4-1106-preview:westus3", + "gpt-4-0613:canadaeast", + "gpt-3.5-turbo-0125:canadaeast", + "gpt-3.5-turbo-0125:northcentralus", + "gpt-3.5-turbo-0125:southcentralus", + "gpt-3.5-turbo-1106:canadaeast", + "gpt-3.5-turbo-1106:westus", + ], + typing.Any, +] diff --git a/src/vapi/types/logs_paginated_response.py b/src/vapi/types/eval_paginated_response.py similarity index 76% rename from src/vapi/types/logs_paginated_response.py rename to src/vapi/types/eval_paginated_response.py index c6562a58..9581f12e 100644 --- a/src/vapi/types/logs_paginated_response.py +++ b/src/vapi/types/eval_paginated_response.py @@ -1,15 +1,16 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -from .log import Log -from .pagination_meta import PaginationMeta -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .eval import Eval +from .pagination_meta import PaginationMeta -class LogsPaginatedResponse(UniversalBaseModel): - results: typing.List[Log] +class EvalPaginatedResponse(UncheckedBaseModel): + results: typing.List[Eval] metadata: PaginationMeta if IS_PYDANTIC_V2: diff --git a/src/vapi/types/eval_run.py b/src/vapi/types/eval_run.py new file mode 100644 index 00000000..c37e75ca --- /dev/null +++ b/src/vapi/types/eval_run.py @@ -0,0 +1,101 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_eval_dto import CreateEvalDto +from .eval_run_ended_reason import EvalRunEndedReason +from .eval_run_result import EvalRunResult +from .eval_run_status import EvalRunStatus +from .eval_run_target import EvalRunTarget +from .eval_run_type import EvalRunType + + +class EvalRun(UncheckedBaseModel): + status: EvalRunStatus = pydantic.Field() + """ + This is the status of the eval run. When an eval run is created, the status is 'running'. + When the eval run is completed, the status is 'ended'. + """ + + ended_reason: typing_extensions.Annotated[ + EvalRunEndedReason, + FieldMetadata(alias="endedReason"), + pydantic.Field( + alias="endedReason", + description="This is the reason for the eval run to end.\nWhen the eval run is completed normally i.e end of mock conversation, the status is 'mockConversation.done'.\nWhen the eval fails due to an error like Chat error or incorrect configuration, the status is 'error'.\nWhen the eval runs for too long, due to model issues or tool call issues, the status is 'timeout'.\nWhen the eval run is cancelled by the user, the status is 'cancelled'.\nWhen the eval run is cancelled by Vapi for any reason, the status is 'aborted'.", + ), + ] + eval: typing.Optional[CreateEvalDto] = pydantic.Field(default=None) + """ + This is the transient eval that will be run + """ + + target: EvalRunTarget = pydantic.Field() + """ + This is the target that will be run against the eval + """ + + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + started_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="startedAt"), pydantic.Field(alias="startedAt") + ] + ended_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="endedAt"), pydantic.Field(alias="endedAt")] + ended_message: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="endedMessage"), + pydantic.Field( + alias="endedMessage", + description="This is the ended message when the eval run ended for any reason apart from mockConversation.done", + ), + ] = None + results: typing.List[EvalRunResult] = pydantic.Field() + """ + This is the results of the eval or suite run. + The array will have a single item for an eval run, and multiple items each corresponding to the an eval in a suite run in the same order as the evals in the suite. + """ + + cost: float = pydantic.Field() + """ + This is the cost of the eval or suite run in USD. + """ + + costs: typing.List[typing.Dict[str, typing.Any]] = pydantic.Field() + """ + This is the break up of costs of the eval or suite run. + """ + + type: EvalRunType = pydantic.Field() + """ + This is the type of the run. + Currently it is fixed to `eval`. + """ + + eval_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="evalId"), + pydantic.Field(alias="evalId", description="This is the id of the eval that will be run."), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(EvalRun) diff --git a/src/vapi/types/eval_run_ended_reason.py b/src/vapi/types/eval_run_ended_reason.py new file mode 100644 index 00000000..3e714210 --- /dev/null +++ b/src/vapi/types/eval_run_ended_reason.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +EvalRunEndedReason = typing.Union[ + typing.Literal["mockConversation.done", "error", "timeout", "cancelled", "aborted"], typing.Any +] diff --git a/src/vapi/types/eval_run_paginated_response.py b/src/vapi/types/eval_run_paginated_response.py new file mode 100644 index 00000000..cde254a0 --- /dev/null +++ b/src/vapi/types/eval_run_paginated_response.py @@ -0,0 +1,28 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .eval_run import EvalRun +from .pagination_meta import PaginationMeta + + +class EvalRunPaginatedResponse(UncheckedBaseModel): + results: typing.List[EvalRun] + metadata: PaginationMeta + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(EvalRunPaginatedResponse) diff --git a/src/vapi/types/eval_run_result.py b/src/vapi/types/eval_run_result.py new file mode 100644 index 00000000..5841a3e0 --- /dev/null +++ b/src/vapi/types/eval_run_result.py @@ -0,0 +1,47 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .eval_run_result_messages_item import EvalRunResultMessagesItem +from .eval_run_result_status import EvalRunResultStatus + + +class EvalRunResult(UncheckedBaseModel): + status: EvalRunResultStatus = pydantic.Field() + """ + This is the status of the eval run result. + The status is only 'pass' or 'fail' for an eval run result. + Currently, An eval is considered `pass` only if all the Assistant Judge messages are evaluated to pass. + """ + + messages: typing.List[EvalRunResultMessagesItem] = pydantic.Field() + """ + This is the messages of the eval run result. + It contains the user/system messages + """ + + started_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="startedAt"), + pydantic.Field(alias="startedAt", description="This is the start time of the eval run result."), + ] + ended_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="endedAt"), + pydantic.Field(alias="endedAt", description="This is the end time of the eval run result."), + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/eval_run_result_messages_item.py b/src/vapi/types/eval_run_result_messages_item.py new file mode 100644 index 00000000..60f9c5ae --- /dev/null +++ b/src/vapi/types/eval_run_result_messages_item.py @@ -0,0 +1,84 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .chat_eval_assistant_message_mock_tool_call import ChatEvalAssistantMessageMockToolCall + + +class EvalRunResultMessagesItem_User(UncheckedBaseModel): + role: typing.Literal["user"] = "user" + content: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class EvalRunResultMessagesItem_System(UncheckedBaseModel): + role: typing.Literal["system"] = "system" + content: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class EvalRunResultMessagesItem_Tool(UncheckedBaseModel): + role: typing.Literal["tool"] = "tool" + content: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class EvalRunResultMessagesItem_Assistant(UncheckedBaseModel): + role: typing.Literal["assistant"] = "assistant" + content: typing.Optional[str] = None + tool_calls: typing_extensions.Annotated[ + typing.Optional[typing.List[ChatEvalAssistantMessageMockToolCall]], + FieldMetadata(alias="toolCalls"), + pydantic.Field(alias="toolCalls"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +EvalRunResultMessagesItem = typing_extensions.Annotated[ + typing.Union[ + EvalRunResultMessagesItem_User, + EvalRunResultMessagesItem_System, + EvalRunResultMessagesItem_Tool, + EvalRunResultMessagesItem_Assistant, + ], + UnionMetadata(discriminant="role"), +] diff --git a/src/vapi/types/eval_run_result_status.py b/src/vapi/types/eval_run_result_status.py new file mode 100644 index 00000000..0bc62e8b --- /dev/null +++ b/src/vapi/types/eval_run_result_status.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +EvalRunResultStatus = typing.Union[typing.Literal["pass", "fail"], typing.Any] diff --git a/src/vapi/types/eval_run_status.py b/src/vapi/types/eval_run_status.py new file mode 100644 index 00000000..995b8674 --- /dev/null +++ b/src/vapi/types/eval_run_status.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +EvalRunStatus = typing.Union[typing.Literal["running", "ended", "queued"], typing.Any] diff --git a/src/vapi/types/eval_run_target.py b/src/vapi/types/eval_run_target.py new file mode 100644 index 00000000..0e237b90 --- /dev/null +++ b/src/vapi/types/eval_run_target.py @@ -0,0 +1,246 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class EvalRunTarget_Assistant(UncheckedBaseModel): + """ + This is the target that will be run against the eval + """ + + type: typing.Literal["assistant"] = "assistant" + assistant: typing.Optional["CreateAssistantDto"] = None + assistant_overrides: typing_extensions.Annotated[ + typing.Optional["AssistantOverrides"], + FieldMetadata(alias="assistantOverrides"), + pydantic.Field(alias="assistantOverrides"), + ] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class EvalRunTarget_Squad(UncheckedBaseModel): + """ + This is the target that will be run against the eval + """ + + type: typing.Literal["squad"] = "squad" + squad: typing.Optional["CreateSquadDto"] = None + assistant_overrides: typing_extensions.Annotated[ + typing.Optional["AssistantOverrides"], + FieldMetadata(alias="assistantOverrides"), + pydantic.Field(alias="assistantOverrides"), + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +EvalRunTarget = typing_extensions.Annotated[ + typing.Union[EvalRunTarget_Assistant, EvalRunTarget_Squad], UnionMetadata(discriminant="type") +] +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + EvalRunTarget_Assistant, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + EvalRunTarget_Squad, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/eval_run_target_assistant.py b/src/vapi/types/eval_run_target_assistant.py new file mode 100644 index 00000000..1ada44b1 --- /dev/null +++ b/src/vapi/types/eval_run_target_assistant.py @@ -0,0 +1,162 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class EvalRunTargetAssistant(UncheckedBaseModel): + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) + """ + This is the transient assistant that will be run against the eval + """ + + assistant_overrides: typing_extensions.Annotated[ + typing.Optional["AssistantOverrides"], + FieldMetadata(alias="assistantOverrides"), + pydantic.Field( + alias="assistantOverrides", description="This is the overrides that will be applied to the assistant." + ), + ] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assistantId"), + pydantic.Field( + alias="assistantId", description="This is the id of the assistant that will be run against the eval" + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + EvalRunTargetAssistant, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/eval_run_target_squad.py b/src/vapi/types/eval_run_target_squad.py new file mode 100644 index 00000000..c954ae89 --- /dev/null +++ b/src/vapi/types/eval_run_target_squad.py @@ -0,0 +1,160 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class EvalRunTargetSquad(UncheckedBaseModel): + squad: typing.Optional["CreateSquadDto"] = pydantic.Field(default=None) + """ + This is the transient squad that will be run against the eval + """ + + assistant_overrides: typing_extensions.Annotated[ + typing.Optional["AssistantOverrides"], + FieldMetadata(alias="assistantOverrides"), + pydantic.Field( + alias="assistantOverrides", description="This is the overrides that will be applied to the assistants." + ), + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="squadId"), + pydantic.Field(alias="squadId", description="This is the id of the squad that will be run against the eval"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + EvalRunTargetSquad, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/eval_run_type.py b/src/vapi/types/eval_run_type.py new file mode 100644 index 00000000..795fb2ae --- /dev/null +++ b/src/vapi/types/eval_run_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +EvalRunType = typing.Union[typing.Literal["eval"], typing.Any] diff --git a/src/vapi/types/eval_type.py b/src/vapi/types/eval_type.py new file mode 100644 index 00000000..c4abdbbd --- /dev/null +++ b/src/vapi/types/eval_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +EvalType = typing.Union[typing.Literal["chat.mockConversation"], typing.Any] diff --git a/src/vapi/types/eval_user_editable.py b/src/vapi/types/eval_user_editable.py new file mode 100644 index 00000000..ff8732fc --- /dev/null +++ b/src/vapi/types/eval_user_editable.py @@ -0,0 +1,47 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .eval_user_editable_messages_item import EvalUserEditableMessagesItem +from .eval_user_editable_type import EvalUserEditableType + + +class EvalUserEditable(UncheckedBaseModel): + messages: typing.List[EvalUserEditableMessagesItem] = pydantic.Field() + """ + This is the mock conversation that will be used to evaluate the flow of the conversation. + + Mock Messages are used to simulate the flow of the conversation + + Evaluation Messages are used as checkpoints in the flow where the model's response to previous conversation needs to be evaluated to check the content and tool calls + """ + + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the eval. + It helps identify what the eval is checking for. + """ + + description: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the description of the eval. + This helps describe the eval and its purpose in detail. It will not be used to evaluate the flow of the conversation. + """ + + type: EvalUserEditableType = pydantic.Field() + """ + This is the type of the eval. + Currently it is fixed to `chat.mockConversation`. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/eval_user_editable_messages_item.py b/src/vapi/types/eval_user_editable_messages_item.py new file mode 100644 index 00000000..e225fd77 --- /dev/null +++ b/src/vapi/types/eval_user_editable_messages_item.py @@ -0,0 +1,19 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .chat_eval_assistant_message_evaluation import ChatEvalAssistantMessageEvaluation +from .chat_eval_assistant_message_mock import ChatEvalAssistantMessageMock +from .chat_eval_system_message_mock import ChatEvalSystemMessageMock +from .chat_eval_tool_response_message_evaluation import ChatEvalToolResponseMessageEvaluation +from .chat_eval_tool_response_message_mock import ChatEvalToolResponseMessageMock +from .chat_eval_user_message_mock import ChatEvalUserMessageMock + +EvalUserEditableMessagesItem = typing.Union[ + ChatEvalAssistantMessageMock, + ChatEvalSystemMessageMock, + ChatEvalToolResponseMessageMock, + ChatEvalToolResponseMessageEvaluation, + ChatEvalUserMessageMock, + ChatEvalAssistantMessageEvaluation, +] diff --git a/src/vapi/types/eval_user_editable_type.py b/src/vapi/types/eval_user_editable_type.py new file mode 100644 index 00000000..6307b477 --- /dev/null +++ b/src/vapi/types/eval_user_editable_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +EvalUserEditableType = typing.Union[typing.Literal["chat.mockConversation"], typing.Any] diff --git a/src/vapi/types/evaluation_plan_item.py b/src/vapi/types/evaluation_plan_item.py new file mode 100644 index 00000000..7a7b48a9 --- /dev/null +++ b/src/vapi/types/evaluation_plan_item.py @@ -0,0 +1,65 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_structured_output_dto import CreateStructuredOutputDto +from .evaluation_plan_item_comparator import EvaluationPlanItemComparator +from .evaluation_plan_item_value import EvaluationPlanItemValue + + +class EvaluationPlanItem(UncheckedBaseModel): + structured_output_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="structuredOutputId"), + pydantic.Field( + alias="structuredOutputId", + description="This is the ID of an existing structured output to use for evaluation.\nMutually exclusive with structuredOutput.", + ), + ] = None + structured_output: typing_extensions.Annotated[ + typing.Optional[CreateStructuredOutputDto], + FieldMetadata(alias="structuredOutput"), + pydantic.Field( + alias="structuredOutput", + description="This is an inline structured output definition for evaluation.\nMutually exclusive with structuredOutputId.\nOnly primitive schema types (string, number, integer, boolean) are allowed.", + ), + ] = None + comparator: EvaluationPlanItemComparator = pydantic.Field() + """ + This is the comparison operator to use when evaluating the extracted value against the expected value. + Available operators depend on the structured output's schema type: + - boolean: '=', '!=' + - string: '=', '!=' + - number/integer: '=', '!=', '>', '<', '>=', '<=' + """ + + value: EvaluationPlanItemValue = pydantic.Field() + """ + This is the expected value to compare against the extracted structured output result. + Type should match the structured output's schema type. + """ + + required: typing.Optional[bool] = pydantic.Field(default=None) + """ + This is whether this evaluation must pass for the simulation to pass. + Defaults to true. If false, the result is informational only. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(EvaluationPlanItem) diff --git a/src/vapi/types/evaluation_plan_item_comparator.py b/src/vapi/types/evaluation_plan_item_comparator.py new file mode 100644 index 00000000..936f4660 --- /dev/null +++ b/src/vapi/types/evaluation_plan_item_comparator.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +EvaluationPlanItemComparator = typing.Union[typing.Literal["=", "!=", ">", "<", ">=", "<="], typing.Any] diff --git a/src/vapi/types/evaluation_plan_item_value.py b/src/vapi/types/evaluation_plan_item_value.py new file mode 100644 index 00000000..170285b0 --- /dev/null +++ b/src/vapi/types/evaluation_plan_item_value.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +EvaluationPlanItemValue = typing.Union[float, str, bool] diff --git a/src/vapi/types/events_table_boolean_condition.py b/src/vapi/types/events_table_boolean_condition.py new file mode 100644 index 00000000..7f0d3438 --- /dev/null +++ b/src/vapi/types/events_table_boolean_condition.py @@ -0,0 +1,34 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .events_table_boolean_condition_operator import EventsTableBooleanConditionOperator + + +class EventsTableBooleanCondition(UncheckedBaseModel): + column: str = pydantic.Field() + """ + The boolean field name from the event data + """ + + operator: EventsTableBooleanConditionOperator = pydantic.Field() + """ + Boolean comparison operator + """ + + value: bool = pydantic.Field() + """ + The boolean value to compare + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/events_table_boolean_condition_operator.py b/src/vapi/types/events_table_boolean_condition_operator.py new file mode 100644 index 00000000..fa33ee13 --- /dev/null +++ b/src/vapi/types/events_table_boolean_condition_operator.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +EventsTableBooleanConditionOperator = typing.Union[typing.Literal["="], typing.Any] diff --git a/src/vapi/types/events_table_number_condition.py b/src/vapi/types/events_table_number_condition.py new file mode 100644 index 00000000..24b05a12 --- /dev/null +++ b/src/vapi/types/events_table_number_condition.py @@ -0,0 +1,34 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .events_table_number_condition_operator import EventsTableNumberConditionOperator + + +class EventsTableNumberCondition(UncheckedBaseModel): + column: str = pydantic.Field() + """ + The number field name from the event data + """ + + operator: EventsTableNumberConditionOperator = pydantic.Field() + """ + Number comparison operator + """ + + value: float = pydantic.Field() + """ + The number value to compare + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/events_table_number_condition_operator.py b/src/vapi/types/events_table_number_condition_operator.py new file mode 100644 index 00000000..81ca8993 --- /dev/null +++ b/src/vapi/types/events_table_number_condition_operator.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +EventsTableNumberConditionOperator = typing.Union[typing.Literal["=", "!=", ">", ">=", "<", "<="], typing.Any] diff --git a/src/vapi/types/events_table_string_condition.py b/src/vapi/types/events_table_string_condition.py new file mode 100644 index 00000000..6c1fd905 --- /dev/null +++ b/src/vapi/types/events_table_string_condition.py @@ -0,0 +1,34 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .events_table_string_condition_operator import EventsTableStringConditionOperator + + +class EventsTableStringCondition(UncheckedBaseModel): + column: str = pydantic.Field() + """ + The string field name from the event data + """ + + operator: EventsTableStringConditionOperator = pydantic.Field() + """ + String comparison operator + """ + + value: str = pydantic.Field() + """ + The string value to compare + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/events_table_string_condition_operator.py b/src/vapi/types/events_table_string_condition_operator.py new file mode 100644 index 00000000..d40d8316 --- /dev/null +++ b/src/vapi/types/events_table_string_condition_operator.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +EventsTableStringConditionOperator = typing.Union[typing.Literal["=", "!=", "contains", "notContains"], typing.Any] diff --git a/src/vapi/types/exact_replacement.py b/src/vapi/types/exact_replacement.py index 54f5d40e..3b706e16 100644 --- a/src/vapi/types/exact_replacement.py +++ b/src/vapi/types/exact_replacement.py @@ -1,25 +1,23 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class ExactReplacement(UniversalBaseModel): - type: typing.Literal["exact"] = pydantic.Field(default="exact") - """ - This is the exact replacement type. You can use this to replace a specific word or phrase with a different word or phrase. - - Usage: - - - Replace "hello" with "hi": { type: 'exact', key: 'hello', value: 'hi' } - - Replace "good morning" with "good day": { type: 'exact', key: 'good morning', value: 'good day' } - - Replace a specific name: { type: 'exact', key: 'John Doe', value: 'Jane Smith' } - - Replace an acronym: { type: 'exact', key: 'AI', value: 'Artificial Intelligence' } - - Replace a company name with its phonetic pronunciation: { type: 'exact', key: 'Vapi', value: 'Vappy' } - """ - +class ExactReplacement(UncheckedBaseModel): + replace_all_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="replaceAllEnabled"), + pydantic.Field( + alias="replaceAllEnabled", + description="This option let's you control whether to replace all instances of the key or only the first one. By default, it only replaces the first instance.\nExamples:\n- For { type: 'exact', key: 'hello', value: 'hi', replaceAllEnabled: false }. Before: \"hello world, hello universe\" | After: \"hi world, hello universe\"\n- For { type: 'exact', key: 'hello', value: 'hi', replaceAllEnabled: true }. Before: \"hello world, hello universe\" | After: \"hi world, hi universe\"\n@default false", + ), + ] = None key: str = pydantic.Field() """ This is the key to replace. diff --git a/src/vapi/types/export_chat_dto.py b/src/vapi/types/export_chat_dto.py new file mode 100644 index 00000000..d58f8272 --- /dev/null +++ b/src/vapi/types/export_chat_dto.py @@ -0,0 +1,164 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .export_chat_dto_columns import ExportChatDtoColumns +from .export_chat_dto_format import ExportChatDtoFormat +from .export_chat_dto_sort_order import ExportChatDtoSortOrder + + +class ExportChatDto(UncheckedBaseModel): + id: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the unique identifier for the chat to filter by. + """ + + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assistantId"), + pydantic.Field( + alias="assistantId", + description="This is the unique identifier for the assistant that will be used for the chat.", + ), + ] = None + assistant_id_any: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assistantIdAny"), + pydantic.Field( + alias="assistantIdAny", description="Filter by multiple assistant IDs. Provide as comma-separated values." + ), + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="squadId"), + pydantic.Field( + alias="squadId", description="This is the unique identifier for the squad that will be used for the chat." + ), + ] = None + session_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="sessionId"), + pydantic.Field( + alias="sessionId", + description="This is the unique identifier for the session that will be used for the chat.", + ), + ] = None + previous_chat_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="previousChatId"), + pydantic.Field( + alias="previousChatId", description="This is the unique identifier for the previous chat to filter by." + ), + ] = None + columns: typing.Optional[ExportChatDtoColumns] = pydantic.Field(default=None) + """ + Columns to include in the CSV export + """ + + email: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the email address to send the export to. + Required if userId is not available in the request context. + """ + + format: typing.Optional[ExportChatDtoFormat] = pydantic.Field(default=None) + """ + This is the format of the export. + + @default csv + """ + + page: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the page number to return. Defaults to 1. + """ + + sort_order: typing_extensions.Annotated[ + typing.Optional[ExportChatDtoSortOrder], + FieldMetadata(alias="sortOrder"), + pydantic.Field(alias="sortOrder", description="This is the sort order for pagination. Defaults to 'DESC'."), + ] = None + limit: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the maximum number of items to return. Defaults to 100. + """ + + created_at_gt: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="createdAtGt"), + pydantic.Field( + alias="createdAtGt", + description="This will return items where the createdAt is greater than the specified value.", + ), + ] = None + created_at_lt: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="createdAtLt"), + pydantic.Field( + alias="createdAtLt", + description="This will return items where the createdAt is less than the specified value.", + ), + ] = None + created_at_ge: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="createdAtGe"), + pydantic.Field( + alias="createdAtGe", + description="This will return items where the createdAt is greater than or equal to the specified value.", + ), + ] = None + created_at_le: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="createdAtLe"), + pydantic.Field( + alias="createdAtLe", + description="This will return items where the createdAt is less than or equal to the specified value.", + ), + ] = None + updated_at_gt: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="updatedAtGt"), + pydantic.Field( + alias="updatedAtGt", + description="This will return items where the updatedAt is greater than the specified value.", + ), + ] = None + updated_at_lt: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="updatedAtLt"), + pydantic.Field( + alias="updatedAtLt", + description="This will return items where the updatedAt is less than the specified value.", + ), + ] = None + updated_at_ge: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="updatedAtGe"), + pydantic.Field( + alias="updatedAtGe", + description="This will return items where the updatedAt is greater than or equal to the specified value.", + ), + ] = None + updated_at_le: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="updatedAtLe"), + pydantic.Field( + alias="updatedAtLe", + description="This will return items where the updatedAt is less than or equal to the specified value.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/export_chat_dto_columns.py b/src/vapi/types/export_chat_dto_columns.py new file mode 100644 index 00000000..6cf40b50 --- /dev/null +++ b/src/vapi/types/export_chat_dto_columns.py @@ -0,0 +1,19 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ExportChatDtoColumns = typing.Union[ + typing.Literal[ + "id", + "assistantId", + "squadId", + "sessionId", + "previousChatId", + "cost", + "messages", + "output", + "createdAt", + "updatedAt", + ], + typing.Any, +] diff --git a/src/vapi/types/export_chat_dto_format.py b/src/vapi/types/export_chat_dto_format.py new file mode 100644 index 00000000..aaaf6b0a --- /dev/null +++ b/src/vapi/types/export_chat_dto_format.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ExportChatDtoFormat = typing.Union[typing.Literal["csv", "json"], typing.Any] diff --git a/src/vapi/types/export_chat_dto_sort_order.py b/src/vapi/types/export_chat_dto_sort_order.py new file mode 100644 index 00000000..cb120772 --- /dev/null +++ b/src/vapi/types/export_chat_dto_sort_order.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ExportChatDtoSortOrder = typing.Union[typing.Literal["ASC", "DESC"], typing.Any] diff --git a/src/vapi/types/export_session_dto.py b/src/vapi/types/export_session_dto.py new file mode 100644 index 00000000..1fe30ccf --- /dev/null +++ b/src/vapi/types/export_session_dto.py @@ -0,0 +1,187 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_customer_dto import CreateCustomerDto +from .export_session_dto_columns import ExportSessionDtoColumns +from .export_session_dto_format import ExportSessionDtoFormat +from .export_session_dto_sort_order import ExportSessionDtoSortOrder + + +class ExportSessionDto(UncheckedBaseModel): + id: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the unique identifier for the session to filter by. + """ + + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the session to filter by. + """ + + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assistantId"), + pydantic.Field(alias="assistantId", description="This is the ID of the assistant to filter sessions by."), + ] = None + assistant_id_any: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assistantIdAny"), + pydantic.Field( + alias="assistantIdAny", description="Filter by multiple assistant IDs. Provide as comma-separated values." + ), + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="squadId"), + pydantic.Field(alias="squadId", description="This is the ID of the squad to filter sessions by."), + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="workflowId"), + pydantic.Field(alias="workflowId", description="This is the ID of the workflow to filter sessions by."), + ] = None + customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) + """ + This is the customer information to filter by. + """ + + customer_number_any: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="customerNumberAny"), + pydantic.Field( + alias="customerNumberAny", + description="Filter by any of the specified customer phone numbers (comma-separated).", + ), + ] = None + columns: typing.Optional[ExportSessionDtoColumns] = pydantic.Field(default=None) + """ + Columns to include in the CSV export + """ + + email: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the email address to send the export to. + Required if userId is not available in the request context. + """ + + format: typing.Optional[ExportSessionDtoFormat] = pydantic.Field(default=None) + """ + This is the format of the export. + + @default csv + """ + + phone_number_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="phoneNumberId"), + pydantic.Field( + alias="phoneNumberId", description="This will return sessions with the specified phoneNumberId." + ), + ] = None + phone_number_id_any: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="phoneNumberIdAny"), + pydantic.Field( + alias="phoneNumberIdAny", description="This will return sessions with any of the specified phoneNumberIds." + ), + ] = None + page: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the page number to return. Defaults to 1. + """ + + sort_order: typing_extensions.Annotated[ + typing.Optional[ExportSessionDtoSortOrder], + FieldMetadata(alias="sortOrder"), + pydantic.Field(alias="sortOrder", description="This is the sort order for pagination. Defaults to 'DESC'."), + ] = None + limit: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the maximum number of items to return. Defaults to 100. + """ + + created_at_gt: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="createdAtGt"), + pydantic.Field( + alias="createdAtGt", + description="This will return items where the createdAt is greater than the specified value.", + ), + ] = None + created_at_lt: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="createdAtLt"), + pydantic.Field( + alias="createdAtLt", + description="This will return items where the createdAt is less than the specified value.", + ), + ] = None + created_at_ge: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="createdAtGe"), + pydantic.Field( + alias="createdAtGe", + description="This will return items where the createdAt is greater than or equal to the specified value.", + ), + ] = None + created_at_le: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="createdAtLe"), + pydantic.Field( + alias="createdAtLe", + description="This will return items where the createdAt is less than or equal to the specified value.", + ), + ] = None + updated_at_gt: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="updatedAtGt"), + pydantic.Field( + alias="updatedAtGt", + description="This will return items where the updatedAt is greater than the specified value.", + ), + ] = None + updated_at_lt: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="updatedAtLt"), + pydantic.Field( + alias="updatedAtLt", + description="This will return items where the updatedAt is less than the specified value.", + ), + ] = None + updated_at_ge: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="updatedAtGe"), + pydantic.Field( + alias="updatedAtGe", + description="This will return items where the updatedAt is greater than or equal to the specified value.", + ), + ] = None + updated_at_le: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="updatedAtLe"), + pydantic.Field( + alias="updatedAtLe", + description="This will return items where the updatedAt is less than or equal to the specified value.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(ExportSessionDto) diff --git a/src/vapi/types/export_session_dto_columns.py b/src/vapi/types/export_session_dto_columns.py new file mode 100644 index 00000000..af606698 --- /dev/null +++ b/src/vapi/types/export_session_dto_columns.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ExportSessionDtoColumns = typing.Union[ + typing.Literal[ + "id", + "name", + "status", + "assistantId", + "squadId", + "customerName", + "customerNumber", + "phoneNumberId", + "cost", + "messages", + "createdAt", + "updatedAt", + ], + typing.Any, +] diff --git a/src/vapi/types/export_session_dto_format.py b/src/vapi/types/export_session_dto_format.py new file mode 100644 index 00000000..52c4d66e --- /dev/null +++ b/src/vapi/types/export_session_dto_format.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ExportSessionDtoFormat = typing.Union[typing.Literal["csv", "json"], typing.Any] diff --git a/src/vapi/types/export_session_dto_sort_order.py b/src/vapi/types/export_session_dto_sort_order.py new file mode 100644 index 00000000..babbd6cb --- /dev/null +++ b/src/vapi/types/export_session_dto_sort_order.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ExportSessionDtoSortOrder = typing.Union[typing.Literal["ASC", "DESC"], typing.Any] diff --git a/src/vapi/types/failed_edge_condition.py b/src/vapi/types/failed_edge_condition.py new file mode 100644 index 00000000..0b628b80 --- /dev/null +++ b/src/vapi/types/failed_edge_condition.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FailedEdgeCondition = typing.Any diff --git a/src/vapi/types/fallback_assembly_ai_transcriber.py b/src/vapi/types/fallback_assembly_ai_transcriber.py new file mode 100644 index 00000000..142e796a --- /dev/null +++ b/src/vapi/types/fallback_assembly_ai_transcriber.py @@ -0,0 +1,120 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .fallback_assembly_ai_transcriber_language import FallbackAssemblyAiTranscriberLanguage +from .fallback_assembly_ai_transcriber_speech_model import FallbackAssemblyAiTranscriberSpeechModel + + +class FallbackAssemblyAiTranscriber(UncheckedBaseModel): + language: typing.Optional[FallbackAssemblyAiTranscriberLanguage] = pydantic.Field(default=None) + """ + This is the language that will be set for the transcription. + """ + + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="confidenceThreshold"), + pydantic.Field( + alias="confidenceThreshold", + description="Transcripts below this confidence threshold will be discarded.\n\n@default 0.4", + ), + ] = None + format_turns: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="formatTurns"), + pydantic.Field(alias="formatTurns", description="This enables formatting of transcripts.\n\n@default true"), + ] = None + end_of_turn_confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="endOfTurnConfidenceThreshold"), + pydantic.Field( + alias="endOfTurnConfidenceThreshold", + description="This is the end of turn confidence threshold. The minimum confidence that the end of turn is detected.\nNote: Only used if startSpeakingPlan.smartEndpointingPlan is not set.\n@min 0\n@max 1\n@default 0.7", + ), + ] = None + min_end_of_turn_silence_when_confident: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minEndOfTurnSilenceWhenConfident"), + pydantic.Field( + alias="minEndOfTurnSilenceWhenConfident", + description="This is the minimum end of turn silence when confident in milliseconds.\nNote: Only used if startSpeakingPlan.smartEndpointingPlan is not set.\n@default 160", + ), + ] = None + word_finalization_max_wait_time: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="wordFinalizationMaxWaitTime"), + pydantic.Field(alias="wordFinalizationMaxWaitTime"), + ] = None + max_turn_silence: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="maxTurnSilence"), + pydantic.Field( + alias="maxTurnSilence", + description="This is the maximum turn silence time in milliseconds.\nNote: Only used if startSpeakingPlan.smartEndpointingPlan is not set.\n@default 400", + ), + ] = None + vad_assisted_endpointing_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="vadAssistedEndpointingEnabled"), + pydantic.Field( + alias="vadAssistedEndpointingEnabled", + description="Use VAD to assist with endpointing decisions from the transcriber.\nWhen enabled, transcriber endpointing will be buffered if VAD detects the user is still speaking, preventing premature turn-taking.\nWhen disabled, transcriber endpointing will be used immediately regardless of VAD state, allowing for quicker but more aggressive turn-taking.\nNote: Only used if startSpeakingPlan.smartEndpointingPlan is not set.\n\n@default true", + ), + ] = None + speech_model: typing_extensions.Annotated[ + typing.Optional[FallbackAssemblyAiTranscriberSpeechModel], + FieldMetadata(alias="speechModel"), + pydantic.Field( + alias="speechModel", + description="This is the speech model used for the streaming session.\nNote: Keyterms prompting is not supported with multilingual streaming.\n@default 'universal-streaming-english'", + ), + ] = None + realtime_url: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="realtimeUrl"), + pydantic.Field(alias="realtimeUrl", description="The WebSocket URL that the transcriber connects to."), + ] = None + word_boost: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="wordBoost"), + pydantic.Field(alias="wordBoost", description="Add up to 2500 characters of custom vocabulary."), + ] = None + keyterms_prompt: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="keytermsPrompt"), + pydantic.Field( + alias="keytermsPrompt", + description="Keyterms prompting improves recognition accuracy for specific words and phrases.\nCan include up to 100 keyterms, each up to 50 characters.\nCosts an additional $0.04/hour when enabled.", + ), + ] = None + end_utterance_silence_threshold: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="endUtteranceSilenceThreshold"), + pydantic.Field( + alias="endUtteranceSilenceThreshold", + description="The duration of the end utterance silence threshold in milliseconds.", + ), + ] = None + disable_partial_transcripts: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="disablePartialTranscripts"), + pydantic.Field( + alias="disablePartialTranscripts", + description="Disable partial transcripts.\nSet to `true` to not receive partial transcripts. Defaults to `false`.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/fallback_assembly_ai_transcriber_language.py b/src/vapi/types/fallback_assembly_ai_transcriber_language.py new file mode 100644 index 00000000..f9ba9890 --- /dev/null +++ b/src/vapi/types/fallback_assembly_ai_transcriber_language.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackAssemblyAiTranscriberLanguage = typing.Union[typing.Literal["multi", "en"], typing.Any] diff --git a/src/vapi/types/fallback_assembly_ai_transcriber_speech_model.py b/src/vapi/types/fallback_assembly_ai_transcriber_speech_model.py new file mode 100644 index 00000000..63a626cf --- /dev/null +++ b/src/vapi/types/fallback_assembly_ai_transcriber_speech_model.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackAssemblyAiTranscriberSpeechModel = typing.Union[ + typing.Literal["universal-streaming-english", "universal-streaming-multilingual"], typing.Any +] diff --git a/src/vapi/types/fallback_azure_speech_transcriber.py b/src/vapi/types/fallback_azure_speech_transcriber.py new file mode 100644 index 00000000..a44904af --- /dev/null +++ b/src/vapi/types/fallback_azure_speech_transcriber.py @@ -0,0 +1,52 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .fallback_azure_speech_transcriber_language import FallbackAzureSpeechTranscriberLanguage +from .fallback_azure_speech_transcriber_segmentation_strategy import FallbackAzureSpeechTranscriberSegmentationStrategy + + +class FallbackAzureSpeechTranscriber(UncheckedBaseModel): + language: typing.Optional[FallbackAzureSpeechTranscriberLanguage] = pydantic.Field(default=None) + """ + This is the language that will be set for the transcription. The list of languages Azure supports can be found here: https://learn.microsoft.com/en-us/azure/ai-services/speech-service/language-support?tabs=stt + """ + + segmentation_strategy: typing_extensions.Annotated[ + typing.Optional[FallbackAzureSpeechTranscriberSegmentationStrategy], + FieldMetadata(alias="segmentationStrategy"), + pydantic.Field( + alias="segmentationStrategy", + description="Controls how phrase boundaries are detected, enabling either simple time/silence heuristics or more advanced semantic segmentation.", + ), + ] = None + segmentation_silence_timeout_ms: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="segmentationSilenceTimeoutMs"), + pydantic.Field( + alias="segmentationSilenceTimeoutMs", + description="Duration of detected silence after which the service finalizes a phrase. Configure to adjust sensitivity to pauses in speech.", + ), + ] = None + segmentation_maximum_time_ms: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="segmentationMaximumTimeMs"), + pydantic.Field( + alias="segmentationMaximumTimeMs", + description="Maximum duration a segment can reach before being cut off when using time-based segmentation.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/fallback_azure_speech_transcriber_language.py b/src/vapi/types/fallback_azure_speech_transcriber_language.py new file mode 100644 index 00000000..34290759 --- /dev/null +++ b/src/vapi/types/fallback_azure_speech_transcriber_language.py @@ -0,0 +1,152 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackAzureSpeechTranscriberLanguage = typing.Union[ + typing.Literal[ + "af-ZA", + "am-ET", + "ar-AE", + "ar-BH", + "ar-DZ", + "ar-EG", + "ar-IL", + "ar-IQ", + "ar-JO", + "ar-KW", + "ar-LB", + "ar-LY", + "ar-MA", + "ar-OM", + "ar-PS", + "ar-QA", + "ar-SA", + "ar-SY", + "ar-TN", + "ar-YE", + "az-AZ", + "bg-BG", + "bn-IN", + "bs-BA", + "ca-ES", + "cs-CZ", + "cy-GB", + "da-DK", + "de-AT", + "de-CH", + "de-DE", + "el-GR", + "en-AU", + "en-CA", + "en-GB", + "en-GH", + "en-HK", + "en-IE", + "en-IN", + "en-KE", + "en-NG", + "en-NZ", + "en-PH", + "en-SG", + "en-TZ", + "en-US", + "en-ZA", + "es-AR", + "es-BO", + "es-CL", + "es-CO", + "es-CR", + "es-CU", + "es-DO", + "es-EC", + "es-ES", + "es-GQ", + "es-GT", + "es-HN", + "es-MX", + "es-NI", + "es-PA", + "es-PE", + "es-PR", + "es-PY", + "es-SV", + "es-US", + "es-UY", + "es-VE", + "et-EE", + "eu-ES", + "fa-IR", + "fi-FI", + "fil-PH", + "fr-BE", + "fr-CA", + "fr-CH", + "fr-FR", + "ga-IE", + "gl-ES", + "gu-IN", + "he-IL", + "hi-IN", + "hr-HR", + "hu-HU", + "hy-AM", + "id-ID", + "is-IS", + "it-CH", + "it-IT", + "ja-JP", + "jv-ID", + "ka-GE", + "kk-KZ", + "km-KH", + "kn-IN", + "ko-KR", + "lo-LA", + "lt-LT", + "lv-LV", + "mk-MK", + "ml-IN", + "mn-MN", + "mr-IN", + "ms-MY", + "mt-MT", + "my-MM", + "nb-NO", + "ne-NP", + "nl-BE", + "nl-NL", + "pa-IN", + "pl-PL", + "ps-AF", + "pt-BR", + "pt-PT", + "ro-RO", + "ru-RU", + "si-LK", + "sk-SK", + "sl-SI", + "so-SO", + "sq-AL", + "sr-RS", + "sv-SE", + "sw-KE", + "sw-TZ", + "ta-IN", + "te-IN", + "th-TH", + "tr-TR", + "uk-UA", + "ur-IN", + "uz-UZ", + "vi-VN", + "wuu-CN", + "yue-CN", + "zh-CN", + "zh-CN-shandong", + "zh-CN-sichuan", + "zh-HK", + "zh-TW", + "zu-ZA", + ], + typing.Any, +] diff --git a/src/vapi/types/fallback_azure_speech_transcriber_segmentation_strategy.py b/src/vapi/types/fallback_azure_speech_transcriber_segmentation_strategy.py new file mode 100644 index 00000000..e9203167 --- /dev/null +++ b/src/vapi/types/fallback_azure_speech_transcriber_segmentation_strategy.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackAzureSpeechTranscriberSegmentationStrategy = typing.Union[ + typing.Literal["Default", "Time", "Semantic"], typing.Any +] diff --git a/src/vapi/types/fallback_azure_voice.py b/src/vapi/types/fallback_azure_voice.py new file mode 100644 index 00000000..2fc1907d --- /dev/null +++ b/src/vapi/types/fallback_azure_voice.py @@ -0,0 +1,51 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .chunk_plan import ChunkPlan +from .fallback_azure_voice_id import FallbackAzureVoiceId + + +class FallbackAzureVoice(UncheckedBaseModel): + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="cachingEnabled"), + pydantic.Field( + alias="cachingEnabled", description="This is the flag to toggle voice caching for the assistant." + ), + ] = None + voice_id: typing_extensions.Annotated[ + FallbackAzureVoiceId, + FieldMetadata(alias="voiceId"), + pydantic.Field(alias="voiceId", description="This is the provider-specific ID that will be used."), + ] + speed: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the speed multiplier that will be used. + """ + + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], + FieldMetadata(alias="chunkPlan"), + pydantic.Field( + alias="chunkPlan", + description="This is the plan for chunking the model output before it is sent to the voice provider.", + ), + ] = None + one_of: typing_extensions.Annotated[ + typing.Optional[typing.Any], FieldMetadata(alias="oneOf"), pydantic.Field(alias="oneOf") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/fallback_azure_voice_id.py b/src/vapi/types/fallback_azure_voice_id.py new file mode 100644 index 00000000..170c011e --- /dev/null +++ b/src/vapi/types/fallback_azure_voice_id.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .fallback_azure_voice_id_zero import FallbackAzureVoiceIdZero + +FallbackAzureVoiceId = typing.Union[FallbackAzureVoiceIdZero, str] diff --git a/src/vapi/types/fallback_azure_voice_id_zero.py b/src/vapi/types/fallback_azure_voice_id_zero.py new file mode 100644 index 00000000..c372186f --- /dev/null +++ b/src/vapi/types/fallback_azure_voice_id_zero.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackAzureVoiceIdZero = typing.Union[typing.Literal["andrew", "brian", "emma"], typing.Any] diff --git a/src/vapi/types/fallback_cartesia_transcriber.py b/src/vapi/types/fallback_cartesia_transcriber.py new file mode 100644 index 00000000..ea8a3e4d --- /dev/null +++ b/src/vapi/types/fallback_cartesia_transcriber.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .fallback_cartesia_transcriber_language import FallbackCartesiaTranscriberLanguage +from .fallback_cartesia_transcriber_model import FallbackCartesiaTranscriberModel + + +class FallbackCartesiaTranscriber(UncheckedBaseModel): + model: typing.Optional[FallbackCartesiaTranscriberModel] = None + language: typing.Optional[FallbackCartesiaTranscriberLanguage] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/fallback_cartesia_transcriber_language.py b/src/vapi/types/fallback_cartesia_transcriber_language.py new file mode 100644 index 00000000..7e679429 --- /dev/null +++ b/src/vapi/types/fallback_cartesia_transcriber_language.py @@ -0,0 +1,194 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackCartesiaTranscriberLanguage = typing.Union[ + typing.Literal[ + "aa", + "ab", + "ae", + "af", + "ak", + "am", + "an", + "ar", + "as", + "av", + "ay", + "az", + "ba", + "be", + "bg", + "bh", + "bi", + "bm", + "bn", + "bo", + "br", + "bs", + "ca", + "ce", + "ch", + "co", + "cr", + "cs", + "cu", + "cv", + "cy", + "da", + "de", + "dv", + "dz", + "ee", + "el", + "en", + "eo", + "es", + "et", + "eu", + "fa", + "ff", + "fi", + "fj", + "fo", + "fr", + "fy", + "ga", + "gd", + "gl", + "gn", + "gu", + "gv", + "ha", + "he", + "hi", + "ho", + "hr", + "ht", + "hu", + "hy", + "hz", + "ia", + "id", + "ie", + "ig", + "ii", + "ik", + "io", + "is", + "it", + "iu", + "ja", + "jv", + "ka", + "kg", + "ki", + "kj", + "kk", + "kl", + "km", + "kn", + "ko", + "kr", + "ks", + "ku", + "kv", + "kw", + "ky", + "la", + "lb", + "lg", + "li", + "ln", + "lo", + "lt", + "lu", + "lv", + "mg", + "mh", + "mi", + "mk", + "ml", + "mn", + "mr", + "ms", + "mt", + "my", + "na", + "nb", + "nd", + "ne", + "ng", + "nl", + "nn", + "no", + "nr", + "nv", + "ny", + "oc", + "oj", + "om", + "or", + "os", + "pa", + "pi", + "pl", + "ps", + "pt", + "qu", + "rm", + "rn", + "ro", + "ru", + "rw", + "sa", + "sc", + "sd", + "se", + "sg", + "si", + "sk", + "sl", + "sm", + "sn", + "so", + "sq", + "sr", + "ss", + "st", + "su", + "sv", + "sw", + "ta", + "te", + "tg", + "th", + "ti", + "tk", + "tl", + "tn", + "to", + "tr", + "ts", + "tt", + "tw", + "ty", + "ug", + "uk", + "ur", + "uz", + "ve", + "vi", + "vo", + "wa", + "wo", + "xh", + "yi", + "yue", + "yo", + "za", + "zh", + "zu", + ], + typing.Any, +] diff --git a/src/vapi/types/fallback_cartesia_transcriber_model.py b/src/vapi/types/fallback_cartesia_transcriber_model.py new file mode 100644 index 00000000..6b1add46 --- /dev/null +++ b/src/vapi/types/fallback_cartesia_transcriber_model.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackCartesiaTranscriberModel = typing.Union[typing.Literal["ink-whisper"], typing.Any] diff --git a/src/vapi/types/fallback_cartesia_voice.py b/src/vapi/types/fallback_cartesia_voice.py new file mode 100644 index 00000000..64c4f18d --- /dev/null +++ b/src/vapi/types/fallback_cartesia_voice.py @@ -0,0 +1,77 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .cartesia_experimental_controls import CartesiaExperimentalControls +from .cartesia_generation_config import CartesiaGenerationConfig +from .chunk_plan import ChunkPlan +from .fallback_cartesia_voice_language import FallbackCartesiaVoiceLanguage +from .fallback_cartesia_voice_model import FallbackCartesiaVoiceModel + + +class FallbackCartesiaVoice(UncheckedBaseModel): + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="cachingEnabled"), + pydantic.Field( + alias="cachingEnabled", description="This is the flag to toggle voice caching for the assistant." + ), + ] = None + voice_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="voiceId"), + pydantic.Field(alias="voiceId", description="The ID of the particular voice you want to use."), + ] + model: typing.Optional[FallbackCartesiaVoiceModel] = pydantic.Field(default=None) + """ + This is the model that will be used. This is optional and will default to the correct model for the voiceId. + """ + + language: typing.Optional[FallbackCartesiaVoiceLanguage] = pydantic.Field(default=None) + """ + This is the language that will be used. This is optional and will default to the correct language for the voiceId. + """ + + experimental_controls: typing_extensions.Annotated[ + typing.Optional[CartesiaExperimentalControls], + FieldMetadata(alias="experimentalControls"), + pydantic.Field(alias="experimentalControls", description="Experimental controls for Cartesia voice generation"), + ] = None + generation_config: typing_extensions.Annotated[ + typing.Optional[CartesiaGenerationConfig], + FieldMetadata(alias="generationConfig"), + pydantic.Field( + alias="generationConfig", + description="Generation config for fine-grained control of sonic-3 voice output (speed, volume, and experimental controls). Only available for sonic-3 model.", + ), + ] = None + pronunciation_dict_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="pronunciationDictId"), + pydantic.Field( + alias="pronunciationDictId", + description="Pronunciation dictionary ID for sonic-3. Allows custom pronunciations for specific words. Only available for sonic-3 model.", + ), + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], + FieldMetadata(alias="chunkPlan"), + pydantic.Field( + alias="chunkPlan", + description="This is the plan for chunking the model output before it is sent to the voice provider.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/fallback_cartesia_voice_language.py b/src/vapi/types/fallback_cartesia_voice_language.py new file mode 100644 index 00000000..4b3df8c7 --- /dev/null +++ b/src/vapi/types/fallback_cartesia_voice_language.py @@ -0,0 +1,51 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackCartesiaVoiceLanguage = typing.Union[ + typing.Literal[ + "ar", + "bg", + "bn", + "cs", + "da", + "de", + "el", + "en", + "es", + "fi", + "fr", + "gu", + "he", + "hi", + "hr", + "hu", + "id", + "it", + "ja", + "ka", + "kn", + "ko", + "ml", + "mr", + "ms", + "nl", + "no", + "pa", + "pl", + "pt", + "ro", + "ru", + "sk", + "sv", + "ta", + "te", + "th", + "tl", + "tr", + "uk", + "vi", + "zh", + ], + typing.Any, +] diff --git a/src/vapi/types/fallback_cartesia_voice_model.py b/src/vapi/types/fallback_cartesia_voice_model.py new file mode 100644 index 00000000..52539936 --- /dev/null +++ b/src/vapi/types/fallback_cartesia_voice_model.py @@ -0,0 +1,18 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackCartesiaVoiceModel = typing.Union[ + typing.Literal[ + "sonic-3", + "sonic-3-2026-01-12", + "sonic-3-2025-10-27", + "sonic-2", + "sonic-2-2025-06-11", + "sonic-english", + "sonic-multilingual", + "sonic-preview", + "sonic", + ], + typing.Any, +] diff --git a/src/vapi/types/fallback_custom_transcriber.py b/src/vapi/types/fallback_custom_transcriber.py new file mode 100644 index 00000000..1fd3b583 --- /dev/null +++ b/src/vapi/types/fallback_custom_transcriber.py @@ -0,0 +1,61 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .server import Server + + +class FallbackCustomTranscriber(UncheckedBaseModel): + server: Server = pydantic.Field() + """ + This is where the transcription request will be sent. + + Usage: + 1. Vapi will initiate a websocket connection with `server.url`. + + 2. Vapi will send an initial text frame with the sample rate. Format: + ``` + { + "type": "start", + "encoding": "linear16", // 16-bit raw PCM format + "container": "raw", + "sampleRate": {{sampleRate}}, + "channels": 2 // customer is channel 0, assistant is channel 1 + } + ``` + + 3. Vapi will send the audio data in 16-bit raw PCM format as binary frames. + + 4. You can read the messages something like this: + ``` + ws.on('message', (data, isBinary) => { + if (isBinary) { + pcmBuffer = Buffer.concat([pcmBuffer, data]); + console.log(`Received PCM data, buffer size: ${pcmBuffer.length}`); + } else { + console.log('Received message:', JSON.parse(data.toString())); + } + }); + ``` + + 5. You will respond with transcriptions as you have them. Format: + ``` + { + "type": "transcriber-response", + "transcription": "Hello, world!", + "channel": "customer" | "assistant" + } + ``` + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/fallback_custom_voice.py b/src/vapi/types/fallback_custom_voice.py new file mode 100644 index 00000000..08efb6c9 --- /dev/null +++ b/src/vapi/types/fallback_custom_voice.py @@ -0,0 +1,72 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .chunk_plan import ChunkPlan +from .server import Server + + +class FallbackCustomVoice(UncheckedBaseModel): + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="cachingEnabled"), + pydantic.Field( + alias="cachingEnabled", description="This is the flag to toggle voice caching for the assistant." + ), + ] = None + voice_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="voiceId"), + pydantic.Field( + alias="voiceId", + description="This is the provider-specific ID that will be used. This is passed in the voice request payload to identify the voice to use.", + ), + ] = None + server: Server = pydantic.Field() + """ + This is where the voice request will be sent. + + Request Example: + + POST https://{server.url} + Content-Type: application/json + + { + "message": { + "type": "voice-request", + "text": "Hello, world!", + "sampleRate": 24000, + ...other metadata about the call... + } + } + + Response Expected: 1-channel 16-bit raw PCM audio at the sample rate specified in the request. Here is how the response will be piped to the transport: + ``` + response.on('data', (chunk: Buffer) => { + outputStream.write(chunk); + }); + ``` + """ + + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], + FieldMetadata(alias="chunkPlan"), + pydantic.Field( + alias="chunkPlan", + description="This is the plan for chunking the model output before it is sent to the voice provider.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/fallback_deepgram_transcriber.py b/src/vapi/types/fallback_deepgram_transcriber.py new file mode 100644 index 00000000..969a3f1a --- /dev/null +++ b/src/vapi/types/fallback_deepgram_transcriber.py @@ -0,0 +1,117 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .deepgram_transcriber_language import DeepgramTranscriberLanguage +from .deepgram_transcriber_model import DeepgramTranscriberModel + + +class FallbackDeepgramTranscriber(UncheckedBaseModel): + model: typing.Optional[DeepgramTranscriberModel] = pydantic.Field(default=None) + """ + This is the Deepgram model that will be used. A list of models can be found here: https://developers.deepgram.com/docs/models-languages-overview + """ + + language: typing.Optional[DeepgramTranscriberLanguage] = pydantic.Field(default=None) + """ + This is the language that will be set for the transcription. The list of languages Deepgram supports can be found here: https://developers.deepgram.com/docs/models-languages-overview + """ + + smart_format: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="smartFormat"), + pydantic.Field( + alias="smartFormat", + description="This will be use smart format option provided by Deepgram. It's default disabled because it can sometimes format numbers as times but it's getting better.", + ), + ] = None + mip_opt_out: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="mipOptOut"), + pydantic.Field( + alias="mipOptOut", + description="If set to true, this will add mip_opt_out=true as a query parameter of all API requests. See https://developers.deepgram.com/docs/the-deepgram-model-improvement-partnership-program#want-to-opt-out\n\nThis will only be used if you are using your own Deepgram API key.\n\n@default false", + ), + ] = None + numerals: typing.Optional[bool] = pydantic.Field(default=None) + """ + If set to true, this will cause deepgram to convert spoken numbers to literal numerals. For example, "my phone number is nine-seven-two..." would become "my phone number is 972..." + + @default false + """ + + profanity_filter: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="profanityFilter"), + pydantic.Field( + alias="profanityFilter", + description='If set to true, Deepgram will replace profanity in transcripts with surrounding asterisks, e.g. "f***".\n\n@default false', + ), + ] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="confidenceThreshold"), + pydantic.Field( + alias="confidenceThreshold", + description="Transcripts below this confidence threshold will be discarded.\n\n@default 0.4", + ), + ] = None + eager_eot_threshold: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="eagerEotThreshold"), + pydantic.Field( + alias="eagerEotThreshold", + description="Eager end-of-turn confidence required to fire a eager end-of-turn event. Setting a value here will enable EagerEndOfTurn and SpeechResumed events. It is disabled by default. Only used with Flux models.", + ), + ] = None + eot_threshold: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="eotThreshold"), + pydantic.Field( + alias="eotThreshold", + description="End-of-turn confidence required to finish a turn. Only used with Flux models.\n\n@default 0.7", + ), + ] = None + eot_timeout_ms: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="eotTimeoutMs"), + pydantic.Field( + alias="eotTimeoutMs", + description="A turn will be finished when this much time has passed after speech, regardless of EOT confidence. Only used with Flux models.\n\n@default 5000", + ), + ] = None + keywords: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + These keywords are passed to the transcription model to help it pick up use-case specific words. Anything that may not be a common word, like your company name, should be added here. + """ + + keyterm: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Keyterm Prompting allows you improve Keyword Recall Rate (KRR) for important keyterms or phrases up to 90%. + """ + + endpointing: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the timeout after which Deepgram will send transcription on user silence. You can read in-depth documentation here: https://developers.deepgram.com/docs/endpointing. + + Here are the most important bits: + - Defaults to 10. This is recommended for most use cases to optimize for latency. + - 10 can cause some missing transcriptions since because of the shorter context. This mostly happens for one-word utterances. For those uses cases, it's recommended to try 300. It will add a bit of latency but the quality and reliability of the experience will be better. + - If neither 10 nor 300 work, contact support@vapi.ai and we'll find another solution. + + @default 10 + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/fallback_deepgram_transcriber_language.py b/src/vapi/types/fallback_deepgram_transcriber_language.py new file mode 100644 index 00000000..564fbef2 --- /dev/null +++ b/src/vapi/types/fallback_deepgram_transcriber_language.py @@ -0,0 +1,65 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackDeepgramTranscriberLanguage = typing.Union[ + typing.Literal[ + "bg", + "ca", + "cs", + "da", + "da-DK", + "de", + "de-CH", + "el", + "en", + "en-AU", + "en-GB", + "en-IN", + "en-NZ", + "en-US", + "es", + "es-419", + "es-LATAM", + "et", + "fi", + "fr", + "fr-CA", + "hi", + "hi-Latn", + "hu", + "id", + "it", + "ja", + "ko", + "ko-KR", + "lt", + "lv", + "ms", + "multi", + "nl", + "nl-BE", + "no", + "pl", + "pt", + "pt-BR", + "ro", + "ru", + "sk", + "sv", + "sv-SE", + "ta", + "taq", + "th", + "th-TH", + "tr", + "uk", + "vi", + "zh", + "zh-CN", + "zh-Hans", + "zh-Hant", + "zh-TW", + ], + typing.Any, +] diff --git a/src/vapi/types/fallback_deepgram_transcriber_model.py b/src/vapi/types/fallback_deepgram_transcriber_model.py new file mode 100644 index 00000000..491abcad --- /dev/null +++ b/src/vapi/types/fallback_deepgram_transcriber_model.py @@ -0,0 +1,42 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackDeepgramTranscriberModel = typing.Union[ + typing.Literal[ + "flux-general-en", + "nova-3", + "nova-3-general", + "nova-3-medical", + "nova-2", + "nova-2-general", + "nova-2-meeting", + "nova-2-phonecall", + "nova-2-finance", + "nova-2-conversationalai", + "nova-2-voicemail", + "nova-2-video", + "nova-2-medical", + "nova-2-drivethru", + "nova-2-automotive", + "nova", + "nova-general", + "nova-phonecall", + "nova-medical", + "enhanced", + "enhanced-general", + "enhanced-meeting", + "enhanced-phonecall", + "enhanced-finance", + "base", + "base-general", + "base-meeting", + "base-phonecall", + "base-finance", + "base-conversationalai", + "base-voicemail", + "base-video", + "whisper", + ], + typing.Any, +] diff --git a/src/vapi/types/fallback_deepgram_voice.py b/src/vapi/types/fallback_deepgram_voice.py new file mode 100644 index 00000000..95c44fbf --- /dev/null +++ b/src/vapi/types/fallback_deepgram_voice.py @@ -0,0 +1,57 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .chunk_plan import ChunkPlan +from .fallback_deepgram_voice_id import FallbackDeepgramVoiceId +from .fallback_deepgram_voice_model import FallbackDeepgramVoiceModel + + +class FallbackDeepgramVoice(UncheckedBaseModel): + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="cachingEnabled"), + pydantic.Field( + alias="cachingEnabled", description="This is the flag to toggle voice caching for the assistant." + ), + ] = None + voice_id: typing_extensions.Annotated[ + FallbackDeepgramVoiceId, + FieldMetadata(alias="voiceId"), + pydantic.Field(alias="voiceId", description="This is the provider-specific ID that will be used."), + ] + model: typing.Optional[FallbackDeepgramVoiceModel] = pydantic.Field(default=None) + """ + This is the model that will be used. Defaults to 'aura-2' when not specified. + """ + + mip_opt_out: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="mipOptOut"), + pydantic.Field( + alias="mipOptOut", + description="If set to true, this will add mip_opt_out=true as a query parameter of all API requests. See https://developers.deepgram.com/docs/the-deepgram-model-improvement-partnership-program#want-to-opt-out\n\nThis will only be used if you are using your own Deepgram API key.\n\n@default false", + ), + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], + FieldMetadata(alias="chunkPlan"), + pydantic.Field( + alias="chunkPlan", + description="This is the plan for chunking the model output before it is sent to the voice provider.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/fallback_deepgram_voice_id.py b/src/vapi/types/fallback_deepgram_voice_id.py new file mode 100644 index 00000000..bb453fd3 --- /dev/null +++ b/src/vapi/types/fallback_deepgram_voice_id.py @@ -0,0 +1,64 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackDeepgramVoiceId = typing.Union[ + typing.Literal[ + "asteria", + "luna", + "stella", + "athena", + "hera", + "orion", + "arcas", + "perseus", + "angus", + "orpheus", + "helios", + "zeus", + "thalia", + "andromeda", + "helena", + "apollo", + "aries", + "amalthea", + "atlas", + "aurora", + "callista", + "cora", + "cordelia", + "delia", + "draco", + "electra", + "harmonia", + "hermes", + "hyperion", + "iris", + "janus", + "juno", + "jupiter", + "mars", + "minerva", + "neptune", + "odysseus", + "ophelia", + "pandora", + "phoebe", + "pluto", + "saturn", + "selene", + "theia", + "vesta", + "celeste", + "estrella", + "nestor", + "sirio", + "carina", + "alvaro", + "diana", + "aquila", + "selena", + "javier", + ], + typing.Any, +] diff --git a/src/vapi/types/fallback_deepgram_voice_model.py b/src/vapi/types/fallback_deepgram_voice_model.py new file mode 100644 index 00000000..5d71d819 --- /dev/null +++ b/src/vapi/types/fallback_deepgram_voice_model.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackDeepgramVoiceModel = typing.Union[typing.Literal["aura", "aura-2"], typing.Any] diff --git a/src/vapi/types/fallback_eleven_labs_transcriber.py b/src/vapi/types/fallback_eleven_labs_transcriber.py new file mode 100644 index 00000000..451db34e --- /dev/null +++ b/src/vapi/types/fallback_eleven_labs_transcriber.py @@ -0,0 +1,63 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .fallback_eleven_labs_transcriber_language import FallbackElevenLabsTranscriberLanguage +from .fallback_eleven_labs_transcriber_model import FallbackElevenLabsTranscriberModel + + +class FallbackElevenLabsTranscriber(UncheckedBaseModel): + model: typing.Optional[FallbackElevenLabsTranscriberModel] = pydantic.Field(default=None) + """ + This is the model that will be used for the transcription. + """ + + language: typing.Optional[FallbackElevenLabsTranscriberLanguage] = pydantic.Field(default=None) + """ + This is the language that will be used for the transcription. + """ + + silence_threshold_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="silenceThresholdSeconds"), + pydantic.Field( + alias="silenceThresholdSeconds", + description="This is the number of seconds of silence before VAD commits (0.3-3.0).", + ), + ] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="confidenceThreshold"), + pydantic.Field( + alias="confidenceThreshold", + description="This is the VAD sensitivity (0.1-0.9, lower indicates more sensitive).", + ), + ] = None + min_speech_duration_ms: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minSpeechDurationMs"), + pydantic.Field( + alias="minSpeechDurationMs", description="This is the minimum speech duration for VAD (50-2000ms)." + ), + ] = None + min_silence_duration_ms: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minSilenceDurationMs"), + pydantic.Field( + alias="minSilenceDurationMs", description="This is the minimum silence duration for VAD (50-2000ms)." + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/fallback_eleven_labs_transcriber_language.py b/src/vapi/types/fallback_eleven_labs_transcriber_language.py new file mode 100644 index 00000000..a3716d9f --- /dev/null +++ b/src/vapi/types/fallback_eleven_labs_transcriber_language.py @@ -0,0 +1,194 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackElevenLabsTranscriberLanguage = typing.Union[ + typing.Literal[ + "aa", + "ab", + "ae", + "af", + "ak", + "am", + "an", + "ar", + "as", + "av", + "ay", + "az", + "ba", + "be", + "bg", + "bh", + "bi", + "bm", + "bn", + "bo", + "br", + "bs", + "ca", + "ce", + "ch", + "co", + "cr", + "cs", + "cu", + "cv", + "cy", + "da", + "de", + "dv", + "dz", + "ee", + "el", + "en", + "eo", + "es", + "et", + "eu", + "fa", + "ff", + "fi", + "fj", + "fo", + "fr", + "fy", + "ga", + "gd", + "gl", + "gn", + "gu", + "gv", + "ha", + "he", + "hi", + "ho", + "hr", + "ht", + "hu", + "hy", + "hz", + "ia", + "id", + "ie", + "ig", + "ii", + "ik", + "io", + "is", + "it", + "iu", + "ja", + "jv", + "ka", + "kg", + "ki", + "kj", + "kk", + "kl", + "km", + "kn", + "ko", + "kr", + "ks", + "ku", + "kv", + "kw", + "ky", + "la", + "lb", + "lg", + "li", + "ln", + "lo", + "lt", + "lu", + "lv", + "mg", + "mh", + "mi", + "mk", + "ml", + "mn", + "mr", + "ms", + "mt", + "my", + "na", + "nb", + "nd", + "ne", + "ng", + "nl", + "nn", + "no", + "nr", + "nv", + "ny", + "oc", + "oj", + "om", + "or", + "os", + "pa", + "pi", + "pl", + "ps", + "pt", + "qu", + "rm", + "rn", + "ro", + "ru", + "rw", + "sa", + "sc", + "sd", + "se", + "sg", + "si", + "sk", + "sl", + "sm", + "sn", + "so", + "sq", + "sr", + "ss", + "st", + "su", + "sv", + "sw", + "ta", + "te", + "tg", + "th", + "ti", + "tk", + "tl", + "tn", + "to", + "tr", + "ts", + "tt", + "tw", + "ty", + "ug", + "uk", + "ur", + "uz", + "ve", + "vi", + "vo", + "wa", + "wo", + "xh", + "yi", + "yue", + "yo", + "za", + "zh", + "zu", + ], + typing.Any, +] diff --git a/src/vapi/types/fallback_eleven_labs_transcriber_model.py b/src/vapi/types/fallback_eleven_labs_transcriber_model.py new file mode 100644 index 00000000..57ce0721 --- /dev/null +++ b/src/vapi/types/fallback_eleven_labs_transcriber_model.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackElevenLabsTranscriberModel = typing.Union[ + typing.Literal["scribe_v1", "scribe_v2", "scribe_v2_realtime"], typing.Any +] diff --git a/src/vapi/types/fallback_eleven_labs_voice.py b/src/vapi/types/fallback_eleven_labs_voice.py new file mode 100644 index 00000000..8a6c9d13 --- /dev/null +++ b/src/vapi/types/fallback_eleven_labs_voice.py @@ -0,0 +1,111 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .chunk_plan import ChunkPlan +from .eleven_labs_pronunciation_dictionary_locator import ElevenLabsPronunciationDictionaryLocator +from .fallback_eleven_labs_voice_id import FallbackElevenLabsVoiceId +from .fallback_eleven_labs_voice_model import FallbackElevenLabsVoiceModel + + +class FallbackElevenLabsVoice(UncheckedBaseModel): + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="cachingEnabled"), + pydantic.Field( + alias="cachingEnabled", description="This is the flag to toggle voice caching for the assistant." + ), + ] = None + voice_id: typing_extensions.Annotated[ + FallbackElevenLabsVoiceId, + FieldMetadata(alias="voiceId"), + pydantic.Field( + alias="voiceId", + description="This is the provider-specific ID that will be used. Ensure the Voice is present in your 11Labs Voice Library.", + ), + ] + stability: typing.Optional[float] = pydantic.Field(default=None) + """ + Defines the stability for voice settings. + """ + + similarity_boost: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="similarityBoost"), + pydantic.Field(alias="similarityBoost", description="Defines the similarity boost for voice settings."), + ] = None + style: typing.Optional[float] = pydantic.Field(default=None) + """ + Defines the style for voice settings. + """ + + use_speaker_boost: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="useSpeakerBoost"), + pydantic.Field(alias="useSpeakerBoost", description="Defines the use speaker boost for voice settings."), + ] = None + speed: typing.Optional[float] = pydantic.Field(default=None) + """ + Defines the speed for voice settings. + """ + + optimize_streaming_latency: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="optimizeStreamingLatency"), + pydantic.Field( + alias="optimizeStreamingLatency", + description="Defines the optimize streaming latency for voice settings. Defaults to 3.", + ), + ] = None + enable_ssml_parsing: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="enableSsmlParsing"), + pydantic.Field( + alias="enableSsmlParsing", + description="This enables the use of https://elevenlabs.io/docs/speech-synthesis/prompting#pronunciation. Defaults to false to save latency.\n\n@default false", + ), + ] = None + auto_mode: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="autoMode"), + pydantic.Field(alias="autoMode", description="Defines the auto mode for voice settings. Defaults to false."), + ] = None + model: typing.Optional[FallbackElevenLabsVoiceModel] = pydantic.Field(default=None) + """ + This is the model that will be used. Defaults to 'eleven_turbo_v2' if not specified. + """ + + language: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the language (ISO 639-1) that is enforced for the model. Currently only Turbo v2.5 supports language enforcement. For other models, an error will be returned if language code is provided. + """ + + pronunciation_dictionary_locators: typing_extensions.Annotated[ + typing.Optional[typing.List[ElevenLabsPronunciationDictionaryLocator]], + FieldMetadata(alias="pronunciationDictionaryLocators"), + pydantic.Field( + alias="pronunciationDictionaryLocators", description="This is the pronunciation dictionary locators to use." + ), + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], + FieldMetadata(alias="chunkPlan"), + pydantic.Field( + alias="chunkPlan", + description="This is the plan for chunking the model output before it is sent to the voice provider.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/fallback_eleven_labs_voice_id.py b/src/vapi/types/fallback_eleven_labs_voice_id.py new file mode 100644 index 00000000..ac4329b7 --- /dev/null +++ b/src/vapi/types/fallback_eleven_labs_voice_id.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .fallback_eleven_labs_voice_id_enum import FallbackElevenLabsVoiceIdEnum + +FallbackElevenLabsVoiceId = typing.Union[FallbackElevenLabsVoiceIdEnum, str] diff --git a/src/vapi/types/fallback_eleven_labs_voice_id_enum.py b/src/vapi/types/fallback_eleven_labs_voice_id_enum.py new file mode 100644 index 00000000..6c05698d --- /dev/null +++ b/src/vapi/types/fallback_eleven_labs_voice_id_enum.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackElevenLabsVoiceIdEnum = typing.Union[ + typing.Literal[ + "burt", + "marissa", + "andrea", + "sarah", + "phillip", + "steve", + "joseph", + "myra", + "paula", + "ryan", + "drew", + "paul", + "mrb", + "matilda", + "mark", + ], + typing.Any, +] diff --git a/src/vapi/types/fallback_eleven_labs_voice_model.py b/src/vapi/types/fallback_eleven_labs_voice_model.py new file mode 100644 index 00000000..0a0dab3a --- /dev/null +++ b/src/vapi/types/fallback_eleven_labs_voice_model.py @@ -0,0 +1,16 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackElevenLabsVoiceModel = typing.Union[ + typing.Literal[ + "eleven_multilingual_v2", + "eleven_turbo_v2", + "eleven_turbo_v2_5", + "eleven_flash_v2", + "eleven_flash_v2_5", + "eleven_monolingual_v1", + "eleven_v3", + ], + typing.Any, +] diff --git a/src/vapi/types/fallback_gladia_transcriber.py b/src/vapi/types/fallback_gladia_transcriber.py new file mode 100644 index 00000000..69e608a5 --- /dev/null +++ b/src/vapi/types/fallback_gladia_transcriber.py @@ -0,0 +1,115 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .fallback_gladia_transcriber_language import FallbackGladiaTranscriberLanguage +from .fallback_gladia_transcriber_language_behaviour import FallbackGladiaTranscriberLanguageBehaviour +from .fallback_gladia_transcriber_languages import FallbackGladiaTranscriberLanguages +from .fallback_gladia_transcriber_model import FallbackGladiaTranscriberModel +from .fallback_gladia_transcriber_region import FallbackGladiaTranscriberRegion +from .gladia_custom_vocabulary_config_dto import GladiaCustomVocabularyConfigDto + + +class FallbackGladiaTranscriber(UncheckedBaseModel): + model: typing.Optional[FallbackGladiaTranscriberModel] = pydantic.Field(default=None) + """ + This is the Gladia model that will be used. Default is 'fast' + """ + + language_behaviour: typing_extensions.Annotated[ + typing.Optional[FallbackGladiaTranscriberLanguageBehaviour], + FieldMetadata(alias="languageBehaviour"), + pydantic.Field( + alias="languageBehaviour", + description="Defines how the transcription model detects the audio language. Default value is 'automatic single language'.", + ), + ] = None + language: typing.Optional[FallbackGladiaTranscriberLanguage] = pydantic.Field(default=None) + """ + Defines the language to use for the transcription. Required when languageBehaviour is 'manual'. + """ + + languages: typing.Optional[FallbackGladiaTranscriberLanguages] = pydantic.Field(default=None) + """ + Defines the languages to use for the transcription. Required when languageBehaviour is 'manual'. + """ + + transcription_hint: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="transcriptionHint"), + pydantic.Field( + alias="transcriptionHint", + description="Provides a custom vocabulary to the model to improve accuracy of transcribing context specific words, technical terms, names, etc. If empty, this argument is ignored.\n⚠️ Warning ⚠️: Please be aware that the transcription_hint field has a character limit of 600. If you provide a transcription_hint longer than 600 characters, it will be automatically truncated to meet this limit.", + ), + ] = None + prosody: typing.Optional[bool] = pydantic.Field(default=None) + """ + If prosody is true, you will get a transcription that can contain prosodies i.e. (laugh) (giggles) (malefic laugh) (toss) (music)… Default value is false. + """ + + audio_enhancer: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="audioEnhancer"), + pydantic.Field( + alias="audioEnhancer", + description="If true, audio will be pre-processed to improve accuracy but latency will increase. Default value is false.", + ), + ] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="confidenceThreshold"), + pydantic.Field( + alias="confidenceThreshold", + description="Transcripts below this confidence threshold will be discarded.\n\n@default 0.4", + ), + ] = None + endpointing: typing.Optional[float] = pydantic.Field(default=None) + """ + Endpointing time in seconds - time to wait before considering speech ended + """ + + speech_threshold: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="speechThreshold"), + pydantic.Field( + alias="speechThreshold", + description="Speech threshold - sensitivity configuration for speech detection (0.0 to 1.0)", + ), + ] = None + custom_vocabulary_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="customVocabularyEnabled"), + pydantic.Field(alias="customVocabularyEnabled", description="Enable custom vocabulary for improved accuracy"), + ] = None + custom_vocabulary_config: typing_extensions.Annotated[ + typing.Optional[GladiaCustomVocabularyConfigDto], + FieldMetadata(alias="customVocabularyConfig"), + pydantic.Field(alias="customVocabularyConfig", description="Custom vocabulary configuration"), + ] = None + region: typing.Optional[FallbackGladiaTranscriberRegion] = pydantic.Field(default=None) + """ + Region for processing audio (us-west or eu-west) + """ + + receive_partial_transcripts: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="receivePartialTranscripts"), + pydantic.Field( + alias="receivePartialTranscripts", + description="Enable partial transcripts for low-latency streaming transcription", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/fallback_gladia_transcriber_language.py b/src/vapi/types/fallback_gladia_transcriber_language.py new file mode 100644 index 00000000..d7734972 --- /dev/null +++ b/src/vapi/types/fallback_gladia_transcriber_language.py @@ -0,0 +1,108 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackGladiaTranscriberLanguage = typing.Union[ + typing.Literal[ + "af", + "sq", + "am", + "ar", + "hy", + "as", + "az", + "ba", + "eu", + "be", + "bn", + "bs", + "br", + "bg", + "ca", + "zh", + "hr", + "cs", + "da", + "nl", + "en", + "et", + "fo", + "fi", + "fr", + "gl", + "ka", + "de", + "el", + "gu", + "ht", + "ha", + "haw", + "he", + "hi", + "hu", + "is", + "id", + "it", + "ja", + "jv", + "kn", + "kk", + "km", + "ko", + "lo", + "la", + "lv", + "ln", + "lt", + "lb", + "mk", + "mg", + "ms", + "ml", + "mt", + "mi", + "mr", + "mn", + "my", + "ne", + "no", + "nn", + "oc", + "ps", + "fa", + "pl", + "pt", + "pa", + "ro", + "ru", + "sa", + "sr", + "sn", + "sd", + "si", + "sk", + "sl", + "so", + "es", + "su", + "sw", + "sv", + "tl", + "tg", + "ta", + "tt", + "te", + "th", + "bo", + "tr", + "tk", + "uk", + "ur", + "uz", + "vi", + "cy", + "yi", + "yo", + ], + typing.Any, +] diff --git a/src/vapi/types/fallback_gladia_transcriber_language_behaviour.py b/src/vapi/types/fallback_gladia_transcriber_language_behaviour.py new file mode 100644 index 00000000..a8d8fd9a --- /dev/null +++ b/src/vapi/types/fallback_gladia_transcriber_language_behaviour.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackGladiaTranscriberLanguageBehaviour = typing.Union[ + typing.Literal["manual", "automatic single language", "automatic multiple languages"], typing.Any +] diff --git a/src/vapi/types/fallback_gladia_transcriber_languages.py b/src/vapi/types/fallback_gladia_transcriber_languages.py new file mode 100644 index 00000000..dcaf410d --- /dev/null +++ b/src/vapi/types/fallback_gladia_transcriber_languages.py @@ -0,0 +1,108 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackGladiaTranscriberLanguages = typing.Union[ + typing.Literal[ + "af", + "sq", + "am", + "ar", + "hy", + "as", + "az", + "ba", + "eu", + "be", + "bn", + "bs", + "br", + "bg", + "ca", + "zh", + "hr", + "cs", + "da", + "nl", + "en", + "et", + "fo", + "fi", + "fr", + "gl", + "ka", + "de", + "el", + "gu", + "ht", + "ha", + "haw", + "he", + "hi", + "hu", + "is", + "id", + "it", + "ja", + "jv", + "kn", + "kk", + "km", + "ko", + "lo", + "la", + "lv", + "ln", + "lt", + "lb", + "mk", + "mg", + "ms", + "ml", + "mt", + "mi", + "mr", + "mn", + "my", + "ne", + "no", + "nn", + "oc", + "ps", + "fa", + "pl", + "pt", + "pa", + "ro", + "ru", + "sa", + "sr", + "sn", + "sd", + "si", + "sk", + "sl", + "so", + "es", + "su", + "sw", + "sv", + "tl", + "tg", + "ta", + "tt", + "te", + "th", + "bo", + "tr", + "tk", + "uk", + "ur", + "uz", + "vi", + "cy", + "yi", + "yo", + ], + typing.Any, +] diff --git a/src/vapi/types/fallback_gladia_transcriber_model.py b/src/vapi/types/fallback_gladia_transcriber_model.py new file mode 100644 index 00000000..25ddf6c2 --- /dev/null +++ b/src/vapi/types/fallback_gladia_transcriber_model.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackGladiaTranscriberModel = typing.Union[typing.Literal["fast", "accurate", "solaria-1"], typing.Any] diff --git a/src/vapi/types/fallback_gladia_transcriber_region.py b/src/vapi/types/fallback_gladia_transcriber_region.py new file mode 100644 index 00000000..663143c3 --- /dev/null +++ b/src/vapi/types/fallback_gladia_transcriber_region.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackGladiaTranscriberRegion = typing.Union[typing.Literal["us-west", "eu-west"], typing.Any] diff --git a/src/vapi/types/fallback_google_transcriber.py b/src/vapi/types/fallback_google_transcriber.py new file mode 100644 index 00000000..dbb53c41 --- /dev/null +++ b/src/vapi/types/fallback_google_transcriber.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .fallback_google_transcriber_language import FallbackGoogleTranscriberLanguage +from .fallback_google_transcriber_model import FallbackGoogleTranscriberModel + + +class FallbackGoogleTranscriber(UncheckedBaseModel): + model: typing.Optional[FallbackGoogleTranscriberModel] = pydantic.Field(default=None) + """ + This is the model that will be used for the transcription. + """ + + language: typing.Optional[FallbackGoogleTranscriberLanguage] = pydantic.Field(default=None) + """ + This is the language that will be set for the transcription. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/fallback_google_transcriber_language.py b/src/vapi/types/fallback_google_transcriber_language.py new file mode 100644 index 00000000..be9b4c6c --- /dev/null +++ b/src/vapi/types/fallback_google_transcriber_language.py @@ -0,0 +1,48 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackGoogleTranscriberLanguage = typing.Union[ + typing.Literal[ + "Multilingual", + "Arabic", + "Bengali", + "Bulgarian", + "Chinese", + "Croatian", + "Czech", + "Danish", + "Dutch", + "English", + "Estonian", + "Finnish", + "French", + "German", + "Greek", + "Hebrew", + "Hindi", + "Hungarian", + "Indonesian", + "Italian", + "Japanese", + "Korean", + "Latvian", + "Lithuanian", + "Norwegian", + "Polish", + "Portuguese", + "Romanian", + "Russian", + "Serbian", + "Slovak", + "Slovenian", + "Spanish", + "Swahili", + "Swedish", + "Thai", + "Turkish", + "Ukrainian", + "Vietnamese", + ], + typing.Any, +] diff --git a/src/vapi/types/fallback_google_transcriber_model.py b/src/vapi/types/fallback_google_transcriber_model.py new file mode 100644 index 00000000..00679f7e --- /dev/null +++ b/src/vapi/types/fallback_google_transcriber_model.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackGoogleTranscriberModel = typing.Union[ + typing.Literal[ + "gemini-3-flash-preview", + "gemini-2.5-pro", + "gemini-2.5-flash", + "gemini-2.5-flash-lite", + "gemini-2.0-flash-thinking-exp", + "gemini-2.0-pro-exp-02-05", + "gemini-2.0-flash", + "gemini-2.0-flash-lite", + "gemini-2.0-flash-exp", + "gemini-2.0-flash-realtime-exp", + "gemini-1.5-flash", + "gemini-1.5-flash-002", + "gemini-1.5-pro", + "gemini-1.5-pro-002", + "gemini-1.0-pro", + ], + typing.Any, +] diff --git a/src/vapi/types/fallback_hume_voice.py b/src/vapi/types/fallback_hume_voice.py new file mode 100644 index 00000000..a5fe4279 --- /dev/null +++ b/src/vapi/types/fallback_hume_voice.py @@ -0,0 +1,64 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .chunk_plan import ChunkPlan +from .fallback_hume_voice_model import FallbackHumeVoiceModel + + +class FallbackHumeVoice(UncheckedBaseModel): + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="cachingEnabled"), + pydantic.Field( + alias="cachingEnabled", description="This is the flag to toggle voice caching for the assistant." + ), + ] = None + model: typing.Optional[FallbackHumeVoiceModel] = pydantic.Field(default=None) + """ + This is the model that will be used. + """ + + voice_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="voiceId"), + pydantic.Field(alias="voiceId", description="The ID of the particular voice you want to use."), + ] + is_custom_hume_voice: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="isCustomHumeVoice"), + pydantic.Field( + alias="isCustomHumeVoice", + description="Indicates whether the chosen voice is a preset Hume AI voice or a custom voice.", + ), + ] = None + description: typing.Optional[str] = pydantic.Field(default=None) + """ + Natural language instructions describing how the synthesized speech should sound, including but not limited to tone, intonation, pacing, and accent (e.g., 'a soft, gentle voice with a strong British accent'). + + If a Voice is specified in the request, this description serves as acting instructions. + If no Voice is specified, a new voice is generated based on this description. + """ + + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], + FieldMetadata(alias="chunkPlan"), + pydantic.Field( + alias="chunkPlan", + description="This is the plan for chunking the model output before it is sent to the voice provider.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/fallback_hume_voice_model.py b/src/vapi/types/fallback_hume_voice_model.py new file mode 100644 index 00000000..2847271c --- /dev/null +++ b/src/vapi/types/fallback_hume_voice_model.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackHumeVoiceModel = typing.Union[typing.Literal["octave", "octave2"], typing.Any] diff --git a/src/vapi/types/fallback_inworld_voice.py b/src/vapi/types/fallback_inworld_voice.py new file mode 100644 index 00000000..6e05a5d9 --- /dev/null +++ b/src/vapi/types/fallback_inworld_voice.py @@ -0,0 +1,73 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .chunk_plan import ChunkPlan +from .fallback_inworld_voice_language_code import FallbackInworldVoiceLanguageCode +from .fallback_inworld_voice_model import FallbackInworldVoiceModel +from .fallback_inworld_voice_voice_id import FallbackInworldVoiceVoiceId + + +class FallbackInworldVoice(UncheckedBaseModel): + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="cachingEnabled"), + pydantic.Field( + alias="cachingEnabled", description="This is the flag to toggle voice caching for the assistant." + ), + ] = None + voice_id: typing_extensions.Annotated[ + FallbackInworldVoiceVoiceId, + FieldMetadata(alias="voiceId"), + pydantic.Field( + alias="voiceId", + description="Available voices by language:\n• en: Alex, Ashley, Craig, Deborah, Dennis, Edward, Elizabeth, Hades, Julia, Pixie, Mark, Olivia, Priya, Ronald, Sarah, Shaun, Theodore, Timothy, Wendy, Dominus, Hana, Clive, Carter, Blake, Luna\n• zh: Yichen, Xiaoyin, Xinyi, Jing\n• nl: Erik, Katrien, Lennart, Lore\n• fr: Alain, Hélène, Mathieu, Étienne\n• de: Johanna, Josef\n• it: Gianni, Orietta\n• ja: Asuka, Satoshi\n• ko: Hyunwoo, Minji, Seojun, Yoona\n• pl: Szymon, Wojciech\n• pt: Heitor, Maitê\n• es: Diego, Lupita, Miguel, Rafael\n• ru: Svetlana, Elena, Dmitry, Nikolai\n• hi: Riya, Manoj\n• he: Yael, Oren\n• ar: Nour, Omar", + ), + ] + model: typing.Optional[FallbackInworldVoiceModel] = pydantic.Field(default=None) + """ + This is the model that will be used. + """ + + language_code: typing_extensions.Annotated[ + typing.Optional[FallbackInworldVoiceLanguageCode], + FieldMetadata(alias="languageCode"), + pydantic.Field(alias="languageCode", description="Language code for Inworld TTS synthesis"), + ] = None + temperature: typing.Optional[float] = pydantic.Field(default=None) + """ + A floating point number between 0, exclusive, and 2, inclusive. If equal to null or not provided, the model's default temperature of 1.1 will be used. The temperature parameter controls variance. + Higher values will make the output more random and can lead to more expressive results. Lower values will make it more deterministic. + See https://docs.inworld.ai/docs/tts/capabilities/generating-audio#additional-configurations for more details. + """ + + speaking_rate: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="speakingRate"), + pydantic.Field( + alias="speakingRate", + description="A floating point number between 0.5, inclusive, and 1.5, inclusive. If equal to null or not provided, the model's default speaking speed of 1.0 will be used.\nValues above 0.8 are recommended for higher quality.\nSee https://docs.inworld.ai/docs/tts/capabilities/generating-audio#additional-configurations for more details.", + ), + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], + FieldMetadata(alias="chunkPlan"), + pydantic.Field( + alias="chunkPlan", + description="This is the plan for chunking the model output before it is sent to the voice provider.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/fallback_inworld_voice_language_code.py b/src/vapi/types/fallback_inworld_voice_language_code.py new file mode 100644 index 00000000..f49f1927 --- /dev/null +++ b/src/vapi/types/fallback_inworld_voice_language_code.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackInworldVoiceLanguageCode = typing.Union[ + typing.Literal["en", "zh", "ko", "nl", "fr", "es", "ja", "de", "it", "pl", "pt", "ru", "hi", "he", "ar"], typing.Any +] diff --git a/src/vapi/types/fallback_inworld_voice_model.py b/src/vapi/types/fallback_inworld_voice_model.py new file mode 100644 index 00000000..8858a38a --- /dev/null +++ b/src/vapi/types/fallback_inworld_voice_model.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackInworldVoiceModel = typing.Union[typing.Literal["inworld-tts-1"], typing.Any] diff --git a/src/vapi/types/fallback_inworld_voice_voice_id.py b/src/vapi/types/fallback_inworld_voice_voice_id.py new file mode 100644 index 00000000..70b1da8c --- /dev/null +++ b/src/vapi/types/fallback_inworld_voice_voice_id.py @@ -0,0 +1,74 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackInworldVoiceVoiceId = typing.Union[ + typing.Literal[ + "Alex", + "Ashley", + "Craig", + "Deborah", + "Dennis", + "Edward", + "Elizabeth", + "Hades", + "Julia", + "Pixie", + "Mark", + "Olivia", + "Priya", + "Ronald", + "Sarah", + "Shaun", + "Theodore", + "Timothy", + "Wendy", + "Dominus", + "Hana", + "Clive", + "Carter", + "Blake", + "Luna", + "Yichen", + "Xiaoyin", + "Xinyi", + "Jing", + "Erik", + "Katrien", + "Lennart", + "Lore", + "Alain", + "Hélène", + "Mathieu", + "Étienne", + "Johanna", + "Josef", + "Gianni", + "Orietta", + "Asuka", + "Satoshi", + "Hyunwoo", + "Minji", + "Seojun", + "Yoona", + "Szymon", + "Wojciech", + "Heitor", + "Maitê", + "Diego", + "Lupita", + "Miguel", + "Rafael", + "Svetlana", + "Elena", + "Dmitry", + "Nikolai", + "Riya", + "Manoj", + "Yael", + "Oren", + "Nour", + "Omar", + ], + typing.Any, +] diff --git a/src/vapi/types/fallback_lmnt_voice.py b/src/vapi/types/fallback_lmnt_voice.py new file mode 100644 index 00000000..72a1b8e0 --- /dev/null +++ b/src/vapi/types/fallback_lmnt_voice.py @@ -0,0 +1,54 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .chunk_plan import ChunkPlan +from .fallback_lmnt_voice_id import FallbackLmntVoiceId +from .fallback_lmnt_voice_language import FallbackLmntVoiceLanguage + + +class FallbackLmntVoice(UncheckedBaseModel): + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="cachingEnabled"), + pydantic.Field( + alias="cachingEnabled", description="This is the flag to toggle voice caching for the assistant." + ), + ] = None + voice_id: typing_extensions.Annotated[ + FallbackLmntVoiceId, + FieldMetadata(alias="voiceId"), + pydantic.Field(alias="voiceId", description="This is the provider-specific ID that will be used."), + ] + speed: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the speed multiplier that will be used. + """ + + language: typing.Optional[FallbackLmntVoiceLanguage] = pydantic.Field(default=None) + """ + Two letter ISO 639-1 language code. Use "auto" for auto-detection. + """ + + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], + FieldMetadata(alias="chunkPlan"), + pydantic.Field( + alias="chunkPlan", + description="This is the plan for chunking the model output before it is sent to the voice provider.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/fallback_lmnt_voice_id.py b/src/vapi/types/fallback_lmnt_voice_id.py new file mode 100644 index 00000000..0e20df64 --- /dev/null +++ b/src/vapi/types/fallback_lmnt_voice_id.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .fallback_lmnt_voice_id_enum import FallbackLmntVoiceIdEnum + +FallbackLmntVoiceId = typing.Union[FallbackLmntVoiceIdEnum, str] diff --git a/src/vapi/types/fallback_lmnt_voice_id_enum.py b/src/vapi/types/fallback_lmnt_voice_id_enum.py new file mode 100644 index 00000000..af15be5c --- /dev/null +++ b/src/vapi/types/fallback_lmnt_voice_id_enum.py @@ -0,0 +1,51 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackLmntVoiceIdEnum = typing.Union[ + typing.Literal[ + "amy", + "ansel", + "autumn", + "ava", + "brandon", + "caleb", + "cassian", + "chloe", + "dalton", + "daniel", + "dustin", + "elowen", + "evander", + "huxley", + "james", + "juniper", + "kennedy", + "lauren", + "leah", + "lily", + "lucas", + "magnus", + "miles", + "morgan", + "natalie", + "nathan", + "noah", + "nyssa", + "oliver", + "paige", + "ryan", + "sadie", + "sophie", + "stella", + "terrence", + "tyler", + "vesper", + "violet", + "warrick", + "zain", + "zeke", + "zoe", + ], + typing.Any, +] diff --git a/src/vapi/types/fallback_lmnt_voice_language.py b/src/vapi/types/fallback_lmnt_voice_language.py new file mode 100644 index 00000000..5689ce34 --- /dev/null +++ b/src/vapi/types/fallback_lmnt_voice_language.py @@ -0,0 +1,195 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackLmntVoiceLanguage = typing.Union[ + typing.Literal[ + "aa", + "ab", + "ae", + "af", + "ak", + "am", + "an", + "ar", + "as", + "av", + "ay", + "az", + "ba", + "be", + "bg", + "bh", + "bi", + "bm", + "bn", + "bo", + "br", + "bs", + "ca", + "ce", + "ch", + "co", + "cr", + "cs", + "cu", + "cv", + "cy", + "da", + "de", + "dv", + "dz", + "ee", + "el", + "en", + "eo", + "es", + "et", + "eu", + "fa", + "ff", + "fi", + "fj", + "fo", + "fr", + "fy", + "ga", + "gd", + "gl", + "gn", + "gu", + "gv", + "ha", + "he", + "hi", + "ho", + "hr", + "ht", + "hu", + "hy", + "hz", + "ia", + "id", + "ie", + "ig", + "ii", + "ik", + "io", + "is", + "it", + "iu", + "ja", + "jv", + "ka", + "kg", + "ki", + "kj", + "kk", + "kl", + "km", + "kn", + "ko", + "kr", + "ks", + "ku", + "kv", + "kw", + "ky", + "la", + "lb", + "lg", + "li", + "ln", + "lo", + "lt", + "lu", + "lv", + "mg", + "mh", + "mi", + "mk", + "ml", + "mn", + "mr", + "ms", + "mt", + "my", + "na", + "nb", + "nd", + "ne", + "ng", + "nl", + "nn", + "no", + "nr", + "nv", + "ny", + "oc", + "oj", + "om", + "or", + "os", + "pa", + "pi", + "pl", + "ps", + "pt", + "qu", + "rm", + "rn", + "ro", + "ru", + "rw", + "sa", + "sc", + "sd", + "se", + "sg", + "si", + "sk", + "sl", + "sm", + "sn", + "so", + "sq", + "sr", + "ss", + "st", + "su", + "sv", + "sw", + "ta", + "te", + "tg", + "th", + "ti", + "tk", + "tl", + "tn", + "to", + "tr", + "ts", + "tt", + "tw", + "ty", + "ug", + "uk", + "ur", + "uz", + "ve", + "vi", + "vo", + "wa", + "wo", + "xh", + "yi", + "yue", + "yo", + "za", + "zh", + "zu", + "auto", + ], + typing.Any, +] diff --git a/src/vapi/types/fallback_minimax_voice.py b/src/vapi/types/fallback_minimax_voice.py new file mode 100644 index 00000000..3fe1132e --- /dev/null +++ b/src/vapi/types/fallback_minimax_voice.py @@ -0,0 +1,117 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .chunk_plan import ChunkPlan +from .fallback_minimax_voice_language_boost import FallbackMinimaxVoiceLanguageBoost +from .fallback_minimax_voice_model import FallbackMinimaxVoiceModel +from .fallback_minimax_voice_provider import FallbackMinimaxVoiceProvider +from .fallback_minimax_voice_region import FallbackMinimaxVoiceRegion +from .fallback_minimax_voice_subtitle_type import FallbackMinimaxVoiceSubtitleType + + +class FallbackMinimaxVoice(UncheckedBaseModel): + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="cachingEnabled"), + pydantic.Field( + alias="cachingEnabled", description="This is the flag to toggle voice caching for the assistant." + ), + ] = None + provider: FallbackMinimaxVoiceProvider = pydantic.Field() + """ + This is the voice provider that will be used. + """ + + voice_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="voiceId"), + pydantic.Field( + alias="voiceId", + description="This is the provider-specific ID that will be used. Use a voice from MINIMAX_PREDEFINED_VOICES or a custom cloned voice ID.", + ), + ] + model: typing.Optional[FallbackMinimaxVoiceModel] = pydantic.Field(default=None) + """ + This is the model that will be used. Options are 'speech-02-hd' and 'speech-02-turbo'. + speech-02-hd is optimized for high-fidelity applications like voiceovers and audiobooks. + speech-02-turbo is designed for real-time applications with low latency. + + @default "speech-02-turbo" + """ + + emotion: typing.Optional[str] = pydantic.Field(default=None) + """ + The emotion to use for the voice. If not provided, will use auto-detect mode. + Options include: 'happy', 'sad', 'angry', 'fearful', 'surprised', 'disgusted', 'neutral' + """ + + subtitle_type: typing_extensions.Annotated[ + typing.Optional[FallbackMinimaxVoiceSubtitleType], + FieldMetadata(alias="subtitleType"), + pydantic.Field( + alias="subtitleType", + description="Controls the granularity of subtitle/timing data returned by Minimax\nduring synthesis. Set to 'word' to receive per-word timestamps in\nassistant.speechStarted events for karaoke-style caption rendering.\n\n@default \"sentence\"", + ), + ] = None + pitch: typing.Optional[float] = pydantic.Field(default=None) + """ + Voice pitch adjustment. Range from -12 to 12 semitones. + @default 0 + """ + + speed: typing.Optional[float] = pydantic.Field(default=None) + """ + Voice speed adjustment. Range from 0.5 to 2.0. + @default 1.0 + """ + + volume: typing.Optional[float] = pydantic.Field(default=None) + """ + Voice volume adjustment. Range from 0.5 to 2.0. + @default 1.0 + """ + + region: typing.Optional[FallbackMinimaxVoiceRegion] = pydantic.Field(default=None) + """ + The region for Minimax API. Defaults to "worldwide". + """ + + language_boost: typing_extensions.Annotated[ + typing.Optional[FallbackMinimaxVoiceLanguageBoost], + FieldMetadata(alias="languageBoost"), + pydantic.Field( + alias="languageBoost", + description="Language hint for MiniMax T2A. Example: yue (Cantonese), zh (Chinese), en (English).", + ), + ] = None + text_normalization_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="textNormalizationEnabled"), + pydantic.Field( + alias="textNormalizationEnabled", + description="Enable MiniMax text normalization to improve number reading and formatting.", + ), + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], + FieldMetadata(alias="chunkPlan"), + pydantic.Field( + alias="chunkPlan", + description="This is the plan for chunking the model output before it is sent to the voice provider.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/fallback_minimax_voice_language_boost.py b/src/vapi/types/fallback_minimax_voice_language_boost.py new file mode 100644 index 00000000..55d50373 --- /dev/null +++ b/src/vapi/types/fallback_minimax_voice_language_boost.py @@ -0,0 +1,50 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackMinimaxVoiceLanguageBoost = typing.Union[ + typing.Literal[ + "Chinese", + "Chinese,Yue", + "English", + "Arabic", + "Russian", + "Spanish", + "French", + "Portuguese", + "German", + "Turkish", + "Dutch", + "Ukrainian", + "Vietnamese", + "Indonesian", + "Japanese", + "Italian", + "Korean", + "Thai", + "Polish", + "Romanian", + "Greek", + "Czech", + "Finnish", + "Hindi", + "Bulgarian", + "Danish", + "Hebrew", + "Malay", + "Persian", + "Slovak", + "Swedish", + "Croatian", + "Filipino", + "Hungarian", + "Norwegian", + "Slovenian", + "Catalan", + "Nynorsk", + "Tamil", + "Afrikaans", + "auto", + ], + typing.Any, +] diff --git a/src/vapi/types/fallback_minimax_voice_model.py b/src/vapi/types/fallback_minimax_voice_model.py new file mode 100644 index 00000000..4a03d6db --- /dev/null +++ b/src/vapi/types/fallback_minimax_voice_model.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackMinimaxVoiceModel = typing.Union[ + typing.Literal["speech-02-hd", "speech-02-turbo", "speech-2.5-turbo-preview"], typing.Any +] diff --git a/src/vapi/types/fallback_minimax_voice_provider.py b/src/vapi/types/fallback_minimax_voice_provider.py new file mode 100644 index 00000000..f70451e3 --- /dev/null +++ b/src/vapi/types/fallback_minimax_voice_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackMinimaxVoiceProvider = typing.Union[typing.Literal["minimax"], typing.Any] diff --git a/src/vapi/types/fallback_minimax_voice_region.py b/src/vapi/types/fallback_minimax_voice_region.py new file mode 100644 index 00000000..39b6a586 --- /dev/null +++ b/src/vapi/types/fallback_minimax_voice_region.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackMinimaxVoiceRegion = typing.Union[typing.Literal["worldwide", "china"], typing.Any] diff --git a/src/vapi/types/fallback_minimax_voice_subtitle_type.py b/src/vapi/types/fallback_minimax_voice_subtitle_type.py new file mode 100644 index 00000000..30d065c7 --- /dev/null +++ b/src/vapi/types/fallback_minimax_voice_subtitle_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackMinimaxVoiceSubtitleType = typing.Union[typing.Literal["word", "sentence"], typing.Any] diff --git a/src/vapi/types/fallback_neets_voice.py b/src/vapi/types/fallback_neets_voice.py new file mode 100644 index 00000000..3be5d74e --- /dev/null +++ b/src/vapi/types/fallback_neets_voice.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class FallbackNeetsVoice(UncheckedBaseModel): + voice_id: typing_extensions.Annotated[ + typing.Optional[typing.Any], FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/fallback_neuphonic_voice.py b/src/vapi/types/fallback_neuphonic_voice.py new file mode 100644 index 00000000..eb5bd169 --- /dev/null +++ b/src/vapi/types/fallback_neuphonic_voice.py @@ -0,0 +1,58 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .chunk_plan import ChunkPlan +from .fallback_neuphonic_voice_model import FallbackNeuphonicVoiceModel + + +class FallbackNeuphonicVoice(UncheckedBaseModel): + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="cachingEnabled"), + pydantic.Field( + alias="cachingEnabled", description="This is the flag to toggle voice caching for the assistant." + ), + ] = None + voice_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="voiceId"), + pydantic.Field(alias="voiceId", description="This is the provider-specific ID that will be used."), + ] + model: typing.Optional[FallbackNeuphonicVoiceModel] = pydantic.Field(default=None) + """ + This is the model that will be used. Defaults to 'neu_fast' if not specified. + """ + + language: typing.Dict[str, typing.Any] = pydantic.Field() + """ + This is the language (ISO 639-1) that is enforced for the model. + """ + + speed: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the speed multiplier that will be used. + """ + + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], + FieldMetadata(alias="chunkPlan"), + pydantic.Field( + alias="chunkPlan", + description="This is the plan for chunking the model output before it is sent to the voice provider.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/fallback_neuphonic_voice_model.py b/src/vapi/types/fallback_neuphonic_voice_model.py new file mode 100644 index 00000000..bd36a013 --- /dev/null +++ b/src/vapi/types/fallback_neuphonic_voice_model.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackNeuphonicVoiceModel = typing.Union[typing.Literal["neu_hq", "neu_fast"], typing.Any] diff --git a/src/vapi/types/fallback_open_ai_transcriber.py b/src/vapi/types/fallback_open_ai_transcriber.py new file mode 100644 index 00000000..382b2658 --- /dev/null +++ b/src/vapi/types/fallback_open_ai_transcriber.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .fallback_open_ai_transcriber_language import FallbackOpenAiTranscriberLanguage +from .fallback_open_ai_transcriber_model import FallbackOpenAiTranscriberModel + + +class FallbackOpenAiTranscriber(UncheckedBaseModel): + model: FallbackOpenAiTranscriberModel = pydantic.Field() + """ + This is the model that will be used for the transcription. + """ + + language: typing.Optional[FallbackOpenAiTranscriberLanguage] = pydantic.Field(default=None) + """ + This is the language that will be set for the transcription. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/fallback_open_ai_transcriber_language.py b/src/vapi/types/fallback_open_ai_transcriber_language.py new file mode 100644 index 00000000..b92eb20a --- /dev/null +++ b/src/vapi/types/fallback_open_ai_transcriber_language.py @@ -0,0 +1,66 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackOpenAiTranscriberLanguage = typing.Union[ + typing.Literal[ + "af", + "ar", + "hy", + "az", + "be", + "bs", + "bg", + "ca", + "zh", + "hr", + "cs", + "da", + "nl", + "en", + "et", + "fi", + "fr", + "gl", + "de", + "el", + "he", + "hi", + "hu", + "is", + "id", + "it", + "ja", + "kn", + "kk", + "ko", + "lv", + "lt", + "mk", + "ms", + "mr", + "mi", + "ne", + "no", + "fa", + "pl", + "pt", + "ro", + "ru", + "sr", + "sk", + "sl", + "es", + "sw", + "sv", + "tl", + "ta", + "th", + "tr", + "uk", + "ur", + "vi", + "cy", + ], + typing.Any, +] diff --git a/src/vapi/types/fallback_open_ai_transcriber_model.py b/src/vapi/types/fallback_open_ai_transcriber_model.py new file mode 100644 index 00000000..8243a31f --- /dev/null +++ b/src/vapi/types/fallback_open_ai_transcriber_model.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackOpenAiTranscriberModel = typing.Union[typing.Literal["gpt-4o-transcribe", "gpt-4o-mini-transcribe"], typing.Any] diff --git a/src/vapi/types/fallback_open_ai_voice.py b/src/vapi/types/fallback_open_ai_voice.py new file mode 100644 index 00000000..29d6833d --- /dev/null +++ b/src/vapi/types/fallback_open_ai_voice.py @@ -0,0 +1,63 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .chunk_plan import ChunkPlan +from .fallback_open_ai_voice_id import FallbackOpenAiVoiceId +from .fallback_open_ai_voice_model import FallbackOpenAiVoiceModel + + +class FallbackOpenAiVoice(UncheckedBaseModel): + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="cachingEnabled"), + pydantic.Field( + alias="cachingEnabled", description="This is the flag to toggle voice caching for the assistant." + ), + ] = None + voice_id: typing_extensions.Annotated[ + FallbackOpenAiVoiceId, + FieldMetadata(alias="voiceId"), + pydantic.Field( + alias="voiceId", + description="This is the provider-specific ID that will be used.\nPlease note that ash, ballad, coral, sage, and verse may only be used with realtime models.", + ), + ] + model: typing.Optional[FallbackOpenAiVoiceModel] = pydantic.Field(default=None) + """ + This is the model that will be used for text-to-speech. + """ + + instructions: typing.Optional[str] = pydantic.Field(default=None) + """ + This is a prompt that allows you to control the voice of your generated audio. + Does not work with 'tts-1' or 'tts-1-hd' models. + """ + + speed: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the speed multiplier that will be used. + """ + + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], + FieldMetadata(alias="chunkPlan"), + pydantic.Field( + alias="chunkPlan", + description="This is the plan for chunking the model output before it is sent to the voice provider.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/fallback_open_ai_voice_id.py b/src/vapi/types/fallback_open_ai_voice_id.py new file mode 100644 index 00000000..f01f5b7c --- /dev/null +++ b/src/vapi/types/fallback_open_ai_voice_id.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .fallback_open_ai_voice_id_enum import FallbackOpenAiVoiceIdEnum + +FallbackOpenAiVoiceId = typing.Union[FallbackOpenAiVoiceIdEnum, str] diff --git a/src/vapi/types/fallback_open_ai_voice_id_enum.py b/src/vapi/types/fallback_open_ai_voice_id_enum.py new file mode 100644 index 00000000..ef163bb0 --- /dev/null +++ b/src/vapi/types/fallback_open_ai_voice_id_enum.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackOpenAiVoiceIdEnum = typing.Union[ + typing.Literal["alloy", "echo", "fable", "onyx", "nova", "shimmer", "marin", "cedar"], typing.Any +] diff --git a/src/vapi/types/fallback_open_ai_voice_model.py b/src/vapi/types/fallback_open_ai_voice_model.py new file mode 100644 index 00000000..30c53356 --- /dev/null +++ b/src/vapi/types/fallback_open_ai_voice_model.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackOpenAiVoiceModel = typing.Union[typing.Literal["tts-1", "tts-1-hd", "gpt-4o-mini-tts"], typing.Any] diff --git a/src/vapi/types/fallback_plan.py b/src/vapi/types/fallback_plan.py new file mode 100644 index 00000000..01bd7393 --- /dev/null +++ b/src/vapi/types/fallback_plan.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .fallback_plan_voices_item import FallbackPlanVoicesItem + + +class FallbackPlan(UncheckedBaseModel): + voices: typing.List[FallbackPlanVoicesItem] = pydantic.Field() + """ + This is the list of voices to fallback to in the event that the primary voice provider fails. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/fallback_plan_voices_item.py b/src/vapi/types/fallback_plan_voices_item.py new file mode 100644 index 00000000..69c3626e --- /dev/null +++ b/src/vapi/types/fallback_plan_voices_item.py @@ -0,0 +1,574 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .cartesia_experimental_controls import CartesiaExperimentalControls +from .cartesia_generation_config import CartesiaGenerationConfig +from .chunk_plan import ChunkPlan +from .eleven_labs_pronunciation_dictionary_locator import ElevenLabsPronunciationDictionaryLocator +from .fallback_azure_voice_id import FallbackAzureVoiceId +from .fallback_cartesia_voice_language import FallbackCartesiaVoiceLanguage +from .fallback_cartesia_voice_model import FallbackCartesiaVoiceModel +from .fallback_deepgram_voice_id import FallbackDeepgramVoiceId +from .fallback_deepgram_voice_model import FallbackDeepgramVoiceModel +from .fallback_eleven_labs_voice_id import FallbackElevenLabsVoiceId +from .fallback_eleven_labs_voice_model import FallbackElevenLabsVoiceModel +from .fallback_hume_voice_model import FallbackHumeVoiceModel +from .fallback_inworld_voice_language_code import FallbackInworldVoiceLanguageCode +from .fallback_inworld_voice_model import FallbackInworldVoiceModel +from .fallback_inworld_voice_voice_id import FallbackInworldVoiceVoiceId +from .fallback_lmnt_voice_id import FallbackLmntVoiceId +from .fallback_lmnt_voice_language import FallbackLmntVoiceLanguage +from .fallback_neuphonic_voice_model import FallbackNeuphonicVoiceModel +from .fallback_open_ai_voice_id import FallbackOpenAiVoiceId +from .fallback_open_ai_voice_model import FallbackOpenAiVoiceModel +from .fallback_play_ht_voice_emotion import FallbackPlayHtVoiceEmotion +from .fallback_play_ht_voice_id import FallbackPlayHtVoiceId +from .fallback_play_ht_voice_language import FallbackPlayHtVoiceLanguage +from .fallback_play_ht_voice_model import FallbackPlayHtVoiceModel +from .fallback_rime_ai_voice_id import FallbackRimeAiVoiceId +from .fallback_rime_ai_voice_language import FallbackRimeAiVoiceLanguage +from .fallback_rime_ai_voice_model import FallbackRimeAiVoiceModel +from .fallback_sesame_voice_model import FallbackSesameVoiceModel +from .fallback_smallest_ai_voice_id import FallbackSmallestAiVoiceId +from .fallback_smallest_ai_voice_model import FallbackSmallestAiVoiceModel +from .fallback_tavus_voice_voice_id import FallbackTavusVoiceVoiceId +from .fallback_vapi_voice_voice_id import FallbackVapiVoiceVoiceId +from .fallback_well_said_voice_model import FallbackWellSaidVoiceModel +from .server import Server +from .tavus_conversation_properties import TavusConversationProperties +from .vapi_pronunciation_dictionary_locator import VapiPronunciationDictionaryLocator + + +class FallbackPlanVoicesItem_Azure(UncheckedBaseModel): + provider: typing.Literal["azure"] = "azure" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + FallbackAzureVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + speed: typing.Optional[float] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + one_of: typing_extensions.Annotated[ + typing.Optional[typing.Any], FieldMetadata(alias="oneOf"), pydantic.Field(alias="oneOf") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class FallbackPlanVoicesItem_Cartesia(UncheckedBaseModel): + provider: typing.Literal["cartesia"] = "cartesia" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[FallbackCartesiaVoiceModel] = None + language: typing.Optional[FallbackCartesiaVoiceLanguage] = None + experimental_controls: typing_extensions.Annotated[ + typing.Optional[CartesiaExperimentalControls], + FieldMetadata(alias="experimentalControls"), + pydantic.Field(alias="experimentalControls"), + ] = None + generation_config: typing_extensions.Annotated[ + typing.Optional[CartesiaGenerationConfig], + FieldMetadata(alias="generationConfig"), + pydantic.Field(alias="generationConfig"), + ] = None + pronunciation_dict_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="pronunciationDictId"), pydantic.Field(alias="pronunciationDictId") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class FallbackPlanVoicesItem_Hume(UncheckedBaseModel): + provider: typing.Literal["hume"] = "hume" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + model: typing.Optional[FallbackHumeVoiceModel] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + is_custom_hume_voice: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="isCustomHumeVoice"), pydantic.Field(alias="isCustomHumeVoice") + ] = None + description: typing.Optional[str] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class FallbackPlanVoicesItem_CustomVoice(UncheckedBaseModel): + provider: typing.Literal["custom-voice"] = "custom-voice" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] = None + server: Server + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class FallbackPlanVoicesItem_Deepgram(UncheckedBaseModel): + provider: typing.Literal["deepgram"] = "deepgram" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + FallbackDeepgramVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[FallbackDeepgramVoiceModel] = None + mip_opt_out: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="mipOptOut"), pydantic.Field(alias="mipOptOut") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class FallbackPlanVoicesItem_11Labs(UncheckedBaseModel): + provider: typing.Literal["11labs"] = "11labs" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + FallbackElevenLabsVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + stability: typing.Optional[float] = None + similarity_boost: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="similarityBoost"), pydantic.Field(alias="similarityBoost") + ] = None + style: typing.Optional[float] = None + use_speaker_boost: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="useSpeakerBoost"), pydantic.Field(alias="useSpeakerBoost") + ] = None + speed: typing.Optional[float] = None + optimize_streaming_latency: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="optimizeStreamingLatency"), + pydantic.Field(alias="optimizeStreamingLatency"), + ] = None + enable_ssml_parsing: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="enableSsmlParsing"), pydantic.Field(alias="enableSsmlParsing") + ] = None + auto_mode: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="autoMode"), pydantic.Field(alias="autoMode") + ] = None + model: typing.Optional[FallbackElevenLabsVoiceModel] = None + language: typing.Optional[str] = None + pronunciation_dictionary_locators: typing_extensions.Annotated[ + typing.Optional[typing.List[ElevenLabsPronunciationDictionaryLocator]], + FieldMetadata(alias="pronunciationDictionaryLocators"), + pydantic.Field(alias="pronunciationDictionaryLocators"), + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class FallbackPlanVoicesItem_Vapi(UncheckedBaseModel): + provider: typing.Literal["vapi"] = "vapi" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + FallbackVapiVoiceVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + speed: typing.Optional[float] = None + pronunciation_dictionary: typing_extensions.Annotated[ + typing.Optional[typing.List[VapiPronunciationDictionaryLocator]], + FieldMetadata(alias="pronunciationDictionary"), + pydantic.Field(alias="pronunciationDictionary"), + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class FallbackPlanVoicesItem_Lmnt(UncheckedBaseModel): + provider: typing.Literal["lmnt"] = "lmnt" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + FallbackLmntVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + speed: typing.Optional[float] = None + language: typing.Optional[FallbackLmntVoiceLanguage] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class FallbackPlanVoicesItem_Openai(UncheckedBaseModel): + provider: typing.Literal["openai"] = "openai" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + FallbackOpenAiVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[FallbackOpenAiVoiceModel] = None + instructions: typing.Optional[str] = None + speed: typing.Optional[float] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class FallbackPlanVoicesItem_Playht(UncheckedBaseModel): + provider: typing.Literal["playht"] = "playht" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + FallbackPlayHtVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + speed: typing.Optional[float] = None + temperature: typing.Optional[float] = None + emotion: typing.Optional[FallbackPlayHtVoiceEmotion] = None + voice_guidance: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="voiceGuidance"), pydantic.Field(alias="voiceGuidance") + ] = None + style_guidance: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="styleGuidance"), pydantic.Field(alias="styleGuidance") + ] = None + text_guidance: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="textGuidance"), pydantic.Field(alias="textGuidance") + ] = None + model: typing.Optional[FallbackPlayHtVoiceModel] = None + language: typing.Optional[FallbackPlayHtVoiceLanguage] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class FallbackPlanVoicesItem_Wellsaid(UncheckedBaseModel): + provider: typing.Literal["wellsaid"] = "wellsaid" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[FallbackWellSaidVoiceModel] = None + enable_ssml: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="enableSsml"), pydantic.Field(alias="enableSsml") + ] = None + library_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="libraryIds"), pydantic.Field(alias="libraryIds") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class FallbackPlanVoicesItem_RimeAi(UncheckedBaseModel): + provider: typing.Literal["rime-ai"] = "rime-ai" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + FallbackRimeAiVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[FallbackRimeAiVoiceModel] = None + speed: typing.Optional[float] = None + pause_between_brackets: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="pauseBetweenBrackets"), pydantic.Field(alias="pauseBetweenBrackets") + ] = None + phonemize_between_brackets: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="phonemizeBetweenBrackets"), + pydantic.Field(alias="phonemizeBetweenBrackets"), + ] = None + reduce_latency: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="reduceLatency"), pydantic.Field(alias="reduceLatency") + ] = None + inline_speed_alpha: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="inlineSpeedAlpha"), pydantic.Field(alias="inlineSpeedAlpha") + ] = None + language: typing.Optional[FallbackRimeAiVoiceLanguage] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class FallbackPlanVoicesItem_SmallestAi(UncheckedBaseModel): + provider: typing.Literal["smallest-ai"] = "smallest-ai" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + FallbackSmallestAiVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[FallbackSmallestAiVoiceModel] = None + speed: typing.Optional[float] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class FallbackPlanVoicesItem_Tavus(UncheckedBaseModel): + provider: typing.Literal["tavus"] = "tavus" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + FallbackTavusVoiceVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + persona_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="personaId"), pydantic.Field(alias="personaId") + ] = None + callback_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callbackUrl"), pydantic.Field(alias="callbackUrl") + ] = None + conversation_name: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="conversationName"), pydantic.Field(alias="conversationName") + ] = None + conversational_context: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="conversationalContext"), + pydantic.Field(alias="conversationalContext"), + ] = None + custom_greeting: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="customGreeting"), pydantic.Field(alias="customGreeting") + ] = None + properties: typing.Optional[TavusConversationProperties] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class FallbackPlanVoicesItem_Neuphonic(UncheckedBaseModel): + provider: typing.Literal["neuphonic"] = "neuphonic" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[FallbackNeuphonicVoiceModel] = None + language: typing.Dict[str, typing.Any] + speed: typing.Optional[float] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class FallbackPlanVoicesItem_Sesame(UncheckedBaseModel): + provider: typing.Literal["sesame"] = "sesame" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: FallbackSesameVoiceModel + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class FallbackPlanVoicesItem_Inworld(UncheckedBaseModel): + provider: typing.Literal["inworld"] = "inworld" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + FallbackInworldVoiceVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[FallbackInworldVoiceModel] = None + language_code: typing_extensions.Annotated[ + typing.Optional[FallbackInworldVoiceLanguageCode], + FieldMetadata(alias="languageCode"), + pydantic.Field(alias="languageCode"), + ] = None + temperature: typing.Optional[float] = None + speaking_rate: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="speakingRate"), pydantic.Field(alias="speakingRate") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +FallbackPlanVoicesItem = typing_extensions.Annotated[ + typing.Union[ + FallbackPlanVoicesItem_Azure, + FallbackPlanVoicesItem_Cartesia, + FallbackPlanVoicesItem_Hume, + FallbackPlanVoicesItem_CustomVoice, + FallbackPlanVoicesItem_Deepgram, + FallbackPlanVoicesItem_11Labs, + FallbackPlanVoicesItem_Vapi, + FallbackPlanVoicesItem_Lmnt, + FallbackPlanVoicesItem_Openai, + FallbackPlanVoicesItem_Playht, + FallbackPlanVoicesItem_Wellsaid, + FallbackPlanVoicesItem_RimeAi, + FallbackPlanVoicesItem_SmallestAi, + FallbackPlanVoicesItem_Tavus, + FallbackPlanVoicesItem_Neuphonic, + FallbackPlanVoicesItem_Sesame, + FallbackPlanVoicesItem_Inworld, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/fallback_play_ht_voice.py b/src/vapi/types/fallback_play_ht_voice.py new file mode 100644 index 00000000..a3493d74 --- /dev/null +++ b/src/vapi/types/fallback_play_ht_voice.py @@ -0,0 +1,95 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .chunk_plan import ChunkPlan +from .fallback_play_ht_voice_emotion import FallbackPlayHtVoiceEmotion +from .fallback_play_ht_voice_id import FallbackPlayHtVoiceId +from .fallback_play_ht_voice_language import FallbackPlayHtVoiceLanguage +from .fallback_play_ht_voice_model import FallbackPlayHtVoiceModel + + +class FallbackPlayHtVoice(UncheckedBaseModel): + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="cachingEnabled"), + pydantic.Field( + alias="cachingEnabled", description="This is the flag to toggle voice caching for the assistant." + ), + ] = None + voice_id: typing_extensions.Annotated[ + FallbackPlayHtVoiceId, + FieldMetadata(alias="voiceId"), + pydantic.Field(alias="voiceId", description="This is the provider-specific ID that will be used."), + ] + speed: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the speed multiplier that will be used. + """ + + temperature: typing.Optional[float] = pydantic.Field(default=None) + """ + A floating point number between 0, exclusive, and 2, inclusive. If equal to null or not provided, the model's default temperature will be used. The temperature parameter controls variance. Lower temperatures result in more predictable results, higher temperatures allow each run to vary more, so the voice may sound less like the baseline voice. + """ + + emotion: typing.Optional[FallbackPlayHtVoiceEmotion] = pydantic.Field(default=None) + """ + An emotion to be applied to the speech. + """ + + voice_guidance: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="voiceGuidance"), + pydantic.Field( + alias="voiceGuidance", + description="A number between 1 and 6. Use lower numbers to reduce how unique your chosen voice will be compared to other voices.", + ), + ] = None + style_guidance: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="styleGuidance"), + pydantic.Field( + alias="styleGuidance", + description="A number between 1 and 30. Use lower numbers to to reduce how strong your chosen emotion will be. Higher numbers will create a very emotional performance.", + ), + ] = None + text_guidance: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="textGuidance"), + pydantic.Field( + alias="textGuidance", + description="A number between 1 and 2. This number influences how closely the generated speech adheres to the input text. Use lower values to create more fluid speech, but with a higher chance of deviating from the input text. Higher numbers will make the generated speech more accurate to the input text, ensuring that the words spoken align closely with the provided text.", + ), + ] = None + model: typing.Optional[FallbackPlayHtVoiceModel] = pydantic.Field(default=None) + """ + Playht voice model/engine to use. + """ + + language: typing.Optional[FallbackPlayHtVoiceLanguage] = pydantic.Field(default=None) + """ + The language to use for the speech. + """ + + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], + FieldMetadata(alias="chunkPlan"), + pydantic.Field( + alias="chunkPlan", + description="This is the plan for chunking the model output before it is sent to the voice provider.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/fallback_play_ht_voice_emotion.py b/src/vapi/types/fallback_play_ht_voice_emotion.py new file mode 100644 index 00000000..cd437f44 --- /dev/null +++ b/src/vapi/types/fallback_play_ht_voice_emotion.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackPlayHtVoiceEmotion = typing.Union[ + typing.Literal[ + "female_happy", + "female_sad", + "female_angry", + "female_fearful", + "female_disgust", + "female_surprised", + "male_happy", + "male_sad", + "male_angry", + "male_fearful", + "male_disgust", + "male_surprised", + ], + typing.Any, +] diff --git a/src/vapi/types/fallback_play_ht_voice_id.py b/src/vapi/types/fallback_play_ht_voice_id.py new file mode 100644 index 00000000..0810146c --- /dev/null +++ b/src/vapi/types/fallback_play_ht_voice_id.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .fallback_play_ht_voice_id_enum import FallbackPlayHtVoiceIdEnum + +FallbackPlayHtVoiceId = typing.Union[FallbackPlayHtVoiceIdEnum, str] diff --git a/src/vapi/types/fallback_play_ht_voice_id_enum.py b/src/vapi/types/fallback_play_ht_voice_id_enum.py new file mode 100644 index 00000000..71f4e668 --- /dev/null +++ b/src/vapi/types/fallback_play_ht_voice_id_enum.py @@ -0,0 +1,8 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackPlayHtVoiceIdEnum = typing.Union[ + typing.Literal["jennifer", "melissa", "will", "chris", "matt", "jack", "ruby", "davis", "donna", "michael"], + typing.Any, +] diff --git a/src/vapi/types/fallback_play_ht_voice_language.py b/src/vapi/types/fallback_play_ht_voice_language.py new file mode 100644 index 00000000..c0b9645b --- /dev/null +++ b/src/vapi/types/fallback_play_ht_voice_language.py @@ -0,0 +1,46 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackPlayHtVoiceLanguage = typing.Union[ + typing.Literal[ + "afrikaans", + "albanian", + "amharic", + "arabic", + "bengali", + "bulgarian", + "catalan", + "croatian", + "czech", + "danish", + "dutch", + "english", + "french", + "galician", + "german", + "greek", + "hebrew", + "hindi", + "hungarian", + "indonesian", + "italian", + "japanese", + "korean", + "malay", + "mandarin", + "polish", + "portuguese", + "russian", + "serbian", + "spanish", + "swedish", + "tagalog", + "thai", + "turkish", + "ukrainian", + "urdu", + "xhosa", + ], + typing.Any, +] diff --git a/src/vapi/types/fallback_play_ht_voice_model.py b/src/vapi/types/fallback_play_ht_voice_model.py new file mode 100644 index 00000000..b25170c9 --- /dev/null +++ b/src/vapi/types/fallback_play_ht_voice_model.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackPlayHtVoiceModel = typing.Union[ + typing.Literal["PlayHT2.0", "PlayHT2.0-turbo", "Play3.0-mini", "PlayDialog"], typing.Any +] diff --git a/src/vapi/types/fallback_rime_ai_voice.py b/src/vapi/types/fallback_rime_ai_voice.py new file mode 100644 index 00000000..34013dc0 --- /dev/null +++ b/src/vapi/types/fallback_rime_ai_voice.py @@ -0,0 +1,92 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .chunk_plan import ChunkPlan +from .fallback_rime_ai_voice_id import FallbackRimeAiVoiceId +from .fallback_rime_ai_voice_language import FallbackRimeAiVoiceLanguage +from .fallback_rime_ai_voice_model import FallbackRimeAiVoiceModel + + +class FallbackRimeAiVoice(UncheckedBaseModel): + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="cachingEnabled"), + pydantic.Field( + alias="cachingEnabled", description="This is the flag to toggle voice caching for the assistant." + ), + ] = None + voice_id: typing_extensions.Annotated[ + FallbackRimeAiVoiceId, + FieldMetadata(alias="voiceId"), + pydantic.Field(alias="voiceId", description="This is the provider-specific ID that will be used."), + ] + model: typing.Optional[FallbackRimeAiVoiceModel] = pydantic.Field(default=None) + """ + This is the model that will be used. Defaults to 'arcana' when not specified. + """ + + speed: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the speed multiplier that will be used. + """ + + pause_between_brackets: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="pauseBetweenBrackets"), + pydantic.Field( + alias="pauseBetweenBrackets", + description='This is a flag that controls whether to add slight pauses using angle brackets. Example: "Hi. <200> I\'d love to have a conversation with you." adds a 200ms pause between the first and second sentences.', + ), + ] = None + phonemize_between_brackets: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="phonemizeBetweenBrackets"), + pydantic.Field( + alias="phonemizeBetweenBrackets", + description='This is a flag that controls whether text inside brackets should be phonemized (converted to phonetic pronunciation) - Example: "{h\'El.o} World" will pronounce "Hello" as expected.', + ), + ] = None + reduce_latency: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="reduceLatency"), + pydantic.Field( + alias="reduceLatency", + description="This is a flag that controls whether to optimize for reduced latency in streaming. https://docs.rime.ai/api-reference/endpoint/websockets#param-reduce-latency", + ), + ] = None + inline_speed_alpha: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="inlineSpeedAlpha"), + pydantic.Field( + alias="inlineSpeedAlpha", + description="This is a string that allows inline speed control using alpha notation. https://docs.rime.ai/api-reference/endpoint/websockets#param-inline-speed-alpha", + ), + ] = None + language: typing.Optional[FallbackRimeAiVoiceLanguage] = pydantic.Field(default=None) + """ + Language for speech synthesis. Uses ISO 639 codes. Supported: en, es, de, fr, ar, hi, ja, he, pt, ta, si. + """ + + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], + FieldMetadata(alias="chunkPlan"), + pydantic.Field( + alias="chunkPlan", + description="This is the plan for chunking the model output before it is sent to the voice provider.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/fallback_rime_ai_voice_id.py b/src/vapi/types/fallback_rime_ai_voice_id.py new file mode 100644 index 00000000..c69fcc17 --- /dev/null +++ b/src/vapi/types/fallback_rime_ai_voice_id.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .fallback_rime_ai_voice_id_enum import FallbackRimeAiVoiceIdEnum + +FallbackRimeAiVoiceId = typing.Union[FallbackRimeAiVoiceIdEnum, str] diff --git a/src/vapi/types/fallback_rime_ai_voice_id_enum.py b/src/vapi/types/fallback_rime_ai_voice_id_enum.py new file mode 100644 index 00000000..53101542 --- /dev/null +++ b/src/vapi/types/fallback_rime_ai_voice_id_enum.py @@ -0,0 +1,59 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackRimeAiVoiceIdEnum = typing.Union[ + typing.Literal[ + "cove", + "moon", + "wildflower", + "eva", + "amber", + "maya", + "lagoon", + "breeze", + "helen", + "joy", + "marsh", + "creek", + "cedar", + "alpine", + "summit", + "nicholas", + "tyler", + "colin", + "hank", + "thunder", + "astra", + "eucalyptus", + "moraine", + "peak", + "tundra", + "mesa_extra", + "talon", + "marlu", + "glacier", + "falcon", + "luna", + "celeste", + "estelle", + "andromeda", + "esther", + "lyra", + "lintel", + "oculus", + "vespera", + "transom", + "bond", + "arcade", + "atrium", + "cupola", + "fern", + "sirius", + "orion", + "masonry", + "albion", + "parapet", + ], + typing.Any, +] diff --git a/src/vapi/types/fallback_rime_ai_voice_language.py b/src/vapi/types/fallback_rime_ai_voice_language.py new file mode 100644 index 00000000..60e8b6b8 --- /dev/null +++ b/src/vapi/types/fallback_rime_ai_voice_language.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackRimeAiVoiceLanguage = typing.Union[ + typing.Literal["en", "es", "de", "fr", "ar", "hi", "ja", "he", "pt", "ta", "si"], typing.Any +] diff --git a/src/vapi/types/fallback_rime_ai_voice_model.py b/src/vapi/types/fallback_rime_ai_voice_model.py new file mode 100644 index 00000000..727c1eb3 --- /dev/null +++ b/src/vapi/types/fallback_rime_ai_voice_model.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackRimeAiVoiceModel = typing.Union[typing.Literal["arcana", "mistv2", "mist"], typing.Any] diff --git a/src/vapi/types/fallback_sesame_voice.py b/src/vapi/types/fallback_sesame_voice.py new file mode 100644 index 00000000..3ebd8d5e --- /dev/null +++ b/src/vapi/types/fallback_sesame_voice.py @@ -0,0 +1,48 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .chunk_plan import ChunkPlan +from .fallback_sesame_voice_model import FallbackSesameVoiceModel + + +class FallbackSesameVoice(UncheckedBaseModel): + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="cachingEnabled"), + pydantic.Field( + alias="cachingEnabled", description="This is the flag to toggle voice caching for the assistant." + ), + ] = None + voice_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="voiceId"), + pydantic.Field(alias="voiceId", description="This is the provider-specific ID that will be used."), + ] + model: FallbackSesameVoiceModel = pydantic.Field() + """ + This is the model that will be used. + """ + + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], + FieldMetadata(alias="chunkPlan"), + pydantic.Field( + alias="chunkPlan", + description="This is the plan for chunking the model output before it is sent to the voice provider.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/fallback_sesame_voice_model.py b/src/vapi/types/fallback_sesame_voice_model.py new file mode 100644 index 00000000..b4102138 --- /dev/null +++ b/src/vapi/types/fallback_sesame_voice_model.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackSesameVoiceModel = typing.Union[typing.Literal["csm-1b"], typing.Any] diff --git a/src/vapi/types/fallback_smallest_ai_voice.py b/src/vapi/types/fallback_smallest_ai_voice.py new file mode 100644 index 00000000..4c982e34 --- /dev/null +++ b/src/vapi/types/fallback_smallest_ai_voice.py @@ -0,0 +1,54 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .chunk_plan import ChunkPlan +from .fallback_smallest_ai_voice_id import FallbackSmallestAiVoiceId +from .fallback_smallest_ai_voice_model import FallbackSmallestAiVoiceModel + + +class FallbackSmallestAiVoice(UncheckedBaseModel): + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="cachingEnabled"), + pydantic.Field( + alias="cachingEnabled", description="This is the flag to toggle voice caching for the assistant." + ), + ] = None + voice_id: typing_extensions.Annotated[ + FallbackSmallestAiVoiceId, + FieldMetadata(alias="voiceId"), + pydantic.Field(alias="voiceId", description="This is the provider-specific ID that will be used."), + ] + model: typing.Optional[FallbackSmallestAiVoiceModel] = pydantic.Field(default=None) + """ + Smallest AI voice model to use. Defaults to 'lightning' when not specified. + """ + + speed: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the speed multiplier that will be used. + """ + + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], + FieldMetadata(alias="chunkPlan"), + pydantic.Field( + alias="chunkPlan", + description="This is the plan for chunking the model output before it is sent to the voice provider.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/fallback_smallest_ai_voice_id.py b/src/vapi/types/fallback_smallest_ai_voice_id.py new file mode 100644 index 00000000..d73fb824 --- /dev/null +++ b/src/vapi/types/fallback_smallest_ai_voice_id.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .fallback_smallest_ai_voice_id_enum import FallbackSmallestAiVoiceIdEnum + +FallbackSmallestAiVoiceId = typing.Union[FallbackSmallestAiVoiceIdEnum, str] diff --git a/src/vapi/types/fallback_smallest_ai_voice_id_enum.py b/src/vapi/types/fallback_smallest_ai_voice_id_enum.py new file mode 100644 index 00000000..40799582 --- /dev/null +++ b/src/vapi/types/fallback_smallest_ai_voice_id_enum.py @@ -0,0 +1,34 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackSmallestAiVoiceIdEnum = typing.Union[ + typing.Literal[ + "emily", + "jasmine", + "arman", + "james", + "mithali", + "aravind", + "raj", + "diya", + "raman", + "ananya", + "isha", + "william", + "aarav", + "monika", + "niharika", + "deepika", + "raghav", + "kajal", + "radhika", + "mansi", + "nisha", + "saurabh", + "pooja", + "saina", + "sanya", + ], + typing.Any, +] diff --git a/src/vapi/types/fallback_smallest_ai_voice_model.py b/src/vapi/types/fallback_smallest_ai_voice_model.py new file mode 100644 index 00000000..27a94896 --- /dev/null +++ b/src/vapi/types/fallback_smallest_ai_voice_model.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackSmallestAiVoiceModel = typing.Union[typing.Literal["lightning"], typing.Any] diff --git a/src/vapi/types/fallback_soniox_transcriber.py b/src/vapi/types/fallback_soniox_transcriber.py new file mode 100644 index 00000000..36583c94 --- /dev/null +++ b/src/vapi/types/fallback_soniox_transcriber.py @@ -0,0 +1,57 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .fallback_soniox_transcriber_language import FallbackSonioxTranscriberLanguage +from .fallback_soniox_transcriber_model import FallbackSonioxTranscriberModel + + +class FallbackSonioxTranscriber(UncheckedBaseModel): + model: typing.Optional[FallbackSonioxTranscriberModel] = pydantic.Field(default=None) + """ + The Soniox model to use for transcription. + """ + + language: typing.Optional[FallbackSonioxTranscriberLanguage] = pydantic.Field(default=None) + """ + The language for transcription. Uses ISO 639-1 codes. Soniox supports 60+ languages with a single universal model. + """ + + language_hints_strict: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="languageHintsStrict"), + pydantic.Field( + alias="languageHintsStrict", + description="When enabled, restricts transcription to the language specified in the language field. When disabled, the model can detect and transcribe any of 60+ supported languages. Defaults to true.", + ), + ] = None + max_endpoint_delay_ms: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="maxEndpointDelayMs"), + pydantic.Field( + alias="maxEndpointDelayMs", + description="Maximum delay in milliseconds between when the speaker stops and when the endpoint is detected. Lower values mean faster turn-taking but more false endpoints. Range: 500-3000. Default: 500.", + ), + ] = None + custom_vocabulary: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="customVocabulary"), + pydantic.Field( + alias="customVocabulary", + description="Custom vocabulary terms to boost recognition accuracy. Useful for brand names, product names, and domain-specific terminology. Maps to Soniox context.terms.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/fallback_soniox_transcriber_language.py b/src/vapi/types/fallback_soniox_transcriber_language.py new file mode 100644 index 00000000..69797da0 --- /dev/null +++ b/src/vapi/types/fallback_soniox_transcriber_language.py @@ -0,0 +1,194 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackSonioxTranscriberLanguage = typing.Union[ + typing.Literal[ + "aa", + "ab", + "ae", + "af", + "ak", + "am", + "an", + "ar", + "as", + "av", + "ay", + "az", + "ba", + "be", + "bg", + "bh", + "bi", + "bm", + "bn", + "bo", + "br", + "bs", + "ca", + "ce", + "ch", + "co", + "cr", + "cs", + "cu", + "cv", + "cy", + "da", + "de", + "dv", + "dz", + "ee", + "el", + "en", + "eo", + "es", + "et", + "eu", + "fa", + "ff", + "fi", + "fj", + "fo", + "fr", + "fy", + "ga", + "gd", + "gl", + "gn", + "gu", + "gv", + "ha", + "he", + "hi", + "ho", + "hr", + "ht", + "hu", + "hy", + "hz", + "ia", + "id", + "ie", + "ig", + "ii", + "ik", + "io", + "is", + "it", + "iu", + "ja", + "jv", + "ka", + "kg", + "ki", + "kj", + "kk", + "kl", + "km", + "kn", + "ko", + "kr", + "ks", + "ku", + "kv", + "kw", + "ky", + "la", + "lb", + "lg", + "li", + "ln", + "lo", + "lt", + "lu", + "lv", + "mg", + "mh", + "mi", + "mk", + "ml", + "mn", + "mr", + "ms", + "mt", + "my", + "na", + "nb", + "nd", + "ne", + "ng", + "nl", + "nn", + "no", + "nr", + "nv", + "ny", + "oc", + "oj", + "om", + "or", + "os", + "pa", + "pi", + "pl", + "ps", + "pt", + "qu", + "rm", + "rn", + "ro", + "ru", + "rw", + "sa", + "sc", + "sd", + "se", + "sg", + "si", + "sk", + "sl", + "sm", + "sn", + "so", + "sq", + "sr", + "ss", + "st", + "su", + "sv", + "sw", + "ta", + "te", + "tg", + "th", + "ti", + "tk", + "tl", + "tn", + "to", + "tr", + "ts", + "tt", + "tw", + "ty", + "ug", + "uk", + "ur", + "uz", + "ve", + "vi", + "vo", + "wa", + "wo", + "xh", + "yi", + "yue", + "yo", + "za", + "zh", + "zu", + ], + typing.Any, +] diff --git a/src/vapi/types/fallback_soniox_transcriber_model.py b/src/vapi/types/fallback_soniox_transcriber_model.py new file mode 100644 index 00000000..14d6b709 --- /dev/null +++ b/src/vapi/types/fallback_soniox_transcriber_model.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackSonioxTranscriberModel = typing.Union[typing.Literal["stt-rt-v4"], typing.Any] diff --git a/src/vapi/types/fallback_speechmatics_transcriber.py b/src/vapi/types/fallback_speechmatics_transcriber.py new file mode 100644 index 00000000..e8e5952d --- /dev/null +++ b/src/vapi/types/fallback_speechmatics_transcriber.py @@ -0,0 +1,101 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .fallback_speechmatics_transcriber_language import FallbackSpeechmaticsTranscriberLanguage +from .fallback_speechmatics_transcriber_model import FallbackSpeechmaticsTranscriberModel +from .fallback_speechmatics_transcriber_numeral_style import FallbackSpeechmaticsTranscriberNumeralStyle +from .fallback_speechmatics_transcriber_operating_point import FallbackSpeechmaticsTranscriberOperatingPoint +from .fallback_speechmatics_transcriber_region import FallbackSpeechmaticsTranscriberRegion +from .speechmatics_custom_vocabulary_item import SpeechmaticsCustomVocabularyItem + + +class FallbackSpeechmaticsTranscriber(UncheckedBaseModel): + model: typing.Optional[FallbackSpeechmaticsTranscriberModel] = pydantic.Field(default=None) + """ + This is the model that will be used for the transcription. + """ + + language: typing.Optional[FallbackSpeechmaticsTranscriberLanguage] = None + operating_point: typing_extensions.Annotated[ + typing.Optional[FallbackSpeechmaticsTranscriberOperatingPoint], + FieldMetadata(alias="operatingPoint"), + pydantic.Field( + alias="operatingPoint", + description="This is the operating point for the transcription. Choose between `standard` for faster turnaround with strong accuracy or `enhanced` for highest accuracy when precision is critical.\n\n@default 'enhanced'", + ), + ] = None + region: typing.Optional[FallbackSpeechmaticsTranscriberRegion] = pydantic.Field(default=None) + """ + This is the region for the Speechmatics API. Choose between EU (Europe) and US (United States) regions for lower latency and data sovereignty compliance. + + @default 'eu' + """ + + enable_diarization: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="enableDiarization"), + pydantic.Field( + alias="enableDiarization", + description="This enables speaker diarization, which identifies and separates speakers in the transcription. Essential for multi-speaker conversations and conference calls.\n\n@default false", + ), + ] = None + max_delay: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="maxDelay"), + pydantic.Field( + alias="maxDelay", + description="This sets the maximum delay in milliseconds for partial transcripts. Balances latency and accuracy.\n\n@default 3000", + ), + ] = None + custom_vocabulary: typing_extensions.Annotated[ + typing.List[SpeechmaticsCustomVocabularyItem], + FieldMetadata(alias="customVocabulary"), + pydantic.Field(alias="customVocabulary"), + ] + numeral_style: typing_extensions.Annotated[ + typing.Optional[FallbackSpeechmaticsTranscriberNumeralStyle], + FieldMetadata(alias="numeralStyle"), + pydantic.Field( + alias="numeralStyle", + description="This controls how numbers, dates, currencies, and other entities are formatted in the transcription output.\n\n@default 'written'", + ), + ] = None + end_of_turn_sensitivity: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="endOfTurnSensitivity"), + pydantic.Field( + alias="endOfTurnSensitivity", + description="This is the sensitivity level for end-of-turn detection, which determines when a speaker has finished talking. Higher values are more sensitive.\n\n@default 0.5", + ), + ] = None + remove_disfluencies: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="removeDisfluencies"), + pydantic.Field( + alias="removeDisfluencies", + description="This enables removal of disfluencies (um, uh) from the transcript to create cleaner, more professional output.\n\nThis is only supported for the English language transcriber.\n\n@default false", + ), + ] = None + minimum_speech_duration: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minimumSpeechDuration"), + pydantic.Field( + alias="minimumSpeechDuration", + description="This is the minimum duration in seconds for speech segments. Shorter segments will be filtered out. Helps remove noise and improve accuracy.\n\n@default 0.0", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/fallback_speechmatics_transcriber_language.py b/src/vapi/types/fallback_speechmatics_transcriber_language.py new file mode 100644 index 00000000..ff29d046 --- /dev/null +++ b/src/vapi/types/fallback_speechmatics_transcriber_language.py @@ -0,0 +1,71 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackSpeechmaticsTranscriberLanguage = typing.Union[ + typing.Literal[ + "auto", + "ar", + "ar_en", + "ba", + "eu", + "be", + "bn", + "bg", + "yue", + "ca", + "hr", + "cs", + "da", + "nl", + "en", + "eo", + "et", + "fi", + "fr", + "gl", + "de", + "el", + "he", + "hi", + "hu", + "id", + "ia", + "ga", + "it", + "ja", + "ko", + "lv", + "lt", + "ms", + "en_ms", + "mt", + "cmn", + "cmn_en", + "mr", + "mn", + "no", + "fa", + "pl", + "pt", + "ro", + "ru", + "sk", + "sl", + "es", + "en_es", + "sw", + "sv", + "tl", + "ta", + "en_ta", + "th", + "tr", + "uk", + "ur", + "ug", + "vi", + "cy", + ], + typing.Any, +] diff --git a/src/vapi/types/fallback_speechmatics_transcriber_model.py b/src/vapi/types/fallback_speechmatics_transcriber_model.py new file mode 100644 index 00000000..826a0174 --- /dev/null +++ b/src/vapi/types/fallback_speechmatics_transcriber_model.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackSpeechmaticsTranscriberModel = typing.Union[typing.Literal["default"], typing.Any] diff --git a/src/vapi/types/fallback_speechmatics_transcriber_numeral_style.py b/src/vapi/types/fallback_speechmatics_transcriber_numeral_style.py new file mode 100644 index 00000000..a9ac8d9b --- /dev/null +++ b/src/vapi/types/fallback_speechmatics_transcriber_numeral_style.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackSpeechmaticsTranscriberNumeralStyle = typing.Union[typing.Literal["written", "spoken"], typing.Any] diff --git a/src/vapi/types/fallback_speechmatics_transcriber_operating_point.py b/src/vapi/types/fallback_speechmatics_transcriber_operating_point.py new file mode 100644 index 00000000..871d1a0d --- /dev/null +++ b/src/vapi/types/fallback_speechmatics_transcriber_operating_point.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackSpeechmaticsTranscriberOperatingPoint = typing.Union[typing.Literal["standard", "enhanced"], typing.Any] diff --git a/src/vapi/types/fallback_speechmatics_transcriber_region.py b/src/vapi/types/fallback_speechmatics_transcriber_region.py new file mode 100644 index 00000000..917ba327 --- /dev/null +++ b/src/vapi/types/fallback_speechmatics_transcriber_region.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackSpeechmaticsTranscriberRegion = typing.Union[typing.Literal["eu", "us"], typing.Any] diff --git a/src/vapi/types/fallback_talkscriber_transcriber.py b/src/vapi/types/fallback_talkscriber_transcriber.py new file mode 100644 index 00000000..097497c9 --- /dev/null +++ b/src/vapi/types/fallback_talkscriber_transcriber.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .fallback_talkscriber_transcriber_language import FallbackTalkscriberTranscriberLanguage +from .fallback_talkscriber_transcriber_model import FallbackTalkscriberTranscriberModel + + +class FallbackTalkscriberTranscriber(UncheckedBaseModel): + model: typing.Optional[FallbackTalkscriberTranscriberModel] = pydantic.Field(default=None) + """ + This is the model that will be used for the transcription. + """ + + language: typing.Optional[FallbackTalkscriberTranscriberLanguage] = pydantic.Field(default=None) + """ + This is the language that will be set for the transcription. The list of languages Whisper supports can be found here: https://github.com/openai/whisper/blob/main/whisper/tokenizer.py + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/fallback_talkscriber_transcriber_language.py b/src/vapi/types/fallback_talkscriber_transcriber_language.py new file mode 100644 index 00000000..3e3a8e58 --- /dev/null +++ b/src/vapi/types/fallback_talkscriber_transcriber_language.py @@ -0,0 +1,109 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackTalkscriberTranscriberLanguage = typing.Union[ + typing.Literal[ + "en", + "zh", + "de", + "es", + "ru", + "ko", + "fr", + "ja", + "pt", + "tr", + "pl", + "ca", + "nl", + "ar", + "sv", + "it", + "id", + "hi", + "fi", + "vi", + "he", + "uk", + "el", + "ms", + "cs", + "ro", + "da", + "hu", + "ta", + "no", + "th", + "ur", + "hr", + "bg", + "lt", + "la", + "mi", + "ml", + "cy", + "sk", + "te", + "fa", + "lv", + "bn", + "sr", + "az", + "sl", + "kn", + "et", + "mk", + "br", + "eu", + "is", + "hy", + "ne", + "mn", + "bs", + "kk", + "sq", + "sw", + "gl", + "mr", + "pa", + "si", + "km", + "sn", + "yo", + "so", + "af", + "oc", + "ka", + "be", + "tg", + "sd", + "gu", + "am", + "yi", + "lo", + "uz", + "fo", + "ht", + "ps", + "tk", + "nn", + "mt", + "sa", + "lb", + "my", + "bo", + "tl", + "mg", + "as", + "tt", + "haw", + "ln", + "ha", + "ba", + "jw", + "su", + "yue", + ], + typing.Any, +] diff --git a/src/vapi/types/fallback_talkscriber_transcriber_model.py b/src/vapi/types/fallback_talkscriber_transcriber_model.py new file mode 100644 index 00000000..d295ce66 --- /dev/null +++ b/src/vapi/types/fallback_talkscriber_transcriber_model.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackTalkscriberTranscriberModel = typing.Union[typing.Literal["whisper"], typing.Any] diff --git a/src/vapi/types/fallback_tavus_voice.py b/src/vapi/types/fallback_tavus_voice.py new file mode 100644 index 00000000..aaa81155 --- /dev/null +++ b/src/vapi/types/fallback_tavus_voice.py @@ -0,0 +1,86 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .chunk_plan import ChunkPlan +from .fallback_tavus_voice_voice_id import FallbackTavusVoiceVoiceId +from .tavus_conversation_properties import TavusConversationProperties + + +class FallbackTavusVoice(UncheckedBaseModel): + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="cachingEnabled"), + pydantic.Field( + alias="cachingEnabled", description="This is the flag to toggle voice caching for the assistant." + ), + ] = None + voice_id: typing_extensions.Annotated[ + FallbackTavusVoiceVoiceId, + FieldMetadata(alias="voiceId"), + pydantic.Field(alias="voiceId", description="This is the provider-specific ID that will be used."), + ] + persona_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="personaId"), + pydantic.Field( + alias="personaId", + description="This is the unique identifier for the persona that the replica will use in the conversation.", + ), + ] = None + callback_url: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="callbackUrl"), + pydantic.Field( + alias="callbackUrl", + description="This is the url that will receive webhooks with updates regarding the conversation state.", + ), + ] = None + conversation_name: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="conversationName"), + pydantic.Field(alias="conversationName", description="This is the name for the conversation."), + ] = None + conversational_context: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="conversationalContext"), + pydantic.Field( + alias="conversationalContext", + description="This is the context that will be appended to any context provided in the persona, if one is provided.", + ), + ] = None + custom_greeting: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="customGreeting"), + pydantic.Field( + alias="customGreeting", + description="This is the custom greeting that the replica will give once a participant joines the conversation.", + ), + ] = None + properties: typing.Optional[TavusConversationProperties] = pydantic.Field(default=None) + """ + These are optional properties used to customize the conversation. + """ + + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], + FieldMetadata(alias="chunkPlan"), + pydantic.Field( + alias="chunkPlan", + description="This is the plan for chunking the model output before it is sent to the voice provider.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/fallback_tavus_voice_voice_id.py b/src/vapi/types/fallback_tavus_voice_voice_id.py new file mode 100644 index 00000000..ce130c59 --- /dev/null +++ b/src/vapi/types/fallback_tavus_voice_voice_id.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .fallback_tavus_voice_voice_id_zero import FallbackTavusVoiceVoiceIdZero + +FallbackTavusVoiceVoiceId = typing.Union[FallbackTavusVoiceVoiceIdZero, str] diff --git a/src/vapi/types/fallback_tavus_voice_voice_id_zero.py b/src/vapi/types/fallback_tavus_voice_voice_id_zero.py new file mode 100644 index 00000000..68292fce --- /dev/null +++ b/src/vapi/types/fallback_tavus_voice_voice_id_zero.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackTavusVoiceVoiceIdZero = typing.Union[typing.Literal["r52da2535a"], typing.Any] diff --git a/src/vapi/types/fallback_transcriber_plan.py b/src/vapi/types/fallback_transcriber_plan.py new file mode 100644 index 00000000..f5143a01 --- /dev/null +++ b/src/vapi/types/fallback_transcriber_plan.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .fallback_transcriber_plan_transcribers_item import FallbackTranscriberPlanTranscribersItem + + +class FallbackTranscriberPlan(UncheckedBaseModel): + transcribers: typing.List[FallbackTranscriberPlanTranscribersItem] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/fallback_transcriber_plan_transcribers_item.py b/src/vapi/types/fallback_transcriber_plan_transcribers_item.py new file mode 100644 index 00000000..0f9d77d1 --- /dev/null +++ b/src/vapi/types/fallback_transcriber_plan_transcribers_item.py @@ -0,0 +1,429 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .deepgram_transcriber_language import DeepgramTranscriberLanguage +from .deepgram_transcriber_model import DeepgramTranscriberModel +from .fallback_assembly_ai_transcriber_language import FallbackAssemblyAiTranscriberLanguage +from .fallback_assembly_ai_transcriber_speech_model import FallbackAssemblyAiTranscriberSpeechModel +from .fallback_azure_speech_transcriber_language import FallbackAzureSpeechTranscriberLanguage +from .fallback_azure_speech_transcriber_segmentation_strategy import FallbackAzureSpeechTranscriberSegmentationStrategy +from .fallback_cartesia_transcriber_language import FallbackCartesiaTranscriberLanguage +from .fallback_cartesia_transcriber_model import FallbackCartesiaTranscriberModel +from .fallback_eleven_labs_transcriber_language import FallbackElevenLabsTranscriberLanguage +from .fallback_eleven_labs_transcriber_model import FallbackElevenLabsTranscriberModel +from .fallback_gladia_transcriber_language import FallbackGladiaTranscriberLanguage +from .fallback_gladia_transcriber_language_behaviour import FallbackGladiaTranscriberLanguageBehaviour +from .fallback_gladia_transcriber_languages import FallbackGladiaTranscriberLanguages +from .fallback_gladia_transcriber_model import FallbackGladiaTranscriberModel +from .fallback_gladia_transcriber_region import FallbackGladiaTranscriberRegion +from .fallback_google_transcriber_language import FallbackGoogleTranscriberLanguage +from .fallback_google_transcriber_model import FallbackGoogleTranscriberModel +from .fallback_open_ai_transcriber_language import FallbackOpenAiTranscriberLanguage +from .fallback_open_ai_transcriber_model import FallbackOpenAiTranscriberModel +from .fallback_soniox_transcriber_language import FallbackSonioxTranscriberLanguage +from .fallback_soniox_transcriber_model import FallbackSonioxTranscriberModel +from .fallback_speechmatics_transcriber_language import FallbackSpeechmaticsTranscriberLanguage +from .fallback_speechmatics_transcriber_model import FallbackSpeechmaticsTranscriberModel +from .fallback_speechmatics_transcriber_numeral_style import FallbackSpeechmaticsTranscriberNumeralStyle +from .fallback_speechmatics_transcriber_operating_point import FallbackSpeechmaticsTranscriberOperatingPoint +from .fallback_speechmatics_transcriber_region import FallbackSpeechmaticsTranscriberRegion +from .fallback_talkscriber_transcriber_language import FallbackTalkscriberTranscriberLanguage +from .fallback_talkscriber_transcriber_model import FallbackTalkscriberTranscriberModel +from .gladia_custom_vocabulary_config_dto import GladiaCustomVocabularyConfigDto +from .server import Server +from .speechmatics_custom_vocabulary_item import SpeechmaticsCustomVocabularyItem + + +class FallbackTranscriberPlanTranscribersItem_AssemblyAi(UncheckedBaseModel): + provider: typing.Literal["assembly-ai"] = "assembly-ai" + language: typing.Optional[FallbackAssemblyAiTranscriberLanguage] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="confidenceThreshold"), pydantic.Field(alias="confidenceThreshold") + ] = None + format_turns: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="formatTurns"), pydantic.Field(alias="formatTurns") + ] = None + end_of_turn_confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="endOfTurnConfidenceThreshold"), + pydantic.Field(alias="endOfTurnConfidenceThreshold"), + ] = None + min_end_of_turn_silence_when_confident: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minEndOfTurnSilenceWhenConfident"), + pydantic.Field(alias="minEndOfTurnSilenceWhenConfident"), + ] = None + word_finalization_max_wait_time: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="wordFinalizationMaxWaitTime"), + pydantic.Field(alias="wordFinalizationMaxWaitTime"), + ] = None + max_turn_silence: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTurnSilence"), pydantic.Field(alias="maxTurnSilence") + ] = None + vad_assisted_endpointing_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="vadAssistedEndpointingEnabled"), + pydantic.Field(alias="vadAssistedEndpointingEnabled"), + ] = None + speech_model: typing_extensions.Annotated[ + typing.Optional[FallbackAssemblyAiTranscriberSpeechModel], + FieldMetadata(alias="speechModel"), + pydantic.Field(alias="speechModel"), + ] = None + realtime_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="realtimeUrl"), pydantic.Field(alias="realtimeUrl") + ] = None + word_boost: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="wordBoost"), pydantic.Field(alias="wordBoost") + ] = None + keyterms_prompt: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="keytermsPrompt"), pydantic.Field(alias="keytermsPrompt") + ] = None + end_utterance_silence_threshold: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="endUtteranceSilenceThreshold"), + pydantic.Field(alias="endUtteranceSilenceThreshold"), + ] = None + disable_partial_transcripts: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="disablePartialTranscripts"), + pydantic.Field(alias="disablePartialTranscripts"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class FallbackTranscriberPlanTranscribersItem_Azure(UncheckedBaseModel): + provider: typing.Literal["azure"] = "azure" + language: typing.Optional[FallbackAzureSpeechTranscriberLanguage] = None + segmentation_strategy: typing_extensions.Annotated[ + typing.Optional[FallbackAzureSpeechTranscriberSegmentationStrategy], + FieldMetadata(alias="segmentationStrategy"), + pydantic.Field(alias="segmentationStrategy"), + ] = None + segmentation_silence_timeout_ms: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="segmentationSilenceTimeoutMs"), + pydantic.Field(alias="segmentationSilenceTimeoutMs"), + ] = None + segmentation_maximum_time_ms: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="segmentationMaximumTimeMs"), + pydantic.Field(alias="segmentationMaximumTimeMs"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class FallbackTranscriberPlanTranscribersItem_CustomTranscriber(UncheckedBaseModel): + provider: typing.Literal["custom-transcriber"] = "custom-transcriber" + server: Server + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class FallbackTranscriberPlanTranscribersItem_Deepgram(UncheckedBaseModel): + provider: typing.Literal["deepgram"] = "deepgram" + model: typing.Optional[DeepgramTranscriberModel] = None + language: typing.Optional[DeepgramTranscriberLanguage] = None + smart_format: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smartFormat"), pydantic.Field(alias="smartFormat") + ] = None + mip_opt_out: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="mipOptOut"), pydantic.Field(alias="mipOptOut") + ] = None + numerals: typing.Optional[bool] = None + profanity_filter: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="profanityFilter"), pydantic.Field(alias="profanityFilter") + ] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="confidenceThreshold"), pydantic.Field(alias="confidenceThreshold") + ] = None + eager_eot_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="eagerEotThreshold"), pydantic.Field(alias="eagerEotThreshold") + ] = None + eot_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="eotThreshold"), pydantic.Field(alias="eotThreshold") + ] = None + eot_timeout_ms: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="eotTimeoutMs"), pydantic.Field(alias="eotTimeoutMs") + ] = None + keywords: typing.Optional[typing.List[str]] = None + keyterm: typing.Optional[typing.List[str]] = None + endpointing: typing.Optional[float] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class FallbackTranscriberPlanTranscribersItem_11Labs(UncheckedBaseModel): + provider: typing.Literal["11labs"] = "11labs" + model: typing.Optional[FallbackElevenLabsTranscriberModel] = None + language: typing.Optional[FallbackElevenLabsTranscriberLanguage] = None + silence_threshold_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="silenceThresholdSeconds"), + pydantic.Field(alias="silenceThresholdSeconds"), + ] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="confidenceThreshold"), pydantic.Field(alias="confidenceThreshold") + ] = None + min_speech_duration_ms: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="minSpeechDurationMs"), pydantic.Field(alias="minSpeechDurationMs") + ] = None + min_silence_duration_ms: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minSilenceDurationMs"), + pydantic.Field(alias="minSilenceDurationMs"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class FallbackTranscriberPlanTranscribersItem_Gladia(UncheckedBaseModel): + provider: typing.Literal["gladia"] = "gladia" + model: typing.Optional[FallbackGladiaTranscriberModel] = None + language_behaviour: typing_extensions.Annotated[ + typing.Optional[FallbackGladiaTranscriberLanguageBehaviour], + FieldMetadata(alias="languageBehaviour"), + pydantic.Field(alias="languageBehaviour"), + ] = None + language: typing.Optional[FallbackGladiaTranscriberLanguage] = None + languages: typing.Optional[FallbackGladiaTranscriberLanguages] = None + transcription_hint: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="transcriptionHint"), pydantic.Field(alias="transcriptionHint") + ] = None + prosody: typing.Optional[bool] = None + audio_enhancer: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="audioEnhancer"), pydantic.Field(alias="audioEnhancer") + ] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="confidenceThreshold"), pydantic.Field(alias="confidenceThreshold") + ] = None + endpointing: typing.Optional[float] = None + speech_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="speechThreshold"), pydantic.Field(alias="speechThreshold") + ] = None + custom_vocabulary_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="customVocabularyEnabled"), + pydantic.Field(alias="customVocabularyEnabled"), + ] = None + custom_vocabulary_config: typing_extensions.Annotated[ + typing.Optional[GladiaCustomVocabularyConfigDto], + FieldMetadata(alias="customVocabularyConfig"), + pydantic.Field(alias="customVocabularyConfig"), + ] = None + region: typing.Optional[FallbackGladiaTranscriberRegion] = None + receive_partial_transcripts: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="receivePartialTranscripts"), + pydantic.Field(alias="receivePartialTranscripts"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class FallbackTranscriberPlanTranscribersItem_Google(UncheckedBaseModel): + provider: typing.Literal["google"] = "google" + model: typing.Optional[FallbackGoogleTranscriberModel] = None + language: typing.Optional[FallbackGoogleTranscriberLanguage] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class FallbackTranscriberPlanTranscribersItem_Talkscriber(UncheckedBaseModel): + provider: typing.Literal["talkscriber"] = "talkscriber" + model: typing.Optional[FallbackTalkscriberTranscriberModel] = None + language: typing.Optional[FallbackTalkscriberTranscriberLanguage] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class FallbackTranscriberPlanTranscribersItem_Speechmatics(UncheckedBaseModel): + provider: typing.Literal["speechmatics"] = "speechmatics" + model: typing.Optional[FallbackSpeechmaticsTranscriberModel] = None + language: typing.Optional[FallbackSpeechmaticsTranscriberLanguage] = None + operating_point: typing_extensions.Annotated[ + typing.Optional[FallbackSpeechmaticsTranscriberOperatingPoint], + FieldMetadata(alias="operatingPoint"), + pydantic.Field(alias="operatingPoint"), + ] = None + region: typing.Optional[FallbackSpeechmaticsTranscriberRegion] = None + enable_diarization: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="enableDiarization"), pydantic.Field(alias="enableDiarization") + ] = None + max_delay: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxDelay"), pydantic.Field(alias="maxDelay") + ] = None + custom_vocabulary: typing_extensions.Annotated[ + typing.List[SpeechmaticsCustomVocabularyItem], + FieldMetadata(alias="customVocabulary"), + pydantic.Field(alias="customVocabulary"), + ] + numeral_style: typing_extensions.Annotated[ + typing.Optional[FallbackSpeechmaticsTranscriberNumeralStyle], + FieldMetadata(alias="numeralStyle"), + pydantic.Field(alias="numeralStyle"), + ] = None + end_of_turn_sensitivity: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="endOfTurnSensitivity"), + pydantic.Field(alias="endOfTurnSensitivity"), + ] = None + remove_disfluencies: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="removeDisfluencies"), pydantic.Field(alias="removeDisfluencies") + ] = None + minimum_speech_duration: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minimumSpeechDuration"), + pydantic.Field(alias="minimumSpeechDuration"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class FallbackTranscriberPlanTranscribersItem_Openai(UncheckedBaseModel): + provider: typing.Literal["openai"] = "openai" + model: FallbackOpenAiTranscriberModel + language: typing.Optional[FallbackOpenAiTranscriberLanguage] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class FallbackTranscriberPlanTranscribersItem_Cartesia(UncheckedBaseModel): + provider: typing.Literal["cartesia"] = "cartesia" + model: typing.Optional[FallbackCartesiaTranscriberModel] = None + language: typing.Optional[FallbackCartesiaTranscriberLanguage] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class FallbackTranscriberPlanTranscribersItem_Soniox(UncheckedBaseModel): + provider: typing.Literal["soniox"] = "soniox" + model: typing.Optional[FallbackSonioxTranscriberModel] = None + language: typing.Optional[FallbackSonioxTranscriberLanguage] = None + language_hints_strict: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="languageHintsStrict"), pydantic.Field(alias="languageHintsStrict") + ] = None + max_endpoint_delay_ms: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxEndpointDelayMs"), pydantic.Field(alias="maxEndpointDelayMs") + ] = None + custom_vocabulary: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="customVocabulary"), + pydantic.Field(alias="customVocabulary"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +FallbackTranscriberPlanTranscribersItem = typing_extensions.Annotated[ + typing.Union[ + FallbackTranscriberPlanTranscribersItem_AssemblyAi, + FallbackTranscriberPlanTranscribersItem_Azure, + FallbackTranscriberPlanTranscribersItem_CustomTranscriber, + FallbackTranscriberPlanTranscribersItem_Deepgram, + FallbackTranscriberPlanTranscribersItem_11Labs, + FallbackTranscriberPlanTranscribersItem_Gladia, + FallbackTranscriberPlanTranscribersItem_Google, + FallbackTranscriberPlanTranscribersItem_Talkscriber, + FallbackTranscriberPlanTranscribersItem_Speechmatics, + FallbackTranscriberPlanTranscribersItem_Openai, + FallbackTranscriberPlanTranscribersItem_Cartesia, + FallbackTranscriberPlanTranscribersItem_Soniox, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/fallback_vapi_voice.py b/src/vapi/types/fallback_vapi_voice.py new file mode 100644 index 00000000..63f97402 --- /dev/null +++ b/src/vapi/types/fallback_vapi_voice.py @@ -0,0 +1,59 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .chunk_plan import ChunkPlan +from .fallback_vapi_voice_voice_id import FallbackVapiVoiceVoiceId +from .vapi_pronunciation_dictionary_locator import VapiPronunciationDictionaryLocator + + +class FallbackVapiVoice(UncheckedBaseModel): + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="cachingEnabled"), + pydantic.Field( + alias="cachingEnabled", description="This is the flag to toggle voice caching for the assistant." + ), + ] = None + voice_id: typing_extensions.Annotated[ + FallbackVapiVoiceVoiceId, + FieldMetadata(alias="voiceId"), + pydantic.Field(alias="voiceId", description="The voices provided by Vapi"), + ] + speed: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the speed multiplier that will be used. + + @default 1 + """ + + pronunciation_dictionary: typing_extensions.Annotated[ + typing.Optional[typing.List[VapiPronunciationDictionaryLocator]], + FieldMetadata(alias="pronunciationDictionary"), + pydantic.Field( + alias="pronunciationDictionary", + description="List of pronunciation dictionary locators for custom word pronunciations.", + ), + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], + FieldMetadata(alias="chunkPlan"), + pydantic.Field( + alias="chunkPlan", + description="This is the plan for chunking the model output before it is sent to the voice provider.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/fallback_vapi_voice_voice_id.py b/src/vapi/types/fallback_vapi_voice_voice_id.py new file mode 100644 index 00000000..ce7e1d2f --- /dev/null +++ b/src/vapi/types/fallback_vapi_voice_voice_id.py @@ -0,0 +1,39 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackVapiVoiceVoiceId = typing.Union[ + typing.Literal[ + "Clara", + "Godfrey", + "Layla", + "Sid", + "Gustavo", + "Elliot", + "Kylie", + "Rohan", + "Lily", + "Savannah", + "Hana", + "Neha", + "Cole", + "Harry", + "Paige", + "Spencer", + "Nico", + "Kai", + "Emma", + "Sagar", + "Neil", + "Naina", + "Leah", + "Tara", + "Jess", + "Leo", + "Dan", + "Mia", + "Zac", + "Zoe", + ], + typing.Any, +] diff --git a/src/vapi/types/fallback_well_said_voice.py b/src/vapi/types/fallback_well_said_voice.py new file mode 100644 index 00000000..299a3d8d --- /dev/null +++ b/src/vapi/types/fallback_well_said_voice.py @@ -0,0 +1,58 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .chunk_plan import ChunkPlan +from .fallback_well_said_voice_model import FallbackWellSaidVoiceModel + + +class FallbackWellSaidVoice(UncheckedBaseModel): + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="cachingEnabled"), + pydantic.Field( + alias="cachingEnabled", description="This is the flag to toggle voice caching for the assistant." + ), + ] = None + voice_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="voiceId"), + pydantic.Field(alias="voiceId", description="The WellSaid speaker ID to synthesize."), + ] + model: typing.Optional[FallbackWellSaidVoiceModel] = pydantic.Field(default=None) + """ + This is the model that will be used. + """ + + enable_ssml: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="enableSsml"), + pydantic.Field(alias="enableSsml", description="Enables limited SSML translation for input text."), + ] = None + library_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="libraryIds"), + pydantic.Field(alias="libraryIds", description="Array of library IDs to use for voice synthesis."), + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], + FieldMetadata(alias="chunkPlan"), + pydantic.Field( + alias="chunkPlan", + description="This is the plan for chunking the model output before it is sent to the voice provider.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/fallback_well_said_voice_model.py b/src/vapi/types/fallback_well_said_voice_model.py new file mode 100644 index 00000000..2b088c7f --- /dev/null +++ b/src/vapi/types/fallback_well_said_voice_model.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FallbackWellSaidVoiceModel = typing.Union[typing.Literal["caruso", "legacy"], typing.Any] diff --git a/src/vapi/types/file.py b/src/vapi/types/file.py index 2b867ab1..b97971c1 100644 --- a/src/vapi/types/file.py +++ b/src/vapi/types/file.py @@ -1,24 +1,28 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +import datetime as dt import typing -from .file_status import FileStatus + import pydantic import typing_extensions -from ..core.serialization import FieldMetadata -import datetime as dt from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .file_object import FileObject +from .file_status import FileStatus -class File(UniversalBaseModel): - object: typing.Optional[typing.Literal["file"]] = None +class File(UncheckedBaseModel): + object: typing.Optional[FileObject] = None status: typing.Optional[FileStatus] = None name: typing.Optional[str] = pydantic.Field(default=None) """ This is the name of the file. This is just for your own reference. """ - original_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="originalName")] = None + original_name: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="originalName"), pydantic.Field(alias="originalName") + ] = None bytes: typing.Optional[float] = None purpose: typing.Optional[str] = None mimetype: typing.Optional[str] = None @@ -26,26 +30,39 @@ class File(UniversalBaseModel): path: typing.Optional[str] = None bucket: typing.Optional[str] = None url: typing.Optional[str] = None - metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None + parsed_text_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="parsedTextUrl"), pydantic.Field(alias="parsedTextUrl") + ] = None + parsed_text_bytes: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="parsedTextBytes"), pydantic.Field(alias="parsedTextBytes") + ] = None + metadata: typing.Optional[typing.Dict[str, typing.Any]] = None id: str = pydantic.Field() """ This is the unique identifier for the file. """ - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field() - """ - This is the unique identifier for the org that this file belongs to. - """ - - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the file was created. - """ - - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the file was last updated. - """ + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this file belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the file was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", description="This is the ISO 8601 date-time string of when the file was last updated." + ), + ] if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/file_object.py b/src/vapi/types/file_object.py new file mode 100644 index 00000000..26ea02be --- /dev/null +++ b/src/vapi/types/file_object.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FileObject = typing.Union[typing.Literal["file"], typing.Any] diff --git a/src/vapi/types/file_status.py b/src/vapi/types/file_status.py index 4ac56f73..2c6edb30 100644 --- a/src/vapi/types/file_status.py +++ b/src/vapi/types/file_status.py @@ -2,4 +2,4 @@ import typing -FileStatus = typing.Union[typing.Literal["indexed", "not_indexed"], typing.Any] +FileStatus = typing.Union[typing.Literal["processing", "done", "failed"], typing.Any] diff --git a/src/vapi/types/filter_date_type_column_on_call_table.py b/src/vapi/types/filter_date_type_column_on_call_table.py new file mode 100644 index 00000000..ee66f6a5 --- /dev/null +++ b/src/vapi/types/filter_date_type_column_on_call_table.py @@ -0,0 +1,39 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .filter_date_type_column_on_call_table_column import FilterDateTypeColumnOnCallTableColumn +from .filter_date_type_column_on_call_table_operator import FilterDateTypeColumnOnCallTableOperator + + +class FilterDateTypeColumnOnCallTable(UncheckedBaseModel): + column: FilterDateTypeColumnOnCallTableColumn = pydantic.Field() + """ + This is the column in the call table that will be filtered on. + Date Type columns are columns where the rows store data as a date. + Must be a valid column for the selected table. + """ + + operator: FilterDateTypeColumnOnCallTableOperator = pydantic.Field() + """ + This is the operator to use for the filter. + For date type columns, the operator must be "=", ">", "<", ">=", "<=" + """ + + value: str = pydantic.Field() + """ + This is the value to filter on. + Must be a valid ISO 8601 date-time string. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/filter_date_type_column_on_call_table_column.py b/src/vapi/types/filter_date_type_column_on_call_table_column.py new file mode 100644 index 00000000..cf3013bb --- /dev/null +++ b/src/vapi/types/filter_date_type_column_on_call_table_column.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FilterDateTypeColumnOnCallTableColumn = typing.Union[typing.Literal["startedAt", "endedAt"], typing.Any] diff --git a/src/vapi/types/filter_date_type_column_on_call_table_operator.py b/src/vapi/types/filter_date_type_column_on_call_table_operator.py new file mode 100644 index 00000000..cabcf9cd --- /dev/null +++ b/src/vapi/types/filter_date_type_column_on_call_table_operator.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FilterDateTypeColumnOnCallTableOperator = typing.Union[typing.Literal["=", "!=", ">", "<", ">=", "<="], typing.Any] diff --git a/src/vapi/types/filter_number_array_type_column_on_call_table.py b/src/vapi/types/filter_number_array_type_column_on_call_table.py new file mode 100644 index 00000000..5014fdfe --- /dev/null +++ b/src/vapi/types/filter_number_array_type_column_on_call_table.py @@ -0,0 +1,38 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .filter_number_array_type_column_on_call_table_column import FilterNumberArrayTypeColumnOnCallTableColumn +from .filter_number_array_type_column_on_call_table_operator import FilterNumberArrayTypeColumnOnCallTableOperator + + +class FilterNumberArrayTypeColumnOnCallTable(UncheckedBaseModel): + column: FilterNumberArrayTypeColumnOnCallTableColumn = pydantic.Field() + """ + This is the column in the call table that will be filtered on. + Number Array Type columns are the same as Number Type columns, but provides the ability to filter on multiple values provided as an array. + Must be a valid column for the selected table. + """ + + operator: FilterNumberArrayTypeColumnOnCallTableOperator = pydantic.Field() + """ + This is the operator to use for the filter. + The operator must be `in` or `not_in`. + """ + + value: typing.List[float] = pydantic.Field() + """ + This is the value to filter on. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/filter_number_array_type_column_on_call_table_column.py b/src/vapi/types/filter_number_array_type_column_on_call_table_column.py new file mode 100644 index 00000000..83a2beb9 --- /dev/null +++ b/src/vapi/types/filter_number_array_type_column_on_call_table_column.py @@ -0,0 +1,16 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FilterNumberArrayTypeColumnOnCallTableColumn = typing.Union[ + typing.Literal[ + "duration", + "cost", + "averageModelLatency", + "averageVoiceLatency", + "averageTranscriberLatency", + "averageTurnLatency", + "averageEndpointingLatency", + ], + typing.Any, +] diff --git a/src/vapi/types/filter_number_array_type_column_on_call_table_operator.py b/src/vapi/types/filter_number_array_type_column_on_call_table_operator.py new file mode 100644 index 00000000..b6696acd --- /dev/null +++ b/src/vapi/types/filter_number_array_type_column_on_call_table_operator.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FilterNumberArrayTypeColumnOnCallTableOperator = typing.Union[ + typing.Literal["in", "not_in", "is_empty", "is_not_empty"], typing.Any +] diff --git a/src/vapi/types/filter_number_type_column_on_call_table.py b/src/vapi/types/filter_number_type_column_on_call_table.py new file mode 100644 index 00000000..1d4990b4 --- /dev/null +++ b/src/vapi/types/filter_number_type_column_on_call_table.py @@ -0,0 +1,38 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .filter_number_type_column_on_call_table_column import FilterNumberTypeColumnOnCallTableColumn +from .filter_number_type_column_on_call_table_operator import FilterNumberTypeColumnOnCallTableOperator + + +class FilterNumberTypeColumnOnCallTable(UncheckedBaseModel): + column: FilterNumberTypeColumnOnCallTableColumn = pydantic.Field() + """ + This is the column in the call table that will be filtered on. + Number Type columns are columns where the rows store data as a number. + Must be a valid column for the selected table. + """ + + operator: FilterNumberTypeColumnOnCallTableOperator = pydantic.Field() + """ + This is the operator to use for the filter. + For number type columns, the operator must be "=", ">", "<", ">=", "<=" + """ + + value: float = pydantic.Field() + """ + This is the value to filter on. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/filter_number_type_column_on_call_table_column.py b/src/vapi/types/filter_number_type_column_on_call_table_column.py new file mode 100644 index 00000000..25d4c9cd --- /dev/null +++ b/src/vapi/types/filter_number_type_column_on_call_table_column.py @@ -0,0 +1,16 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FilterNumberTypeColumnOnCallTableColumn = typing.Union[ + typing.Literal[ + "duration", + "cost", + "averageModelLatency", + "averageVoiceLatency", + "averageTranscriberLatency", + "averageTurnLatency", + "averageEndpointingLatency", + ], + typing.Any, +] diff --git a/src/vapi/types/filter_number_type_column_on_call_table_operator.py b/src/vapi/types/filter_number_type_column_on_call_table_operator.py new file mode 100644 index 00000000..abf3d59a --- /dev/null +++ b/src/vapi/types/filter_number_type_column_on_call_table_operator.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FilterNumberTypeColumnOnCallTableOperator = typing.Union[typing.Literal["=", "!=", ">", "<", ">=", "<="], typing.Any] diff --git a/src/vapi/types/filter_string_array_type_column_on_call_table.py b/src/vapi/types/filter_string_array_type_column_on_call_table.py new file mode 100644 index 00000000..5e788dcb --- /dev/null +++ b/src/vapi/types/filter_string_array_type_column_on_call_table.py @@ -0,0 +1,38 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .filter_string_array_type_column_on_call_table_column import FilterStringArrayTypeColumnOnCallTableColumn +from .filter_string_array_type_column_on_call_table_operator import FilterStringArrayTypeColumnOnCallTableOperator + + +class FilterStringArrayTypeColumnOnCallTable(UncheckedBaseModel): + column: FilterStringArrayTypeColumnOnCallTableColumn = pydantic.Field() + """ + This is the column in the call table that will be filtered on. + String Array Type columns are the same as String Type columns, but provides the ability to filter on multiple values provided as an array. + Must be a valid column for the selected table. + """ + + operator: FilterStringArrayTypeColumnOnCallTableOperator = pydantic.Field() + """ + This is the operator to use for the filter. + The operator must be `in` or `not_in`. + """ + + value: typing.List[str] = pydantic.Field() + """ + These are the values to filter on. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/filter_string_array_type_column_on_call_table_column.py b/src/vapi/types/filter_string_array_type_column_on_call_table_column.py new file mode 100644 index 00000000..6523bb35 --- /dev/null +++ b/src/vapi/types/filter_string_array_type_column_on_call_table_column.py @@ -0,0 +1,19 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FilterStringArrayTypeColumnOnCallTableColumn = typing.Union[ + typing.Literal[ + "assistantId", + "workflowId", + "squadId", + "phoneNumberId", + "type", + "customerNumber", + "status", + "endedReason", + "forwardedPhoneNumber", + "campaignId", + ], + typing.Any, +] diff --git a/src/vapi/types/filter_string_array_type_column_on_call_table_operator.py b/src/vapi/types/filter_string_array_type_column_on_call_table_operator.py new file mode 100644 index 00000000..47de3e12 --- /dev/null +++ b/src/vapi/types/filter_string_array_type_column_on_call_table_operator.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FilterStringArrayTypeColumnOnCallTableOperator = typing.Union[ + typing.Literal["in", "not_in", "is_empty", "is_not_empty"], typing.Any +] diff --git a/src/vapi/types/filter_string_type_column_on_call_table.py b/src/vapi/types/filter_string_type_column_on_call_table.py new file mode 100644 index 00000000..67541d8c --- /dev/null +++ b/src/vapi/types/filter_string_type_column_on_call_table.py @@ -0,0 +1,38 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .filter_string_type_column_on_call_table_column import FilterStringTypeColumnOnCallTableColumn +from .filter_string_type_column_on_call_table_operator import FilterStringTypeColumnOnCallTableOperator + + +class FilterStringTypeColumnOnCallTable(UncheckedBaseModel): + column: FilterStringTypeColumnOnCallTableColumn = pydantic.Field() + """ + This is the column in the call table that will be filtered on. + String Type columns are columns where the rows store data as a string. + Must be a valid column for the selected table. + """ + + operator: FilterStringTypeColumnOnCallTableOperator = pydantic.Field() + """ + This is the operator to use for the filter. + For string type columns, the operator must be "=", "!=", "contains", "not contains" + """ + + value: str = pydantic.Field() + """ + This is the value to filter on. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/filter_string_type_column_on_call_table_column.py b/src/vapi/types/filter_string_type_column_on_call_table_column.py new file mode 100644 index 00000000..b486444a --- /dev/null +++ b/src/vapi/types/filter_string_type_column_on_call_table_column.py @@ -0,0 +1,19 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FilterStringTypeColumnOnCallTableColumn = typing.Union[ + typing.Literal[ + "assistantId", + "workflowId", + "squadId", + "phoneNumberId", + "type", + "customerNumber", + "status", + "endedReason", + "forwardedPhoneNumber", + "campaignId", + ], + typing.Any, +] diff --git a/src/vapi/types/filter_string_type_column_on_call_table_operator.py b/src/vapi/types/filter_string_type_column_on_call_table_operator.py new file mode 100644 index 00000000..e12c0536 --- /dev/null +++ b/src/vapi/types/filter_string_type_column_on_call_table_operator.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FilterStringTypeColumnOnCallTableOperator = typing.Union[ + typing.Literal["=", "!=", "contains", "not_contains"], typing.Any +] diff --git a/src/vapi/types/filter_structured_output_column_on_call_table.py b/src/vapi/types/filter_structured_output_column_on_call_table.py new file mode 100644 index 00000000..914a31d2 --- /dev/null +++ b/src/vapi/types/filter_structured_output_column_on_call_table.py @@ -0,0 +1,41 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .filter_structured_output_column_on_call_table_column import FilterStructuredOutputColumnOnCallTableColumn +from .filter_structured_output_column_on_call_table_operator import FilterStructuredOutputColumnOnCallTableOperator + + +class FilterStructuredOutputColumnOnCallTable(UncheckedBaseModel): + column: FilterStructuredOutputColumnOnCallTableColumn = pydantic.Field() + """ + This is the column in the call table that will be filtered on. + Structured Output Type columns are only to filter on artifact.structuredOutputs[OutputID] column. + """ + + operator: FilterStructuredOutputColumnOnCallTableOperator = pydantic.Field() + """ + This is the operator to use for the filter. + The operator depends on the value type of the structured output. + If the structured output is a string or boolean, the operator must be "=", "!=" + If the structured output is a number, the operator must be "=", ">", "<", ">=", "<=" + If the structured output is an array, the operator must be "in" or "not_in" + """ + + value: typing.Dict[str, typing.Any] = pydantic.Field() + """ + This is the value to filter on. + The value type depends on the structured output type being filtered. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/filter_structured_output_column_on_call_table_column.py b/src/vapi/types/filter_structured_output_column_on_call_table_column.py new file mode 100644 index 00000000..90018733 --- /dev/null +++ b/src/vapi/types/filter_structured_output_column_on_call_table_column.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FilterStructuredOutputColumnOnCallTableColumn = typing.Union[ + typing.Literal["artifact.structuredOutputs[OutputID]"], typing.Any +] diff --git a/src/vapi/types/filter_structured_output_column_on_call_table_operator.py b/src/vapi/types/filter_structured_output_column_on_call_table_operator.py new file mode 100644 index 00000000..5fb0e426 --- /dev/null +++ b/src/vapi/types/filter_structured_output_column_on_call_table_operator.py @@ -0,0 +1,10 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FilterStructuredOutputColumnOnCallTableOperator = typing.Union[ + typing.Literal[ + "=", "!=", ">", "<", ">=", "<=", "in", "not_in", "contains", "not_contains", "is_empty", "is_not_empty" + ], + typing.Any, +] diff --git a/src/vapi/types/format_plan.py b/src/vapi/types/format_plan.py index 4982f87c..25374c8e 100644 --- a/src/vapi/types/format_plan.py +++ b/src/vapi/types/format_plan.py @@ -1,23 +1,23 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing + import pydantic import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .format_plan_formatters_enabled_item import FormatPlanFormattersEnabledItem from .format_plan_replacements_item import FormatPlanReplacementsItem -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -class FormatPlan(UniversalBaseModel): +class FormatPlan(UncheckedBaseModel): enabled: typing.Optional[bool] = pydantic.Field(default=None) """ This determines whether the chunk is formatted before being sent to the voice provider. This helps with enunciation. This includes phone numbers, emails and addresses. Default `true`. Usage: - - To rely on the voice provider's formatting logic, set this to `false`. - - To use ElevenLabs's `enableSsmlParsing` feature, set this to `false`. If `voice.chunkPlan.enabled` is `false`, this is automatically `false` since there's no chunk to format. @@ -25,35 +25,33 @@ class FormatPlan(UniversalBaseModel): """ number_to_digits_cutoff: typing_extensions.Annotated[ - typing.Optional[float], FieldMetadata(alias="numberToDigitsCutoff") - ] = pydantic.Field(default=None) - """ - This is the cutoff after which a number is converted to individual digits instead of being spoken as words. - - Example: - - - If cutoff 2025, "12345" is converted to "1 2 3 4 5" while "1200" is converted to "twelve hundred". - - Usage: - - - If your use case doesn't involve IDs like zip codes, set this to a high value. - - If your use case involves IDs that are shorter than 5 digits, set this to a lower value. - - @default 2025 - """ - + typing.Optional[float], + FieldMetadata(alias="numberToDigitsCutoff"), + pydantic.Field( + alias="numberToDigitsCutoff", + description='This is the cutoff after which a number is converted to individual digits instead of being spoken as words.\n\nExample:\n- If cutoff 2025, "12345" is converted to "1 2 3 4 5" while "1200" is converted to "twelve hundred".\n\nUsage:\n- If your use case doesn\'t involve IDs like zip codes, set this to a high value.\n- If your use case involves IDs that are shorter than 5 digits, set this to a lower value.\n\n@default 2025', + ), + ] = None replacements: typing.Optional[typing.List[FormatPlanReplacementsItem]] = pydantic.Field(default=None) """ These are the custom replacements you can make to the chunk before it is sent to the voice provider. Usage: - - To replace a specific word or phrase with a different word or phrase, use the `ExactReplacement` type. Eg. `{ type: 'exact', key: 'hello', value: 'hi' }` - - To replace a word or phrase that matches a pattern, use the `RegexReplacement` type. Eg. `{ type: 'regex', regex: '\\b[a-zA-Z]{5}\\b', value: 'hi' }` + - To replace a word or phrase that matches a pattern, use the `RegexReplacement` type. Eg. `{ type: 'regex', regex: '\\\\b[a-zA-Z]{5}\\\\b', value: 'hi' }` @default [] """ + formatters_enabled: typing_extensions.Annotated[ + typing.Optional[typing.List[FormatPlanFormattersEnabledItem]], + FieldMetadata(alias="formattersEnabled"), + pydantic.Field( + alias="formattersEnabled", + description="List of formatters to apply. If not provided, all default formatters will be applied.\nIf provided, only the specified formatters will be applied.\nNote: Some essential formatters like angle bracket removal will always be applied.\n@default undefined", + ), + ] = None + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/vapi/types/format_plan_formatters_enabled_item.py b/src/vapi/types/format_plan_formatters_enabled_item.py new file mode 100644 index 00000000..a69bac31 --- /dev/null +++ b/src/vapi/types/format_plan_formatters_enabled_item.py @@ -0,0 +1,26 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FormatPlanFormattersEnabledItem = typing.Union[ + typing.Literal[ + "markdown", + "asterisk", + "quote", + "dash", + "newline", + "colon", + "acronym", + "dollarAmount", + "email", + "date", + "time", + "distance", + "unit", + "percentage", + "phoneNumber", + "number", + "stripAsterisk", + ], + typing.Any, +] diff --git a/src/vapi/types/format_plan_replacements_item.py b/src/vapi/types/format_plan_replacements_item.py index 8bbc30c4..52025ec2 100644 --- a/src/vapi/types/format_plan_replacements_item.py +++ b/src/vapi/types/format_plan_replacements_item.py @@ -1,7 +1,51 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .exact_replacement import ExactReplacement -from .regex_replacement import RegexReplacement -FormatPlanReplacementsItem = typing.Union[ExactReplacement, RegexReplacement] +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .regex_option import RegexOption + + +class FormatPlanReplacementsItem_Exact(UncheckedBaseModel): + type: typing.Literal["exact"] = "exact" + replace_all_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="replaceAllEnabled"), pydantic.Field(alias="replaceAllEnabled") + ] = None + key: str + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class FormatPlanReplacementsItem_Regex(UncheckedBaseModel): + type: typing.Literal["regex"] = "regex" + regex: str + options: typing.Optional[typing.List[RegexOption]] = None + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +FormatPlanReplacementsItem = typing_extensions.Annotated[ + typing.Union[FormatPlanReplacementsItem_Exact, FormatPlanReplacementsItem_Regex], UnionMetadata(discriminant="type") +] diff --git a/src/vapi/types/fourier_denoising_plan.py b/src/vapi/types/fourier_denoising_plan.py new file mode 100644 index 00000000..96331093 --- /dev/null +++ b/src/vapi/types/fourier_denoising_plan.py @@ -0,0 +1,66 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class FourierDenoisingPlan(UncheckedBaseModel): + enabled: typing.Optional[bool] = pydantic.Field(default=None) + """ + Whether Fourier denoising is enabled. Note that this is experimental and may not work as expected. + """ + + media_detection_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="mediaDetectionEnabled"), + pydantic.Field( + alias="mediaDetectionEnabled", + description="Whether automatic media detection is enabled. When enabled, the filter will automatically\ndetect consistent background TV/music/radio and switch to more aggressive filtering settings.\nOnly applies when enabled is true.", + ), + ] = None + static_threshold: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="staticThreshold"), + pydantic.Field( + alias="staticThreshold", + description="Static threshold in dB used as fallback when no baseline is established.", + ), + ] = None + baseline_offset_db: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="baselineOffsetDb"), + pydantic.Field( + alias="baselineOffsetDb", + description="How far below the rolling baseline to filter audio, in dB.\nLower values (e.g., -10) are more aggressive, higher values (e.g., -20) are more conservative.", + ), + ] = None + window_size_ms: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="windowSizeMs"), + pydantic.Field( + alias="windowSizeMs", + description="Rolling window size in milliseconds for calculating the audio baseline.\nLarger windows adapt more slowly but are more stable.", + ), + ] = None + baseline_percentile: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="baselinePercentile"), + pydantic.Field( + alias="baselinePercentile", + description="Percentile to use for baseline calculation (1-99).\nHigher percentiles (e.g., 85) focus on louder speech, lower percentiles (e.g., 50) include quieter speech.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/function_call.py b/src/vapi/types/function_call.py new file mode 100644 index 00000000..dd47d848 --- /dev/null +++ b/src/vapi/types/function_call.py @@ -0,0 +1,28 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class FunctionCall(UncheckedBaseModel): + arguments: str = pydantic.Field() + """ + This is the arguments to call the function with + """ + + name: str = pydantic.Field() + """ + This is the name of the function to call + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/function_call_assistant_hook_action.py b/src/vapi/types/function_call_assistant_hook_action.py new file mode 100644 index 00000000..d1064265 --- /dev/null +++ b/src/vapi/types/function_call_assistant_hook_action.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FunctionCallAssistantHookAction = typing.Any diff --git a/src/vapi/types/function_call_hook_action.py b/src/vapi/types/function_call_hook_action.py new file mode 100644 index 00000000..fd8222c7 --- /dev/null +++ b/src/vapi/types/function_call_hook_action.py @@ -0,0 +1,88 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .function_call_hook_action_messages_item import FunctionCallHookActionMessagesItem +from .function_call_hook_action_type import FunctionCallHookActionType +from .open_ai_function import OpenAiFunction +from .server import Server +from .tool_parameter import ToolParameter +from .tool_rejection_plan import ToolRejectionPlan +from .variable_extraction_plan import VariableExtractionPlan + + +class FunctionCallHookAction(UncheckedBaseModel): + messages: typing.Optional[typing.List[FunctionCallHookActionMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + type: FunctionCallHookActionType = pydantic.Field() + """ + The type of tool. "function" for Function tool. + """ + + async_: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="async"), + pydantic.Field( + alias="async", + description="This determines if the tool is async.\n\n If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.\n\n If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.\n\n Defaults to synchronous (`false`).", + ), + ] = None + server: typing.Optional[Server] = pydantic.Field(default=None) + """ + + This is the server where a `tool-calls` webhook will be sent. + + Notes: + - Webhook is sent to this server when a tool call is made. + - Webhook contains the call, assistant, and phone number objects. + - Webhook contains the variables set on the assistant. + - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}. + - Webhook expects a response with tool call result. + """ + + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan", description="Plan to extract variables from the tool response"), + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = pydantic.Field(default=None) + """ + Static key-value pairs merged into the request body. Values support Liquid templates. + """ + + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + function: typing.Optional[OpenAiFunction] = pydantic.Field(default=None) + """ + This is the function definition of the tool. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(FunctionCallHookAction) diff --git a/src/vapi/types/function_call_hook_action_messages_item.py b/src/vapi/types/function_call_hook_action_messages_item.py new file mode 100644 index 00000000..6368722d --- /dev/null +++ b/src/vapi/types/function_call_hook_action_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class FunctionCallHookActionMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class FunctionCallHookActionMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class FunctionCallHookActionMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class FunctionCallHookActionMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +FunctionCallHookActionMessagesItem = typing_extensions.Annotated[ + typing.Union[ + FunctionCallHookActionMessagesItem_RequestStart, + FunctionCallHookActionMessagesItem_RequestComplete, + FunctionCallHookActionMessagesItem_RequestFailed, + FunctionCallHookActionMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/function_call_hook_action_type.py b/src/vapi/types/function_call_hook_action_type.py new file mode 100644 index 00000000..ed5db82e --- /dev/null +++ b/src/vapi/types/function_call_hook_action_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FunctionCallHookActionType = typing.Union[typing.Literal["function"], typing.Any] diff --git a/src/vapi/types/function_tool.py b/src/vapi/types/function_tool.py index f46b8cdb..b80d9f39 100644 --- a/src/vapi/types/function_tool.py +++ b/src/vapi/types/function_tool.py @@ -1,31 +1,24 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions +from __future__ import annotations + +import datetime as dt import typing -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel from .function_tool_messages_item import FunctionToolMessagesItem -import datetime as dt from .open_ai_function import OpenAiFunction from .server import Server -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from .tool_parameter import ToolParameter +from .tool_rejection_plan import ToolRejectionPlan +from .variable_extraction_plan import VariableExtractionPlan -class FunctionTool(UniversalBaseModel): - async_: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="async")] = pydantic.Field( - default=None - ) - """ - This determines if the tool is async. - - If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server. - - If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server. - - Defaults to synchronous (`false`). - """ - +class FunctionTool(UncheckedBaseModel): messages: typing.Optional[typing.List[FunctionToolMessagesItem]] = pydantic.Field(default=None) """ These are the messages that will be spoken to the user as the tool is running. @@ -33,43 +26,74 @@ class FunctionTool(UniversalBaseModel): For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. """ - type: typing.Literal["function"] = "function" - id: str = pydantic.Field() - """ - This is the unique identifier for the tool. - """ - - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field() + async_: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="async"), + pydantic.Field( + alias="async", + description="This determines if the tool is async.\n\n If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.\n\n If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.\n\n Defaults to synchronous (`false`).", + ), + ] = None + server: typing.Optional[Server] = pydantic.Field(default=None) """ - This is the unique identifier for the organization that this tool belongs to. + + This is the server where a `tool-calls` webhook will be sent. + + Notes: + - Webhook is sent to this server when a tool call is made. + - Webhook contains the call, assistant, and phone number objects. + - Webhook contains the variables set on the assistant. + - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}. + - Webhook expects a response with tool call result. """ - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan", description="Plan to extract variables from the tool response"), + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = pydantic.Field(default=None) """ - This is the ISO 8601 date-time string of when the tool was created. + Static key-value pairs merged into the request body. Values support Liquid templates. """ - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() + id: str = pydantic.Field() """ - This is the ISO 8601 date-time string of when the tool was last updated. + This is the unique identifier for the tool. """ + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the organization that this tool belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the tool was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", description="This is the ISO 8601 date-time string of when the tool was last updated." + ), + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None function: typing.Optional[OpenAiFunction] = pydantic.Field(default=None) """ This is the function definition of the tool. - - For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on tool-specific fields like `tool.destinations`. But, even in those cases, you can provide a custom function definition for advanced use cases. - - An example of an advanced use case is if you want to customize the message that's spoken for `endCall` tool. You can specify a function where it returns an argument "reason". Then, in `messages` array, you can have many "request-complete" messages. One of these messages will be triggered if the `messages[].conditions` matches the "reason" argument. - """ - - server: typing.Optional[Server] = pydantic.Field(default=None) - """ - This is the server that will be hit when this tool is requested by the model. - - All requests will be sent with the call object among other things. You can find more details in the Server URL documentation. - - This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: highest tool.server.url, then assistant.serverUrl, then phoneNumber.serverUrl, then org.serverUrl. """ if IS_PYDANTIC_V2: @@ -80,3 +104,6 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +update_forward_refs(FunctionTool) diff --git a/src/vapi/types/function_tool_messages_item.py b/src/vapi/types/function_tool_messages_item.py index 8955392e..7bbcc18b 100644 --- a/src/vapi/types/function_tool_messages_item.py +++ b/src/vapi/types/function_tool_messages_item.py @@ -1,9 +1,104 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .tool_message_start import ToolMessageStart -from .tool_message_complete import ToolMessageComplete -from .tool_message_failed import ToolMessageFailed -from .tool_message_delayed import ToolMessageDelayed -FunctionToolMessagesItem = typing.Union[ToolMessageStart, ToolMessageComplete, ToolMessageFailed, ToolMessageDelayed] +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class FunctionToolMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class FunctionToolMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class FunctionToolMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class FunctionToolMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +FunctionToolMessagesItem = typing_extensions.Annotated[ + typing.Union[ + FunctionToolMessagesItem_RequestStart, + FunctionToolMessagesItem_RequestComplete, + FunctionToolMessagesItem_RequestFailed, + FunctionToolMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/function_tool_provider_details.py b/src/vapi/types/function_tool_provider_details.py index f7d98447..6d406868 100644 --- a/src/vapi/types/function_tool_provider_details.py +++ b/src/vapi/types/function_tool_provider_details.py @@ -1,29 +1,29 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions import typing -from ..core.serialization import FieldMetadata + import pydantic -from .tool_template_setup import ToolTemplateSetup +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .tool_template_setup import ToolTemplateSetup -class FunctionToolProviderDetails(UniversalBaseModel): - template_url: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="templateUrl")] = ( - pydantic.Field(default=None) - ) - """ - This is the Template URL or the Snapshot URL corresponding to the Template. - """ - +class FunctionToolProviderDetails(UncheckedBaseModel): + template_url: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="templateUrl"), + pydantic.Field( + alias="templateUrl", + description="This is the Template URL or the Snapshot URL corresponding to the Template.", + ), + ] = None setup_instructions: typing_extensions.Annotated[ - typing.Optional[typing.List[ToolTemplateSetup]], FieldMetadata(alias="setupInstructions") + typing.Optional[typing.List[ToolTemplateSetup]], + FieldMetadata(alias="setupInstructions"), + pydantic.Field(alias="setupInstructions"), ] = None - type: typing.Literal["function"] = pydantic.Field(default="function") - """ - The type of tool. "function" for Function tool. - """ if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/function_tool_with_tool_call.py b/src/vapi/types/function_tool_with_tool_call.py index 58158f85..cdda4cac 100644 --- a/src/vapi/types/function_tool_with_tool_call.py +++ b/src/vapi/types/function_tool_with_tool_call.py @@ -1,61 +1,76 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions +from __future__ import annotations + import typing -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel from .function_tool_with_tool_call_messages_item import FunctionToolWithToolCallMessagesItem -from .tool_call import ToolCall from .open_ai_function import OpenAiFunction from .server import Server -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from .tool_call import ToolCall +from .tool_parameter import ToolParameter +from .tool_rejection_plan import ToolRejectionPlan +from .variable_extraction_plan import VariableExtractionPlan -class FunctionToolWithToolCall(UniversalBaseModel): - async_: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="async")] = pydantic.Field( - default=None - ) +class FunctionToolWithToolCall(UncheckedBaseModel): + messages: typing.Optional[typing.List[FunctionToolWithToolCallMessagesItem]] = pydantic.Field(default=None) """ - This determines if the tool is async. - - If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server. - - If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server. + These are the messages that will be spoken to the user as the tool is running. - Defaults to synchronous (`false`). + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. """ - messages: typing.Optional[typing.List[FunctionToolWithToolCallMessagesItem]] = pydantic.Field(default=None) + async_: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="async"), + pydantic.Field( + alias="async", + description="This determines if the tool is async.\n\n If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.\n\n If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.\n\n Defaults to synchronous (`false`).", + ), + ] = None + server: typing.Optional[Server] = pydantic.Field(default=None) """ - These are the messages that will be spoken to the user as the tool is running. - For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + This is the server where a `tool-calls` webhook will be sent. + + Notes: + - Webhook is sent to this server when a tool call is made. + - Webhook contains the call, assistant, and phone number objects. + - Webhook contains the variables set on the assistant. + - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}. + - Webhook expects a response with tool call result. """ - type: typing.Literal["function"] = pydantic.Field(default="function") + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan", description="Plan to extract variables from the tool response"), + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = pydantic.Field(default=None) """ - The type of tool. "function" for Function tool. + Static key-value pairs merged into the request body. Values support Liquid templates. """ - tool_call: typing_extensions.Annotated[ToolCall, FieldMetadata(alias="toolCall")] + tool_call: typing_extensions.Annotated[ToolCall, FieldMetadata(alias="toolCall"), pydantic.Field(alias="toolCall")] function: typing.Optional[OpenAiFunction] = pydantic.Field(default=None) """ This is the function definition of the tool. - - For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on tool-specific fields like `tool.destinations`. But, even in those cases, you can provide a custom function definition for advanced use cases. - - An example of an advanced use case is if you want to customize the message that's spoken for `endCall` tool. You can specify a function where it returns an argument "reason". Then, in `messages` array, you can have many "request-complete" messages. One of these messages will be triggered if the `messages[].conditions` matches the "reason" argument. """ - server: typing.Optional[Server] = pydantic.Field(default=None) - """ - This is the server that will be hit when this tool is requested by the model. - - All requests will be sent with the call object among other things. You can find more details in the Server URL documentation. - - This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: highest tool.server.url, then assistant.serverUrl, then phoneNumber.serverUrl, then org.serverUrl. - """ + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -65,3 +80,6 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +update_forward_refs(FunctionToolWithToolCall) diff --git a/src/vapi/types/function_tool_with_tool_call_messages_item.py b/src/vapi/types/function_tool_with_tool_call_messages_item.py index ee2d318e..55fa781e 100644 --- a/src/vapi/types/function_tool_with_tool_call_messages_item.py +++ b/src/vapi/types/function_tool_with_tool_call_messages_item.py @@ -1,11 +1,104 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .tool_message_start import ToolMessageStart -from .tool_message_complete import ToolMessageComplete -from .tool_message_failed import ToolMessageFailed -from .tool_message_delayed import ToolMessageDelayed -FunctionToolWithToolCallMessagesItem = typing.Union[ - ToolMessageStart, ToolMessageComplete, ToolMessageFailed, ToolMessageDelayed +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class FunctionToolWithToolCallMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class FunctionToolWithToolCallMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class FunctionToolWithToolCallMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class FunctionToolWithToolCallMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +FunctionToolWithToolCallMessagesItem = typing_extensions.Annotated[ + typing.Union[ + FunctionToolWithToolCallMessagesItem_RequestStart, + FunctionToolWithToolCallMessagesItem_RequestComplete, + FunctionToolWithToolCallMessagesItem_RequestFailed, + FunctionToolWithToolCallMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), ] diff --git a/src/vapi/types/gcp_credential.py b/src/vapi/types/gcp_credential.py index d203a071..cbdf46ca 100644 --- a/src/vapi/types/gcp_credential.py +++ b/src/vapi/types/gcp_credential.py @@ -1,56 +1,76 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +import datetime as dt import typing + import pydantic import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.serialization import FieldMetadata -import datetime as dt -from .gcp_key import GcpKey +from ..core.unchecked_base_model import UncheckedBaseModel from .bucket_plan import BucketPlan -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from .gcp_credential_provider import GcpCredentialProvider +from .gcp_key import GcpKey -class GcpCredential(UniversalBaseModel): - provider: typing.Literal["gcp"] = "gcp" +class GcpCredential(UncheckedBaseModel): + provider: GcpCredentialProvider + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="fallbackIndex"), + pydantic.Field( + alias="fallbackIndex", + description="This is the order in which this storage provider is tried during upload retries. Lower numbers are tried first in increasing order.", + ), + ] = None id: str = pydantic.Field() """ This is the unique identifier for the credential. """ - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field() - """ - This is the unique identifier for the org that this credential belongs to. - """ - - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the credential was created. - """ - - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the assistant was last updated. - """ - + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] name: typing.Optional[str] = pydantic.Field(default=None) """ - This is the name of the GCP credential. This is just for your reference. + This is the name of credential. This is just for your reference. """ - gcp_key: typing_extensions.Annotated[GcpKey, FieldMetadata(alias="gcpKey")] = pydantic.Field() + gcp_key: typing_extensions.Annotated[ + GcpKey, + FieldMetadata(alias="gcpKey"), + pydantic.Field( + alias="gcpKey", + description="This is the GCP key. This is the JSON that can be generated in the Google Cloud Console at https://console.cloud.google.com/iam-admin/serviceaccounts/details//keys.\n\nThe schema is identical to the JSON that GCP outputs.", + ), + ] + region: typing.Optional[str] = pydantic.Field(default=None) """ - This is the GCP key. This is the JSON that can be generated in the Google Cloud Console at https://console.cloud.google.com/iam-admin/serviceaccounts/details//keys. - - The schema is identical to the JSON that GCP outputs. + This is the region of the GCP resource. """ - bucket_plan: typing_extensions.Annotated[typing.Optional[BucketPlan], FieldMetadata(alias="bucketPlan")] = ( - pydantic.Field(default=None) - ) - """ - This is the bucket plan that can be provided to store call artifacts in GCP. - """ + bucket_plan: typing_extensions.Annotated[ + typing.Optional[BucketPlan], FieldMetadata(alias="bucketPlan"), pydantic.Field(alias="bucketPlan") + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/gcp_credential_provider.py b/src/vapi/types/gcp_credential_provider.py new file mode 100644 index 00000000..cb6f19c9 --- /dev/null +++ b/src/vapi/types/gcp_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +GcpCredentialProvider = typing.Union[typing.Literal["gcp"], typing.Any] diff --git a/src/vapi/types/gcp_key.py b/src/vapi/types/gcp_key.py index e8960014..13f4043e 100644 --- a/src/vapi/types/gcp_key.py +++ b/src/vapi/types/gcp_key.py @@ -1,72 +1,85 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +import typing + import pydantic import typing_extensions -from ..core.serialization import FieldMetadata from ..core.pydantic_utilities import IS_PYDANTIC_V2 -import typing +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class GcpKey(UniversalBaseModel): +class GcpKey(UncheckedBaseModel): type: str = pydantic.Field() """ This is the type of the key. Most likely, this is "service_account". """ - project_id: typing_extensions.Annotated[str, FieldMetadata(alias="projectId")] = pydantic.Field() - """ - This is the ID of the Google Cloud project associated with this key. - """ - - private_key_id: typing_extensions.Annotated[str, FieldMetadata(alias="privateKeyId")] = pydantic.Field() - """ - This is the unique identifier for the private key. - """ - - private_key: typing_extensions.Annotated[str, FieldMetadata(alias="privateKey")] = pydantic.Field() - """ - This is the private key in PEM format. - - Note: This is not returned in the API. - """ - - client_email: typing_extensions.Annotated[str, FieldMetadata(alias="clientEmail")] = pydantic.Field() - """ - This is the email address associated with the service account. - """ - - client_id: typing_extensions.Annotated[str, FieldMetadata(alias="clientId")] = pydantic.Field() - """ - This is the unique identifier for the client. - """ - - auth_uri: typing_extensions.Annotated[str, FieldMetadata(alias="authUri")] = pydantic.Field() - """ - This is the URI for the auth provider's authorization endpoint. - """ - - token_uri: typing_extensions.Annotated[str, FieldMetadata(alias="tokenUri")] = pydantic.Field() - """ - This is the URI for the auth provider's token endpoint. - """ - - auth_provider_x_509_cert_url: typing_extensions.Annotated[str, FieldMetadata(alias="authProviderX509CertUrl")] = ( - pydantic.Field() - ) - """ - This is the URL of the public x509 certificate for the auth provider. - """ - - client_x_509_cert_url: typing_extensions.Annotated[str, FieldMetadata(alias="clientX509CertUrl")] = pydantic.Field() - """ - This is the URL of the public x509 certificate for the client. - """ - - universe_domain: typing_extensions.Annotated[str, FieldMetadata(alias="universeDomain")] = pydantic.Field() - """ - This is the domain associated with the universe this service account belongs to. - """ + project_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="projectId"), + pydantic.Field( + alias="projectId", description="This is the ID of the Google Cloud project associated with this key." + ), + ] + private_key_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="privateKeyId"), + pydantic.Field(alias="privateKeyId", description="This is the unique identifier for the private key."), + ] + private_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="privateKey"), + pydantic.Field( + alias="privateKey", + description="This is the private key in PEM format.\n\nNote: This is not returned in the API.", + ), + ] + client_email: typing_extensions.Annotated[ + str, + FieldMetadata(alias="clientEmail"), + pydantic.Field( + alias="clientEmail", description="This is the email address associated with the service account." + ), + ] + client_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="clientId"), + pydantic.Field(alias="clientId", description="This is the unique identifier for the client."), + ] + auth_uri: typing_extensions.Annotated[ + str, + FieldMetadata(alias="authUri"), + pydantic.Field(alias="authUri", description="This is the URI for the auth provider's authorization endpoint."), + ] + token_uri: typing_extensions.Annotated[ + str, + FieldMetadata(alias="tokenUri"), + pydantic.Field(alias="tokenUri", description="This is the URI for the auth provider's token endpoint."), + ] + auth_provider_x_509_cert_url: typing_extensions.Annotated[ + str, + FieldMetadata(alias="authProviderX509CertUrl"), + pydantic.Field( + alias="authProviderX509CertUrl", + description="This is the URL of the public x509 certificate for the auth provider.", + ), + ] + client_x_509_cert_url: typing_extensions.Annotated[ + str, + FieldMetadata(alias="clientX509CertUrl"), + pydantic.Field( + alias="clientX509CertUrl", description="This is the URL of the public x509 certificate for the client." + ), + ] + universe_domain: typing_extensions.Annotated[ + str, + FieldMetadata(alias="universeDomain"), + pydantic.Field( + alias="universeDomain", + description="This is the domain associated with the universe this service account belongs to.", + ), + ] if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/gemini_multimodal_live_prebuilt_voice_config.py b/src/vapi/types/gemini_multimodal_live_prebuilt_voice_config.py new file mode 100644 index 00000000..236a71ae --- /dev/null +++ b/src/vapi/types/gemini_multimodal_live_prebuilt_voice_config.py @@ -0,0 +1,27 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .gemini_multimodal_live_prebuilt_voice_config_voice_name import GeminiMultimodalLivePrebuiltVoiceConfigVoiceName + + +class GeminiMultimodalLivePrebuiltVoiceConfig(UncheckedBaseModel): + voice_name: typing_extensions.Annotated[ + GeminiMultimodalLivePrebuiltVoiceConfigVoiceName, + FieldMetadata(alias="voiceName"), + pydantic.Field(alias="voiceName"), + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/gemini_multimodal_live_prebuilt_voice_config_voice_name.py b/src/vapi/types/gemini_multimodal_live_prebuilt_voice_config_voice_name.py new file mode 100644 index 00000000..61eed3e7 --- /dev/null +++ b/src/vapi/types/gemini_multimodal_live_prebuilt_voice_config_voice_name.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +GeminiMultimodalLivePrebuiltVoiceConfigVoiceName = typing.Union[ + typing.Literal["Puck", "Charon", "Kore", "Fenrir", "Aoede"], typing.Any +] diff --git a/src/vapi/types/gemini_multimodal_live_speech_config.py b/src/vapi/types/gemini_multimodal_live_speech_config.py new file mode 100644 index 00000000..3cfbc912 --- /dev/null +++ b/src/vapi/types/gemini_multimodal_live_speech_config.py @@ -0,0 +1,25 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .gemini_multimodal_live_voice_config import GeminiMultimodalLiveVoiceConfig + + +class GeminiMultimodalLiveSpeechConfig(UncheckedBaseModel): + voice_config: typing_extensions.Annotated[ + GeminiMultimodalLiveVoiceConfig, FieldMetadata(alias="voiceConfig"), pydantic.Field(alias="voiceConfig") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/gemini_multimodal_live_voice_config.py b/src/vapi/types/gemini_multimodal_live_voice_config.py new file mode 100644 index 00000000..44a28f07 --- /dev/null +++ b/src/vapi/types/gemini_multimodal_live_voice_config.py @@ -0,0 +1,27 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .gemini_multimodal_live_prebuilt_voice_config import GeminiMultimodalLivePrebuiltVoiceConfig + + +class GeminiMultimodalLiveVoiceConfig(UncheckedBaseModel): + prebuilt_voice_config: typing_extensions.Annotated[ + GeminiMultimodalLivePrebuiltVoiceConfig, + FieldMetadata(alias="prebuiltVoiceConfig"), + pydantic.Field(alias="prebuiltVoiceConfig"), + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/generate_scenarios_dto.py b/src/vapi/types/generate_scenarios_dto.py new file mode 100644 index 00000000..9c148830 --- /dev/null +++ b/src/vapi/types/generate_scenarios_dto.py @@ -0,0 +1,31 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class GenerateScenariosDto(UncheckedBaseModel): + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assistantId"), + pydantic.Field(alias="assistantId", description="ID of the assistant to generate scenarios for"), + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="squadId"), + pydantic.Field(alias="squadId", description="ID of the squad to generate scenarios for"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/generate_scenarios_response.py b/src/vapi/types/generate_scenarios_response.py new file mode 100644 index 00000000..23226201 --- /dev/null +++ b/src/vapi/types/generate_scenarios_response.py @@ -0,0 +1,32 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .generated_scenario import GeneratedScenario + + +class GenerateScenariosResponse(UncheckedBaseModel): + scenarios: typing.List[GeneratedScenario] = pydantic.Field() + """ + Generated scenarios + """ + + coverage_notes: typing_extensions.Annotated[ + str, + FieldMetadata(alias="coverageNotes"), + pydantic.Field(alias="coverageNotes", description="Summary of test coverage"), + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/generated_scenario.py b/src/vapi/types/generated_scenario.py new file mode 100644 index 00000000..f78530b0 --- /dev/null +++ b/src/vapi/types/generated_scenario.py @@ -0,0 +1,39 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .generated_scenario_category import GeneratedScenarioCategory + + +class GeneratedScenario(UncheckedBaseModel): + name: str = pydantic.Field() + """ + Short descriptive name + """ + + instructions: str = pydantic.Field() + """ + Instructions for the tester + """ + + category: GeneratedScenarioCategory = pydantic.Field() + """ + Scenario category + """ + + reasoning: str = pydantic.Field() + """ + Why this scenario is valuable + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/generated_scenario_category.py b/src/vapi/types/generated_scenario_category.py new file mode 100644 index 00000000..6fbf55d2 --- /dev/null +++ b/src/vapi/types/generated_scenario_category.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +GeneratedScenarioCategory = typing.Union[typing.Literal["happy_path", "edge_case", "failure_mode"], typing.Any] diff --git a/src/vapi/types/get_chat_paginated_dto.py b/src/vapi/types/get_chat_paginated_dto.py new file mode 100644 index 00000000..ef76e9e4 --- /dev/null +++ b/src/vapi/types/get_chat_paginated_dto.py @@ -0,0 +1,144 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .get_chat_paginated_dto_sort_order import GetChatPaginatedDtoSortOrder + + +class GetChatPaginatedDto(UncheckedBaseModel): + id: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the unique identifier for the chat to filter by. + """ + + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assistantId"), + pydantic.Field( + alias="assistantId", + description="This is the unique identifier for the assistant that will be used for the chat.", + ), + ] = None + assistant_id_any: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assistantIdAny"), + pydantic.Field( + alias="assistantIdAny", description="Filter by multiple assistant IDs. Provide as comma-separated values." + ), + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="squadId"), + pydantic.Field( + alias="squadId", description="This is the unique identifier for the squad that will be used for the chat." + ), + ] = None + session_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="sessionId"), + pydantic.Field( + alias="sessionId", + description="This is the unique identifier for the session that will be used for the chat.", + ), + ] = None + previous_chat_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="previousChatId"), + pydantic.Field( + alias="previousChatId", description="This is the unique identifier for the previous chat to filter by." + ), + ] = None + page: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the page number to return. Defaults to 1. + """ + + sort_order: typing_extensions.Annotated[ + typing.Optional[GetChatPaginatedDtoSortOrder], + FieldMetadata(alias="sortOrder"), + pydantic.Field(alias="sortOrder", description="This is the sort order for pagination. Defaults to 'DESC'."), + ] = None + limit: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the maximum number of items to return. Defaults to 100. + """ + + created_at_gt: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="createdAtGt"), + pydantic.Field( + alias="createdAtGt", + description="This will return items where the createdAt is greater than the specified value.", + ), + ] = None + created_at_lt: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="createdAtLt"), + pydantic.Field( + alias="createdAtLt", + description="This will return items where the createdAt is less than the specified value.", + ), + ] = None + created_at_ge: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="createdAtGe"), + pydantic.Field( + alias="createdAtGe", + description="This will return items where the createdAt is greater than or equal to the specified value.", + ), + ] = None + created_at_le: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="createdAtLe"), + pydantic.Field( + alias="createdAtLe", + description="This will return items where the createdAt is less than or equal to the specified value.", + ), + ] = None + updated_at_gt: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="updatedAtGt"), + pydantic.Field( + alias="updatedAtGt", + description="This will return items where the updatedAt is greater than the specified value.", + ), + ] = None + updated_at_lt: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="updatedAtLt"), + pydantic.Field( + alias="updatedAtLt", + description="This will return items where the updatedAt is less than the specified value.", + ), + ] = None + updated_at_ge: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="updatedAtGe"), + pydantic.Field( + alias="updatedAtGe", + description="This will return items where the updatedAt is greater than or equal to the specified value.", + ), + ] = None + updated_at_le: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="updatedAtLe"), + pydantic.Field( + alias="updatedAtLe", + description="This will return items where the updatedAt is less than or equal to the specified value.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/get_chat_paginated_dto_sort_order.py b/src/vapi/types/get_chat_paginated_dto_sort_order.py new file mode 100644 index 00000000..84aa1f66 --- /dev/null +++ b/src/vapi/types/get_chat_paginated_dto_sort_order.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +GetChatPaginatedDtoSortOrder = typing.Union[typing.Literal["ASC", "DESC"], typing.Any] diff --git a/src/vapi/types/get_eval_paginated_dto.py b/src/vapi/types/get_eval_paginated_dto.py new file mode 100644 index 00000000..db48ac22 --- /dev/null +++ b/src/vapi/types/get_eval_paginated_dto.py @@ -0,0 +1,103 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .get_eval_paginated_dto_sort_order import GetEvalPaginatedDtoSortOrder + + +class GetEvalPaginatedDto(UncheckedBaseModel): + id: typing.Optional[str] = None + page: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the page number to return. Defaults to 1. + """ + + sort_order: typing_extensions.Annotated[ + typing.Optional[GetEvalPaginatedDtoSortOrder], + FieldMetadata(alias="sortOrder"), + pydantic.Field(alias="sortOrder", description="This is the sort order for pagination. Defaults to 'DESC'."), + ] = None + limit: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the maximum number of items to return. Defaults to 100. + """ + + created_at_gt: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="createdAtGt"), + pydantic.Field( + alias="createdAtGt", + description="This will return items where the createdAt is greater than the specified value.", + ), + ] = None + created_at_lt: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="createdAtLt"), + pydantic.Field( + alias="createdAtLt", + description="This will return items where the createdAt is less than the specified value.", + ), + ] = None + created_at_ge: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="createdAtGe"), + pydantic.Field( + alias="createdAtGe", + description="This will return items where the createdAt is greater than or equal to the specified value.", + ), + ] = None + created_at_le: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="createdAtLe"), + pydantic.Field( + alias="createdAtLe", + description="This will return items where the createdAt is less than or equal to the specified value.", + ), + ] = None + updated_at_gt: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="updatedAtGt"), + pydantic.Field( + alias="updatedAtGt", + description="This will return items where the updatedAt is greater than the specified value.", + ), + ] = None + updated_at_lt: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="updatedAtLt"), + pydantic.Field( + alias="updatedAtLt", + description="This will return items where the updatedAt is less than the specified value.", + ), + ] = None + updated_at_ge: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="updatedAtGe"), + pydantic.Field( + alias="updatedAtGe", + description="This will return items where the updatedAt is greater than or equal to the specified value.", + ), + ] = None + updated_at_le: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="updatedAtLe"), + pydantic.Field( + alias="updatedAtLe", + description="This will return items where the updatedAt is less than or equal to the specified value.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/get_eval_paginated_dto_sort_order.py b/src/vapi/types/get_eval_paginated_dto_sort_order.py new file mode 100644 index 00000000..27d82028 --- /dev/null +++ b/src/vapi/types/get_eval_paginated_dto_sort_order.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +GetEvalPaginatedDtoSortOrder = typing.Union[typing.Literal["ASC", "DESC"], typing.Any] diff --git a/src/vapi/types/get_eval_run_paginated_dto.py b/src/vapi/types/get_eval_run_paginated_dto.py new file mode 100644 index 00000000..5839ce34 --- /dev/null +++ b/src/vapi/types/get_eval_run_paginated_dto.py @@ -0,0 +1,103 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .get_eval_run_paginated_dto_sort_order import GetEvalRunPaginatedDtoSortOrder + + +class GetEvalRunPaginatedDto(UncheckedBaseModel): + id: typing.Optional[str] = None + page: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the page number to return. Defaults to 1. + """ + + sort_order: typing_extensions.Annotated[ + typing.Optional[GetEvalRunPaginatedDtoSortOrder], + FieldMetadata(alias="sortOrder"), + pydantic.Field(alias="sortOrder", description="This is the sort order for pagination. Defaults to 'DESC'."), + ] = None + limit: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the maximum number of items to return. Defaults to 100. + """ + + created_at_gt: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="createdAtGt"), + pydantic.Field( + alias="createdAtGt", + description="This will return items where the createdAt is greater than the specified value.", + ), + ] = None + created_at_lt: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="createdAtLt"), + pydantic.Field( + alias="createdAtLt", + description="This will return items where the createdAt is less than the specified value.", + ), + ] = None + created_at_ge: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="createdAtGe"), + pydantic.Field( + alias="createdAtGe", + description="This will return items where the createdAt is greater than or equal to the specified value.", + ), + ] = None + created_at_le: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="createdAtLe"), + pydantic.Field( + alias="createdAtLe", + description="This will return items where the createdAt is less than or equal to the specified value.", + ), + ] = None + updated_at_gt: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="updatedAtGt"), + pydantic.Field( + alias="updatedAtGt", + description="This will return items where the updatedAt is greater than the specified value.", + ), + ] = None + updated_at_lt: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="updatedAtLt"), + pydantic.Field( + alias="updatedAtLt", + description="This will return items where the updatedAt is less than the specified value.", + ), + ] = None + updated_at_ge: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="updatedAtGe"), + pydantic.Field( + alias="updatedAtGe", + description="This will return items where the updatedAt is greater than or equal to the specified value.", + ), + ] = None + updated_at_le: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="updatedAtLe"), + pydantic.Field( + alias="updatedAtLe", + description="This will return items where the updatedAt is less than or equal to the specified value.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/get_eval_run_paginated_dto_sort_order.py b/src/vapi/types/get_eval_run_paginated_dto_sort_order.py new file mode 100644 index 00000000..88b19b56 --- /dev/null +++ b/src/vapi/types/get_eval_run_paginated_dto_sort_order.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +GetEvalRunPaginatedDtoSortOrder = typing.Union[typing.Literal["ASC", "DESC"], typing.Any] diff --git a/src/vapi/types/get_session_paginated_dto.py b/src/vapi/types/get_session_paginated_dto.py new file mode 100644 index 00000000..a11683dc --- /dev/null +++ b/src/vapi/types/get_session_paginated_dto.py @@ -0,0 +1,167 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_customer_dto import CreateCustomerDto +from .get_session_paginated_dto_sort_order import GetSessionPaginatedDtoSortOrder + + +class GetSessionPaginatedDto(UncheckedBaseModel): + id: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the unique identifier for the session to filter by. + """ + + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the session to filter by. + """ + + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assistantId"), + pydantic.Field(alias="assistantId", description="This is the ID of the assistant to filter sessions by."), + ] = None + assistant_id_any: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assistantIdAny"), + pydantic.Field( + alias="assistantIdAny", description="Filter by multiple assistant IDs. Provide as comma-separated values." + ), + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="squadId"), + pydantic.Field(alias="squadId", description="This is the ID of the squad to filter sessions by."), + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="workflowId"), + pydantic.Field(alias="workflowId", description="This is the ID of the workflow to filter sessions by."), + ] = None + customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) + """ + This is the customer information to filter by. + """ + + customer_number_any: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="customerNumberAny"), + pydantic.Field( + alias="customerNumberAny", + description="Filter by any of the specified customer phone numbers (comma-separated).", + ), + ] = None + phone_number_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="phoneNumberId"), + pydantic.Field( + alias="phoneNumberId", description="This will return sessions with the specified phoneNumberId." + ), + ] = None + phone_number_id_any: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="phoneNumberIdAny"), + pydantic.Field( + alias="phoneNumberIdAny", description="This will return sessions with any of the specified phoneNumberIds." + ), + ] = None + page: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the page number to return. Defaults to 1. + """ + + sort_order: typing_extensions.Annotated[ + typing.Optional[GetSessionPaginatedDtoSortOrder], + FieldMetadata(alias="sortOrder"), + pydantic.Field(alias="sortOrder", description="This is the sort order for pagination. Defaults to 'DESC'."), + ] = None + limit: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the maximum number of items to return. Defaults to 100. + """ + + created_at_gt: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="createdAtGt"), + pydantic.Field( + alias="createdAtGt", + description="This will return items where the createdAt is greater than the specified value.", + ), + ] = None + created_at_lt: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="createdAtLt"), + pydantic.Field( + alias="createdAtLt", + description="This will return items where the createdAt is less than the specified value.", + ), + ] = None + created_at_ge: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="createdAtGe"), + pydantic.Field( + alias="createdAtGe", + description="This will return items where the createdAt is greater than or equal to the specified value.", + ), + ] = None + created_at_le: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="createdAtLe"), + pydantic.Field( + alias="createdAtLe", + description="This will return items where the createdAt is less than or equal to the specified value.", + ), + ] = None + updated_at_gt: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="updatedAtGt"), + pydantic.Field( + alias="updatedAtGt", + description="This will return items where the updatedAt is greater than the specified value.", + ), + ] = None + updated_at_lt: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="updatedAtLt"), + pydantic.Field( + alias="updatedAtLt", + description="This will return items where the updatedAt is less than the specified value.", + ), + ] = None + updated_at_ge: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="updatedAtGe"), + pydantic.Field( + alias="updatedAtGe", + description="This will return items where the updatedAt is greater than or equal to the specified value.", + ), + ] = None + updated_at_le: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="updatedAtLe"), + pydantic.Field( + alias="updatedAtLe", + description="This will return items where the updatedAt is less than or equal to the specified value.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(GetSessionPaginatedDto) diff --git a/src/vapi/types/get_session_paginated_dto_sort_order.py b/src/vapi/types/get_session_paginated_dto_sort_order.py new file mode 100644 index 00000000..6d872aea --- /dev/null +++ b/src/vapi/types/get_session_paginated_dto_sort_order.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +GetSessionPaginatedDtoSortOrder = typing.Union[typing.Literal["ASC", "DESC"], typing.Any] diff --git a/src/vapi/types/ghl_tool.py b/src/vapi/types/ghl_tool.py index 459e376a..cd8dbac4 100644 --- a/src/vapi/types/ghl_tool.py +++ b/src/vapi/types/ghl_tool.py @@ -1,32 +1,22 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions +from __future__ import annotations + +import datetime as dt import typing -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel from .ghl_tool_messages_item import GhlToolMessagesItem -import datetime as dt -from .open_ai_function import OpenAiFunction -from .server import Server from .ghl_tool_metadata import GhlToolMetadata -from ..core.pydantic_utilities import IS_PYDANTIC_V2 - +from .ghl_tool_type import GhlToolType +from .tool_rejection_plan import ToolRejectionPlan -class GhlTool(UniversalBaseModel): - async_: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="async")] = pydantic.Field( - default=None - ) - """ - This determines if the tool is async. - - If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server. - - If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server. - - Defaults to synchronous (`false`). - """ +class GhlTool(UncheckedBaseModel): messages: typing.Optional[typing.List[GhlToolMessagesItem]] = pydantic.Field(default=None) """ These are the messages that will be spoken to the user as the tool is running. @@ -34,45 +24,45 @@ class GhlTool(UniversalBaseModel): For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. """ - type: typing.Literal["ghl"] = "ghl" - id: str = pydantic.Field() - """ - This is the unique identifier for the tool. - """ - - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field() - """ - This is the unique identifier for the organization that this tool belongs to. - """ - - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the tool was created. - """ - - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the tool was last updated. - """ - - function: typing.Optional[OpenAiFunction] = pydantic.Field(default=None) + type: GhlToolType = pydantic.Field() """ - This is the function definition of the tool. - - For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on tool-specific fields like `tool.destinations`. But, even in those cases, you can provide a custom function definition for advanced use cases. - - An example of an advanced use case is if you want to customize the message that's spoken for `endCall` tool. You can specify a function where it returns an argument "reason". Then, in `messages` array, you can have many "request-complete" messages. One of these messages will be triggered if the `messages[].conditions` matches the "reason" argument. + The type of tool. "ghl" for GHL tool. """ - server: typing.Optional[Server] = pydantic.Field(default=None) + id: str = pydantic.Field() """ - This is the server that will be hit when this tool is requested by the model. - - All requests will be sent with the call object among other things. You can find more details in the Server URL documentation. - - This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: highest tool.server.url, then assistant.serverUrl, then phoneNumber.serverUrl, then org.serverUrl. + This is the unique identifier for the tool. """ + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the organization that this tool belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the tool was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", description="This is the ISO 8601 date-time string of when the tool was last updated." + ), + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None metadata: GhlToolMetadata if IS_PYDANTIC_V2: @@ -83,3 +73,6 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +update_forward_refs(GhlTool) diff --git a/src/vapi/types/ghl_tool_messages_item.py b/src/vapi/types/ghl_tool_messages_item.py index bd41e6ec..16ef3fb1 100644 --- a/src/vapi/types/ghl_tool_messages_item.py +++ b/src/vapi/types/ghl_tool_messages_item.py @@ -1,9 +1,104 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .tool_message_start import ToolMessageStart -from .tool_message_complete import ToolMessageComplete -from .tool_message_failed import ToolMessageFailed -from .tool_message_delayed import ToolMessageDelayed -GhlToolMessagesItem = typing.Union[ToolMessageStart, ToolMessageComplete, ToolMessageFailed, ToolMessageDelayed] +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class GhlToolMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GhlToolMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GhlToolMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GhlToolMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +GhlToolMessagesItem = typing_extensions.Annotated[ + typing.Union[ + GhlToolMessagesItem_RequestStart, + GhlToolMessagesItem_RequestComplete, + GhlToolMessagesItem_RequestFailed, + GhlToolMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/ghl_tool_metadata.py b/src/vapi/types/ghl_tool_metadata.py index 95d6aed5..2b88aa13 100644 --- a/src/vapi/types/ghl_tool_metadata.py +++ b/src/vapi/types/ghl_tool_metadata.py @@ -1,16 +1,21 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions import typing -from ..core.serialization import FieldMetadata -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class GhlToolMetadata(UniversalBaseModel): - workflow_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="workflowId")] = None - location_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="locationId")] = None +class GhlToolMetadata(UncheckedBaseModel): + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + location_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="locationId"), pydantic.Field(alias="locationId") + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/ghl_tool_provider_details.py b/src/vapi/types/ghl_tool_provider_details.py index 6856fcb5..66a920b9 100644 --- a/src/vapi/types/ghl_tool_provider_details.py +++ b/src/vapi/types/ghl_tool_provider_details.py @@ -1,35 +1,44 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions import typing -from ..core.serialization import FieldMetadata + import pydantic -from .tool_template_setup import ToolTemplateSetup +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .tool_template_setup import ToolTemplateSetup -class GhlToolProviderDetails(UniversalBaseModel): - template_url: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="templateUrl")] = ( - pydantic.Field(default=None) - ) - """ - This is the Template URL or the Snapshot URL corresponding to the Template. - """ - +class GhlToolProviderDetails(UncheckedBaseModel): + template_url: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="templateUrl"), + pydantic.Field( + alias="templateUrl", + description="This is the Template URL or the Snapshot URL corresponding to the Template.", + ), + ] = None setup_instructions: typing_extensions.Annotated[ - typing.Optional[typing.List[ToolTemplateSetup]], FieldMetadata(alias="setupInstructions") + typing.Optional[typing.List[ToolTemplateSetup]], + FieldMetadata(alias="setupInstructions"), + pydantic.Field(alias="setupInstructions"), + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + workflow_name: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowName"), pydantic.Field(alias="workflowName") + ] = None + webhook_hook_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="webhookHookId"), pydantic.Field(alias="webhookHookId") + ] = None + webhook_hook_name: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="webhookHookName"), pydantic.Field(alias="webhookHookName") + ] = None + location_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="locationId"), pydantic.Field(alias="locationId") ] = None - type: typing.Literal["ghl"] = pydantic.Field(default="ghl") - """ - The type of tool. "ghl" for GHL tool. - """ - - workflow_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="workflowId")] = None - workflow_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="workflowName")] = None - webhook_hook_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="webhookHookId")] = None - webhook_hook_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="webhookHookName")] = None - location_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="locationId")] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/ghl_tool_type.py b/src/vapi/types/ghl_tool_type.py new file mode 100644 index 00000000..176c2e50 --- /dev/null +++ b/src/vapi/types/ghl_tool_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +GhlToolType = typing.Union[typing.Literal["ghl"], typing.Any] diff --git a/src/vapi/types/ghl_tool_with_tool_call.py b/src/vapi/types/ghl_tool_with_tool_call.py index e48ef145..1b98dbec 100644 --- a/src/vapi/types/ghl_tool_with_tool_call.py +++ b/src/vapi/types/ghl_tool_with_tool_call.py @@ -1,32 +1,21 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions +from __future__ import annotations + import typing -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .ghl_tool_metadata import GhlToolMetadata from .ghl_tool_with_tool_call_messages_item import GhlToolWithToolCallMessagesItem from .tool_call import ToolCall -from .ghl_tool_metadata import GhlToolMetadata -from .open_ai_function import OpenAiFunction -from .server import Server -from ..core.pydantic_utilities import IS_PYDANTIC_V2 - +from .tool_rejection_plan import ToolRejectionPlan -class GhlToolWithToolCall(UniversalBaseModel): - async_: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="async")] = pydantic.Field( - default=None - ) - """ - This determines if the tool is async. - - If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server. - - If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server. - - Defaults to synchronous (`false`). - """ +class GhlToolWithToolCall(UncheckedBaseModel): messages: typing.Optional[typing.List[GhlToolWithToolCallMessagesItem]] = pydantic.Field(default=None) """ These are the messages that will be spoken to the user as the tool is running. @@ -34,30 +23,16 @@ class GhlToolWithToolCall(UniversalBaseModel): For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. """ - type: typing.Literal["ghl"] = pydantic.Field(default="ghl") - """ - The type of tool. "ghl" for GHL tool. - """ - - tool_call: typing_extensions.Annotated[ToolCall, FieldMetadata(alias="toolCall")] + tool_call: typing_extensions.Annotated[ToolCall, FieldMetadata(alias="toolCall"), pydantic.Field(alias="toolCall")] metadata: GhlToolMetadata - function: typing.Optional[OpenAiFunction] = pydantic.Field(default=None) - """ - This is the function definition of the tool. - - For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on tool-specific fields like `tool.destinations`. But, even in those cases, you can provide a custom function definition for advanced use cases. - - An example of an advanced use case is if you want to customize the message that's spoken for `endCall` tool. You can specify a function where it returns an argument "reason". Then, in `messages` array, you can have many "request-complete" messages. One of these messages will be triggered if the `messages[].conditions` matches the "reason" argument. - """ - - server: typing.Optional[Server] = pydantic.Field(default=None) - """ - This is the server that will be hit when this tool is requested by the model. - - All requests will be sent with the call object among other things. You can find more details in the Server URL documentation. - - This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: highest tool.server.url, then assistant.serverUrl, then phoneNumber.serverUrl, then org.serverUrl. - """ + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -67,3 +42,6 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +update_forward_refs(GhlToolWithToolCall) diff --git a/src/vapi/types/ghl_tool_with_tool_call_messages_item.py b/src/vapi/types/ghl_tool_with_tool_call_messages_item.py index c07e3d47..0cf4fe58 100644 --- a/src/vapi/types/ghl_tool_with_tool_call_messages_item.py +++ b/src/vapi/types/ghl_tool_with_tool_call_messages_item.py @@ -1,11 +1,104 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .tool_message_start import ToolMessageStart -from .tool_message_complete import ToolMessageComplete -from .tool_message_failed import ToolMessageFailed -from .tool_message_delayed import ToolMessageDelayed -GhlToolWithToolCallMessagesItem = typing.Union[ - ToolMessageStart, ToolMessageComplete, ToolMessageFailed, ToolMessageDelayed +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class GhlToolWithToolCallMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GhlToolWithToolCallMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GhlToolWithToolCallMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GhlToolWithToolCallMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +GhlToolWithToolCallMessagesItem = typing_extensions.Annotated[ + typing.Union[ + GhlToolWithToolCallMessagesItem_RequestStart, + GhlToolWithToolCallMessagesItem_RequestComplete, + GhlToolWithToolCallMessagesItem_RequestFailed, + GhlToolWithToolCallMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), ] diff --git a/src/vapi/types/gladia_credential.py b/src/vapi/types/gladia_credential.py index c40754cc..0542015e 100644 --- a/src/vapi/types/gladia_credential.py +++ b/src/vapi/types/gladia_credential.py @@ -1,39 +1,53 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +import datetime as dt import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic -import datetime as dt +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .gladia_credential_provider import GladiaCredentialProvider -class GladiaCredential(UniversalBaseModel): - provider: typing.Literal["gladia"] = "gladia" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() - """ - This is not returned in the API. - """ - +class GladiaCredential(UncheckedBaseModel): + provider: GladiaCredentialProvider + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] id: str = pydantic.Field() """ This is the unique identifier for the credential. """ - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field() - """ - This is the unique identifier for the org that this credential belongs to. - """ - - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the credential was created. - """ - - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the assistant was last updated. + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/gladia_credential_provider.py b/src/vapi/types/gladia_credential_provider.py new file mode 100644 index 00000000..8479c666 --- /dev/null +++ b/src/vapi/types/gladia_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +GladiaCredentialProvider = typing.Union[typing.Literal["gladia"], typing.Any] diff --git a/src/vapi/types/gladia_custom_vocabulary_config_dto.py b/src/vapi/types/gladia_custom_vocabulary_config_dto.py new file mode 100644 index 00000000..06f5d160 --- /dev/null +++ b/src/vapi/types/gladia_custom_vocabulary_config_dto.py @@ -0,0 +1,32 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .gladia_custom_vocabulary_config_dto_vocabulary_item import GladiaCustomVocabularyConfigDtoVocabularyItem + + +class GladiaCustomVocabularyConfigDto(UncheckedBaseModel): + vocabulary: typing.List[GladiaCustomVocabularyConfigDtoVocabularyItem] = pydantic.Field() + """ + Array of vocabulary items (strings or objects with value, pronunciations, intensity, language) + """ + + default_intensity: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="defaultIntensity"), + pydantic.Field(alias="defaultIntensity", description="Default intensity for vocabulary items (0.0 to 1.0)"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/gladia_custom_vocabulary_config_dto_vocabulary_item.py b/src/vapi/types/gladia_custom_vocabulary_config_dto_vocabulary_item.py new file mode 100644 index 00000000..28473a8c --- /dev/null +++ b/src/vapi/types/gladia_custom_vocabulary_config_dto_vocabulary_item.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .gladia_vocabulary_item_dto import GladiaVocabularyItemDto + +GladiaCustomVocabularyConfigDtoVocabularyItem = typing.Union[str, GladiaVocabularyItemDto] diff --git a/src/vapi/types/gladia_transcriber.py b/src/vapi/types/gladia_transcriber.py index 787c9e8d..14566ae4 100644 --- a/src/vapi/types/gladia_transcriber.py +++ b/src/vapi/types/gladia_transcriber.py @@ -1,51 +1,119 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing + import pydantic -from .gladia_transcriber_model import GladiaTranscriberModel import typing_extensions -from .gladia_transcriber_language_behaviour import GladiaTranscriberLanguageBehaviour +from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .fallback_transcriber_plan import FallbackTranscriberPlan +from .gladia_custom_vocabulary_config_dto import GladiaCustomVocabularyConfigDto from .gladia_transcriber_language import GladiaTranscriberLanguage -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from .gladia_transcriber_language_behaviour import GladiaTranscriberLanguageBehaviour +from .gladia_transcriber_languages import GladiaTranscriberLanguages +from .gladia_transcriber_model import GladiaTranscriberModel +from .gladia_transcriber_region import GladiaTranscriberRegion -class GladiaTranscriber(UniversalBaseModel): - provider: typing.Literal["gladia"] = pydantic.Field(default="gladia") +class GladiaTranscriber(UncheckedBaseModel): + model: typing.Optional[GladiaTranscriberModel] = pydantic.Field(default=None) """ - This is the transcription provider that will be used. + This is the Gladia model that will be used. Default is 'fast' """ - model: typing.Optional[GladiaTranscriberModel] = None language_behaviour: typing_extensions.Annotated[ - typing.Optional[GladiaTranscriberLanguageBehaviour], FieldMetadata(alias="languageBehaviour") + typing.Optional[GladiaTranscriberLanguageBehaviour], + FieldMetadata(alias="languageBehaviour"), + pydantic.Field( + alias="languageBehaviour", + description="Defines how the transcription model detects the audio language. Default value is 'automatic single language'.", + ), ] = None language: typing.Optional[GladiaTranscriberLanguage] = pydantic.Field(default=None) """ Defines the language to use for the transcription. Required when languageBehaviour is 'manual'. """ - transcription_hint: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transcriptionHint")] = ( - pydantic.Field(default=None) - ) + languages: typing.Optional[GladiaTranscriberLanguages] = pydantic.Field(default=None) """ - Provides a custom vocabulary to the model to improve accuracy of transcribing context specific words, technical terms, names, etc. If empty, this argument is ignored. - ⚠️ Warning ⚠️: Please be aware that the transcription_hint field has a character limit of 600. If you provide a transcription_hint longer than 600 characters, it will be automatically truncated to meet this limit. + Defines the languages to use for the transcription. Required when languageBehaviour is 'manual'. """ + transcription_hint: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="transcriptionHint"), + pydantic.Field( + alias="transcriptionHint", + description="Provides a custom vocabulary to the model to improve accuracy of transcribing context specific words, technical terms, names, etc. If empty, this argument is ignored.\n⚠️ Warning ⚠️: Please be aware that the transcription_hint field has a character limit of 600. If you provide a transcription_hint longer than 600 characters, it will be automatically truncated to meet this limit.", + ), + ] = None prosody: typing.Optional[bool] = pydantic.Field(default=None) """ If prosody is true, you will get a transcription that can contain prosodies i.e. (laugh) (giggles) (malefic laugh) (toss) (music)… Default value is false. """ - audio_enhancer: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="audioEnhancer")] = ( - pydantic.Field(default=None) - ) + audio_enhancer: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="audioEnhancer"), + pydantic.Field( + alias="audioEnhancer", + description="If true, audio will be pre-processed to improve accuracy but latency will increase. Default value is false.", + ), + ] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="confidenceThreshold"), + pydantic.Field( + alias="confidenceThreshold", + description="Transcripts below this confidence threshold will be discarded.\n\n@default 0.4", + ), + ] = None + endpointing: typing.Optional[float] = pydantic.Field(default=None) """ - If true, audio will be pre-processed to improve accuracy but latency will increase. Default value is false. + Endpointing time in seconds - time to wait before considering speech ended """ + speech_threshold: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="speechThreshold"), + pydantic.Field( + alias="speechThreshold", + description="Speech threshold - sensitivity configuration for speech detection (0.0 to 1.0)", + ), + ] = None + custom_vocabulary_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="customVocabularyEnabled"), + pydantic.Field(alias="customVocabularyEnabled", description="Enable custom vocabulary for improved accuracy"), + ] = None + custom_vocabulary_config: typing_extensions.Annotated[ + typing.Optional[GladiaCustomVocabularyConfigDto], + FieldMetadata(alias="customVocabularyConfig"), + pydantic.Field(alias="customVocabularyConfig", description="Custom vocabulary configuration"), + ] = None + region: typing.Optional[GladiaTranscriberRegion] = pydantic.Field(default=None) + """ + Region for processing audio (us-west or eu-west) + """ + + receive_partial_transcripts: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="receivePartialTranscripts"), + pydantic.Field( + alias="receivePartialTranscripts", + description="Enable partial transcripts for low-latency streaming transcription", + ), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field( + alias="fallbackPlan", + description="This is the plan for transcriber provider fallbacks in the event that the primary transcriber provider fails.", + ), + ] = None + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/vapi/types/gladia_transcriber_language.py b/src/vapi/types/gladia_transcriber_language.py index a3111441..293423af 100644 --- a/src/vapi/types/gladia_transcriber_language.py +++ b/src/vapi/types/gladia_transcriber_language.py @@ -44,7 +44,6 @@ "id", "it", "ja", - "jp", "jv", "kn", "kk", @@ -64,7 +63,7 @@ "mi", "mr", "mn", - "mymr", + "my", "ne", "no", "nn", diff --git a/src/vapi/types/gladia_transcriber_languages.py b/src/vapi/types/gladia_transcriber_languages.py new file mode 100644 index 00000000..222f5d27 --- /dev/null +++ b/src/vapi/types/gladia_transcriber_languages.py @@ -0,0 +1,108 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +GladiaTranscriberLanguages = typing.Union[ + typing.Literal[ + "af", + "sq", + "am", + "ar", + "hy", + "as", + "az", + "ba", + "eu", + "be", + "bn", + "bs", + "br", + "bg", + "ca", + "zh", + "hr", + "cs", + "da", + "nl", + "en", + "et", + "fo", + "fi", + "fr", + "gl", + "ka", + "de", + "el", + "gu", + "ht", + "ha", + "haw", + "he", + "hi", + "hu", + "is", + "id", + "it", + "ja", + "jv", + "kn", + "kk", + "km", + "ko", + "lo", + "la", + "lv", + "ln", + "lt", + "lb", + "mk", + "mg", + "ms", + "ml", + "mt", + "mi", + "mr", + "mn", + "my", + "ne", + "no", + "nn", + "oc", + "ps", + "fa", + "pl", + "pt", + "pa", + "ro", + "ru", + "sa", + "sr", + "sn", + "sd", + "si", + "sk", + "sl", + "so", + "es", + "su", + "sw", + "sv", + "tl", + "tg", + "ta", + "tt", + "te", + "th", + "bo", + "tr", + "tk", + "uk", + "ur", + "uz", + "vi", + "cy", + "yi", + "yo", + ], + typing.Any, +] diff --git a/src/vapi/types/gladia_transcriber_model.py b/src/vapi/types/gladia_transcriber_model.py index c2fe11e2..69e0be60 100644 --- a/src/vapi/types/gladia_transcriber_model.py +++ b/src/vapi/types/gladia_transcriber_model.py @@ -2,4 +2,4 @@ import typing -GladiaTranscriberModel = typing.Union[typing.Literal["fast", "accurate"], typing.Any] +GladiaTranscriberModel = typing.Union[typing.Literal["fast", "accurate", "solaria-1"], typing.Any] diff --git a/src/vapi/types/gladia_transcriber_region.py b/src/vapi/types/gladia_transcriber_region.py new file mode 100644 index 00000000..b480e4a0 --- /dev/null +++ b/src/vapi/types/gladia_transcriber_region.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +GladiaTranscriberRegion = typing.Union[typing.Literal["us-west", "eu-west"], typing.Any] diff --git a/src/vapi/types/gladia_vocabulary_item_dto.py b/src/vapi/types/gladia_vocabulary_item_dto.py new file mode 100644 index 00000000..b39a742f --- /dev/null +++ b/src/vapi/types/gladia_vocabulary_item_dto.py @@ -0,0 +1,38 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class GladiaVocabularyItemDto(UncheckedBaseModel): + value: str = pydantic.Field() + """ + The vocabulary word or phrase + """ + + pronunciations: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Alternative pronunciations for the vocabulary item + """ + + intensity: typing.Optional[float] = pydantic.Field(default=None) + """ + Intensity for this specific vocabulary item (0.0 to 1.0) + """ + + language: typing.Optional[str] = pydantic.Field(default=None) + """ + Language code for this vocabulary item (ISO 639-1) + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/global_node_plan.py b/src/vapi/types/global_node_plan.py new file mode 100644 index 00000000..1b146813 --- /dev/null +++ b/src/vapi/types/global_node_plan.py @@ -0,0 +1,36 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class GlobalNodePlan(UncheckedBaseModel): + enabled: typing.Optional[bool] = pydantic.Field(default=None) + """ + This is the flag to determine if this node is a global node + + @default false + """ + + enter_condition: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="enterCondition"), + pydantic.Field( + alias="enterCondition", + description="This is the condition that will be checked to determine if the global node should be executed.\n\n@default ''", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/go_high_level_calendar_availability_tool.py b/src/vapi/types/go_high_level_calendar_availability_tool.py new file mode 100644 index 00000000..4402c2ce --- /dev/null +++ b/src/vapi/types/go_high_level_calendar_availability_tool.py @@ -0,0 +1,72 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .go_high_level_calendar_availability_tool_messages_item import GoHighLevelCalendarAvailabilityToolMessagesItem +from .tool_rejection_plan import ToolRejectionPlan + + +class GoHighLevelCalendarAvailabilityTool(UncheckedBaseModel): + messages: typing.Optional[typing.List[GoHighLevelCalendarAvailabilityToolMessagesItem]] = pydantic.Field( + default=None + ) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + id: str = pydantic.Field() + """ + This is the unique identifier for the tool. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the organization that this tool belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the tool was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", description="This is the ISO 8601 date-time string of when the tool was last updated." + ), + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(GoHighLevelCalendarAvailabilityTool) diff --git a/src/vapi/types/go_high_level_calendar_availability_tool_messages_item.py b/src/vapi/types/go_high_level_calendar_availability_tool_messages_item.py new file mode 100644 index 00000000..9376ec08 --- /dev/null +++ b/src/vapi/types/go_high_level_calendar_availability_tool_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class GoHighLevelCalendarAvailabilityToolMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoHighLevelCalendarAvailabilityToolMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoHighLevelCalendarAvailabilityToolMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoHighLevelCalendarAvailabilityToolMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +GoHighLevelCalendarAvailabilityToolMessagesItem = typing_extensions.Annotated[ + typing.Union[ + GoHighLevelCalendarAvailabilityToolMessagesItem_RequestStart, + GoHighLevelCalendarAvailabilityToolMessagesItem_RequestComplete, + GoHighLevelCalendarAvailabilityToolMessagesItem_RequestFailed, + GoHighLevelCalendarAvailabilityToolMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/go_high_level_calendar_availability_tool_provider_details.py b/src/vapi/types/go_high_level_calendar_availability_tool_provider_details.py new file mode 100644 index 00000000..5d679a69 --- /dev/null +++ b/src/vapi/types/go_high_level_calendar_availability_tool_provider_details.py @@ -0,0 +1,35 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .tool_template_setup import ToolTemplateSetup + + +class GoHighLevelCalendarAvailabilityToolProviderDetails(UncheckedBaseModel): + template_url: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="templateUrl"), + pydantic.Field( + alias="templateUrl", + description="This is the Template URL or the Snapshot URL corresponding to the Template.", + ), + ] = None + setup_instructions: typing_extensions.Annotated[ + typing.Optional[typing.List[ToolTemplateSetup]], + FieldMetadata(alias="setupInstructions"), + pydantic.Field(alias="setupInstructions"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/go_high_level_calendar_availability_tool_with_tool_call.py b/src/vapi/types/go_high_level_calendar_availability_tool_with_tool_call.py new file mode 100644 index 00000000..ce56fb43 --- /dev/null +++ b/src/vapi/types/go_high_level_calendar_availability_tool_with_tool_call.py @@ -0,0 +1,57 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .go_high_level_calendar_availability_tool_with_tool_call_messages_item import ( + GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem, +) +from .go_high_level_calendar_availability_tool_with_tool_call_type import ( + GoHighLevelCalendarAvailabilityToolWithToolCallType, +) +from .tool_call import ToolCall +from .tool_rejection_plan import ToolRejectionPlan + + +class GoHighLevelCalendarAvailabilityToolWithToolCall(UncheckedBaseModel): + messages: typing.Optional[typing.List[GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem]] = ( + pydantic.Field(default=None) + ) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + type: GoHighLevelCalendarAvailabilityToolWithToolCallType = pydantic.Field() + """ + The type of tool. "gohighlevel.calendar.availability.check" for GoHighLevel Calendar Availability Check tool. + """ + + tool_call: typing_extensions.Annotated[ToolCall, FieldMetadata(alias="toolCall"), pydantic.Field(alias="toolCall")] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(GoHighLevelCalendarAvailabilityToolWithToolCall) diff --git a/src/vapi/types/go_high_level_calendar_availability_tool_with_tool_call_messages_item.py b/src/vapi/types/go_high_level_calendar_availability_tool_with_tool_call_messages_item.py new file mode 100644 index 00000000..9a2f6976 --- /dev/null +++ b/src/vapi/types/go_high_level_calendar_availability_tool_with_tool_call_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem = typing_extensions.Annotated[ + typing.Union[ + GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem_RequestStart, + GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem_RequestComplete, + GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem_RequestFailed, + GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/go_high_level_calendar_availability_tool_with_tool_call_type.py b/src/vapi/types/go_high_level_calendar_availability_tool_with_tool_call_type.py new file mode 100644 index 00000000..6e45bfa1 --- /dev/null +++ b/src/vapi/types/go_high_level_calendar_availability_tool_with_tool_call_type.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +GoHighLevelCalendarAvailabilityToolWithToolCallType = typing.Union[ + typing.Literal["gohighlevel.calendar.availability.check"], typing.Any +] diff --git a/src/vapi/types/go_high_level_calendar_event_create_tool.py b/src/vapi/types/go_high_level_calendar_event_create_tool.py new file mode 100644 index 00000000..bd9ee32a --- /dev/null +++ b/src/vapi/types/go_high_level_calendar_event_create_tool.py @@ -0,0 +1,72 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .go_high_level_calendar_event_create_tool_messages_item import GoHighLevelCalendarEventCreateToolMessagesItem +from .tool_rejection_plan import ToolRejectionPlan + + +class GoHighLevelCalendarEventCreateTool(UncheckedBaseModel): + messages: typing.Optional[typing.List[GoHighLevelCalendarEventCreateToolMessagesItem]] = pydantic.Field( + default=None + ) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + id: str = pydantic.Field() + """ + This is the unique identifier for the tool. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the organization that this tool belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the tool was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", description="This is the ISO 8601 date-time string of when the tool was last updated." + ), + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(GoHighLevelCalendarEventCreateTool) diff --git a/src/vapi/types/go_high_level_calendar_event_create_tool_messages_item.py b/src/vapi/types/go_high_level_calendar_event_create_tool_messages_item.py new file mode 100644 index 00000000..5487a487 --- /dev/null +++ b/src/vapi/types/go_high_level_calendar_event_create_tool_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class GoHighLevelCalendarEventCreateToolMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoHighLevelCalendarEventCreateToolMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoHighLevelCalendarEventCreateToolMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoHighLevelCalendarEventCreateToolMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +GoHighLevelCalendarEventCreateToolMessagesItem = typing_extensions.Annotated[ + typing.Union[ + GoHighLevelCalendarEventCreateToolMessagesItem_RequestStart, + GoHighLevelCalendarEventCreateToolMessagesItem_RequestComplete, + GoHighLevelCalendarEventCreateToolMessagesItem_RequestFailed, + GoHighLevelCalendarEventCreateToolMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/go_high_level_calendar_event_create_tool_provider_details.py b/src/vapi/types/go_high_level_calendar_event_create_tool_provider_details.py new file mode 100644 index 00000000..26d192dc --- /dev/null +++ b/src/vapi/types/go_high_level_calendar_event_create_tool_provider_details.py @@ -0,0 +1,35 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .tool_template_setup import ToolTemplateSetup + + +class GoHighLevelCalendarEventCreateToolProviderDetails(UncheckedBaseModel): + template_url: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="templateUrl"), + pydantic.Field( + alias="templateUrl", + description="This is the Template URL or the Snapshot URL corresponding to the Template.", + ), + ] = None + setup_instructions: typing_extensions.Annotated[ + typing.Optional[typing.List[ToolTemplateSetup]], + FieldMetadata(alias="setupInstructions"), + pydantic.Field(alias="setupInstructions"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/go_high_level_calendar_event_create_tool_with_tool_call.py b/src/vapi/types/go_high_level_calendar_event_create_tool_with_tool_call.py new file mode 100644 index 00000000..da050af1 --- /dev/null +++ b/src/vapi/types/go_high_level_calendar_event_create_tool_with_tool_call.py @@ -0,0 +1,57 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .go_high_level_calendar_event_create_tool_with_tool_call_messages_item import ( + GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem, +) +from .go_high_level_calendar_event_create_tool_with_tool_call_type import ( + GoHighLevelCalendarEventCreateToolWithToolCallType, +) +from .tool_call import ToolCall +from .tool_rejection_plan import ToolRejectionPlan + + +class GoHighLevelCalendarEventCreateToolWithToolCall(UncheckedBaseModel): + messages: typing.Optional[typing.List[GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem]] = pydantic.Field( + default=None + ) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + type: GoHighLevelCalendarEventCreateToolWithToolCallType = pydantic.Field() + """ + The type of tool. "gohighlevel.calendar.event.create" for GoHighLevel Calendar Event Create tool. + """ + + tool_call: typing_extensions.Annotated[ToolCall, FieldMetadata(alias="toolCall"), pydantic.Field(alias="toolCall")] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(GoHighLevelCalendarEventCreateToolWithToolCall) diff --git a/src/vapi/types/go_high_level_calendar_event_create_tool_with_tool_call_messages_item.py b/src/vapi/types/go_high_level_calendar_event_create_tool_with_tool_call_messages_item.py new file mode 100644 index 00000000..9dc3e56b --- /dev/null +++ b/src/vapi/types/go_high_level_calendar_event_create_tool_with_tool_call_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem = typing_extensions.Annotated[ + typing.Union[ + GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem_RequestStart, + GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem_RequestComplete, + GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem_RequestFailed, + GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/go_high_level_calendar_event_create_tool_with_tool_call_type.py b/src/vapi/types/go_high_level_calendar_event_create_tool_with_tool_call_type.py new file mode 100644 index 00000000..1e96df9d --- /dev/null +++ b/src/vapi/types/go_high_level_calendar_event_create_tool_with_tool_call_type.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +GoHighLevelCalendarEventCreateToolWithToolCallType = typing.Union[ + typing.Literal["gohighlevel.calendar.event.create"], typing.Any +] diff --git a/src/vapi/types/go_high_level_contact_create_tool.py b/src/vapi/types/go_high_level_contact_create_tool.py new file mode 100644 index 00000000..6bfa0939 --- /dev/null +++ b/src/vapi/types/go_high_level_contact_create_tool.py @@ -0,0 +1,70 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .go_high_level_contact_create_tool_messages_item import GoHighLevelContactCreateToolMessagesItem +from .tool_rejection_plan import ToolRejectionPlan + + +class GoHighLevelContactCreateTool(UncheckedBaseModel): + messages: typing.Optional[typing.List[GoHighLevelContactCreateToolMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + id: str = pydantic.Field() + """ + This is the unique identifier for the tool. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the organization that this tool belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the tool was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", description="This is the ISO 8601 date-time string of when the tool was last updated." + ), + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(GoHighLevelContactCreateTool) diff --git a/src/vapi/types/go_high_level_contact_create_tool_messages_item.py b/src/vapi/types/go_high_level_contact_create_tool_messages_item.py new file mode 100644 index 00000000..36512e55 --- /dev/null +++ b/src/vapi/types/go_high_level_contact_create_tool_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class GoHighLevelContactCreateToolMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoHighLevelContactCreateToolMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoHighLevelContactCreateToolMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoHighLevelContactCreateToolMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +GoHighLevelContactCreateToolMessagesItem = typing_extensions.Annotated[ + typing.Union[ + GoHighLevelContactCreateToolMessagesItem_RequestStart, + GoHighLevelContactCreateToolMessagesItem_RequestComplete, + GoHighLevelContactCreateToolMessagesItem_RequestFailed, + GoHighLevelContactCreateToolMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/go_high_level_contact_create_tool_provider_details.py b/src/vapi/types/go_high_level_contact_create_tool_provider_details.py new file mode 100644 index 00000000..2a7481b7 --- /dev/null +++ b/src/vapi/types/go_high_level_contact_create_tool_provider_details.py @@ -0,0 +1,35 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .tool_template_setup import ToolTemplateSetup + + +class GoHighLevelContactCreateToolProviderDetails(UncheckedBaseModel): + template_url: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="templateUrl"), + pydantic.Field( + alias="templateUrl", + description="This is the Template URL or the Snapshot URL corresponding to the Template.", + ), + ] = None + setup_instructions: typing_extensions.Annotated[ + typing.Optional[typing.List[ToolTemplateSetup]], + FieldMetadata(alias="setupInstructions"), + pydantic.Field(alias="setupInstructions"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/go_high_level_contact_create_tool_with_tool_call.py b/src/vapi/types/go_high_level_contact_create_tool_with_tool_call.py new file mode 100644 index 00000000..f764fd3a --- /dev/null +++ b/src/vapi/types/go_high_level_contact_create_tool_with_tool_call.py @@ -0,0 +1,55 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .go_high_level_contact_create_tool_with_tool_call_messages_item import ( + GoHighLevelContactCreateToolWithToolCallMessagesItem, +) +from .go_high_level_contact_create_tool_with_tool_call_type import GoHighLevelContactCreateToolWithToolCallType +from .tool_call import ToolCall +from .tool_rejection_plan import ToolRejectionPlan + + +class GoHighLevelContactCreateToolWithToolCall(UncheckedBaseModel): + messages: typing.Optional[typing.List[GoHighLevelContactCreateToolWithToolCallMessagesItem]] = pydantic.Field( + default=None + ) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + type: GoHighLevelContactCreateToolWithToolCallType = pydantic.Field() + """ + The type of tool. "gohighlevel.contact.create" for GoHighLevel Contact Create tool. + """ + + tool_call: typing_extensions.Annotated[ToolCall, FieldMetadata(alias="toolCall"), pydantic.Field(alias="toolCall")] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(GoHighLevelContactCreateToolWithToolCall) diff --git a/src/vapi/types/go_high_level_contact_create_tool_with_tool_call_messages_item.py b/src/vapi/types/go_high_level_contact_create_tool_with_tool_call_messages_item.py new file mode 100644 index 00000000..8507c340 --- /dev/null +++ b/src/vapi/types/go_high_level_contact_create_tool_with_tool_call_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class GoHighLevelContactCreateToolWithToolCallMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoHighLevelContactCreateToolWithToolCallMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoHighLevelContactCreateToolWithToolCallMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoHighLevelContactCreateToolWithToolCallMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +GoHighLevelContactCreateToolWithToolCallMessagesItem = typing_extensions.Annotated[ + typing.Union[ + GoHighLevelContactCreateToolWithToolCallMessagesItem_RequestStart, + GoHighLevelContactCreateToolWithToolCallMessagesItem_RequestComplete, + GoHighLevelContactCreateToolWithToolCallMessagesItem_RequestFailed, + GoHighLevelContactCreateToolWithToolCallMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/go_high_level_contact_create_tool_with_tool_call_type.py b/src/vapi/types/go_high_level_contact_create_tool_with_tool_call_type.py new file mode 100644 index 00000000..18dc4f35 --- /dev/null +++ b/src/vapi/types/go_high_level_contact_create_tool_with_tool_call_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +GoHighLevelContactCreateToolWithToolCallType = typing.Union[typing.Literal["gohighlevel.contact.create"], typing.Any] diff --git a/src/vapi/types/go_high_level_contact_get_tool.py b/src/vapi/types/go_high_level_contact_get_tool.py new file mode 100644 index 00000000..b0105260 --- /dev/null +++ b/src/vapi/types/go_high_level_contact_get_tool.py @@ -0,0 +1,70 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .go_high_level_contact_get_tool_messages_item import GoHighLevelContactGetToolMessagesItem +from .tool_rejection_plan import ToolRejectionPlan + + +class GoHighLevelContactGetTool(UncheckedBaseModel): + messages: typing.Optional[typing.List[GoHighLevelContactGetToolMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + id: str = pydantic.Field() + """ + This is the unique identifier for the tool. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the organization that this tool belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the tool was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", description="This is the ISO 8601 date-time string of when the tool was last updated." + ), + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(GoHighLevelContactGetTool) diff --git a/src/vapi/types/go_high_level_contact_get_tool_messages_item.py b/src/vapi/types/go_high_level_contact_get_tool_messages_item.py new file mode 100644 index 00000000..dbed1fc9 --- /dev/null +++ b/src/vapi/types/go_high_level_contact_get_tool_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class GoHighLevelContactGetToolMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoHighLevelContactGetToolMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoHighLevelContactGetToolMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoHighLevelContactGetToolMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +GoHighLevelContactGetToolMessagesItem = typing_extensions.Annotated[ + typing.Union[ + GoHighLevelContactGetToolMessagesItem_RequestStart, + GoHighLevelContactGetToolMessagesItem_RequestComplete, + GoHighLevelContactGetToolMessagesItem_RequestFailed, + GoHighLevelContactGetToolMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/go_high_level_contact_get_tool_provider_details.py b/src/vapi/types/go_high_level_contact_get_tool_provider_details.py new file mode 100644 index 00000000..f7b0a500 --- /dev/null +++ b/src/vapi/types/go_high_level_contact_get_tool_provider_details.py @@ -0,0 +1,35 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .tool_template_setup import ToolTemplateSetup + + +class GoHighLevelContactGetToolProviderDetails(UncheckedBaseModel): + template_url: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="templateUrl"), + pydantic.Field( + alias="templateUrl", + description="This is the Template URL or the Snapshot URL corresponding to the Template.", + ), + ] = None + setup_instructions: typing_extensions.Annotated[ + typing.Optional[typing.List[ToolTemplateSetup]], + FieldMetadata(alias="setupInstructions"), + pydantic.Field(alias="setupInstructions"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/go_high_level_contact_get_tool_with_tool_call.py b/src/vapi/types/go_high_level_contact_get_tool_with_tool_call.py new file mode 100644 index 00000000..b4c324e7 --- /dev/null +++ b/src/vapi/types/go_high_level_contact_get_tool_with_tool_call.py @@ -0,0 +1,55 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .go_high_level_contact_get_tool_with_tool_call_messages_item import ( + GoHighLevelContactGetToolWithToolCallMessagesItem, +) +from .go_high_level_contact_get_tool_with_tool_call_type import GoHighLevelContactGetToolWithToolCallType +from .tool_call import ToolCall +from .tool_rejection_plan import ToolRejectionPlan + + +class GoHighLevelContactGetToolWithToolCall(UncheckedBaseModel): + messages: typing.Optional[typing.List[GoHighLevelContactGetToolWithToolCallMessagesItem]] = pydantic.Field( + default=None + ) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + type: GoHighLevelContactGetToolWithToolCallType = pydantic.Field() + """ + The type of tool. "gohighlevel.contact.get" for GoHighLevel Contact Get tool. + """ + + tool_call: typing_extensions.Annotated[ToolCall, FieldMetadata(alias="toolCall"), pydantic.Field(alias="toolCall")] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(GoHighLevelContactGetToolWithToolCall) diff --git a/src/vapi/types/go_high_level_contact_get_tool_with_tool_call_messages_item.py b/src/vapi/types/go_high_level_contact_get_tool_with_tool_call_messages_item.py new file mode 100644 index 00000000..2f428099 --- /dev/null +++ b/src/vapi/types/go_high_level_contact_get_tool_with_tool_call_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class GoHighLevelContactGetToolWithToolCallMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoHighLevelContactGetToolWithToolCallMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoHighLevelContactGetToolWithToolCallMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoHighLevelContactGetToolWithToolCallMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +GoHighLevelContactGetToolWithToolCallMessagesItem = typing_extensions.Annotated[ + typing.Union[ + GoHighLevelContactGetToolWithToolCallMessagesItem_RequestStart, + GoHighLevelContactGetToolWithToolCallMessagesItem_RequestComplete, + GoHighLevelContactGetToolWithToolCallMessagesItem_RequestFailed, + GoHighLevelContactGetToolWithToolCallMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/go_high_level_contact_get_tool_with_tool_call_type.py b/src/vapi/types/go_high_level_contact_get_tool_with_tool_call_type.py new file mode 100644 index 00000000..cd1a0bc6 --- /dev/null +++ b/src/vapi/types/go_high_level_contact_get_tool_with_tool_call_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +GoHighLevelContactGetToolWithToolCallType = typing.Union[typing.Literal["gohighlevel.contact.get"], typing.Any] diff --git a/src/vapi/types/go_high_level_credential.py b/src/vapi/types/go_high_level_credential.py index 998eadec..11cc0a74 100644 --- a/src/vapi/types/go_high_level_credential.py +++ b/src/vapi/types/go_high_level_credential.py @@ -1,39 +1,53 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +import datetime as dt import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic -import datetime as dt +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .go_high_level_credential_provider import GoHighLevelCredentialProvider -class GoHighLevelCredential(UniversalBaseModel): - provider: typing.Literal["gohighlevel"] = "gohighlevel" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() - """ - This is not returned in the API. - """ - +class GoHighLevelCredential(UncheckedBaseModel): + provider: GoHighLevelCredentialProvider + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] id: str = pydantic.Field() """ This is the unique identifier for the credential. """ - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field() - """ - This is the unique identifier for the org that this credential belongs to. - """ - - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the credential was created. - """ - - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the assistant was last updated. + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/go_high_level_credential_provider.py b/src/vapi/types/go_high_level_credential_provider.py new file mode 100644 index 00000000..31708118 --- /dev/null +++ b/src/vapi/types/go_high_level_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +GoHighLevelCredentialProvider = typing.Union[typing.Literal["gohighlevel"], typing.Any] diff --git a/src/vapi/types/go_high_level_mcp_credential.py b/src/vapi/types/go_high_level_mcp_credential.py new file mode 100644 index 00000000..5c50a348 --- /dev/null +++ b/src/vapi/types/go_high_level_mcp_credential.py @@ -0,0 +1,63 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .go_high_level_mcp_credential_provider import GoHighLevelMcpCredentialProvider +from .oauth_2_authentication_session import Oauth2AuthenticationSession + + +class GoHighLevelMcpCredential(UncheckedBaseModel): + provider: GoHighLevelMcpCredentialProvider + authentication_session: typing_extensions.Annotated[ + Oauth2AuthenticationSession, + FieldMetadata(alias="authenticationSession"), + pydantic.Field( + alias="authenticationSession", description="This is the authentication session for the credential." + ), + ] + id: str = pydantic.Field() + """ + This is the unique identifier for the credential. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/go_high_level_mcp_credential_provider.py b/src/vapi/types/go_high_level_mcp_credential_provider.py new file mode 100644 index 00000000..00a42070 --- /dev/null +++ b/src/vapi/types/go_high_level_mcp_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +GoHighLevelMcpCredentialProvider = typing.Union[typing.Literal["ghl.oauth2-authorization"], typing.Any] diff --git a/src/vapi/types/google_calendar_check_availability_tool.py b/src/vapi/types/google_calendar_check_availability_tool.py new file mode 100644 index 00000000..c3fbc722 --- /dev/null +++ b/src/vapi/types/google_calendar_check_availability_tool.py @@ -0,0 +1,72 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .google_calendar_check_availability_tool_messages_item import GoogleCalendarCheckAvailabilityToolMessagesItem +from .tool_rejection_plan import ToolRejectionPlan + + +class GoogleCalendarCheckAvailabilityTool(UncheckedBaseModel): + messages: typing.Optional[typing.List[GoogleCalendarCheckAvailabilityToolMessagesItem]] = pydantic.Field( + default=None + ) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + id: str = pydantic.Field() + """ + This is the unique identifier for the tool. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the organization that this tool belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the tool was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", description="This is the ISO 8601 date-time string of when the tool was last updated." + ), + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(GoogleCalendarCheckAvailabilityTool) diff --git a/src/vapi/types/google_calendar_check_availability_tool_messages_item.py b/src/vapi/types/google_calendar_check_availability_tool_messages_item.py new file mode 100644 index 00000000..598c6216 --- /dev/null +++ b/src/vapi/types/google_calendar_check_availability_tool_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class GoogleCalendarCheckAvailabilityToolMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoogleCalendarCheckAvailabilityToolMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoogleCalendarCheckAvailabilityToolMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoogleCalendarCheckAvailabilityToolMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +GoogleCalendarCheckAvailabilityToolMessagesItem = typing_extensions.Annotated[ + typing.Union[ + GoogleCalendarCheckAvailabilityToolMessagesItem_RequestStart, + GoogleCalendarCheckAvailabilityToolMessagesItem_RequestComplete, + GoogleCalendarCheckAvailabilityToolMessagesItem_RequestFailed, + GoogleCalendarCheckAvailabilityToolMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/google_calendar_create_event_tool.py b/src/vapi/types/google_calendar_create_event_tool.py new file mode 100644 index 00000000..ecc09e7a --- /dev/null +++ b/src/vapi/types/google_calendar_create_event_tool.py @@ -0,0 +1,70 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .google_calendar_create_event_tool_messages_item import GoogleCalendarCreateEventToolMessagesItem +from .tool_rejection_plan import ToolRejectionPlan + + +class GoogleCalendarCreateEventTool(UncheckedBaseModel): + messages: typing.Optional[typing.List[GoogleCalendarCreateEventToolMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + id: str = pydantic.Field() + """ + This is the unique identifier for the tool. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the organization that this tool belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the tool was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", description="This is the ISO 8601 date-time string of when the tool was last updated." + ), + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(GoogleCalendarCreateEventTool) diff --git a/src/vapi/types/google_calendar_create_event_tool_messages_item.py b/src/vapi/types/google_calendar_create_event_tool_messages_item.py new file mode 100644 index 00000000..20c9fed4 --- /dev/null +++ b/src/vapi/types/google_calendar_create_event_tool_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class GoogleCalendarCreateEventToolMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoogleCalendarCreateEventToolMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoogleCalendarCreateEventToolMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoogleCalendarCreateEventToolMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +GoogleCalendarCreateEventToolMessagesItem = typing_extensions.Annotated[ + typing.Union[ + GoogleCalendarCreateEventToolMessagesItem_RequestStart, + GoogleCalendarCreateEventToolMessagesItem_RequestComplete, + GoogleCalendarCreateEventToolMessagesItem_RequestFailed, + GoogleCalendarCreateEventToolMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/google_calendar_create_event_tool_provider_details.py b/src/vapi/types/google_calendar_create_event_tool_provider_details.py new file mode 100644 index 00000000..5e09d3dd --- /dev/null +++ b/src/vapi/types/google_calendar_create_event_tool_provider_details.py @@ -0,0 +1,35 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .tool_template_setup import ToolTemplateSetup + + +class GoogleCalendarCreateEventToolProviderDetails(UncheckedBaseModel): + template_url: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="templateUrl"), + pydantic.Field( + alias="templateUrl", + description="This is the Template URL or the Snapshot URL corresponding to the Template.", + ), + ] = None + setup_instructions: typing_extensions.Annotated[ + typing.Optional[typing.List[ToolTemplateSetup]], + FieldMetadata(alias="setupInstructions"), + pydantic.Field(alias="setupInstructions"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/google_calendar_create_event_tool_with_tool_call.py b/src/vapi/types/google_calendar_create_event_tool_with_tool_call.py new file mode 100644 index 00000000..d7006807 --- /dev/null +++ b/src/vapi/types/google_calendar_create_event_tool_with_tool_call.py @@ -0,0 +1,49 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .google_calendar_create_event_tool_with_tool_call_messages_item import ( + GoogleCalendarCreateEventToolWithToolCallMessagesItem, +) +from .tool_call import ToolCall +from .tool_rejection_plan import ToolRejectionPlan + + +class GoogleCalendarCreateEventToolWithToolCall(UncheckedBaseModel): + messages: typing.Optional[typing.List[GoogleCalendarCreateEventToolWithToolCallMessagesItem]] = pydantic.Field( + default=None + ) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + tool_call: typing_extensions.Annotated[ToolCall, FieldMetadata(alias="toolCall"), pydantic.Field(alias="toolCall")] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(GoogleCalendarCreateEventToolWithToolCall) diff --git a/src/vapi/types/google_calendar_create_event_tool_with_tool_call_messages_item.py b/src/vapi/types/google_calendar_create_event_tool_with_tool_call_messages_item.py new file mode 100644 index 00000000..e8a69100 --- /dev/null +++ b/src/vapi/types/google_calendar_create_event_tool_with_tool_call_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class GoogleCalendarCreateEventToolWithToolCallMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoogleCalendarCreateEventToolWithToolCallMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoogleCalendarCreateEventToolWithToolCallMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoogleCalendarCreateEventToolWithToolCallMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +GoogleCalendarCreateEventToolWithToolCallMessagesItem = typing_extensions.Annotated[ + typing.Union[ + GoogleCalendarCreateEventToolWithToolCallMessagesItem_RequestStart, + GoogleCalendarCreateEventToolWithToolCallMessagesItem_RequestComplete, + GoogleCalendarCreateEventToolWithToolCallMessagesItem_RequestFailed, + GoogleCalendarCreateEventToolWithToolCallMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/google_calendar_o_auth_2_authorization_credential.py b/src/vapi/types/google_calendar_o_auth_2_authorization_credential.py new file mode 100644 index 00000000..d147f1a0 --- /dev/null +++ b/src/vapi/types/google_calendar_o_auth_2_authorization_credential.py @@ -0,0 +1,62 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .google_calendar_o_auth_2_authorization_credential_provider import ( + GoogleCalendarOAuth2AuthorizationCredentialProvider, +) + + +class GoogleCalendarOAuth2AuthorizationCredential(UncheckedBaseModel): + provider: GoogleCalendarOAuth2AuthorizationCredentialProvider + authorization_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="authorizationId"), + pydantic.Field(alias="authorizationId", description="The authorization ID for the OAuth2 authorization"), + ] + id: str = pydantic.Field() + """ + This is the unique identifier for the credential. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/google_calendar_o_auth_2_authorization_credential_provider.py b/src/vapi/types/google_calendar_o_auth_2_authorization_credential_provider.py new file mode 100644 index 00000000..de63bcb4 --- /dev/null +++ b/src/vapi/types/google_calendar_o_auth_2_authorization_credential_provider.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +GoogleCalendarOAuth2AuthorizationCredentialProvider = typing.Union[ + typing.Literal["google.calendar.oauth2-authorization"], typing.Any +] diff --git a/src/vapi/types/google_calendar_o_auth_2_client_credential.py b/src/vapi/types/google_calendar_o_auth_2_client_credential.py new file mode 100644 index 00000000..b84196b8 --- /dev/null +++ b/src/vapi/types/google_calendar_o_auth_2_client_credential.py @@ -0,0 +1,55 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .google_calendar_o_auth_2_client_credential_provider import GoogleCalendarOAuth2ClientCredentialProvider + + +class GoogleCalendarOAuth2ClientCredential(UncheckedBaseModel): + provider: GoogleCalendarOAuth2ClientCredentialProvider + id: str = pydantic.Field() + """ + This is the unique identifier for the credential. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/google_calendar_o_auth_2_client_credential_provider.py b/src/vapi/types/google_calendar_o_auth_2_client_credential_provider.py new file mode 100644 index 00000000..5eaab527 --- /dev/null +++ b/src/vapi/types/google_calendar_o_auth_2_client_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +GoogleCalendarOAuth2ClientCredentialProvider = typing.Union[typing.Literal["google.calendar.oauth2-client"], typing.Any] diff --git a/src/vapi/types/google_credential.py b/src/vapi/types/google_credential.py new file mode 100644 index 00000000..b6263cd4 --- /dev/null +++ b/src/vapi/types/google_credential.py @@ -0,0 +1,64 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .google_credential_provider import GoogleCredentialProvider + + +class GoogleCredential(UncheckedBaseModel): + provider: GoogleCredentialProvider = pydantic.Field() + """ + This is the key for Gemini in Google AI Studio. Get it from here: https://aistudio.google.com/app/apikey + """ + + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + id: str = pydantic.Field() + """ + This is the unique identifier for the credential. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/google_credential_provider.py b/src/vapi/types/google_credential_provider.py new file mode 100644 index 00000000..079112ef --- /dev/null +++ b/src/vapi/types/google_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +GoogleCredentialProvider = typing.Union[typing.Literal["google"], typing.Any] diff --git a/src/vapi/types/google_model.py b/src/vapi/types/google_model.py new file mode 100644 index 00000000..c1f075e8 --- /dev/null +++ b/src/vapi/types/google_model.py @@ -0,0 +1,212 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_custom_knowledge_base_dto import CreateCustomKnowledgeBaseDto +from .google_model_model import GoogleModelModel +from .google_realtime_config import GoogleRealtimeConfig +from .open_ai_message import OpenAiMessage + + +class GoogleModel(UncheckedBaseModel): + messages: typing.Optional[typing.List[OpenAiMessage]] = pydantic.Field(default=None) + """ + This is the starting state for the conversation. + """ + + tools: typing.Optional[typing.List["GoogleModelToolsItem"]] = pydantic.Field(default=None) + """ + These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`. + + Both `tools` and `toolIds` can be used together. + """ + + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="toolIds"), + pydantic.Field( + alias="toolIds", + description="These are the tools that the assistant can use during the call. To use transient tools, use `tools`.\n\nBoth `tools` and `toolIds` can be used together.", + ), + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase", description="These are the options for the knowledge base."), + ] = None + model: GoogleModelModel = pydantic.Field() + """ + This is the Google model that will be used. + """ + + realtime_config: typing_extensions.Annotated[ + typing.Optional[GoogleRealtimeConfig], + FieldMetadata(alias="realtimeConfig"), + pydantic.Field( + alias="realtimeConfig", + description="This is the session configuration for the Gemini Flash 2.0 Multimodal Live API.\nOnly applicable if the model `gemini-2.0-flash-realtime-exp` is selected.", + ), + ] = None + temperature: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency. + """ + + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="maxTokens"), + pydantic.Field( + alias="maxTokens", + description="This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.", + ), + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field( + alias="emotionRecognitionEnabled", + description="This determines whether we detect user's emotion while they speak and send it as an additional info to model.\n\nDefault `false` because the model is usually are good at understanding the user's emotion from text.\n\n@default false", + ), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="numFastTurns"), + pydantic.Field( + alias="numFastTurns", + description="This sets how many turns at the start of the conversation to use a smaller, faster model from the same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai.\n\nDefault is 0.\n\n@default 0", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + GoogleModel, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/google_model_model.py b/src/vapi/types/google_model_model.py new file mode 100644 index 00000000..10540e99 --- /dev/null +++ b/src/vapi/types/google_model_model.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +GoogleModelModel = typing.Union[ + typing.Literal[ + "gemini-3-flash-preview", + "gemini-2.5-pro", + "gemini-2.5-flash", + "gemini-2.5-flash-lite", + "gemini-2.0-flash-thinking-exp", + "gemini-2.0-pro-exp-02-05", + "gemini-2.0-flash", + "gemini-2.0-flash-lite", + "gemini-2.0-flash-exp", + "gemini-2.0-flash-realtime-exp", + "gemini-1.5-flash", + "gemini-1.5-flash-002", + "gemini-1.5-pro", + "gemini-1.5-pro-002", + "gemini-1.0-pro", + ], + typing.Any, +] diff --git a/src/vapi/types/google_model_tools_item.py b/src/vapi/types/google_model_tools_item.py new file mode 100644 index 00000000..8217b73e --- /dev/null +++ b/src/vapi/types/google_model_tools_item.py @@ -0,0 +1,731 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .backoff_plan import BackoffPlan +from .code_tool_environment_variable import CodeToolEnvironmentVariable +from .create_api_request_tool_dto_messages_item import CreateApiRequestToolDtoMessagesItem +from .create_api_request_tool_dto_method import CreateApiRequestToolDtoMethod +from .create_bash_tool_dto_messages_item import CreateBashToolDtoMessagesItem +from .create_bash_tool_dto_name import CreateBashToolDtoName +from .create_bash_tool_dto_sub_type import CreateBashToolDtoSubType +from .create_code_tool_dto_messages_item import CreateCodeToolDtoMessagesItem +from .create_computer_tool_dto_messages_item import CreateComputerToolDtoMessagesItem +from .create_computer_tool_dto_name import CreateComputerToolDtoName +from .create_computer_tool_dto_sub_type import CreateComputerToolDtoSubType +from .create_dtmf_tool_dto_messages_item import CreateDtmfToolDtoMessagesItem +from .create_end_call_tool_dto_messages_item import CreateEndCallToolDtoMessagesItem +from .create_function_tool_dto_messages_item import CreateFunctionToolDtoMessagesItem +from .create_go_high_level_calendar_availability_tool_dto_messages_item import ( + CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem, +) +from .create_go_high_level_calendar_event_create_tool_dto_messages_item import ( + CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_create_tool_dto_messages_item import ( + CreateGoHighLevelContactCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_get_tool_dto_messages_item import CreateGoHighLevelContactGetToolDtoMessagesItem +from .create_google_calendar_check_availability_tool_dto_messages_item import ( + CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem, +) +from .create_google_calendar_create_event_tool_dto_messages_item import ( + CreateGoogleCalendarCreateEventToolDtoMessagesItem, +) +from .create_google_sheets_row_append_tool_dto_messages_item import CreateGoogleSheetsRowAppendToolDtoMessagesItem +from .create_handoff_tool_dto_messages_item import CreateHandoffToolDtoMessagesItem +from .create_mcp_tool_dto_messages_item import CreateMcpToolDtoMessagesItem +from .create_query_tool_dto_messages_item import CreateQueryToolDtoMessagesItem +from .create_sip_request_tool_dto_body import CreateSipRequestToolDtoBody +from .create_sip_request_tool_dto_messages_item import CreateSipRequestToolDtoMessagesItem +from .create_sip_request_tool_dto_verb import CreateSipRequestToolDtoVerb +from .create_slack_send_message_tool_dto_messages_item import CreateSlackSendMessageToolDtoMessagesItem +from .create_sms_tool_dto_messages_item import CreateSmsToolDtoMessagesItem +from .create_text_editor_tool_dto_messages_item import CreateTextEditorToolDtoMessagesItem +from .create_text_editor_tool_dto_name import CreateTextEditorToolDtoName +from .create_text_editor_tool_dto_sub_type import CreateTextEditorToolDtoSubType +from .create_transfer_call_tool_dto_destinations_item import CreateTransferCallToolDtoDestinationsItem +from .create_transfer_call_tool_dto_messages_item import CreateTransferCallToolDtoMessagesItem +from .create_voicemail_tool_dto_messages_item import CreateVoicemailToolDtoMessagesItem +from .knowledge_base import KnowledgeBase +from .mcp_tool_messages import McpToolMessages +from .mcp_tool_metadata import McpToolMetadata +from .open_ai_function import OpenAiFunction +from .server import Server +from .tool_parameter import ToolParameter +from .tool_rejection_plan import ToolRejectionPlan +from .variable_extraction_plan import VariableExtractionPlan + + +class GoogleModelToolsItem_ApiRequest(UncheckedBaseModel): + type: typing.Literal["apiRequest"] = "apiRequest" + messages: typing.Optional[typing.List[CreateApiRequestToolDtoMessagesItem]] = None + method: CreateApiRequestToolDtoMethod + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + encrypted_paths: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="encryptedPaths"), pydantic.Field(alias="encryptedPaths") + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + name: typing.Optional[str] = None + description: typing.Optional[str] = None + url: str + body: typing.Optional["JsonSchema"] = None + headers: typing.Optional["JsonSchema"] = None + backoff_plan: typing_extensions.Annotated[ + typing.Optional[BackoffPlan], FieldMetadata(alias="backoffPlan"), pydantic.Field(alias="backoffPlan") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoogleModelToolsItem_Bash(UncheckedBaseModel): + type: typing.Literal["bash"] = "bash" + messages: typing.Optional[typing.List[CreateBashToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateBashToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateBashToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoogleModelToolsItem_Code(UncheckedBaseModel): + type: typing.Literal["code"] = "code" + messages: typing.Optional[typing.List[CreateCodeToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + code: str + environment_variables: typing_extensions.Annotated[ + typing.Optional[typing.List[CodeToolEnvironmentVariable]], + FieldMetadata(alias="environmentVariables"), + pydantic.Field(alias="environmentVariables"), + ] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoogleModelToolsItem_Computer(UncheckedBaseModel): + type: typing.Literal["computer"] = "computer" + messages: typing.Optional[typing.List[CreateComputerToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateComputerToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateComputerToolDtoName + display_width_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayWidthPx"), pydantic.Field(alias="displayWidthPx") + ] + display_height_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayHeightPx"), pydantic.Field(alias="displayHeightPx") + ] + display_number: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="displayNumber"), pydantic.Field(alias="displayNumber") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoogleModelToolsItem_Dtmf(UncheckedBaseModel): + type: typing.Literal["dtmf"] = "dtmf" + messages: typing.Optional[typing.List[CreateDtmfToolDtoMessagesItem]] = None + sip_info_dtmf_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="sipInfoDtmfEnabled"), pydantic.Field(alias="sipInfoDtmfEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoogleModelToolsItem_EndCall(UncheckedBaseModel): + type: typing.Literal["endCall"] = "endCall" + messages: typing.Optional[typing.List[CreateEndCallToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoogleModelToolsItem_Function(UncheckedBaseModel): + type: typing.Literal["function"] = "function" + messages: typing.Optional[typing.List[CreateFunctionToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoogleModelToolsItem_GohighlevelCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.availability.check"] = "gohighlevel.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoogleModelToolsItem_GohighlevelCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.event.create"] = "gohighlevel.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoogleModelToolsItem_GohighlevelContactCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.create"] = "gohighlevel.contact.create" + messages: typing.Optional[typing.List[CreateGoHighLevelContactCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoogleModelToolsItem_GohighlevelContactGet(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.get"] = "gohighlevel.contact.get" + messages: typing.Optional[typing.List[CreateGoHighLevelContactGetToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoogleModelToolsItem_GoogleCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["google.calendar.availability.check"] = "google.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoogleModelToolsItem_GoogleCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["google.calendar.event.create"] = "google.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoogleCalendarCreateEventToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoogleModelToolsItem_GoogleSheetsRowAppend(UncheckedBaseModel): + type: typing.Literal["google.sheets.row.append"] = "google.sheets.row.append" + messages: typing.Optional[typing.List[CreateGoogleSheetsRowAppendToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoogleModelToolsItem_Handoff(UncheckedBaseModel): + type: typing.Literal["handoff"] = "handoff" + messages: typing.Optional[typing.List[CreateHandoffToolDtoMessagesItem]] = None + default_result: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="defaultResult"), pydantic.Field(alias="defaultResult") + ] = None + destinations: typing.Optional[typing.List["CreateHandoffToolDtoDestinationsItem"]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoogleModelToolsItem_Mcp(UncheckedBaseModel): + type: typing.Literal["mcp"] = "mcp" + messages: typing.Optional[typing.List[CreateMcpToolDtoMessagesItem]] = None + server: typing.Optional[Server] = None + tool_messages: typing_extensions.Annotated[ + typing.Optional[typing.List[McpToolMessages]], + FieldMetadata(alias="toolMessages"), + pydantic.Field(alias="toolMessages"), + ] = None + metadata: typing.Optional[McpToolMetadata] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoogleModelToolsItem_Query(UncheckedBaseModel): + type: typing.Literal["query"] = "query" + messages: typing.Optional[typing.List[CreateQueryToolDtoMessagesItem]] = None + knowledge_bases: typing_extensions.Annotated[ + typing.Optional[typing.List[KnowledgeBase]], + FieldMetadata(alias="knowledgeBases"), + pydantic.Field(alias="knowledgeBases"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoogleModelToolsItem_SlackMessageSend(UncheckedBaseModel): + type: typing.Literal["slack.message.send"] = "slack.message.send" + messages: typing.Optional[typing.List[CreateSlackSendMessageToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoogleModelToolsItem_Sms(UncheckedBaseModel): + type: typing.Literal["sms"] = "sms" + messages: typing.Optional[typing.List[CreateSmsToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoogleModelToolsItem_TextEditor(UncheckedBaseModel): + type: typing.Literal["textEditor"] = "textEditor" + messages: typing.Optional[typing.List[CreateTextEditorToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateTextEditorToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateTextEditorToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoogleModelToolsItem_TransferCall(UncheckedBaseModel): + type: typing.Literal["transferCall"] = "transferCall" + messages: typing.Optional[typing.List[CreateTransferCallToolDtoMessagesItem]] = None + destinations: typing.Optional[typing.List[CreateTransferCallToolDtoDestinationsItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoogleModelToolsItem_SipRequest(UncheckedBaseModel): + type: typing.Literal["sipRequest"] = "sipRequest" + messages: typing.Optional[typing.List[CreateSipRequestToolDtoMessagesItem]] = None + verb: CreateSipRequestToolDtoVerb + headers: typing.Optional["JsonSchema"] = None + body: typing.Optional[CreateSipRequestToolDtoBody] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoogleModelToolsItem_Voicemail(UncheckedBaseModel): + type: typing.Literal["voicemail"] = "voicemail" + messages: typing.Optional[typing.List[CreateVoicemailToolDtoMessagesItem]] = None + beep_detection_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="beepDetectionEnabled"), pydantic.Field(alias="beepDetectionEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +GoogleModelToolsItem = typing_extensions.Annotated[ + typing.Union[ + GoogleModelToolsItem_ApiRequest, + GoogleModelToolsItem_Bash, + GoogleModelToolsItem_Code, + GoogleModelToolsItem_Computer, + GoogleModelToolsItem_Dtmf, + GoogleModelToolsItem_EndCall, + GoogleModelToolsItem_Function, + GoogleModelToolsItem_GohighlevelCalendarAvailabilityCheck, + GoogleModelToolsItem_GohighlevelCalendarEventCreate, + GoogleModelToolsItem_GohighlevelContactCreate, + GoogleModelToolsItem_GohighlevelContactGet, + GoogleModelToolsItem_GoogleCalendarAvailabilityCheck, + GoogleModelToolsItem_GoogleCalendarEventCreate, + GoogleModelToolsItem_GoogleSheetsRowAppend, + GoogleModelToolsItem_Handoff, + GoogleModelToolsItem_Mcp, + GoogleModelToolsItem_Query, + GoogleModelToolsItem_SlackMessageSend, + GoogleModelToolsItem_Sms, + GoogleModelToolsItem_TextEditor, + GoogleModelToolsItem_TransferCall, + GoogleModelToolsItem_SipRequest, + GoogleModelToolsItem_Voicemail, + ], + UnionMetadata(discriminant="type"), +] +from .json_schema import JsonSchema # noqa: E402, I001 +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs(GoogleModelToolsItem_ApiRequest, JsonSchema=JsonSchema) +update_forward_refs(GoogleModelToolsItem_Bash) +update_forward_refs(GoogleModelToolsItem_Code) +update_forward_refs(GoogleModelToolsItem_Computer) +update_forward_refs(GoogleModelToolsItem_Dtmf) +update_forward_refs(GoogleModelToolsItem_EndCall) +update_forward_refs(GoogleModelToolsItem_Function) +update_forward_refs(GoogleModelToolsItem_GohighlevelCalendarAvailabilityCheck) +update_forward_refs(GoogleModelToolsItem_GohighlevelCalendarEventCreate) +update_forward_refs(GoogleModelToolsItem_GohighlevelContactCreate) +update_forward_refs(GoogleModelToolsItem_GohighlevelContactGet) +update_forward_refs(GoogleModelToolsItem_GoogleCalendarAvailabilityCheck) +update_forward_refs(GoogleModelToolsItem_GoogleCalendarEventCreate) +update_forward_refs(GoogleModelToolsItem_GoogleSheetsRowAppend) +update_forward_refs( + GoogleModelToolsItem_Handoff, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs(GoogleModelToolsItem_Mcp) +update_forward_refs(GoogleModelToolsItem_Query) +update_forward_refs(GoogleModelToolsItem_SlackMessageSend) +update_forward_refs(GoogleModelToolsItem_Sms) +update_forward_refs(GoogleModelToolsItem_TextEditor) +update_forward_refs(GoogleModelToolsItem_TransferCall) +update_forward_refs(GoogleModelToolsItem_SipRequest, JsonSchema=JsonSchema) +update_forward_refs(GoogleModelToolsItem_Voicemail) diff --git a/src/vapi/types/google_realtime_config.py b/src/vapi/types/google_realtime_config.py new file mode 100644 index 00000000..18818a3f --- /dev/null +++ b/src/vapi/types/google_realtime_config.py @@ -0,0 +1,62 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .gemini_multimodal_live_speech_config import GeminiMultimodalLiveSpeechConfig + + +class GoogleRealtimeConfig(UncheckedBaseModel): + top_p: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="topP"), + pydantic.Field( + alias="topP", + description="This is the nucleus sampling parameter that controls the cumulative probability of tokens considered during text generation.\nOnly applicable with the Gemini Flash 2.0 Multimodal Live API.", + ), + ] = None + top_k: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="topK"), + pydantic.Field( + alias="topK", + description="This is the top-k sampling parameter that limits the number of highest probability tokens considered during text generation.\nOnly applicable with the Gemini Flash 2.0 Multimodal Live API.", + ), + ] = None + presence_penalty: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="presencePenalty"), + pydantic.Field( + alias="presencePenalty", + description="This is the presence penalty parameter that influences the model's likelihood to repeat information by penalizing tokens based on their presence in the text.\nOnly applicable with the Gemini Flash 2.0 Multimodal Live API.", + ), + ] = None + frequency_penalty: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="frequencyPenalty"), + pydantic.Field( + alias="frequencyPenalty", + description="This is the frequency penalty parameter that influences the model's likelihood to repeat tokens by penalizing them based on their frequency in the text.\nOnly applicable with the Gemini Flash 2.0 Multimodal Live API.", + ), + ] = None + speech_config: typing_extensions.Annotated[ + typing.Optional[GeminiMultimodalLiveSpeechConfig], + FieldMetadata(alias="speechConfig"), + pydantic.Field( + alias="speechConfig", + description="This is the speech configuration object that defines the voice settings to be used for the model's speech output.\nOnly applicable with the Gemini Flash 2.0 Multimodal Live API.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/google_sheets_o_auth_2_authorization_credential.py b/src/vapi/types/google_sheets_o_auth_2_authorization_credential.py new file mode 100644 index 00000000..d3f88c66 --- /dev/null +++ b/src/vapi/types/google_sheets_o_auth_2_authorization_credential.py @@ -0,0 +1,60 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .google_sheets_o_auth_2_authorization_credential_provider import GoogleSheetsOAuth2AuthorizationCredentialProvider + + +class GoogleSheetsOAuth2AuthorizationCredential(UncheckedBaseModel): + provider: GoogleSheetsOAuth2AuthorizationCredentialProvider + authorization_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="authorizationId"), + pydantic.Field(alias="authorizationId", description="The authorization ID for the OAuth2 authorization"), + ] + id: str = pydantic.Field() + """ + This is the unique identifier for the credential. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/google_sheets_o_auth_2_authorization_credential_provider.py b/src/vapi/types/google_sheets_o_auth_2_authorization_credential_provider.py new file mode 100644 index 00000000..974e9dbf --- /dev/null +++ b/src/vapi/types/google_sheets_o_auth_2_authorization_credential_provider.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +GoogleSheetsOAuth2AuthorizationCredentialProvider = typing.Union[ + typing.Literal["google.sheets.oauth2-authorization"], typing.Any +] diff --git a/src/vapi/types/google_sheets_row_append_tool.py b/src/vapi/types/google_sheets_row_append_tool.py new file mode 100644 index 00000000..fc56b24b --- /dev/null +++ b/src/vapi/types/google_sheets_row_append_tool.py @@ -0,0 +1,70 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .google_sheets_row_append_tool_messages_item import GoogleSheetsRowAppendToolMessagesItem +from .tool_rejection_plan import ToolRejectionPlan + + +class GoogleSheetsRowAppendTool(UncheckedBaseModel): + messages: typing.Optional[typing.List[GoogleSheetsRowAppendToolMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + id: str = pydantic.Field() + """ + This is the unique identifier for the tool. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the organization that this tool belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the tool was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", description="This is the ISO 8601 date-time string of when the tool was last updated." + ), + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(GoogleSheetsRowAppendTool) diff --git a/src/vapi/types/google_sheets_row_append_tool_messages_item.py b/src/vapi/types/google_sheets_row_append_tool_messages_item.py new file mode 100644 index 00000000..c5b6277b --- /dev/null +++ b/src/vapi/types/google_sheets_row_append_tool_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class GoogleSheetsRowAppendToolMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoogleSheetsRowAppendToolMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoogleSheetsRowAppendToolMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoogleSheetsRowAppendToolMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +GoogleSheetsRowAppendToolMessagesItem = typing_extensions.Annotated[ + typing.Union[ + GoogleSheetsRowAppendToolMessagesItem_RequestStart, + GoogleSheetsRowAppendToolMessagesItem_RequestComplete, + GoogleSheetsRowAppendToolMessagesItem_RequestFailed, + GoogleSheetsRowAppendToolMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/google_sheets_row_append_tool_provider_details.py b/src/vapi/types/google_sheets_row_append_tool_provider_details.py new file mode 100644 index 00000000..2be62b70 --- /dev/null +++ b/src/vapi/types/google_sheets_row_append_tool_provider_details.py @@ -0,0 +1,35 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .tool_template_setup import ToolTemplateSetup + + +class GoogleSheetsRowAppendToolProviderDetails(UncheckedBaseModel): + template_url: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="templateUrl"), + pydantic.Field( + alias="templateUrl", + description="This is the Template URL or the Snapshot URL corresponding to the Template.", + ), + ] = None + setup_instructions: typing_extensions.Annotated[ + typing.Optional[typing.List[ToolTemplateSetup]], + FieldMetadata(alias="setupInstructions"), + pydantic.Field(alias="setupInstructions"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/google_sheets_row_append_tool_with_tool_call.py b/src/vapi/types/google_sheets_row_append_tool_with_tool_call.py new file mode 100644 index 00000000..228e8dfd --- /dev/null +++ b/src/vapi/types/google_sheets_row_append_tool_with_tool_call.py @@ -0,0 +1,55 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .google_sheets_row_append_tool_with_tool_call_messages_item import ( + GoogleSheetsRowAppendToolWithToolCallMessagesItem, +) +from .google_sheets_row_append_tool_with_tool_call_type import GoogleSheetsRowAppendToolWithToolCallType +from .tool_call import ToolCall +from .tool_rejection_plan import ToolRejectionPlan + + +class GoogleSheetsRowAppendToolWithToolCall(UncheckedBaseModel): + messages: typing.Optional[typing.List[GoogleSheetsRowAppendToolWithToolCallMessagesItem]] = pydantic.Field( + default=None + ) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + type: GoogleSheetsRowAppendToolWithToolCallType = pydantic.Field() + """ + The type of tool. "google.sheets.row.append" for Google Sheets Row Append tool. + """ + + tool_call: typing_extensions.Annotated[ToolCall, FieldMetadata(alias="toolCall"), pydantic.Field(alias="toolCall")] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(GoogleSheetsRowAppendToolWithToolCall) diff --git a/src/vapi/types/google_sheets_row_append_tool_with_tool_call_messages_item.py b/src/vapi/types/google_sheets_row_append_tool_with_tool_call_messages_item.py new file mode 100644 index 00000000..bbef2343 --- /dev/null +++ b/src/vapi/types/google_sheets_row_append_tool_with_tool_call_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class GoogleSheetsRowAppendToolWithToolCallMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoogleSheetsRowAppendToolWithToolCallMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoogleSheetsRowAppendToolWithToolCallMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GoogleSheetsRowAppendToolWithToolCallMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +GoogleSheetsRowAppendToolWithToolCallMessagesItem = typing_extensions.Annotated[ + typing.Union[ + GoogleSheetsRowAppendToolWithToolCallMessagesItem_RequestStart, + GoogleSheetsRowAppendToolWithToolCallMessagesItem_RequestComplete, + GoogleSheetsRowAppendToolWithToolCallMessagesItem_RequestFailed, + GoogleSheetsRowAppendToolWithToolCallMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/google_sheets_row_append_tool_with_tool_call_type.py b/src/vapi/types/google_sheets_row_append_tool_with_tool_call_type.py new file mode 100644 index 00000000..24c7142d --- /dev/null +++ b/src/vapi/types/google_sheets_row_append_tool_with_tool_call_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +GoogleSheetsRowAppendToolWithToolCallType = typing.Union[typing.Literal["google.sheets.row.append"], typing.Any] diff --git a/src/vapi/types/google_transcriber.py b/src/vapi/types/google_transcriber.py new file mode 100644 index 00000000..092cb05c --- /dev/null +++ b/src/vapi/types/google_transcriber.py @@ -0,0 +1,42 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .fallback_transcriber_plan import FallbackTranscriberPlan +from .google_transcriber_language import GoogleTranscriberLanguage +from .google_transcriber_model import GoogleTranscriberModel + + +class GoogleTranscriber(UncheckedBaseModel): + model: typing.Optional[GoogleTranscriberModel] = pydantic.Field(default=None) + """ + This is the model that will be used for the transcription. + """ + + language: typing.Optional[GoogleTranscriberLanguage] = pydantic.Field(default=None) + """ + This is the language that will be set for the transcription. + """ + + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field( + alias="fallbackPlan", + description="This is the plan for transcriber provider fallbacks in the event that the primary transcriber provider fails.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/google_transcriber_language.py b/src/vapi/types/google_transcriber_language.py new file mode 100644 index 00000000..40218a04 --- /dev/null +++ b/src/vapi/types/google_transcriber_language.py @@ -0,0 +1,48 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +GoogleTranscriberLanguage = typing.Union[ + typing.Literal[ + "Multilingual", + "Arabic", + "Bengali", + "Bulgarian", + "Chinese", + "Croatian", + "Czech", + "Danish", + "Dutch", + "English", + "Estonian", + "Finnish", + "French", + "German", + "Greek", + "Hebrew", + "Hindi", + "Hungarian", + "Indonesian", + "Italian", + "Japanese", + "Korean", + "Latvian", + "Lithuanian", + "Norwegian", + "Polish", + "Portuguese", + "Romanian", + "Russian", + "Serbian", + "Slovak", + "Slovenian", + "Spanish", + "Swahili", + "Swedish", + "Thai", + "Turkish", + "Ukrainian", + "Vietnamese", + ], + typing.Any, +] diff --git a/src/vapi/types/google_transcriber_model.py b/src/vapi/types/google_transcriber_model.py new file mode 100644 index 00000000..783a8754 --- /dev/null +++ b/src/vapi/types/google_transcriber_model.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +GoogleTranscriberModel = typing.Union[ + typing.Literal[ + "gemini-3-flash-preview", + "gemini-2.5-pro", + "gemini-2.5-flash", + "gemini-2.5-flash-lite", + "gemini-2.0-flash-thinking-exp", + "gemini-2.0-pro-exp-02-05", + "gemini-2.0-flash", + "gemini-2.0-flash-lite", + "gemini-2.0-flash-exp", + "gemini-2.0-flash-realtime-exp", + "gemini-1.5-flash", + "gemini-1.5-flash-002", + "gemini-1.5-pro", + "gemini-1.5-pro-002", + "gemini-1.0-pro", + ], + typing.Any, +] diff --git a/src/vapi/types/google_voicemail_detection_plan.py b/src/vapi/types/google_voicemail_detection_plan.py new file mode 100644 index 00000000..73420d06 --- /dev/null +++ b/src/vapi/types/google_voicemail_detection_plan.py @@ -0,0 +1,49 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .google_voicemail_detection_plan_provider import GoogleVoicemailDetectionPlanProvider +from .google_voicemail_detection_plan_type import GoogleVoicemailDetectionPlanType +from .voicemail_detection_backoff_plan import VoicemailDetectionBackoffPlan + + +class GoogleVoicemailDetectionPlan(UncheckedBaseModel): + beep_max_await_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="beepMaxAwaitSeconds"), + pydantic.Field( + alias="beepMaxAwaitSeconds", + description="This is the maximum duration from the start of the call that we will wait for a voicemail beep, before speaking our message\n\n- If we detect a voicemail beep before this, we will speak the message at that point.\n\n- Setting too low a value means that the bot will start speaking its voicemail message too early. If it does so before the actual beep, it will get cut off. You should definitely tune this to your use case.\n\n@default 30\n@min 0\n@max 60", + ), + ] = None + provider: GoogleVoicemailDetectionPlanProvider = pydantic.Field() + """ + This is the provider to use for voicemail detection. + """ + + backoff_plan: typing_extensions.Annotated[ + typing.Optional[VoicemailDetectionBackoffPlan], + FieldMetadata(alias="backoffPlan"), + pydantic.Field(alias="backoffPlan", description="This is the backoff plan for the voicemail detection."), + ] = None + type: typing.Optional[GoogleVoicemailDetectionPlanType] = pydantic.Field(default=None) + """ + This is the detection type to use for voicemail detection. + - 'audio': Uses native audio models (default) + - 'transcript': Uses ASR/transcript-based detection + @default 'audio' (audio detection) + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/google_voicemail_detection_plan_provider.py b/src/vapi/types/google_voicemail_detection_plan_provider.py new file mode 100644 index 00000000..5d5055be --- /dev/null +++ b/src/vapi/types/google_voicemail_detection_plan_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +GoogleVoicemailDetectionPlanProvider = typing.Union[typing.Literal["google"], typing.Any] diff --git a/src/vapi/types/google_voicemail_detection_plan_type.py b/src/vapi/types/google_voicemail_detection_plan_type.py new file mode 100644 index 00000000..cf646582 --- /dev/null +++ b/src/vapi/types/google_voicemail_detection_plan_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +GoogleVoicemailDetectionPlanType = typing.Union[typing.Literal["audio", "transcript"], typing.Any] diff --git a/src/vapi/types/groq_credential.py b/src/vapi/types/groq_credential.py index f0bb13eb..7375e1f8 100644 --- a/src/vapi/types/groq_credential.py +++ b/src/vapi/types/groq_credential.py @@ -1,39 +1,53 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +import datetime as dt import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic -import datetime as dt +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .groq_credential_provider import GroqCredentialProvider -class GroqCredential(UniversalBaseModel): - provider: typing.Literal["groq"] = "groq" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() - """ - This is not returned in the API. - """ - +class GroqCredential(UncheckedBaseModel): + provider: GroqCredentialProvider + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] id: str = pydantic.Field() """ This is the unique identifier for the credential. """ - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field() - """ - This is the unique identifier for the org that this credential belongs to. - """ - - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the credential was created. - """ - - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the assistant was last updated. + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/groq_credential_provider.py b/src/vapi/types/groq_credential_provider.py new file mode 100644 index 00000000..e1c26483 --- /dev/null +++ b/src/vapi/types/groq_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +GroqCredentialProvider = typing.Union[typing.Literal["groq"], typing.Any] diff --git a/src/vapi/types/groq_model.py b/src/vapi/types/groq_model.py index d7ccf2fd..6f6c6172 100644 --- a/src/vapi/types/groq_model.py +++ b/src/vapi/types/groq_model.py @@ -1,85 +1,79 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +from __future__ import annotations + import typing -from .open_ai_message import OpenAiMessage + import pydantic -from .groq_model_tools_item import GroqModelToolsItem import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_custom_knowledge_base_dto import CreateCustomKnowledgeBaseDto from .groq_model_model import GroqModelModel -from .knowledge_base import KnowledgeBase -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from .open_ai_message import OpenAiMessage -class GroqModel(UniversalBaseModel): +class GroqModel(UncheckedBaseModel): messages: typing.Optional[typing.List[OpenAiMessage]] = pydantic.Field(default=None) """ This is the starting state for the conversation. """ - tools: typing.Optional[typing.List[GroqModelToolsItem]] = pydantic.Field(default=None) + tools: typing.Optional[typing.List["GroqModelToolsItem"]] = pydantic.Field(default=None) """ These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`. Both `tools` and `toolIds` can be used together. """ - tool_ids: typing_extensions.Annotated[typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds")] = ( - pydantic.Field(default=None) - ) - """ - These are the tools that the assistant can use during the call. To use transient tools, use `tools`. - - Both `tools` and `toolIds` can be used together. - """ - + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="toolIds"), + pydantic.Field( + alias="toolIds", + description="These are the tools that the assistant can use during the call. To use transient tools, use `tools`.\n\nBoth `tools` and `toolIds` can be used together.", + ), + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase", description="These are the options for the knowledge base."), + ] = None model: GroqModelModel = pydantic.Field() """ This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b """ - provider: typing.Literal["groq"] = "groq" temperature: typing.Optional[float] = pydantic.Field(default=None) """ This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency. """ - knowledge_base: typing_extensions.Annotated[ - typing.Optional[KnowledgeBase], FieldMetadata(alias="knowledgeBase") - ] = pydantic.Field(default=None) - """ - These are the options for the knowledge base. - """ - - max_tokens: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="maxTokens")] = pydantic.Field( - default=None - ) - """ - This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250. - """ - + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="maxTokens"), + pydantic.Field( + alias="maxTokens", + description="This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.", + ), + ] = None emotion_recognition_enabled: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="emotionRecognitionEnabled") - ] = pydantic.Field(default=None) - """ - This determines whether we detect user's emotion while they speak and send it as an additional info to model. - - Default `false` because the model is usually are good at understanding the user's emotion from text. - - @default false - """ - - num_fast_turns: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="numFastTurns")] = ( - pydantic.Field(default=None) - ) - """ - This sets how many turns at the start of the conversation to use a smaller, faster model from the same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai. - - Default is 0. - - @default 0 - """ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field( + alias="emotionRecognitionEnabled", + description="This determines whether we detect user's emotion while they speak and send it as an additional info to model.\n\nDefault `false` because the model is usually are good at understanding the user's emotion from text.\n\n@default false", + ), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="numFastTurns"), + pydantic.Field( + alias="numFastTurns", + description="This sets how many turns at the start of the conversation to use a smaller, faster model from the same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai.\n\nDefault is 0.\n\n@default 0", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -89,3 +83,121 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + GroqModel, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/groq_model_model.py b/src/vapi/types/groq_model_model.py index 809b43e8..ae9358b9 100644 --- a/src/vapi/types/groq_model_model.py +++ b/src/vapi/types/groq_model_model.py @@ -4,16 +4,21 @@ GroqModelModel = typing.Union[ typing.Literal[ + "openai/gpt-oss-20b", + "openai/gpt-oss-120b", + "deepseek-r1-distill-llama-70b", + "llama-3.3-70b-versatile", "llama-3.1-405b-reasoning", - "llama-3.1-70b-versatile", "llama-3.1-8b-instant", - "mixtral-8x7b-32768", "llama3-8b-8192", "llama3-70b-8192", - "llama3-groq-8b-8192-tool-use-preview", - "llama3-groq-70b-8192-tool-use-preview", - "gemma-7b-it", "gemma2-9b-it", + "moonshotai/kimi-k2-instruct-0905", + "meta-llama/llama-4-maverick-17b-128e-instruct", + "meta-llama/llama-4-scout-17b-16e-instruct", + "mistral-saba-24b", + "compound-beta", + "compound-beta-mini", ], typing.Any, ] diff --git a/src/vapi/types/groq_model_tools_item.py b/src/vapi/types/groq_model_tools_item.py index 15afac5f..db0595f8 100644 --- a/src/vapi/types/groq_model_tools_item.py +++ b/src/vapi/types/groq_model_tools_item.py @@ -1,20 +1,731 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .create_dtmf_tool_dto import CreateDtmfToolDto -from .create_end_call_tool_dto import CreateEndCallToolDto -from .create_voicemail_tool_dto import CreateVoicemailToolDto -from .create_function_tool_dto import CreateFunctionToolDto -from .create_ghl_tool_dto import CreateGhlToolDto -from .create_make_tool_dto import CreateMakeToolDto -from .create_transfer_call_tool_dto import CreateTransferCallToolDto - -GroqModelToolsItem = typing.Union[ - CreateDtmfToolDto, - CreateEndCallToolDto, - CreateVoicemailToolDto, - CreateFunctionToolDto, - CreateGhlToolDto, - CreateMakeToolDto, - CreateTransferCallToolDto, + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .backoff_plan import BackoffPlan +from .code_tool_environment_variable import CodeToolEnvironmentVariable +from .create_api_request_tool_dto_messages_item import CreateApiRequestToolDtoMessagesItem +from .create_api_request_tool_dto_method import CreateApiRequestToolDtoMethod +from .create_bash_tool_dto_messages_item import CreateBashToolDtoMessagesItem +from .create_bash_tool_dto_name import CreateBashToolDtoName +from .create_bash_tool_dto_sub_type import CreateBashToolDtoSubType +from .create_code_tool_dto_messages_item import CreateCodeToolDtoMessagesItem +from .create_computer_tool_dto_messages_item import CreateComputerToolDtoMessagesItem +from .create_computer_tool_dto_name import CreateComputerToolDtoName +from .create_computer_tool_dto_sub_type import CreateComputerToolDtoSubType +from .create_dtmf_tool_dto_messages_item import CreateDtmfToolDtoMessagesItem +from .create_end_call_tool_dto_messages_item import CreateEndCallToolDtoMessagesItem +from .create_function_tool_dto_messages_item import CreateFunctionToolDtoMessagesItem +from .create_go_high_level_calendar_availability_tool_dto_messages_item import ( + CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem, +) +from .create_go_high_level_calendar_event_create_tool_dto_messages_item import ( + CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_create_tool_dto_messages_item import ( + CreateGoHighLevelContactCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_get_tool_dto_messages_item import CreateGoHighLevelContactGetToolDtoMessagesItem +from .create_google_calendar_check_availability_tool_dto_messages_item import ( + CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem, +) +from .create_google_calendar_create_event_tool_dto_messages_item import ( + CreateGoogleCalendarCreateEventToolDtoMessagesItem, +) +from .create_google_sheets_row_append_tool_dto_messages_item import CreateGoogleSheetsRowAppendToolDtoMessagesItem +from .create_handoff_tool_dto_messages_item import CreateHandoffToolDtoMessagesItem +from .create_mcp_tool_dto_messages_item import CreateMcpToolDtoMessagesItem +from .create_query_tool_dto_messages_item import CreateQueryToolDtoMessagesItem +from .create_sip_request_tool_dto_body import CreateSipRequestToolDtoBody +from .create_sip_request_tool_dto_messages_item import CreateSipRequestToolDtoMessagesItem +from .create_sip_request_tool_dto_verb import CreateSipRequestToolDtoVerb +from .create_slack_send_message_tool_dto_messages_item import CreateSlackSendMessageToolDtoMessagesItem +from .create_sms_tool_dto_messages_item import CreateSmsToolDtoMessagesItem +from .create_text_editor_tool_dto_messages_item import CreateTextEditorToolDtoMessagesItem +from .create_text_editor_tool_dto_name import CreateTextEditorToolDtoName +from .create_text_editor_tool_dto_sub_type import CreateTextEditorToolDtoSubType +from .create_transfer_call_tool_dto_destinations_item import CreateTransferCallToolDtoDestinationsItem +from .create_transfer_call_tool_dto_messages_item import CreateTransferCallToolDtoMessagesItem +from .create_voicemail_tool_dto_messages_item import CreateVoicemailToolDtoMessagesItem +from .knowledge_base import KnowledgeBase +from .mcp_tool_messages import McpToolMessages +from .mcp_tool_metadata import McpToolMetadata +from .open_ai_function import OpenAiFunction +from .server import Server +from .tool_parameter import ToolParameter +from .tool_rejection_plan import ToolRejectionPlan +from .variable_extraction_plan import VariableExtractionPlan + + +class GroqModelToolsItem_ApiRequest(UncheckedBaseModel): + type: typing.Literal["apiRequest"] = "apiRequest" + messages: typing.Optional[typing.List[CreateApiRequestToolDtoMessagesItem]] = None + method: CreateApiRequestToolDtoMethod + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + encrypted_paths: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="encryptedPaths"), pydantic.Field(alias="encryptedPaths") + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + name: typing.Optional[str] = None + description: typing.Optional[str] = None + url: str + body: typing.Optional["JsonSchema"] = None + headers: typing.Optional["JsonSchema"] = None + backoff_plan: typing_extensions.Annotated[ + typing.Optional[BackoffPlan], FieldMetadata(alias="backoffPlan"), pydantic.Field(alias="backoffPlan") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GroqModelToolsItem_Bash(UncheckedBaseModel): + type: typing.Literal["bash"] = "bash" + messages: typing.Optional[typing.List[CreateBashToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateBashToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateBashToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GroqModelToolsItem_Code(UncheckedBaseModel): + type: typing.Literal["code"] = "code" + messages: typing.Optional[typing.List[CreateCodeToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + code: str + environment_variables: typing_extensions.Annotated[ + typing.Optional[typing.List[CodeToolEnvironmentVariable]], + FieldMetadata(alias="environmentVariables"), + pydantic.Field(alias="environmentVariables"), + ] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GroqModelToolsItem_Computer(UncheckedBaseModel): + type: typing.Literal["computer"] = "computer" + messages: typing.Optional[typing.List[CreateComputerToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateComputerToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateComputerToolDtoName + display_width_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayWidthPx"), pydantic.Field(alias="displayWidthPx") + ] + display_height_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayHeightPx"), pydantic.Field(alias="displayHeightPx") + ] + display_number: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="displayNumber"), pydantic.Field(alias="displayNumber") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GroqModelToolsItem_Dtmf(UncheckedBaseModel): + type: typing.Literal["dtmf"] = "dtmf" + messages: typing.Optional[typing.List[CreateDtmfToolDtoMessagesItem]] = None + sip_info_dtmf_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="sipInfoDtmfEnabled"), pydantic.Field(alias="sipInfoDtmfEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GroqModelToolsItem_EndCall(UncheckedBaseModel): + type: typing.Literal["endCall"] = "endCall" + messages: typing.Optional[typing.List[CreateEndCallToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GroqModelToolsItem_Function(UncheckedBaseModel): + type: typing.Literal["function"] = "function" + messages: typing.Optional[typing.List[CreateFunctionToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GroqModelToolsItem_GohighlevelCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.availability.check"] = "gohighlevel.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GroqModelToolsItem_GohighlevelCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.event.create"] = "gohighlevel.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GroqModelToolsItem_GohighlevelContactCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.create"] = "gohighlevel.contact.create" + messages: typing.Optional[typing.List[CreateGoHighLevelContactCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GroqModelToolsItem_GohighlevelContactGet(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.get"] = "gohighlevel.contact.get" + messages: typing.Optional[typing.List[CreateGoHighLevelContactGetToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GroqModelToolsItem_GoogleCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["google.calendar.availability.check"] = "google.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GroqModelToolsItem_GoogleCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["google.calendar.event.create"] = "google.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoogleCalendarCreateEventToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GroqModelToolsItem_GoogleSheetsRowAppend(UncheckedBaseModel): + type: typing.Literal["google.sheets.row.append"] = "google.sheets.row.append" + messages: typing.Optional[typing.List[CreateGoogleSheetsRowAppendToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GroqModelToolsItem_Handoff(UncheckedBaseModel): + type: typing.Literal["handoff"] = "handoff" + messages: typing.Optional[typing.List[CreateHandoffToolDtoMessagesItem]] = None + default_result: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="defaultResult"), pydantic.Field(alias="defaultResult") + ] = None + destinations: typing.Optional[typing.List["CreateHandoffToolDtoDestinationsItem"]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GroqModelToolsItem_Mcp(UncheckedBaseModel): + type: typing.Literal["mcp"] = "mcp" + messages: typing.Optional[typing.List[CreateMcpToolDtoMessagesItem]] = None + server: typing.Optional[Server] = None + tool_messages: typing_extensions.Annotated[ + typing.Optional[typing.List[McpToolMessages]], + FieldMetadata(alias="toolMessages"), + pydantic.Field(alias="toolMessages"), + ] = None + metadata: typing.Optional[McpToolMetadata] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GroqModelToolsItem_Query(UncheckedBaseModel): + type: typing.Literal["query"] = "query" + messages: typing.Optional[typing.List[CreateQueryToolDtoMessagesItem]] = None + knowledge_bases: typing_extensions.Annotated[ + typing.Optional[typing.List[KnowledgeBase]], + FieldMetadata(alias="knowledgeBases"), + pydantic.Field(alias="knowledgeBases"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GroqModelToolsItem_SlackMessageSend(UncheckedBaseModel): + type: typing.Literal["slack.message.send"] = "slack.message.send" + messages: typing.Optional[typing.List[CreateSlackSendMessageToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GroqModelToolsItem_Sms(UncheckedBaseModel): + type: typing.Literal["sms"] = "sms" + messages: typing.Optional[typing.List[CreateSmsToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GroqModelToolsItem_TextEditor(UncheckedBaseModel): + type: typing.Literal["textEditor"] = "textEditor" + messages: typing.Optional[typing.List[CreateTextEditorToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateTextEditorToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateTextEditorToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GroqModelToolsItem_TransferCall(UncheckedBaseModel): + type: typing.Literal["transferCall"] = "transferCall" + messages: typing.Optional[typing.List[CreateTransferCallToolDtoMessagesItem]] = None + destinations: typing.Optional[typing.List[CreateTransferCallToolDtoDestinationsItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GroqModelToolsItem_SipRequest(UncheckedBaseModel): + type: typing.Literal["sipRequest"] = "sipRequest" + messages: typing.Optional[typing.List[CreateSipRequestToolDtoMessagesItem]] = None + verb: CreateSipRequestToolDtoVerb + headers: typing.Optional["JsonSchema"] = None + body: typing.Optional[CreateSipRequestToolDtoBody] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GroqModelToolsItem_Voicemail(UncheckedBaseModel): + type: typing.Literal["voicemail"] = "voicemail" + messages: typing.Optional[typing.List[CreateVoicemailToolDtoMessagesItem]] = None + beep_detection_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="beepDetectionEnabled"), pydantic.Field(alias="beepDetectionEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +GroqModelToolsItem = typing_extensions.Annotated[ + typing.Union[ + GroqModelToolsItem_ApiRequest, + GroqModelToolsItem_Bash, + GroqModelToolsItem_Code, + GroqModelToolsItem_Computer, + GroqModelToolsItem_Dtmf, + GroqModelToolsItem_EndCall, + GroqModelToolsItem_Function, + GroqModelToolsItem_GohighlevelCalendarAvailabilityCheck, + GroqModelToolsItem_GohighlevelCalendarEventCreate, + GroqModelToolsItem_GohighlevelContactCreate, + GroqModelToolsItem_GohighlevelContactGet, + GroqModelToolsItem_GoogleCalendarAvailabilityCheck, + GroqModelToolsItem_GoogleCalendarEventCreate, + GroqModelToolsItem_GoogleSheetsRowAppend, + GroqModelToolsItem_Handoff, + GroqModelToolsItem_Mcp, + GroqModelToolsItem_Query, + GroqModelToolsItem_SlackMessageSend, + GroqModelToolsItem_Sms, + GroqModelToolsItem_TextEditor, + GroqModelToolsItem_TransferCall, + GroqModelToolsItem_SipRequest, + GroqModelToolsItem_Voicemail, + ], + UnionMetadata(discriminant="type"), ] +from .json_schema import JsonSchema # noqa: E402, I001 +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs(GroqModelToolsItem_ApiRequest, JsonSchema=JsonSchema) +update_forward_refs(GroqModelToolsItem_Bash) +update_forward_refs(GroqModelToolsItem_Code) +update_forward_refs(GroqModelToolsItem_Computer) +update_forward_refs(GroqModelToolsItem_Dtmf) +update_forward_refs(GroqModelToolsItem_EndCall) +update_forward_refs(GroqModelToolsItem_Function) +update_forward_refs(GroqModelToolsItem_GohighlevelCalendarAvailabilityCheck) +update_forward_refs(GroqModelToolsItem_GohighlevelCalendarEventCreate) +update_forward_refs(GroqModelToolsItem_GohighlevelContactCreate) +update_forward_refs(GroqModelToolsItem_GohighlevelContactGet) +update_forward_refs(GroqModelToolsItem_GoogleCalendarAvailabilityCheck) +update_forward_refs(GroqModelToolsItem_GoogleCalendarEventCreate) +update_forward_refs(GroqModelToolsItem_GoogleSheetsRowAppend) +update_forward_refs( + GroqModelToolsItem_Handoff, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs(GroqModelToolsItem_Mcp) +update_forward_refs(GroqModelToolsItem_Query) +update_forward_refs(GroqModelToolsItem_SlackMessageSend) +update_forward_refs(GroqModelToolsItem_Sms) +update_forward_refs(GroqModelToolsItem_TextEditor) +update_forward_refs(GroqModelToolsItem_TransferCall) +update_forward_refs(GroqModelToolsItem_SipRequest, JsonSchema=JsonSchema) +update_forward_refs(GroqModelToolsItem_Voicemail) diff --git a/src/vapi/types/group_condition.py b/src/vapi/types/group_condition.py new file mode 100644 index 00000000..9e55b704 --- /dev/null +++ b/src/vapi/types/group_condition.py @@ -0,0 +1,37 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .group_condition_operator import GroupConditionOperator + + +class GroupCondition(UncheckedBaseModel): + operator: GroupConditionOperator = pydantic.Field() + """ + This is the logical operator for combining conditions in this group + """ + + conditions: typing.List["GroupConditionConditionsItem"] = pydantic.Field() + """ + This is the list of nested conditions to evaluate. + Supports recursive nesting of groups for complex logic. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .group_condition_conditions_item import GroupConditionConditionsItem # noqa: E402, I001 + +update_forward_refs(GroupCondition, GroupConditionConditionsItem=GroupConditionConditionsItem) diff --git a/src/vapi/types/group_condition_conditions_item.py b/src/vapi/types/group_condition_conditions_item.py new file mode 100644 index 00000000..ed08510f --- /dev/null +++ b/src/vapi/types/group_condition_conditions_item.py @@ -0,0 +1,66 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .group_condition_operator import GroupConditionOperator +from .message_target import MessageTarget + + +class GroupConditionConditionsItem_Regex(UncheckedBaseModel): + type: typing.Literal["regex"] = "regex" + regex: str + target: typing.Optional[MessageTarget] = None + negate: typing.Optional[bool] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GroupConditionConditionsItem_Liquid(UncheckedBaseModel): + type: typing.Literal["liquid"] = "liquid" + liquid: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class GroupConditionConditionsItem_Group(UncheckedBaseModel): + type: typing.Literal["group"] = "group" + operator: GroupConditionOperator + conditions: typing.List["GroupConditionConditionsItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +GroupConditionConditionsItem = typing_extensions.Annotated[ + typing.Union[ + GroupConditionConditionsItem_Regex, GroupConditionConditionsItem_Liquid, GroupConditionConditionsItem_Group + ], + UnionMetadata(discriminant="type"), +] +update_forward_refs(GroupConditionConditionsItem_Group, GroupConditionConditionsItem=GroupConditionConditionsItem) diff --git a/src/vapi/types/group_condition_operator.py b/src/vapi/types/group_condition_operator.py new file mode 100644 index 00000000..d5d13a9a --- /dev/null +++ b/src/vapi/types/group_condition_operator.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +GroupConditionOperator = typing.Union[typing.Literal["AND", "OR"], typing.Any] diff --git a/src/vapi/types/handoff_destination_assistant.py b/src/vapi/types/handoff_destination_assistant.py new file mode 100644 index 00000000..3c413154 --- /dev/null +++ b/src/vapi/types/handoff_destination_assistant.py @@ -0,0 +1,193 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .handoff_destination_assistant_context_engineering_plan import HandoffDestinationAssistantContextEngineeringPlan +from .handoff_destination_assistant_type import HandoffDestinationAssistantType +from .variable_extraction_plan import VariableExtractionPlan + + +class HandoffDestinationAssistant(UncheckedBaseModel): + type: HandoffDestinationAssistantType + context_engineering_plan: typing_extensions.Annotated[ + typing.Optional[HandoffDestinationAssistantContextEngineeringPlan], + FieldMetadata(alias="contextEngineeringPlan"), + pydantic.Field( + alias="contextEngineeringPlan", + description="This is the plan for manipulating the message context before handing off the call to the next assistant.", + ), + ] = None + assistant_name: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assistantName"), + pydantic.Field( + alias="assistantName", + description="This is the assistant to transfer the call to. You must provide either assistantName or assistantId.", + ), + ] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assistantId"), + pydantic.Field( + alias="assistantId", + description="This is the assistant id to transfer the call to. You must provide either assistantName or assistantId.", + ), + ] = None + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) + """ + This is a transient assistant to transfer the call to. You may provide a transient assistant in the response `handoff-destination-request` in a dynamic handoff. + """ + + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field( + alias="variableExtractionPlan", description="This is the variable extraction plan for the handoff tool." + ), + ] = None + assistant_overrides: typing_extensions.Annotated[ + typing.Optional["AssistantOverrides"], + FieldMetadata(alias="assistantOverrides"), + pydantic.Field( + alias="assistantOverrides", + description="These are the assistant overrides to apply to the destination assistant.", + ), + ] = None + description: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the description of the destination, used by the AI to choose when and how to transfer the call. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + HandoffDestinationAssistant, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/handoff_destination_assistant_context_engineering_plan.py b/src/vapi/types/handoff_destination_assistant_context_engineering_plan.py new file mode 100644 index 00000000..4ce850fe --- /dev/null +++ b/src/vapi/types/handoff_destination_assistant_context_engineering_plan.py @@ -0,0 +1,93 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class HandoffDestinationAssistantContextEngineeringPlan_LastNMessages(UncheckedBaseModel): + """ + This is the plan for manipulating the message context before handing off the call to the next assistant. + """ + + type: typing.Literal["lastNMessages"] = "lastNMessages" + max_messages: typing_extensions.Annotated[ + float, FieldMetadata(alias="maxMessages"), pydantic.Field(alias="maxMessages") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class HandoffDestinationAssistantContextEngineeringPlan_None(UncheckedBaseModel): + """ + This is the plan for manipulating the message context before handing off the call to the next assistant. + """ + + type: typing.Literal["none"] = "none" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class HandoffDestinationAssistantContextEngineeringPlan_All(UncheckedBaseModel): + """ + This is the plan for manipulating the message context before handing off the call to the next assistant. + """ + + type: typing.Literal["all"] = "all" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class HandoffDestinationAssistantContextEngineeringPlan_UserAndAssistantMessages(UncheckedBaseModel): + """ + This is the plan for manipulating the message context before handing off the call to the next assistant. + """ + + type: typing.Literal["userAndAssistantMessages"] = "userAndAssistantMessages" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +HandoffDestinationAssistantContextEngineeringPlan = typing_extensions.Annotated[ + typing.Union[ + HandoffDestinationAssistantContextEngineeringPlan_LastNMessages, + HandoffDestinationAssistantContextEngineeringPlan_None, + HandoffDestinationAssistantContextEngineeringPlan_All, + HandoffDestinationAssistantContextEngineeringPlan_UserAndAssistantMessages, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/handoff_destination_assistant_type.py b/src/vapi/types/handoff_destination_assistant_type.py new file mode 100644 index 00000000..e0c3789d --- /dev/null +++ b/src/vapi/types/handoff_destination_assistant_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +HandoffDestinationAssistantType = typing.Union[typing.Literal["assistant"], typing.Any] diff --git a/src/vapi/types/handoff_destination_dynamic.py b/src/vapi/types/handoff_destination_dynamic.py new file mode 100644 index 00000000..520c8750 --- /dev/null +++ b/src/vapi/types/handoff_destination_dynamic.py @@ -0,0 +1,36 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .server import Server + + +class HandoffDestinationDynamic(UncheckedBaseModel): + server: typing.Optional[Server] = pydantic.Field(default=None) + """ + This is where Vapi will send the handoff-destination-request webhook in a dynamic handoff. + + The order of precedence is: + + 1. tool.server.url + 2. assistant.server.url + 3. phoneNumber.server.url + 4. org.server.url + """ + + description: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the description of the destination, used by the AI to choose when and how to transfer the call. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/handoff_destination_squad.py b/src/vapi/types/handoff_destination_squad.py new file mode 100644 index 00000000..c7be3f6b --- /dev/null +++ b/src/vapi/types/handoff_destination_squad.py @@ -0,0 +1,188 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .handoff_destination_squad_context_engineering_plan import HandoffDestinationSquadContextEngineeringPlan +from .variable_extraction_plan import VariableExtractionPlan + + +class HandoffDestinationSquad(UncheckedBaseModel): + context_engineering_plan: typing_extensions.Annotated[ + typing.Optional[HandoffDestinationSquadContextEngineeringPlan], + FieldMetadata(alias="contextEngineeringPlan"), + pydantic.Field( + alias="contextEngineeringPlan", + description="This is the plan for manipulating the message context before handing off the call to the squad.", + ), + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="squadId"), + pydantic.Field(alias="squadId", description="This is the squad id to transfer the call to."), + ] = None + squad: typing.Optional["CreateSquadDto"] = pydantic.Field(default=None) + """ + This is a transient squad to transfer the call to. + """ + + entry_assistant_name: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="entryAssistantName"), + pydantic.Field( + alias="entryAssistantName", + description="This is the name of the entry assistant to start with when handing off to the squad.\nIf not provided, the first member of the squad will be used.", + ), + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field( + alias="variableExtractionPlan", description="This is the variable extraction plan for the handoff tool." + ), + ] = None + squad_overrides: typing_extensions.Annotated[ + typing.Optional["AssistantOverrides"], + FieldMetadata(alias="squadOverrides"), + pydantic.Field( + alias="squadOverrides", + description="These are the overrides to apply to the squad configuration.\nMaps to squad-level membersOverrides.", + ), + ] = None + description: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the description of the destination, used by the AI to choose when and how to transfer the call. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + HandoffDestinationSquad, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/handoff_destination_squad_context_engineering_plan.py b/src/vapi/types/handoff_destination_squad_context_engineering_plan.py new file mode 100644 index 00000000..4fe6f3d5 --- /dev/null +++ b/src/vapi/types/handoff_destination_squad_context_engineering_plan.py @@ -0,0 +1,93 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class HandoffDestinationSquadContextEngineeringPlan_LastNMessages(UncheckedBaseModel): + """ + This is the plan for manipulating the message context before handing off the call to the squad. + """ + + type: typing.Literal["lastNMessages"] = "lastNMessages" + max_messages: typing_extensions.Annotated[ + float, FieldMetadata(alias="maxMessages"), pydantic.Field(alias="maxMessages") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class HandoffDestinationSquadContextEngineeringPlan_None(UncheckedBaseModel): + """ + This is the plan for manipulating the message context before handing off the call to the squad. + """ + + type: typing.Literal["none"] = "none" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class HandoffDestinationSquadContextEngineeringPlan_All(UncheckedBaseModel): + """ + This is the plan for manipulating the message context before handing off the call to the squad. + """ + + type: typing.Literal["all"] = "all" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class HandoffDestinationSquadContextEngineeringPlan_UserAndAssistantMessages(UncheckedBaseModel): + """ + This is the plan for manipulating the message context before handing off the call to the squad. + """ + + type: typing.Literal["userAndAssistantMessages"] = "userAndAssistantMessages" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +HandoffDestinationSquadContextEngineeringPlan = typing_extensions.Annotated[ + typing.Union[ + HandoffDestinationSquadContextEngineeringPlan_LastNMessages, + HandoffDestinationSquadContextEngineeringPlan_None, + HandoffDestinationSquadContextEngineeringPlan_All, + HandoffDestinationSquadContextEngineeringPlan_UserAndAssistantMessages, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/handoff_step.py b/src/vapi/types/handoff_step.py deleted file mode 100644 index e36f3c26..00000000 --- a/src/vapi/types/handoff_step.py +++ /dev/null @@ -1,116 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -import typing -import pydantic -from .step_destination import StepDestination -import typing_extensions -from ..core.serialization import FieldMetadata -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.pydantic_utilities import update_forward_refs - - -class HandoffStep(UniversalBaseModel): - block: typing.Optional["HandoffStepBlock"] = pydantic.Field(default=None) - """ - This is the block to use. To use an existing block, use `blockId`. - """ - - type: typing.Literal["handoff"] = pydantic.Field(default="handoff") - """ - This is a step that takes a handoff from the previous step. This means it won't return to the calling step. The workflow execution will continue linearly. - - Use case: - - - You want to collect information linearly (e.g. a form, provide information, etc). - """ - - destinations: typing.Optional[typing.List[StepDestination]] = pydantic.Field(default=None) - """ - These are the destinations that the step can go to after it's done. - """ - - name: str = pydantic.Field() - """ - This is the name of the step. - """ - - block_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="blockId")] = pydantic.Field( - default=None - ) - """ - This is the id of the block to use. To use a transient block, use `block`. - """ - - input: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None) - """ - This is the input to the block. You can use any key-value map as input to the block. - - Example: - { - "name": "John Doe", - "age": 20 - } - - You can reference any variable in the context of the current block: - - - "{{your-step-name.output.your-property-name}}" for another step's output (in the same workflow; read caveat #1) - - "{{your-step-name.input.your-property-name}}" for another step's input (in the same workflow; read caveat #1) - - "{{your-block-name.output.your-property-name}}" for another block's output (in the same workflow; read caveat #2) - - "{{your-block-name.input.your-property-name}}" for another block's input (in the same workflow; read caveat #2) - - "{{workflow.input.your-property-name}}" for the current workflow's input - - "{{global.your-property-name}}" for the global context - - Example: - { - "name": "{{my-tool-call-step.output.name}}", - "age": "{{my-tool-call-step.input.age}}", - "date": "{{workflow.input.date}}" - } - - You can dynamically change the key name. - - Example: - { - "{{my-tool-call-step.output.key-name-for-name}}": "{{name}}", - "{{my-tool-call-step.input.key-name-for-age}}": "{{age}}", - "{{workflow.input.key-name-for-date}}": "{{date}}" - } - - You can represent the value as a string, number, boolean, array, or object. - - Example: - { - "name": "john", - "age": 20, - "date": "2021-01-01", - "metadata": { - "unique-key": "{{my-tool-call-step.output.unique-key}}" - }, - "array": ["A", "B", "C"], - } - - Caveats: - - 1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.input/output.propertyName}} will reference the latest usage of the step. - 2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.input/output.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .callback_step import CallbackStep # noqa: E402 -from .create_workflow_block_dto import CreateWorkflowBlockDto # noqa: E402 -from .handoff_step_block import HandoffStepBlock # noqa: E402 - -update_forward_refs(CallbackStep, HandoffStep=HandoffStep) -update_forward_refs(CreateWorkflowBlockDto, HandoffStep=HandoffStep) -update_forward_refs(HandoffStep) diff --git a/src/vapi/types/handoff_step_block.py b/src/vapi/types/handoff_step_block.py deleted file mode 100644 index 2875416d..00000000 --- a/src/vapi/types/handoff_step_block.py +++ /dev/null @@ -1,11 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations -import typing -from .create_conversation_block_dto import CreateConversationBlockDto -from .create_tool_call_block_dto import CreateToolCallBlockDto -import typing - -if typing.TYPE_CHECKING: - from .create_workflow_block_dto import CreateWorkflowBlockDto -HandoffStepBlock = typing.Union[CreateConversationBlockDto, CreateToolCallBlockDto, "CreateWorkflowBlockDto"] diff --git a/src/vapi/types/handoff_tool.py b/src/vapi/types/handoff_tool.py new file mode 100644 index 00000000..5fe21b45 --- /dev/null +++ b/src/vapi/types/handoff_tool.py @@ -0,0 +1,353 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .handoff_tool_destinations_item import HandoffToolDestinationsItem +from .handoff_tool_messages_item import HandoffToolMessagesItem +from .open_ai_function import OpenAiFunction +from .tool_rejection_plan import ToolRejectionPlan + + +class HandoffTool(UncheckedBaseModel): + messages: typing.Optional[typing.List[HandoffToolMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + default_result: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="defaultResult"), + pydantic.Field( + alias="defaultResult", + description="This is the default local tool result message used when no runtime handoff result override is returned.", + ), + ] = None + destinations: typing.Optional[typing.List[HandoffToolDestinationsItem]] = pydantic.Field(default=None) + """ + These are the destinations that the call can be handed off to. + + Usage: + 1. Single destination + + Use `assistantId` to handoff the call to a saved assistant, or `assistantName` to handoff the call to an assistant in the same squad. + + ```json + { + "tools": [ + { + "type": "handoff", + "destinations": [ + { + "type": "assistant", + "assistantId": "assistant-123", // or "assistantName": "Assistant123" + "description": "customer wants to be handed off to assistant-123", + "contextEngineeringPlan": { + "type": "all" + } + } + ], + } + ] + } + ``` + + 2. Multiple destinations + + 2.1. Multiple Tools, Each With One Destination (OpenAI recommended) + + ```json + { + "tools": [ + { + "type": "handoff", + "destinations": [ + { + "type": "assistant", + "assistantId": "assistant-123", + "description": "customer wants to be handed off to assistant-123", + "contextEngineeringPlan": { + "type": "all" + } + }, + ], + }, + { + "type": "handoff", + "destinations": [ + { + "type": "assistant", + "assistantId": "assistant-456", + "description": "customer wants to be handed off to assistant-456", + "contextEngineeringPlan": { + "type": "all" + } + } + ], + } + ] + } + ``` + + 2.2. One Tool, Multiple Destinations (Anthropic recommended) + + ```json + { + "tools": [ + { + "type": "handoff", + "destinations": [ + { + "type": "assistant", + "assistantId": "assistant-123", + "description": "customer wants to be handed off to assistant-123", + "contextEngineeringPlan": { + "type": "all" + } + }, + { + "type": "assistant", + "assistantId": "assistant-456", + "description": "customer wants to be handed off to assistant-456", + "contextEngineeringPlan": { + "type": "all" + } + } + ], + } + ] + } + ``` + + 3. Dynamic destination + + 3.1 To determine the destination dynamically, supply a `dynamic` handoff destination type and a `server` object. + VAPI will send a handoff-destination-request webhook to the `server.url`. + The response from the server will be used as the destination (if valid). + + ```json + { + "tools": [ + { + "type": "handoff", + "destinations": [ + { + "type": "dynamic", + "server": { + "url": "https://example.com" + } + } + ], + } + ] + } + ``` + + 3.2. To pass custom parameters to the server, you can use the `function` object. + + ```json + { + "tools": [ + { + "type": "handoff", + "destinations": [ + { + "type": "dynamic", + "server": { + "url": "https://example.com" + }, + } + ], + "function": { + "name": "handoff", + "description": "Call this function when the customer is ready to be handed off to the next assistant", + "parameters": { + "type": "object", + "properties": { + "destination": { + "type": "string", + "description": "Use dynamic when customer is ready to be handed off to the next assistant", + "enum": ["dynamic"] + }, + "customerAreaCode": { + "type": "number", + "description": "Area code of the customer" + }, + "customerIntent": { + "type": "string", + "enum": ["new-customer", "existing-customer"], + "description": "Use new-customer when customer is a new customer, existing-customer when customer is an existing customer" + }, + "customerSentiment": { + "type": "string", + "enum": ["positive", "negative", "neutral"], + "description": "Use positive when customer is happy, negative when customer is unhappy, neutral when customer is neutral" + } + } + } + } + } + ] + } + ``` + + The properties `customerAreaCode`, `customerIntent`, and `customerSentiment` will be passed to the server in the webhook request body. + """ + + id: str = pydantic.Field() + """ + This is the unique identifier for the tool. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the organization that this tool belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the tool was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", description="This is the ISO 8601 date-time string of when the tool was last updated." + ), + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + function: typing.Optional[OpenAiFunction] = pydantic.Field(default=None) + """ + This is the optional function definition that will be passed to the LLM. + If this is not defined, we will construct this based on the other properties. + + For example, given the following tools definition: + ```json + { + "tools": [ + { + "type": "handoff", + "destinations": [ + { + "type": "assistant", + "assistantId": "assistant-123", + "description": "customer wants to be handed off to assistant-123", + "contextEngineeringPlan": { + "type": "all" + } + }, + { + "type": "assistant", + "assistantId": "assistant-456", + "description": "customer wants to be handed off to assistant-456", + "contextEngineeringPlan": { + "type": "all" + } + } + ], + } + ] + } + ``` + + We will construct the following function definition: + ```json + { + "function": { + "name": "handoff_to_assistant-123", + "description": " + Use this function to handoff the call to the next assistant. + Only use it when instructions explicitly ask you to use the handoff_to_assistant function. + DO NOT call this function unless you are instructed to do so. + Here are the destinations you can handoff the call to: + 1. assistant-123. When: customer wants to be handed off to assistant-123 + 2. assistant-456. When: customer wants to be handed off to assistant-456 + ", + "parameters": { + "type": "object", + "properties": { + "destination": { + "type": "string", + "description": "Options: assistant-123 (customer wants to be handed off to assistant-123), assistant-456 (customer wants to be handed off to assistant-456)", + "enum": ["assistant-123", "assistant-456"] + }, + }, + "required": ["destination"] + } + } + } + ``` + + To override this function, please provide an OpenAI function definition and refer to it in the system prompt. + You may override parts of the function definition (i.e. you may only want to change the function name for your prompt). + If you choose to override the function parameters, it must include `destination` as a required parameter, and it must evaluate to either an assistantId, assistantName, or a the string literal `dynamic`. + + To pass custom parameters to the server in a dynamic handoff, you can use the function parameters, with `dynamic` as the destination. + ```json + { + "function": { + "name": "dynamic_handoff", + "description": " + Call this function when the customer is ready to be handed off to the next assistant + ", + "parameters": { + "type": "object", + "properties": { + "destination": { + "type": "string", + "enum": ["dynamic"] + }, + "customerAreaCode": { + "type": "number", + "description": "Area code of the customer" + }, + "customerIntent": { + "type": "string", + "enum": ["new-customer", "existing-customer"], + "description": "Use new-customer when customer is a new customer, existing-customer when customer is an existing customer" + }, + "customerSentiment": { + "type": "string", + "enum": ["positive", "negative", "neutral"], + "description": "Use positive when customer is happy, negative when customer is unhappy, neutral when customer is neutral" + } + }, + "required": ["destination", "customerAreaCode", "customerIntent", "customerSentiment"] + } + } + } + ``` + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(HandoffTool) diff --git a/src/vapi/types/handoff_tool_destinations_item.py b/src/vapi/types/handoff_tool_destinations_item.py new file mode 100644 index 00000000..4d9ba844 --- /dev/null +++ b/src/vapi/types/handoff_tool_destinations_item.py @@ -0,0 +1,286 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .handoff_destination_assistant_context_engineering_plan import HandoffDestinationAssistantContextEngineeringPlan +from .handoff_destination_squad_context_engineering_plan import HandoffDestinationSquadContextEngineeringPlan +from .server import Server +from .variable_extraction_plan import VariableExtractionPlan + + +class HandoffToolDestinationsItem_Assistant(UncheckedBaseModel): + type: typing.Literal["assistant"] = "assistant" + context_engineering_plan: typing_extensions.Annotated[ + typing.Optional[HandoffDestinationAssistantContextEngineeringPlan], + FieldMetadata(alias="contextEngineeringPlan"), + pydantic.Field(alias="contextEngineeringPlan"), + ] = None + assistant_name: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantName"), pydantic.Field(alias="assistantName") + ] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + assistant: typing.Optional["CreateAssistantDto"] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + assistant_overrides: typing_extensions.Annotated[ + typing.Optional["AssistantOverrides"], + FieldMetadata(alias="assistantOverrides"), + pydantic.Field(alias="assistantOverrides"), + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class HandoffToolDestinationsItem_Dynamic(UncheckedBaseModel): + type: typing.Literal["dynamic"] = "dynamic" + server: typing.Optional[Server] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class HandoffToolDestinationsItem_Squad(UncheckedBaseModel): + type: typing.Literal["squad"] = "squad" + context_engineering_plan: typing_extensions.Annotated[ + typing.Optional[HandoffDestinationSquadContextEngineeringPlan], + FieldMetadata(alias="contextEngineeringPlan"), + pydantic.Field(alias="contextEngineeringPlan"), + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + squad: typing.Optional["CreateSquadDto"] = None + entry_assistant_name: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="entryAssistantName"), pydantic.Field(alias="entryAssistantName") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + squad_overrides: typing_extensions.Annotated[ + typing.Optional["AssistantOverrides"], + FieldMetadata(alias="squadOverrides"), + pydantic.Field(alias="squadOverrides"), + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +HandoffToolDestinationsItem = typing_extensions.Annotated[ + typing.Union[ + HandoffToolDestinationsItem_Assistant, HandoffToolDestinationsItem_Dynamic, HandoffToolDestinationsItem_Squad + ], + UnionMetadata(discriminant="type"), +] +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 + +update_forward_refs( + HandoffToolDestinationsItem_Assistant, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + HandoffToolDestinationsItem_Squad, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/handoff_tool_messages_item.py b/src/vapi/types/handoff_tool_messages_item.py new file mode 100644 index 00000000..6254fade --- /dev/null +++ b/src/vapi/types/handoff_tool_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class HandoffToolMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class HandoffToolMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class HandoffToolMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class HandoffToolMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +HandoffToolMessagesItem = typing_extensions.Annotated[ + typing.Union[ + HandoffToolMessagesItem_RequestStart, + HandoffToolMessagesItem_RequestComplete, + HandoffToolMessagesItem_RequestFailed, + HandoffToolMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/hangup_node.py b/src/vapi/types/hangup_node.py new file mode 100644 index 00000000..538ed9ce --- /dev/null +++ b/src/vapi/types/hangup_node.py @@ -0,0 +1,33 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .hangup_node_type import HangupNodeType + + +class HangupNode(UncheckedBaseModel): + type: HangupNodeType + name: str + is_start: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="isStart"), + pydantic.Field(alias="isStart", description="This is whether or not the node is the start of the workflow."), + ] = None + metadata: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) + """ + This is for metadata you want to store on the task. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/neets_voice_id_enum.py b/src/vapi/types/hangup_node_type.py similarity index 56% rename from src/vapi/types/neets_voice_id_enum.py rename to src/vapi/types/hangup_node_type.py index d000456a..4fae93fd 100644 --- a/src/vapi/types/neets_voice_id_enum.py +++ b/src/vapi/types/hangup_node_type.py @@ -2,4 +2,4 @@ import typing -NeetsVoiceIdEnum = typing.Union[typing.Literal["vits"], typing.Any] +HangupNodeType = typing.Union[typing.Literal["hangup"], typing.Any] diff --git a/src/vapi/types/hmac_authentication_plan.py b/src/vapi/types/hmac_authentication_plan.py new file mode 100644 index 00000000..667165a9 --- /dev/null +++ b/src/vapi/types/hmac_authentication_plan.py @@ -0,0 +1,96 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .hmac_authentication_plan_algorithm import HmacAuthenticationPlanAlgorithm +from .hmac_authentication_plan_signature_encoding import HmacAuthenticationPlanSignatureEncoding + + +class HmacAuthenticationPlan(UncheckedBaseModel): + secret_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="secretKey"), + pydantic.Field(alias="secretKey", description="This is the HMAC secret key used to sign requests."), + ] + algorithm: HmacAuthenticationPlanAlgorithm = pydantic.Field() + """ + This is the HMAC algorithm to use for signing. + """ + + signature_header: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="signatureHeader"), + pydantic.Field( + alias="signatureHeader", + description="This is the header name where the signature will be sent. Defaults to 'x-signature'.", + ), + ] = None + timestamp_header: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="timestampHeader"), + pydantic.Field( + alias="timestampHeader", + description="This is the header name where the timestamp will be sent. Defaults to 'x-timestamp'.", + ), + ] = None + signature_prefix: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="signaturePrefix"), + pydantic.Field( + alias="signaturePrefix", + description="This is the prefix for the signature. For example, 'sha256=' for GitHub-style signatures.", + ), + ] = None + include_timestamp: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="includeTimestamp"), + pydantic.Field( + alias="includeTimestamp", + description="Whether to include a timestamp in the signature payload. Defaults to true.", + ), + ] = None + payload_format: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="payloadFormat"), + pydantic.Field( + alias="payloadFormat", + description="Custom payload format. Use {body} for request body, {timestamp} for timestamp, {method} for HTTP method, {url} for URL, {svix-id} for unique message ID. Defaults to '{timestamp}.{body}'.", + ), + ] = None + message_id_header: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="messageIdHeader"), + pydantic.Field( + alias="messageIdHeader", + description="This is the header name where the unique message ID will be sent. Used for Svix-style webhooks.", + ), + ] = None + signature_encoding: typing_extensions.Annotated[ + typing.Optional[HmacAuthenticationPlanSignatureEncoding], + FieldMetadata(alias="signatureEncoding"), + pydantic.Field( + alias="signatureEncoding", description="The encoding format for the signature. Defaults to 'hex'." + ), + ] = None + secret_is_base_64: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="secretIsBase64"), + pydantic.Field( + alias="secretIsBase64", + description="Whether the secret key is base64-encoded and should be decoded before use. Defaults to false.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/hmac_authentication_plan_algorithm.py b/src/vapi/types/hmac_authentication_plan_algorithm.py new file mode 100644 index 00000000..8b5720ce --- /dev/null +++ b/src/vapi/types/hmac_authentication_plan_algorithm.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +HmacAuthenticationPlanAlgorithm = typing.Union[typing.Literal["sha256", "sha512", "sha1"], typing.Any] diff --git a/src/vapi/types/hmac_authentication_plan_signature_encoding.py b/src/vapi/types/hmac_authentication_plan_signature_encoding.py new file mode 100644 index 00000000..45fab040 --- /dev/null +++ b/src/vapi/types/hmac_authentication_plan_signature_encoding.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +HmacAuthenticationPlanSignatureEncoding = typing.Union[typing.Literal["hex", "base64"], typing.Any] diff --git a/src/vapi/types/hume_credential.py b/src/vapi/types/hume_credential.py new file mode 100644 index 00000000..daaf1533 --- /dev/null +++ b/src/vapi/types/hume_credential.py @@ -0,0 +1,60 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .hume_credential_provider import HumeCredentialProvider + + +class HumeCredential(UncheckedBaseModel): + provider: HumeCredentialProvider + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + id: str = pydantic.Field() + """ + This is the unique identifier for the credential. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/hume_credential_provider.py b/src/vapi/types/hume_credential_provider.py new file mode 100644 index 00000000..3aa7f91e --- /dev/null +++ b/src/vapi/types/hume_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +HumeCredentialProvider = typing.Union[typing.Literal["hume"], typing.Any] diff --git a/src/vapi/types/hume_voice.py b/src/vapi/types/hume_voice.py new file mode 100644 index 00000000..2a032dc7 --- /dev/null +++ b/src/vapi/types/hume_voice.py @@ -0,0 +1,73 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .chunk_plan import ChunkPlan +from .fallback_plan import FallbackPlan +from .hume_voice_model import HumeVoiceModel + + +class HumeVoice(UncheckedBaseModel): + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="cachingEnabled"), + pydantic.Field( + alias="cachingEnabled", description="This is the flag to toggle voice caching for the assistant." + ), + ] = None + model: typing.Optional[HumeVoiceModel] = pydantic.Field(default=None) + """ + This is the model that will be used. + """ + + voice_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="voiceId"), + pydantic.Field(alias="voiceId", description="The ID of the particular voice you want to use."), + ] + is_custom_hume_voice: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="isCustomHumeVoice"), + pydantic.Field( + alias="isCustomHumeVoice", + description="Indicates whether the chosen voice is a preset Hume AI voice or a custom voice.", + ), + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], + FieldMetadata(alias="chunkPlan"), + pydantic.Field( + alias="chunkPlan", + description="This is the plan for chunking the model output before it is sent to the voice provider.", + ), + ] = None + description: typing.Optional[str] = pydantic.Field(default=None) + """ + Natural language instructions describing how the synthesized speech should sound, including but not limited to tone, intonation, pacing, and accent (e.g., 'a soft, gentle voice with a strong British accent'). + + If a Voice is specified in the request, this description serves as acting instructions. + If no Voice is specified, a new voice is generated based on this description. + """ + + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field( + alias="fallbackPlan", + description="This is the plan for voice provider fallbacks in the event that the primary voice provider fails.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/hume_voice_model.py b/src/vapi/types/hume_voice_model.py new file mode 100644 index 00000000..53e80f6e --- /dev/null +++ b/src/vapi/types/hume_voice_model.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +HumeVoiceModel = typing.Union[typing.Literal["octave", "octave2"], typing.Any] diff --git a/src/vapi/types/import_twilio_phone_number_dto.py b/src/vapi/types/import_twilio_phone_number_dto.py index 1ef045e6..a49c8127 100644 --- a/src/vapi/types/import_twilio_phone_number_dto.py +++ b/src/vapi/types/import_twilio_phone_number_dto.py @@ -1,84 +1,116 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions import typing -from .import_twilio_phone_number_dto_fallback_destination import ImportTwilioPhoneNumberDtoFallbackDestination -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .import_twilio_phone_number_dto_fallback_destination import ImportTwilioPhoneNumberDtoFallbackDestination +from .import_twilio_phone_number_dto_hooks_item import ImportTwilioPhoneNumberDtoHooksItem +from .server import Server -class ImportTwilioPhoneNumberDto(UniversalBaseModel): +class ImportTwilioPhoneNumberDto(UncheckedBaseModel): fallback_destination: typing_extensions.Annotated[ - typing.Optional[ImportTwilioPhoneNumberDtoFallbackDestination], FieldMetadata(alias="fallbackDestination") - ] = pydantic.Field(default=None) - """ - This is the fallback destination an inbound call will be transferred to if: - - 1. `assistantId` is not set - 2. `squadId` is not set - 3. and, `assistant-request` message to the `serverUrl` fails - - If this is not set and above conditions are met, the inbound call is hung up with an error message. - """ - - twilio_phone_number: typing_extensions.Annotated[str, FieldMetadata(alias="twilioPhoneNumber")] = pydantic.Field() + typing.Optional[ImportTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field( + alias="fallbackDestination", + description="This is the fallback destination an inbound call will be transferred to if:\n1. `assistantId` is not set\n2. `squadId` is not set\n3. and, `assistant-request` message to the `serverUrl` fails\n\nIf this is not set and above conditions are met, the inbound call is hung up with an error message.", + ), + ] = None + hooks: typing.Optional[typing.List[ImportTwilioPhoneNumberDtoHooksItem]] = pydantic.Field(default=None) """ - These are the digits of the phone number you own on your Twilio. - """ - - twilio_account_sid: typing_extensions.Annotated[str, FieldMetadata(alias="twilioAccountSid")] = pydantic.Field() - """ - This is your Twilio Account SID that will be used to handle this phone number. - """ - - twilio_auth_token: typing_extensions.Annotated[str, FieldMetadata(alias="twilioAuthToken")] = pydantic.Field() - """ - This is the Twilio Auth Token that will be used to handle this phone number. + This is the hooks that will be used for incoming calls to this phone number. """ + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="smsEnabled"), + pydantic.Field( + alias="smsEnabled", + description="Controls whether Vapi sets the messaging webhook URL on the Twilio number during import.\n\nIf set to `false`, Vapi will not update the Twilio messaging URL, leaving it as is.\nIf `true` or omitted (default), Vapi will configure both the voice and messaging URLs.\n\n@default true", + ), + ] = None + twilio_phone_number: typing_extensions.Annotated[ + str, + FieldMetadata(alias="twilioPhoneNumber"), + pydantic.Field( + alias="twilioPhoneNumber", description="These are the digits of the phone number you own on your Twilio." + ), + ] + twilio_account_sid: typing_extensions.Annotated[ + str, + FieldMetadata(alias="twilioAccountSid"), + pydantic.Field( + alias="twilioAccountSid", + description="This is your Twilio Account SID that will be used to handle this phone number.", + ), + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="twilioAuthToken"), + pydantic.Field( + alias="twilioAuthToken", + description="This is the Twilio Auth Token that will be used to handle this phone number.", + ), + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="twilioApiKey"), + pydantic.Field( + alias="twilioApiKey", + description="This is the Twilio API Key that will be used to handle this phone number. If AuthToken is provided, this will be ignored.", + ), + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="twilioApiSecret"), + pydantic.Field( + alias="twilioApiSecret", + description="This is the Twilio API Secret that will be used to handle this phone number. If AuthToken is provided, this will be ignored.", + ), + ] = None name: typing.Optional[str] = pydantic.Field(default=None) """ This is the name of the phone number. This is just for your own reference. """ - assistant_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="assistantId")] = ( - pydantic.Field(default=None) - ) - """ - This is the assistant that will be used for incoming calls to this phone number. - - If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected. - """ - - squad_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="squadId")] = pydantic.Field( - default=None - ) - """ - This is the squad that will be used for incoming calls to this phone number. + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assistantId"), + pydantic.Field( + alias="assistantId", + description="This is the assistant that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="workflowId"), + pydantic.Field( + alias="workflowId", + description="This is the workflow that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="squadId"), + pydantic.Field( + alias="squadId", + description="This is the squad that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + server: typing.Optional[Server] = pydantic.Field(default=None) + """ + This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema. - If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected. - """ - - server_url: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="serverUrl")] = pydantic.Field( - default=None - ) - """ - This is the server URL where messages will be sent for calls on this number. This includes the `assistant-request` message. - - You can see the shape of the messages sent in `ServerMessage`. - - This overrides the `org.serverUrl`. Order of precedence: tool.server.url > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl. - """ - - server_url_secret: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="serverUrlSecret")] = ( - pydantic.Field(default=None) - ) - """ - This is the secret Vapi will send with every message to your server. It's sent as a header called x-vapi-secret. + The order of precedence is: - Same precedence logic as serverUrl. + 1. assistant.server + 2. phoneNumber.server + 3. org.server """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/import_twilio_phone_number_dto_fallback_destination.py b/src/vapi/types/import_twilio_phone_number_dto_fallback_destination.py index 65025d14..2a5a9e18 100644 --- a/src/vapi/types/import_twilio_phone_number_dto_fallback_destination.py +++ b/src/vapi/types/import_twilio_phone_number_dto_fallback_destination.py @@ -1,7 +1,95 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .transfer_destination_number import TransferDestinationNumber -from .transfer_destination_sip import TransferDestinationSip -ImportTwilioPhoneNumberDtoFallbackDestination = typing.Union[TransferDestinationNumber, TransferDestinationSip] +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .transfer_destination_number_message import TransferDestinationNumberMessage +from .transfer_destination_sip_message import TransferDestinationSipMessage +from .transfer_plan import TransferPlan + + +class ImportTwilioPhoneNumberDtoFallbackDestination_Number(UncheckedBaseModel): + """ + This is the fallback destination an inbound call will be transferred to if: + 1. `assistantId` is not set + 2. `squadId` is not set + 3. and, `assistant-request` message to the `serverUrl` fails + + If this is not set and above conditions are met, the inbound call is hung up with an error message. + """ + + type: typing.Literal["number"] = "number" + message: typing.Optional[TransferDestinationNumberMessage] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: str + extension: typing.Optional[str] = None + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ImportTwilioPhoneNumberDtoFallbackDestination_Sip(UncheckedBaseModel): + """ + This is the fallback destination an inbound call will be transferred to if: + 1. `assistantId` is not set + 2. `squadId` is not set + 3. and, `assistant-request` message to the `serverUrl` fails + + If this is not set and above conditions are met, the inbound call is hung up with an error message. + """ + + type: typing.Literal["sip"] = "sip" + message: typing.Optional[TransferDestinationSipMessage] = None + sip_uri: typing_extensions.Annotated[str, FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri")] + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + sip_headers: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="sipHeaders"), + pydantic.Field(alias="sipHeaders"), + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ImportTwilioPhoneNumberDtoFallbackDestination = typing_extensions.Annotated[ + typing.Union[ + ImportTwilioPhoneNumberDtoFallbackDestination_Number, ImportTwilioPhoneNumberDtoFallbackDestination_Sip + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/import_twilio_phone_number_dto_hooks_item.py b/src/vapi/types/import_twilio_phone_number_dto_hooks_item.py new file mode 100644 index 00000000..dac79ac1 --- /dev/null +++ b/src/vapi/types/import_twilio_phone_number_dto_hooks_item.py @@ -0,0 +1,50 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .phone_number_call_ending_hook_filter import PhoneNumberCallEndingHookFilter +from .phone_number_call_ringing_hook_filter import PhoneNumberCallRingingHookFilter +from .phone_number_hook_call_ending_do import PhoneNumberHookCallEndingDo +from .phone_number_hook_call_ringing_do_item import PhoneNumberHookCallRingingDoItem + + +class ImportTwilioPhoneNumberDtoHooksItem_CallRinging(UncheckedBaseModel): + on: typing.Literal["call.ringing"] = "call.ringing" + filters: typing.Optional[typing.List[PhoneNumberCallRingingHookFilter]] = None + do: typing.List[PhoneNumberHookCallRingingDoItem] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ImportTwilioPhoneNumberDtoHooksItem_CallEnding(UncheckedBaseModel): + on: typing.Literal["call.ending"] = "call.ending" + filters: typing.Optional[typing.List[PhoneNumberCallEndingHookFilter]] = None + do: typing.Optional[PhoneNumberHookCallEndingDo] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ImportTwilioPhoneNumberDtoHooksItem = typing_extensions.Annotated[ + typing.Union[ImportTwilioPhoneNumberDtoHooksItem_CallRinging, ImportTwilioPhoneNumberDtoHooksItem_CallEnding], + UnionMetadata(discriminant="on"), +] diff --git a/src/vapi/types/import_vonage_phone_number_dto.py b/src/vapi/types/import_vonage_phone_number_dto.py index c7e59e8c..4b3124f3 100644 --- a/src/vapi/types/import_vonage_phone_number_dto.py +++ b/src/vapi/types/import_vonage_phone_number_dto.py @@ -1,81 +1,84 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions import typing -from .import_vonage_phone_number_dto_fallback_destination import ImportVonagePhoneNumberDtoFallbackDestination -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .import_vonage_phone_number_dto_fallback_destination import ImportVonagePhoneNumberDtoFallbackDestination +from .import_vonage_phone_number_dto_hooks_item import ImportVonagePhoneNumberDtoHooksItem +from .server import Server -class ImportVonagePhoneNumberDto(UniversalBaseModel): +class ImportVonagePhoneNumberDto(UncheckedBaseModel): fallback_destination: typing_extensions.Annotated[ - typing.Optional[ImportVonagePhoneNumberDtoFallbackDestination], FieldMetadata(alias="fallbackDestination") - ] = pydantic.Field(default=None) + typing.Optional[ImportVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field( + alias="fallbackDestination", + description="This is the fallback destination an inbound call will be transferred to if:\n1. `assistantId` is not set\n2. `squadId` is not set\n3. and, `assistant-request` message to the `serverUrl` fails\n\nIf this is not set and above conditions are met, the inbound call is hung up with an error message.", + ), + ] = None + hooks: typing.Optional[typing.List[ImportVonagePhoneNumberDtoHooksItem]] = pydantic.Field(default=None) """ - This is the fallback destination an inbound call will be transferred to if: - - 1. `assistantId` is not set - 2. `squadId` is not set - 3. and, `assistant-request` message to the `serverUrl` fails - - If this is not set and above conditions are met, the inbound call is hung up with an error message. - """ - - vonage_phone_number: typing_extensions.Annotated[str, FieldMetadata(alias="vonagePhoneNumber")] = pydantic.Field() - """ - These are the digits of the phone number you own on your Vonage. - """ - - credential_id: typing_extensions.Annotated[str, FieldMetadata(alias="credentialId")] = pydantic.Field() - """ - This is the credential that is used to make outgoing calls, and do operations like call transfer and hang up. - - You can add the Vonage Credential in the Provider Credentials page on the dashboard to get the credentialId. + This is the hooks that will be used for incoming calls to this phone number. """ + vonage_phone_number: typing_extensions.Annotated[ + str, + FieldMetadata(alias="vonagePhoneNumber"), + pydantic.Field( + alias="vonagePhoneNumber", description="These are the digits of the phone number you own on your Vonage." + ), + ] + credential_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="credentialId"), + pydantic.Field( + alias="credentialId", + description="This is the credential you added in dashboard.vapi.ai/keys. This is used to configure the number to send inbound calls to Vapi, make outbound calls and do live call updates like transfers and hangups.", + ), + ] name: typing.Optional[str] = pydantic.Field(default=None) """ This is the name of the phone number. This is just for your own reference. """ - assistant_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="assistantId")] = ( - pydantic.Field(default=None) - ) - """ - This is the assistant that will be used for incoming calls to this phone number. - - If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected. - """ - - squad_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="squadId")] = pydantic.Field( - default=None - ) - """ - This is the squad that will be used for incoming calls to this phone number. - - If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected. - """ - - server_url: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="serverUrl")] = pydantic.Field( - default=None - ) - """ - This is the server URL where messages will be sent for calls on this number. This includes the `assistant-request` message. - - You can see the shape of the messages sent in `ServerMessage`. + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assistantId"), + pydantic.Field( + alias="assistantId", + description="This is the assistant that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="workflowId"), + pydantic.Field( + alias="workflowId", + description="This is the workflow that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="squadId"), + pydantic.Field( + alias="squadId", + description="This is the squad that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + server: typing.Optional[Server] = pydantic.Field(default=None) + """ + This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema. - This overrides the `org.serverUrl`. Order of precedence: tool.server.url > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl. - """ - - server_url_secret: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="serverUrlSecret")] = ( - pydantic.Field(default=None) - ) - """ - This is the secret Vapi will send with every message to your server. It's sent as a header called x-vapi-secret. + The order of precedence is: - Same precedence logic as serverUrl. + 1. assistant.server + 2. phoneNumber.server + 3. org.server """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/import_vonage_phone_number_dto_fallback_destination.py b/src/vapi/types/import_vonage_phone_number_dto_fallback_destination.py index 7e48bc44..8f204aa7 100644 --- a/src/vapi/types/import_vonage_phone_number_dto_fallback_destination.py +++ b/src/vapi/types/import_vonage_phone_number_dto_fallback_destination.py @@ -1,7 +1,95 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .transfer_destination_number import TransferDestinationNumber -from .transfer_destination_sip import TransferDestinationSip -ImportVonagePhoneNumberDtoFallbackDestination = typing.Union[TransferDestinationNumber, TransferDestinationSip] +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .transfer_destination_number_message import TransferDestinationNumberMessage +from .transfer_destination_sip_message import TransferDestinationSipMessage +from .transfer_plan import TransferPlan + + +class ImportVonagePhoneNumberDtoFallbackDestination_Number(UncheckedBaseModel): + """ + This is the fallback destination an inbound call will be transferred to if: + 1. `assistantId` is not set + 2. `squadId` is not set + 3. and, `assistant-request` message to the `serverUrl` fails + + If this is not set and above conditions are met, the inbound call is hung up with an error message. + """ + + type: typing.Literal["number"] = "number" + message: typing.Optional[TransferDestinationNumberMessage] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: str + extension: typing.Optional[str] = None + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ImportVonagePhoneNumberDtoFallbackDestination_Sip(UncheckedBaseModel): + """ + This is the fallback destination an inbound call will be transferred to if: + 1. `assistantId` is not set + 2. `squadId` is not set + 3. and, `assistant-request` message to the `serverUrl` fails + + If this is not set and above conditions are met, the inbound call is hung up with an error message. + """ + + type: typing.Literal["sip"] = "sip" + message: typing.Optional[TransferDestinationSipMessage] = None + sip_uri: typing_extensions.Annotated[str, FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri")] + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + sip_headers: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="sipHeaders"), + pydantic.Field(alias="sipHeaders"), + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ImportVonagePhoneNumberDtoFallbackDestination = typing_extensions.Annotated[ + typing.Union[ + ImportVonagePhoneNumberDtoFallbackDestination_Number, ImportVonagePhoneNumberDtoFallbackDestination_Sip + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/import_vonage_phone_number_dto_hooks_item.py b/src/vapi/types/import_vonage_phone_number_dto_hooks_item.py new file mode 100644 index 00000000..bee598d6 --- /dev/null +++ b/src/vapi/types/import_vonage_phone_number_dto_hooks_item.py @@ -0,0 +1,50 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .phone_number_call_ending_hook_filter import PhoneNumberCallEndingHookFilter +from .phone_number_call_ringing_hook_filter import PhoneNumberCallRingingHookFilter +from .phone_number_hook_call_ending_do import PhoneNumberHookCallEndingDo +from .phone_number_hook_call_ringing_do_item import PhoneNumberHookCallRingingDoItem + + +class ImportVonagePhoneNumberDtoHooksItem_CallRinging(UncheckedBaseModel): + on: typing.Literal["call.ringing"] = "call.ringing" + filters: typing.Optional[typing.List[PhoneNumberCallRingingHookFilter]] = None + do: typing.List[PhoneNumberHookCallRingingDoItem] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ImportVonagePhoneNumberDtoHooksItem_CallEnding(UncheckedBaseModel): + on: typing.Literal["call.ending"] = "call.ending" + filters: typing.Optional[typing.List[PhoneNumberCallEndingHookFilter]] = None + do: typing.Optional[PhoneNumberHookCallEndingDo] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ImportVonagePhoneNumberDtoHooksItem = typing_extensions.Annotated[ + typing.Union[ImportVonagePhoneNumberDtoHooksItem_CallRinging, ImportVonagePhoneNumberDtoHooksItem_CallEnding], + UnionMetadata(discriminant="on"), +] diff --git a/src/vapi/types/inflection_ai_credential.py b/src/vapi/types/inflection_ai_credential.py new file mode 100644 index 00000000..3646b896 --- /dev/null +++ b/src/vapi/types/inflection_ai_credential.py @@ -0,0 +1,64 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .inflection_ai_credential_provider import InflectionAiCredentialProvider + + +class InflectionAiCredential(UncheckedBaseModel): + provider: InflectionAiCredentialProvider = pydantic.Field() + """ + This is the api key for Pi in InflectionAI's console. Get it from here: https://developers.inflection.ai/keys, billing will need to be setup + """ + + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + id: str = pydantic.Field() + """ + This is the unique identifier for the credential. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/inflection_ai_credential_provider.py b/src/vapi/types/inflection_ai_credential_provider.py new file mode 100644 index 00000000..83d7c56a --- /dev/null +++ b/src/vapi/types/inflection_ai_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +InflectionAiCredentialProvider = typing.Union[typing.Literal["inflection-ai"], typing.Any] diff --git a/src/vapi/types/inflection_ai_model.py b/src/vapi/types/inflection_ai_model.py new file mode 100644 index 00000000..27bac9c8 --- /dev/null +++ b/src/vapi/types/inflection_ai_model.py @@ -0,0 +1,203 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_custom_knowledge_base_dto import CreateCustomKnowledgeBaseDto +from .inflection_ai_model_model import InflectionAiModelModel +from .open_ai_message import OpenAiMessage + + +class InflectionAiModel(UncheckedBaseModel): + messages: typing.Optional[typing.List[OpenAiMessage]] = pydantic.Field(default=None) + """ + This is the starting state for the conversation. + """ + + tools: typing.Optional[typing.List["InflectionAiModelToolsItem"]] = pydantic.Field(default=None) + """ + These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`. + + Both `tools` and `toolIds` can be used together. + """ + + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="toolIds"), + pydantic.Field( + alias="toolIds", + description="These are the tools that the assistant can use during the call. To use transient tools, use `tools`.\n\nBoth `tools` and `toolIds` can be used together.", + ), + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase", description="These are the options for the knowledge base."), + ] = None + model: InflectionAiModelModel = pydantic.Field() + """ + This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b + """ + + temperature: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency. + """ + + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="maxTokens"), + pydantic.Field( + alias="maxTokens", + description="This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.", + ), + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field( + alias="emotionRecognitionEnabled", + description="This determines whether we detect user's emotion while they speak and send it as an additional info to model.\n\nDefault `false` because the model is usually are good at understanding the user's emotion from text.\n\n@default false", + ), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="numFastTurns"), + pydantic.Field( + alias="numFastTurns", + description="This sets how many turns at the start of the conversation to use a smaller, faster model from the same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai.\n\nDefault is 0.\n\n@default 0", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + InflectionAiModel, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/inflection_ai_model_model.py b/src/vapi/types/inflection_ai_model_model.py new file mode 100644 index 00000000..4fba7c2f --- /dev/null +++ b/src/vapi/types/inflection_ai_model_model.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +InflectionAiModelModel = typing.Union[typing.Literal["inflection_3_pi"], typing.Any] diff --git a/src/vapi/types/inflection_ai_model_tools_item.py b/src/vapi/types/inflection_ai_model_tools_item.py new file mode 100644 index 00000000..e6b38622 --- /dev/null +++ b/src/vapi/types/inflection_ai_model_tools_item.py @@ -0,0 +1,731 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .backoff_plan import BackoffPlan +from .code_tool_environment_variable import CodeToolEnvironmentVariable +from .create_api_request_tool_dto_messages_item import CreateApiRequestToolDtoMessagesItem +from .create_api_request_tool_dto_method import CreateApiRequestToolDtoMethod +from .create_bash_tool_dto_messages_item import CreateBashToolDtoMessagesItem +from .create_bash_tool_dto_name import CreateBashToolDtoName +from .create_bash_tool_dto_sub_type import CreateBashToolDtoSubType +from .create_code_tool_dto_messages_item import CreateCodeToolDtoMessagesItem +from .create_computer_tool_dto_messages_item import CreateComputerToolDtoMessagesItem +from .create_computer_tool_dto_name import CreateComputerToolDtoName +from .create_computer_tool_dto_sub_type import CreateComputerToolDtoSubType +from .create_dtmf_tool_dto_messages_item import CreateDtmfToolDtoMessagesItem +from .create_end_call_tool_dto_messages_item import CreateEndCallToolDtoMessagesItem +from .create_function_tool_dto_messages_item import CreateFunctionToolDtoMessagesItem +from .create_go_high_level_calendar_availability_tool_dto_messages_item import ( + CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem, +) +from .create_go_high_level_calendar_event_create_tool_dto_messages_item import ( + CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_create_tool_dto_messages_item import ( + CreateGoHighLevelContactCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_get_tool_dto_messages_item import CreateGoHighLevelContactGetToolDtoMessagesItem +from .create_google_calendar_check_availability_tool_dto_messages_item import ( + CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem, +) +from .create_google_calendar_create_event_tool_dto_messages_item import ( + CreateGoogleCalendarCreateEventToolDtoMessagesItem, +) +from .create_google_sheets_row_append_tool_dto_messages_item import CreateGoogleSheetsRowAppendToolDtoMessagesItem +from .create_handoff_tool_dto_messages_item import CreateHandoffToolDtoMessagesItem +from .create_mcp_tool_dto_messages_item import CreateMcpToolDtoMessagesItem +from .create_query_tool_dto_messages_item import CreateQueryToolDtoMessagesItem +from .create_sip_request_tool_dto_body import CreateSipRequestToolDtoBody +from .create_sip_request_tool_dto_messages_item import CreateSipRequestToolDtoMessagesItem +from .create_sip_request_tool_dto_verb import CreateSipRequestToolDtoVerb +from .create_slack_send_message_tool_dto_messages_item import CreateSlackSendMessageToolDtoMessagesItem +from .create_sms_tool_dto_messages_item import CreateSmsToolDtoMessagesItem +from .create_text_editor_tool_dto_messages_item import CreateTextEditorToolDtoMessagesItem +from .create_text_editor_tool_dto_name import CreateTextEditorToolDtoName +from .create_text_editor_tool_dto_sub_type import CreateTextEditorToolDtoSubType +from .create_transfer_call_tool_dto_destinations_item import CreateTransferCallToolDtoDestinationsItem +from .create_transfer_call_tool_dto_messages_item import CreateTransferCallToolDtoMessagesItem +from .create_voicemail_tool_dto_messages_item import CreateVoicemailToolDtoMessagesItem +from .knowledge_base import KnowledgeBase +from .mcp_tool_messages import McpToolMessages +from .mcp_tool_metadata import McpToolMetadata +from .open_ai_function import OpenAiFunction +from .server import Server +from .tool_parameter import ToolParameter +from .tool_rejection_plan import ToolRejectionPlan +from .variable_extraction_plan import VariableExtractionPlan + + +class InflectionAiModelToolsItem_ApiRequest(UncheckedBaseModel): + type: typing.Literal["apiRequest"] = "apiRequest" + messages: typing.Optional[typing.List[CreateApiRequestToolDtoMessagesItem]] = None + method: CreateApiRequestToolDtoMethod + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + encrypted_paths: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="encryptedPaths"), pydantic.Field(alias="encryptedPaths") + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + name: typing.Optional[str] = None + description: typing.Optional[str] = None + url: str + body: typing.Optional["JsonSchema"] = None + headers: typing.Optional["JsonSchema"] = None + backoff_plan: typing_extensions.Annotated[ + typing.Optional[BackoffPlan], FieldMetadata(alias="backoffPlan"), pydantic.Field(alias="backoffPlan") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class InflectionAiModelToolsItem_Bash(UncheckedBaseModel): + type: typing.Literal["bash"] = "bash" + messages: typing.Optional[typing.List[CreateBashToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateBashToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateBashToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class InflectionAiModelToolsItem_Code(UncheckedBaseModel): + type: typing.Literal["code"] = "code" + messages: typing.Optional[typing.List[CreateCodeToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + code: str + environment_variables: typing_extensions.Annotated[ + typing.Optional[typing.List[CodeToolEnvironmentVariable]], + FieldMetadata(alias="environmentVariables"), + pydantic.Field(alias="environmentVariables"), + ] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class InflectionAiModelToolsItem_Computer(UncheckedBaseModel): + type: typing.Literal["computer"] = "computer" + messages: typing.Optional[typing.List[CreateComputerToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateComputerToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateComputerToolDtoName + display_width_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayWidthPx"), pydantic.Field(alias="displayWidthPx") + ] + display_height_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayHeightPx"), pydantic.Field(alias="displayHeightPx") + ] + display_number: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="displayNumber"), pydantic.Field(alias="displayNumber") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class InflectionAiModelToolsItem_Dtmf(UncheckedBaseModel): + type: typing.Literal["dtmf"] = "dtmf" + messages: typing.Optional[typing.List[CreateDtmfToolDtoMessagesItem]] = None + sip_info_dtmf_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="sipInfoDtmfEnabled"), pydantic.Field(alias="sipInfoDtmfEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class InflectionAiModelToolsItem_EndCall(UncheckedBaseModel): + type: typing.Literal["endCall"] = "endCall" + messages: typing.Optional[typing.List[CreateEndCallToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class InflectionAiModelToolsItem_Function(UncheckedBaseModel): + type: typing.Literal["function"] = "function" + messages: typing.Optional[typing.List[CreateFunctionToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class InflectionAiModelToolsItem_GohighlevelCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.availability.check"] = "gohighlevel.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class InflectionAiModelToolsItem_GohighlevelCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.event.create"] = "gohighlevel.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class InflectionAiModelToolsItem_GohighlevelContactCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.create"] = "gohighlevel.contact.create" + messages: typing.Optional[typing.List[CreateGoHighLevelContactCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class InflectionAiModelToolsItem_GohighlevelContactGet(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.get"] = "gohighlevel.contact.get" + messages: typing.Optional[typing.List[CreateGoHighLevelContactGetToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class InflectionAiModelToolsItem_GoogleCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["google.calendar.availability.check"] = "google.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class InflectionAiModelToolsItem_GoogleCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["google.calendar.event.create"] = "google.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoogleCalendarCreateEventToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class InflectionAiModelToolsItem_GoogleSheetsRowAppend(UncheckedBaseModel): + type: typing.Literal["google.sheets.row.append"] = "google.sheets.row.append" + messages: typing.Optional[typing.List[CreateGoogleSheetsRowAppendToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class InflectionAiModelToolsItem_Handoff(UncheckedBaseModel): + type: typing.Literal["handoff"] = "handoff" + messages: typing.Optional[typing.List[CreateHandoffToolDtoMessagesItem]] = None + default_result: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="defaultResult"), pydantic.Field(alias="defaultResult") + ] = None + destinations: typing.Optional[typing.List["CreateHandoffToolDtoDestinationsItem"]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class InflectionAiModelToolsItem_Mcp(UncheckedBaseModel): + type: typing.Literal["mcp"] = "mcp" + messages: typing.Optional[typing.List[CreateMcpToolDtoMessagesItem]] = None + server: typing.Optional[Server] = None + tool_messages: typing_extensions.Annotated[ + typing.Optional[typing.List[McpToolMessages]], + FieldMetadata(alias="toolMessages"), + pydantic.Field(alias="toolMessages"), + ] = None + metadata: typing.Optional[McpToolMetadata] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class InflectionAiModelToolsItem_Query(UncheckedBaseModel): + type: typing.Literal["query"] = "query" + messages: typing.Optional[typing.List[CreateQueryToolDtoMessagesItem]] = None + knowledge_bases: typing_extensions.Annotated[ + typing.Optional[typing.List[KnowledgeBase]], + FieldMetadata(alias="knowledgeBases"), + pydantic.Field(alias="knowledgeBases"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class InflectionAiModelToolsItem_SlackMessageSend(UncheckedBaseModel): + type: typing.Literal["slack.message.send"] = "slack.message.send" + messages: typing.Optional[typing.List[CreateSlackSendMessageToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class InflectionAiModelToolsItem_Sms(UncheckedBaseModel): + type: typing.Literal["sms"] = "sms" + messages: typing.Optional[typing.List[CreateSmsToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class InflectionAiModelToolsItem_TextEditor(UncheckedBaseModel): + type: typing.Literal["textEditor"] = "textEditor" + messages: typing.Optional[typing.List[CreateTextEditorToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateTextEditorToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateTextEditorToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class InflectionAiModelToolsItem_TransferCall(UncheckedBaseModel): + type: typing.Literal["transferCall"] = "transferCall" + messages: typing.Optional[typing.List[CreateTransferCallToolDtoMessagesItem]] = None + destinations: typing.Optional[typing.List[CreateTransferCallToolDtoDestinationsItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class InflectionAiModelToolsItem_SipRequest(UncheckedBaseModel): + type: typing.Literal["sipRequest"] = "sipRequest" + messages: typing.Optional[typing.List[CreateSipRequestToolDtoMessagesItem]] = None + verb: CreateSipRequestToolDtoVerb + headers: typing.Optional["JsonSchema"] = None + body: typing.Optional[CreateSipRequestToolDtoBody] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class InflectionAiModelToolsItem_Voicemail(UncheckedBaseModel): + type: typing.Literal["voicemail"] = "voicemail" + messages: typing.Optional[typing.List[CreateVoicemailToolDtoMessagesItem]] = None + beep_detection_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="beepDetectionEnabled"), pydantic.Field(alias="beepDetectionEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +InflectionAiModelToolsItem = typing_extensions.Annotated[ + typing.Union[ + InflectionAiModelToolsItem_ApiRequest, + InflectionAiModelToolsItem_Bash, + InflectionAiModelToolsItem_Code, + InflectionAiModelToolsItem_Computer, + InflectionAiModelToolsItem_Dtmf, + InflectionAiModelToolsItem_EndCall, + InflectionAiModelToolsItem_Function, + InflectionAiModelToolsItem_GohighlevelCalendarAvailabilityCheck, + InflectionAiModelToolsItem_GohighlevelCalendarEventCreate, + InflectionAiModelToolsItem_GohighlevelContactCreate, + InflectionAiModelToolsItem_GohighlevelContactGet, + InflectionAiModelToolsItem_GoogleCalendarAvailabilityCheck, + InflectionAiModelToolsItem_GoogleCalendarEventCreate, + InflectionAiModelToolsItem_GoogleSheetsRowAppend, + InflectionAiModelToolsItem_Handoff, + InflectionAiModelToolsItem_Mcp, + InflectionAiModelToolsItem_Query, + InflectionAiModelToolsItem_SlackMessageSend, + InflectionAiModelToolsItem_Sms, + InflectionAiModelToolsItem_TextEditor, + InflectionAiModelToolsItem_TransferCall, + InflectionAiModelToolsItem_SipRequest, + InflectionAiModelToolsItem_Voicemail, + ], + UnionMetadata(discriminant="type"), +] +from .json_schema import JsonSchema # noqa: E402, I001 +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs(InflectionAiModelToolsItem_ApiRequest, JsonSchema=JsonSchema) +update_forward_refs(InflectionAiModelToolsItem_Bash) +update_forward_refs(InflectionAiModelToolsItem_Code) +update_forward_refs(InflectionAiModelToolsItem_Computer) +update_forward_refs(InflectionAiModelToolsItem_Dtmf) +update_forward_refs(InflectionAiModelToolsItem_EndCall) +update_forward_refs(InflectionAiModelToolsItem_Function) +update_forward_refs(InflectionAiModelToolsItem_GohighlevelCalendarAvailabilityCheck) +update_forward_refs(InflectionAiModelToolsItem_GohighlevelCalendarEventCreate) +update_forward_refs(InflectionAiModelToolsItem_GohighlevelContactCreate) +update_forward_refs(InflectionAiModelToolsItem_GohighlevelContactGet) +update_forward_refs(InflectionAiModelToolsItem_GoogleCalendarAvailabilityCheck) +update_forward_refs(InflectionAiModelToolsItem_GoogleCalendarEventCreate) +update_forward_refs(InflectionAiModelToolsItem_GoogleSheetsRowAppend) +update_forward_refs( + InflectionAiModelToolsItem_Handoff, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs(InflectionAiModelToolsItem_Mcp) +update_forward_refs(InflectionAiModelToolsItem_Query) +update_forward_refs(InflectionAiModelToolsItem_SlackMessageSend) +update_forward_refs(InflectionAiModelToolsItem_Sms) +update_forward_refs(InflectionAiModelToolsItem_TextEditor) +update_forward_refs(InflectionAiModelToolsItem_TransferCall) +update_forward_refs(InflectionAiModelToolsItem_SipRequest, JsonSchema=JsonSchema) +update_forward_refs(InflectionAiModelToolsItem_Voicemail) diff --git a/src/vapi/types/insight.py b/src/vapi/types/insight.py new file mode 100644 index 00000000..0a19b662 --- /dev/null +++ b/src/vapi/types/insight.py @@ -0,0 +1,59 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .insight_type import InsightType + + +class Insight(UncheckedBaseModel): + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the Insight. + """ + + type: InsightType = pydantic.Field() + """ + This is the type of the Insight. + """ + + id: str = pydantic.Field() + """ + This is the unique identifier for the Insight. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this Insight belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the Insight was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", description="This is the ISO 8601 date-time string of when the Insight was last updated." + ), + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/insight_formula.py b/src/vapi/types/insight_formula.py new file mode 100644 index 00000000..3c371cf2 --- /dev/null +++ b/src/vapi/types/insight_formula.py @@ -0,0 +1,34 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class InsightFormula(UncheckedBaseModel): + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the formula. + It will be used to label the formula in the insight board on the UI. + """ + + formula: str = pydantic.Field() + """ + This is the formula to calculate the insight from the queries. + The formula needs to be a valid mathematical expression. + The formula must contain at least one query name in the LiquidJS format {{query_name}} or {{['query name']}} which will be substituted with the query result. + Any MathJS formula is allowed - https://mathjs.org/docs/expressions/syntax.html + + Common valid math operations are +, -, *, /, % + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/insight_paginated_response.py b/src/vapi/types/insight_paginated_response.py new file mode 100644 index 00000000..cbd1d6c6 --- /dev/null +++ b/src/vapi/types/insight_paginated_response.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .insight import Insight +from .pagination_meta import PaginationMeta + + +class InsightPaginatedResponse(UncheckedBaseModel): + results: typing.List[Insight] + metadata: PaginationMeta + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/insight_run_format_plan.py b/src/vapi/types/insight_run_format_plan.py new file mode 100644 index 00000000..78de707d --- /dev/null +++ b/src/vapi/types/insight_run_format_plan.py @@ -0,0 +1,27 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .insight_run_format_plan_format import InsightRunFormatPlanFormat + + +class InsightRunFormatPlan(UncheckedBaseModel): + format: typing.Optional[InsightRunFormatPlanFormat] = pydantic.Field(default=None) + """ + This is the format of the data to return. + If not provided, defaults to "raw". + Raw provides the data as fetched from the database, with formulas evaluated. + Recharts provides the data in a format that can is ready to be used by recharts.js to render charts. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/insight_run_format_plan_format.py b/src/vapi/types/insight_run_format_plan_format.py new file mode 100644 index 00000000..74cd5496 --- /dev/null +++ b/src/vapi/types/insight_run_format_plan_format.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +InsightRunFormatPlanFormat = typing.Union[typing.Literal["raw", "recharts"], typing.Any] diff --git a/src/vapi/types/insight_run_response.py b/src/vapi/types/insight_run_response.py new file mode 100644 index 00000000..91446dee --- /dev/null +++ b/src/vapi/types/insight_run_response.py @@ -0,0 +1,31 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class InsightRunResponse(UncheckedBaseModel): + id: str + insight_id: typing_extensions.Annotated[str, FieldMetadata(alias="insightId"), pydantic.Field(alias="insightId")] + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/insight_time_range.py b/src/vapi/types/insight_time_range.py new file mode 100644 index 00000000..73cafe69 --- /dev/null +++ b/src/vapi/types/insight_time_range.py @@ -0,0 +1,59 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class InsightTimeRange(UncheckedBaseModel): + start: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) + """ + This is the start date for the time range. + + Should be a valid ISO 8601 date-time string or relative time string. + If not provided, defaults to the 7 days ago. + + Relative time strings of the format "-{number}{unit}" are allowed. + + Valid units are: + - d: days + - h: hours + - w: weeks + - m: months + - y: years + """ + + end: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) + """ + This is the end date for the time range. + + Should be a valid ISO 8601 date-time string or relative time string. + If not provided, defaults to now. + + Relative time strings of the format "-{number}{unit}" are allowed. + + Valid units are: + - d: days + - h: hours + - w: weeks + - m: months + - y: years + """ + + timezone: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the timezone you want to set for the query. + + If not provided, defaults to UTC. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/insight_time_range_with_step.py b/src/vapi/types/insight_time_range_with_step.py new file mode 100644 index 00000000..c3958c11 --- /dev/null +++ b/src/vapi/types/insight_time_range_with_step.py @@ -0,0 +1,67 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .insight_time_range_with_step_step import InsightTimeRangeWithStepStep + + +class InsightTimeRangeWithStep(UncheckedBaseModel): + step: typing.Optional[InsightTimeRangeWithStepStep] = pydantic.Field(default=None) + """ + This is the group by step for aggregation. + + If not provided, defaults to group by day. + """ + + start: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) + """ + This is the start date for the time range. + + Should be a valid ISO 8601 date-time string or relative time string. + If not provided, defaults to the 7 days ago. + + Relative time strings of the format "-{number}{unit}" are allowed. + + Valid units are: + - d: days + - h: hours + - w: weeks + - m: months + - y: years + """ + + end: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) + """ + This is the end date for the time range. + + Should be a valid ISO 8601 date-time string or relative time string. + If not provided, defaults to now. + + Relative time strings of the format "-{number}{unit}" are allowed. + + Valid units are: + - d: days + - h: hours + - w: weeks + - m: months + - y: years + """ + + timezone: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the timezone you want to set for the query. + + If not provided, defaults to UTC. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/insight_time_range_with_step_step.py b/src/vapi/types/insight_time_range_with_step_step.py new file mode 100644 index 00000000..04ac4583 --- /dev/null +++ b/src/vapi/types/insight_time_range_with_step_step.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +InsightTimeRangeWithStepStep = typing.Union[ + typing.Literal["minute", "hour", "day", "week", "month", "quarter", "year"], typing.Any +] diff --git a/src/vapi/types/insight_type.py b/src/vapi/types/insight_type.py new file mode 100644 index 00000000..be7c7536 --- /dev/null +++ b/src/vapi/types/insight_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +InsightType = typing.Union[typing.Literal["bar", "line", "pie", "text"], typing.Any] diff --git a/src/vapi/types/invite_user_dto.py b/src/vapi/types/invite_user_dto.py index 7d336e95..b375f51d 100644 --- a/src/vapi/types/invite_user_dto.py +++ b/src/vapi/types/invite_user_dto.py @@ -1,15 +1,21 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -from .invite_user_dto_role import InviteUserDtoRole -from ..core.pydantic_utilities import IS_PYDANTIC_V2 import typing + import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .invite_user_dto_role import InviteUserDtoRole -class InviteUserDto(UniversalBaseModel): - email: str +class InviteUserDto(UncheckedBaseModel): + emails: typing.List[str] role: InviteUserDtoRole + redirect_to: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="redirectTo"), pydantic.Field(alias="redirectTo") + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/invoice_plan.py b/src/vapi/types/invoice_plan.py new file mode 100644 index 00000000..b414733e --- /dev/null +++ b/src/vapi/types/invoice_plan.py @@ -0,0 +1,44 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class InvoicePlan(UncheckedBaseModel): + company_name: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="companyName"), + pydantic.Field(alias="companyName", description="This is the name of the company."), + ] = None + company_address: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="companyAddress"), + pydantic.Field(alias="companyAddress", description="This is the address of the company."), + ] = None + company_tax_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="companyTaxId"), + pydantic.Field(alias="companyTaxId", description="This is the tax ID of the company."), + ] = None + company_email: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="companyEmail"), + pydantic.Field( + alias="companyEmail", + description="This is the preferred invoicing email of the company. If not specified, defaults to the subscription's email.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/inworld_credential.py b/src/vapi/types/inworld_credential.py new file mode 100644 index 00000000..1d5f97d5 --- /dev/null +++ b/src/vapi/types/inworld_credential.py @@ -0,0 +1,63 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .inworld_credential_provider import InworldCredentialProvider + + +class InworldCredential(UncheckedBaseModel): + provider: InworldCredentialProvider + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field( + alias="apiKey", + description="This is the Inworld Basic (Base64) authentication token. This is not returned in the API.", + ), + ] + id: str = pydantic.Field() + """ + This is the unique identifier for the credential. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/inworld_credential_provider.py b/src/vapi/types/inworld_credential_provider.py new file mode 100644 index 00000000..9d9fbf2a --- /dev/null +++ b/src/vapi/types/inworld_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +InworldCredentialProvider = typing.Union[typing.Literal["inworld"], typing.Any] diff --git a/src/vapi/types/inworld_voice.py b/src/vapi/types/inworld_voice.py new file mode 100644 index 00000000..73218f4a --- /dev/null +++ b/src/vapi/types/inworld_voice.py @@ -0,0 +1,82 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .chunk_plan import ChunkPlan +from .fallback_plan import FallbackPlan +from .inworld_voice_language_code import InworldVoiceLanguageCode +from .inworld_voice_model import InworldVoiceModel +from .inworld_voice_voice_id import InworldVoiceVoiceId + + +class InworldVoice(UncheckedBaseModel): + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="cachingEnabled"), + pydantic.Field( + alias="cachingEnabled", description="This is the flag to toggle voice caching for the assistant." + ), + ] = None + voice_id: typing_extensions.Annotated[ + InworldVoiceVoiceId, + FieldMetadata(alias="voiceId"), + pydantic.Field( + alias="voiceId", + description="Available voices by language:\n• en: Alex, Ashley, Craig, Deborah, Dennis, Edward, Elizabeth, Hades, Julia, Pixie, Mark, Olivia, Priya, Ronald, Sarah, Shaun, Theodore, Timothy, Wendy, Dominus, Hana, Clive, Carter, Blake, Luna\n• zh: Yichen, Xiaoyin, Xinyi, Jing\n• nl: Erik, Katrien, Lennart, Lore\n• fr: Alain, Hélène, Mathieu, Étienne\n• de: Johanna, Josef\n• it: Gianni, Orietta\n• ja: Asuka, Satoshi\n• ko: Hyunwoo, Minji, Seojun, Yoona\n• pl: Szymon, Wojciech\n• pt: Heitor, Maitê\n• es: Diego, Lupita, Miguel, Rafael\n• ru: Svetlana, Elena, Dmitry, Nikolai\n• hi: Riya, Manoj\n• he: Yael, Oren\n• ar: Nour, Omar", + ), + ] + model: typing.Optional[InworldVoiceModel] = pydantic.Field(default=None) + """ + This is the model that will be used. + """ + + language_code: typing_extensions.Annotated[ + typing.Optional[InworldVoiceLanguageCode], + FieldMetadata(alias="languageCode"), + pydantic.Field(alias="languageCode", description="Language code for Inworld TTS synthesis"), + ] = None + temperature: typing.Optional[float] = pydantic.Field(default=None) + """ + A floating point number between 0, exclusive, and 2, inclusive. If equal to null or not provided, the model's default temperature of 1.1 will be used. The temperature parameter controls variance. + Higher values will make the output more random and can lead to more expressive results. Lower values will make it more deterministic. + See https://docs.inworld.ai/docs/tts/capabilities/generating-audio#additional-configurations for more details. + """ + + speaking_rate: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="speakingRate"), + pydantic.Field( + alias="speakingRate", + description="A floating point number between 0.5, inclusive, and 1.5, inclusive. If equal to null or not provided, the model's default speaking speed of 1.0 will be used.\nValues above 0.8 are recommended for higher quality.\nSee https://docs.inworld.ai/docs/tts/capabilities/generating-audio#additional-configurations for more details.", + ), + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], + FieldMetadata(alias="chunkPlan"), + pydantic.Field( + alias="chunkPlan", + description="This is the plan for chunking the model output before it is sent to the voice provider.", + ), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field( + alias="fallbackPlan", + description="This is the plan for voice provider fallbacks in the event that the primary voice provider fails.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/inworld_voice_language_code.py b/src/vapi/types/inworld_voice_language_code.py new file mode 100644 index 00000000..4cf6984e --- /dev/null +++ b/src/vapi/types/inworld_voice_language_code.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +InworldVoiceLanguageCode = typing.Union[ + typing.Literal["en", "zh", "ko", "nl", "fr", "es", "ja", "de", "it", "pl", "pt", "ru", "hi", "he", "ar"], typing.Any +] diff --git a/src/vapi/types/inworld_voice_model.py b/src/vapi/types/inworld_voice_model.py new file mode 100644 index 00000000..d185147c --- /dev/null +++ b/src/vapi/types/inworld_voice_model.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +InworldVoiceModel = typing.Union[typing.Literal["inworld-tts-1"], typing.Any] diff --git a/src/vapi/types/inworld_voice_voice_id.py b/src/vapi/types/inworld_voice_voice_id.py new file mode 100644 index 00000000..140facee --- /dev/null +++ b/src/vapi/types/inworld_voice_voice_id.py @@ -0,0 +1,74 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +InworldVoiceVoiceId = typing.Union[ + typing.Literal[ + "Alex", + "Ashley", + "Craig", + "Deborah", + "Dennis", + "Edward", + "Elizabeth", + "Hades", + "Julia", + "Pixie", + "Mark", + "Olivia", + "Priya", + "Ronald", + "Sarah", + "Shaun", + "Theodore", + "Timothy", + "Wendy", + "Dominus", + "Hana", + "Clive", + "Carter", + "Blake", + "Luna", + "Yichen", + "Xiaoyin", + "Xinyi", + "Jing", + "Erik", + "Katrien", + "Lennart", + "Lore", + "Alain", + "Hélène", + "Mathieu", + "Étienne", + "Johanna", + "Josef", + "Gianni", + "Orietta", + "Asuka", + "Satoshi", + "Hyunwoo", + "Minji", + "Seojun", + "Yoona", + "Szymon", + "Wojciech", + "Heitor", + "Maitê", + "Diego", + "Lupita", + "Miguel", + "Rafael", + "Svetlana", + "Elena", + "Dmitry", + "Nikolai", + "Riya", + "Manoj", + "Yael", + "Oren", + "Nour", + "Omar", + ], + typing.Any, +] diff --git a/src/vapi/types/json_query_on_call_table_with_number_type_column.py b/src/vapi/types/json_query_on_call_table_with_number_type_column.py new file mode 100644 index 00000000..b939a57e --- /dev/null +++ b/src/vapi/types/json_query_on_call_table_with_number_type_column.py @@ -0,0 +1,68 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .json_query_on_call_table_with_number_type_column_column import JsonQueryOnCallTableWithNumberTypeColumnColumn +from .json_query_on_call_table_with_number_type_column_filters_item import ( + JsonQueryOnCallTableWithNumberTypeColumnFiltersItem, +) +from .json_query_on_call_table_with_number_type_column_operation import ( + JsonQueryOnCallTableWithNumberTypeColumnOperation, +) +from .json_query_on_call_table_with_number_type_column_table import JsonQueryOnCallTableWithNumberTypeColumnTable +from .json_query_on_call_table_with_number_type_column_type import JsonQueryOnCallTableWithNumberTypeColumnType + + +class JsonQueryOnCallTableWithNumberTypeColumn(UncheckedBaseModel): + type: JsonQueryOnCallTableWithNumberTypeColumnType = pydantic.Field() + """ + This is the type of query. Only allowed type is "vapiql-json". + """ + + table: JsonQueryOnCallTableWithNumberTypeColumnTable = pydantic.Field() + """ + This is the table that will be queried. + """ + + filters: typing.Optional[typing.List[JsonQueryOnCallTableWithNumberTypeColumnFiltersItem]] = pydantic.Field( + default=None + ) + """ + This is the filters to apply to the insight. + The discriminator automatically selects the correct filter type based on column and operator. + """ + + column: JsonQueryOnCallTableWithNumberTypeColumnColumn = pydantic.Field() + """ + This is the column that will be queried in the selected table. + Available columns depend on the selected table. + Number Type columns are columns where the rows store Number data + """ + + operation: JsonQueryOnCallTableWithNumberTypeColumnOperation = pydantic.Field() + """ + This is the aggregation operation to perform on the column. + When the column is a number type, the operation must be one of the following: + - average + - sum + - min + - max + """ + + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the query. + It will be used to label the query in the insight board on the UI. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/json_query_on_call_table_with_number_type_column_column.py b/src/vapi/types/json_query_on_call_table_with_number_type_column_column.py new file mode 100644 index 00000000..1b44d89f --- /dev/null +++ b/src/vapi/types/json_query_on_call_table_with_number_type_column_column.py @@ -0,0 +1,17 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +JsonQueryOnCallTableWithNumberTypeColumnColumn = typing.Union[ + typing.Literal[ + "cost", + "duration", + "averageModelLatency", + "averageVoiceLatency", + "averageTranscriberLatency", + "averageTurnLatency", + "averageEndpointingLatency", + "artifact.structuredOutputs[OutputID]", + ], + typing.Any, +] diff --git a/src/vapi/types/json_query_on_call_table_with_number_type_column_filters_item.py b/src/vapi/types/json_query_on_call_table_with_number_type_column_filters_item.py new file mode 100644 index 00000000..a808ca96 --- /dev/null +++ b/src/vapi/types/json_query_on_call_table_with_number_type_column_filters_item.py @@ -0,0 +1,19 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .filter_date_type_column_on_call_table import FilterDateTypeColumnOnCallTable +from .filter_number_array_type_column_on_call_table import FilterNumberArrayTypeColumnOnCallTable +from .filter_number_type_column_on_call_table import FilterNumberTypeColumnOnCallTable +from .filter_string_array_type_column_on_call_table import FilterStringArrayTypeColumnOnCallTable +from .filter_string_type_column_on_call_table import FilterStringTypeColumnOnCallTable +from .filter_structured_output_column_on_call_table import FilterStructuredOutputColumnOnCallTable + +JsonQueryOnCallTableWithNumberTypeColumnFiltersItem = typing.Union[ + FilterStringTypeColumnOnCallTable, + FilterStringArrayTypeColumnOnCallTable, + FilterNumberTypeColumnOnCallTable, + FilterNumberArrayTypeColumnOnCallTable, + FilterDateTypeColumnOnCallTable, + FilterStructuredOutputColumnOnCallTable, +] diff --git a/src/vapi/types/json_query_on_call_table_with_number_type_column_operation.py b/src/vapi/types/json_query_on_call_table_with_number_type_column_operation.py new file mode 100644 index 00000000..af08f990 --- /dev/null +++ b/src/vapi/types/json_query_on_call_table_with_number_type_column_operation.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +JsonQueryOnCallTableWithNumberTypeColumnOperation = typing.Union[ + typing.Literal["average", "sum", "min", "max"], typing.Any +] diff --git a/src/vapi/types/json_query_on_call_table_with_number_type_column_table.py b/src/vapi/types/json_query_on_call_table_with_number_type_column_table.py new file mode 100644 index 00000000..bc2415fd --- /dev/null +++ b/src/vapi/types/json_query_on_call_table_with_number_type_column_table.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +JsonQueryOnCallTableWithNumberTypeColumnTable = typing.Union[typing.Literal["call"], typing.Any] diff --git a/src/vapi/types/json_query_on_call_table_with_number_type_column_type.py b/src/vapi/types/json_query_on_call_table_with_number_type_column_type.py new file mode 100644 index 00000000..f721e2f4 --- /dev/null +++ b/src/vapi/types/json_query_on_call_table_with_number_type_column_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +JsonQueryOnCallTableWithNumberTypeColumnType = typing.Union[typing.Literal["vapiql-json"], typing.Any] diff --git a/src/vapi/types/json_query_on_call_table_with_string_type_column.py b/src/vapi/types/json_query_on_call_table_with_string_type_column.py new file mode 100644 index 00000000..a37bda9b --- /dev/null +++ b/src/vapi/types/json_query_on_call_table_with_string_type_column.py @@ -0,0 +1,64 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .json_query_on_call_table_with_string_type_column_column import JsonQueryOnCallTableWithStringTypeColumnColumn +from .json_query_on_call_table_with_string_type_column_filters_item import ( + JsonQueryOnCallTableWithStringTypeColumnFiltersItem, +) +from .json_query_on_call_table_with_string_type_column_operation import ( + JsonQueryOnCallTableWithStringTypeColumnOperation, +) +from .json_query_on_call_table_with_string_type_column_table import JsonQueryOnCallTableWithStringTypeColumnTable +from .json_query_on_call_table_with_string_type_column_type import JsonQueryOnCallTableWithStringTypeColumnType + + +class JsonQueryOnCallTableWithStringTypeColumn(UncheckedBaseModel): + type: JsonQueryOnCallTableWithStringTypeColumnType = pydantic.Field() + """ + This is the type of query. Only allowed type is "vapiql-json". + """ + + table: JsonQueryOnCallTableWithStringTypeColumnTable = pydantic.Field() + """ + This is the table that will be queried. + """ + + filters: typing.Optional[typing.List[JsonQueryOnCallTableWithStringTypeColumnFiltersItem]] = pydantic.Field( + default=None + ) + """ + This is the filters to apply to the insight. + The discriminator automatically selects the correct filter type based on column and operator. + """ + + column: JsonQueryOnCallTableWithStringTypeColumnColumn = pydantic.Field() + """ + This is the column that will be queried in the selected table. + Available columns depend on the selected table. + String Type columns are columns where the rows store String data + """ + + operation: JsonQueryOnCallTableWithStringTypeColumnOperation = pydantic.Field() + """ + This is the aggregation operation to perform on the column. + When the column is a string type, the operation must be "count". + """ + + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the query. + It will be used to label the query in the insight board on the UI. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/json_query_on_call_table_with_string_type_column_column.py b/src/vapi/types/json_query_on_call_table_with_string_type_column_column.py new file mode 100644 index 00000000..2e033d4b --- /dev/null +++ b/src/vapi/types/json_query_on_call_table_with_string_type_column_column.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +JsonQueryOnCallTableWithStringTypeColumnColumn = typing.Union[ + typing.Literal["id", "artifact.structuredOutputs[OutputID]"], typing.Any +] diff --git a/src/vapi/types/json_query_on_call_table_with_string_type_column_filters_item.py b/src/vapi/types/json_query_on_call_table_with_string_type_column_filters_item.py new file mode 100644 index 00000000..bc0fbd6b --- /dev/null +++ b/src/vapi/types/json_query_on_call_table_with_string_type_column_filters_item.py @@ -0,0 +1,19 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .filter_date_type_column_on_call_table import FilterDateTypeColumnOnCallTable +from .filter_number_array_type_column_on_call_table import FilterNumberArrayTypeColumnOnCallTable +from .filter_number_type_column_on_call_table import FilterNumberTypeColumnOnCallTable +from .filter_string_array_type_column_on_call_table import FilterStringArrayTypeColumnOnCallTable +from .filter_string_type_column_on_call_table import FilterStringTypeColumnOnCallTable +from .filter_structured_output_column_on_call_table import FilterStructuredOutputColumnOnCallTable + +JsonQueryOnCallTableWithStringTypeColumnFiltersItem = typing.Union[ + FilterStringTypeColumnOnCallTable, + FilterStringArrayTypeColumnOnCallTable, + FilterNumberTypeColumnOnCallTable, + FilterNumberArrayTypeColumnOnCallTable, + FilterDateTypeColumnOnCallTable, + FilterStructuredOutputColumnOnCallTable, +] diff --git a/src/vapi/types/json_query_on_call_table_with_string_type_column_operation.py b/src/vapi/types/json_query_on_call_table_with_string_type_column_operation.py new file mode 100644 index 00000000..0c0d7bf8 --- /dev/null +++ b/src/vapi/types/json_query_on_call_table_with_string_type_column_operation.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +JsonQueryOnCallTableWithStringTypeColumnOperation = typing.Union[typing.Literal["count"], typing.Any] diff --git a/src/vapi/types/json_query_on_call_table_with_string_type_column_table.py b/src/vapi/types/json_query_on_call_table_with_string_type_column_table.py new file mode 100644 index 00000000..c997367c --- /dev/null +++ b/src/vapi/types/json_query_on_call_table_with_string_type_column_table.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +JsonQueryOnCallTableWithStringTypeColumnTable = typing.Union[typing.Literal["call"], typing.Any] diff --git a/src/vapi/types/json_query_on_call_table_with_string_type_column_type.py b/src/vapi/types/json_query_on_call_table_with_string_type_column_type.py new file mode 100644 index 00000000..15d76ab0 --- /dev/null +++ b/src/vapi/types/json_query_on_call_table_with_string_type_column_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +JsonQueryOnCallTableWithStringTypeColumnType = typing.Union[typing.Literal["vapiql-json"], typing.Any] diff --git a/src/vapi/types/json_query_on_call_table_with_structured_output_column.py b/src/vapi/types/json_query_on_call_table_with_structured_output_column.py new file mode 100644 index 00000000..7cdd242b --- /dev/null +++ b/src/vapi/types/json_query_on_call_table_with_structured_output_column.py @@ -0,0 +1,71 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .json_query_on_call_table_with_structured_output_column_column import ( + JsonQueryOnCallTableWithStructuredOutputColumnColumn, +) +from .json_query_on_call_table_with_structured_output_column_filters_item import ( + JsonQueryOnCallTableWithStructuredOutputColumnFiltersItem, +) +from .json_query_on_call_table_with_structured_output_column_operation import ( + JsonQueryOnCallTableWithStructuredOutputColumnOperation, +) +from .json_query_on_call_table_with_structured_output_column_table import ( + JsonQueryOnCallTableWithStructuredOutputColumnTable, +) +from .json_query_on_call_table_with_structured_output_column_type import ( + JsonQueryOnCallTableWithStructuredOutputColumnType, +) + + +class JsonQueryOnCallTableWithStructuredOutputColumn(UncheckedBaseModel): + type: JsonQueryOnCallTableWithStructuredOutputColumnType = pydantic.Field() + """ + This is the type of query. Only allowed type is "vapiql-json". + """ + + table: JsonQueryOnCallTableWithStructuredOutputColumnTable = pydantic.Field() + """ + This is the table that will be queried. + """ + + filters: typing.Optional[typing.List[JsonQueryOnCallTableWithStructuredOutputColumnFiltersItem]] = pydantic.Field( + default=None + ) + """ + This is the filters to apply to the insight. + The discriminator automatically selects the correct filter type based on column and operator. + """ + + column: JsonQueryOnCallTableWithStructuredOutputColumnColumn = pydantic.Field() + """ + This is the column that will be queried in the call table. + Structured Output Type columns are only to query on artifact.structuredOutputs[OutputID] column. + """ + + operation: JsonQueryOnCallTableWithStructuredOutputColumnOperation = pydantic.Field() + """ + This is the aggregation operation to perform on the column. + When the column is a structured output type, the operation depends on the value of the structured output. + If the structured output is a string or boolean, the operation must be "count". + If the structured output is a number, the operation can be "average", "sum", "min", or "max". + """ + + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the query. + It will be used to label the query in the insight board on the UI. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/json_query_on_call_table_with_structured_output_column_column.py b/src/vapi/types/json_query_on_call_table_with_structured_output_column_column.py new file mode 100644 index 00000000..b142d8d3 --- /dev/null +++ b/src/vapi/types/json_query_on_call_table_with_structured_output_column_column.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +JsonQueryOnCallTableWithStructuredOutputColumnColumn = typing.Union[ + typing.Literal["artifact.structuredOutputs[OutputID]"], typing.Any +] diff --git a/src/vapi/types/json_query_on_call_table_with_structured_output_column_filters_item.py b/src/vapi/types/json_query_on_call_table_with_structured_output_column_filters_item.py new file mode 100644 index 00000000..31bb71c6 --- /dev/null +++ b/src/vapi/types/json_query_on_call_table_with_structured_output_column_filters_item.py @@ -0,0 +1,19 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .filter_date_type_column_on_call_table import FilterDateTypeColumnOnCallTable +from .filter_number_array_type_column_on_call_table import FilterNumberArrayTypeColumnOnCallTable +from .filter_number_type_column_on_call_table import FilterNumberTypeColumnOnCallTable +from .filter_string_array_type_column_on_call_table import FilterStringArrayTypeColumnOnCallTable +from .filter_string_type_column_on_call_table import FilterStringTypeColumnOnCallTable +from .filter_structured_output_column_on_call_table import FilterStructuredOutputColumnOnCallTable + +JsonQueryOnCallTableWithStructuredOutputColumnFiltersItem = typing.Union[ + FilterStringTypeColumnOnCallTable, + FilterStringArrayTypeColumnOnCallTable, + FilterNumberTypeColumnOnCallTable, + FilterNumberArrayTypeColumnOnCallTable, + FilterDateTypeColumnOnCallTable, + FilterStructuredOutputColumnOnCallTable, +] diff --git a/src/vapi/types/json_query_on_call_table_with_structured_output_column_operation.py b/src/vapi/types/json_query_on_call_table_with_structured_output_column_operation.py new file mode 100644 index 00000000..58fdab63 --- /dev/null +++ b/src/vapi/types/json_query_on_call_table_with_structured_output_column_operation.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +JsonQueryOnCallTableWithStructuredOutputColumnOperation = typing.Union[ + typing.Literal["average", "count", "sum", "min", "max"], typing.Any +] diff --git a/src/vapi/types/json_query_on_call_table_with_structured_output_column_table.py b/src/vapi/types/json_query_on_call_table_with_structured_output_column_table.py new file mode 100644 index 00000000..e2469443 --- /dev/null +++ b/src/vapi/types/json_query_on_call_table_with_structured_output_column_table.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +JsonQueryOnCallTableWithStructuredOutputColumnTable = typing.Union[typing.Literal["call"], typing.Any] diff --git a/src/vapi/types/json_query_on_call_table_with_structured_output_column_type.py b/src/vapi/types/json_query_on_call_table_with_structured_output_column_type.py new file mode 100644 index 00000000..0c02a0ac --- /dev/null +++ b/src/vapi/types/json_query_on_call_table_with_structured_output_column_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +JsonQueryOnCallTableWithStructuredOutputColumnType = typing.Union[typing.Literal["vapiql-json"], typing.Any] diff --git a/src/vapi/types/json_query_on_events_table.py b/src/vapi/types/json_query_on_events_table.py new file mode 100644 index 00000000..05e9289c --- /dev/null +++ b/src/vapi/types/json_query_on_events_table.py @@ -0,0 +1,58 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .json_query_on_events_table_filters_item import JsonQueryOnEventsTableFiltersItem +from .json_query_on_events_table_on import JsonQueryOnEventsTableOn +from .json_query_on_events_table_operation import JsonQueryOnEventsTableOperation +from .json_query_on_events_table_table import JsonQueryOnEventsTableTable +from .json_query_on_events_table_type import JsonQueryOnEventsTableType + + +class JsonQueryOnEventsTable(UncheckedBaseModel): + type: JsonQueryOnEventsTableType = pydantic.Field() + """ + This is the type of query. Only allowed type is "vapiql-json". + """ + + table: JsonQueryOnEventsTableTable = pydantic.Field() + """ + This is the table that will be queried. + Must be "events" for event-based insights. + """ + + on: JsonQueryOnEventsTableOn = pydantic.Field() + """ + The event type to query + """ + + operation: JsonQueryOnEventsTableOperation = pydantic.Field() + """ + This is the operation to perform on matching events. + - "count": Returns the raw count of matching events + - "percentage": Returns (count of matching events / total calls) * 100 + """ + + filters: typing.Optional[typing.List[JsonQueryOnEventsTableFiltersItem]] = pydantic.Field(default=None) + """ + These are the filters to apply to the events query. + Each filter filters on a field specific to the event type. + """ + + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the query. + It will be used to label the query in the insight board on the UI. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/json_query_on_events_table_filters_item.py b/src/vapi/types/json_query_on_events_table_filters_item.py new file mode 100644 index 00000000..bd22cc2a --- /dev/null +++ b/src/vapi/types/json_query_on_events_table_filters_item.py @@ -0,0 +1,11 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .events_table_boolean_condition import EventsTableBooleanCondition +from .events_table_number_condition import EventsTableNumberCondition +from .events_table_string_condition import EventsTableStringCondition + +JsonQueryOnEventsTableFiltersItem = typing.Union[ + EventsTableStringCondition, EventsTableNumberCondition, EventsTableBooleanCondition +] diff --git a/src/vapi/types/json_query_on_events_table_on.py b/src/vapi/types/json_query_on_events_table_on.py new file mode 100644 index 00000000..626fcf54 --- /dev/null +++ b/src/vapi/types/json_query_on_events_table_on.py @@ -0,0 +1,103 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +JsonQueryOnEventsTableOn = typing.Union[ + typing.Literal[ + "call.started", + "call.ended", + "call.inProgress", + "call.queued", + "call.transportConnected", + "call.transportDisconnected", + "call.transportReconnected", + "call.transferInitiated", + "call.transferCompleted", + "call.transferFailed", + "call.transferCancelled", + "call.handoffInitiated", + "call.handoffCompleted", + "call.handoffFailed", + "call.assistantSwapped", + "call.assistantStarted", + "call.customerJoined", + "call.customerLeft", + "call.controlReceived", + "call.listenStarted", + "call.recordingStarted", + "call.recordingPaused", + "call.recordingResumed", + "call.voicemailDetected", + "call.voicemailNotDetected", + "call.dtmfReceived", + "call.dtmfSent", + "call.amdDetected", + "call.hookTriggered", + "call.hookSucceeded", + "call.hookFailed", + "call.statusReceived", + "call.silenceTimeout", + "call.microphoneTimeout", + "call.maxDurationReached", + "assistant.voice.requestStarted", + "assistant.voice.requestSucceeded", + "assistant.voice.requestFailed", + "assistant.voice.connectionOpened", + "assistant.voice.connectionClosed", + "assistant.voice.firstAudioReceived", + "assistant.voice.audioChunkReceived", + "assistant.voice.generationSucceeded", + "assistant.voice.generationFailed", + "assistant.voice.textPushed", + "assistant.voice.reconnecting", + "assistant.voice.cleanup", + "assistant.voice.clearing", + "assistant.voice.voiceSwitched", + "assistant.model.requestStarted", + "assistant.model.requestSucceeded", + "assistant.model.requestFailed", + "assistant.model.requestAttemptStarted", + "assistant.model.requestAttemptSucceeded", + "assistant.model.requestAttemptFailed", + "assistant.model.connectionOpened", + "assistant.model.connectionClosed", + "assistant.model.firstTokenReceived", + "assistant.model.tokenReceived", + "assistant.model.responseSucceeded", + "assistant.model.responseFailed", + "assistant.model.toolCallsReceived", + "assistant.model.reconnecting", + "assistant.model.cleanup", + "assistant.model.clearing", + "assistant.tool.started", + "assistant.tool.completed", + "assistant.tool.failed", + "assistant.tool.delayedMessageSent", + "assistant.tool.timeout", + "assistant.tool.asyncCallbackReceived", + "assistant.transcriber.requestStarted", + "assistant.transcriber.requestSucceeded", + "assistant.transcriber.requestFailed", + "assistant.transcriber.connectionOpened", + "assistant.transcriber.connectionClosed", + "assistant.transcriber.partialTranscript", + "assistant.transcriber.finalTranscript", + "assistant.transcriber.keepAlive", + "assistant.transcriber.reconnecting", + "assistant.transcriber.cleanup", + "assistant.transcriber.clearing", + "assistant.transcriber.transcriptIgnored", + "assistant.transcriber.languageSwitched", + "assistant.analysis.structuredOutputGenerated", + "pipeline.turnStarted", + "pipeline.cleared", + "pipeline.botSpeechStarted", + "pipeline.botSpeechStopped", + "pipeline.userSpeechStarted", + "pipeline.userSpeechStopped", + "pipeline.endpointingTriggered", + "pipeline.firstMessageStarted", + "pipeline.firstMessageCompleted", + ], + typing.Any, +] diff --git a/src/vapi/types/json_query_on_events_table_operation.py b/src/vapi/types/json_query_on_events_table_operation.py new file mode 100644 index 00000000..df5cd4e2 --- /dev/null +++ b/src/vapi/types/json_query_on_events_table_operation.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +JsonQueryOnEventsTableOperation = typing.Union[typing.Literal["count", "percentage"], typing.Any] diff --git a/src/vapi/types/json_query_on_events_table_table.py b/src/vapi/types/json_query_on_events_table_table.py new file mode 100644 index 00000000..61a9447f --- /dev/null +++ b/src/vapi/types/json_query_on_events_table_table.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +JsonQueryOnEventsTableTable = typing.Union[typing.Literal["events"], typing.Any] diff --git a/src/vapi/types/json_query_on_events_table_type.py b/src/vapi/types/json_query_on_events_table_type.py new file mode 100644 index 00000000..0c953420 --- /dev/null +++ b/src/vapi/types/json_query_on_events_table_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +JsonQueryOnEventsTableType = typing.Union[typing.Literal["vapiql-json"], typing.Any] diff --git a/src/vapi/types/json_schema.py b/src/vapi/types/json_schema.py index ad2b3ba0..b6f68529 100644 --- a/src/vapi/types/json_schema.py +++ b/src/vapi/types/json_schema.py @@ -1,13 +1,17 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -from .json_schema_type import JsonSchemaType -import pydantic +from __future__ import annotations + import typing -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .json_schema_format import JsonSchemaFormat +from .json_schema_type import JsonSchemaType -class JsonSchema(UniversalBaseModel): +class JsonSchema(UncheckedBaseModel): type: JsonSchemaType = pydantic.Field() """ This is the type of output you'd like. @@ -21,18 +25,14 @@ class JsonSchema(UniversalBaseModel): For `object`, you can define the properties of the object using the `properties` property. """ - items: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None) + items: typing.Optional["JsonSchema"] = pydantic.Field(default=None) """ - This is required if the type is "array". This is the schema of the items in the array. - - This is of type JsonSchema. However, Swagger doesn't support circular references. + This is required if the type is "array". This is the schema of the items in the array. This is a recursive reference to JsonSchema. """ - properties: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None) + properties: typing.Optional[typing.Dict[str, "JsonSchema"]] = pydantic.Field(default=None) """ - This is required if the type is "object". This specifies the properties of the object. - - This is a map of string to JsonSchema. However, Swagger doesn't support circular references. + This is required if the type is "object". This specifies the properties of the object. This is a map of property names to JsonSchema objects. """ description: typing.Optional[str] = pydantic.Field(default=None) @@ -40,6 +40,20 @@ class JsonSchema(UniversalBaseModel): This is the description to help the model understand what it needs to output. """ + pattern: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the pattern of the string. This is a regex that will be used to validate the data in question. To use a common format, use the `format` property instead. + + OpenAI documentation: https://platform.openai.com/docs/guides/structured-outputs#supported-properties + """ + + format: typing.Optional[JsonSchemaFormat] = pydantic.Field(default=None) + """ + This is the format of the string. To pass a regex, use the `pattern` property instead. + + OpenAI documentation: https://platform.openai.com/docs/guides/structured-outputs?api-mode=chat&type-restrictions=string-restrictions + """ + required: typing.Optional[typing.List[str]] = pydantic.Field(default=None) """ This is a list of properties that are required. @@ -47,6 +61,16 @@ class JsonSchema(UniversalBaseModel): This only makes sense if the type is "object". """ + enum: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + This array specifies the allowed values that can be used to restrict the output of the model. + """ + + title: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the title of the schema. + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: @@ -55,3 +79,6 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +update_forward_refs(JsonSchema) diff --git a/src/vapi/types/json_schema_format.py b/src/vapi/types/json_schema_format.py new file mode 100644 index 00000000..17346ecc --- /dev/null +++ b/src/vapi/types/json_schema_format.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +JsonSchemaFormat = typing.Union[ + typing.Literal["date-time", "time", "date", "duration", "email", "hostname", "ipv4", "ipv6", "uuid"], typing.Any +] diff --git a/src/vapi/types/jwt_response.py b/src/vapi/types/jwt_response.py new file mode 100644 index 00000000..26d987c6 --- /dev/null +++ b/src/vapi/types/jwt_response.py @@ -0,0 +1,25 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class JwtResponse(UncheckedBaseModel): + access_token: typing_extensions.Annotated[ + str, FieldMetadata(alias="accessToken"), pydantic.Field(alias="accessToken") + ] + aud: typing.Dict[str, typing.Any] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/keypad_input_plan.py b/src/vapi/types/keypad_input_plan.py new file mode 100644 index 00000000..a934a7ca --- /dev/null +++ b/src/vapi/types/keypad_input_plan.py @@ -0,0 +1,43 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .keypad_input_plan_delimiters import KeypadInputPlanDelimiters + + +class KeypadInputPlan(UncheckedBaseModel): + enabled: typing.Optional[bool] = pydantic.Field(default=None) + """ + This keeps track of whether the user has enabled keypad input. + By default, it is off. + + @default false + """ + + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="timeoutSeconds"), + pydantic.Field( + alias="timeoutSeconds", + description='This is the time in seconds to wait before processing the input.\nIf the input is not received within this time, the input will be ignored.\nIf set to "off", the input will be processed when the user enters a delimiter or immediately if no delimiter is used.\n\n@default 2', + ), + ] = None + delimiters: typing.Optional[KeypadInputPlanDelimiters] = pydantic.Field(default=None) + """ + This is the delimiter(s) that will be used to process the input. + Can be '#', '*', or an empty array. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/keypad_input_plan_delimiters.py b/src/vapi/types/keypad_input_plan_delimiters.py new file mode 100644 index 00000000..e8eb7073 --- /dev/null +++ b/src/vapi/types/keypad_input_plan_delimiters.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +KeypadInputPlanDelimiters = typing.Union[typing.Literal["#", "*", ""], typing.Any] diff --git a/src/vapi/types/knowledge_base.py b/src/vapi/types/knowledge_base.py index e258bf27..0f09119d 100644 --- a/src/vapi/types/knowledge_base.py +++ b/src/vapi/types/knowledge_base.py @@ -1,17 +1,42 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing + +import pydantic import typing_extensions -from ..core.serialization import FieldMetadata from ..core.pydantic_utilities import IS_PYDANTIC_V2 -import pydantic +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .knowledge_base_model import KnowledgeBaseModel +from .knowledge_base_provider import KnowledgeBaseProvider + + +class KnowledgeBase(UncheckedBaseModel): + name: str = pydantic.Field() + """ + The name of the knowledge base + """ + + provider: KnowledgeBaseProvider = pydantic.Field() + """ + The provider of the knowledge base + """ + + model: typing.Optional[KnowledgeBaseModel] = pydantic.Field(default=None) + """ + The model to use for the knowledge base + """ + description: str = pydantic.Field() + """ + A description of the knowledge base + """ -class KnowledgeBase(UniversalBaseModel): - provider: typing.Literal["canonical"] = "canonical" - top_k: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="topK")] = None - file_ids: typing_extensions.Annotated[typing.List[str], FieldMetadata(alias="fileIds")] + file_ids: typing_extensions.Annotated[ + typing.List[str], + FieldMetadata(alias="fileIds"), + pydantic.Field(alias="fileIds", description="The file IDs associated with this knowledge base"), + ] if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/knowledge_base_cost.py b/src/vapi/types/knowledge_base_cost.py new file mode 100644 index 00000000..69c07475 --- /dev/null +++ b/src/vapi/types/knowledge_base_cost.py @@ -0,0 +1,45 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class KnowledgeBaseCost(UncheckedBaseModel): + model: typing.Dict[str, typing.Any] = pydantic.Field() + """ + This is the model that was used for processing the knowledge base. + """ + + prompt_tokens: typing_extensions.Annotated[ + float, + FieldMetadata(alias="promptTokens"), + pydantic.Field( + alias="promptTokens", description="This is the number of prompt tokens used in the knowledge base query." + ), + ] + completion_tokens: typing_extensions.Annotated[ + float, + FieldMetadata(alias="completionTokens"), + pydantic.Field( + alias="completionTokens", + description="This is the number of completion tokens generated in the knowledge base query.", + ), + ] + cost: float = pydantic.Field() + """ + This is the cost of the component in USD. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/knowledge_base_model.py b/src/vapi/types/knowledge_base_model.py new file mode 100644 index 00000000..dd590eee --- /dev/null +++ b/src/vapi/types/knowledge_base_model.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +KnowledgeBaseModel = typing.Union[ + typing.Literal[ + "gemini-3-flash-preview", + "gemini-2.5-pro", + "gemini-2.5-flash", + "gemini-2.5-flash-lite", + "gemini-2.0-flash-thinking-exp", + "gemini-2.0-pro-exp-02-05", + "gemini-2.0-flash", + "gemini-2.0-flash-lite", + "gemini-2.0-flash-exp", + "gemini-2.0-flash-realtime-exp", + "gemini-1.5-flash", + "gemini-1.5-flash-002", + "gemini-1.5-pro", + "gemini-1.5-pro-002", + "gemini-1.0-pro", + ], + typing.Any, +] diff --git a/src/vapi/types/knowledge_base_provider.py b/src/vapi/types/knowledge_base_provider.py new file mode 100644 index 00000000..4908ed40 --- /dev/null +++ b/src/vapi/types/knowledge_base_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +KnowledgeBaseProvider = typing.Union[typing.Literal["google"], typing.Any] diff --git a/src/vapi/types/knowledge_base_response_document.py b/src/vapi/types/knowledge_base_response_document.py new file mode 100644 index 00000000..5eb8395b --- /dev/null +++ b/src/vapi/types/knowledge_base_response_document.py @@ -0,0 +1,36 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class KnowledgeBaseResponseDocument(UncheckedBaseModel): + content: str = pydantic.Field() + """ + This is the content of the document. + """ + + similarity: float = pydantic.Field() + """ + This is the similarity score of the document. + """ + + uuid_: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="uuid"), + pydantic.Field(alias="uuid", description="This is the uuid of the document."), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/langfuse_credential.py b/src/vapi/types/langfuse_credential.py new file mode 100644 index 00000000..35d47444 --- /dev/null +++ b/src/vapi/types/langfuse_credential.py @@ -0,0 +1,73 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .langfuse_credential_provider import LangfuseCredentialProvider + + +class LangfuseCredential(UncheckedBaseModel): + provider: LangfuseCredentialProvider + public_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="publicKey"), + pydantic.Field(alias="publicKey", description="The public key for Langfuse project. Eg: pk-lf-..."), + ] + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field( + alias="apiKey", + description="The secret key for Langfuse project. Eg: sk-lf-... .This is not returned in the API.", + ), + ] + api_url: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiUrl"), + pydantic.Field(alias="apiUrl", description="The host URL for Langfuse project. Eg: https://cloud.langfuse.com"), + ] + id: str = pydantic.Field() + """ + This is the unique identifier for the credential. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/langfuse_credential_provider.py b/src/vapi/types/langfuse_credential_provider.py new file mode 100644 index 00000000..2f33da43 --- /dev/null +++ b/src/vapi/types/langfuse_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +LangfuseCredentialProvider = typing.Union[typing.Literal["langfuse"], typing.Any] diff --git a/src/vapi/types/langfuse_observability_plan.py b/src/vapi/types/langfuse_observability_plan.py new file mode 100644 index 00000000..203fc559 --- /dev/null +++ b/src/vapi/types/langfuse_observability_plan.py @@ -0,0 +1,57 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .langfuse_observability_plan_provider import LangfuseObservabilityPlanProvider + + +class LangfuseObservabilityPlan(UncheckedBaseModel): + provider: LangfuseObservabilityPlanProvider + prompt_name: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="promptName"), + pydantic.Field( + alias="promptName", + description="The name of a Langfuse prompt to link generations to. This enables tracking which prompt version was used for each generation. https://langfuse.com/docs/prompt-management/features/link-to-traces", + ), + ] = None + prompt_version: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="promptVersion"), + pydantic.Field( + alias="promptVersion", + description="The version number of the Langfuse prompt to link generations to. Used together with promptName to identify the exact prompt version. https://langfuse.com/docs/prompt-management/features/link-to-traces", + ), + ] = None + trace_name: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="traceName"), + pydantic.Field( + alias="traceName", + description="Custom name for the Langfuse trace. Supports Liquid templates.\n\nAvailable variables:\n- {{ call.id }} - Call UUID\n- {{ call.type }} - 'inboundPhoneCall', 'outboundPhoneCall', 'webCall'\n- {{ assistant.name }} - Assistant name\n- {{ assistant.id }} - Assistant ID\n\nExample: \"{{ assistant.name }} - {{ call.type }}\"\n\nDefaults to call ID if not provided.", + ), + ] = None + tags: typing.List[str] = pydantic.Field() + """ + This is an array of tags to be added to the Langfuse trace. Tags allow you to categorize and filter traces. https://langfuse.com/docs/tracing-features/tags + """ + + metadata: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) + """ + This is a JSON object that will be added to the Langfuse trace. Traces can be enriched with metadata to better understand your users, application, and experiments. https://langfuse.com/docs/tracing-features/metadata + By default it includes the call metadata, assistant metadata, and assistant overrides. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/langfuse_observability_plan_provider.py b/src/vapi/types/langfuse_observability_plan_provider.py new file mode 100644 index 00000000..2ef54e6b --- /dev/null +++ b/src/vapi/types/langfuse_observability_plan_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +LangfuseObservabilityPlanProvider = typing.Union[typing.Literal["langfuse"], typing.Any] diff --git a/src/vapi/types/latency_metrics.py b/src/vapi/types/latency_metrics.py new file mode 100644 index 00000000..4e1e0a37 --- /dev/null +++ b/src/vapi/types/latency_metrics.py @@ -0,0 +1,51 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class LatencyMetrics(UncheckedBaseModel): + turn_count: typing_extensions.Annotated[ + float, + FieldMetadata(alias="turnCount"), + pydantic.Field(alias="turnCount", description="This is the number of conversation turns."), + ] + avg_turn: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="avgTurn"), + pydantic.Field(alias="avgTurn", description="This is the average total turn latency in milliseconds."), + ] = None + avg_transcriber: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="avgTranscriber"), + pydantic.Field(alias="avgTranscriber", description="This is the average transcriber latency in milliseconds."), + ] = None + avg_model: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="avgModel"), + pydantic.Field(alias="avgModel", description="This is the average LLM/model latency in milliseconds."), + ] = None + avg_voice: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="avgVoice"), + pydantic.Field(alias="avgVoice", description="This is the average voice/TTS latency in milliseconds."), + ] = None + avg_endpointing: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="avgEndpointing"), + pydantic.Field(alias="avgEndpointing", description="This is the average endpointing latency in milliseconds."), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/line_insight.py b/src/vapi/types/line_insight.py new file mode 100644 index 00000000..baf5328f --- /dev/null +++ b/src/vapi/types/line_insight.py @@ -0,0 +1,98 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .insight_formula import InsightFormula +from .insight_time_range_with_step import InsightTimeRangeWithStep +from .line_insight_group_by import LineInsightGroupBy +from .line_insight_metadata import LineInsightMetadata +from .line_insight_queries_item import LineInsightQueriesItem + + +class LineInsight(UncheckedBaseModel): + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the Insight. + """ + + formulas: typing.Optional[typing.List[InsightFormula]] = pydantic.Field(default=None) + """ + Formulas are mathematical expressions applied on the data returned by the queries to transform them before being used to create the insight. + The formulas needs to be a valid mathematical expression, supported by MathJS - https://mathjs.org/docs/expressions/syntax.html + A formula is created by using the query names as the variable. + The formulas must contain at least one query name in the LiquidJS format {{query_name}} or {{['query name']}} which will be substituted with the query result. + For example, if you have 2 queries, 'Was Booking Made' and 'Average Call Duration', you can create a formula like this: + ``` + {{['Query 1']}} / {{['Query 2']}} * 100 + ``` + + ``` + ({{[Query 1]}} * 10) + {{[Query 2]}} + ``` + This will take the + + You can also use the query names as the variable in the formula. + """ + + metadata: typing.Optional[LineInsightMetadata] = pydantic.Field(default=None) + """ + This is the metadata for the insight. + """ + + time_range: typing_extensions.Annotated[ + typing.Optional[InsightTimeRangeWithStep], FieldMetadata(alias="timeRange"), pydantic.Field(alias="timeRange") + ] = None + group_by: typing_extensions.Annotated[ + typing.Optional[LineInsightGroupBy], + FieldMetadata(alias="groupBy"), + pydantic.Field( + alias="groupBy", + description="This is the group by column for the insight when table is `call`.\nThese are the columns to group the results by.\nAll results are grouped by the time range step by default.", + ), + ] = None + queries: typing.List[LineInsightQueriesItem] = pydantic.Field() + """ + These are the queries to run to generate the insight. + """ + + id: str = pydantic.Field() + """ + This is the unique identifier for the Insight. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this Insight belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the Insight was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", description="This is the ISO 8601 date-time string of when the Insight was last updated." + ), + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/line_insight_from_call_table.py b/src/vapi/types/line_insight_from_call_table.py new file mode 100644 index 00000000..35271417 --- /dev/null +++ b/src/vapi/types/line_insight_from_call_table.py @@ -0,0 +1,77 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .insight_formula import InsightFormula +from .insight_time_range_with_step import InsightTimeRangeWithStep +from .line_insight_from_call_table_group_by import LineInsightFromCallTableGroupBy +from .line_insight_from_call_table_queries_item import LineInsightFromCallTableQueriesItem +from .line_insight_from_call_table_type import LineInsightFromCallTableType +from .line_insight_metadata import LineInsightMetadata + + +class LineInsightFromCallTable(UncheckedBaseModel): + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the Insight. + """ + + type: LineInsightFromCallTableType = pydantic.Field() + """ + This is the type of the Insight. + It is required to be `line` to create a line insight. + """ + + formulas: typing.Optional[typing.List[InsightFormula]] = pydantic.Field(default=None) + """ + Formulas are mathematical expressions applied on the data returned by the queries to transform them before being used to create the insight. + The formulas needs to be a valid mathematical expression, supported by MathJS - https://mathjs.org/docs/expressions/syntax.html + A formula is created by using the query names as the variable. + The formulas must contain at least one query name in the LiquidJS format {{query_name}} or {{['query name']}} which will be substituted with the query result. + For example, if you have 2 queries, 'Was Booking Made' and 'Average Call Duration', you can create a formula like this: + ``` + {{['Query 1']}} / {{['Query 2']}} * 100 + ``` + + ``` + ({{[Query 1]}} * 10) + {{[Query 2]}} + ``` + This will take the + + You can also use the query names as the variable in the formula. + """ + + metadata: typing.Optional[LineInsightMetadata] = pydantic.Field(default=None) + """ + This is the metadata for the insight. + """ + + time_range: typing_extensions.Annotated[ + typing.Optional[InsightTimeRangeWithStep], FieldMetadata(alias="timeRange"), pydantic.Field(alias="timeRange") + ] = None + group_by: typing_extensions.Annotated[ + typing.Optional[LineInsightFromCallTableGroupBy], + FieldMetadata(alias="groupBy"), + pydantic.Field( + alias="groupBy", + description="This is the group by column for the insight when table is `call`.\nThese are the columns to group the results by.\nAll results are grouped by the time range step by default.", + ), + ] = None + queries: typing.List[LineInsightFromCallTableQueriesItem] = pydantic.Field() + """ + These are the queries to run to generate the insight. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/line_insight_from_call_table_group_by.py b/src/vapi/types/line_insight_from_call_table_group_by.py new file mode 100644 index 00000000..89ede934 --- /dev/null +++ b/src/vapi/types/line_insight_from_call_table_group_by.py @@ -0,0 +1,18 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +LineInsightFromCallTableGroupBy = typing.Union[ + typing.Literal[ + "assistantId", + "workflowId", + "squadId", + "phoneNumberId", + "type", + "endedReason", + "customerNumber", + "campaignId", + "artifact.structuredOutputs[OutputID]", + ], + typing.Any, +] diff --git a/src/vapi/types/line_insight_from_call_table_queries_item.py b/src/vapi/types/line_insight_from_call_table_queries_item.py new file mode 100644 index 00000000..e6b1758d --- /dev/null +++ b/src/vapi/types/line_insight_from_call_table_queries_item.py @@ -0,0 +1,13 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .json_query_on_call_table_with_number_type_column import JsonQueryOnCallTableWithNumberTypeColumn +from .json_query_on_call_table_with_string_type_column import JsonQueryOnCallTableWithStringTypeColumn +from .json_query_on_call_table_with_structured_output_column import JsonQueryOnCallTableWithStructuredOutputColumn + +LineInsightFromCallTableQueriesItem = typing.Union[ + JsonQueryOnCallTableWithStringTypeColumn, + JsonQueryOnCallTableWithNumberTypeColumn, + JsonQueryOnCallTableWithStructuredOutputColumn, +] diff --git a/src/vapi/types/line_insight_from_call_table_type.py b/src/vapi/types/line_insight_from_call_table_type.py new file mode 100644 index 00000000..a4ef604d --- /dev/null +++ b/src/vapi/types/line_insight_from_call_table_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +LineInsightFromCallTableType = typing.Union[typing.Literal["line"], typing.Any] diff --git a/src/vapi/types/line_insight_group_by.py b/src/vapi/types/line_insight_group_by.py new file mode 100644 index 00000000..79dec48b --- /dev/null +++ b/src/vapi/types/line_insight_group_by.py @@ -0,0 +1,18 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +LineInsightGroupBy = typing.Union[ + typing.Literal[ + "assistantId", + "workflowId", + "squadId", + "phoneNumberId", + "type", + "endedReason", + "customerNumber", + "campaignId", + "artifact.structuredOutputs[OutputID]", + ], + typing.Any, +] diff --git a/src/vapi/types/line_insight_metadata.py b/src/vapi/types/line_insight_metadata.py new file mode 100644 index 00000000..72b1ad03 --- /dev/null +++ b/src/vapi/types/line_insight_metadata.py @@ -0,0 +1,34 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class LineInsightMetadata(UncheckedBaseModel): + x_axis_label: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="xAxisLabel"), pydantic.Field(alias="xAxisLabel") + ] = None + y_axis_label: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="yAxisLabel"), pydantic.Field(alias="yAxisLabel") + ] = None + y_axis_min: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="yAxisMin"), pydantic.Field(alias="yAxisMin") + ] = None + y_axis_max: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="yAxisMax"), pydantic.Field(alias="yAxisMax") + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/line_insight_queries_item.py b/src/vapi/types/line_insight_queries_item.py new file mode 100644 index 00000000..8a4425b7 --- /dev/null +++ b/src/vapi/types/line_insight_queries_item.py @@ -0,0 +1,13 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .json_query_on_call_table_with_number_type_column import JsonQueryOnCallTableWithNumberTypeColumn +from .json_query_on_call_table_with_string_type_column import JsonQueryOnCallTableWithStringTypeColumn +from .json_query_on_call_table_with_structured_output_column import JsonQueryOnCallTableWithStructuredOutputColumn + +LineInsightQueriesItem = typing.Union[ + JsonQueryOnCallTableWithStringTypeColumn, + JsonQueryOnCallTableWithNumberTypeColumn, + JsonQueryOnCallTableWithStructuredOutputColumn, +] diff --git a/src/vapi/types/liquid_condition.py b/src/vapi/types/liquid_condition.py new file mode 100644 index 00000000..92be88f4 --- /dev/null +++ b/src/vapi/types/liquid_condition.py @@ -0,0 +1,35 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class LiquidCondition(UncheckedBaseModel): + liquid: str = pydantic.Field() + """ + This is the Liquid template that must return exactly "true" or "false" as a string. + The template is evaluated and the entire output must be either "true" or "false" - nothing else. + + Available variables: + - `messages`: Array of recent messages in OpenAI chat completions format (ChatCompletionMessageParam[]) + Each message has properties like: role ('user', 'assistant', 'system'), content (string), etc. + - `now`: Current timestamp in milliseconds (built-in Liquid variable) + - Any assistant variable values (e.g., `userName`, `accountStatus`) + + Useful Liquid filters for messages: + - `messages | last: 5` - Get the 5 most recent messages + - `messages | where: 'role', 'user'` - Filter to only user messages + - `messages | reverse` - Reverse the order of messages + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/livekit_smart_endpointing_plan.py b/src/vapi/types/livekit_smart_endpointing_plan.py new file mode 100644 index 00000000..d99834e2 --- /dev/null +++ b/src/vapi/types/livekit_smart_endpointing_plan.py @@ -0,0 +1,35 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .livekit_smart_endpointing_plan_provider import LivekitSmartEndpointingPlanProvider + + +class LivekitSmartEndpointingPlan(UncheckedBaseModel): + provider: LivekitSmartEndpointingPlanProvider = pydantic.Field() + """ + This is the provider for the smart endpointing plan. + """ + + wait_function: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="waitFunction"), + pydantic.Field( + alias="waitFunction", + description='This expression describes how long the bot will wait to start speaking based on the likelihood that the user has reached an endpoint.\n\nThis is a millisecond valued function. It maps probabilities (real numbers on [0,1]) to milliseconds that the bot should wait before speaking ([0, \\infty]). Any negative values that are returned are set to zero (the bot can\'t start talking in the past).\n\nA probability of zero represents very high confidence that the caller has stopped speaking, and would like the bot to speak to them. A probability of one represents very high confidence that the caller is still speaking.\n\nUnder the hood, this is parsed into a mathjs expression. Whatever you use to write your expression needs to be valid with respect to mathjs\n\n@default "20 + 500 * sqrt(x) + 2500 * x^3"', + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/livekit_smart_endpointing_plan_provider.py b/src/vapi/types/livekit_smart_endpointing_plan_provider.py new file mode 100644 index 00000000..33e82982 --- /dev/null +++ b/src/vapi/types/livekit_smart_endpointing_plan_provider.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +LivekitSmartEndpointingPlanProvider = typing.Union[ + typing.Literal["vapi", "livekit", "custom-endpointing-model"], typing.Any +] diff --git a/src/vapi/types/lmnt_credential.py b/src/vapi/types/lmnt_credential.py index 16b158a2..424ac58b 100644 --- a/src/vapi/types/lmnt_credential.py +++ b/src/vapi/types/lmnt_credential.py @@ -1,39 +1,53 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +import datetime as dt import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic -import datetime as dt +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .lmnt_credential_provider import LmntCredentialProvider -class LmntCredential(UniversalBaseModel): - provider: typing.Literal["lmnt"] = "lmnt" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() - """ - This is not returned in the API. - """ - +class LmntCredential(UncheckedBaseModel): + provider: LmntCredentialProvider + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] id: str = pydantic.Field() """ This is the unique identifier for the credential. """ - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field() - """ - This is the unique identifier for the org that this credential belongs to. - """ - - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the credential was created. - """ - - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the assistant was last updated. + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/lmnt_credential_provider.py b/src/vapi/types/lmnt_credential_provider.py new file mode 100644 index 00000000..672cfdf6 --- /dev/null +++ b/src/vapi/types/lmnt_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +LmntCredentialProvider = typing.Union[typing.Literal["lmnt"], typing.Any] diff --git a/src/vapi/types/lmnt_voice.py b/src/vapi/types/lmnt_voice.py index 18d21ab8..f25a6e30 100644 --- a/src/vapi/types/lmnt_voice.py +++ b/src/vapi/types/lmnt_voice.py @@ -1,47 +1,58 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions import typing -from ..core.serialization import FieldMetadata + import pydantic -from .lmnt_voice_id import LmntVoiceId -from .chunk_plan import ChunkPlan +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 - - -class LmntVoice(UniversalBaseModel): - filler_injection_enabled: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="fillerInjectionEnabled") - ] = pydantic.Field(default=None) - """ - This determines whether fillers are injected into the model output before inputting it into the voice provider. - - Default `false` because you can achieve better results with prompting the model. - """ - - provider: typing.Literal["lmnt"] = pydantic.Field(default="lmnt") - """ - This is the voice provider that will be used. - """ - - voice_id: typing_extensions.Annotated[LmntVoiceId, FieldMetadata(alias="voiceId")] = pydantic.Field() - """ - This is the provider-specific ID that will be used. - """ - +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .chunk_plan import ChunkPlan +from .fallback_plan import FallbackPlan +from .lmnt_voice_id import LmntVoiceId +from .lmnt_voice_language import LmntVoiceLanguage + + +class LmntVoice(UncheckedBaseModel): + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="cachingEnabled"), + pydantic.Field( + alias="cachingEnabled", description="This is the flag to toggle voice caching for the assistant." + ), + ] = None + voice_id: typing_extensions.Annotated[ + LmntVoiceId, + FieldMetadata(alias="voiceId"), + pydantic.Field(alias="voiceId", description="This is the provider-specific ID that will be used."), + ] speed: typing.Optional[float] = pydantic.Field(default=None) """ This is the speed multiplier that will be used. """ - chunk_plan: typing_extensions.Annotated[typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan")] = ( - pydantic.Field(default=None) - ) + language: typing.Optional[LmntVoiceLanguage] = pydantic.Field(default=None) """ - This is the plan for chunking the model output before it is sent to the voice provider. + Two letter ISO 639-1 language code. Use "auto" for auto-detection. """ + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], + FieldMetadata(alias="chunkPlan"), + pydantic.Field( + alias="chunkPlan", + description="This is the plan for chunking the model output before it is sent to the voice provider.", + ), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field( + alias="fallbackPlan", + description="This is the plan for voice provider fallbacks in the event that the primary voice provider fails.", + ), + ] = None + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/vapi/types/lmnt_voice_id.py b/src/vapi/types/lmnt_voice_id.py index c1d5c180..744ba748 100644 --- a/src/vapi/types/lmnt_voice_id.py +++ b/src/vapi/types/lmnt_voice_id.py @@ -1,6 +1,7 @@ # This file was auto-generated by Fern from our API Definition. import typing + from .lmnt_voice_id_enum import LmntVoiceIdEnum LmntVoiceId = typing.Union[LmntVoiceIdEnum, str] diff --git a/src/vapi/types/lmnt_voice_id_enum.py b/src/vapi/types/lmnt_voice_id_enum.py index 482a8e3d..96a280a1 100644 --- a/src/vapi/types/lmnt_voice_id_enum.py +++ b/src/vapi/types/lmnt_voice_id_enum.py @@ -2,4 +2,50 @@ import typing -LmntVoiceIdEnum = typing.Union[typing.Literal["lily", "daniel"], typing.Any] +LmntVoiceIdEnum = typing.Union[ + typing.Literal[ + "amy", + "ansel", + "autumn", + "ava", + "brandon", + "caleb", + "cassian", + "chloe", + "dalton", + "daniel", + "dustin", + "elowen", + "evander", + "huxley", + "james", + "juniper", + "kennedy", + "lauren", + "leah", + "lily", + "lucas", + "magnus", + "miles", + "morgan", + "natalie", + "nathan", + "noah", + "nyssa", + "oliver", + "paige", + "ryan", + "sadie", + "sophie", + "stella", + "terrence", + "tyler", + "vesper", + "violet", + "warrick", + "zain", + "zeke", + "zoe", + ], + typing.Any, +] diff --git a/src/vapi/types/lmnt_voice_language.py b/src/vapi/types/lmnt_voice_language.py new file mode 100644 index 00000000..1fb884b1 --- /dev/null +++ b/src/vapi/types/lmnt_voice_language.py @@ -0,0 +1,195 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +LmntVoiceLanguage = typing.Union[ + typing.Literal[ + "aa", + "ab", + "ae", + "af", + "ak", + "am", + "an", + "ar", + "as", + "av", + "ay", + "az", + "ba", + "be", + "bg", + "bh", + "bi", + "bm", + "bn", + "bo", + "br", + "bs", + "ca", + "ce", + "ch", + "co", + "cr", + "cs", + "cu", + "cv", + "cy", + "da", + "de", + "dv", + "dz", + "ee", + "el", + "en", + "eo", + "es", + "et", + "eu", + "fa", + "ff", + "fi", + "fj", + "fo", + "fr", + "fy", + "ga", + "gd", + "gl", + "gn", + "gu", + "gv", + "ha", + "he", + "hi", + "ho", + "hr", + "ht", + "hu", + "hy", + "hz", + "ia", + "id", + "ie", + "ig", + "ii", + "ik", + "io", + "is", + "it", + "iu", + "ja", + "jv", + "ka", + "kg", + "ki", + "kj", + "kk", + "kl", + "km", + "kn", + "ko", + "kr", + "ks", + "ku", + "kv", + "kw", + "ky", + "la", + "lb", + "lg", + "li", + "ln", + "lo", + "lt", + "lu", + "lv", + "mg", + "mh", + "mi", + "mk", + "ml", + "mn", + "mr", + "ms", + "mt", + "my", + "na", + "nb", + "nd", + "ne", + "ng", + "nl", + "nn", + "no", + "nr", + "nv", + "ny", + "oc", + "oj", + "om", + "or", + "os", + "pa", + "pi", + "pl", + "ps", + "pt", + "qu", + "rm", + "rn", + "ro", + "ru", + "rw", + "sa", + "sc", + "sd", + "se", + "sg", + "si", + "sk", + "sl", + "sm", + "sn", + "so", + "sq", + "sr", + "ss", + "st", + "su", + "sv", + "sw", + "ta", + "te", + "tg", + "th", + "ti", + "tk", + "tl", + "tn", + "to", + "tr", + "ts", + "tt", + "tw", + "ty", + "ug", + "uk", + "ur", + "uz", + "ve", + "vi", + "vo", + "wa", + "wo", + "xh", + "yi", + "yue", + "yo", + "za", + "zh", + "zu", + "auto", + ], + typing.Any, +] diff --git a/src/vapi/types/log.py b/src/vapi/types/log.py deleted file mode 100644 index aeca7ec4..00000000 --- a/src/vapi/types/log.py +++ /dev/null @@ -1,164 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from ..core.pydantic_utilities import UniversalBaseModel -import pydantic -import typing_extensions -from ..core.serialization import FieldMetadata -from .log_type import LogType -import typing -from .log_resource import LogResource -from .log_request_http_method import LogRequestHttpMethod -from .error import Error -from ..core.pydantic_utilities import IS_PYDANTIC_V2 - - -class Log(UniversalBaseModel): - time: float = pydantic.Field() - """ - This is the timestamp at which the log was written. - """ - - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field() - """ - This is the unique identifier for the org that this log belongs to. - """ - - type: LogType = pydantic.Field() - """ - This is the type of the log. - """ - - resource: typing.Optional[LogResource] = pydantic.Field(default=None) - """ - This is the specific resource, relevant only to API logs. - """ - - request_duration_seconds: typing_extensions.Annotated[float, FieldMetadata(alias="requestDurationSeconds")] = ( - pydantic.Field() - ) - """ - 'This is how long the request took. - """ - - request_started_at: typing_extensions.Annotated[str, FieldMetadata(alias="requestStartedAt")] = pydantic.Field() - """ - This is the timestamp at which the request began. - """ - - request_finished_at: typing_extensions.Annotated[str, FieldMetadata(alias="requestFinishedAt")] = pydantic.Field() - """ - This is the timestamp at which the request finished. - """ - - request_body: typing_extensions.Annotated[ - typing.Dict[str, typing.Optional[typing.Any]], FieldMetadata(alias="requestBody") - ] = pydantic.Field() - """ - This is the body of the request. - """ - - request_http_method: typing_extensions.Annotated[LogRequestHttpMethod, FieldMetadata(alias="requestHttpMethod")] = ( - pydantic.Field() - ) - """ - This is the request method. - """ - - request_url: typing_extensions.Annotated[str, FieldMetadata(alias="requestUrl")] = pydantic.Field() - """ - This is the request URL. - """ - - request_path: typing_extensions.Annotated[str, FieldMetadata(alias="requestPath")] = pydantic.Field() - """ - This is the request path. - """ - - request_query: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="requestQuery")] = ( - pydantic.Field(default=None) - ) - """ - This is the request query. - """ - - response_http_code: typing_extensions.Annotated[float, FieldMetadata(alias="responseHttpCode")] = pydantic.Field() - """ - This the HTTP status code of the response. - """ - - request_ip_address: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="requestIpAddress")] = ( - pydantic.Field(default=None) - ) - """ - This is the request IP address. - """ - - request_origin: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="requestOrigin")] = ( - pydantic.Field(default=None) - ) - """ - This is the origin of the request - """ - - response_body: typing_extensions.Annotated[ - typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]], FieldMetadata(alias="responseBody") - ] = pydantic.Field(default=None) - """ - This is the body of the response. - """ - - request_headers: typing_extensions.Annotated[ - typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]], FieldMetadata(alias="requestHeaders") - ] = pydantic.Field(default=None) - """ - These are the headers of the request. - """ - - error: typing.Optional[Error] = pydantic.Field(default=None) - """ - This is the error, if one occurred. - """ - - assistant_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="assistantId")] = ( - pydantic.Field(default=None) - ) - """ - This is the ID of the assistant. - """ - - phone_number_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="phoneNumberId")] = ( - pydantic.Field(default=None) - ) - """ - This is the ID of the phone number. - """ - - customer_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="customerId")] = pydantic.Field( - default=None - ) - """ - This is the ID of the customer. - """ - - squad_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="squadId")] = pydantic.Field( - default=None - ) - """ - This is the ID of the squad. - """ - - call_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="callId")] = pydantic.Field( - default=None - ) - """ - This is the ID of the call. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/vapi/types/log_resource.py b/src/vapi/types/log_resource.py deleted file mode 100644 index 7e35ea0d..00000000 --- a/src/vapi/types/log_resource.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -LogResource = typing.Union[ - typing.Literal["assistant", "phone-number", "tool", "squad", "call", "file", "metric", "log"], typing.Any -] diff --git a/src/vapi/types/log_type.py b/src/vapi/types/log_type.py deleted file mode 100644 index d18d5af0..00000000 --- a/src/vapi/types/log_type.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -LogType = typing.Union[typing.Literal["API", "Webhook", "Call", "Provider"], typing.Any] diff --git a/src/vapi/types/logic_edge_condition.py b/src/vapi/types/logic_edge_condition.py new file mode 100644 index 00000000..8d04e30f --- /dev/null +++ b/src/vapi/types/logic_edge_condition.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +LogicEdgeCondition = typing.Any diff --git a/src/vapi/types/make_credential.py b/src/vapi/types/make_credential.py index 609725cd..b63bfa51 100644 --- a/src/vapi/types/make_credential.py +++ b/src/vapi/types/make_credential.py @@ -1,49 +1,61 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +import datetime as dt import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic -import datetime as dt +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .make_credential_provider import MakeCredentialProvider -class MakeCredential(UniversalBaseModel): - provider: typing.Literal["make"] = "make" - team_id: typing_extensions.Annotated[str, FieldMetadata(alias="teamId")] = pydantic.Field() - """ - Team ID - """ - +class MakeCredential(UncheckedBaseModel): + provider: MakeCredentialProvider + team_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="teamId"), pydantic.Field(alias="teamId", description="Team ID") + ] region: str = pydantic.Field() """ Region of your application. For example: eu1, eu2, us1, us2 """ - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() - """ - This is not returned in the API. - """ - + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] id: str = pydantic.Field() """ This is the unique identifier for the credential. """ - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field() - """ - This is the unique identifier for the org that this credential belongs to. - """ - - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the credential was created. - """ - - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is the ISO 8601 date-time string of when the assistant was last updated. + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/make_credential_provider.py b/src/vapi/types/make_credential_provider.py new file mode 100644 index 00000000..1281afb0 --- /dev/null +++ b/src/vapi/types/make_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +MakeCredentialProvider = typing.Union[typing.Literal["make"], typing.Any] diff --git a/src/vapi/types/make_tool.py b/src/vapi/types/make_tool.py index 1c096a2c..dc0e22d9 100644 --- a/src/vapi/types/make_tool.py +++ b/src/vapi/types/make_tool.py @@ -1,32 +1,22 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions +from __future__ import annotations + +import datetime as dt import typing -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel from .make_tool_messages_item import MakeToolMessagesItem -import datetime as dt -from .open_ai_function import OpenAiFunction -from .server import Server from .make_tool_metadata import MakeToolMetadata -from ..core.pydantic_utilities import IS_PYDANTIC_V2 - +from .make_tool_type import MakeToolType +from .tool_rejection_plan import ToolRejectionPlan -class MakeTool(UniversalBaseModel): - async_: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="async")] = pydantic.Field( - default=None - ) - """ - This determines if the tool is async. - - If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server. - - If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server. - - Defaults to synchronous (`false`). - """ +class MakeTool(UncheckedBaseModel): messages: typing.Optional[typing.List[MakeToolMessagesItem]] = pydantic.Field(default=None) """ These are the messages that will be spoken to the user as the tool is running. @@ -34,45 +24,45 @@ class MakeTool(UniversalBaseModel): For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. """ - type: typing.Literal["make"] = "make" - id: str = pydantic.Field() - """ - This is the unique identifier for the tool. - """ - - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field() - """ - This is the unique identifier for the organization that this tool belongs to. - """ - - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the tool was created. - """ - - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the tool was last updated. - """ - - function: typing.Optional[OpenAiFunction] = pydantic.Field(default=None) + type: MakeToolType = pydantic.Field() """ - This is the function definition of the tool. - - For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on tool-specific fields like `tool.destinations`. But, even in those cases, you can provide a custom function definition for advanced use cases. - - An example of an advanced use case is if you want to customize the message that's spoken for `endCall` tool. You can specify a function where it returns an argument "reason". Then, in `messages` array, you can have many "request-complete" messages. One of these messages will be triggered if the `messages[].conditions` matches the "reason" argument. + The type of tool. "make" for Make tool. """ - server: typing.Optional[Server] = pydantic.Field(default=None) + id: str = pydantic.Field() """ - This is the server that will be hit when this tool is requested by the model. - - All requests will be sent with the call object among other things. You can find more details in the Server URL documentation. - - This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: highest tool.server.url, then assistant.serverUrl, then phoneNumber.serverUrl, then org.serverUrl. + This is the unique identifier for the tool. """ + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the organization that this tool belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the tool was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", description="This is the ISO 8601 date-time string of when the tool was last updated." + ), + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None metadata: MakeToolMetadata if IS_PYDANTIC_V2: @@ -83,3 +73,6 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +update_forward_refs(MakeTool) diff --git a/src/vapi/types/make_tool_messages_item.py b/src/vapi/types/make_tool_messages_item.py index a750a951..367a28d3 100644 --- a/src/vapi/types/make_tool_messages_item.py +++ b/src/vapi/types/make_tool_messages_item.py @@ -1,9 +1,104 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .tool_message_start import ToolMessageStart -from .tool_message_complete import ToolMessageComplete -from .tool_message_failed import ToolMessageFailed -from .tool_message_delayed import ToolMessageDelayed -MakeToolMessagesItem = typing.Union[ToolMessageStart, ToolMessageComplete, ToolMessageFailed, ToolMessageDelayed] +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class MakeToolMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class MakeToolMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class MakeToolMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class MakeToolMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +MakeToolMessagesItem = typing_extensions.Annotated[ + typing.Union[ + MakeToolMessagesItem_RequestStart, + MakeToolMessagesItem_RequestComplete, + MakeToolMessagesItem_RequestFailed, + MakeToolMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/make_tool_metadata.py b/src/vapi/types/make_tool_metadata.py index aa6d0494..fee453e7 100644 --- a/src/vapi/types/make_tool_metadata.py +++ b/src/vapi/types/make_tool_metadata.py @@ -1,16 +1,21 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions import typing -from ..core.serialization import FieldMetadata -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class MakeToolMetadata(UniversalBaseModel): - scenario_id: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="scenarioId")] = None - trigger_hook_id: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="triggerHookId")] = None +class MakeToolMetadata(UncheckedBaseModel): + scenario_id: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="scenarioId"), pydantic.Field(alias="scenarioId") + ] = None + trigger_hook_id: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="triggerHookId"), pydantic.Field(alias="triggerHookId") + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/make_tool_provider_details.py b/src/vapi/types/make_tool_provider_details.py index dab754eb..39a63c43 100644 --- a/src/vapi/types/make_tool_provider_details.py +++ b/src/vapi/types/make_tool_provider_details.py @@ -1,34 +1,41 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions import typing -from ..core.serialization import FieldMetadata + import pydantic -from .tool_template_setup import ToolTemplateSetup +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .tool_template_setup import ToolTemplateSetup -class MakeToolProviderDetails(UniversalBaseModel): - template_url: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="templateUrl")] = ( - pydantic.Field(default=None) - ) - """ - This is the Template URL or the Snapshot URL corresponding to the Template. - """ - +class MakeToolProviderDetails(UncheckedBaseModel): + template_url: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="templateUrl"), + pydantic.Field( + alias="templateUrl", + description="This is the Template URL or the Snapshot URL corresponding to the Template.", + ), + ] = None setup_instructions: typing_extensions.Annotated[ - typing.Optional[typing.List[ToolTemplateSetup]], FieldMetadata(alias="setupInstructions") + typing.Optional[typing.List[ToolTemplateSetup]], + FieldMetadata(alias="setupInstructions"), + pydantic.Field(alias="setupInstructions"), + ] = None + scenario_id: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="scenarioId"), pydantic.Field(alias="scenarioId") + ] = None + scenario_name: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="scenarioName"), pydantic.Field(alias="scenarioName") + ] = None + trigger_hook_id: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="triggerHookId"), pydantic.Field(alias="triggerHookId") + ] = None + trigger_hook_name: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="triggerHookName"), pydantic.Field(alias="triggerHookName") ] = None - type: typing.Literal["make"] = pydantic.Field(default="make") - """ - The type of tool. "make" for Make tool. - """ - - scenario_id: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="scenarioId")] = None - scenario_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="scenarioName")] = None - trigger_hook_id: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="triggerHookId")] = None - trigger_hook_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="triggerHookName")] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/make_tool_type.py b/src/vapi/types/make_tool_type.py new file mode 100644 index 00000000..e39704e9 --- /dev/null +++ b/src/vapi/types/make_tool_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +MakeToolType = typing.Union[typing.Literal["make"], typing.Any] diff --git a/src/vapi/types/make_tool_with_tool_call.py b/src/vapi/types/make_tool_with_tool_call.py index dbc5b9db..dc9f259a 100644 --- a/src/vapi/types/make_tool_with_tool_call.py +++ b/src/vapi/types/make_tool_with_tool_call.py @@ -1,32 +1,21 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions +from __future__ import annotations + import typing -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .make_tool_metadata import MakeToolMetadata from .make_tool_with_tool_call_messages_item import MakeToolWithToolCallMessagesItem from .tool_call import ToolCall -from .make_tool_metadata import MakeToolMetadata -from .open_ai_function import OpenAiFunction -from .server import Server -from ..core.pydantic_utilities import IS_PYDANTIC_V2 - +from .tool_rejection_plan import ToolRejectionPlan -class MakeToolWithToolCall(UniversalBaseModel): - async_: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="async")] = pydantic.Field( - default=None - ) - """ - This determines if the tool is async. - - If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server. - - If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server. - - Defaults to synchronous (`false`). - """ +class MakeToolWithToolCall(UncheckedBaseModel): messages: typing.Optional[typing.List[MakeToolWithToolCallMessagesItem]] = pydantic.Field(default=None) """ These are the messages that will be spoken to the user as the tool is running. @@ -34,30 +23,16 @@ class MakeToolWithToolCall(UniversalBaseModel): For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. """ - type: typing.Literal["make"] = pydantic.Field(default="make") - """ - The type of tool. "make" for Make tool. - """ - - tool_call: typing_extensions.Annotated[ToolCall, FieldMetadata(alias="toolCall")] + tool_call: typing_extensions.Annotated[ToolCall, FieldMetadata(alias="toolCall"), pydantic.Field(alias="toolCall")] metadata: MakeToolMetadata - function: typing.Optional[OpenAiFunction] = pydantic.Field(default=None) - """ - This is the function definition of the tool. - - For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on tool-specific fields like `tool.destinations`. But, even in those cases, you can provide a custom function definition for advanced use cases. - - An example of an advanced use case is if you want to customize the message that's spoken for `endCall` tool. You can specify a function where it returns an argument "reason". Then, in `messages` array, you can have many "request-complete" messages. One of these messages will be triggered if the `messages[].conditions` matches the "reason" argument. - """ - - server: typing.Optional[Server] = pydantic.Field(default=None) - """ - This is the server that will be hit when this tool is requested by the model. - - All requests will be sent with the call object among other things. You can find more details in the Server URL documentation. - - This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: highest tool.server.url, then assistant.serverUrl, then phoneNumber.serverUrl, then org.serverUrl. - """ + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -67,3 +42,6 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +update_forward_refs(MakeToolWithToolCall) diff --git a/src/vapi/types/make_tool_with_tool_call_messages_item.py b/src/vapi/types/make_tool_with_tool_call_messages_item.py index 0daa1ea1..e59845e1 100644 --- a/src/vapi/types/make_tool_with_tool_call_messages_item.py +++ b/src/vapi/types/make_tool_with_tool_call_messages_item.py @@ -1,11 +1,104 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .tool_message_start import ToolMessageStart -from .tool_message_complete import ToolMessageComplete -from .tool_message_failed import ToolMessageFailed -from .tool_message_delayed import ToolMessageDelayed -MakeToolWithToolCallMessagesItem = typing.Union[ - ToolMessageStart, ToolMessageComplete, ToolMessageFailed, ToolMessageDelayed +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class MakeToolWithToolCallMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class MakeToolWithToolCallMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class MakeToolWithToolCallMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class MakeToolWithToolCallMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +MakeToolWithToolCallMessagesItem = typing_extensions.Annotated[ + typing.Union[ + MakeToolWithToolCallMessagesItem_RequestStart, + MakeToolWithToolCallMessagesItem_RequestComplete, + MakeToolWithToolCallMessagesItem_RequestFailed, + MakeToolWithToolCallMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), ] diff --git a/src/vapi/types/mcp_tool.py b/src/vapi/types/mcp_tool.py new file mode 100644 index 00000000..e4b3f9a8 --- /dev/null +++ b/src/vapi/types/mcp_tool.py @@ -0,0 +1,95 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .mcp_tool_messages import McpToolMessages +from .mcp_tool_messages_item import McpToolMessagesItem +from .mcp_tool_metadata import McpToolMetadata +from .server import Server +from .tool_rejection_plan import ToolRejectionPlan + + +class McpTool(UncheckedBaseModel): + messages: typing.Optional[typing.List[McpToolMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + server: typing.Optional[Server] = pydantic.Field(default=None) + """ + + This is the server where a `tool-calls` webhook will be sent. + + Notes: + - Webhook is sent to this server when a tool call is made. + - Webhook contains the call, assistant, and phone number objects. + - Webhook contains the variables set on the assistant. + - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}. + - Webhook expects a response with tool call result. + """ + + tool_messages: typing_extensions.Annotated[ + typing.Optional[typing.List[McpToolMessages]], + FieldMetadata(alias="toolMessages"), + pydantic.Field( + alias="toolMessages", + description="Per-tool message overrides for individual tools loaded from the MCP server. Set messages to an empty array to suppress messages for a specific tool. Tools not listed here will use the default messages from the parent tool.", + ), + ] = None + id: str = pydantic.Field() + """ + This is the unique identifier for the tool. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the organization that this tool belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the tool was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", description="This is the ISO 8601 date-time string of when the tool was last updated." + ), + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + metadata: typing.Optional[McpToolMetadata] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(McpTool) diff --git a/src/vapi/types/mcp_tool_messages.py b/src/vapi/types/mcp_tool_messages.py new file mode 100644 index 00000000..4d210cb6 --- /dev/null +++ b/src/vapi/types/mcp_tool_messages.py @@ -0,0 +1,29 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .mcp_tool_messages_messages_item import McpToolMessagesMessagesItem + + +class McpToolMessages(UncheckedBaseModel): + name: str = pydantic.Field() + """ + The name of the tool from the MCP server. + """ + + messages: typing.Optional[typing.List[McpToolMessagesMessagesItem]] = pydantic.Field(default=None) + """ + Custom messages for this specific tool. Set to an empty array to suppress all messages for this tool. If not provided, the tool will use the default messages from the parent MCP tool configuration. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/mcp_tool_messages_item.py b/src/vapi/types/mcp_tool_messages_item.py new file mode 100644 index 00000000..6727f058 --- /dev/null +++ b/src/vapi/types/mcp_tool_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class McpToolMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class McpToolMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class McpToolMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class McpToolMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +McpToolMessagesItem = typing_extensions.Annotated[ + typing.Union[ + McpToolMessagesItem_RequestStart, + McpToolMessagesItem_RequestComplete, + McpToolMessagesItem_RequestFailed, + McpToolMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/mcp_tool_messages_messages_item.py b/src/vapi/types/mcp_tool_messages_messages_item.py new file mode 100644 index 00000000..d126e6f7 --- /dev/null +++ b/src/vapi/types/mcp_tool_messages_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class McpToolMessagesMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class McpToolMessagesMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class McpToolMessagesMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class McpToolMessagesMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +McpToolMessagesMessagesItem = typing_extensions.Annotated[ + typing.Union[ + McpToolMessagesMessagesItem_RequestStart, + McpToolMessagesMessagesItem_RequestComplete, + McpToolMessagesMessagesItem_RequestFailed, + McpToolMessagesMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/mcp_tool_metadata.py b/src/vapi/types/mcp_tool_metadata.py new file mode 100644 index 00000000..c9e7c1db --- /dev/null +++ b/src/vapi/types/mcp_tool_metadata.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .mcp_tool_metadata_protocol import McpToolMetadataProtocol + + +class McpToolMetadata(UncheckedBaseModel): + protocol: typing.Optional[McpToolMetadataProtocol] = pydantic.Field(default=None) + """ + This is the protocol used for MCP communication. Defaults to Streamable HTTP. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/mcp_tool_metadata_protocol.py b/src/vapi/types/mcp_tool_metadata_protocol.py new file mode 100644 index 00000000..c9af788a --- /dev/null +++ b/src/vapi/types/mcp_tool_metadata_protocol.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +McpToolMetadataProtocol = typing.Union[typing.Literal["sse", "shttp"], typing.Any] diff --git a/src/vapi/types/message_add_hook_action.py b/src/vapi/types/message_add_hook_action.py new file mode 100644 index 00000000..823ec0f7 --- /dev/null +++ b/src/vapi/types/message_add_hook_action.py @@ -0,0 +1,35 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .open_ai_message import OpenAiMessage + + +class MessageAddHookAction(UncheckedBaseModel): + message: OpenAiMessage = pydantic.Field() + """ + The message to add to the conversation in OpenAI format + """ + + trigger_response_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="triggerResponseEnabled"), + pydantic.Field( + alias="triggerResponseEnabled", + description="Whether to trigger an assistant response after adding the message", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/message_plan.py b/src/vapi/types/message_plan.py deleted file mode 100644 index 651466a1..00000000 --- a/src/vapi/types/message_plan.py +++ /dev/null @@ -1,51 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions -import typing -from ..core.serialization import FieldMetadata -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 - - -class MessagePlan(UniversalBaseModel): - idle_messages: typing_extensions.Annotated[ - typing.Optional[typing.List[str]], FieldMetadata(alias="idleMessages") - ] = pydantic.Field(default=None) - """ - This are the messages that the assistant will speak when the user hasn't responded for `idleTimeoutSeconds`. Each time the timeout is triggered, a random message will be chosen from this array. - - Usage: - - - If user gets distracted and doesn't respond for a while, this can be used to grab their attention. - - If the transcriber doesn't pick up what the user said, this can be used to ask the user to repeat themselves. (From the perspective of the assistant, the conversation is idle since it didn't "hear" any user messages.) - - @default null (no idle message is spoken) - """ - - idle_message_max_spoken_count: typing_extensions.Annotated[ - typing.Optional[float], FieldMetadata(alias="idleMessageMaxSpokenCount") - ] = pydantic.Field(default=None) - """ - This determines the maximum number of times `idleMessages` can be spoken during the call. - - @default 3 - """ - - idle_timeout_seconds: typing_extensions.Annotated[ - typing.Optional[float], FieldMetadata(alias="idleTimeoutSeconds") - ] = pydantic.Field(default=None) - """ - This is the timeout in seconds before a message from `idleMessages` is spoken. The clock starts when the assistant finishes speaking and remains active until the user speaks. - - @default 10 - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/vapi/types/message_target.py b/src/vapi/types/message_target.py new file mode 100644 index 00000000..b063231b --- /dev/null +++ b/src/vapi/types/message_target.py @@ -0,0 +1,36 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .message_target_role import MessageTargetRole + + +class MessageTarget(UncheckedBaseModel): + role: typing.Optional[MessageTargetRole] = pydantic.Field(default=None) + """ + This is the role of the message to target. + + If not specified, will find the position in the message history ignoring role (effectively `any`). + """ + + position: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the position of the message to target. + - Negative numbers: Count from end (-1 = most recent, -2 = second most recent) + - 0: First/oldest message in history + - Positive numbers: Specific position (0-indexed from start) + + @default -1 (most recent message) + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/message_target_role.py b/src/vapi/types/message_target_role.py new file mode 100644 index 00000000..5f8ba922 --- /dev/null +++ b/src/vapi/types/message_target_role.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +MessageTargetRole = typing.Union[typing.Literal["user", "assistant"], typing.Any] diff --git a/src/vapi/types/metrics.py b/src/vapi/types/metrics.py deleted file mode 100644 index 87ac6d54..00000000 --- a/src/vapi/types/metrics.py +++ /dev/null @@ -1,44 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions -from ..core.serialization import FieldMetadata -import typing -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -import pydantic - - -class Metrics(UniversalBaseModel): - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] - range_start: typing_extensions.Annotated[str, FieldMetadata(alias="rangeStart")] - range_end: typing_extensions.Annotated[str, FieldMetadata(alias="rangeEnd")] - bill: float - bill_within_billing_limit: typing_extensions.Annotated[bool, FieldMetadata(alias="billWithinBillingLimit")] - bill_daily_breakdown: typing_extensions.Annotated[ - typing.Dict[str, typing.Optional[typing.Any]], FieldMetadata(alias="billDailyBreakdown") - ] - call_active: typing_extensions.Annotated[float, FieldMetadata(alias="callActive")] - call_active_within_concurrency_limit: typing_extensions.Annotated[ - bool, FieldMetadata(alias="callActiveWithinConcurrencyLimit") - ] - call_minutes: typing_extensions.Annotated[float, FieldMetadata(alias="callMinutes")] - call_minutes_daily_breakdown: typing_extensions.Annotated[ - typing.Dict[str, typing.Optional[typing.Any]], FieldMetadata(alias="callMinutesDailyBreakdown") - ] - call_minutes_average: typing_extensions.Annotated[float, FieldMetadata(alias="callMinutesAverage")] - call_minutes_average_daily_breakdown: typing_extensions.Annotated[ - typing.Dict[str, typing.Optional[typing.Any]], FieldMetadata(alias="callMinutesAverageDailyBreakdown") - ] - call_count: typing_extensions.Annotated[float, FieldMetadata(alias="callCount")] - call_count_daily_breakdown: typing_extensions.Annotated[ - typing.Dict[str, typing.Optional[typing.Any]], FieldMetadata(alias="callCountDailyBreakdown") - ] - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/vapi/types/minimax_llm_model.py b/src/vapi/types/minimax_llm_model.py new file mode 100644 index 00000000..0b651809 --- /dev/null +++ b/src/vapi/types/minimax_llm_model.py @@ -0,0 +1,203 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_custom_knowledge_base_dto import CreateCustomKnowledgeBaseDto +from .minimax_llm_model_model import MinimaxLlmModelModel +from .open_ai_message import OpenAiMessage + + +class MinimaxLlmModel(UncheckedBaseModel): + messages: typing.Optional[typing.List[OpenAiMessage]] = pydantic.Field(default=None) + """ + This is the starting state for the conversation. + """ + + tools: typing.Optional[typing.List["MinimaxLlmModelToolsItem"]] = pydantic.Field(default=None) + """ + These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`. + + Both `tools` and `toolIds` can be used together. + """ + + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="toolIds"), + pydantic.Field( + alias="toolIds", + description="These are the tools that the assistant can use during the call. To use transient tools, use `tools`.\n\nBoth `tools` and `toolIds` can be used together.", + ), + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase", description="These are the options for the knowledge base."), + ] = None + model: MinimaxLlmModelModel = pydantic.Field() + """ + This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b + """ + + temperature: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency. + """ + + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="maxTokens"), + pydantic.Field( + alias="maxTokens", + description="This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.", + ), + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field( + alias="emotionRecognitionEnabled", + description="This determines whether we detect user's emotion while they speak and send it as an additional info to model.\n\nDefault `false` because the model is usually are good at understanding the user's emotion from text.\n\n@default false", + ), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="numFastTurns"), + pydantic.Field( + alias="numFastTurns", + description="This sets how many turns at the start of the conversation to use a smaller, faster model from the same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai.\n\nDefault is 0.\n\n@default 0", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + MinimaxLlmModel, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/minimax_llm_model_model.py b/src/vapi/types/minimax_llm_model_model.py new file mode 100644 index 00000000..09304d9c --- /dev/null +++ b/src/vapi/types/minimax_llm_model_model.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +MinimaxLlmModelModel = typing.Union[typing.Literal["MiniMax-M2.7"], typing.Any] diff --git a/src/vapi/types/minimax_llm_model_tools_item.py b/src/vapi/types/minimax_llm_model_tools_item.py new file mode 100644 index 00000000..17df247e --- /dev/null +++ b/src/vapi/types/minimax_llm_model_tools_item.py @@ -0,0 +1,731 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .backoff_plan import BackoffPlan +from .code_tool_environment_variable import CodeToolEnvironmentVariable +from .create_api_request_tool_dto_messages_item import CreateApiRequestToolDtoMessagesItem +from .create_api_request_tool_dto_method import CreateApiRequestToolDtoMethod +from .create_bash_tool_dto_messages_item import CreateBashToolDtoMessagesItem +from .create_bash_tool_dto_name import CreateBashToolDtoName +from .create_bash_tool_dto_sub_type import CreateBashToolDtoSubType +from .create_code_tool_dto_messages_item import CreateCodeToolDtoMessagesItem +from .create_computer_tool_dto_messages_item import CreateComputerToolDtoMessagesItem +from .create_computer_tool_dto_name import CreateComputerToolDtoName +from .create_computer_tool_dto_sub_type import CreateComputerToolDtoSubType +from .create_dtmf_tool_dto_messages_item import CreateDtmfToolDtoMessagesItem +from .create_end_call_tool_dto_messages_item import CreateEndCallToolDtoMessagesItem +from .create_function_tool_dto_messages_item import CreateFunctionToolDtoMessagesItem +from .create_go_high_level_calendar_availability_tool_dto_messages_item import ( + CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem, +) +from .create_go_high_level_calendar_event_create_tool_dto_messages_item import ( + CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_create_tool_dto_messages_item import ( + CreateGoHighLevelContactCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_get_tool_dto_messages_item import CreateGoHighLevelContactGetToolDtoMessagesItem +from .create_google_calendar_check_availability_tool_dto_messages_item import ( + CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem, +) +from .create_google_calendar_create_event_tool_dto_messages_item import ( + CreateGoogleCalendarCreateEventToolDtoMessagesItem, +) +from .create_google_sheets_row_append_tool_dto_messages_item import CreateGoogleSheetsRowAppendToolDtoMessagesItem +from .create_handoff_tool_dto_messages_item import CreateHandoffToolDtoMessagesItem +from .create_mcp_tool_dto_messages_item import CreateMcpToolDtoMessagesItem +from .create_query_tool_dto_messages_item import CreateQueryToolDtoMessagesItem +from .create_sip_request_tool_dto_body import CreateSipRequestToolDtoBody +from .create_sip_request_tool_dto_messages_item import CreateSipRequestToolDtoMessagesItem +from .create_sip_request_tool_dto_verb import CreateSipRequestToolDtoVerb +from .create_slack_send_message_tool_dto_messages_item import CreateSlackSendMessageToolDtoMessagesItem +from .create_sms_tool_dto_messages_item import CreateSmsToolDtoMessagesItem +from .create_text_editor_tool_dto_messages_item import CreateTextEditorToolDtoMessagesItem +from .create_text_editor_tool_dto_name import CreateTextEditorToolDtoName +from .create_text_editor_tool_dto_sub_type import CreateTextEditorToolDtoSubType +from .create_transfer_call_tool_dto_destinations_item import CreateTransferCallToolDtoDestinationsItem +from .create_transfer_call_tool_dto_messages_item import CreateTransferCallToolDtoMessagesItem +from .create_voicemail_tool_dto_messages_item import CreateVoicemailToolDtoMessagesItem +from .knowledge_base import KnowledgeBase +from .mcp_tool_messages import McpToolMessages +from .mcp_tool_metadata import McpToolMetadata +from .open_ai_function import OpenAiFunction +from .server import Server +from .tool_parameter import ToolParameter +from .tool_rejection_plan import ToolRejectionPlan +from .variable_extraction_plan import VariableExtractionPlan + + +class MinimaxLlmModelToolsItem_ApiRequest(UncheckedBaseModel): + type: typing.Literal["apiRequest"] = "apiRequest" + messages: typing.Optional[typing.List[CreateApiRequestToolDtoMessagesItem]] = None + method: CreateApiRequestToolDtoMethod + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + encrypted_paths: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="encryptedPaths"), pydantic.Field(alias="encryptedPaths") + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + name: typing.Optional[str] = None + description: typing.Optional[str] = None + url: str + body: typing.Optional["JsonSchema"] = None + headers: typing.Optional["JsonSchema"] = None + backoff_plan: typing_extensions.Annotated[ + typing.Optional[BackoffPlan], FieldMetadata(alias="backoffPlan"), pydantic.Field(alias="backoffPlan") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class MinimaxLlmModelToolsItem_Bash(UncheckedBaseModel): + type: typing.Literal["bash"] = "bash" + messages: typing.Optional[typing.List[CreateBashToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateBashToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateBashToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class MinimaxLlmModelToolsItem_Code(UncheckedBaseModel): + type: typing.Literal["code"] = "code" + messages: typing.Optional[typing.List[CreateCodeToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + code: str + environment_variables: typing_extensions.Annotated[ + typing.Optional[typing.List[CodeToolEnvironmentVariable]], + FieldMetadata(alias="environmentVariables"), + pydantic.Field(alias="environmentVariables"), + ] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class MinimaxLlmModelToolsItem_Computer(UncheckedBaseModel): + type: typing.Literal["computer"] = "computer" + messages: typing.Optional[typing.List[CreateComputerToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateComputerToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateComputerToolDtoName + display_width_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayWidthPx"), pydantic.Field(alias="displayWidthPx") + ] + display_height_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayHeightPx"), pydantic.Field(alias="displayHeightPx") + ] + display_number: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="displayNumber"), pydantic.Field(alias="displayNumber") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class MinimaxLlmModelToolsItem_Dtmf(UncheckedBaseModel): + type: typing.Literal["dtmf"] = "dtmf" + messages: typing.Optional[typing.List[CreateDtmfToolDtoMessagesItem]] = None + sip_info_dtmf_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="sipInfoDtmfEnabled"), pydantic.Field(alias="sipInfoDtmfEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class MinimaxLlmModelToolsItem_EndCall(UncheckedBaseModel): + type: typing.Literal["endCall"] = "endCall" + messages: typing.Optional[typing.List[CreateEndCallToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class MinimaxLlmModelToolsItem_Function(UncheckedBaseModel): + type: typing.Literal["function"] = "function" + messages: typing.Optional[typing.List[CreateFunctionToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class MinimaxLlmModelToolsItem_GohighlevelCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.availability.check"] = "gohighlevel.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class MinimaxLlmModelToolsItem_GohighlevelCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.event.create"] = "gohighlevel.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class MinimaxLlmModelToolsItem_GohighlevelContactCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.create"] = "gohighlevel.contact.create" + messages: typing.Optional[typing.List[CreateGoHighLevelContactCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class MinimaxLlmModelToolsItem_GohighlevelContactGet(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.get"] = "gohighlevel.contact.get" + messages: typing.Optional[typing.List[CreateGoHighLevelContactGetToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class MinimaxLlmModelToolsItem_GoogleCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["google.calendar.availability.check"] = "google.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class MinimaxLlmModelToolsItem_GoogleCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["google.calendar.event.create"] = "google.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoogleCalendarCreateEventToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class MinimaxLlmModelToolsItem_GoogleSheetsRowAppend(UncheckedBaseModel): + type: typing.Literal["google.sheets.row.append"] = "google.sheets.row.append" + messages: typing.Optional[typing.List[CreateGoogleSheetsRowAppendToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class MinimaxLlmModelToolsItem_Handoff(UncheckedBaseModel): + type: typing.Literal["handoff"] = "handoff" + messages: typing.Optional[typing.List[CreateHandoffToolDtoMessagesItem]] = None + default_result: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="defaultResult"), pydantic.Field(alias="defaultResult") + ] = None + destinations: typing.Optional[typing.List["CreateHandoffToolDtoDestinationsItem"]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class MinimaxLlmModelToolsItem_Mcp(UncheckedBaseModel): + type: typing.Literal["mcp"] = "mcp" + messages: typing.Optional[typing.List[CreateMcpToolDtoMessagesItem]] = None + server: typing.Optional[Server] = None + tool_messages: typing_extensions.Annotated[ + typing.Optional[typing.List[McpToolMessages]], + FieldMetadata(alias="toolMessages"), + pydantic.Field(alias="toolMessages"), + ] = None + metadata: typing.Optional[McpToolMetadata] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class MinimaxLlmModelToolsItem_Query(UncheckedBaseModel): + type: typing.Literal["query"] = "query" + messages: typing.Optional[typing.List[CreateQueryToolDtoMessagesItem]] = None + knowledge_bases: typing_extensions.Annotated[ + typing.Optional[typing.List[KnowledgeBase]], + FieldMetadata(alias="knowledgeBases"), + pydantic.Field(alias="knowledgeBases"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class MinimaxLlmModelToolsItem_SlackMessageSend(UncheckedBaseModel): + type: typing.Literal["slack.message.send"] = "slack.message.send" + messages: typing.Optional[typing.List[CreateSlackSendMessageToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class MinimaxLlmModelToolsItem_Sms(UncheckedBaseModel): + type: typing.Literal["sms"] = "sms" + messages: typing.Optional[typing.List[CreateSmsToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class MinimaxLlmModelToolsItem_TextEditor(UncheckedBaseModel): + type: typing.Literal["textEditor"] = "textEditor" + messages: typing.Optional[typing.List[CreateTextEditorToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateTextEditorToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateTextEditorToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class MinimaxLlmModelToolsItem_TransferCall(UncheckedBaseModel): + type: typing.Literal["transferCall"] = "transferCall" + messages: typing.Optional[typing.List[CreateTransferCallToolDtoMessagesItem]] = None + destinations: typing.Optional[typing.List[CreateTransferCallToolDtoDestinationsItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class MinimaxLlmModelToolsItem_SipRequest(UncheckedBaseModel): + type: typing.Literal["sipRequest"] = "sipRequest" + messages: typing.Optional[typing.List[CreateSipRequestToolDtoMessagesItem]] = None + verb: CreateSipRequestToolDtoVerb + headers: typing.Optional["JsonSchema"] = None + body: typing.Optional[CreateSipRequestToolDtoBody] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class MinimaxLlmModelToolsItem_Voicemail(UncheckedBaseModel): + type: typing.Literal["voicemail"] = "voicemail" + messages: typing.Optional[typing.List[CreateVoicemailToolDtoMessagesItem]] = None + beep_detection_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="beepDetectionEnabled"), pydantic.Field(alias="beepDetectionEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +MinimaxLlmModelToolsItem = typing_extensions.Annotated[ + typing.Union[ + MinimaxLlmModelToolsItem_ApiRequest, + MinimaxLlmModelToolsItem_Bash, + MinimaxLlmModelToolsItem_Code, + MinimaxLlmModelToolsItem_Computer, + MinimaxLlmModelToolsItem_Dtmf, + MinimaxLlmModelToolsItem_EndCall, + MinimaxLlmModelToolsItem_Function, + MinimaxLlmModelToolsItem_GohighlevelCalendarAvailabilityCheck, + MinimaxLlmModelToolsItem_GohighlevelCalendarEventCreate, + MinimaxLlmModelToolsItem_GohighlevelContactCreate, + MinimaxLlmModelToolsItem_GohighlevelContactGet, + MinimaxLlmModelToolsItem_GoogleCalendarAvailabilityCheck, + MinimaxLlmModelToolsItem_GoogleCalendarEventCreate, + MinimaxLlmModelToolsItem_GoogleSheetsRowAppend, + MinimaxLlmModelToolsItem_Handoff, + MinimaxLlmModelToolsItem_Mcp, + MinimaxLlmModelToolsItem_Query, + MinimaxLlmModelToolsItem_SlackMessageSend, + MinimaxLlmModelToolsItem_Sms, + MinimaxLlmModelToolsItem_TextEditor, + MinimaxLlmModelToolsItem_TransferCall, + MinimaxLlmModelToolsItem_SipRequest, + MinimaxLlmModelToolsItem_Voicemail, + ], + UnionMetadata(discriminant="type"), +] +from .json_schema import JsonSchema # noqa: E402, I001 +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs(MinimaxLlmModelToolsItem_ApiRequest, JsonSchema=JsonSchema) +update_forward_refs(MinimaxLlmModelToolsItem_Bash) +update_forward_refs(MinimaxLlmModelToolsItem_Code) +update_forward_refs(MinimaxLlmModelToolsItem_Computer) +update_forward_refs(MinimaxLlmModelToolsItem_Dtmf) +update_forward_refs(MinimaxLlmModelToolsItem_EndCall) +update_forward_refs(MinimaxLlmModelToolsItem_Function) +update_forward_refs(MinimaxLlmModelToolsItem_GohighlevelCalendarAvailabilityCheck) +update_forward_refs(MinimaxLlmModelToolsItem_GohighlevelCalendarEventCreate) +update_forward_refs(MinimaxLlmModelToolsItem_GohighlevelContactCreate) +update_forward_refs(MinimaxLlmModelToolsItem_GohighlevelContactGet) +update_forward_refs(MinimaxLlmModelToolsItem_GoogleCalendarAvailabilityCheck) +update_forward_refs(MinimaxLlmModelToolsItem_GoogleCalendarEventCreate) +update_forward_refs(MinimaxLlmModelToolsItem_GoogleSheetsRowAppend) +update_forward_refs( + MinimaxLlmModelToolsItem_Handoff, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs(MinimaxLlmModelToolsItem_Mcp) +update_forward_refs(MinimaxLlmModelToolsItem_Query) +update_forward_refs(MinimaxLlmModelToolsItem_SlackMessageSend) +update_forward_refs(MinimaxLlmModelToolsItem_Sms) +update_forward_refs(MinimaxLlmModelToolsItem_TextEditor) +update_forward_refs(MinimaxLlmModelToolsItem_TransferCall) +update_forward_refs(MinimaxLlmModelToolsItem_SipRequest, JsonSchema=JsonSchema) +update_forward_refs(MinimaxLlmModelToolsItem_Voicemail) diff --git a/src/vapi/types/minimax_voice.py b/src/vapi/types/minimax_voice.py new file mode 100644 index 00000000..7668934d --- /dev/null +++ b/src/vapi/types/minimax_voice.py @@ -0,0 +1,120 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .chunk_plan import ChunkPlan +from .fallback_plan import FallbackPlan +from .minimax_voice_language_boost import MinimaxVoiceLanguageBoost +from .minimax_voice_model import MinimaxVoiceModel +from .minimax_voice_region import MinimaxVoiceRegion +from .minimax_voice_subtitle_type import MinimaxVoiceSubtitleType + + +class MinimaxVoice(UncheckedBaseModel): + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="cachingEnabled"), + pydantic.Field( + alias="cachingEnabled", description="This is the flag to toggle voice caching for the assistant." + ), + ] = None + voice_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="voiceId"), + pydantic.Field( + alias="voiceId", + description="This is the provider-specific ID that will be used. Use a voice from MINIMAX_PREDEFINED_VOICES or a custom cloned voice ID.", + ), + ] + model: typing.Optional[MinimaxVoiceModel] = pydantic.Field(default=None) + """ + This is the model that will be used. Options are 'speech-02-hd' and 'speech-02-turbo'. + speech-02-hd is optimized for high-fidelity applications like voiceovers and audiobooks. + speech-02-turbo is designed for real-time applications with low latency. + + @default "speech-02-turbo" + """ + + emotion: typing.Optional[str] = pydantic.Field(default=None) + """ + The emotion to use for the voice. If not provided, will use auto-detect mode. + Options include: 'happy', 'sad', 'angry', 'fearful', 'surprised', 'disgusted', 'neutral' + """ + + subtitle_type: typing_extensions.Annotated[ + typing.Optional[MinimaxVoiceSubtitleType], + FieldMetadata(alias="subtitleType"), + pydantic.Field( + alias="subtitleType", + description="Controls the granularity of subtitle/timing data returned by Minimax\nduring synthesis. Set to 'word' to receive per-word timestamps in\nassistant.speechStarted events for karaoke-style caption rendering.\n\n@default \"sentence\"", + ), + ] = None + pitch: typing.Optional[float] = pydantic.Field(default=None) + """ + Voice pitch adjustment. Range from -12 to 12 semitones. + @default 0 + """ + + speed: typing.Optional[float] = pydantic.Field(default=None) + """ + Voice speed adjustment. Range from 0.5 to 2.0. + @default 1.0 + """ + + volume: typing.Optional[float] = pydantic.Field(default=None) + """ + Voice volume adjustment. Range from 0.5 to 2.0. + @default 1.0 + """ + + region: typing.Optional[MinimaxVoiceRegion] = pydantic.Field(default=None) + """ + The region for Minimax API. Defaults to "worldwide". + """ + + language_boost: typing_extensions.Annotated[ + typing.Optional[MinimaxVoiceLanguageBoost], + FieldMetadata(alias="languageBoost"), + pydantic.Field( + alias="languageBoost", + description="Language hint for MiniMax T2A. Example: yue (Cantonese), zh (Chinese), en (English).", + ), + ] = None + text_normalization_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="textNormalizationEnabled"), + pydantic.Field( + alias="textNormalizationEnabled", + description="Enable MiniMax text normalization to improve number reading and formatting.", + ), + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], + FieldMetadata(alias="chunkPlan"), + pydantic.Field( + alias="chunkPlan", + description="This is the plan for chunking the model output before it is sent to the voice provider.", + ), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field( + alias="fallbackPlan", + description="This is the plan for voice provider fallbacks in the event that the primary voice provider fails.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/minimax_voice_language_boost.py b/src/vapi/types/minimax_voice_language_boost.py new file mode 100644 index 00000000..2c8f6fee --- /dev/null +++ b/src/vapi/types/minimax_voice_language_boost.py @@ -0,0 +1,50 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +MinimaxVoiceLanguageBoost = typing.Union[ + typing.Literal[ + "Chinese", + "Chinese,Yue", + "English", + "Arabic", + "Russian", + "Spanish", + "French", + "Portuguese", + "German", + "Turkish", + "Dutch", + "Ukrainian", + "Vietnamese", + "Indonesian", + "Japanese", + "Italian", + "Korean", + "Thai", + "Polish", + "Romanian", + "Greek", + "Czech", + "Finnish", + "Hindi", + "Bulgarian", + "Danish", + "Hebrew", + "Malay", + "Persian", + "Slovak", + "Swedish", + "Croatian", + "Filipino", + "Hungarian", + "Norwegian", + "Slovenian", + "Catalan", + "Nynorsk", + "Tamil", + "Afrikaans", + "auto", + ], + typing.Any, +] diff --git a/src/vapi/types/minimax_voice_model.py b/src/vapi/types/minimax_voice_model.py new file mode 100644 index 00000000..66fbb2e8 --- /dev/null +++ b/src/vapi/types/minimax_voice_model.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +MinimaxVoiceModel = typing.Union[ + typing.Literal["speech-02-hd", "speech-02-turbo", "speech-2.5-turbo-preview"], typing.Any +] diff --git a/src/vapi/types/minimax_voice_region.py b/src/vapi/types/minimax_voice_region.py new file mode 100644 index 00000000..cb6c8d22 --- /dev/null +++ b/src/vapi/types/minimax_voice_region.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +MinimaxVoiceRegion = typing.Union[typing.Literal["worldwide", "china"], typing.Any] diff --git a/src/vapi/types/minimax_voice_subtitle_type.py b/src/vapi/types/minimax_voice_subtitle_type.py new file mode 100644 index 00000000..01923cbd --- /dev/null +++ b/src/vapi/types/minimax_voice_subtitle_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +MinimaxVoiceSubtitleType = typing.Union[typing.Literal["word", "sentence"], typing.Any] diff --git a/src/vapi/types/mistral_credential.py b/src/vapi/types/mistral_credential.py new file mode 100644 index 00000000..5e694a3d --- /dev/null +++ b/src/vapi/types/mistral_credential.py @@ -0,0 +1,60 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .mistral_credential_provider import MistralCredentialProvider + + +class MistralCredential(UncheckedBaseModel): + provider: MistralCredentialProvider + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + id: str = pydantic.Field() + """ + This is the unique identifier for the credential. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/mistral_credential_provider.py b/src/vapi/types/mistral_credential_provider.py new file mode 100644 index 00000000..1a402238 --- /dev/null +++ b/src/vapi/types/mistral_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +MistralCredentialProvider = typing.Union[typing.Literal["mistral"], typing.Any] diff --git a/src/vapi/types/model_based_condition.py b/src/vapi/types/model_based_condition.py deleted file mode 100644 index 924f5433..00000000 --- a/src/vapi/types/model_based_condition.py +++ /dev/null @@ -1,54 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from ..core.pydantic_utilities import UniversalBaseModel -import typing -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 - - -class ModelBasedCondition(UniversalBaseModel): - type: typing.Literal["model-based"] = pydantic.Field(default="model-based") - """ - This condition is based on a model. - """ - - instruction: str = pydantic.Field() - """ - This is the instruction which should output a boolean value when passed to a model. - - You can reference any variable in the context of the current block execution (step): - - - "{{output.your-property-name}}" for current step's output - - "{{input.your-property-name}}" for current step's input - - "{{your-step-name.output.your-property-name}}" for another step's output (in the same workflow; read caveat #1) - - "{{your-step-name.input.your-property-name}}" for another step's input (in the same workflow; read caveat #1) - - "{{your-block-name.output.your-property-name}}" for another block's output (in the same workflow; read caveat #2) - - "{{your-block-name.input.your-property-name}}" for another block's input (in the same workflow; read caveat #2) - - "{{workflow.input.your-property-name}}" for the current workflow's input - - "{{global.your-property-name}}" for the global context - - You can also talk about the current step's output or input directly: - - - "{{output.your-property-name}} is greater than 10" - - "{{input.your-property-name}} is greater than 10" - - Examples: - - - "{{input.age}} is greater than 10" - - "{{input.age}} is greater than {{input.age2}}" - - "{{output.age}} is greater than 10" - - Caveats: - - 1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.input/output.propertyName}} will reference the latest usage of the step. - 2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.input/output.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow with steps. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/vapi/types/model_cost.py b/src/vapi/types/model_cost.py index 5ff3edb2..200d9484 100644 --- a/src/vapi/types/model_cost.py +++ b/src/vapi/types/model_cost.py @@ -1,25 +1,20 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing + import pydantic import typing_extensions -from ..core.serialization import FieldMetadata from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class ModelCost(UniversalBaseModel): - type: typing.Literal["model"] = pydantic.Field(default="model") - """ - This is the type of cost, always 'model' for this class. - """ - - model: typing.Dict[str, typing.Optional[typing.Any]] = pydantic.Field() +class ModelCost(UncheckedBaseModel): + model: typing.Dict[str, typing.Any] = pydantic.Field() """ This is the model that was used during the call. This matches one of the following: - - `call.assistant.model`, - `call.assistantId->model`, - `call.squad[n].assistant.model`, @@ -28,16 +23,30 @@ class ModelCost(UniversalBaseModel): - `call.squadId->[n].assistantId->model`. """ - prompt_tokens: typing_extensions.Annotated[float, FieldMetadata(alias="promptTokens")] = pydantic.Field() - """ - This is the number of prompt tokens used in the call. These should be total prompt tokens used in the call for single assistant calls, while squad calls will have multiple model costs one for each assistant that was used. - """ - - completion_tokens: typing_extensions.Annotated[float, FieldMetadata(alias="completionTokens")] = pydantic.Field() - """ - This is the number of completion tokens generated in the call. These should be total completion tokens used in the call for single assistant calls, while squad calls will have multiple model costs one for each assistant that was used. - """ - + prompt_tokens: typing_extensions.Annotated[ + float, + FieldMetadata(alias="promptTokens"), + pydantic.Field( + alias="promptTokens", + description="This is the number of prompt tokens used in the call. These should be total prompt tokens used in the call for single assistant calls, while squad calls will have multiple model costs one for each assistant that was used.", + ), + ] + completion_tokens: typing_extensions.Annotated[ + float, + FieldMetadata(alias="completionTokens"), + pydantic.Field( + alias="completionTokens", + description="This is the number of completion tokens generated in the call. These should be total completion tokens used in the call for single assistant calls, while squad calls will have multiple model costs one for each assistant that was used.", + ), + ] + cached_prompt_tokens: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="cachedPromptTokens"), + pydantic.Field( + alias="cachedPromptTokens", + description="This is the number of cached prompt tokens used in the call. This is only applicable to certain providers (e.g., OpenAI, Azure OpenAI) that support prompt caching. Cached tokens are billed at a discounted rate.", + ), + ] = None cost: float = pydantic.Field() """ This is the cost of the component in USD. diff --git a/src/vapi/types/monitor.py b/src/vapi/types/monitor.py index 6c7f6960..016d1ef6 100644 --- a/src/vapi/types/monitor.py +++ b/src/vapi/types/monitor.py @@ -1,27 +1,33 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions import typing -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .monitor_result import MonitorResult -class Monitor(UniversalBaseModel): - listen_url: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="listenUrl")] = pydantic.Field( - default=None - ) - """ - This is the URL where the assistant's calls can be listened to in real-time. To enable, set `assistant.monitorPlan.listenEnabled` to `true`. - """ - - control_url: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="controlUrl")] = pydantic.Field( - default=None - ) - """ - This is the URL where the assistant's calls can be controlled in real-time. To enable, set `assistant.monitorPlan.controlEnabled` to `true`. - """ +class Monitor(UncheckedBaseModel): + monitors: typing.Optional[typing.List[MonitorResult]] = None + listen_url: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="listenUrl"), + pydantic.Field( + alias="listenUrl", + description="This is the URL where the assistant's calls can be listened to in real-time. To enable, set `assistant.monitorPlan.listenEnabled` to `true`.", + ), + ] = None + control_url: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="controlUrl"), + pydantic.Field( + alias="controlUrl", + description="This is the URL where the assistant's calls can be controlled in real-time. To enable, set `assistant.monitorPlan.controlEnabled` to `true`.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/monitor_plan.py b/src/vapi/types/monitor_plan.py index fb590dbf..4aaa9f1d 100644 --- a/src/vapi/types/monitor_plan.py +++ b/src/vapi/types/monitor_plan.py @@ -1,37 +1,55 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions import typing -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class MonitorPlan(UniversalBaseModel): - listen_enabled: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="listenEnabled")] = ( - pydantic.Field(default=None) - ) - """ - This determines whether the assistant's calls allow live listening. Defaults to true. - - Fetch `call.monitor.listenUrl` to get the live listening URL. - - @default true - """ - - control_enabled: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="controlEnabled")] = ( - pydantic.Field(default=None) - ) - """ - This determines whether the assistant's calls allow live control. Defaults to true. - - Fetch `call.monitor.controlUrl` to get the live control URL. - - To use, send any control message via a POST request to `call.monitor.controlUrl`. Here are the types of controls supported: https://docs.vapi.ai/api-reference/messages/client-inbound-message - - @default true - """ +class MonitorPlan(UncheckedBaseModel): + listen_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="listenEnabled"), + pydantic.Field( + alias="listenEnabled", + description="This determines whether the assistant's calls allow live listening. Defaults to true.\n\nFetch `call.monitor.listenUrl` to get the live listening URL.\n\n@default true", + ), + ] = None + listen_authentication_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="listenAuthenticationEnabled"), + pydantic.Field( + alias="listenAuthenticationEnabled", + description="This enables authentication on the `call.monitor.listenUrl`.\n\nIf `listenAuthenticationEnabled` is `true`, the `call.monitor.listenUrl` will require an `Authorization: Bearer ` header.\n\n@default false", + ), + ] = None + control_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="controlEnabled"), + pydantic.Field( + alias="controlEnabled", + description="This determines whether the assistant's calls allow live control. Defaults to true.\n\nFetch `call.monitor.controlUrl` to get the live control URL.\n\nTo use, send any control message via a POST request to `call.monitor.controlUrl`. Here are the types of controls supported: https://docs.vapi.ai/api-reference/messages/client-inbound-message\n\n@default true", + ), + ] = None + control_authentication_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="controlAuthenticationEnabled"), + pydantic.Field( + alias="controlAuthenticationEnabled", + description="This enables authentication on the `call.monitor.controlUrl`.\n\nIf `controlAuthenticationEnabled` is `true`, the `call.monitor.controlUrl` will require an `Authorization: Bearer ` header.\n\n@default false", + ), + ] = None + monitor_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="monitorIds"), + pydantic.Field( + alias="monitorIds", + description="This the set of monitor ids that are attached to the assistant.\nThe source of truth for the monitor ids is the assistant_monitor join table.\nThis field can be used for transient assistants and to update assistants with new monitor ids.\n\n@default []", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/monitor_result.py b/src/vapi/types/monitor_result.py new file mode 100644 index 00000000..85906a14 --- /dev/null +++ b/src/vapi/types/monitor_result.py @@ -0,0 +1,25 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class MonitorResult(UncheckedBaseModel): + monitor_id: typing_extensions.Annotated[str, FieldMetadata(alias="monitorId"), pydantic.Field(alias="monitorId")] + filter_passed: typing_extensions.Annotated[ + bool, FieldMetadata(alias="filterPassed"), pydantic.Field(alias="filterPassed") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/mono.py b/src/vapi/types/mono.py new file mode 100644 index 00000000..0bba6562 --- /dev/null +++ b/src/vapi/types/mono.py @@ -0,0 +1,45 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class Mono(UncheckedBaseModel): + combined_url: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="combinedUrl"), + pydantic.Field( + alias="combinedUrl", + description="This is the combined recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`.", + ), + ] = None + assistant_url: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assistantUrl"), + pydantic.Field( + alias="assistantUrl", + description="This is the mono recording url for the assistant. To enable, set `assistant.artifactPlan.recordingEnabled`.", + ), + ] = None + customer_url: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="customerUrl"), + pydantic.Field( + alias="customerUrl", + description="This is the mono recording url for the customer. To enable, set `assistant.artifactPlan.recordingEnabled`.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/neets_voice.py b/src/vapi/types/neets_voice.py index 6c770937..2c15276d 100644 --- a/src/vapi/types/neets_voice.py +++ b/src/vapi/types/neets_voice.py @@ -1,41 +1,18 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions import typing -from ..core.serialization import FieldMetadata + import pydantic -from .neets_voice_id import NeetsVoiceId -from .chunk_plan import ChunkPlan +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class NeetsVoice(UniversalBaseModel): - filler_injection_enabled: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="fillerInjectionEnabled") - ] = pydantic.Field(default=None) - """ - This determines whether fillers are injected into the model output before inputting it into the voice provider. - - Default `false` because you can achieve better results with prompting the model. - """ - - provider: typing.Literal["neets"] = pydantic.Field(default="neets") - """ - This is the voice provider that will be used. - """ - - voice_id: typing_extensions.Annotated[NeetsVoiceId, FieldMetadata(alias="voiceId")] = pydantic.Field() - """ - This is the provider-specific ID that will be used. - """ - - chunk_plan: typing_extensions.Annotated[typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan")] = ( - pydantic.Field(default=None) - ) - """ - This is the plan for chunking the model output before it is sent to the voice provider. - """ +class NeetsVoice(UncheckedBaseModel): + voice_id: typing_extensions.Annotated[ + typing.Optional[typing.Any], FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/neets_voice_id.py b/src/vapi/types/neets_voice_id.py deleted file mode 100644 index 4389d43e..00000000 --- a/src/vapi/types/neets_voice_id.py +++ /dev/null @@ -1,6 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from .neets_voice_id_enum import NeetsVoiceIdEnum - -NeetsVoiceId = typing.Union[NeetsVoiceIdEnum, str] diff --git a/src/vapi/types/neuphonic_credential.py b/src/vapi/types/neuphonic_credential.py new file mode 100644 index 00000000..d762b28f --- /dev/null +++ b/src/vapi/types/neuphonic_credential.py @@ -0,0 +1,60 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .neuphonic_credential_provider import NeuphonicCredentialProvider + + +class NeuphonicCredential(UncheckedBaseModel): + provider: NeuphonicCredentialProvider + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + id: str = pydantic.Field() + """ + This is the unique identifier for the credential. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/neuphonic_credential_provider.py b/src/vapi/types/neuphonic_credential_provider.py new file mode 100644 index 00000000..12ad1b17 --- /dev/null +++ b/src/vapi/types/neuphonic_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +NeuphonicCredentialProvider = typing.Union[typing.Literal["neuphonic"], typing.Any] diff --git a/src/vapi/types/neuphonic_voice.py b/src/vapi/types/neuphonic_voice.py new file mode 100644 index 00000000..0a12a4ce --- /dev/null +++ b/src/vapi/types/neuphonic_voice.py @@ -0,0 +1,67 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .chunk_plan import ChunkPlan +from .fallback_plan import FallbackPlan +from .neuphonic_voice_model import NeuphonicVoiceModel + + +class NeuphonicVoice(UncheckedBaseModel): + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="cachingEnabled"), + pydantic.Field( + alias="cachingEnabled", description="This is the flag to toggle voice caching for the assistant." + ), + ] = None + voice_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="voiceId"), + pydantic.Field(alias="voiceId", description="This is the provider-specific ID that will be used."), + ] + model: typing.Optional[NeuphonicVoiceModel] = pydantic.Field(default=None) + """ + This is the model that will be used. Defaults to 'neu_fast' if not specified. + """ + + language: typing.Dict[str, typing.Any] = pydantic.Field() + """ + This is the language (ISO 639-1) that is enforced for the model. + """ + + speed: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the speed multiplier that will be used. + """ + + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], + FieldMetadata(alias="chunkPlan"), + pydantic.Field( + alias="chunkPlan", + description="This is the plan for chunking the model output before it is sent to the voice provider.", + ), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field( + alias="fallbackPlan", + description="This is the plan for voice provider fallbacks in the event that the primary voice provider fails.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/neuphonic_voice_model.py b/src/vapi/types/neuphonic_voice_model.py new file mode 100644 index 00000000..bd44fd2d --- /dev/null +++ b/src/vapi/types/neuphonic_voice_model.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +NeuphonicVoiceModel = typing.Union[typing.Literal["neu_hq", "neu_fast"], typing.Any] diff --git a/src/vapi/types/node_artifact.py b/src/vapi/types/node_artifact.py new file mode 100644 index 00000000..b0563165 --- /dev/null +++ b/src/vapi/types/node_artifact.py @@ -0,0 +1,39 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .node_artifact_messages_item import NodeArtifactMessagesItem + + +class NodeArtifact(UncheckedBaseModel): + messages: typing.Optional[typing.List[NodeArtifactMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that were spoken during the node. + """ + + node_name: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="nodeName"), + pydantic.Field(alias="nodeName", description="This is the node name."), + ] = None + variable_values: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="variableValues"), + pydantic.Field( + alias="variableValues", description="These are the variable values that were extracted from the node." + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/node_artifact_messages_item.py b/src/vapi/types/node_artifact_messages_item.py new file mode 100644 index 00000000..e8d22618 --- /dev/null +++ b/src/vapi/types/node_artifact_messages_item.py @@ -0,0 +1,11 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .bot_message import BotMessage +from .system_message import SystemMessage +from .tool_call_message import ToolCallMessage +from .tool_call_result_message import ToolCallResultMessage +from .user_message import UserMessage + +NodeArtifactMessagesItem = typing.Union[UserMessage, SystemMessage, BotMessage, ToolCallMessage, ToolCallResultMessage] diff --git a/src/vapi/types/o_auth_2_authentication_plan.py b/src/vapi/types/o_auth_2_authentication_plan.py new file mode 100644 index 00000000..2c02aecf --- /dev/null +++ b/src/vapi/types/o_auth_2_authentication_plan.py @@ -0,0 +1,42 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .o_auth_2_authentication_plan_type import OAuth2AuthenticationPlanType + + +class OAuth2AuthenticationPlan(UncheckedBaseModel): + type: OAuth2AuthenticationPlanType + url: str = pydantic.Field() + """ + This is the OAuth2 URL. + """ + + client_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="clientId"), + pydantic.Field(alias="clientId", description="This is the OAuth2 client ID."), + ] + client_secret: typing_extensions.Annotated[ + str, + FieldMetadata(alias="clientSecret"), + pydantic.Field(alias="clientSecret", description="This is the OAuth2 client secret."), + ] + scope: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the scope of the OAuth2 token. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/o_auth_2_authentication_plan_type.py b/src/vapi/types/o_auth_2_authentication_plan_type.py new file mode 100644 index 00000000..20cfaef8 --- /dev/null +++ b/src/vapi/types/o_auth_2_authentication_plan_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +OAuth2AuthenticationPlanType = typing.Union[typing.Literal["oauth2"], typing.Any] diff --git a/src/vapi/types/oauth_2_authentication_session.py b/src/vapi/types/oauth_2_authentication_session.py new file mode 100644 index 00000000..b81f7247 --- /dev/null +++ b/src/vapi/types/oauth_2_authentication_session.py @@ -0,0 +1,37 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class Oauth2AuthenticationSession(UncheckedBaseModel): + access_token: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="accessToken"), + pydantic.Field(alias="accessToken", description="This is the OAuth2 access token."), + ] = None + expires_at: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="expiresAt"), + pydantic.Field(alias="expiresAt", description="This is the OAuth2 access token expiration."), + ] = None + refresh_token: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="refreshToken"), + pydantic.Field(alias="refreshToken", description="This is the OAuth2 refresh token."), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/open_ai_credential.py b/src/vapi/types/open_ai_credential.py index 53a34caa..23714763 100644 --- a/src/vapi/types/open_ai_credential.py +++ b/src/vapi/types/open_ai_credential.py @@ -1,39 +1,53 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +import datetime as dt import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic -import datetime as dt +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .open_ai_credential_provider import OpenAiCredentialProvider -class OpenAiCredential(UniversalBaseModel): - provider: typing.Literal["openai"] = "openai" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() - """ - This is not returned in the API. - """ - +class OpenAiCredential(UncheckedBaseModel): + provider: OpenAiCredentialProvider + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] id: str = pydantic.Field() """ This is the unique identifier for the credential. """ - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field() - """ - This is the unique identifier for the org that this credential belongs to. - """ - - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the credential was created. - """ - - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the assistant was last updated. + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/open_ai_credential_provider.py b/src/vapi/types/open_ai_credential_provider.py new file mode 100644 index 00000000..47c9c26a --- /dev/null +++ b/src/vapi/types/open_ai_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +OpenAiCredentialProvider = typing.Union[typing.Literal["openai"], typing.Any] diff --git a/src/vapi/types/open_ai_function.py b/src/vapi/types/open_ai_function.py index 13e9e1bc..4cd13861 100644 --- a/src/vapi/types/open_ai_function.py +++ b/src/vapi/types/open_ai_function.py @@ -1,13 +1,23 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import pydantic +from __future__ import annotations + import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel from .open_ai_function_parameters import OpenAiFunctionParameters -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -class OpenAiFunction(UniversalBaseModel): +class OpenAiFunction(UncheckedBaseModel): + strict: typing.Optional[bool] = pydantic.Field(default=None) + """ + This is a boolean that controls whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the parameters field. Only a subset of JSON Schema is supported when strict is true. Learn more about Structured Outputs in the [OpenAI guide](https://openai.com/index/introducing-structured-outputs-in-the-api/). + + @default false + """ + name: str = pydantic.Field() """ This is the the name of the function to be called. @@ -15,7 +25,11 @@ class OpenAiFunction(UniversalBaseModel): Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64. """ - description: typing.Optional[str] = None + description: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the description of what the function does, used by the AI to choose when and how to call the function. + """ + parameters: typing.Optional[OpenAiFunctionParameters] = pydantic.Field(default=None) """ These are the parameters the functions accepts, described as a JSON Schema object. @@ -33,3 +47,6 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +update_forward_refs(OpenAiFunction) diff --git a/src/vapi/types/open_ai_function_parameters.py b/src/vapi/types/open_ai_function_parameters.py index cde1d810..e711cfc2 100644 --- a/src/vapi/types/open_ai_function_parameters.py +++ b/src/vapi/types/open_ai_function_parameters.py @@ -1,19 +1,22 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +from __future__ import annotations + import typing + import pydantic -from .json_schema import JsonSchema -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .open_ai_function_parameters_type import OpenAiFunctionParametersType -class OpenAiFunctionParameters(UniversalBaseModel): - type: typing.Literal["object"] = pydantic.Field(default="object") +class OpenAiFunctionParameters(UncheckedBaseModel): + type: OpenAiFunctionParametersType = pydantic.Field() """ This must be set to 'object'. It instructs the model to return a JSON object containing the function call properties. """ - properties: typing.Dict[str, JsonSchema] = pydantic.Field() + properties: typing.Dict[str, "JsonSchema"] = pydantic.Field() """ This provides a description of the properties required by the function. JSON Schema can be used to specify expectations for each property. @@ -33,3 +36,8 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .json_schema import JsonSchema # noqa: E402, I001 + +update_forward_refs(OpenAiFunctionParameters, JsonSchema=JsonSchema) diff --git a/src/vapi/types/open_ai_function_parameters_type.py b/src/vapi/types/open_ai_function_parameters_type.py new file mode 100644 index 00000000..ffe43ed5 --- /dev/null +++ b/src/vapi/types/open_ai_function_parameters_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +OpenAiFunctionParametersType = typing.Union[typing.Literal["object"], typing.Any] diff --git a/src/vapi/types/open_ai_message.py b/src/vapi/types/open_ai_message.py index a32cafe6..ded0058f 100644 --- a/src/vapi/types/open_ai_message.py +++ b/src/vapi/types/open_ai_message.py @@ -1,13 +1,14 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -from .open_ai_message_role import OpenAiMessageRole -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .open_ai_message_role import OpenAiMessageRole -class OpenAiMessage(UniversalBaseModel): +class OpenAiMessage(UncheckedBaseModel): content: typing.Optional[str] = None role: OpenAiMessageRole diff --git a/src/vapi/types/open_ai_model.py b/src/vapi/types/open_ai_model.py index d5ac2aa2..c25efd0d 100644 --- a/src/vapi/types/open_ai_model.py +++ b/src/vapi/types/open_ai_model.py @@ -1,100 +1,119 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +from __future__ import annotations + import typing -from .open_ai_message import OpenAiMessage + import pydantic -from .open_ai_model_tools_item import OpenAiModelToolsItem import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.serialization import FieldMetadata -from .open_ai_model_model import OpenAiModelModel +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_custom_knowledge_base_dto import CreateCustomKnowledgeBaseDto +from .open_ai_message import OpenAiMessage from .open_ai_model_fallback_models_item import OpenAiModelFallbackModelsItem -from .knowledge_base import KnowledgeBase -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from .open_ai_model_model import OpenAiModelModel +from .open_ai_model_prompt_cache_retention import OpenAiModelPromptCacheRetention +from .open_ai_model_tool_strict_compatibility_mode import OpenAiModelToolStrictCompatibilityMode -class OpenAiModel(UniversalBaseModel): +class OpenAiModel(UncheckedBaseModel): messages: typing.Optional[typing.List[OpenAiMessage]] = pydantic.Field(default=None) """ This is the starting state for the conversation. """ - tools: typing.Optional[typing.List[OpenAiModelToolsItem]] = pydantic.Field(default=None) + tools: typing.Optional[typing.List["OpenAiModelToolsItem"]] = pydantic.Field(default=None) """ These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`. Both `tools` and `toolIds` can be used together. """ - tool_ids: typing_extensions.Annotated[typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds")] = ( - pydantic.Field(default=None) - ) - """ - These are the tools that the assistant can use during the call. To use transient tools, use `tools`. - - Both `tools` and `toolIds` can be used together. - """ - - provider: typing.Literal["openai"] = pydantic.Field(default="openai") - """ - This is the provider that will be used for the model. - """ - + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="toolIds"), + pydantic.Field( + alias="toolIds", + description="These are the tools that the assistant can use during the call. To use transient tools, use `tools`.\n\nBoth `tools` and `toolIds` can be used together.", + ), + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase", description="These are the options for the knowledge base."), + ] = None model: OpenAiModelModel = pydantic.Field() """ This is the OpenAI model that will be used. + + When using Vapi OpenAI or your own Azure Credentials, you have the option to specify the region for the selected model. This shouldn't be specified unless you have a specific reason to do so. Vapi will automatically find the fastest region that make sense. + This is helpful when you are required to comply with Data Residency rules. Learn more about Azure regions here https://azure.microsoft.com/en-us/explore/global-infrastructure/data-residency/. + + @default undefined """ fallback_models: typing_extensions.Annotated[ - typing.Optional[typing.List[OpenAiModelFallbackModelsItem]], FieldMetadata(alias="fallbackModels") - ] = pydantic.Field(default=None) - """ - These are the fallback models that will be used if the primary model fails. This shouldn't be specified unless you have a specific reason to do so. Vapi will automatically find the fastest fallbacks that make sense. - """ - - semantic_caching_enabled: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="semanticCachingEnabled") + typing.Optional[typing.List[OpenAiModelFallbackModelsItem]], + FieldMetadata(alias="fallbackModels"), + pydantic.Field( + alias="fallbackModels", + description="These are the fallback models that will be used if the primary model fails. This shouldn't be specified unless you have a specific reason to do so. Vapi will automatically find the fastest fallbacks that make sense.", + ), + ] = None + tool_strict_compatibility_mode: typing_extensions.Annotated[ + typing.Optional[OpenAiModelToolStrictCompatibilityMode], + FieldMetadata(alias="toolStrictCompatibilityMode"), + pydantic.Field( + alias="toolStrictCompatibilityMode", + description="Azure OpenAI doesn't support `maxLength` right now https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/structured-outputs?tabs=python-secure%2Cdotnet-entra-id&pivots=programming-language-csharp#unsupported-type-specific-keywords. Need to strip.\n\n- `strip-parameters-with-unsupported-validation` will strip parameters with unsupported validation.\n- `strip-unsupported-validation` will keep the parameters but strip unsupported validation.\n\n@default `strip-unsupported-validation`", + ), + ] = None + prompt_cache_retention: typing_extensions.Annotated[ + typing.Optional[OpenAiModelPromptCacheRetention], + FieldMetadata(alias="promptCacheRetention"), + pydantic.Field( + alias="promptCacheRetention", + description="This controls the prompt cache retention policy for models that support extended caching (GPT-4.1, GPT-5 series).\n\n- `in_memory`: Default behavior, cache retained in GPU memory only\n- `24h`: Extended caching, keeps cached prefixes active for up to 24 hours by offloading to GPU-local storage\n\nOnly applies to models: gpt-5.4, gpt-5.4-mini, gpt-5.4-nano, gpt-5.2, gpt-5.1, gpt-5.1-codex, gpt-5.1-codex-mini, gpt-5.1-chat-latest, gpt-5, gpt-5-codex, gpt-4.1\n\n@default undefined (uses API default which is 'in_memory')", + ), + ] = None + prompt_cache_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="promptCacheKey"), + pydantic.Field( + alias="promptCacheKey", + description="This is the prompt cache key for models that support extended caching (GPT-4.1, GPT-5 series).\n\nProviding a cache key allows you to share cached prefixes across requests.\n\n@default undefined", + ), ] = None temperature: typing.Optional[float] = pydantic.Field(default=None) """ This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency. """ - knowledge_base: typing_extensions.Annotated[ - typing.Optional[KnowledgeBase], FieldMetadata(alias="knowledgeBase") - ] = pydantic.Field(default=None) - """ - These are the options for the knowledge base. - """ - - max_tokens: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="maxTokens")] = pydantic.Field( - default=None - ) - """ - This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250. - """ - + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="maxTokens"), + pydantic.Field( + alias="maxTokens", + description="This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.", + ), + ] = None emotion_recognition_enabled: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="emotionRecognitionEnabled") - ] = pydantic.Field(default=None) - """ - This determines whether we detect user's emotion while they speak and send it as an additional info to model. - - Default `false` because the model is usually are good at understanding the user's emotion from text. - - @default false - """ - - num_fast_turns: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="numFastTurns")] = ( - pydantic.Field(default=None) - ) - """ - This sets how many turns at the start of the conversation to use a smaller, faster model from the same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai. - - Default is 0. - - @default 0 - """ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field( + alias="emotionRecognitionEnabled", + description="This determines whether we detect user's emotion while they speak and send it as an additional info to model.\n\nDefault `false` because the model is usually are good at understanding the user's emotion from text.\n\n@default false", + ), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="numFastTurns"), + pydantic.Field( + alias="numFastTurns", + description="This sets how many turns at the start of the conversation to use a smaller, faster model from the same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai.\n\nDefault is 0.\n\n@default 0", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -104,3 +123,121 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + OpenAiModel, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/open_ai_model_fallback_models_item.py b/src/vapi/types/open_ai_model_fallback_models_item.py index ce6a0395..32e996d4 100644 --- a/src/vapi/types/open_ai_model_fallback_models_item.py +++ b/src/vapi/types/open_ai_model_fallback_models_item.py @@ -4,11 +4,40 @@ OpenAiModelFallbackModelsItem = typing.Union[ typing.Literal[ - "gpt-4o-mini", + "gpt-5.4", + "gpt-5.4-mini", + "gpt-5.4-nano", + "gpt-5.2", + "gpt-5.2-chat-latest", + "gpt-5.1", + "gpt-5.1-chat-latest", + "gpt-5", + "gpt-5-chat-latest", + "gpt-5-mini", + "gpt-5-nano", + "gpt-4.1-2025-04-14", + "gpt-4.1-mini-2025-04-14", + "gpt-4.1-nano-2025-04-14", + "gpt-4.1", + "gpt-4.1-mini", + "gpt-4.1-nano", + "chatgpt-4o-latest", + "o3", + "o3-mini", + "o4-mini", + "o1-mini", + "o1-mini-2024-09-12", + "gpt-4o-realtime-preview-2024-10-01", + "gpt-4o-realtime-preview-2024-12-17", + "gpt-4o-mini-realtime-preview-2024-12-17", + "gpt-realtime-2025-08-28", + "gpt-realtime-mini-2025-12-15", "gpt-4o-mini-2024-07-18", + "gpt-4o-mini", "gpt-4o", "gpt-4o-2024-05-13", "gpt-4o-2024-08-06", + "gpt-4o-2024-11-20", "gpt-4-turbo", "gpt-4-turbo-2024-04-09", "gpt-4-turbo-preview", @@ -21,6 +50,78 @@ "gpt-3.5-turbo-1106", "gpt-3.5-turbo-16k", "gpt-3.5-turbo-0613", + "gpt-4.1-2025-04-14:westus", + "gpt-4.1-2025-04-14:eastus2", + "gpt-4.1-2025-04-14:eastus", + "gpt-4.1-2025-04-14:westus3", + "gpt-4.1-2025-04-14:northcentralus", + "gpt-4.1-2025-04-14:southcentralus", + "gpt-4.1-2025-04-14:westeurope", + "gpt-4.1-2025-04-14:germanywestcentral", + "gpt-4.1-2025-04-14:polandcentral", + "gpt-4.1-2025-04-14:spaincentral", + "gpt-4.1-mini-2025-04-14:westus", + "gpt-4.1-mini-2025-04-14:eastus2", + "gpt-4.1-mini-2025-04-14:eastus", + "gpt-4.1-mini-2025-04-14:westus3", + "gpt-4.1-mini-2025-04-14:northcentralus", + "gpt-4.1-mini-2025-04-14:southcentralus", + "gpt-4.1-mini-2025-04-14:westeurope", + "gpt-4.1-mini-2025-04-14:germanywestcentral", + "gpt-4.1-mini-2025-04-14:polandcentral", + "gpt-4.1-mini-2025-04-14:spaincentral", + "gpt-4.1-nano-2025-04-14:westus", + "gpt-4.1-nano-2025-04-14:eastus2", + "gpt-4.1-nano-2025-04-14:westus3", + "gpt-4.1-nano-2025-04-14:northcentralus", + "gpt-4.1-nano-2025-04-14:southcentralus", + "gpt-4o-2024-11-20:swedencentral", + "gpt-4o-2024-11-20:westus", + "gpt-4o-2024-11-20:eastus2", + "gpt-4o-2024-11-20:eastus", + "gpt-4o-2024-11-20:westus3", + "gpt-4o-2024-11-20:southcentralus", + "gpt-4o-2024-11-20:westeurope", + "gpt-4o-2024-11-20:germanywestcentral", + "gpt-4o-2024-11-20:polandcentral", + "gpt-4o-2024-11-20:spaincentral", + "gpt-4o-2024-08-06:westus", + "gpt-4o-2024-08-06:westus3", + "gpt-4o-2024-08-06:eastus", + "gpt-4o-2024-08-06:eastus2", + "gpt-4o-2024-08-06:northcentralus", + "gpt-4o-2024-08-06:southcentralus", + "gpt-4o-mini-2024-07-18:westus", + "gpt-4o-mini-2024-07-18:westus3", + "gpt-4o-mini-2024-07-18:eastus", + "gpt-4o-mini-2024-07-18:eastus2", + "gpt-4o-mini-2024-07-18:northcentralus", + "gpt-4o-mini-2024-07-18:southcentralus", + "gpt-4o-2024-05-13:eastus2", + "gpt-4o-2024-05-13:eastus", + "gpt-4o-2024-05-13:northcentralus", + "gpt-4o-2024-05-13:southcentralus", + "gpt-4o-2024-05-13:westus3", + "gpt-4o-2024-05-13:westus", + "gpt-4-turbo-2024-04-09:eastus2", + "gpt-4-0125-preview:eastus", + "gpt-4-0125-preview:northcentralus", + "gpt-4-0125-preview:southcentralus", + "gpt-4-1106-preview:australiaeast", + "gpt-4-1106-preview:canadaeast", + "gpt-4-1106-preview:france", + "gpt-4-1106-preview:india", + "gpt-4-1106-preview:norway", + "gpt-4-1106-preview:swedencentral", + "gpt-4-1106-preview:uk", + "gpt-4-1106-preview:westus", + "gpt-4-1106-preview:westus3", + "gpt-4-0613:canadaeast", + "gpt-3.5-turbo-0125:canadaeast", + "gpt-3.5-turbo-0125:northcentralus", + "gpt-3.5-turbo-0125:southcentralus", + "gpt-3.5-turbo-1106:canadaeast", + "gpt-3.5-turbo-1106:westus", ], typing.Any, ] diff --git a/src/vapi/types/open_ai_model_model.py b/src/vapi/types/open_ai_model_model.py index b8d64e53..ffc7e748 100644 --- a/src/vapi/types/open_ai_model_model.py +++ b/src/vapi/types/open_ai_model_model.py @@ -4,11 +4,40 @@ OpenAiModelModel = typing.Union[ typing.Literal[ - "gpt-4o-mini", + "gpt-5.4", + "gpt-5.4-mini", + "gpt-5.4-nano", + "gpt-5.2", + "gpt-5.2-chat-latest", + "gpt-5.1", + "gpt-5.1-chat-latest", + "gpt-5", + "gpt-5-chat-latest", + "gpt-5-mini", + "gpt-5-nano", + "gpt-4.1-2025-04-14", + "gpt-4.1-mini-2025-04-14", + "gpt-4.1-nano-2025-04-14", + "gpt-4.1", + "gpt-4.1-mini", + "gpt-4.1-nano", + "chatgpt-4o-latest", + "o3", + "o3-mini", + "o4-mini", + "o1-mini", + "o1-mini-2024-09-12", + "gpt-4o-realtime-preview-2024-10-01", + "gpt-4o-realtime-preview-2024-12-17", + "gpt-4o-mini-realtime-preview-2024-12-17", + "gpt-realtime-2025-08-28", + "gpt-realtime-mini-2025-12-15", "gpt-4o-mini-2024-07-18", + "gpt-4o-mini", "gpt-4o", "gpt-4o-2024-05-13", "gpt-4o-2024-08-06", + "gpt-4o-2024-11-20", "gpt-4-turbo", "gpt-4-turbo-2024-04-09", "gpt-4-turbo-preview", @@ -21,6 +50,78 @@ "gpt-3.5-turbo-1106", "gpt-3.5-turbo-16k", "gpt-3.5-turbo-0613", + "gpt-4.1-2025-04-14:westus", + "gpt-4.1-2025-04-14:eastus2", + "gpt-4.1-2025-04-14:eastus", + "gpt-4.1-2025-04-14:westus3", + "gpt-4.1-2025-04-14:northcentralus", + "gpt-4.1-2025-04-14:southcentralus", + "gpt-4.1-2025-04-14:westeurope", + "gpt-4.1-2025-04-14:germanywestcentral", + "gpt-4.1-2025-04-14:polandcentral", + "gpt-4.1-2025-04-14:spaincentral", + "gpt-4.1-mini-2025-04-14:westus", + "gpt-4.1-mini-2025-04-14:eastus2", + "gpt-4.1-mini-2025-04-14:eastus", + "gpt-4.1-mini-2025-04-14:westus3", + "gpt-4.1-mini-2025-04-14:northcentralus", + "gpt-4.1-mini-2025-04-14:southcentralus", + "gpt-4.1-mini-2025-04-14:westeurope", + "gpt-4.1-mini-2025-04-14:germanywestcentral", + "gpt-4.1-mini-2025-04-14:polandcentral", + "gpt-4.1-mini-2025-04-14:spaincentral", + "gpt-4.1-nano-2025-04-14:westus", + "gpt-4.1-nano-2025-04-14:eastus2", + "gpt-4.1-nano-2025-04-14:westus3", + "gpt-4.1-nano-2025-04-14:northcentralus", + "gpt-4.1-nano-2025-04-14:southcentralus", + "gpt-4o-2024-11-20:swedencentral", + "gpt-4o-2024-11-20:westus", + "gpt-4o-2024-11-20:eastus2", + "gpt-4o-2024-11-20:eastus", + "gpt-4o-2024-11-20:westus3", + "gpt-4o-2024-11-20:southcentralus", + "gpt-4o-2024-11-20:westeurope", + "gpt-4o-2024-11-20:germanywestcentral", + "gpt-4o-2024-11-20:polandcentral", + "gpt-4o-2024-11-20:spaincentral", + "gpt-4o-2024-08-06:westus", + "gpt-4o-2024-08-06:westus3", + "gpt-4o-2024-08-06:eastus", + "gpt-4o-2024-08-06:eastus2", + "gpt-4o-2024-08-06:northcentralus", + "gpt-4o-2024-08-06:southcentralus", + "gpt-4o-mini-2024-07-18:westus", + "gpt-4o-mini-2024-07-18:westus3", + "gpt-4o-mini-2024-07-18:eastus", + "gpt-4o-mini-2024-07-18:eastus2", + "gpt-4o-mini-2024-07-18:northcentralus", + "gpt-4o-mini-2024-07-18:southcentralus", + "gpt-4o-2024-05-13:eastus2", + "gpt-4o-2024-05-13:eastus", + "gpt-4o-2024-05-13:northcentralus", + "gpt-4o-2024-05-13:southcentralus", + "gpt-4o-2024-05-13:westus3", + "gpt-4o-2024-05-13:westus", + "gpt-4-turbo-2024-04-09:eastus2", + "gpt-4-0125-preview:eastus", + "gpt-4-0125-preview:northcentralus", + "gpt-4-0125-preview:southcentralus", + "gpt-4-1106-preview:australiaeast", + "gpt-4-1106-preview:canadaeast", + "gpt-4-1106-preview:france", + "gpt-4-1106-preview:india", + "gpt-4-1106-preview:norway", + "gpt-4-1106-preview:swedencentral", + "gpt-4-1106-preview:uk", + "gpt-4-1106-preview:westus", + "gpt-4-1106-preview:westus3", + "gpt-4-0613:canadaeast", + "gpt-3.5-turbo-0125:canadaeast", + "gpt-3.5-turbo-0125:northcentralus", + "gpt-3.5-turbo-0125:southcentralus", + "gpt-3.5-turbo-1106:canadaeast", + "gpt-3.5-turbo-1106:westus", ], typing.Any, ] diff --git a/src/vapi/types/open_ai_model_prompt_cache_retention.py b/src/vapi/types/open_ai_model_prompt_cache_retention.py new file mode 100644 index 00000000..dbaac8ef --- /dev/null +++ b/src/vapi/types/open_ai_model_prompt_cache_retention.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +OpenAiModelPromptCacheRetention = typing.Union[typing.Literal["in_memory", "24h"], typing.Any] diff --git a/src/vapi/types/open_ai_model_tool_strict_compatibility_mode.py b/src/vapi/types/open_ai_model_tool_strict_compatibility_mode.py new file mode 100644 index 00000000..9012f571 --- /dev/null +++ b/src/vapi/types/open_ai_model_tool_strict_compatibility_mode.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +OpenAiModelToolStrictCompatibilityMode = typing.Union[ + typing.Literal["strip-parameters-with-unsupported-validation", "strip-unsupported-validation"], typing.Any +] diff --git a/src/vapi/types/open_ai_model_tools_item.py b/src/vapi/types/open_ai_model_tools_item.py index e9a35a7a..5454e758 100644 --- a/src/vapi/types/open_ai_model_tools_item.py +++ b/src/vapi/types/open_ai_model_tools_item.py @@ -1,20 +1,731 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .create_dtmf_tool_dto import CreateDtmfToolDto -from .create_end_call_tool_dto import CreateEndCallToolDto -from .create_voicemail_tool_dto import CreateVoicemailToolDto -from .create_function_tool_dto import CreateFunctionToolDto -from .create_ghl_tool_dto import CreateGhlToolDto -from .create_make_tool_dto import CreateMakeToolDto -from .create_transfer_call_tool_dto import CreateTransferCallToolDto - -OpenAiModelToolsItem = typing.Union[ - CreateDtmfToolDto, - CreateEndCallToolDto, - CreateVoicemailToolDto, - CreateFunctionToolDto, - CreateGhlToolDto, - CreateMakeToolDto, - CreateTransferCallToolDto, + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .backoff_plan import BackoffPlan +from .code_tool_environment_variable import CodeToolEnvironmentVariable +from .create_api_request_tool_dto_messages_item import CreateApiRequestToolDtoMessagesItem +from .create_api_request_tool_dto_method import CreateApiRequestToolDtoMethod +from .create_bash_tool_dto_messages_item import CreateBashToolDtoMessagesItem +from .create_bash_tool_dto_name import CreateBashToolDtoName +from .create_bash_tool_dto_sub_type import CreateBashToolDtoSubType +from .create_code_tool_dto_messages_item import CreateCodeToolDtoMessagesItem +from .create_computer_tool_dto_messages_item import CreateComputerToolDtoMessagesItem +from .create_computer_tool_dto_name import CreateComputerToolDtoName +from .create_computer_tool_dto_sub_type import CreateComputerToolDtoSubType +from .create_dtmf_tool_dto_messages_item import CreateDtmfToolDtoMessagesItem +from .create_end_call_tool_dto_messages_item import CreateEndCallToolDtoMessagesItem +from .create_function_tool_dto_messages_item import CreateFunctionToolDtoMessagesItem +from .create_go_high_level_calendar_availability_tool_dto_messages_item import ( + CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem, +) +from .create_go_high_level_calendar_event_create_tool_dto_messages_item import ( + CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_create_tool_dto_messages_item import ( + CreateGoHighLevelContactCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_get_tool_dto_messages_item import CreateGoHighLevelContactGetToolDtoMessagesItem +from .create_google_calendar_check_availability_tool_dto_messages_item import ( + CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem, +) +from .create_google_calendar_create_event_tool_dto_messages_item import ( + CreateGoogleCalendarCreateEventToolDtoMessagesItem, +) +from .create_google_sheets_row_append_tool_dto_messages_item import CreateGoogleSheetsRowAppendToolDtoMessagesItem +from .create_handoff_tool_dto_messages_item import CreateHandoffToolDtoMessagesItem +from .create_mcp_tool_dto_messages_item import CreateMcpToolDtoMessagesItem +from .create_query_tool_dto_messages_item import CreateQueryToolDtoMessagesItem +from .create_sip_request_tool_dto_body import CreateSipRequestToolDtoBody +from .create_sip_request_tool_dto_messages_item import CreateSipRequestToolDtoMessagesItem +from .create_sip_request_tool_dto_verb import CreateSipRequestToolDtoVerb +from .create_slack_send_message_tool_dto_messages_item import CreateSlackSendMessageToolDtoMessagesItem +from .create_sms_tool_dto_messages_item import CreateSmsToolDtoMessagesItem +from .create_text_editor_tool_dto_messages_item import CreateTextEditorToolDtoMessagesItem +from .create_text_editor_tool_dto_name import CreateTextEditorToolDtoName +from .create_text_editor_tool_dto_sub_type import CreateTextEditorToolDtoSubType +from .create_transfer_call_tool_dto_destinations_item import CreateTransferCallToolDtoDestinationsItem +from .create_transfer_call_tool_dto_messages_item import CreateTransferCallToolDtoMessagesItem +from .create_voicemail_tool_dto_messages_item import CreateVoicemailToolDtoMessagesItem +from .knowledge_base import KnowledgeBase +from .mcp_tool_messages import McpToolMessages +from .mcp_tool_metadata import McpToolMetadata +from .open_ai_function import OpenAiFunction +from .server import Server +from .tool_parameter import ToolParameter +from .tool_rejection_plan import ToolRejectionPlan +from .variable_extraction_plan import VariableExtractionPlan + + +class OpenAiModelToolsItem_ApiRequest(UncheckedBaseModel): + type: typing.Literal["apiRequest"] = "apiRequest" + messages: typing.Optional[typing.List[CreateApiRequestToolDtoMessagesItem]] = None + method: CreateApiRequestToolDtoMethod + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + encrypted_paths: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="encryptedPaths"), pydantic.Field(alias="encryptedPaths") + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + name: typing.Optional[str] = None + description: typing.Optional[str] = None + url: str + body: typing.Optional["JsonSchema"] = None + headers: typing.Optional["JsonSchema"] = None + backoff_plan: typing_extensions.Annotated[ + typing.Optional[BackoffPlan], FieldMetadata(alias="backoffPlan"), pydantic.Field(alias="backoffPlan") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class OpenAiModelToolsItem_Bash(UncheckedBaseModel): + type: typing.Literal["bash"] = "bash" + messages: typing.Optional[typing.List[CreateBashToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateBashToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateBashToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class OpenAiModelToolsItem_Code(UncheckedBaseModel): + type: typing.Literal["code"] = "code" + messages: typing.Optional[typing.List[CreateCodeToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + code: str + environment_variables: typing_extensions.Annotated[ + typing.Optional[typing.List[CodeToolEnvironmentVariable]], + FieldMetadata(alias="environmentVariables"), + pydantic.Field(alias="environmentVariables"), + ] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class OpenAiModelToolsItem_Computer(UncheckedBaseModel): + type: typing.Literal["computer"] = "computer" + messages: typing.Optional[typing.List[CreateComputerToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateComputerToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateComputerToolDtoName + display_width_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayWidthPx"), pydantic.Field(alias="displayWidthPx") + ] + display_height_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayHeightPx"), pydantic.Field(alias="displayHeightPx") + ] + display_number: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="displayNumber"), pydantic.Field(alias="displayNumber") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class OpenAiModelToolsItem_Dtmf(UncheckedBaseModel): + type: typing.Literal["dtmf"] = "dtmf" + messages: typing.Optional[typing.List[CreateDtmfToolDtoMessagesItem]] = None + sip_info_dtmf_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="sipInfoDtmfEnabled"), pydantic.Field(alias="sipInfoDtmfEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class OpenAiModelToolsItem_EndCall(UncheckedBaseModel): + type: typing.Literal["endCall"] = "endCall" + messages: typing.Optional[typing.List[CreateEndCallToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class OpenAiModelToolsItem_Function(UncheckedBaseModel): + type: typing.Literal["function"] = "function" + messages: typing.Optional[typing.List[CreateFunctionToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class OpenAiModelToolsItem_GohighlevelCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.availability.check"] = "gohighlevel.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class OpenAiModelToolsItem_GohighlevelCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.event.create"] = "gohighlevel.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class OpenAiModelToolsItem_GohighlevelContactCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.create"] = "gohighlevel.contact.create" + messages: typing.Optional[typing.List[CreateGoHighLevelContactCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class OpenAiModelToolsItem_GohighlevelContactGet(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.get"] = "gohighlevel.contact.get" + messages: typing.Optional[typing.List[CreateGoHighLevelContactGetToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class OpenAiModelToolsItem_GoogleCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["google.calendar.availability.check"] = "google.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class OpenAiModelToolsItem_GoogleCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["google.calendar.event.create"] = "google.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoogleCalendarCreateEventToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class OpenAiModelToolsItem_GoogleSheetsRowAppend(UncheckedBaseModel): + type: typing.Literal["google.sheets.row.append"] = "google.sheets.row.append" + messages: typing.Optional[typing.List[CreateGoogleSheetsRowAppendToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class OpenAiModelToolsItem_Handoff(UncheckedBaseModel): + type: typing.Literal["handoff"] = "handoff" + messages: typing.Optional[typing.List[CreateHandoffToolDtoMessagesItem]] = None + default_result: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="defaultResult"), pydantic.Field(alias="defaultResult") + ] = None + destinations: typing.Optional[typing.List["CreateHandoffToolDtoDestinationsItem"]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class OpenAiModelToolsItem_Mcp(UncheckedBaseModel): + type: typing.Literal["mcp"] = "mcp" + messages: typing.Optional[typing.List[CreateMcpToolDtoMessagesItem]] = None + server: typing.Optional[Server] = None + tool_messages: typing_extensions.Annotated[ + typing.Optional[typing.List[McpToolMessages]], + FieldMetadata(alias="toolMessages"), + pydantic.Field(alias="toolMessages"), + ] = None + metadata: typing.Optional[McpToolMetadata] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class OpenAiModelToolsItem_Query(UncheckedBaseModel): + type: typing.Literal["query"] = "query" + messages: typing.Optional[typing.List[CreateQueryToolDtoMessagesItem]] = None + knowledge_bases: typing_extensions.Annotated[ + typing.Optional[typing.List[KnowledgeBase]], + FieldMetadata(alias="knowledgeBases"), + pydantic.Field(alias="knowledgeBases"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class OpenAiModelToolsItem_SlackMessageSend(UncheckedBaseModel): + type: typing.Literal["slack.message.send"] = "slack.message.send" + messages: typing.Optional[typing.List[CreateSlackSendMessageToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class OpenAiModelToolsItem_Sms(UncheckedBaseModel): + type: typing.Literal["sms"] = "sms" + messages: typing.Optional[typing.List[CreateSmsToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class OpenAiModelToolsItem_TextEditor(UncheckedBaseModel): + type: typing.Literal["textEditor"] = "textEditor" + messages: typing.Optional[typing.List[CreateTextEditorToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateTextEditorToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateTextEditorToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class OpenAiModelToolsItem_TransferCall(UncheckedBaseModel): + type: typing.Literal["transferCall"] = "transferCall" + messages: typing.Optional[typing.List[CreateTransferCallToolDtoMessagesItem]] = None + destinations: typing.Optional[typing.List[CreateTransferCallToolDtoDestinationsItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class OpenAiModelToolsItem_SipRequest(UncheckedBaseModel): + type: typing.Literal["sipRequest"] = "sipRequest" + messages: typing.Optional[typing.List[CreateSipRequestToolDtoMessagesItem]] = None + verb: CreateSipRequestToolDtoVerb + headers: typing.Optional["JsonSchema"] = None + body: typing.Optional[CreateSipRequestToolDtoBody] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class OpenAiModelToolsItem_Voicemail(UncheckedBaseModel): + type: typing.Literal["voicemail"] = "voicemail" + messages: typing.Optional[typing.List[CreateVoicemailToolDtoMessagesItem]] = None + beep_detection_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="beepDetectionEnabled"), pydantic.Field(alias="beepDetectionEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +OpenAiModelToolsItem = typing_extensions.Annotated[ + typing.Union[ + OpenAiModelToolsItem_ApiRequest, + OpenAiModelToolsItem_Bash, + OpenAiModelToolsItem_Code, + OpenAiModelToolsItem_Computer, + OpenAiModelToolsItem_Dtmf, + OpenAiModelToolsItem_EndCall, + OpenAiModelToolsItem_Function, + OpenAiModelToolsItem_GohighlevelCalendarAvailabilityCheck, + OpenAiModelToolsItem_GohighlevelCalendarEventCreate, + OpenAiModelToolsItem_GohighlevelContactCreate, + OpenAiModelToolsItem_GohighlevelContactGet, + OpenAiModelToolsItem_GoogleCalendarAvailabilityCheck, + OpenAiModelToolsItem_GoogleCalendarEventCreate, + OpenAiModelToolsItem_GoogleSheetsRowAppend, + OpenAiModelToolsItem_Handoff, + OpenAiModelToolsItem_Mcp, + OpenAiModelToolsItem_Query, + OpenAiModelToolsItem_SlackMessageSend, + OpenAiModelToolsItem_Sms, + OpenAiModelToolsItem_TextEditor, + OpenAiModelToolsItem_TransferCall, + OpenAiModelToolsItem_SipRequest, + OpenAiModelToolsItem_Voicemail, + ], + UnionMetadata(discriminant="type"), ] +from .json_schema import JsonSchema # noqa: E402, I001 +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs(OpenAiModelToolsItem_ApiRequest, JsonSchema=JsonSchema) +update_forward_refs(OpenAiModelToolsItem_Bash) +update_forward_refs(OpenAiModelToolsItem_Code) +update_forward_refs(OpenAiModelToolsItem_Computer) +update_forward_refs(OpenAiModelToolsItem_Dtmf) +update_forward_refs(OpenAiModelToolsItem_EndCall) +update_forward_refs(OpenAiModelToolsItem_Function) +update_forward_refs(OpenAiModelToolsItem_GohighlevelCalendarAvailabilityCheck) +update_forward_refs(OpenAiModelToolsItem_GohighlevelCalendarEventCreate) +update_forward_refs(OpenAiModelToolsItem_GohighlevelContactCreate) +update_forward_refs(OpenAiModelToolsItem_GohighlevelContactGet) +update_forward_refs(OpenAiModelToolsItem_GoogleCalendarAvailabilityCheck) +update_forward_refs(OpenAiModelToolsItem_GoogleCalendarEventCreate) +update_forward_refs(OpenAiModelToolsItem_GoogleSheetsRowAppend) +update_forward_refs( + OpenAiModelToolsItem_Handoff, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs(OpenAiModelToolsItem_Mcp) +update_forward_refs(OpenAiModelToolsItem_Query) +update_forward_refs(OpenAiModelToolsItem_SlackMessageSend) +update_forward_refs(OpenAiModelToolsItem_Sms) +update_forward_refs(OpenAiModelToolsItem_TextEditor) +update_forward_refs(OpenAiModelToolsItem_TransferCall) +update_forward_refs(OpenAiModelToolsItem_SipRequest, JsonSchema=JsonSchema) +update_forward_refs(OpenAiModelToolsItem_Voicemail) diff --git a/src/vapi/types/open_ai_transcriber.py b/src/vapi/types/open_ai_transcriber.py new file mode 100644 index 00000000..82b52c22 --- /dev/null +++ b/src/vapi/types/open_ai_transcriber.py @@ -0,0 +1,42 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .fallback_transcriber_plan import FallbackTranscriberPlan +from .open_ai_transcriber_language import OpenAiTranscriberLanguage +from .open_ai_transcriber_model import OpenAiTranscriberModel + + +class OpenAiTranscriber(UncheckedBaseModel): + model: OpenAiTranscriberModel = pydantic.Field() + """ + This is the model that will be used for the transcription. + """ + + language: typing.Optional[OpenAiTranscriberLanguage] = pydantic.Field(default=None) + """ + This is the language that will be set for the transcription. + """ + + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field( + alias="fallbackPlan", + description="This is the plan for transcriber provider fallbacks in the event that the primary transcriber provider fails.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/open_ai_transcriber_language.py b/src/vapi/types/open_ai_transcriber_language.py new file mode 100644 index 00000000..db75fa40 --- /dev/null +++ b/src/vapi/types/open_ai_transcriber_language.py @@ -0,0 +1,66 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +OpenAiTranscriberLanguage = typing.Union[ + typing.Literal[ + "af", + "ar", + "hy", + "az", + "be", + "bs", + "bg", + "ca", + "zh", + "hr", + "cs", + "da", + "nl", + "en", + "et", + "fi", + "fr", + "gl", + "de", + "el", + "he", + "hi", + "hu", + "is", + "id", + "it", + "ja", + "kn", + "kk", + "ko", + "lv", + "lt", + "mk", + "ms", + "mr", + "mi", + "ne", + "no", + "fa", + "pl", + "pt", + "ro", + "ru", + "sr", + "sk", + "sl", + "es", + "sw", + "sv", + "tl", + "ta", + "th", + "tr", + "uk", + "ur", + "vi", + "cy", + ], + typing.Any, +] diff --git a/src/vapi/types/open_ai_transcriber_model.py b/src/vapi/types/open_ai_transcriber_model.py new file mode 100644 index 00000000..22c9a329 --- /dev/null +++ b/src/vapi/types/open_ai_transcriber_model.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +OpenAiTranscriberModel = typing.Union[typing.Literal["gpt-4o-transcribe", "gpt-4o-mini-transcribe"], typing.Any] diff --git a/src/vapi/types/open_ai_voice.py b/src/vapi/types/open_ai_voice.py index 5866ae41..eca89c95 100644 --- a/src/vapi/types/open_ai_voice.py +++ b/src/vapi/types/open_ai_voice.py @@ -1,33 +1,43 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions import typing -from ..core.serialization import FieldMetadata + import pydantic -from .open_ai_voice_id import OpenAiVoiceId -from .chunk_plan import ChunkPlan +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .chunk_plan import ChunkPlan +from .fallback_plan import FallbackPlan +from .open_ai_voice_id import OpenAiVoiceId +from .open_ai_voice_model import OpenAiVoiceModel -class OpenAiVoice(UniversalBaseModel): - filler_injection_enabled: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="fillerInjectionEnabled") - ] = pydantic.Field(default=None) - """ - This determines whether fillers are injected into the model output before inputting it into the voice provider. - - Default `false` because you can achieve better results with prompting the model. - """ - - provider: typing.Literal["openai"] = pydantic.Field(default="openai") +class OpenAiVoice(UncheckedBaseModel): + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="cachingEnabled"), + pydantic.Field( + alias="cachingEnabled", description="This is the flag to toggle voice caching for the assistant." + ), + ] = None + voice_id: typing_extensions.Annotated[ + OpenAiVoiceId, + FieldMetadata(alias="voiceId"), + pydantic.Field( + alias="voiceId", + description="This is the provider-specific ID that will be used.\nPlease note that ash, ballad, coral, sage, and verse may only be used with realtime models.", + ), + ] + model: typing.Optional[OpenAiVoiceModel] = pydantic.Field(default=None) """ - This is the voice provider that will be used. + This is the model that will be used for text-to-speech. """ - voice_id: typing_extensions.Annotated[OpenAiVoiceId, FieldMetadata(alias="voiceId")] = pydantic.Field() + instructions: typing.Optional[str] = pydantic.Field(default=None) """ - This is the provider-specific ID that will be used. + This is a prompt that allows you to control the voice of your generated audio. + Does not work with 'tts-1' or 'tts-1-hd' models. """ speed: typing.Optional[float] = pydantic.Field(default=None) @@ -35,12 +45,22 @@ class OpenAiVoice(UniversalBaseModel): This is the speed multiplier that will be used. """ - chunk_plan: typing_extensions.Annotated[typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan")] = ( - pydantic.Field(default=None) - ) - """ - This is the plan for chunking the model output before it is sent to the voice provider. - """ + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], + FieldMetadata(alias="chunkPlan"), + pydantic.Field( + alias="chunkPlan", + description="This is the plan for chunking the model output before it is sent to the voice provider.", + ), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field( + alias="fallbackPlan", + description="This is the plan for voice provider fallbacks in the event that the primary voice provider fails.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/open_ai_voice_id.py b/src/vapi/types/open_ai_voice_id.py index 595f3277..30116d83 100644 --- a/src/vapi/types/open_ai_voice_id.py +++ b/src/vapi/types/open_ai_voice_id.py @@ -2,4 +2,6 @@ import typing -OpenAiVoiceId = typing.Union[typing.Literal["alloy", "echo", "fable", "onyx", "nova", "shimmer"], typing.Any] +from .open_ai_voice_id_enum import OpenAiVoiceIdEnum + +OpenAiVoiceId = typing.Union[OpenAiVoiceIdEnum, str] diff --git a/src/vapi/types/open_ai_voice_id_enum.py b/src/vapi/types/open_ai_voice_id_enum.py new file mode 100644 index 00000000..b9fb28b9 --- /dev/null +++ b/src/vapi/types/open_ai_voice_id_enum.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +OpenAiVoiceIdEnum = typing.Union[ + typing.Literal["alloy", "echo", "fable", "onyx", "nova", "shimmer", "marin", "cedar"], typing.Any +] diff --git a/src/vapi/types/open_ai_voice_model.py b/src/vapi/types/open_ai_voice_model.py new file mode 100644 index 00000000..2375c827 --- /dev/null +++ b/src/vapi/types/open_ai_voice_model.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +OpenAiVoiceModel = typing.Union[typing.Literal["tts-1", "tts-1-hd", "gpt-4o-mini-tts"], typing.Any] diff --git a/src/vapi/types/open_ai_voicemail_detection_plan.py b/src/vapi/types/open_ai_voicemail_detection_plan.py new file mode 100644 index 00000000..cdc9f248 --- /dev/null +++ b/src/vapi/types/open_ai_voicemail_detection_plan.py @@ -0,0 +1,49 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .open_ai_voicemail_detection_plan_provider import OpenAiVoicemailDetectionPlanProvider +from .open_ai_voicemail_detection_plan_type import OpenAiVoicemailDetectionPlanType +from .voicemail_detection_backoff_plan import VoicemailDetectionBackoffPlan + + +class OpenAiVoicemailDetectionPlan(UncheckedBaseModel): + beep_max_await_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="beepMaxAwaitSeconds"), + pydantic.Field( + alias="beepMaxAwaitSeconds", + description="This is the maximum duration from the start of the call that we will wait for a voicemail beep, before speaking our message\n\n- If we detect a voicemail beep before this, we will speak the message at that point.\n\n- Setting too low a value means that the bot will start speaking its voicemail message too early. If it does so before the actual beep, it will get cut off. You should definitely tune this to your use case.\n\n@default 30\n@min 0\n@max 60", + ), + ] = None + provider: OpenAiVoicemailDetectionPlanProvider = pydantic.Field() + """ + This is the provider to use for voicemail detection. + """ + + backoff_plan: typing_extensions.Annotated[ + typing.Optional[VoicemailDetectionBackoffPlan], + FieldMetadata(alias="backoffPlan"), + pydantic.Field(alias="backoffPlan", description="This is the backoff plan for the voicemail detection."), + ] = None + type: typing.Optional[OpenAiVoicemailDetectionPlanType] = pydantic.Field(default=None) + """ + This is the detection type to use for voicemail detection. + - 'audio': Uses native audio models (default) + - 'transcript': Uses ASR/transcript-based detection + @default 'audio' (audio detection) + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/open_ai_voicemail_detection_plan_provider.py b/src/vapi/types/open_ai_voicemail_detection_plan_provider.py new file mode 100644 index 00000000..8412668e --- /dev/null +++ b/src/vapi/types/open_ai_voicemail_detection_plan_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +OpenAiVoicemailDetectionPlanProvider = typing.Union[typing.Literal["openai"], typing.Any] diff --git a/src/vapi/types/open_ai_voicemail_detection_plan_type.py b/src/vapi/types/open_ai_voicemail_detection_plan_type.py new file mode 100644 index 00000000..e472c897 --- /dev/null +++ b/src/vapi/types/open_ai_voicemail_detection_plan_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +OpenAiVoicemailDetectionPlanType = typing.Union[typing.Literal["audio", "transcript"], typing.Any] diff --git a/src/vapi/types/open_ai_web_chat_request.py b/src/vapi/types/open_ai_web_chat_request.py new file mode 100644 index 00000000..cbc96161 --- /dev/null +++ b/src/vapi/types/open_ai_web_chat_request.py @@ -0,0 +1,208 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .chat_assistant_overrides import ChatAssistantOverrides +from .create_web_customer_dto import CreateWebCustomerDto +from .open_ai_web_chat_request_input import OpenAiWebChatRequestInput + + +class OpenAiWebChatRequest(UncheckedBaseModel): + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assistantId"), + pydantic.Field( + alias="assistantId", + description="This is the assistant ID to use for this chat. To use a transient assistant, use `assistant` instead.", + ), + ] = None + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) + """ + This is the transient assistant configuration for this chat. To use an existing assistant, use `assistantId` instead. + """ + + session_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="sessionId"), + pydantic.Field( + alias="sessionId", + description="This is the ID of the session that will be used for the chat.\nIf provided, the conversation will continue from the previous state.\nIf not provided or expired, a new session will be created.", + ), + ] = None + session_expiration_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="sessionExpirationSeconds"), + pydantic.Field( + alias="sessionExpirationSeconds", + description="This is the expiration time for the session. This can ONLY be set if starting a new chat and therefore a new session is created.\nIf session already exists, this will be ignored and NOT be updated for the existing session. Use PATCH /session/:id to update the session expiration time.", + ), + ] = None + assistant_overrides: typing_extensions.Annotated[ + typing.Optional[ChatAssistantOverrides], + FieldMetadata(alias="assistantOverrides"), + pydantic.Field( + alias="assistantOverrides", + description="These are the variable values that will be used to replace template variables in the assistant messages.\nOnly variable substitution is supported in web chat - other assistant properties cannot be overridden.", + ), + ] = None + customer: typing.Optional[CreateWebCustomerDto] = pydantic.Field(default=None) + """ + This is the customer information for the chat. + Used to automatically manage sessions for repeat customers. + """ + + input: OpenAiWebChatRequestInput = pydantic.Field() + """ + This is the input text for the chat. + Can be a string or an array of chat messages. + """ + + stream: typing.Optional[bool] = pydantic.Field(default=None) + """ + Whether to stream the response or not. + """ + + session_end: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="sessionEnd"), + pydantic.Field( + alias="sessionEnd", + description="This is a flag to indicate end of session. When true, the session will be marked as completed and the chat will be ended.\nUsed to end session to send End-of-session report to the customer.\nWhen flag is set to true, any messages sent will not be processed and session will directly be marked as completed.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + OpenAiWebChatRequest, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/open_ai_web_chat_request_input.py b/src/vapi/types/open_ai_web_chat_request_input.py new file mode 100644 index 00000000..2eaba604 --- /dev/null +++ b/src/vapi/types/open_ai_web_chat_request_input.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .open_ai_web_chat_request_input_one_item import OpenAiWebChatRequestInputOneItem + +OpenAiWebChatRequestInput = typing.Union[str, typing.List[OpenAiWebChatRequestInputOneItem]] diff --git a/src/vapi/types/open_ai_web_chat_request_input_one_item.py b/src/vapi/types/open_ai_web_chat_request_input_one_item.py new file mode 100644 index 00000000..01bfde96 --- /dev/null +++ b/src/vapi/types/open_ai_web_chat_request_input_one_item.py @@ -0,0 +1,13 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .assistant_message import AssistantMessage +from .developer_message import DeveloperMessage +from .system_message import SystemMessage +from .tool_message import ToolMessage +from .user_message import UserMessage + +OpenAiWebChatRequestInputOneItem = typing.Union[ + SystemMessage, UserMessage, AssistantMessage, ToolMessage, DeveloperMessage +] diff --git a/src/vapi/types/open_router_credential.py b/src/vapi/types/open_router_credential.py index fb8650ae..543979c2 100644 --- a/src/vapi/types/open_router_credential.py +++ b/src/vapi/types/open_router_credential.py @@ -1,39 +1,53 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +import datetime as dt import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic -import datetime as dt +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .open_router_credential_provider import OpenRouterCredentialProvider -class OpenRouterCredential(UniversalBaseModel): - provider: typing.Literal["openrouter"] = "openrouter" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() - """ - This is not returned in the API. - """ - +class OpenRouterCredential(UncheckedBaseModel): + provider: OpenRouterCredentialProvider + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] id: str = pydantic.Field() """ This is the unique identifier for the credential. """ - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field() - """ - This is the unique identifier for the org that this credential belongs to. - """ - - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the credential was created. - """ - - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the assistant was last updated. + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/open_router_credential_provider.py b/src/vapi/types/open_router_credential_provider.py new file mode 100644 index 00000000..836549e0 --- /dev/null +++ b/src/vapi/types/open_router_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +OpenRouterCredentialProvider = typing.Union[typing.Literal["openrouter"], typing.Any] diff --git a/src/vapi/types/open_router_model.py b/src/vapi/types/open_router_model.py index 3ea19268..3f4faaf5 100644 --- a/src/vapi/types/open_router_model.py +++ b/src/vapi/types/open_router_model.py @@ -1,39 +1,44 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +from __future__ import annotations + import typing -from .open_ai_message import OpenAiMessage + import pydantic -from .open_router_model_tools_item import OpenRouterModelToolsItem import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.serialization import FieldMetadata -from .knowledge_base import KnowledgeBase -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_custom_knowledge_base_dto import CreateCustomKnowledgeBaseDto +from .open_ai_message import OpenAiMessage -class OpenRouterModel(UniversalBaseModel): +class OpenRouterModel(UncheckedBaseModel): messages: typing.Optional[typing.List[OpenAiMessage]] = pydantic.Field(default=None) """ This is the starting state for the conversation. """ - tools: typing.Optional[typing.List[OpenRouterModelToolsItem]] = pydantic.Field(default=None) + tools: typing.Optional[typing.List["OpenRouterModelToolsItem"]] = pydantic.Field(default=None) """ These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`. Both `tools` and `toolIds` can be used together. """ - tool_ids: typing_extensions.Annotated[typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds")] = ( - pydantic.Field(default=None) - ) - """ - These are the tools that the assistant can use during the call. To use transient tools, use `tools`. - - Both `tools` and `toolIds` can be used together. - """ - - provider: typing.Literal["openrouter"] = "openrouter" + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="toolIds"), + pydantic.Field( + alias="toolIds", + description="These are the tools that the assistant can use during the call. To use transient tools, use `tools`.\n\nBoth `tools` and `toolIds` can be used together.", + ), + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase", description="These are the options for the knowledge base."), + ] = None model: str = pydantic.Field() """ This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b @@ -44,41 +49,30 @@ class OpenRouterModel(UniversalBaseModel): This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency. """ - knowledge_base: typing_extensions.Annotated[ - typing.Optional[KnowledgeBase], FieldMetadata(alias="knowledgeBase") - ] = pydantic.Field(default=None) - """ - These are the options for the knowledge base. - """ - - max_tokens: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="maxTokens")] = pydantic.Field( - default=None - ) - """ - This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250. - """ - + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="maxTokens"), + pydantic.Field( + alias="maxTokens", + description="This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.", + ), + ] = None emotion_recognition_enabled: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="emotionRecognitionEnabled") - ] = pydantic.Field(default=None) - """ - This determines whether we detect user's emotion while they speak and send it as an additional info to model. - - Default `false` because the model is usually are good at understanding the user's emotion from text. - - @default false - """ - - num_fast_turns: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="numFastTurns")] = ( - pydantic.Field(default=None) - ) - """ - This sets how many turns at the start of the conversation to use a smaller, faster model from the same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai. - - Default is 0. - - @default 0 - """ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field( + alias="emotionRecognitionEnabled", + description="This determines whether we detect user's emotion while they speak and send it as an additional info to model.\n\nDefault `false` because the model is usually are good at understanding the user's emotion from text.\n\n@default false", + ), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="numFastTurns"), + pydantic.Field( + alias="numFastTurns", + description="This sets how many turns at the start of the conversation to use a smaller, faster model from the same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai.\n\nDefault is 0.\n\n@default 0", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -88,3 +82,121 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + OpenRouterModel, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/open_router_model_tools_item.py b/src/vapi/types/open_router_model_tools_item.py index c168abb9..daff7ba6 100644 --- a/src/vapi/types/open_router_model_tools_item.py +++ b/src/vapi/types/open_router_model_tools_item.py @@ -1,20 +1,731 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .create_dtmf_tool_dto import CreateDtmfToolDto -from .create_end_call_tool_dto import CreateEndCallToolDto -from .create_voicemail_tool_dto import CreateVoicemailToolDto -from .create_function_tool_dto import CreateFunctionToolDto -from .create_ghl_tool_dto import CreateGhlToolDto -from .create_make_tool_dto import CreateMakeToolDto -from .create_transfer_call_tool_dto import CreateTransferCallToolDto - -OpenRouterModelToolsItem = typing.Union[ - CreateDtmfToolDto, - CreateEndCallToolDto, - CreateVoicemailToolDto, - CreateFunctionToolDto, - CreateGhlToolDto, - CreateMakeToolDto, - CreateTransferCallToolDto, + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .backoff_plan import BackoffPlan +from .code_tool_environment_variable import CodeToolEnvironmentVariable +from .create_api_request_tool_dto_messages_item import CreateApiRequestToolDtoMessagesItem +from .create_api_request_tool_dto_method import CreateApiRequestToolDtoMethod +from .create_bash_tool_dto_messages_item import CreateBashToolDtoMessagesItem +from .create_bash_tool_dto_name import CreateBashToolDtoName +from .create_bash_tool_dto_sub_type import CreateBashToolDtoSubType +from .create_code_tool_dto_messages_item import CreateCodeToolDtoMessagesItem +from .create_computer_tool_dto_messages_item import CreateComputerToolDtoMessagesItem +from .create_computer_tool_dto_name import CreateComputerToolDtoName +from .create_computer_tool_dto_sub_type import CreateComputerToolDtoSubType +from .create_dtmf_tool_dto_messages_item import CreateDtmfToolDtoMessagesItem +from .create_end_call_tool_dto_messages_item import CreateEndCallToolDtoMessagesItem +from .create_function_tool_dto_messages_item import CreateFunctionToolDtoMessagesItem +from .create_go_high_level_calendar_availability_tool_dto_messages_item import ( + CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem, +) +from .create_go_high_level_calendar_event_create_tool_dto_messages_item import ( + CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_create_tool_dto_messages_item import ( + CreateGoHighLevelContactCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_get_tool_dto_messages_item import CreateGoHighLevelContactGetToolDtoMessagesItem +from .create_google_calendar_check_availability_tool_dto_messages_item import ( + CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem, +) +from .create_google_calendar_create_event_tool_dto_messages_item import ( + CreateGoogleCalendarCreateEventToolDtoMessagesItem, +) +from .create_google_sheets_row_append_tool_dto_messages_item import CreateGoogleSheetsRowAppendToolDtoMessagesItem +from .create_handoff_tool_dto_messages_item import CreateHandoffToolDtoMessagesItem +from .create_mcp_tool_dto_messages_item import CreateMcpToolDtoMessagesItem +from .create_query_tool_dto_messages_item import CreateQueryToolDtoMessagesItem +from .create_sip_request_tool_dto_body import CreateSipRequestToolDtoBody +from .create_sip_request_tool_dto_messages_item import CreateSipRequestToolDtoMessagesItem +from .create_sip_request_tool_dto_verb import CreateSipRequestToolDtoVerb +from .create_slack_send_message_tool_dto_messages_item import CreateSlackSendMessageToolDtoMessagesItem +from .create_sms_tool_dto_messages_item import CreateSmsToolDtoMessagesItem +from .create_text_editor_tool_dto_messages_item import CreateTextEditorToolDtoMessagesItem +from .create_text_editor_tool_dto_name import CreateTextEditorToolDtoName +from .create_text_editor_tool_dto_sub_type import CreateTextEditorToolDtoSubType +from .create_transfer_call_tool_dto_destinations_item import CreateTransferCallToolDtoDestinationsItem +from .create_transfer_call_tool_dto_messages_item import CreateTransferCallToolDtoMessagesItem +from .create_voicemail_tool_dto_messages_item import CreateVoicemailToolDtoMessagesItem +from .knowledge_base import KnowledgeBase +from .mcp_tool_messages import McpToolMessages +from .mcp_tool_metadata import McpToolMetadata +from .open_ai_function import OpenAiFunction +from .server import Server +from .tool_parameter import ToolParameter +from .tool_rejection_plan import ToolRejectionPlan +from .variable_extraction_plan import VariableExtractionPlan + + +class OpenRouterModelToolsItem_ApiRequest(UncheckedBaseModel): + type: typing.Literal["apiRequest"] = "apiRequest" + messages: typing.Optional[typing.List[CreateApiRequestToolDtoMessagesItem]] = None + method: CreateApiRequestToolDtoMethod + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + encrypted_paths: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="encryptedPaths"), pydantic.Field(alias="encryptedPaths") + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + name: typing.Optional[str] = None + description: typing.Optional[str] = None + url: str + body: typing.Optional["JsonSchema"] = None + headers: typing.Optional["JsonSchema"] = None + backoff_plan: typing_extensions.Annotated[ + typing.Optional[BackoffPlan], FieldMetadata(alias="backoffPlan"), pydantic.Field(alias="backoffPlan") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class OpenRouterModelToolsItem_Bash(UncheckedBaseModel): + type: typing.Literal["bash"] = "bash" + messages: typing.Optional[typing.List[CreateBashToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateBashToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateBashToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class OpenRouterModelToolsItem_Code(UncheckedBaseModel): + type: typing.Literal["code"] = "code" + messages: typing.Optional[typing.List[CreateCodeToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + code: str + environment_variables: typing_extensions.Annotated[ + typing.Optional[typing.List[CodeToolEnvironmentVariable]], + FieldMetadata(alias="environmentVariables"), + pydantic.Field(alias="environmentVariables"), + ] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class OpenRouterModelToolsItem_Computer(UncheckedBaseModel): + type: typing.Literal["computer"] = "computer" + messages: typing.Optional[typing.List[CreateComputerToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateComputerToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateComputerToolDtoName + display_width_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayWidthPx"), pydantic.Field(alias="displayWidthPx") + ] + display_height_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayHeightPx"), pydantic.Field(alias="displayHeightPx") + ] + display_number: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="displayNumber"), pydantic.Field(alias="displayNumber") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class OpenRouterModelToolsItem_Dtmf(UncheckedBaseModel): + type: typing.Literal["dtmf"] = "dtmf" + messages: typing.Optional[typing.List[CreateDtmfToolDtoMessagesItem]] = None + sip_info_dtmf_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="sipInfoDtmfEnabled"), pydantic.Field(alias="sipInfoDtmfEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class OpenRouterModelToolsItem_EndCall(UncheckedBaseModel): + type: typing.Literal["endCall"] = "endCall" + messages: typing.Optional[typing.List[CreateEndCallToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class OpenRouterModelToolsItem_Function(UncheckedBaseModel): + type: typing.Literal["function"] = "function" + messages: typing.Optional[typing.List[CreateFunctionToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class OpenRouterModelToolsItem_GohighlevelCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.availability.check"] = "gohighlevel.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class OpenRouterModelToolsItem_GohighlevelCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.event.create"] = "gohighlevel.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class OpenRouterModelToolsItem_GohighlevelContactCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.create"] = "gohighlevel.contact.create" + messages: typing.Optional[typing.List[CreateGoHighLevelContactCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class OpenRouterModelToolsItem_GohighlevelContactGet(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.get"] = "gohighlevel.contact.get" + messages: typing.Optional[typing.List[CreateGoHighLevelContactGetToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class OpenRouterModelToolsItem_GoogleCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["google.calendar.availability.check"] = "google.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class OpenRouterModelToolsItem_GoogleCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["google.calendar.event.create"] = "google.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoogleCalendarCreateEventToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class OpenRouterModelToolsItem_GoogleSheetsRowAppend(UncheckedBaseModel): + type: typing.Literal["google.sheets.row.append"] = "google.sheets.row.append" + messages: typing.Optional[typing.List[CreateGoogleSheetsRowAppendToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class OpenRouterModelToolsItem_Handoff(UncheckedBaseModel): + type: typing.Literal["handoff"] = "handoff" + messages: typing.Optional[typing.List[CreateHandoffToolDtoMessagesItem]] = None + default_result: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="defaultResult"), pydantic.Field(alias="defaultResult") + ] = None + destinations: typing.Optional[typing.List["CreateHandoffToolDtoDestinationsItem"]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class OpenRouterModelToolsItem_Mcp(UncheckedBaseModel): + type: typing.Literal["mcp"] = "mcp" + messages: typing.Optional[typing.List[CreateMcpToolDtoMessagesItem]] = None + server: typing.Optional[Server] = None + tool_messages: typing_extensions.Annotated[ + typing.Optional[typing.List[McpToolMessages]], + FieldMetadata(alias="toolMessages"), + pydantic.Field(alias="toolMessages"), + ] = None + metadata: typing.Optional[McpToolMetadata] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class OpenRouterModelToolsItem_Query(UncheckedBaseModel): + type: typing.Literal["query"] = "query" + messages: typing.Optional[typing.List[CreateQueryToolDtoMessagesItem]] = None + knowledge_bases: typing_extensions.Annotated[ + typing.Optional[typing.List[KnowledgeBase]], + FieldMetadata(alias="knowledgeBases"), + pydantic.Field(alias="knowledgeBases"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class OpenRouterModelToolsItem_SlackMessageSend(UncheckedBaseModel): + type: typing.Literal["slack.message.send"] = "slack.message.send" + messages: typing.Optional[typing.List[CreateSlackSendMessageToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class OpenRouterModelToolsItem_Sms(UncheckedBaseModel): + type: typing.Literal["sms"] = "sms" + messages: typing.Optional[typing.List[CreateSmsToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class OpenRouterModelToolsItem_TextEditor(UncheckedBaseModel): + type: typing.Literal["textEditor"] = "textEditor" + messages: typing.Optional[typing.List[CreateTextEditorToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateTextEditorToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateTextEditorToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class OpenRouterModelToolsItem_TransferCall(UncheckedBaseModel): + type: typing.Literal["transferCall"] = "transferCall" + messages: typing.Optional[typing.List[CreateTransferCallToolDtoMessagesItem]] = None + destinations: typing.Optional[typing.List[CreateTransferCallToolDtoDestinationsItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class OpenRouterModelToolsItem_SipRequest(UncheckedBaseModel): + type: typing.Literal["sipRequest"] = "sipRequest" + messages: typing.Optional[typing.List[CreateSipRequestToolDtoMessagesItem]] = None + verb: CreateSipRequestToolDtoVerb + headers: typing.Optional["JsonSchema"] = None + body: typing.Optional[CreateSipRequestToolDtoBody] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class OpenRouterModelToolsItem_Voicemail(UncheckedBaseModel): + type: typing.Literal["voicemail"] = "voicemail" + messages: typing.Optional[typing.List[CreateVoicemailToolDtoMessagesItem]] = None + beep_detection_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="beepDetectionEnabled"), pydantic.Field(alias="beepDetectionEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +OpenRouterModelToolsItem = typing_extensions.Annotated[ + typing.Union[ + OpenRouterModelToolsItem_ApiRequest, + OpenRouterModelToolsItem_Bash, + OpenRouterModelToolsItem_Code, + OpenRouterModelToolsItem_Computer, + OpenRouterModelToolsItem_Dtmf, + OpenRouterModelToolsItem_EndCall, + OpenRouterModelToolsItem_Function, + OpenRouterModelToolsItem_GohighlevelCalendarAvailabilityCheck, + OpenRouterModelToolsItem_GohighlevelCalendarEventCreate, + OpenRouterModelToolsItem_GohighlevelContactCreate, + OpenRouterModelToolsItem_GohighlevelContactGet, + OpenRouterModelToolsItem_GoogleCalendarAvailabilityCheck, + OpenRouterModelToolsItem_GoogleCalendarEventCreate, + OpenRouterModelToolsItem_GoogleSheetsRowAppend, + OpenRouterModelToolsItem_Handoff, + OpenRouterModelToolsItem_Mcp, + OpenRouterModelToolsItem_Query, + OpenRouterModelToolsItem_SlackMessageSend, + OpenRouterModelToolsItem_Sms, + OpenRouterModelToolsItem_TextEditor, + OpenRouterModelToolsItem_TransferCall, + OpenRouterModelToolsItem_SipRequest, + OpenRouterModelToolsItem_Voicemail, + ], + UnionMetadata(discriminant="type"), ] +from .json_schema import JsonSchema # noqa: E402, I001 +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs(OpenRouterModelToolsItem_ApiRequest, JsonSchema=JsonSchema) +update_forward_refs(OpenRouterModelToolsItem_Bash) +update_forward_refs(OpenRouterModelToolsItem_Code) +update_forward_refs(OpenRouterModelToolsItem_Computer) +update_forward_refs(OpenRouterModelToolsItem_Dtmf) +update_forward_refs(OpenRouterModelToolsItem_EndCall) +update_forward_refs(OpenRouterModelToolsItem_Function) +update_forward_refs(OpenRouterModelToolsItem_GohighlevelCalendarAvailabilityCheck) +update_forward_refs(OpenRouterModelToolsItem_GohighlevelCalendarEventCreate) +update_forward_refs(OpenRouterModelToolsItem_GohighlevelContactCreate) +update_forward_refs(OpenRouterModelToolsItem_GohighlevelContactGet) +update_forward_refs(OpenRouterModelToolsItem_GoogleCalendarAvailabilityCheck) +update_forward_refs(OpenRouterModelToolsItem_GoogleCalendarEventCreate) +update_forward_refs(OpenRouterModelToolsItem_GoogleSheetsRowAppend) +update_forward_refs( + OpenRouterModelToolsItem_Handoff, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs(OpenRouterModelToolsItem_Mcp) +update_forward_refs(OpenRouterModelToolsItem_Query) +update_forward_refs(OpenRouterModelToolsItem_SlackMessageSend) +update_forward_refs(OpenRouterModelToolsItem_Sms) +update_forward_refs(OpenRouterModelToolsItem_TextEditor) +update_forward_refs(OpenRouterModelToolsItem_TransferCall) +update_forward_refs(OpenRouterModelToolsItem_SipRequest, JsonSchema=JsonSchema) +update_forward_refs(OpenRouterModelToolsItem_Voicemail) diff --git a/src/vapi/types/org.py b/src/vapi/types/org.py index 2b7fc661..f01d044e 100644 --- a/src/vapi/types/org.py +++ b/src/vapi/types/org.py @@ -1,114 +1,135 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions +import datetime as dt import typing -from ..core.serialization import FieldMetadata + import pydantic -import datetime as dt -from .org_plan import OrgPlan +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 - - -class Org(UniversalBaseModel): - hipaa_enabled: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="hipaaEnabled")] = ( - pydantic.Field(default=None) - ) - """ - When this is enabled, no logs, recordings, or transcriptions will be stored. At the end of the call, you will still receive an end-of-call-report message to store on your server. Defaults to false. - When HIPAA is enabled, only OpenAI/Custom LLM or Azure Providers will be available for LLM and Voice respectively. - This is due to the compliance requirements of HIPAA. Other providers may not meet these requirements. - """ - +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .compliance_plan import CompliancePlan +from .org_channel import OrgChannel +from .server import Server +from .subscription import Subscription + + +class Org(UncheckedBaseModel): + hipaa_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="hipaaEnabled"), + pydantic.Field( + alias="hipaaEnabled", + description="When this is enabled, logs, recordings, and transcriptions will be stored in HIPAA-compliant storage. Defaults to false.\nWhen HIPAA is enabled, only HIPAA-compliant providers will be available for LLM, Voice, and Transcriber respectively.\nThis is due to the compliance requirements of HIPAA. Other providers may not meet these requirements.", + ), + ] = None + subscription: typing.Optional[Subscription] = None + subscription_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="subscriptionId"), + pydantic.Field(alias="subscriptionId", description="This is the ID of the subscription the org belongs to."), + ] = None id: str = pydantic.Field() """ This is the unique identifier for the org. """ - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the org was created. - """ - - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the org was last updated. - """ - - stripe_customer_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="stripeCustomerId")] = ( - pydantic.Field(default=None) - ) - """ - This is the Stripe customer for the org. - """ - + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the org was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", description="This is the ISO 8601 date-time string of when the org was last updated." + ), + ] stripe_subscription_id: typing_extensions.Annotated[ - typing.Optional[str], FieldMetadata(alias="stripeSubscriptionId") - ] = pydantic.Field(default=None) - """ - This is the subscription for the org. - """ - + typing.Optional[str], + FieldMetadata(alias="stripeSubscriptionId"), + pydantic.Field(alias="stripeSubscriptionId", description="This is the subscription for the org."), + ] = None stripe_subscription_item_id: typing_extensions.Annotated[ - typing.Optional[str], FieldMetadata(alias="stripeSubscriptionItemId") - ] = pydantic.Field(default=None) - """ - This is the subscription's subscription item. - """ - + typing.Optional[str], + FieldMetadata(alias="stripeSubscriptionItemId"), + pydantic.Field(alias="stripeSubscriptionItemId", description="This is the subscription's subscription item."), + ] = None stripe_subscription_current_period_start: typing_extensions.Annotated[ - typing.Optional[dt.datetime], FieldMetadata(alias="stripeSubscriptionCurrentPeriodStart") - ] = pydantic.Field(default=None) - """ - This is the subscription's current period start. - """ - + typing.Optional[dt.datetime], + FieldMetadata(alias="stripeSubscriptionCurrentPeriodStart"), + pydantic.Field( + alias="stripeSubscriptionCurrentPeriodStart", description="This is the subscription's current period start." + ), + ] = None stripe_subscription_status: typing_extensions.Annotated[ - typing.Optional[str], FieldMetadata(alias="stripeSubscriptionStatus") - ] = pydantic.Field(default=None) - """ - This is the subscription's status. - """ - - plan: typing.Optional[OrgPlan] = pydantic.Field(default=None) - """ - This is the plan for the org. - """ - + typing.Optional[str], + FieldMetadata(alias="stripeSubscriptionStatus"), + pydantic.Field(alias="stripeSubscriptionStatus", description="This is the subscription's status."), + ] = None + jwt_secret: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="jwtSecret"), + pydantic.Field( + alias="jwtSecret", description="This is the secret key used for signing JWT tokens for the org." + ), + ] = None + minutes_used: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minutesUsed"), + pydantic.Field( + alias="minutesUsed", + description="This is the total number of call minutes used by this org across all time.", + ), + ] = None name: typing.Optional[str] = pydantic.Field(default=None) """ This is the name of the org. This is just for your own reference. """ - billing_limit: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="billingLimit")] = ( - pydantic.Field(default=None) - ) + channel: typing.Optional[OrgChannel] = pydantic.Field(default=None) """ - This is the monthly billing limit for the org. To go beyond $1000/mo, please contact us at support@vapi.ai. + This is the channel of the org. There is the cluster the API traffic for the org will be directed. """ - server_url: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="serverUrl")] = pydantic.Field( - default=None - ) + billing_limit: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="billingLimit"), + pydantic.Field( + alias="billingLimit", + description="This is the monthly billing limit for the org. To go beyond $1000/mo, please contact us at support@vapi.ai.", + ), + ] = None + server: typing.Optional[Server] = pydantic.Field(default=None) """ - This is the URL Vapi will communicate with via HTTP GET and POST Requests. This is used for retrieving context, function calling, and end-of-call reports. + This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema. - All requests will be sent with the call object among other things relevant to that message. You can find more details in the Server URL documentation. - """ - - server_url_secret: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="serverUrlSecret")] = ( - pydantic.Field(default=None) - ) - """ - This is the secret you can set that Vapi will send with every request to your server. Will be sent as a header called x-vapi-secret. - """ - - concurrency_limit: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="concurrencyLimit")] = ( - pydantic.Field(default=None) - ) - """ - This is the concurrency limit for the org. This is the maximum number of calls that can be active at any given time. To go beyond 10, please contact us at support@vapi.ai. - """ + The order of precedence is: + + 1. assistant.server + 2. phoneNumber.server + 3. org.server + """ + + concurrency_limit: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="concurrencyLimit"), + pydantic.Field( + alias="concurrencyLimit", + description="This is the concurrency limit for the org. This is the maximum number of calls that can be active at any given time. To go beyond 10, please contact us at support@vapi.ai.", + ), + ] = None + compliance_plan: typing_extensions.Annotated[ + typing.Optional[CompliancePlan], + FieldMetadata(alias="compliancePlan"), + pydantic.Field( + alias="compliancePlan", + description="Stores the information about the compliance plan enforced at the organization level. Currently pciEnabled is supported through this field.\nWhen this is enabled, any logs, recordings, or transcriptions will be shipped to the customer endpoints if provided else lost.\nAt the end of the call, you will receive an end-of-call-report message to store on your server, if webhook is provided.\nDefaults to false.\nWhen PCI is enabled, only PCI-compliant Providers will be available for LLM, Voice and transcribers.\nThis is due to the compliance requirements of PCI. Other providers may not meet these requirements.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/org_channel.py b/src/vapi/types/org_channel.py new file mode 100644 index 00000000..06ff88d3 --- /dev/null +++ b/src/vapi/types/org_channel.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +OrgChannel = typing.Union[typing.Literal["daily", "default", "weekly", "intuit", "hcs"], typing.Any] diff --git a/src/vapi/types/output_tool.py b/src/vapi/types/output_tool.py index baed9c55..c5368e99 100644 --- a/src/vapi/types/output_tool.py +++ b/src/vapi/types/output_tool.py @@ -1,31 +1,21 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions +from __future__ import annotations + +import datetime as dt import typing -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel from .output_tool_messages_item import OutputToolMessagesItem -import datetime as dt -from .open_ai_function import OpenAiFunction -from .server import Server -from ..core.pydantic_utilities import IS_PYDANTIC_V2 - +from .output_tool_type import OutputToolType +from .tool_rejection_plan import ToolRejectionPlan -class OutputTool(UniversalBaseModel): - async_: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="async")] = pydantic.Field( - default=None - ) - """ - This determines if the tool is async. - - If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server. - - If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server. - - Defaults to synchronous (`false`). - """ +class OutputTool(UncheckedBaseModel): messages: typing.Optional[typing.List[OutputToolMessagesItem]] = pydantic.Field(default=None) """ These are the messages that will be spoken to the user as the tool is running. @@ -33,44 +23,45 @@ class OutputTool(UniversalBaseModel): For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. """ - type: typing.Literal["output"] = "output" - id: str = pydantic.Field() + type: OutputToolType = pydantic.Field() """ - This is the unique identifier for the tool. + The type of tool. "output" for Output tool. """ - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field() - """ - This is the unique identifier for the organization that this tool belongs to. - """ - - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the tool was created. - """ - - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the tool was last updated. - """ - - function: typing.Optional[OpenAiFunction] = pydantic.Field(default=None) + id: str = pydantic.Field() """ - This is the function definition of the tool. - - For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on tool-specific fields like `tool.destinations`. But, even in those cases, you can provide a custom function definition for advanced use cases. - - An example of an advanced use case is if you want to customize the message that's spoken for `endCall` tool. You can specify a function where it returns an argument "reason". Then, in `messages` array, you can have many "request-complete" messages. One of these messages will be triggered if the `messages[].conditions` matches the "reason" argument. + This is the unique identifier for the tool. """ - server: typing.Optional[Server] = pydantic.Field(default=None) - """ - This is the server that will be hit when this tool is requested by the model. - - All requests will be sent with the call object among other things. You can find more details in the Server URL documentation. - - This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: highest tool.server.url, then assistant.serverUrl, then phoneNumber.serverUrl, then org.serverUrl. - """ + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the organization that this tool belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the tool was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", description="This is the ISO 8601 date-time string of when the tool was last updated." + ), + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -80,3 +71,6 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +update_forward_refs(OutputTool) diff --git a/src/vapi/types/output_tool_messages_item.py b/src/vapi/types/output_tool_messages_item.py index 2a886e15..568bfb97 100644 --- a/src/vapi/types/output_tool_messages_item.py +++ b/src/vapi/types/output_tool_messages_item.py @@ -1,9 +1,104 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .tool_message_start import ToolMessageStart -from .tool_message_complete import ToolMessageComplete -from .tool_message_failed import ToolMessageFailed -from .tool_message_delayed import ToolMessageDelayed -OutputToolMessagesItem = typing.Union[ToolMessageStart, ToolMessageComplete, ToolMessageFailed, ToolMessageDelayed] +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class OutputToolMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class OutputToolMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class OutputToolMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class OutputToolMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +OutputToolMessagesItem = typing_extensions.Annotated[ + typing.Union[ + OutputToolMessagesItem_RequestStart, + OutputToolMessagesItem_RequestComplete, + OutputToolMessagesItem_RequestFailed, + OutputToolMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/output_tool_type.py b/src/vapi/types/output_tool_type.py new file mode 100644 index 00000000..8e3ff373 --- /dev/null +++ b/src/vapi/types/output_tool_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +OutputToolType = typing.Union[typing.Literal["output"], typing.Any] diff --git a/src/vapi/types/pagination_meta.py b/src/vapi/types/pagination_meta.py index 77fddf73..8edfc7e0 100644 --- a/src/vapi/types/pagination_meta.py +++ b/src/vapi/types/pagination_meta.py @@ -1,17 +1,34 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions -from ..core.serialization import FieldMetadata -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import datetime as dt import typing + import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class PaginationMeta(UniversalBaseModel): - items_per_page: typing_extensions.Annotated[float, FieldMetadata(alias="itemsPerPage")] - total_items: typing_extensions.Annotated[float, FieldMetadata(alias="totalItems")] - current_page: typing_extensions.Annotated[float, FieldMetadata(alias="currentPage")] +class PaginationMeta(UncheckedBaseModel): + items_per_page: typing_extensions.Annotated[ + float, FieldMetadata(alias="itemsPerPage"), pydantic.Field(alias="itemsPerPage") + ] + total_items: typing_extensions.Annotated[ + float, FieldMetadata(alias="totalItems"), pydantic.Field(alias="totalItems") + ] + current_page: typing_extensions.Annotated[ + float, FieldMetadata(alias="currentPage"), pydantic.Field(alias="currentPage") + ] + items_beyond_retention: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="itemsBeyondRetention"), pydantic.Field(alias="itemsBeyondRetention") + ] = None + created_at_le: typing_extensions.Annotated[ + typing.Optional[dt.datetime], FieldMetadata(alias="createdAtLe"), pydantic.Field(alias="createdAtLe") + ] = None + created_at_ge: typing_extensions.Annotated[ + typing.Optional[dt.datetime], FieldMetadata(alias="createdAtGe"), pydantic.Field(alias="createdAtGe") + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/performance_metrics.py b/src/vapi/types/performance_metrics.py new file mode 100644 index 00000000..df7a3bb4 --- /dev/null +++ b/src/vapi/types/performance_metrics.py @@ -0,0 +1,91 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .turn_latency import TurnLatency + + +class PerformanceMetrics(UncheckedBaseModel): + turn_latencies: typing_extensions.Annotated[ + typing.Optional[typing.List[TurnLatency]], + FieldMetadata(alias="turnLatencies"), + pydantic.Field(alias="turnLatencies", description="These are the individual latencies for each turn."), + ] = None + model_latency_average: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="modelLatencyAverage"), + pydantic.Field( + alias="modelLatencyAverage", + description="This is the average latency for the model to output the first token.", + ), + ] = None + voice_latency_average: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="voiceLatencyAverage"), + pydantic.Field(alias="voiceLatencyAverage", description="This is the average latency for the text to speech."), + ] = None + transcriber_latency_average: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="transcriberLatencyAverage"), + pydantic.Field( + alias="transcriberLatencyAverage", description="This is the average latency for the transcriber." + ), + ] = None + endpointing_latency_average: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="endpointingLatencyAverage"), + pydantic.Field( + alias="endpointingLatencyAverage", description="This is the average latency for the endpointing." + ), + ] = None + turn_latency_average: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="turnLatencyAverage"), + pydantic.Field(alias="turnLatencyAverage", description="This is the average latency for complete turns."), + ] = None + from_transport_latency_average: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="fromTransportLatencyAverage"), + pydantic.Field( + alias="fromTransportLatencyAverage", + description="This is the average latency for packets received from the transport provider in milliseconds.", + ), + ] = None + to_transport_latency_average: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="toTransportLatencyAverage"), + pydantic.Field( + alias="toTransportLatencyAverage", + description="This is the average latency for packets sent to the transport provider in milliseconds.", + ), + ] = None + num_user_interrupted: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="numUserInterrupted"), + pydantic.Field( + alias="numUserInterrupted", + description="This is the number of times the user was interrupted by the assistant during the call.", + ), + ] = None + num_assistant_interrupted: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="numAssistantInterrupted"), + pydantic.Field( + alias="numAssistantInterrupted", + description="This is the number of times the assistant was interrupted by the user during the call.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/perplexity_ai_credential.py b/src/vapi/types/perplexity_ai_credential.py index 13963c59..17981901 100644 --- a/src/vapi/types/perplexity_ai_credential.py +++ b/src/vapi/types/perplexity_ai_credential.py @@ -1,39 +1,53 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +import datetime as dt import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic -import datetime as dt +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .perplexity_ai_credential_provider import PerplexityAiCredentialProvider -class PerplexityAiCredential(UniversalBaseModel): - provider: typing.Literal["perplexity-ai"] = "perplexity-ai" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() - """ - This is not returned in the API. - """ - +class PerplexityAiCredential(UncheckedBaseModel): + provider: PerplexityAiCredentialProvider + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] id: str = pydantic.Field() """ This is the unique identifier for the credential. """ - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field() - """ - This is the unique identifier for the org that this credential belongs to. - """ - - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the credential was created. - """ - - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the assistant was last updated. + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/perplexity_ai_credential_provider.py b/src/vapi/types/perplexity_ai_credential_provider.py new file mode 100644 index 00000000..95c58ea3 --- /dev/null +++ b/src/vapi/types/perplexity_ai_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +PerplexityAiCredentialProvider = typing.Union[typing.Literal["perplexity-ai"], typing.Any] diff --git a/src/vapi/types/perplexity_ai_model.py b/src/vapi/types/perplexity_ai_model.py index f69a17e2..3daa3043 100644 --- a/src/vapi/types/perplexity_ai_model.py +++ b/src/vapi/types/perplexity_ai_model.py @@ -1,39 +1,44 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +from __future__ import annotations + import typing -from .open_ai_message import OpenAiMessage + import pydantic -from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.serialization import FieldMetadata -from .knowledge_base import KnowledgeBase -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_custom_knowledge_base_dto import CreateCustomKnowledgeBaseDto +from .open_ai_message import OpenAiMessage -class PerplexityAiModel(UniversalBaseModel): +class PerplexityAiModel(UncheckedBaseModel): messages: typing.Optional[typing.List[OpenAiMessage]] = pydantic.Field(default=None) """ This is the starting state for the conversation. """ - tools: typing.Optional[typing.List[PerplexityAiModelToolsItem]] = pydantic.Field(default=None) + tools: typing.Optional[typing.List["PerplexityAiModelToolsItem"]] = pydantic.Field(default=None) """ These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`. Both `tools` and `toolIds` can be used together. """ - tool_ids: typing_extensions.Annotated[typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds")] = ( - pydantic.Field(default=None) - ) - """ - These are the tools that the assistant can use during the call. To use transient tools, use `tools`. - - Both `tools` and `toolIds` can be used together. - """ - - provider: typing.Literal["perplexity-ai"] = "perplexity-ai" + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="toolIds"), + pydantic.Field( + alias="toolIds", + description="These are the tools that the assistant can use during the call. To use transient tools, use `tools`.\n\nBoth `tools` and `toolIds` can be used together.", + ), + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase", description="These are the options for the knowledge base."), + ] = None model: str = pydantic.Field() """ This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b @@ -44,41 +49,30 @@ class PerplexityAiModel(UniversalBaseModel): This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency. """ - knowledge_base: typing_extensions.Annotated[ - typing.Optional[KnowledgeBase], FieldMetadata(alias="knowledgeBase") - ] = pydantic.Field(default=None) - """ - These are the options for the knowledge base. - """ - - max_tokens: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="maxTokens")] = pydantic.Field( - default=None - ) - """ - This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250. - """ - + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="maxTokens"), + pydantic.Field( + alias="maxTokens", + description="This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.", + ), + ] = None emotion_recognition_enabled: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="emotionRecognitionEnabled") - ] = pydantic.Field(default=None) - """ - This determines whether we detect user's emotion while they speak and send it as an additional info to model. - - Default `false` because the model is usually are good at understanding the user's emotion from text. - - @default false - """ - - num_fast_turns: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="numFastTurns")] = ( - pydantic.Field(default=None) - ) - """ - This sets how many turns at the start of the conversation to use a smaller, faster model from the same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai. - - Default is 0. - - @default 0 - """ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field( + alias="emotionRecognitionEnabled", + description="This determines whether we detect user's emotion while they speak and send it as an additional info to model.\n\nDefault `false` because the model is usually are good at understanding the user's emotion from text.\n\n@default false", + ), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="numFastTurns"), + pydantic.Field( + alias="numFastTurns", + description="This sets how many turns at the start of the conversation to use a smaller, faster model from the same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai.\n\nDefault is 0.\n\n@default 0", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -88,3 +82,121 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + PerplexityAiModel, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/perplexity_ai_model_tools_item.py b/src/vapi/types/perplexity_ai_model_tools_item.py index 02a33e55..7f1b17d2 100644 --- a/src/vapi/types/perplexity_ai_model_tools_item.py +++ b/src/vapi/types/perplexity_ai_model_tools_item.py @@ -1,20 +1,731 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .create_dtmf_tool_dto import CreateDtmfToolDto -from .create_end_call_tool_dto import CreateEndCallToolDto -from .create_voicemail_tool_dto import CreateVoicemailToolDto -from .create_function_tool_dto import CreateFunctionToolDto -from .create_ghl_tool_dto import CreateGhlToolDto -from .create_make_tool_dto import CreateMakeToolDto -from .create_transfer_call_tool_dto import CreateTransferCallToolDto - -PerplexityAiModelToolsItem = typing.Union[ - CreateDtmfToolDto, - CreateEndCallToolDto, - CreateVoicemailToolDto, - CreateFunctionToolDto, - CreateGhlToolDto, - CreateMakeToolDto, - CreateTransferCallToolDto, + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .backoff_plan import BackoffPlan +from .code_tool_environment_variable import CodeToolEnvironmentVariable +from .create_api_request_tool_dto_messages_item import CreateApiRequestToolDtoMessagesItem +from .create_api_request_tool_dto_method import CreateApiRequestToolDtoMethod +from .create_bash_tool_dto_messages_item import CreateBashToolDtoMessagesItem +from .create_bash_tool_dto_name import CreateBashToolDtoName +from .create_bash_tool_dto_sub_type import CreateBashToolDtoSubType +from .create_code_tool_dto_messages_item import CreateCodeToolDtoMessagesItem +from .create_computer_tool_dto_messages_item import CreateComputerToolDtoMessagesItem +from .create_computer_tool_dto_name import CreateComputerToolDtoName +from .create_computer_tool_dto_sub_type import CreateComputerToolDtoSubType +from .create_dtmf_tool_dto_messages_item import CreateDtmfToolDtoMessagesItem +from .create_end_call_tool_dto_messages_item import CreateEndCallToolDtoMessagesItem +from .create_function_tool_dto_messages_item import CreateFunctionToolDtoMessagesItem +from .create_go_high_level_calendar_availability_tool_dto_messages_item import ( + CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem, +) +from .create_go_high_level_calendar_event_create_tool_dto_messages_item import ( + CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_create_tool_dto_messages_item import ( + CreateGoHighLevelContactCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_get_tool_dto_messages_item import CreateGoHighLevelContactGetToolDtoMessagesItem +from .create_google_calendar_check_availability_tool_dto_messages_item import ( + CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem, +) +from .create_google_calendar_create_event_tool_dto_messages_item import ( + CreateGoogleCalendarCreateEventToolDtoMessagesItem, +) +from .create_google_sheets_row_append_tool_dto_messages_item import CreateGoogleSheetsRowAppendToolDtoMessagesItem +from .create_handoff_tool_dto_messages_item import CreateHandoffToolDtoMessagesItem +from .create_mcp_tool_dto_messages_item import CreateMcpToolDtoMessagesItem +from .create_query_tool_dto_messages_item import CreateQueryToolDtoMessagesItem +from .create_sip_request_tool_dto_body import CreateSipRequestToolDtoBody +from .create_sip_request_tool_dto_messages_item import CreateSipRequestToolDtoMessagesItem +from .create_sip_request_tool_dto_verb import CreateSipRequestToolDtoVerb +from .create_slack_send_message_tool_dto_messages_item import CreateSlackSendMessageToolDtoMessagesItem +from .create_sms_tool_dto_messages_item import CreateSmsToolDtoMessagesItem +from .create_text_editor_tool_dto_messages_item import CreateTextEditorToolDtoMessagesItem +from .create_text_editor_tool_dto_name import CreateTextEditorToolDtoName +from .create_text_editor_tool_dto_sub_type import CreateTextEditorToolDtoSubType +from .create_transfer_call_tool_dto_destinations_item import CreateTransferCallToolDtoDestinationsItem +from .create_transfer_call_tool_dto_messages_item import CreateTransferCallToolDtoMessagesItem +from .create_voicemail_tool_dto_messages_item import CreateVoicemailToolDtoMessagesItem +from .knowledge_base import KnowledgeBase +from .mcp_tool_messages import McpToolMessages +from .mcp_tool_metadata import McpToolMetadata +from .open_ai_function import OpenAiFunction +from .server import Server +from .tool_parameter import ToolParameter +from .tool_rejection_plan import ToolRejectionPlan +from .variable_extraction_plan import VariableExtractionPlan + + +class PerplexityAiModelToolsItem_ApiRequest(UncheckedBaseModel): + type: typing.Literal["apiRequest"] = "apiRequest" + messages: typing.Optional[typing.List[CreateApiRequestToolDtoMessagesItem]] = None + method: CreateApiRequestToolDtoMethod + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + encrypted_paths: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="encryptedPaths"), pydantic.Field(alias="encryptedPaths") + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + name: typing.Optional[str] = None + description: typing.Optional[str] = None + url: str + body: typing.Optional["JsonSchema"] = None + headers: typing.Optional["JsonSchema"] = None + backoff_plan: typing_extensions.Annotated[ + typing.Optional[BackoffPlan], FieldMetadata(alias="backoffPlan"), pydantic.Field(alias="backoffPlan") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class PerplexityAiModelToolsItem_Bash(UncheckedBaseModel): + type: typing.Literal["bash"] = "bash" + messages: typing.Optional[typing.List[CreateBashToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateBashToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateBashToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class PerplexityAiModelToolsItem_Code(UncheckedBaseModel): + type: typing.Literal["code"] = "code" + messages: typing.Optional[typing.List[CreateCodeToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + code: str + environment_variables: typing_extensions.Annotated[ + typing.Optional[typing.List[CodeToolEnvironmentVariable]], + FieldMetadata(alias="environmentVariables"), + pydantic.Field(alias="environmentVariables"), + ] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class PerplexityAiModelToolsItem_Computer(UncheckedBaseModel): + type: typing.Literal["computer"] = "computer" + messages: typing.Optional[typing.List[CreateComputerToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateComputerToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateComputerToolDtoName + display_width_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayWidthPx"), pydantic.Field(alias="displayWidthPx") + ] + display_height_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayHeightPx"), pydantic.Field(alias="displayHeightPx") + ] + display_number: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="displayNumber"), pydantic.Field(alias="displayNumber") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class PerplexityAiModelToolsItem_Dtmf(UncheckedBaseModel): + type: typing.Literal["dtmf"] = "dtmf" + messages: typing.Optional[typing.List[CreateDtmfToolDtoMessagesItem]] = None + sip_info_dtmf_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="sipInfoDtmfEnabled"), pydantic.Field(alias="sipInfoDtmfEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class PerplexityAiModelToolsItem_EndCall(UncheckedBaseModel): + type: typing.Literal["endCall"] = "endCall" + messages: typing.Optional[typing.List[CreateEndCallToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class PerplexityAiModelToolsItem_Function(UncheckedBaseModel): + type: typing.Literal["function"] = "function" + messages: typing.Optional[typing.List[CreateFunctionToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class PerplexityAiModelToolsItem_GohighlevelCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.availability.check"] = "gohighlevel.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class PerplexityAiModelToolsItem_GohighlevelCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.event.create"] = "gohighlevel.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class PerplexityAiModelToolsItem_GohighlevelContactCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.create"] = "gohighlevel.contact.create" + messages: typing.Optional[typing.List[CreateGoHighLevelContactCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class PerplexityAiModelToolsItem_GohighlevelContactGet(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.get"] = "gohighlevel.contact.get" + messages: typing.Optional[typing.List[CreateGoHighLevelContactGetToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class PerplexityAiModelToolsItem_GoogleCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["google.calendar.availability.check"] = "google.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class PerplexityAiModelToolsItem_GoogleCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["google.calendar.event.create"] = "google.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoogleCalendarCreateEventToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class PerplexityAiModelToolsItem_GoogleSheetsRowAppend(UncheckedBaseModel): + type: typing.Literal["google.sheets.row.append"] = "google.sheets.row.append" + messages: typing.Optional[typing.List[CreateGoogleSheetsRowAppendToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class PerplexityAiModelToolsItem_Handoff(UncheckedBaseModel): + type: typing.Literal["handoff"] = "handoff" + messages: typing.Optional[typing.List[CreateHandoffToolDtoMessagesItem]] = None + default_result: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="defaultResult"), pydantic.Field(alias="defaultResult") + ] = None + destinations: typing.Optional[typing.List["CreateHandoffToolDtoDestinationsItem"]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class PerplexityAiModelToolsItem_Mcp(UncheckedBaseModel): + type: typing.Literal["mcp"] = "mcp" + messages: typing.Optional[typing.List[CreateMcpToolDtoMessagesItem]] = None + server: typing.Optional[Server] = None + tool_messages: typing_extensions.Annotated[ + typing.Optional[typing.List[McpToolMessages]], + FieldMetadata(alias="toolMessages"), + pydantic.Field(alias="toolMessages"), + ] = None + metadata: typing.Optional[McpToolMetadata] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class PerplexityAiModelToolsItem_Query(UncheckedBaseModel): + type: typing.Literal["query"] = "query" + messages: typing.Optional[typing.List[CreateQueryToolDtoMessagesItem]] = None + knowledge_bases: typing_extensions.Annotated[ + typing.Optional[typing.List[KnowledgeBase]], + FieldMetadata(alias="knowledgeBases"), + pydantic.Field(alias="knowledgeBases"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class PerplexityAiModelToolsItem_SlackMessageSend(UncheckedBaseModel): + type: typing.Literal["slack.message.send"] = "slack.message.send" + messages: typing.Optional[typing.List[CreateSlackSendMessageToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class PerplexityAiModelToolsItem_Sms(UncheckedBaseModel): + type: typing.Literal["sms"] = "sms" + messages: typing.Optional[typing.List[CreateSmsToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class PerplexityAiModelToolsItem_TextEditor(UncheckedBaseModel): + type: typing.Literal["textEditor"] = "textEditor" + messages: typing.Optional[typing.List[CreateTextEditorToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateTextEditorToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateTextEditorToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class PerplexityAiModelToolsItem_TransferCall(UncheckedBaseModel): + type: typing.Literal["transferCall"] = "transferCall" + messages: typing.Optional[typing.List[CreateTransferCallToolDtoMessagesItem]] = None + destinations: typing.Optional[typing.List[CreateTransferCallToolDtoDestinationsItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class PerplexityAiModelToolsItem_SipRequest(UncheckedBaseModel): + type: typing.Literal["sipRequest"] = "sipRequest" + messages: typing.Optional[typing.List[CreateSipRequestToolDtoMessagesItem]] = None + verb: CreateSipRequestToolDtoVerb + headers: typing.Optional["JsonSchema"] = None + body: typing.Optional[CreateSipRequestToolDtoBody] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class PerplexityAiModelToolsItem_Voicemail(UncheckedBaseModel): + type: typing.Literal["voicemail"] = "voicemail" + messages: typing.Optional[typing.List[CreateVoicemailToolDtoMessagesItem]] = None + beep_detection_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="beepDetectionEnabled"), pydantic.Field(alias="beepDetectionEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +PerplexityAiModelToolsItem = typing_extensions.Annotated[ + typing.Union[ + PerplexityAiModelToolsItem_ApiRequest, + PerplexityAiModelToolsItem_Bash, + PerplexityAiModelToolsItem_Code, + PerplexityAiModelToolsItem_Computer, + PerplexityAiModelToolsItem_Dtmf, + PerplexityAiModelToolsItem_EndCall, + PerplexityAiModelToolsItem_Function, + PerplexityAiModelToolsItem_GohighlevelCalendarAvailabilityCheck, + PerplexityAiModelToolsItem_GohighlevelCalendarEventCreate, + PerplexityAiModelToolsItem_GohighlevelContactCreate, + PerplexityAiModelToolsItem_GohighlevelContactGet, + PerplexityAiModelToolsItem_GoogleCalendarAvailabilityCheck, + PerplexityAiModelToolsItem_GoogleCalendarEventCreate, + PerplexityAiModelToolsItem_GoogleSheetsRowAppend, + PerplexityAiModelToolsItem_Handoff, + PerplexityAiModelToolsItem_Mcp, + PerplexityAiModelToolsItem_Query, + PerplexityAiModelToolsItem_SlackMessageSend, + PerplexityAiModelToolsItem_Sms, + PerplexityAiModelToolsItem_TextEditor, + PerplexityAiModelToolsItem_TransferCall, + PerplexityAiModelToolsItem_SipRequest, + PerplexityAiModelToolsItem_Voicemail, + ], + UnionMetadata(discriminant="type"), ] +from .json_schema import JsonSchema # noqa: E402, I001 +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs(PerplexityAiModelToolsItem_ApiRequest, JsonSchema=JsonSchema) +update_forward_refs(PerplexityAiModelToolsItem_Bash) +update_forward_refs(PerplexityAiModelToolsItem_Code) +update_forward_refs(PerplexityAiModelToolsItem_Computer) +update_forward_refs(PerplexityAiModelToolsItem_Dtmf) +update_forward_refs(PerplexityAiModelToolsItem_EndCall) +update_forward_refs(PerplexityAiModelToolsItem_Function) +update_forward_refs(PerplexityAiModelToolsItem_GohighlevelCalendarAvailabilityCheck) +update_forward_refs(PerplexityAiModelToolsItem_GohighlevelCalendarEventCreate) +update_forward_refs(PerplexityAiModelToolsItem_GohighlevelContactCreate) +update_forward_refs(PerplexityAiModelToolsItem_GohighlevelContactGet) +update_forward_refs(PerplexityAiModelToolsItem_GoogleCalendarAvailabilityCheck) +update_forward_refs(PerplexityAiModelToolsItem_GoogleCalendarEventCreate) +update_forward_refs(PerplexityAiModelToolsItem_GoogleSheetsRowAppend) +update_forward_refs( + PerplexityAiModelToolsItem_Handoff, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs(PerplexityAiModelToolsItem_Mcp) +update_forward_refs(PerplexityAiModelToolsItem_Query) +update_forward_refs(PerplexityAiModelToolsItem_SlackMessageSend) +update_forward_refs(PerplexityAiModelToolsItem_Sms) +update_forward_refs(PerplexityAiModelToolsItem_TextEditor) +update_forward_refs(PerplexityAiModelToolsItem_TransferCall) +update_forward_refs(PerplexityAiModelToolsItem_SipRequest, JsonSchema=JsonSchema) +update_forward_refs(PerplexityAiModelToolsItem_Voicemail) diff --git a/src/vapi/types/personality.py b/src/vapi/types/personality.py new file mode 100644 index 00000000..26c4ada6 --- /dev/null +++ b/src/vapi/types/personality.py @@ -0,0 +1,189 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class Personality(UncheckedBaseModel): + id: str = pydantic.Field() + """ + This is the unique identifier for the personality. + """ + + org_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", + description="This is the unique identifier for the organization this personality belongs to.\nIf null, this is a Vapi-provided default personality available to all organizations.", + ), + ] = None + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the personality was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the personality was last updated.", + ), + ] + name: str = pydantic.Field() + """ + This is the name of the personality (e.g., "Confused Carl", "Rude Rob"). + """ + + assistant: "CreateAssistantDto" = pydantic.Field() + """ + This is the full assistant configuration for this personality. + It defines the tester's voice, model, behavior via system prompt, and other settings. + """ + + path: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional folder path for organizing personalities. + Supports up to 3 levels (e.g., "dept/feature/variant"). + Maps to GitOps resource folder structure. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + Personality, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/phone_number_call_ending_hook_filter.py b/src/vapi/types/phone_number_call_ending_hook_filter.py new file mode 100644 index 00000000..99fa4420 --- /dev/null +++ b/src/vapi/types/phone_number_call_ending_hook_filter.py @@ -0,0 +1,41 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .phone_number_call_ending_hook_filter_key import PhoneNumberCallEndingHookFilterKey +from .phone_number_call_ending_hook_filter_one_of_item import PhoneNumberCallEndingHookFilterOneOfItem +from .phone_number_call_ending_hook_filter_type import PhoneNumberCallEndingHookFilterType + + +class PhoneNumberCallEndingHookFilter(UncheckedBaseModel): + type: PhoneNumberCallEndingHookFilterType = pydantic.Field() + """ + This is the type of filter - currently only "oneOf" is supported + """ + + key: PhoneNumberCallEndingHookFilterKey = pydantic.Field() + """ + This is the key to filter on - only "call.endedReason" is allowed for phone number call ending hooks + """ + + one_of: typing_extensions.Annotated[ + typing.List[PhoneNumberCallEndingHookFilterOneOfItem], + FieldMetadata(alias="oneOf"), + pydantic.Field( + alias="oneOf", description="This is the array of assistant-request related ended reasons to match against" + ), + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/phone_number_call_ending_hook_filter_key.py b/src/vapi/types/phone_number_call_ending_hook_filter_key.py new file mode 100644 index 00000000..560ef875 --- /dev/null +++ b/src/vapi/types/phone_number_call_ending_hook_filter_key.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +PhoneNumberCallEndingHookFilterKey = typing.Union[typing.Literal["call.endedReason"], typing.Any] diff --git a/src/vapi/types/phone_number_call_ending_hook_filter_one_of_item.py b/src/vapi/types/phone_number_call_ending_hook_filter_one_of_item.py new file mode 100644 index 00000000..e831c0d7 --- /dev/null +++ b/src/vapi/types/phone_number_call_ending_hook_filter_one_of_item.py @@ -0,0 +1,15 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +PhoneNumberCallEndingHookFilterOneOfItem = typing.Union[ + typing.Literal[ + "assistant-request-failed", + "assistant-request-returned-error", + "assistant-request-returned-unspeakable-error", + "assistant-request-returned-invalid-assistant", + "assistant-request-returned-no-assistant", + "assistant-request-returned-forwarding-phone-number", + ], + typing.Any, +] diff --git a/src/vapi/types/phone_number_call_ending_hook_filter_type.py b/src/vapi/types/phone_number_call_ending_hook_filter_type.py new file mode 100644 index 00000000..ae99d2e2 --- /dev/null +++ b/src/vapi/types/phone_number_call_ending_hook_filter_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +PhoneNumberCallEndingHookFilterType = typing.Union[typing.Literal["oneOf"], typing.Any] diff --git a/src/vapi/types/phone_number_call_ringing_hook_filter.py b/src/vapi/types/phone_number_call_ringing_hook_filter.py new file mode 100644 index 00000000..4b2150db --- /dev/null +++ b/src/vapi/types/phone_number_call_ringing_hook_filter.py @@ -0,0 +1,41 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .phone_number_call_ringing_hook_filter_key import PhoneNumberCallRingingHookFilterKey +from .phone_number_call_ringing_hook_filter_type import PhoneNumberCallRingingHookFilterType + + +class PhoneNumberCallRingingHookFilter(UncheckedBaseModel): + type: PhoneNumberCallRingingHookFilterType = pydantic.Field() + """ + This is the type of filter - matches when the specified field starts with any of the given prefixes + """ + + key: PhoneNumberCallRingingHookFilterKey = pydantic.Field() + """ + The field to check. Currently only "number" (the caller's phone number) is supported. + """ + + starts_with: typing_extensions.Annotated[ + typing.List[str], + FieldMetadata(alias="startsWith"), + pydantic.Field( + alias="startsWith", + description="Array of prefixes to match. Do not include the + prefix. Inbound calls from numbers starting with any of these prefixes will trigger the hook actions.", + ), + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/phone_number_call_ringing_hook_filter_key.py b/src/vapi/types/phone_number_call_ringing_hook_filter_key.py new file mode 100644 index 00000000..fdf7721c --- /dev/null +++ b/src/vapi/types/phone_number_call_ringing_hook_filter_key.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +PhoneNumberCallRingingHookFilterKey = typing.Union[typing.Literal["number"], typing.Any] diff --git a/src/vapi/types/phone_number_call_ringing_hook_filter_type.py b/src/vapi/types/phone_number_call_ringing_hook_filter_type.py new file mode 100644 index 00000000..ec485a0f --- /dev/null +++ b/src/vapi/types/phone_number_call_ringing_hook_filter_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +PhoneNumberCallRingingHookFilterType = typing.Union[typing.Literal["startsWith"], typing.Any] diff --git a/src/vapi/types/phone_number_hook_call_ending.py b/src/vapi/types/phone_number_hook_call_ending.py new file mode 100644 index 00000000..6e3a24e0 --- /dev/null +++ b/src/vapi/types/phone_number_hook_call_ending.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .phone_number_call_ending_hook_filter import PhoneNumberCallEndingHookFilter +from .phone_number_hook_call_ending_do import PhoneNumberHookCallEndingDo + + +class PhoneNumberHookCallEnding(UncheckedBaseModel): + filters: typing.Optional[typing.List[PhoneNumberCallEndingHookFilter]] = pydantic.Field(default=None) + """ + Optional filters to decide when to trigger - restricted to assistant-request related ended reasons + """ + + do: typing.Optional[PhoneNumberHookCallEndingDo] = pydantic.Field(default=None) + """ + This is the action to perform when the hook triggers + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/phone_number_hook_call_ending_do.py b/src/vapi/types/phone_number_hook_call_ending_do.py new file mode 100644 index 00000000..93d96f79 --- /dev/null +++ b/src/vapi/types/phone_number_hook_call_ending_do.py @@ -0,0 +1,53 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .transfer_phone_number_hook_action_destination import TransferPhoneNumberHookActionDestination + + +class PhoneNumberHookCallEndingDo_Transfer(UncheckedBaseModel): + """ + This is the action to perform when the hook triggers + """ + + type: typing.Literal["transfer"] = "transfer" + destination: typing.Optional[TransferPhoneNumberHookActionDestination] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class PhoneNumberHookCallEndingDo_Say(UncheckedBaseModel): + """ + This is the action to perform when the hook triggers + """ + + type: typing.Literal["say"] = "say" + exact: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +PhoneNumberHookCallEndingDo = typing_extensions.Annotated[ + typing.Union[PhoneNumberHookCallEndingDo_Transfer, PhoneNumberHookCallEndingDo_Say], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/phone_number_hook_call_ringing.py b/src/vapi/types/phone_number_hook_call_ringing.py new file mode 100644 index 00000000..012380c7 --- /dev/null +++ b/src/vapi/types/phone_number_hook_call_ringing.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .phone_number_call_ringing_hook_filter import PhoneNumberCallRingingHookFilter +from .phone_number_hook_call_ringing_do_item import PhoneNumberHookCallRingingDoItem + + +class PhoneNumberHookCallRinging(UncheckedBaseModel): + filters: typing.Optional[typing.List[PhoneNumberCallRingingHookFilter]] = pydantic.Field(default=None) + """ + Optional filters to decide when to trigger the hook. Currently supports filtering by caller country code. + """ + + do: typing.List[PhoneNumberHookCallRingingDoItem] = pydantic.Field() + """ + Only the first action will be executed. Additional actions will be ignored. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/phone_number_hook_call_ringing_do_item.py b/src/vapi/types/phone_number_hook_call_ringing_do_item.py new file mode 100644 index 00000000..d5ef7684 --- /dev/null +++ b/src/vapi/types/phone_number_hook_call_ringing_do_item.py @@ -0,0 +1,45 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .transfer_phone_number_hook_action_destination import TransferPhoneNumberHookActionDestination + + +class PhoneNumberHookCallRingingDoItem_Transfer(UncheckedBaseModel): + type: typing.Literal["transfer"] = "transfer" + destination: typing.Optional[TransferPhoneNumberHookActionDestination] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class PhoneNumberHookCallRingingDoItem_Say(UncheckedBaseModel): + type: typing.Literal["say"] = "say" + exact: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +PhoneNumberHookCallRingingDoItem = typing_extensions.Annotated[ + typing.Union[PhoneNumberHookCallRingingDoItem_Transfer, PhoneNumberHookCallRingingDoItem_Say], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/phone_number_paginated_response.py b/src/vapi/types/phone_number_paginated_response.py new file mode 100644 index 00000000..c84f786d --- /dev/null +++ b/src/vapi/types/phone_number_paginated_response.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .pagination_meta import PaginationMeta +from .phone_number_paginated_response_results_item import PhoneNumberPaginatedResponseResultsItem + + +class PhoneNumberPaginatedResponse(UncheckedBaseModel): + results: typing.List[PhoneNumberPaginatedResponseResultsItem] = pydantic.Field() + """ + A list of phone numbers, which can be of any provider type. + """ + + metadata: PaginationMeta = pydantic.Field() + """ + Metadata about the pagination. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/phone_number_paginated_response_results_item.py b/src/vapi/types/phone_number_paginated_response_results_item.py new file mode 100644 index 00000000..c9247cc6 --- /dev/null +++ b/src/vapi/types/phone_number_paginated_response_results_item.py @@ -0,0 +1,279 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .byo_phone_number_fallback_destination import ByoPhoneNumberFallbackDestination +from .byo_phone_number_hooks_item import ByoPhoneNumberHooksItem +from .byo_phone_number_status import ByoPhoneNumberStatus +from .server import Server +from .sip_authentication import SipAuthentication +from .telnyx_phone_number_fallback_destination import TelnyxPhoneNumberFallbackDestination +from .telnyx_phone_number_hooks_item import TelnyxPhoneNumberHooksItem +from .telnyx_phone_number_status import TelnyxPhoneNumberStatus +from .twilio_phone_number_fallback_destination import TwilioPhoneNumberFallbackDestination +from .twilio_phone_number_hooks_item import TwilioPhoneNumberHooksItem +from .twilio_phone_number_status import TwilioPhoneNumberStatus +from .vapi_phone_number_fallback_destination import VapiPhoneNumberFallbackDestination +from .vapi_phone_number_hooks_item import VapiPhoneNumberHooksItem +from .vapi_phone_number_status import VapiPhoneNumberStatus +from .vonage_phone_number_fallback_destination import VonagePhoneNumberFallbackDestination +from .vonage_phone_number_hooks_item import VonagePhoneNumberHooksItem +from .vonage_phone_number_status import VonagePhoneNumberStatus + + +class PhoneNumberPaginatedResponseResultsItem_ByoPhoneNumber(UncheckedBaseModel): + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[ByoPhoneNumberFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[ByoPhoneNumberHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + status: typing.Optional[ByoPhoneNumberStatus] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class PhoneNumberPaginatedResponseResultsItem_Twilio(UncheckedBaseModel): + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[TwilioPhoneNumberFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[TwilioPhoneNumberHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + status: typing.Optional[TwilioPhoneNumberStatus] = None + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class PhoneNumberPaginatedResponseResultsItem_Vonage(UncheckedBaseModel): + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[VonagePhoneNumberFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[VonagePhoneNumberHooksItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + status: typing.Optional[VonagePhoneNumberStatus] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class PhoneNumberPaginatedResponseResultsItem_Vapi(UncheckedBaseModel): + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[VapiPhoneNumberFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[VapiPhoneNumberHooksItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + status: typing.Optional[VapiPhoneNumberStatus] = None + number: typing.Optional[str] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class PhoneNumberPaginatedResponseResultsItem_Telnyx(UncheckedBaseModel): + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[TelnyxPhoneNumberFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[TelnyxPhoneNumberHooksItem]] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + status: typing.Optional[TelnyxPhoneNumberStatus] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +PhoneNumberPaginatedResponseResultsItem = typing_extensions.Annotated[ + typing.Union[ + PhoneNumberPaginatedResponseResultsItem_ByoPhoneNumber, + PhoneNumberPaginatedResponseResultsItem_Twilio, + PhoneNumberPaginatedResponseResultsItem_Vonage, + PhoneNumberPaginatedResponseResultsItem_Vapi, + PhoneNumberPaginatedResponseResultsItem_Telnyx, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/pie_insight.py b/src/vapi/types/pie_insight.py new file mode 100644 index 00000000..68f6171b --- /dev/null +++ b/src/vapi/types/pie_insight.py @@ -0,0 +1,92 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .insight_formula import InsightFormula +from .insight_time_range import InsightTimeRange +from .pie_insight_group_by import PieInsightGroupBy +from .pie_insight_queries_item import PieInsightQueriesItem + + +class PieInsight(UncheckedBaseModel): + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the Insight. + """ + + formulas: typing.Optional[typing.List[InsightFormula]] = pydantic.Field(default=None) + """ + Formulas are mathematical expressions applied on the data returned by the queries to transform them before being used to create the insight. + The formulas needs to be a valid mathematical expression, supported by MathJS - https://mathjs.org/docs/expressions/syntax.html + A formula is created by using the query names as the variable. + The formulas must contain at least one query name in the LiquidJS format {{query_name}} or {{['query name']}} which will be substituted with the query result. + For example, if you have 2 queries, 'Was Booking Made' and 'Average Call Duration', you can create a formula like this: + ``` + {{['Query 1']}} / {{['Query 2']}} * 100 + ``` + + ``` + ({{[Query 1]}} * 10) + {{[Query 2]}} + ``` + This will take the + + You can also use the query names as the variable in the formula. + """ + + time_range: typing_extensions.Annotated[ + typing.Optional[InsightTimeRange], FieldMetadata(alias="timeRange"), pydantic.Field(alias="timeRange") + ] = None + group_by: typing_extensions.Annotated[ + typing.Optional[PieInsightGroupBy], + FieldMetadata(alias="groupBy"), + pydantic.Field( + alias="groupBy", + description="This is the group by column for the insight when table is `call`.\nThese are the columns to group the results by.\nAll results are grouped by the time range step by default.", + ), + ] = None + queries: typing.List[PieInsightQueriesItem] = pydantic.Field() + """ + These are the queries to run to generate the insight. + """ + + id: str = pydantic.Field() + """ + This is the unique identifier for the Insight. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this Insight belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the Insight was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", description="This is the ISO 8601 date-time string of when the Insight was last updated." + ), + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/pie_insight_from_call_table.py b/src/vapi/types/pie_insight_from_call_table.py new file mode 100644 index 00000000..1262b14d --- /dev/null +++ b/src/vapi/types/pie_insight_from_call_table.py @@ -0,0 +1,71 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .insight_formula import InsightFormula +from .insight_time_range import InsightTimeRange +from .pie_insight_from_call_table_group_by import PieInsightFromCallTableGroupBy +from .pie_insight_from_call_table_queries_item import PieInsightFromCallTableQueriesItem +from .pie_insight_from_call_table_type import PieInsightFromCallTableType + + +class PieInsightFromCallTable(UncheckedBaseModel): + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the Insight. + """ + + type: PieInsightFromCallTableType = pydantic.Field() + """ + This is the type of the Insight. + It is required to be `pie` to create a pie insight. + """ + + formulas: typing.Optional[typing.List[InsightFormula]] = pydantic.Field(default=None) + """ + Formulas are mathematical expressions applied on the data returned by the queries to transform them before being used to create the insight. + The formulas needs to be a valid mathematical expression, supported by MathJS - https://mathjs.org/docs/expressions/syntax.html + A formula is created by using the query names as the variable. + The formulas must contain at least one query name in the LiquidJS format {{query_name}} or {{['query name']}} which will be substituted with the query result. + For example, if you have 2 queries, 'Was Booking Made' and 'Average Call Duration', you can create a formula like this: + ``` + {{['Query 1']}} / {{['Query 2']}} * 100 + ``` + + ``` + ({{[Query 1]}} * 10) + {{[Query 2]}} + ``` + This will take the + + You can also use the query names as the variable in the formula. + """ + + time_range: typing_extensions.Annotated[ + typing.Optional[InsightTimeRange], FieldMetadata(alias="timeRange"), pydantic.Field(alias="timeRange") + ] = None + group_by: typing_extensions.Annotated[ + typing.Optional[PieInsightFromCallTableGroupBy], + FieldMetadata(alias="groupBy"), + pydantic.Field( + alias="groupBy", + description="This is the group by column for the insight when table is `call`.\nThese are the columns to group the results by.\nAll results are grouped by the time range step by default.", + ), + ] = None + queries: typing.List[PieInsightFromCallTableQueriesItem] = pydantic.Field() + """ + These are the queries to run to generate the insight. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/pie_insight_from_call_table_group_by.py b/src/vapi/types/pie_insight_from_call_table_group_by.py new file mode 100644 index 00000000..fdc1887b --- /dev/null +++ b/src/vapi/types/pie_insight_from_call_table_group_by.py @@ -0,0 +1,18 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +PieInsightFromCallTableGroupBy = typing.Union[ + typing.Literal[ + "assistantId", + "workflowId", + "squadId", + "phoneNumberId", + "type", + "endedReason", + "customerNumber", + "campaignId", + "artifact.structuredOutputs[OutputID]", + ], + typing.Any, +] diff --git a/src/vapi/types/pie_insight_from_call_table_queries_item.py b/src/vapi/types/pie_insight_from_call_table_queries_item.py new file mode 100644 index 00000000..a113027e --- /dev/null +++ b/src/vapi/types/pie_insight_from_call_table_queries_item.py @@ -0,0 +1,13 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .json_query_on_call_table_with_number_type_column import JsonQueryOnCallTableWithNumberTypeColumn +from .json_query_on_call_table_with_string_type_column import JsonQueryOnCallTableWithStringTypeColumn +from .json_query_on_call_table_with_structured_output_column import JsonQueryOnCallTableWithStructuredOutputColumn + +PieInsightFromCallTableQueriesItem = typing.Union[ + JsonQueryOnCallTableWithStringTypeColumn, + JsonQueryOnCallTableWithNumberTypeColumn, + JsonQueryOnCallTableWithStructuredOutputColumn, +] diff --git a/src/vapi/types/pie_insight_from_call_table_type.py b/src/vapi/types/pie_insight_from_call_table_type.py new file mode 100644 index 00000000..6e1f1069 --- /dev/null +++ b/src/vapi/types/pie_insight_from_call_table_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +PieInsightFromCallTableType = typing.Union[typing.Literal["pie"], typing.Any] diff --git a/src/vapi/types/pie_insight_group_by.py b/src/vapi/types/pie_insight_group_by.py new file mode 100644 index 00000000..f7cdf477 --- /dev/null +++ b/src/vapi/types/pie_insight_group_by.py @@ -0,0 +1,18 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +PieInsightGroupBy = typing.Union[ + typing.Literal[ + "assistantId", + "workflowId", + "squadId", + "phoneNumberId", + "type", + "endedReason", + "customerNumber", + "campaignId", + "artifact.structuredOutputs[OutputID]", + ], + typing.Any, +] diff --git a/src/vapi/types/pie_insight_queries_item.py b/src/vapi/types/pie_insight_queries_item.py new file mode 100644 index 00000000..8d5ab510 --- /dev/null +++ b/src/vapi/types/pie_insight_queries_item.py @@ -0,0 +1,13 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .json_query_on_call_table_with_number_type_column import JsonQueryOnCallTableWithNumberTypeColumn +from .json_query_on_call_table_with_string_type_column import JsonQueryOnCallTableWithStringTypeColumn +from .json_query_on_call_table_with_structured_output_column import JsonQueryOnCallTableWithStructuredOutputColumn + +PieInsightQueriesItem = typing.Union[ + JsonQueryOnCallTableWithStringTypeColumn, + JsonQueryOnCallTableWithNumberTypeColumn, + JsonQueryOnCallTableWithStructuredOutputColumn, +] diff --git a/src/vapi/types/play_ht_credential.py b/src/vapi/types/play_ht_credential.py index dbf01f1f..57ff1ce1 100644 --- a/src/vapi/types/play_ht_credential.py +++ b/src/vapi/types/play_ht_credential.py @@ -1,42 +1,56 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +import datetime as dt import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic -import datetime as dt +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .play_ht_credential_provider import PlayHtCredentialProvider -class PlayHtCredential(UniversalBaseModel): - provider: typing.Literal["playht"] = "playht" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() - """ - This is not returned in the API. - """ - +class PlayHtCredential(UncheckedBaseModel): + provider: PlayHtCredentialProvider + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] id: str = pydantic.Field() """ This is the unique identifier for the credential. """ - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field() - """ - This is the unique identifier for the org that this credential belongs to. - """ - - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the credential was created. - """ - - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the assistant was last updated. - """ - - user_id: typing_extensions.Annotated[str, FieldMetadata(alias="userId")] + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + user_id: typing_extensions.Annotated[str, FieldMetadata(alias="userId"), pydantic.Field(alias="userId")] if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/play_ht_credential_provider.py b/src/vapi/types/play_ht_credential_provider.py new file mode 100644 index 00000000..a2ff74d4 --- /dev/null +++ b/src/vapi/types/play_ht_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +PlayHtCredentialProvider = typing.Union[typing.Literal["playht"], typing.Any] diff --git a/src/vapi/types/play_ht_voice.py b/src/vapi/types/play_ht_voice.py index f8fff114..b01b5f85 100644 --- a/src/vapi/types/play_ht_voice.py +++ b/src/vapi/types/play_ht_voice.py @@ -1,36 +1,33 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions import typing -from ..core.serialization import FieldMetadata + import pydantic -from .play_ht_voice_id import PlayHtVoiceId -from .play_ht_voice_emotion import PlayHtVoiceEmotion -from .chunk_plan import ChunkPlan +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .chunk_plan import ChunkPlan +from .fallback_plan import FallbackPlan +from .play_ht_voice_emotion import PlayHtVoiceEmotion +from .play_ht_voice_id import PlayHtVoiceId +from .play_ht_voice_language import PlayHtVoiceLanguage +from .play_ht_voice_model import PlayHtVoiceModel -class PlayHtVoice(UniversalBaseModel): - filler_injection_enabled: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="fillerInjectionEnabled") - ] = pydantic.Field(default=None) - """ - This determines whether fillers are injected into the model output before inputting it into the voice provider. - - Default `false` because you can achieve better results with prompting the model. - """ - - provider: typing.Literal["playht"] = pydantic.Field(default="playht") - """ - This is the voice provider that will be used. - """ - - voice_id: typing_extensions.Annotated[PlayHtVoiceId, FieldMetadata(alias="voiceId")] = pydantic.Field() - """ - This is the provider-specific ID that will be used. - """ - +class PlayHtVoice(UncheckedBaseModel): + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="cachingEnabled"), + pydantic.Field( + alias="cachingEnabled", description="This is the flag to toggle voice caching for the assistant." + ), + ] = None + voice_id: typing_extensions.Annotated[ + PlayHtVoiceId, + FieldMetadata(alias="voiceId"), + pydantic.Field(alias="voiceId", description="This is the provider-specific ID that will be used."), + ] speed: typing.Optional[float] = pydantic.Field(default=None) """ This is the speed multiplier that will be used. @@ -46,33 +43,56 @@ class PlayHtVoice(UniversalBaseModel): An emotion to be applied to the speech. """ - voice_guidance: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="voiceGuidance")] = ( - pydantic.Field(default=None) - ) - """ - A number between 1 and 6. Use lower numbers to reduce how unique your chosen voice will be compared to other voices. - """ - - style_guidance: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="styleGuidance")] = ( - pydantic.Field(default=None) - ) - """ - A number between 1 and 30. Use lower numbers to to reduce how strong your chosen emotion will be. Higher numbers will create a very emotional performance. + voice_guidance: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="voiceGuidance"), + pydantic.Field( + alias="voiceGuidance", + description="A number between 1 and 6. Use lower numbers to reduce how unique your chosen voice will be compared to other voices.", + ), + ] = None + style_guidance: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="styleGuidance"), + pydantic.Field( + alias="styleGuidance", + description="A number between 1 and 30. Use lower numbers to to reduce how strong your chosen emotion will be. Higher numbers will create a very emotional performance.", + ), + ] = None + text_guidance: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="textGuidance"), + pydantic.Field( + alias="textGuidance", + description="A number between 1 and 2. This number influences how closely the generated speech adheres to the input text. Use lower values to create more fluid speech, but with a higher chance of deviating from the input text. Higher numbers will make the generated speech more accurate to the input text, ensuring that the words spoken align closely with the provided text.", + ), + ] = None + model: typing.Optional[PlayHtVoiceModel] = pydantic.Field(default=None) + """ + Playht voice model/engine to use. """ - text_guidance: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="textGuidance")] = ( - pydantic.Field(default=None) - ) + language: typing.Optional[PlayHtVoiceLanguage] = pydantic.Field(default=None) """ - A number between 1 and 2. This number influences how closely the generated speech adheres to the input text. Use lower values to create more fluid speech, but with a higher chance of deviating from the input text. Higher numbers will make the generated speech more accurate to the input text, ensuring that the words spoken align closely with the provided text. + The language to use for the speech. """ - chunk_plan: typing_extensions.Annotated[typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan")] = ( - pydantic.Field(default=None) - ) - """ - This is the plan for chunking the model output before it is sent to the voice provider. - """ + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], + FieldMetadata(alias="chunkPlan"), + pydantic.Field( + alias="chunkPlan", + description="This is the plan for chunking the model output before it is sent to the voice provider.", + ), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field( + alias="fallbackPlan", + description="This is the plan for voice provider fallbacks in the event that the primary voice provider fails.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/play_ht_voice_id.py b/src/vapi/types/play_ht_voice_id.py index d760687e..bb172232 100644 --- a/src/vapi/types/play_ht_voice_id.py +++ b/src/vapi/types/play_ht_voice_id.py @@ -1,6 +1,7 @@ # This file was auto-generated by Fern from our API Definition. import typing + from .play_ht_voice_id_enum import PlayHtVoiceIdEnum PlayHtVoiceId = typing.Union[PlayHtVoiceIdEnum, str] diff --git a/src/vapi/types/play_ht_voice_language.py b/src/vapi/types/play_ht_voice_language.py new file mode 100644 index 00000000..cffb3981 --- /dev/null +++ b/src/vapi/types/play_ht_voice_language.py @@ -0,0 +1,46 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +PlayHtVoiceLanguage = typing.Union[ + typing.Literal[ + "afrikaans", + "albanian", + "amharic", + "arabic", + "bengali", + "bulgarian", + "catalan", + "croatian", + "czech", + "danish", + "dutch", + "english", + "french", + "galician", + "german", + "greek", + "hebrew", + "hindi", + "hungarian", + "indonesian", + "italian", + "japanese", + "korean", + "malay", + "mandarin", + "polish", + "portuguese", + "russian", + "serbian", + "spanish", + "swedish", + "tagalog", + "thai", + "turkish", + "ukrainian", + "urdu", + "xhosa", + ], + typing.Any, +] diff --git a/src/vapi/types/play_ht_voice_model.py b/src/vapi/types/play_ht_voice_model.py new file mode 100644 index 00000000..d97aea02 --- /dev/null +++ b/src/vapi/types/play_ht_voice_model.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +PlayHtVoiceModel = typing.Union[ + typing.Literal["PlayHT2.0", "PlayHT2.0-turbo", "Play3.0-mini", "PlayDialog"], typing.Any +] diff --git a/src/vapi/types/prompt_injection_security_filter.py b/src/vapi/types/prompt_injection_security_filter.py new file mode 100644 index 00000000..05fd3f7f --- /dev/null +++ b/src/vapi/types/prompt_injection_security_filter.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .prompt_injection_security_filter_type import PromptInjectionSecurityFilterType + + +class PromptInjectionSecurityFilter(UncheckedBaseModel): + type: PromptInjectionSecurityFilterType = pydantic.Field() + """ + The type of security threat to filter. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/prompt_injection_security_filter_type.py b/src/vapi/types/prompt_injection_security_filter_type.py new file mode 100644 index 00000000..28d76bea --- /dev/null +++ b/src/vapi/types/prompt_injection_security_filter_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +PromptInjectionSecurityFilterType = typing.Union[typing.Literal["prompt-injection"], typing.Any] diff --git a/src/vapi/types/provider_resource.py b/src/vapi/types/provider_resource.py new file mode 100644 index 00000000..641ff34d --- /dev/null +++ b/src/vapi/types/provider_resource.py @@ -0,0 +1,72 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .provider_resource_provider import ProviderResourceProvider +from .provider_resource_resource_name import ProviderResourceResourceName + + +class ProviderResource(UncheckedBaseModel): + id: str = pydantic.Field() + """ + This is the unique identifier for the provider resource. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", + description="This is the unique identifier for the org that this provider resource belongs to.", + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", + description="This is the ISO 8601 date-time string of when the provider resource was created.", + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the provider resource was last updated.", + ), + ] + provider: ProviderResourceProvider = pydantic.Field() + """ + This is the provider that manages this resource. + """ + + resource_name: typing_extensions.Annotated[ + ProviderResourceResourceName, + FieldMetadata(alias="resourceName"), + pydantic.Field(alias="resourceName", description="This is the name/type of the resource."), + ] + resource_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="resourceId"), + pydantic.Field(alias="resourceId", description="This is the provider-specific identifier for the resource."), + ] + resource: typing.Dict[str, typing.Any] = pydantic.Field() + """ + This is the full resource data from the provider's API. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/provider_resource_paginated_response.py b/src/vapi/types/provider_resource_paginated_response.py new file mode 100644 index 00000000..93965a08 --- /dev/null +++ b/src/vapi/types/provider_resource_paginated_response.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .pagination_meta import PaginationMeta +from .provider_resource import ProviderResource + + +class ProviderResourcePaginatedResponse(UncheckedBaseModel): + results: typing.List[ProviderResource] + metadata: PaginationMeta + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/provider_resource_provider.py b/src/vapi/types/provider_resource_provider.py new file mode 100644 index 00000000..46bcf600 --- /dev/null +++ b/src/vapi/types/provider_resource_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ProviderResourceProvider = typing.Union[typing.Literal["cartesia", "11labs"], typing.Any] diff --git a/src/vapi/types/provider_resource_resource_name.py b/src/vapi/types/provider_resource_resource_name.py new file mode 100644 index 00000000..c887fc10 --- /dev/null +++ b/src/vapi/types/provider_resource_resource_name.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ProviderResourceResourceName = typing.Union[typing.Literal["pronunciation-dictionary"], typing.Any] diff --git a/src/vapi/types/public_key_encryption_plan.py b/src/vapi/types/public_key_encryption_plan.py new file mode 100644 index 00000000..abdac7fb --- /dev/null +++ b/src/vapi/types/public_key_encryption_plan.py @@ -0,0 +1,33 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .public_key_encryption_plan_algorithm import PublicKeyEncryptionPlanAlgorithm +from .public_key_encryption_plan_public_key import PublicKeyEncryptionPlanPublicKey + + +class PublicKeyEncryptionPlan(UncheckedBaseModel): + algorithm: PublicKeyEncryptionPlanAlgorithm = pydantic.Field() + """ + The encryption algorithm to use. + """ + + public_key: typing_extensions.Annotated[ + PublicKeyEncryptionPlanPublicKey, + FieldMetadata(alias="publicKey"), + pydantic.Field(alias="publicKey", description="The public key configuration."), + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/public_key_encryption_plan_algorithm.py b/src/vapi/types/public_key_encryption_plan_algorithm.py new file mode 100644 index 00000000..0ea2cf0a --- /dev/null +++ b/src/vapi/types/public_key_encryption_plan_algorithm.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +PublicKeyEncryptionPlanAlgorithm = typing.Union[typing.Literal["RSA-OAEP-256"], typing.Any] diff --git a/src/vapi/types/public_key_encryption_plan_public_key.py b/src/vapi/types/public_key_encryption_plan_public_key.py new file mode 100644 index 00000000..bd8281b8 --- /dev/null +++ b/src/vapi/types/public_key_encryption_plan_public_key.py @@ -0,0 +1,31 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class PublicKeyEncryptionPlanPublicKey_SpkiPem(UncheckedBaseModel): + """ + The public key configuration. + """ + + format: typing.Literal["spki-pem"] = "spki-pem" + name: typing.Optional[str] = None + pem: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +PublicKeyEncryptionPlanPublicKey = PublicKeyEncryptionPlanPublicKey_SpkiPem diff --git a/src/vapi/types/query_tool.py b/src/vapi/types/query_tool.py new file mode 100644 index 00000000..e7a98610 --- /dev/null +++ b/src/vapi/types/query_tool.py @@ -0,0 +1,76 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .knowledge_base import KnowledgeBase +from .query_tool_messages_item import QueryToolMessagesItem +from .tool_rejection_plan import ToolRejectionPlan + + +class QueryTool(UncheckedBaseModel): + messages: typing.Optional[typing.List[QueryToolMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + knowledge_bases: typing_extensions.Annotated[ + typing.Optional[typing.List[KnowledgeBase]], + FieldMetadata(alias="knowledgeBases"), + pydantic.Field(alias="knowledgeBases", description="The knowledge bases to query"), + ] = None + id: str = pydantic.Field() + """ + This is the unique identifier for the tool. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the organization that this tool belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the tool was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", description="This is the ISO 8601 date-time string of when the tool was last updated." + ), + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(QueryTool) diff --git a/src/vapi/types/query_tool_messages_item.py b/src/vapi/types/query_tool_messages_item.py new file mode 100644 index 00000000..b94eb351 --- /dev/null +++ b/src/vapi/types/query_tool_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class QueryToolMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class QueryToolMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class QueryToolMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class QueryToolMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +QueryToolMessagesItem = typing_extensions.Annotated[ + typing.Union[ + QueryToolMessagesItem_RequestStart, + QueryToolMessagesItem_RequestComplete, + QueryToolMessagesItem_RequestFailed, + QueryToolMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/rce_security_filter.py b/src/vapi/types/rce_security_filter.py new file mode 100644 index 00000000..d39f9de6 --- /dev/null +++ b/src/vapi/types/rce_security_filter.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .rce_security_filter_type import RceSecurityFilterType + + +class RceSecurityFilter(UncheckedBaseModel): + type: RceSecurityFilterType = pydantic.Field() + """ + The type of security threat to filter. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/rce_security_filter_type.py b/src/vapi/types/rce_security_filter_type.py new file mode 100644 index 00000000..282c6188 --- /dev/null +++ b/src/vapi/types/rce_security_filter_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +RceSecurityFilterType = typing.Union[typing.Literal["rce"], typing.Any] diff --git a/src/vapi/types/recording.py b/src/vapi/types/recording.py new file mode 100644 index 00000000..16d98e6d --- /dev/null +++ b/src/vapi/types/recording.py @@ -0,0 +1,50 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .mono import Mono + + +class Recording(UncheckedBaseModel): + stereo_url: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="stereoUrl"), + pydantic.Field( + alias="stereoUrl", + description="This is the stereo recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`.", + ), + ] = None + video_url: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="videoUrl"), + pydantic.Field( + alias="videoUrl", + description="This is the video recording url for the call. To enable, set `assistant.artifactPlan.videoRecordingEnabled`.", + ), + ] = None + video_recording_start_delay_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="videoRecordingStartDelaySeconds"), + pydantic.Field( + alias="videoRecordingStartDelaySeconds", + description="This is video recording start delay in ms. To enable, set `assistant.artifactPlan.videoRecordingEnabled`. This can be used to align the playback of the recording with artifact.messages timestamps.", + ), + ] = None + mono: typing.Optional[Mono] = pydantic.Field(default=None) + """ + This is the mono recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/recording_consent.py b/src/vapi/types/recording_consent.py new file mode 100644 index 00000000..138dde69 --- /dev/null +++ b/src/vapi/types/recording_consent.py @@ -0,0 +1,35 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class RecordingConsent(UncheckedBaseModel): + type: typing.Dict[str, typing.Any] = pydantic.Field() + """ + This is the type of recording consent. + """ + + granted_at: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="grantedAt"), + pydantic.Field( + alias="grantedAt", + description="This is the date and time the recording consent was granted.\nIf not specified, it means the recording consent was not granted.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/recording_consent_plan_stay_on_line.py b/src/vapi/types/recording_consent_plan_stay_on_line.py new file mode 100644 index 00000000..8290702e --- /dev/null +++ b/src/vapi/types/recording_consent_plan_stay_on_line.py @@ -0,0 +1,43 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .recording_consent_plan_stay_on_line_voice import RecordingConsentPlanStayOnLineVoice + + +class RecordingConsentPlanStayOnLine(UncheckedBaseModel): + message: str = pydantic.Field() + """ + This is the message asking for consent to record the call. + If the type is `stay-on-line`, the message should ask the user to hang up if they do not consent. + If the type is `verbal`, the message should ask the user to verbally consent or decline. + """ + + voice: typing.Optional[RecordingConsentPlanStayOnLineVoice] = pydantic.Field(default=None) + """ + This is the voice to use for the consent message. If not specified, inherits from the assistant's voice. + Use a different voice for the consent message for a better user experience. + """ + + wait_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="waitSeconds"), + pydantic.Field( + alias="waitSeconds", + description="Number of seconds to wait before transferring to the assistant if user stays on the call", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/recording_consent_plan_stay_on_line_voice.py b/src/vapi/types/recording_consent_plan_stay_on_line_voice.py new file mode 100644 index 00000000..587a8679 --- /dev/null +++ b/src/vapi/types/recording_consent_plan_stay_on_line_voice.py @@ -0,0 +1,758 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .azure_voice_id import AzureVoiceId +from .cartesia_experimental_controls import CartesiaExperimentalControls +from .cartesia_generation_config import CartesiaGenerationConfig +from .cartesia_voice_language import CartesiaVoiceLanguage +from .cartesia_voice_model import CartesiaVoiceModel +from .chunk_plan import ChunkPlan +from .deepgram_voice_id import DeepgramVoiceId +from .deepgram_voice_model import DeepgramVoiceModel +from .eleven_labs_pronunciation_dictionary_locator import ElevenLabsPronunciationDictionaryLocator +from .eleven_labs_voice_id import ElevenLabsVoiceId +from .eleven_labs_voice_model import ElevenLabsVoiceModel +from .fallback_plan import FallbackPlan +from .hume_voice_model import HumeVoiceModel +from .inworld_voice_language_code import InworldVoiceLanguageCode +from .inworld_voice_model import InworldVoiceModel +from .inworld_voice_voice_id import InworldVoiceVoiceId +from .lmnt_voice_id import LmntVoiceId +from .lmnt_voice_language import LmntVoiceLanguage +from .minimax_voice_language_boost import MinimaxVoiceLanguageBoost +from .minimax_voice_model import MinimaxVoiceModel +from .minimax_voice_region import MinimaxVoiceRegion +from .minimax_voice_subtitle_type import MinimaxVoiceSubtitleType +from .neuphonic_voice_model import NeuphonicVoiceModel +from .open_ai_voice_id import OpenAiVoiceId +from .open_ai_voice_model import OpenAiVoiceModel +from .play_ht_voice_emotion import PlayHtVoiceEmotion +from .play_ht_voice_id import PlayHtVoiceId +from .play_ht_voice_language import PlayHtVoiceLanguage +from .play_ht_voice_model import PlayHtVoiceModel +from .rime_ai_voice_id import RimeAiVoiceId +from .rime_ai_voice_language import RimeAiVoiceLanguage +from .rime_ai_voice_model import RimeAiVoiceModel +from .server import Server +from .sesame_voice_model import SesameVoiceModel +from .smallest_ai_voice_id import SmallestAiVoiceId +from .smallest_ai_voice_model import SmallestAiVoiceModel +from .tavus_conversation_properties import TavusConversationProperties +from .tavus_voice_voice_id import TavusVoiceVoiceId +from .vapi_pronunciation_dictionary_locator import VapiPronunciationDictionaryLocator +from .vapi_voice_voice_id import VapiVoiceVoiceId +from .well_said_voice_model import WellSaidVoiceModel + + +class RecordingConsentPlanStayOnLineVoice_Azure(UncheckedBaseModel): + """ + This is the voice to use for the consent message. If not specified, inherits from the assistant's voice. + Use a different voice for the consent message for a better user experience. + """ + + provider: typing.Literal["azure"] = "azure" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[AzureVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + speed: typing.Optional[float] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class RecordingConsentPlanStayOnLineVoice_Cartesia(UncheckedBaseModel): + """ + This is the voice to use for the consent message. If not specified, inherits from the assistant's voice. + Use a different voice for the consent message for a better user experience. + """ + + provider: typing.Literal["cartesia"] = "cartesia" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[CartesiaVoiceModel] = None + language: typing.Optional[CartesiaVoiceLanguage] = None + experimental_controls: typing_extensions.Annotated[ + typing.Optional[CartesiaExperimentalControls], + FieldMetadata(alias="experimentalControls"), + pydantic.Field(alias="experimentalControls"), + ] = None + generation_config: typing_extensions.Annotated[ + typing.Optional[CartesiaGenerationConfig], + FieldMetadata(alias="generationConfig"), + pydantic.Field(alias="generationConfig"), + ] = None + pronunciation_dict_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="pronunciationDictId"), pydantic.Field(alias="pronunciationDictId") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class RecordingConsentPlanStayOnLineVoice_CustomVoice(UncheckedBaseModel): + """ + This is the voice to use for the consent message. If not specified, inherits from the assistant's voice. + Use a different voice for the consent message for a better user experience. + """ + + provider: typing.Literal["custom-voice"] = "custom-voice" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + server: Server + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class RecordingConsentPlanStayOnLineVoice_Deepgram(UncheckedBaseModel): + """ + This is the voice to use for the consent message. If not specified, inherits from the assistant's voice. + Use a different voice for the consent message for a better user experience. + """ + + provider: typing.Literal["deepgram"] = "deepgram" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + DeepgramVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[DeepgramVoiceModel] = None + mip_opt_out: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="mipOptOut"), pydantic.Field(alias="mipOptOut") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class RecordingConsentPlanStayOnLineVoice_11Labs(UncheckedBaseModel): + """ + This is the voice to use for the consent message. If not specified, inherits from the assistant's voice. + Use a different voice for the consent message for a better user experience. + """ + + provider: typing.Literal["11labs"] = "11labs" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + ElevenLabsVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + stability: typing.Optional[float] = None + similarity_boost: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="similarityBoost"), pydantic.Field(alias="similarityBoost") + ] = None + style: typing.Optional[float] = None + use_speaker_boost: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="useSpeakerBoost"), pydantic.Field(alias="useSpeakerBoost") + ] = None + speed: typing.Optional[float] = None + optimize_streaming_latency: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="optimizeStreamingLatency"), + pydantic.Field(alias="optimizeStreamingLatency"), + ] = None + enable_ssml_parsing: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="enableSsmlParsing"), pydantic.Field(alias="enableSsmlParsing") + ] = None + auto_mode: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="autoMode"), pydantic.Field(alias="autoMode") + ] = None + model: typing.Optional[ElevenLabsVoiceModel] = None + language: typing.Optional[str] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + pronunciation_dictionary_locators: typing_extensions.Annotated[ + typing.Optional[typing.List[ElevenLabsPronunciationDictionaryLocator]], + FieldMetadata(alias="pronunciationDictionaryLocators"), + pydantic.Field(alias="pronunciationDictionaryLocators"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class RecordingConsentPlanStayOnLineVoice_Hume(UncheckedBaseModel): + """ + This is the voice to use for the consent message. If not specified, inherits from the assistant's voice. + Use a different voice for the consent message for a better user experience. + """ + + provider: typing.Literal["hume"] = "hume" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + model: typing.Optional[HumeVoiceModel] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + is_custom_hume_voice: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="isCustomHumeVoice"), pydantic.Field(alias="isCustomHumeVoice") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + description: typing.Optional[str] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class RecordingConsentPlanStayOnLineVoice_Lmnt(UncheckedBaseModel): + """ + This is the voice to use for the consent message. If not specified, inherits from the assistant's voice. + Use a different voice for the consent message for a better user experience. + """ + + provider: typing.Literal["lmnt"] = "lmnt" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[LmntVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + speed: typing.Optional[float] = None + language: typing.Optional[LmntVoiceLanguage] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class RecordingConsentPlanStayOnLineVoice_Neuphonic(UncheckedBaseModel): + """ + This is the voice to use for the consent message. If not specified, inherits from the assistant's voice. + Use a different voice for the consent message for a better user experience. + """ + + provider: typing.Literal["neuphonic"] = "neuphonic" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[NeuphonicVoiceModel] = None + language: typing.Dict[str, typing.Any] + speed: typing.Optional[float] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class RecordingConsentPlanStayOnLineVoice_Openai(UncheckedBaseModel): + """ + This is the voice to use for the consent message. If not specified, inherits from the assistant's voice. + Use a different voice for the consent message for a better user experience. + """ + + provider: typing.Literal["openai"] = "openai" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + OpenAiVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[OpenAiVoiceModel] = None + instructions: typing.Optional[str] = None + speed: typing.Optional[float] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class RecordingConsentPlanStayOnLineVoice_Playht(UncheckedBaseModel): + """ + This is the voice to use for the consent message. If not specified, inherits from the assistant's voice. + Use a different voice for the consent message for a better user experience. + """ + + provider: typing.Literal["playht"] = "playht" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + PlayHtVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + speed: typing.Optional[float] = None + temperature: typing.Optional[float] = None + emotion: typing.Optional[PlayHtVoiceEmotion] = None + voice_guidance: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="voiceGuidance"), pydantic.Field(alias="voiceGuidance") + ] = None + style_guidance: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="styleGuidance"), pydantic.Field(alias="styleGuidance") + ] = None + text_guidance: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="textGuidance"), pydantic.Field(alias="textGuidance") + ] = None + model: typing.Optional[PlayHtVoiceModel] = None + language: typing.Optional[PlayHtVoiceLanguage] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class RecordingConsentPlanStayOnLineVoice_Wellsaid(UncheckedBaseModel): + """ + This is the voice to use for the consent message. If not specified, inherits from the assistant's voice. + Use a different voice for the consent message for a better user experience. + """ + + provider: typing.Literal["wellsaid"] = "wellsaid" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[WellSaidVoiceModel] = None + enable_ssml: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="enableSsml"), pydantic.Field(alias="enableSsml") + ] = None + library_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="libraryIds"), pydantic.Field(alias="libraryIds") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class RecordingConsentPlanStayOnLineVoice_RimeAi(UncheckedBaseModel): + """ + This is the voice to use for the consent message. If not specified, inherits from the assistant's voice. + Use a different voice for the consent message for a better user experience. + """ + + provider: typing.Literal["rime-ai"] = "rime-ai" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + RimeAiVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[RimeAiVoiceModel] = None + speed: typing.Optional[float] = None + pause_between_brackets: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="pauseBetweenBrackets"), pydantic.Field(alias="pauseBetweenBrackets") + ] = None + phonemize_between_brackets: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="phonemizeBetweenBrackets"), + pydantic.Field(alias="phonemizeBetweenBrackets"), + ] = None + reduce_latency: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="reduceLatency"), pydantic.Field(alias="reduceLatency") + ] = None + inline_speed_alpha: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="inlineSpeedAlpha"), pydantic.Field(alias="inlineSpeedAlpha") + ] = None + language: typing.Optional[RimeAiVoiceLanguage] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class RecordingConsentPlanStayOnLineVoice_SmallestAi(UncheckedBaseModel): + """ + This is the voice to use for the consent message. If not specified, inherits from the assistant's voice. + Use a different voice for the consent message for a better user experience. + """ + + provider: typing.Literal["smallest-ai"] = "smallest-ai" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + SmallestAiVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[SmallestAiVoiceModel] = None + speed: typing.Optional[float] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class RecordingConsentPlanStayOnLineVoice_Tavus(UncheckedBaseModel): + """ + This is the voice to use for the consent message. If not specified, inherits from the assistant's voice. + Use a different voice for the consent message for a better user experience. + """ + + provider: typing.Literal["tavus"] = "tavus" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + TavusVoiceVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + persona_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="personaId"), pydantic.Field(alias="personaId") + ] = None + callback_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callbackUrl"), pydantic.Field(alias="callbackUrl") + ] = None + conversation_name: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="conversationName"), pydantic.Field(alias="conversationName") + ] = None + conversational_context: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="conversationalContext"), + pydantic.Field(alias="conversationalContext"), + ] = None + custom_greeting: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="customGreeting"), pydantic.Field(alias="customGreeting") + ] = None + properties: typing.Optional[TavusConversationProperties] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class RecordingConsentPlanStayOnLineVoice_Vapi(UncheckedBaseModel): + """ + This is the voice to use for the consent message. If not specified, inherits from the assistant's voice. + Use a different voice for the consent message for a better user experience. + """ + + provider: typing.Literal["vapi"] = "vapi" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + VapiVoiceVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + speed: typing.Optional[float] = None + pronunciation_dictionary: typing_extensions.Annotated[ + typing.Optional[typing.List[VapiPronunciationDictionaryLocator]], + FieldMetadata(alias="pronunciationDictionary"), + pydantic.Field(alias="pronunciationDictionary"), + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class RecordingConsentPlanStayOnLineVoice_Sesame(UncheckedBaseModel): + """ + This is the voice to use for the consent message. If not specified, inherits from the assistant's voice. + Use a different voice for the consent message for a better user experience. + """ + + provider: typing.Literal["sesame"] = "sesame" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: SesameVoiceModel + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class RecordingConsentPlanStayOnLineVoice_Inworld(UncheckedBaseModel): + """ + This is the voice to use for the consent message. If not specified, inherits from the assistant's voice. + Use a different voice for the consent message for a better user experience. + """ + + provider: typing.Literal["inworld"] = "inworld" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + InworldVoiceVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[InworldVoiceModel] = None + language_code: typing_extensions.Annotated[ + typing.Optional[InworldVoiceLanguageCode], + FieldMetadata(alias="languageCode"), + pydantic.Field(alias="languageCode"), + ] = None + temperature: typing.Optional[float] = None + speaking_rate: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="speakingRate"), pydantic.Field(alias="speakingRate") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class RecordingConsentPlanStayOnLineVoice_Minimax(UncheckedBaseModel): + """ + This is the voice to use for the consent message. If not specified, inherits from the assistant's voice. + Use a different voice for the consent message for a better user experience. + """ + + provider: typing.Literal["minimax"] = "minimax" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[MinimaxVoiceModel] = None + emotion: typing.Optional[str] = None + subtitle_type: typing_extensions.Annotated[ + typing.Optional[MinimaxVoiceSubtitleType], + FieldMetadata(alias="subtitleType"), + pydantic.Field(alias="subtitleType"), + ] = None + pitch: typing.Optional[float] = None + speed: typing.Optional[float] = None + volume: typing.Optional[float] = None + region: typing.Optional[MinimaxVoiceRegion] = None + language_boost: typing_extensions.Annotated[ + typing.Optional[MinimaxVoiceLanguageBoost], + FieldMetadata(alias="languageBoost"), + pydantic.Field(alias="languageBoost"), + ] = None + text_normalization_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="textNormalizationEnabled"), + pydantic.Field(alias="textNormalizationEnabled"), + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +RecordingConsentPlanStayOnLineVoice = typing_extensions.Annotated[ + typing.Union[ + RecordingConsentPlanStayOnLineVoice_Azure, + RecordingConsentPlanStayOnLineVoice_Cartesia, + RecordingConsentPlanStayOnLineVoice_CustomVoice, + RecordingConsentPlanStayOnLineVoice_Deepgram, + RecordingConsentPlanStayOnLineVoice_11Labs, + RecordingConsentPlanStayOnLineVoice_Hume, + RecordingConsentPlanStayOnLineVoice_Lmnt, + RecordingConsentPlanStayOnLineVoice_Neuphonic, + RecordingConsentPlanStayOnLineVoice_Openai, + RecordingConsentPlanStayOnLineVoice_Playht, + RecordingConsentPlanStayOnLineVoice_Wellsaid, + RecordingConsentPlanStayOnLineVoice_RimeAi, + RecordingConsentPlanStayOnLineVoice_SmallestAi, + RecordingConsentPlanStayOnLineVoice_Tavus, + RecordingConsentPlanStayOnLineVoice_Vapi, + RecordingConsentPlanStayOnLineVoice_Sesame, + RecordingConsentPlanStayOnLineVoice_Inworld, + RecordingConsentPlanStayOnLineVoice_Minimax, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/recording_consent_plan_verbal.py b/src/vapi/types/recording_consent_plan_verbal.py new file mode 100644 index 00000000..ce1a491a --- /dev/null +++ b/src/vapi/types/recording_consent_plan_verbal.py @@ -0,0 +1,48 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .recording_consent_plan_verbal_voice import RecordingConsentPlanVerbalVoice + + +class RecordingConsentPlanVerbal(UncheckedBaseModel): + message: str = pydantic.Field() + """ + This is the message asking for consent to record the call. + If the type is `stay-on-line`, the message should ask the user to hang up if they do not consent. + If the type is `verbal`, the message should ask the user to verbally consent or decline. + """ + + voice: typing.Optional[RecordingConsentPlanVerbalVoice] = pydantic.Field(default=None) + """ + This is the voice to use for the consent message. If not specified, inherits from the assistant's voice. + Use a different voice for the consent message for a better user experience. + """ + + decline_tool: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="declineTool"), + pydantic.Field(alias="declineTool", description="Tool to execute if user verbally declines recording consent"), + ] = None + decline_tool_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="declineToolId"), + pydantic.Field( + alias="declineToolId", + description="ID of existing tool to execute if user verbally declines recording consent", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/recording_consent_plan_verbal_voice.py b/src/vapi/types/recording_consent_plan_verbal_voice.py new file mode 100644 index 00000000..6aa5b2c8 --- /dev/null +++ b/src/vapi/types/recording_consent_plan_verbal_voice.py @@ -0,0 +1,758 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .azure_voice_id import AzureVoiceId +from .cartesia_experimental_controls import CartesiaExperimentalControls +from .cartesia_generation_config import CartesiaGenerationConfig +from .cartesia_voice_language import CartesiaVoiceLanguage +from .cartesia_voice_model import CartesiaVoiceModel +from .chunk_plan import ChunkPlan +from .deepgram_voice_id import DeepgramVoiceId +from .deepgram_voice_model import DeepgramVoiceModel +from .eleven_labs_pronunciation_dictionary_locator import ElevenLabsPronunciationDictionaryLocator +from .eleven_labs_voice_id import ElevenLabsVoiceId +from .eleven_labs_voice_model import ElevenLabsVoiceModel +from .fallback_plan import FallbackPlan +from .hume_voice_model import HumeVoiceModel +from .inworld_voice_language_code import InworldVoiceLanguageCode +from .inworld_voice_model import InworldVoiceModel +from .inworld_voice_voice_id import InworldVoiceVoiceId +from .lmnt_voice_id import LmntVoiceId +from .lmnt_voice_language import LmntVoiceLanguage +from .minimax_voice_language_boost import MinimaxVoiceLanguageBoost +from .minimax_voice_model import MinimaxVoiceModel +from .minimax_voice_region import MinimaxVoiceRegion +from .minimax_voice_subtitle_type import MinimaxVoiceSubtitleType +from .neuphonic_voice_model import NeuphonicVoiceModel +from .open_ai_voice_id import OpenAiVoiceId +from .open_ai_voice_model import OpenAiVoiceModel +from .play_ht_voice_emotion import PlayHtVoiceEmotion +from .play_ht_voice_id import PlayHtVoiceId +from .play_ht_voice_language import PlayHtVoiceLanguage +from .play_ht_voice_model import PlayHtVoiceModel +from .rime_ai_voice_id import RimeAiVoiceId +from .rime_ai_voice_language import RimeAiVoiceLanguage +from .rime_ai_voice_model import RimeAiVoiceModel +from .server import Server +from .sesame_voice_model import SesameVoiceModel +from .smallest_ai_voice_id import SmallestAiVoiceId +from .smallest_ai_voice_model import SmallestAiVoiceModel +from .tavus_conversation_properties import TavusConversationProperties +from .tavus_voice_voice_id import TavusVoiceVoiceId +from .vapi_pronunciation_dictionary_locator import VapiPronunciationDictionaryLocator +from .vapi_voice_voice_id import VapiVoiceVoiceId +from .well_said_voice_model import WellSaidVoiceModel + + +class RecordingConsentPlanVerbalVoice_Azure(UncheckedBaseModel): + """ + This is the voice to use for the consent message. If not specified, inherits from the assistant's voice. + Use a different voice for the consent message for a better user experience. + """ + + provider: typing.Literal["azure"] = "azure" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[AzureVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + speed: typing.Optional[float] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class RecordingConsentPlanVerbalVoice_Cartesia(UncheckedBaseModel): + """ + This is the voice to use for the consent message. If not specified, inherits from the assistant's voice. + Use a different voice for the consent message for a better user experience. + """ + + provider: typing.Literal["cartesia"] = "cartesia" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[CartesiaVoiceModel] = None + language: typing.Optional[CartesiaVoiceLanguage] = None + experimental_controls: typing_extensions.Annotated[ + typing.Optional[CartesiaExperimentalControls], + FieldMetadata(alias="experimentalControls"), + pydantic.Field(alias="experimentalControls"), + ] = None + generation_config: typing_extensions.Annotated[ + typing.Optional[CartesiaGenerationConfig], + FieldMetadata(alias="generationConfig"), + pydantic.Field(alias="generationConfig"), + ] = None + pronunciation_dict_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="pronunciationDictId"), pydantic.Field(alias="pronunciationDictId") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class RecordingConsentPlanVerbalVoice_CustomVoice(UncheckedBaseModel): + """ + This is the voice to use for the consent message. If not specified, inherits from the assistant's voice. + Use a different voice for the consent message for a better user experience. + """ + + provider: typing.Literal["custom-voice"] = "custom-voice" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + server: Server + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class RecordingConsentPlanVerbalVoice_Deepgram(UncheckedBaseModel): + """ + This is the voice to use for the consent message. If not specified, inherits from the assistant's voice. + Use a different voice for the consent message for a better user experience. + """ + + provider: typing.Literal["deepgram"] = "deepgram" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + DeepgramVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[DeepgramVoiceModel] = None + mip_opt_out: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="mipOptOut"), pydantic.Field(alias="mipOptOut") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class RecordingConsentPlanVerbalVoice_11Labs(UncheckedBaseModel): + """ + This is the voice to use for the consent message. If not specified, inherits from the assistant's voice. + Use a different voice for the consent message for a better user experience. + """ + + provider: typing.Literal["11labs"] = "11labs" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + ElevenLabsVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + stability: typing.Optional[float] = None + similarity_boost: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="similarityBoost"), pydantic.Field(alias="similarityBoost") + ] = None + style: typing.Optional[float] = None + use_speaker_boost: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="useSpeakerBoost"), pydantic.Field(alias="useSpeakerBoost") + ] = None + speed: typing.Optional[float] = None + optimize_streaming_latency: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="optimizeStreamingLatency"), + pydantic.Field(alias="optimizeStreamingLatency"), + ] = None + enable_ssml_parsing: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="enableSsmlParsing"), pydantic.Field(alias="enableSsmlParsing") + ] = None + auto_mode: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="autoMode"), pydantic.Field(alias="autoMode") + ] = None + model: typing.Optional[ElevenLabsVoiceModel] = None + language: typing.Optional[str] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + pronunciation_dictionary_locators: typing_extensions.Annotated[ + typing.Optional[typing.List[ElevenLabsPronunciationDictionaryLocator]], + FieldMetadata(alias="pronunciationDictionaryLocators"), + pydantic.Field(alias="pronunciationDictionaryLocators"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class RecordingConsentPlanVerbalVoice_Hume(UncheckedBaseModel): + """ + This is the voice to use for the consent message. If not specified, inherits from the assistant's voice. + Use a different voice for the consent message for a better user experience. + """ + + provider: typing.Literal["hume"] = "hume" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + model: typing.Optional[HumeVoiceModel] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + is_custom_hume_voice: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="isCustomHumeVoice"), pydantic.Field(alias="isCustomHumeVoice") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + description: typing.Optional[str] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class RecordingConsentPlanVerbalVoice_Lmnt(UncheckedBaseModel): + """ + This is the voice to use for the consent message. If not specified, inherits from the assistant's voice. + Use a different voice for the consent message for a better user experience. + """ + + provider: typing.Literal["lmnt"] = "lmnt" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[LmntVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + speed: typing.Optional[float] = None + language: typing.Optional[LmntVoiceLanguage] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class RecordingConsentPlanVerbalVoice_Neuphonic(UncheckedBaseModel): + """ + This is the voice to use for the consent message. If not specified, inherits from the assistant's voice. + Use a different voice for the consent message for a better user experience. + """ + + provider: typing.Literal["neuphonic"] = "neuphonic" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[NeuphonicVoiceModel] = None + language: typing.Dict[str, typing.Any] + speed: typing.Optional[float] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class RecordingConsentPlanVerbalVoice_Openai(UncheckedBaseModel): + """ + This is the voice to use for the consent message. If not specified, inherits from the assistant's voice. + Use a different voice for the consent message for a better user experience. + """ + + provider: typing.Literal["openai"] = "openai" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + OpenAiVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[OpenAiVoiceModel] = None + instructions: typing.Optional[str] = None + speed: typing.Optional[float] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class RecordingConsentPlanVerbalVoice_Playht(UncheckedBaseModel): + """ + This is the voice to use for the consent message. If not specified, inherits from the assistant's voice. + Use a different voice for the consent message for a better user experience. + """ + + provider: typing.Literal["playht"] = "playht" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + PlayHtVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + speed: typing.Optional[float] = None + temperature: typing.Optional[float] = None + emotion: typing.Optional[PlayHtVoiceEmotion] = None + voice_guidance: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="voiceGuidance"), pydantic.Field(alias="voiceGuidance") + ] = None + style_guidance: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="styleGuidance"), pydantic.Field(alias="styleGuidance") + ] = None + text_guidance: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="textGuidance"), pydantic.Field(alias="textGuidance") + ] = None + model: typing.Optional[PlayHtVoiceModel] = None + language: typing.Optional[PlayHtVoiceLanguage] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class RecordingConsentPlanVerbalVoice_Wellsaid(UncheckedBaseModel): + """ + This is the voice to use for the consent message. If not specified, inherits from the assistant's voice. + Use a different voice for the consent message for a better user experience. + """ + + provider: typing.Literal["wellsaid"] = "wellsaid" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[WellSaidVoiceModel] = None + enable_ssml: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="enableSsml"), pydantic.Field(alias="enableSsml") + ] = None + library_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="libraryIds"), pydantic.Field(alias="libraryIds") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class RecordingConsentPlanVerbalVoice_RimeAi(UncheckedBaseModel): + """ + This is the voice to use for the consent message. If not specified, inherits from the assistant's voice. + Use a different voice for the consent message for a better user experience. + """ + + provider: typing.Literal["rime-ai"] = "rime-ai" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + RimeAiVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[RimeAiVoiceModel] = None + speed: typing.Optional[float] = None + pause_between_brackets: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="pauseBetweenBrackets"), pydantic.Field(alias="pauseBetweenBrackets") + ] = None + phonemize_between_brackets: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="phonemizeBetweenBrackets"), + pydantic.Field(alias="phonemizeBetweenBrackets"), + ] = None + reduce_latency: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="reduceLatency"), pydantic.Field(alias="reduceLatency") + ] = None + inline_speed_alpha: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="inlineSpeedAlpha"), pydantic.Field(alias="inlineSpeedAlpha") + ] = None + language: typing.Optional[RimeAiVoiceLanguage] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class RecordingConsentPlanVerbalVoice_SmallestAi(UncheckedBaseModel): + """ + This is the voice to use for the consent message. If not specified, inherits from the assistant's voice. + Use a different voice for the consent message for a better user experience. + """ + + provider: typing.Literal["smallest-ai"] = "smallest-ai" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + SmallestAiVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[SmallestAiVoiceModel] = None + speed: typing.Optional[float] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class RecordingConsentPlanVerbalVoice_Tavus(UncheckedBaseModel): + """ + This is the voice to use for the consent message. If not specified, inherits from the assistant's voice. + Use a different voice for the consent message for a better user experience. + """ + + provider: typing.Literal["tavus"] = "tavus" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + TavusVoiceVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + persona_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="personaId"), pydantic.Field(alias="personaId") + ] = None + callback_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callbackUrl"), pydantic.Field(alias="callbackUrl") + ] = None + conversation_name: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="conversationName"), pydantic.Field(alias="conversationName") + ] = None + conversational_context: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="conversationalContext"), + pydantic.Field(alias="conversationalContext"), + ] = None + custom_greeting: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="customGreeting"), pydantic.Field(alias="customGreeting") + ] = None + properties: typing.Optional[TavusConversationProperties] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class RecordingConsentPlanVerbalVoice_Vapi(UncheckedBaseModel): + """ + This is the voice to use for the consent message. If not specified, inherits from the assistant's voice. + Use a different voice for the consent message for a better user experience. + """ + + provider: typing.Literal["vapi"] = "vapi" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + VapiVoiceVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + speed: typing.Optional[float] = None + pronunciation_dictionary: typing_extensions.Annotated[ + typing.Optional[typing.List[VapiPronunciationDictionaryLocator]], + FieldMetadata(alias="pronunciationDictionary"), + pydantic.Field(alias="pronunciationDictionary"), + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class RecordingConsentPlanVerbalVoice_Sesame(UncheckedBaseModel): + """ + This is the voice to use for the consent message. If not specified, inherits from the assistant's voice. + Use a different voice for the consent message for a better user experience. + """ + + provider: typing.Literal["sesame"] = "sesame" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: SesameVoiceModel + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class RecordingConsentPlanVerbalVoice_Inworld(UncheckedBaseModel): + """ + This is the voice to use for the consent message. If not specified, inherits from the assistant's voice. + Use a different voice for the consent message for a better user experience. + """ + + provider: typing.Literal["inworld"] = "inworld" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + InworldVoiceVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[InworldVoiceModel] = None + language_code: typing_extensions.Annotated[ + typing.Optional[InworldVoiceLanguageCode], + FieldMetadata(alias="languageCode"), + pydantic.Field(alias="languageCode"), + ] = None + temperature: typing.Optional[float] = None + speaking_rate: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="speakingRate"), pydantic.Field(alias="speakingRate") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class RecordingConsentPlanVerbalVoice_Minimax(UncheckedBaseModel): + """ + This is the voice to use for the consent message. If not specified, inherits from the assistant's voice. + Use a different voice for the consent message for a better user experience. + """ + + provider: typing.Literal["minimax"] = "minimax" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[MinimaxVoiceModel] = None + emotion: typing.Optional[str] = None + subtitle_type: typing_extensions.Annotated[ + typing.Optional[MinimaxVoiceSubtitleType], + FieldMetadata(alias="subtitleType"), + pydantic.Field(alias="subtitleType"), + ] = None + pitch: typing.Optional[float] = None + speed: typing.Optional[float] = None + volume: typing.Optional[float] = None + region: typing.Optional[MinimaxVoiceRegion] = None + language_boost: typing_extensions.Annotated[ + typing.Optional[MinimaxVoiceLanguageBoost], + FieldMetadata(alias="languageBoost"), + pydantic.Field(alias="languageBoost"), + ] = None + text_normalization_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="textNormalizationEnabled"), + pydantic.Field(alias="textNormalizationEnabled"), + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +RecordingConsentPlanVerbalVoice = typing_extensions.Annotated[ + typing.Union[ + RecordingConsentPlanVerbalVoice_Azure, + RecordingConsentPlanVerbalVoice_Cartesia, + RecordingConsentPlanVerbalVoice_CustomVoice, + RecordingConsentPlanVerbalVoice_Deepgram, + RecordingConsentPlanVerbalVoice_11Labs, + RecordingConsentPlanVerbalVoice_Hume, + RecordingConsentPlanVerbalVoice_Lmnt, + RecordingConsentPlanVerbalVoice_Neuphonic, + RecordingConsentPlanVerbalVoice_Openai, + RecordingConsentPlanVerbalVoice_Playht, + RecordingConsentPlanVerbalVoice_Wellsaid, + RecordingConsentPlanVerbalVoice_RimeAi, + RecordingConsentPlanVerbalVoice_SmallestAi, + RecordingConsentPlanVerbalVoice_Tavus, + RecordingConsentPlanVerbalVoice_Vapi, + RecordingConsentPlanVerbalVoice_Sesame, + RecordingConsentPlanVerbalVoice_Inworld, + RecordingConsentPlanVerbalVoice_Minimax, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/regex_condition.py b/src/vapi/types/regex_condition.py new file mode 100644 index 00000000..d8dd2658 --- /dev/null +++ b/src/vapi/types/regex_condition.py @@ -0,0 +1,49 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .message_target import MessageTarget + + +class RegexCondition(UncheckedBaseModel): + regex: str = pydantic.Field() + """ + This is the regular expression pattern to match against message content. + + Note: + - This works by using the RegExp.test method in Node.JS. Eg. /hello/.test("hello there") will return true. + + Hot tips: + - In JavaScript, escape \\ when sending the regex pattern. Eg. "hello\\sthere" will be sent over the wire as "hellosthere". Send "hello\\\\sthere" instead. + - RegExp.test does substring matching, so /cat/.test("I love cats") will return true. To do full string matching, use anchors: /^cat$/ will only match exactly "cat". + - Word boundaries \\b are useful for matching whole words: /\\bcat\\b/ matches "cat" but not "cats" or "category". + - Use inline flags for portability: (?i) for case insensitive, (?m) for multiline + """ + + target: typing.Optional[MessageTarget] = pydantic.Field(default=None) + """ + This is the target for messages to check against. + If not specified, the condition will run on the last message (position: -1). + If role is not specified, it will look at the last message regardless of role. + @default { position: -1 } + """ + + negate: typing.Optional[bool] = pydantic.Field(default=None) + """ + This is the flag that when true, the condition matches if the pattern does NOT match. + Useful for ensuring certain words/phrases are absent. + + @default false + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/regex_option.py b/src/vapi/types/regex_option.py index d47d7519..b2821094 100644 --- a/src/vapi/types/regex_option.py +++ b/src/vapi/types/regex_option.py @@ -1,18 +1,18 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -from .regex_option_type import RegexOptionType +import typing + import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 -import typing +from ..core.unchecked_base_model import UncheckedBaseModel +from .regex_option_type import RegexOptionType -class RegexOption(UniversalBaseModel): +class RegexOption(UncheckedBaseModel): type: RegexOptionType = pydantic.Field() """ This is the type of the regex option. Options are: - - - `ignore-case`: Ignores the case of the text being matched. + - `ignore-case`: Ignores the case of the text being matched. Add - `whole-word`: Matches whole words only. - `multi-line`: Matches across multiple lines. """ diff --git a/src/vapi/types/regex_replacement.py b/src/vapi/types/regex_replacement.py index ea5c525b..486e8353 100644 --- a/src/vapi/types/regex_replacement.py +++ b/src/vapi/types/regex_replacement.py @@ -1,34 +1,28 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing + import pydantic -from .regex_option import RegexOption from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .regex_option import RegexOption -class RegexReplacement(UniversalBaseModel): - type: typing.Literal["regex"] = pydantic.Field(default="regex") - """ - This is the regex replacement type. You can use this to replace a word or phrase that matches a pattern. - - Usage: - - - Replace all numbers with "some number": { type: 'regex', regex: '\\d+', value: 'some number' } - - Replace email addresses with "[EMAIL]": { type: 'regex', regex: '\\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Z|a-z]{2,}\\b', value: '[EMAIL]' } - - Replace phone numbers with a formatted version: { type: 'regex', regex: '(\\d{3})(\\d{3})(\\d{4})', value: '($1) $2-$3' } - - Replace all instances of "color" or "colour" with "hue": { type: 'regex', regex: 'colou?r', value: 'hue' } - - Capitalize the first letter of every sentence: { type: 'regex', regex: '(?<=\\. |^)[a-z]', value: (match) => match.toUpperCase() } - """ - +class RegexReplacement(UncheckedBaseModel): regex: str = pydantic.Field() """ This is the regex pattern to replace. + + Note: + - This works by using the `string.replace` method in Node.JS. Eg. `"hello there".replace(/hello/g, "hi")` will return `"hi there"`. + + Hot tip: + - In JavaScript, escape `\\` when sending the regex pattern. Eg. `"hello\\sthere"` will be sent over the wire as `"hellosthere"`. Send `"hello\\\\sthere"` instead. """ options: typing.Optional[typing.List[RegexOption]] = pydantic.Field(default=None) """ - These are the options for the regex replacement. Default all options are disabled. + These are the options for the regex replacement. Defaults to all disabled. @default [] """ diff --git a/src/vapi/types/regex_security_filter.py b/src/vapi/types/regex_security_filter.py new file mode 100644 index 00000000..f59f43a3 --- /dev/null +++ b/src/vapi/types/regex_security_filter.py @@ -0,0 +1,29 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .regex_security_filter_type import RegexSecurityFilterType + + +class RegexSecurityFilter(UncheckedBaseModel): + type: RegexSecurityFilterType = pydantic.Field() + """ + The type of security threat to filter. + """ + + regex: str = pydantic.Field() + """ + The regex pattern to filter. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/regex_security_filter_type.py b/src/vapi/types/regex_security_filter_type.py new file mode 100644 index 00000000..37ad7bf4 --- /dev/null +++ b/src/vapi/types/regex_security_filter_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +RegexSecurityFilterType = typing.Union[typing.Literal["regex"], typing.Any] diff --git a/src/vapi/types/relay_command_note.py b/src/vapi/types/relay_command_note.py new file mode 100644 index 00000000..fa801497 --- /dev/null +++ b/src/vapi/types/relay_command_note.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class RelayCommandNote(UncheckedBaseModel): + content: str = pydantic.Field() + """ + The note content to add to the conversation + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/relay_command_options.py b/src/vapi/types/relay_command_options.py new file mode 100644 index 00000000..c1c3b4f9 --- /dev/null +++ b/src/vapi/types/relay_command_options.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .relay_command_options_type import RelayCommandOptionsType + + +class RelayCommandOptions(UncheckedBaseModel): + type: RelayCommandOptionsType + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/relay_command_options_type.py b/src/vapi/types/relay_command_options_type.py new file mode 100644 index 00000000..db470d47 --- /dev/null +++ b/src/vapi/types/relay_command_options_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +RelayCommandOptionsType = typing.Union[typing.Literal["say", "message.add"], typing.Any] diff --git a/src/vapi/types/relay_command_say.py b/src/vapi/types/relay_command_say.py new file mode 100644 index 00000000..882a27a0 --- /dev/null +++ b/src/vapi/types/relay_command_say.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class RelayCommandSay(UncheckedBaseModel): + content: str = pydantic.Field() + """ + The content for the assistant to speak + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/relay_request.py b/src/vapi/types/relay_request.py new file mode 100644 index 00000000..b4e11255 --- /dev/null +++ b/src/vapi/types/relay_request.py @@ -0,0 +1,42 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .relay_request_commands_item import RelayRequestCommandsItem +from .relay_request_target import RelayRequestTarget + + +class RelayRequest(UncheckedBaseModel): + source: str = pydantic.Field() + """ + The source identifier of the relay request + """ + + target: RelayRequestTarget = pydantic.Field() + """ + The target assistant or squad to relay the commands to + """ + + customer_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="customerId"), + pydantic.Field(alias="customerId", description="The unique identifier of the customer"), + ] + commands: typing.List[RelayRequestCommandsItem] = pydantic.Field() + """ + The list of commands to relay to the target + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/relay_request_commands_item.py b/src/vapi/types/relay_request_commands_item.py new file mode 100644 index 00000000..6d6536b5 --- /dev/null +++ b/src/vapi/types/relay_request_commands_item.py @@ -0,0 +1,43 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class RelayRequestCommandsItem_Say(UncheckedBaseModel): + type: typing.Literal["say"] = "say" + content: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class RelayRequestCommandsItem_MessageAdd(UncheckedBaseModel): + type: typing.Literal["message.add"] = "message.add" + content: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +RelayRequestCommandsItem = typing_extensions.Annotated[ + typing.Union[RelayRequestCommandsItem_Say, RelayRequestCommandsItem_MessageAdd], UnionMetadata(discriminant="type") +] diff --git a/src/vapi/types/relay_request_target.py b/src/vapi/types/relay_request_target.py new file mode 100644 index 00000000..ceaa2db0 --- /dev/null +++ b/src/vapi/types/relay_request_target.py @@ -0,0 +1,62 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class RelayRequestTarget_Assistant(UncheckedBaseModel): + """ + The target assistant or squad to relay the commands to + """ + + type: typing.Literal["assistant"] = "assistant" + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + assistant_name: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantName"), pydantic.Field(alias="assistantName") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class RelayRequestTarget_Squad(UncheckedBaseModel): + """ + The target assistant or squad to relay the commands to + """ + + type: typing.Literal["squad"] = "squad" + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + squad_name: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadName"), pydantic.Field(alias="squadName") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +RelayRequestTarget = typing_extensions.Annotated[ + typing.Union[RelayRequestTarget_Assistant, RelayRequestTarget_Squad], UnionMetadata(discriminant="type") +] diff --git a/src/vapi/types/relay_response.py b/src/vapi/types/relay_response.py new file mode 100644 index 00000000..caa4b5ca --- /dev/null +++ b/src/vapi/types/relay_response.py @@ -0,0 +1,42 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .relay_response_status import RelayResponseStatus + + +class RelayResponse(UncheckedBaseModel): + status: RelayResponseStatus = pydantic.Field() + """ + The status of the relay request + """ + + call_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="callId"), + pydantic.Field(alias="callId", description="The unique identifier of the call, if delivered to a live call"), + ] = None + session_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="sessionId"), + pydantic.Field( + alias="sessionId", description="The unique identifier of the session, if delivered to a headless session" + ), + ] = None + chat_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="chatId"), pydantic.Field(alias="chatId") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/relay_response_status.py b/src/vapi/types/relay_response_status.py new file mode 100644 index 00000000..4e6a3912 --- /dev/null +++ b/src/vapi/types/relay_response_status.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +RelayResponseStatus = typing.Union[typing.Literal["deliveredLive", "deliveredHeadless", "failed"], typing.Any] diff --git a/src/vapi/types/relay_target_assistant.py b/src/vapi/types/relay_target_assistant.py new file mode 100644 index 00000000..de3ff48b --- /dev/null +++ b/src/vapi/types/relay_target_assistant.py @@ -0,0 +1,31 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class RelayTargetAssistant(UncheckedBaseModel): + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assistantId"), + pydantic.Field(alias="assistantId", description="The unique identifier of the assistant"), + ] = None + assistant_name: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assistantName"), + pydantic.Field(alias="assistantName", description="The name of the assistant"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/relay_target_options.py b/src/vapi/types/relay_target_options.py new file mode 100644 index 00000000..d7bc24ee --- /dev/null +++ b/src/vapi/types/relay_target_options.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .relay_target_options_type import RelayTargetOptionsType + + +class RelayTargetOptions(UncheckedBaseModel): + type: RelayTargetOptionsType + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/relay_target_options_type.py b/src/vapi/types/relay_target_options_type.py new file mode 100644 index 00000000..9730cf97 --- /dev/null +++ b/src/vapi/types/relay_target_options_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +RelayTargetOptionsType = typing.Union[typing.Literal["assistant", "squad"], typing.Any] diff --git a/src/vapi/types/relay_target_squad.py b/src/vapi/types/relay_target_squad.py new file mode 100644 index 00000000..2d03b5e5 --- /dev/null +++ b/src/vapi/types/relay_target_squad.py @@ -0,0 +1,31 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class RelayTargetSquad(UncheckedBaseModel): + squad_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="squadId"), + pydantic.Field(alias="squadId", description="The unique identifier of the squad"), + ] = None + squad_name: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="squadName"), + pydantic.Field(alias="squadName", description="The name of the squad"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/response_completed_event.py b/src/vapi/types/response_completed_event.py new file mode 100644 index 00000000..f6a1d51d --- /dev/null +++ b/src/vapi/types/response_completed_event.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .response_completed_event_type import ResponseCompletedEventType +from .response_object import ResponseObject + + +class ResponseCompletedEvent(UncheckedBaseModel): + response: ResponseObject = pydantic.Field() + """ + The completed response + """ + + type: ResponseCompletedEventType = pydantic.Field() + """ + Event type + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/response_completed_event_type.py b/src/vapi/types/response_completed_event_type.py new file mode 100644 index 00000000..89a05741 --- /dev/null +++ b/src/vapi/types/response_completed_event_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ResponseCompletedEventType = typing.Union[typing.Literal["response.completed"], typing.Any] diff --git a/src/vapi/types/response_error_event.py b/src/vapi/types/response_error_event.py new file mode 100644 index 00000000..7f853a50 --- /dev/null +++ b/src/vapi/types/response_error_event.py @@ -0,0 +1,44 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .response_error_event_type import ResponseErrorEventType + + +class ResponseErrorEvent(UncheckedBaseModel): + type: ResponseErrorEventType = pydantic.Field() + """ + Event type + """ + + code: str = pydantic.Field() + """ + Error code + """ + + message: str = pydantic.Field() + """ + Error message + """ + + param: typing.Optional[str] = pydantic.Field(default=None) + """ + Parameter that caused the error + """ + + sequence_number: float = pydantic.Field() + """ + Sequence number of the event + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/response_error_event_type.py b/src/vapi/types/response_error_event_type.py new file mode 100644 index 00000000..5d7618c4 --- /dev/null +++ b/src/vapi/types/response_error_event_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ResponseErrorEventType = typing.Union[typing.Literal["error"], typing.Any] diff --git a/src/vapi/types/response_object.py b/src/vapi/types/response_object.py new file mode 100644 index 00000000..dddb9fe7 --- /dev/null +++ b/src/vapi/types/response_object.py @@ -0,0 +1,51 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .response_object_object import ResponseObjectObject +from .response_object_status import ResponseObjectStatus +from .response_output_message import ResponseOutputMessage + + +class ResponseObject(UncheckedBaseModel): + id: str = pydantic.Field() + """ + Unique identifier for this Response + """ + + object: ResponseObjectObject = pydantic.Field() + """ + The object type + """ + + created_at: float = pydantic.Field() + """ + Unix timestamp (in seconds) of when this Response was created + """ + + status: ResponseObjectStatus = pydantic.Field() + """ + Status of the response + """ + + error: typing.Optional[str] = pydantic.Field(default=None) + """ + Error message if the response failed + """ + + output: typing.List[ResponseOutputMessage] = pydantic.Field() + """ + Output messages from the model + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/response_object_object.py b/src/vapi/types/response_object_object.py new file mode 100644 index 00000000..8d6da312 --- /dev/null +++ b/src/vapi/types/response_object_object.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ResponseObjectObject = typing.Union[typing.Literal["response"], typing.Any] diff --git a/src/vapi/types/response_object_status.py b/src/vapi/types/response_object_status.py new file mode 100644 index 00000000..2da2ed2b --- /dev/null +++ b/src/vapi/types/response_object_status.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ResponseObjectStatus = typing.Union[typing.Literal["completed", "failed", "in_progress", "incomplete"], typing.Any] diff --git a/src/vapi/types/response_output_message.py b/src/vapi/types/response_output_message.py new file mode 100644 index 00000000..2d7a621b --- /dev/null +++ b/src/vapi/types/response_output_message.py @@ -0,0 +1,47 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .response_output_message_role import ResponseOutputMessageRole +from .response_output_message_status import ResponseOutputMessageStatus +from .response_output_message_type import ResponseOutputMessageType +from .response_output_text import ResponseOutputText + + +class ResponseOutputMessage(UncheckedBaseModel): + id: str = pydantic.Field() + """ + The unique ID of the output message + """ + + content: typing.List[ResponseOutputText] = pydantic.Field() + """ + Content of the output message + """ + + role: ResponseOutputMessageRole = pydantic.Field() + """ + The role of the output message + """ + + status: ResponseOutputMessageStatus = pydantic.Field() + """ + The status of the message + """ + + type: ResponseOutputMessageType = pydantic.Field() + """ + The type of the output message + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/response_output_message_role.py b/src/vapi/types/response_output_message_role.py new file mode 100644 index 00000000..79a36390 --- /dev/null +++ b/src/vapi/types/response_output_message_role.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ResponseOutputMessageRole = typing.Union[typing.Literal["assistant"], typing.Any] diff --git a/src/vapi/types/response_output_message_status.py b/src/vapi/types/response_output_message_status.py new file mode 100644 index 00000000..7890edc2 --- /dev/null +++ b/src/vapi/types/response_output_message_status.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ResponseOutputMessageStatus = typing.Union[typing.Literal["in_progress", "completed", "incomplete"], typing.Any] diff --git a/src/vapi/types/response_output_message_type.py b/src/vapi/types/response_output_message_type.py new file mode 100644 index 00000000..d7c3097f --- /dev/null +++ b/src/vapi/types/response_output_message_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ResponseOutputMessageType = typing.Union[typing.Literal["message"], typing.Any] diff --git a/src/vapi/types/response_output_text.py b/src/vapi/types/response_output_text.py new file mode 100644 index 00000000..4b106ec5 --- /dev/null +++ b/src/vapi/types/response_output_text.py @@ -0,0 +1,34 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .response_output_text_type import ResponseOutputTextType + + +class ResponseOutputText(UncheckedBaseModel): + annotations: typing.List[typing.Dict[str, typing.Any]] = pydantic.Field() + """ + Annotations in the text output + """ + + text: str = pydantic.Field() + """ + The text output from the model + """ + + type: ResponseOutputTextType = pydantic.Field() + """ + The type of the output text + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/response_output_text_type.py b/src/vapi/types/response_output_text_type.py new file mode 100644 index 00000000..5054c90f --- /dev/null +++ b/src/vapi/types/response_output_text_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ResponseOutputTextType = typing.Union[typing.Literal["output_text"], typing.Any] diff --git a/src/vapi/types/response_text_delta_event.py b/src/vapi/types/response_text_delta_event.py new file mode 100644 index 00000000..c09d6f0b --- /dev/null +++ b/src/vapi/types/response_text_delta_event.py @@ -0,0 +1,44 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .response_text_delta_event_type import ResponseTextDeltaEventType + + +class ResponseTextDeltaEvent(UncheckedBaseModel): + content_index: float = pydantic.Field() + """ + Index of the content part + """ + + delta: str = pydantic.Field() + """ + Text delta being added + """ + + item_id: str = pydantic.Field() + """ + ID of the output item + """ + + output_index: float = pydantic.Field() + """ + Index of the output item + """ + + type: ResponseTextDeltaEventType = pydantic.Field() + """ + Event type + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/response_text_delta_event_type.py b/src/vapi/types/response_text_delta_event_type.py new file mode 100644 index 00000000..28bce004 --- /dev/null +++ b/src/vapi/types/response_text_delta_event_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ResponseTextDeltaEventType = typing.Union[typing.Literal["response.output_text.delta"], typing.Any] diff --git a/src/vapi/types/response_text_done_event.py b/src/vapi/types/response_text_done_event.py new file mode 100644 index 00000000..dbfee1dd --- /dev/null +++ b/src/vapi/types/response_text_done_event.py @@ -0,0 +1,44 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .response_text_done_event_type import ResponseTextDoneEventType + + +class ResponseTextDoneEvent(UncheckedBaseModel): + content_index: float = pydantic.Field() + """ + Index of the content part + """ + + item_id: str = pydantic.Field() + """ + ID of the output item + """ + + output_index: float = pydantic.Field() + """ + Index of the output item + """ + + text: str = pydantic.Field() + """ + Complete text content + """ + + type: ResponseTextDoneEventType = pydantic.Field() + """ + Event type + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/response_text_done_event_type.py b/src/vapi/types/response_text_done_event_type.py new file mode 100644 index 00000000..d79f67a7 --- /dev/null +++ b/src/vapi/types/response_text_done_event_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ResponseTextDoneEventType = typing.Union[typing.Literal["response.output_text.done"], typing.Any] diff --git a/src/vapi/types/rime_ai_credential.py b/src/vapi/types/rime_ai_credential.py index bb8acd74..b097f71a 100644 --- a/src/vapi/types/rime_ai_credential.py +++ b/src/vapi/types/rime_ai_credential.py @@ -1,39 +1,53 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +import datetime as dt import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic -import datetime as dt +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .rime_ai_credential_provider import RimeAiCredentialProvider -class RimeAiCredential(UniversalBaseModel): - provider: typing.Literal["rime-ai"] = "rime-ai" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() - """ - This is not returned in the API. - """ - +class RimeAiCredential(UncheckedBaseModel): + provider: RimeAiCredentialProvider + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] id: str = pydantic.Field() """ This is the unique identifier for the credential. """ - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field() - """ - This is the unique identifier for the org that this credential belongs to. - """ - - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the credential was created. - """ - - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the assistant was last updated. + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/rime_ai_credential_provider.py b/src/vapi/types/rime_ai_credential_provider.py new file mode 100644 index 00000000..a5abe1b2 --- /dev/null +++ b/src/vapi/types/rime_ai_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +RimeAiCredentialProvider = typing.Union[typing.Literal["rime-ai"], typing.Any] diff --git a/src/vapi/types/rime_ai_voice.py b/src/vapi/types/rime_ai_voice.py index 8c8289a5..129146ac 100644 --- a/src/vapi/types/rime_ai_voice.py +++ b/src/vapi/types/rime_ai_voice.py @@ -1,39 +1,35 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions import typing -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .chunk_plan import ChunkPlan +from .fallback_plan import FallbackPlan from .rime_ai_voice_id import RimeAiVoiceId +from .rime_ai_voice_language import RimeAiVoiceLanguage from .rime_ai_voice_model import RimeAiVoiceModel -from .chunk_plan import ChunkPlan -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -class RimeAiVoice(UniversalBaseModel): - filler_injection_enabled: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="fillerInjectionEnabled") - ] = pydantic.Field(default=None) - """ - This determines whether fillers are injected into the model output before inputting it into the voice provider. - - Default `false` because you can achieve better results with prompting the model. - """ - - provider: typing.Literal["rime-ai"] = pydantic.Field(default="rime-ai") - """ - This is the voice provider that will be used. - """ - - voice_id: typing_extensions.Annotated[RimeAiVoiceId, FieldMetadata(alias="voiceId")] = pydantic.Field() - """ - This is the provider-specific ID that will be used. - """ - +class RimeAiVoice(UncheckedBaseModel): + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="cachingEnabled"), + pydantic.Field( + alias="cachingEnabled", description="This is the flag to toggle voice caching for the assistant." + ), + ] = None + voice_id: typing_extensions.Annotated[ + RimeAiVoiceId, + FieldMetadata(alias="voiceId"), + pydantic.Field(alias="voiceId", description="This is the provider-specific ID that will be used."), + ] model: typing.Optional[RimeAiVoiceModel] = pydantic.Field(default=None) """ - This is the model that will be used. Defaults to 'v1' when not specified. + This is the model that will be used. Defaults to 'arcana' when not specified. """ speed: typing.Optional[float] = pydantic.Field(default=None) @@ -41,13 +37,60 @@ class RimeAiVoice(UniversalBaseModel): This is the speed multiplier that will be used. """ - chunk_plan: typing_extensions.Annotated[typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan")] = ( - pydantic.Field(default=None) - ) + pause_between_brackets: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="pauseBetweenBrackets"), + pydantic.Field( + alias="pauseBetweenBrackets", + description='This is a flag that controls whether to add slight pauses using angle brackets. Example: "Hi. <200> I\'d love to have a conversation with you." adds a 200ms pause between the first and second sentences.', + ), + ] = None + phonemize_between_brackets: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="phonemizeBetweenBrackets"), + pydantic.Field( + alias="phonemizeBetweenBrackets", + description='This is a flag that controls whether text inside brackets should be phonemized (converted to phonetic pronunciation) - Example: "{h\'El.o} World" will pronounce "Hello" as expected.', + ), + ] = None + reduce_latency: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="reduceLatency"), + pydantic.Field( + alias="reduceLatency", + description="This is a flag that controls whether to optimize for reduced latency in streaming. https://docs.rime.ai/api-reference/endpoint/websockets#param-reduce-latency", + ), + ] = None + inline_speed_alpha: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="inlineSpeedAlpha"), + pydantic.Field( + alias="inlineSpeedAlpha", + description="This is a string that allows inline speed control using alpha notation. https://docs.rime.ai/api-reference/endpoint/websockets#param-inline-speed-alpha", + ), + ] = None + language: typing.Optional[RimeAiVoiceLanguage] = pydantic.Field(default=None) """ - This is the plan for chunking the model output before it is sent to the voice provider. + Language for speech synthesis. Uses ISO 639 codes. Supported: en, es, de, fr, ar, hi, ja, he, pt, ta, si. """ + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], + FieldMetadata(alias="chunkPlan"), + pydantic.Field( + alias="chunkPlan", + description="This is the plan for chunking the model output before it is sent to the voice provider.", + ), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field( + alias="fallbackPlan", + description="This is the plan for voice provider fallbacks in the event that the primary voice provider fails.", + ), + ] = None + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/vapi/types/rime_ai_voice_id.py b/src/vapi/types/rime_ai_voice_id.py index c22bbc0b..780daa65 100644 --- a/src/vapi/types/rime_ai_voice_id.py +++ b/src/vapi/types/rime_ai_voice_id.py @@ -1,6 +1,7 @@ # This file was auto-generated by Fern from our API Definition. import typing + from .rime_ai_voice_id_enum import RimeAiVoiceIdEnum RimeAiVoiceId = typing.Union[RimeAiVoiceIdEnum, str] diff --git a/src/vapi/types/rime_ai_voice_id_enum.py b/src/vapi/types/rime_ai_voice_id_enum.py index a18c73bb..ef30f16c 100644 --- a/src/vapi/types/rime_ai_voice_id_enum.py +++ b/src/vapi/types/rime_ai_voice_id_enum.py @@ -4,87 +4,56 @@ RimeAiVoiceIdEnum = typing.Union[ typing.Literal[ - "marsh", - "bayou", - "creek", - "brook", - "flower", - "spore", - "glacier", - "gulch", - "alpine", "cove", - "lagoon", - "tundra", - "steppe", - "mesa", - "grove", - "rainforest", - "moraine", + "moon", "wildflower", - "peak", - "boulder", - "abbie", - "allison", - "ally", - "alona", - "amber", - "ana", - "antoine", - "armon", - "brenda", - "brittany", - "carol", - "colin", - "courtney", - "elena", - "elliot", "eva", - "geoff", - "gerald", - "hank", + "amber", + "maya", + "lagoon", + "breeze", "helen", - "hera", - "jen", - "joe", "joy", - "juan", - "kendra", - "kendrick", - "kenneth", - "kevin", - "kris", - "linda", - "madison", - "marge", - "marina", - "marissa", - "marta", - "maya", + "marsh", + "creek", + "cedar", + "alpine", + "summit", "nicholas", - "nyles", - "phil", - "reba", - "rex", - "rick", - "ritu", - "rob", - "rodney", - "rohan", - "rosco", - "samantha", - "sandy", - "selena", - "seth", - "sharon", - "stan", - "tamra", - "tanya", - "tibur", - "tj", "tyler", - "viv", - "yadira", + "colin", + "hank", + "thunder", + "astra", + "eucalyptus", + "moraine", + "peak", + "tundra", + "mesa_extra", + "talon", + "marlu", + "glacier", + "falcon", + "luna", + "celeste", + "estelle", + "andromeda", + "esther", + "lyra", + "lintel", + "oculus", + "vespera", + "transom", + "bond", + "arcade", + "atrium", + "cupola", + "fern", + "sirius", + "orion", + "masonry", + "albion", + "parapet", ], typing.Any, ] diff --git a/src/vapi/types/rime_ai_voice_language.py b/src/vapi/types/rime_ai_voice_language.py new file mode 100644 index 00000000..c6158bc8 --- /dev/null +++ b/src/vapi/types/rime_ai_voice_language.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +RimeAiVoiceLanguage = typing.Union[ + typing.Literal["en", "es", "de", "fr", "ar", "hi", "ja", "he", "pt", "ta", "si"], typing.Any +] diff --git a/src/vapi/types/rime_ai_voice_model.py b/src/vapi/types/rime_ai_voice_model.py index d96bc4ac..a1225fb5 100644 --- a/src/vapi/types/rime_ai_voice_model.py +++ b/src/vapi/types/rime_ai_voice_model.py @@ -2,4 +2,4 @@ import typing -RimeAiVoiceModel = typing.Union[typing.Literal["v1", "mist"], typing.Any] +RimeAiVoiceModel = typing.Union[typing.Literal["arcana", "mistv2", "mist"], typing.Any] diff --git a/src/vapi/types/rule_based_condition.py b/src/vapi/types/rule_based_condition.py deleted file mode 100644 index 376a87b8..00000000 --- a/src/vapi/types/rule_based_condition.py +++ /dev/null @@ -1,96 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from ..core.pydantic_utilities import UniversalBaseModel -import typing -import pydantic -from .rule_based_condition_operator import RuleBasedConditionOperator -import typing_extensions -from ..core.serialization import FieldMetadata -from ..core.pydantic_utilities import IS_PYDANTIC_V2 - - -class RuleBasedCondition(UniversalBaseModel): - type: typing.Literal["rule-based"] = pydantic.Field(default="rule-based") - """ - This condition is based on a strict rule. - """ - - operator: RuleBasedConditionOperator = pydantic.Field() - """ - This is the operator you want to use to compare the left side and right side. - - The operation becomes `(leftSide) operator (rightSide)`. - """ - - left_side: typing_extensions.Annotated[str, FieldMetadata(alias="leftSide")] = pydantic.Field() - """ - This is the left side of the operation. - - You can reference any variable in the context of the current block execution (step): - - - "{{output.your-property-name}}" for current step's output - - "{{input.your-property-name}}" for current step's input - - "{{your-step-name.output.your-property-name}}" for another step's output (in the same workflow; read caveat #1) - - "{{your-step-name.input.your-property-name}}" for another step's input (in the same workflow; read caveat #1) - - "{{your-block-name.output.your-property-name}}" for another block's output (in the same workflow; read caveat #2) - - "{{your-block-name.input.your-property-name}}" for another block's input (in the same workflow; read caveat #2) - - "{{workflow.input.your-property-name}}" for the current workflow's input - - "{{global.your-property-name}}" for the global context - - Or, you can use a constant: - - - "1" - - "text" - - "true" - - "false" - - Or, you can mix and match with string interpolation: - - - "{{your-property-name}}-{{input.your-property-name-2}}-1" - - Caveats: - - 1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.input/output.propertyName}} will reference the latest usage of the step. - 2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.input/output.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow with steps. - """ - - right_side: typing_extensions.Annotated[str, FieldMetadata(alias="rightSide")] = pydantic.Field() - """ - This is the right side of the operation. - - You can reference any variable in the context of the current block execution (step): - - - "{{output.your-property-name}}" for current step's output - - "{{input.your-property-name}}" for current step's input - - "{{your-step-name.output.your-property-name}}" for another step's output (in the same workflow; read caveat #1) - - "{{your-step-name.input.your-property-name}}" for another step's input (in the same workflow; read caveat #1) - - "{{your-block-name.output.your-property-name}}" for another block's output (in the same workflow; read caveat #2) - - "{{your-block-name.input.your-property-name}}" for another block's input (in the same workflow; read caveat #2) - - "{{workflow.input.your-property-name}}" for the current workflow's input - - "{{global.your-property-name}}" for the global context - - Or, you can use a constant: - - - "1" - - "text" - - "true" - - "false" - - Or, you can mix and match with string interpolation: - - - "{{your-property-name}}-{{input.your-property-name-2}}-1" - - Caveats: - - 1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.input/output.propertyName}} will reference the latest usage of the step. - 2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.input/output.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow with steps. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/vapi/types/rule_based_condition_operator.py b/src/vapi/types/rule_based_condition_operator.py deleted file mode 100644 index 470a3afd..00000000 --- a/src/vapi/types/rule_based_condition_operator.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -RuleBasedConditionOperator = typing.Union[typing.Literal["eq", "neq", "gt", "gte", "lt", "lte"], typing.Any] diff --git a/src/vapi/types/runpod_credential.py b/src/vapi/types/runpod_credential.py index 3a163e7e..31437fe7 100644 --- a/src/vapi/types/runpod_credential.py +++ b/src/vapi/types/runpod_credential.py @@ -1,39 +1,53 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +import datetime as dt import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic -import datetime as dt +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .runpod_credential_provider import RunpodCredentialProvider -class RunpodCredential(UniversalBaseModel): - provider: typing.Literal["runpod"] = "runpod" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() - """ - This is not returned in the API. - """ - +class RunpodCredential(UncheckedBaseModel): + provider: RunpodCredentialProvider + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] id: str = pydantic.Field() """ This is the unique identifier for the credential. """ - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field() - """ - This is the unique identifier for the org that this credential belongs to. - """ - - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the credential was created. - """ - - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the assistant was last updated. + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/runpod_credential_provider.py b/src/vapi/types/runpod_credential_provider.py new file mode 100644 index 00000000..1379cc09 --- /dev/null +++ b/src/vapi/types/runpod_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +RunpodCredentialProvider = typing.Union[typing.Literal["runpod"], typing.Any] diff --git a/src/vapi/types/s_3_credential.py b/src/vapi/types/s_3_credential.py index 44f22cc2..d3b101b2 100644 --- a/src/vapi/types/s_3_credential.py +++ b/src/vapi/types/s_3_credential.py @@ -1,65 +1,89 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +import datetime as dt import typing + import pydantic import typing_extensions -from ..core.serialization import FieldMetadata -import datetime as dt from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .s_3_credential_provider import S3CredentialProvider -class S3Credential(UniversalBaseModel): - provider: typing.Literal["s3"] = pydantic.Field(default="s3") +class S3Credential(UncheckedBaseModel): + provider: S3CredentialProvider = pydantic.Field() """ Credential provider. Only allowed value is s3 """ - aws_access_key_id: typing_extensions.Annotated[str, FieldMetadata(alias="awsAccessKeyId")] = pydantic.Field() - """ - AWS access key ID. - """ - - aws_secret_access_key: typing_extensions.Annotated[str, FieldMetadata(alias="awsSecretAccessKey")] = ( - pydantic.Field() - ) - """ - AWS access key secret. This is not returned in the API. - """ - + aws_access_key_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="awsAccessKeyId"), + pydantic.Field(alias="awsAccessKeyId", description="AWS access key ID."), + ] + aws_secret_access_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="awsSecretAccessKey"), + pydantic.Field( + alias="awsSecretAccessKey", description="AWS access key secret. This is not returned in the API." + ), + ] region: str = pydantic.Field() """ AWS region in which the S3 bucket is located. """ - s_3_bucket_name: typing_extensions.Annotated[str, FieldMetadata(alias="s3BucketName")] = pydantic.Field() - """ - AWS S3 bucket name. - """ - - s_3_path_prefix: typing_extensions.Annotated[str, FieldMetadata(alias="s3PathPrefix")] = pydantic.Field() - """ - The path prefix for the uploaded recording. Ex. "recordings/" - """ - + s_3_bucket_name: typing_extensions.Annotated[ + str, + FieldMetadata(alias="s3BucketName"), + pydantic.Field(alias="s3BucketName", description="AWS S3 bucket name."), + ] + s_3_path_prefix: typing_extensions.Annotated[ + str, + FieldMetadata(alias="s3PathPrefix"), + pydantic.Field( + alias="s3PathPrefix", description='The path prefix for the uploaded recording. Ex. "recordings/"' + ), + ] + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="fallbackIndex"), + pydantic.Field( + alias="fallbackIndex", + description="This is the order in which this storage provider is tried during upload retries. Lower numbers are tried first in increasing order.", + ), + ] = None id: str = pydantic.Field() """ This is the unique identifier for the credential. """ - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field() - """ - This is the unique identifier for the org that this credential belongs to. - """ - - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the credential was created. - """ - - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the assistant was last updated. + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/s_3_credential_provider.py b/src/vapi/types/s_3_credential_provider.py new file mode 100644 index 00000000..f732145c --- /dev/null +++ b/src/vapi/types/s_3_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +S3CredentialProvider = typing.Union[typing.Literal["s3"], typing.Any] diff --git a/src/vapi/types/say_assistant_hook_action.py b/src/vapi/types/say_assistant_hook_action.py new file mode 100644 index 00000000..0f339e2e --- /dev/null +++ b/src/vapi/types/say_assistant_hook_action.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +SayAssistantHookAction = typing.Any diff --git a/src/vapi/types/say_hook_action.py b/src/vapi/types/say_hook_action.py new file mode 100644 index 00000000..e6f7f301 --- /dev/null +++ b/src/vapi/types/say_hook_action.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .say_hook_action_prompt import SayHookActionPrompt + + +class SayHookAction(UncheckedBaseModel): + prompt: typing.Optional[SayHookActionPrompt] = pydantic.Field(default=None) + """ + This is the prompt for the assistant to generate a response based on existing conversation. + Can be a string or an array of chat messages. + """ + + exact: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) + """ + This is the message to say + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/say_hook_action_prompt.py b/src/vapi/types/say_hook_action_prompt.py new file mode 100644 index 00000000..ce0a2d7e --- /dev/null +++ b/src/vapi/types/say_hook_action_prompt.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .say_hook_action_prompt_one_item import SayHookActionPromptOneItem + +SayHookActionPrompt = typing.Union[str, typing.List[SayHookActionPromptOneItem]] diff --git a/src/vapi/types/say_hook_action_prompt_one_item.py b/src/vapi/types/say_hook_action_prompt_one_item.py new file mode 100644 index 00000000..e93da543 --- /dev/null +++ b/src/vapi/types/say_hook_action_prompt_one_item.py @@ -0,0 +1,11 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .assistant_message import AssistantMessage +from .developer_message import DeveloperMessage +from .system_message import SystemMessage +from .tool_message import ToolMessage +from .user_message import UserMessage + +SayHookActionPromptOneItem = typing.Union[SystemMessage, UserMessage, AssistantMessage, ToolMessage, DeveloperMessage] diff --git a/src/vapi/types/say_phone_number_hook_action.py b/src/vapi/types/say_phone_number_hook_action.py new file mode 100644 index 00000000..0a3c3143 --- /dev/null +++ b/src/vapi/types/say_phone_number_hook_action.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class SayPhoneNumberHookAction(UncheckedBaseModel): + exact: str = pydantic.Field() + """ + This is the message to say + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/sbc_configuration.py b/src/vapi/types/sbc_configuration.py index 0e188ee6..b51f1414 100644 --- a/src/vapi/types/sbc_configuration.py +++ b/src/vapi/types/sbc_configuration.py @@ -1,12 +1,13 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -from ..core.pydantic_utilities import IS_PYDANTIC_V2 import typing + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel -class SbcConfiguration(UniversalBaseModel): +class SbcConfiguration(UncheckedBaseModel): if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/vapi/types/scenario.py b/src/vapi/types/scenario.py new file mode 100644 index 00000000..6c6aac8b --- /dev/null +++ b/src/vapi/types/scenario.py @@ -0,0 +1,213 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .evaluation_plan_item import EvaluationPlanItem +from .scenario_hooks_item import ScenarioHooksItem +from .scenario_tool_mock import ScenarioToolMock + + +class Scenario(UncheckedBaseModel): + id: str = pydantic.Field() + """ + This is the unique identifier for the scenario. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the organization this scenario belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the scenario was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the scenario was last updated.", + ), + ] + name: str = pydantic.Field() + """ + This is the name of the scenario. + """ + + instructions: str = pydantic.Field() + """ + This is the script/instructions for the tester to follow during the simulation. + """ + + evaluations: typing.List[EvaluationPlanItem] = pydantic.Field() + """ + This is the structured output-based evaluation plan for the simulation. + Each item defines a structured output to extract and evaluate against an expected value. + """ + + hooks: typing.Optional[typing.List[ScenarioHooksItem]] = pydantic.Field(default=None) + """ + Hooks to run on simulation lifecycle events + """ + + target_overrides: typing_extensions.Annotated[ + typing.Optional["AssistantOverrides"], + FieldMetadata(alias="targetOverrides"), + pydantic.Field( + alias="targetOverrides", description="Overrides to inject into the simulated target assistant or squad" + ), + ] = None + tool_mocks: typing_extensions.Annotated[ + typing.Optional[typing.List[ScenarioToolMock]], + FieldMetadata(alias="toolMocks"), + pydantic.Field(alias="toolMocks", description="Scenario-level tool call mocks to use during simulations."), + ] = None + path: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional folder path for organizing scenarios. + Supports up to 3 levels (e.g., "dept/feature/variant"). + Maps to GitOps resource folder structure. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + Scenario, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/scenario_hooks_item.py b/src/vapi/types/scenario_hooks_item.py new file mode 100644 index 00000000..9d70a7aa --- /dev/null +++ b/src/vapi/types/scenario_hooks_item.py @@ -0,0 +1,45 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .simulation_hook_webhook_action import SimulationHookWebhookAction + + +class ScenarioHooksItem_SimulationRunStarted(UncheckedBaseModel): + on: typing.Literal["simulation.run.started"] = "simulation.run.started" + do: typing.List[SimulationHookWebhookAction] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ScenarioHooksItem_SimulationRunEnded(UncheckedBaseModel): + on: typing.Literal["simulation.run.ended"] = "simulation.run.ended" + do: typing.List[SimulationHookWebhookAction] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ScenarioHooksItem = typing_extensions.Annotated[ + typing.Union[ScenarioHooksItem_SimulationRunStarted, ScenarioHooksItem_SimulationRunEnded], + UnionMetadata(discriminant="on"), +] diff --git a/src/vapi/types/scenario_tool_mock.py b/src/vapi/types/scenario_tool_mock.py new file mode 100644 index 00000000..f2fc66d0 --- /dev/null +++ b/src/vapi/types/scenario_tool_mock.py @@ -0,0 +1,38 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class ScenarioToolMock(UncheckedBaseModel): + tool_name: typing_extensions.Annotated[ + str, + FieldMetadata(alias="toolName"), + pydantic.Field( + alias="toolName", + description="This is the tool call function name to mock (must match `toolCall.function.name`).", + ), + ] + result: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the result content to return for this tool call. + """ + + enabled: typing.Optional[bool] = pydantic.Field(default=None) + """ + This is whether this mock is enabled. Defaults to true when omitted. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/schedule_plan.py b/src/vapi/types/schedule_plan.py new file mode 100644 index 00000000..83865a49 --- /dev/null +++ b/src/vapi/types/schedule_plan.py @@ -0,0 +1,38 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class SchedulePlan(UncheckedBaseModel): + earliest_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="earliestAt"), + pydantic.Field( + alias="earliestAt", + description="This is the ISO 8601 date-time string of the earliest time the call can be scheduled.", + ), + ] + latest_at: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="latestAt"), + pydantic.Field( + alias="latestAt", + description="This is the ISO 8601 date-time string of the latest time the call can be scheduled.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/scorecard.py b/src/vapi/types/scorecard.py new file mode 100644 index 00000000..bef6baf9 --- /dev/null +++ b/src/vapi/types/scorecard.py @@ -0,0 +1,74 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .scorecard_metric import ScorecardMetric + + +class Scorecard(UncheckedBaseModel): + id: str = pydantic.Field() + """ + This is the unique identifier for the scorecard. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this scorecard belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the scorecard was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the scorecard was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the scorecard. It is only for user reference and will not be used for any evaluation. + """ + + description: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the description of the scorecard. It is only for user reference and will not be used for any evaluation. + """ + + metrics: typing.List[ScorecardMetric] = pydantic.Field() + """ + These are the metrics that will be used to evaluate the scorecard. + Each metric will have a set of conditions and points that will be used to generate the score. + """ + + assistant_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="assistantIds"), + pydantic.Field( + alias="assistantIds", + description="These are the assistant IDs that this scorecard is linked to.\nWhen linked to assistants, this scorecard will be available for evaluation during those assistants' calls.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/scorecard_metric.py b/src/vapi/types/scorecard_metric.py new file mode 100644 index 00000000..e8292be0 --- /dev/null +++ b/src/vapi/types/scorecard_metric.py @@ -0,0 +1,36 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class ScorecardMetric(UncheckedBaseModel): + structured_output_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="structuredOutputId"), + pydantic.Field( + alias="structuredOutputId", + description="This is the unique identifier for the structured output that will be used to evaluate the scorecard.\nThe structured output must be of type number or boolean only for now.", + ), + ] + conditions: typing.List[typing.Dict[str, typing.Any]] = pydantic.Field() + """ + These are the conditions that will be used to evaluate the scorecard. + Each condition will have a comparator, value, and points that will be used to calculate the final score. + The points will be added to the overall score if the condition is met. + The overall score will be normalized to a 100 point scale to ensure uniformity across different scorecards. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/scorecard_paginated_response.py b/src/vapi/types/scorecard_paginated_response.py new file mode 100644 index 00000000..5556be83 --- /dev/null +++ b/src/vapi/types/scorecard_paginated_response.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .pagination_meta import PaginationMeta +from .scorecard import Scorecard + + +class ScorecardPaginatedResponse(UncheckedBaseModel): + results: typing.List[Scorecard] + metadata: PaginationMeta + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/error.py b/src/vapi/types/security_filter_base.py similarity index 80% rename from src/vapi/types/error.py rename to src/vapi/types/security_filter_base.py index 48db281a..08d4b5dd 100644 --- a/src/vapi/types/error.py +++ b/src/vapi/types/security_filter_base.py @@ -1,14 +1,13 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -from ..core.pydantic_utilities import IS_PYDANTIC_V2 import typing -import pydantic +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel -class Error(UniversalBaseModel): - message: str +class SecurityFilterBase(UncheckedBaseModel): if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/vapi/types/security_filter_plan.py b/src/vapi/types/security_filter_plan.py new file mode 100644 index 00000000..c0ad975a --- /dev/null +++ b/src/vapi/types/security_filter_plan.py @@ -0,0 +1,51 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .security_filter_base import SecurityFilterBase +from .security_filter_plan_mode import SecurityFilterPlanMode + + +class SecurityFilterPlan(UncheckedBaseModel): + enabled: typing.Optional[bool] = pydantic.Field(default=None) + """ + Whether the security filter is enabled. + @default false + """ + + filters: typing.Optional[typing.List[SecurityFilterBase]] = pydantic.Field(default=None) + """ + Array of security filter types to apply. + If array is not empty, only those security filters are run. + """ + + mode: typing.Optional[SecurityFilterPlanMode] = pydantic.Field(default=None) + """ + Mode of operation when a security threat is detected. + - 'sanitize': Remove or replace the threatening content + - 'reject': Replace the entire transcript with replacement text + - 'replace': Replace threatening patterns with replacement text + @default 'sanitize' + """ + + replacement_text: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="replacementText"), + pydantic.Field( + alias="replacementText", description="Text to use when replacing filtered content.\n@default '[FILTERED]'" + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/security_filter_plan_mode.py b/src/vapi/types/security_filter_plan_mode.py new file mode 100644 index 00000000..0516801f --- /dev/null +++ b/src/vapi/types/security_filter_plan_mode.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +SecurityFilterPlanMode = typing.Union[typing.Literal["sanitize", "reject", "replace"], typing.Any] diff --git a/src/vapi/types/server.py b/src/vapi/types/server.py index 4492e1c2..50977758 100644 --- a/src/vapi/types/server.py +++ b/src/vapi/types/server.py @@ -1,35 +1,68 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions import typing -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .backoff_plan import BackoffPlan -class Server(UniversalBaseModel): - timeout_seconds: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="timeoutSeconds")] = ( - pydantic.Field(default=None) - ) +class Server(UncheckedBaseModel): + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="timeoutSeconds"), + pydantic.Field( + alias="timeoutSeconds", + description="This is the timeout in seconds for the request. Defaults to 20 seconds.\n\n@default 20", + ), + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="credentialId"), + pydantic.Field(alias="credentialId", description="The credential ID for server authentication"), + ] = None + static_ip_addresses_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="staticIpAddressesEnabled"), + pydantic.Field( + alias="staticIpAddressesEnabled", + description="If enabled, requests will originate from a static set of IPs owned and managed by Vapi.\n\n@default false", + ), + ] = None + encrypted_paths: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="encryptedPaths"), + pydantic.Field( + alias="encryptedPaths", + description="This is the paths to encrypt in the request body if credentialId and encryptionPlan are defined.", + ), + ] = None + url: typing.Optional[str] = pydantic.Field(default=None) """ - This is the timeout in seconds for the request to your server. Defaults to 20 seconds. - - @default 20 + This is where the request will be sent. """ - url: str = pydantic.Field() + headers: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) """ - API endpoint to send requests to. - """ - - secret: typing.Optional[str] = pydantic.Field(default=None) - """ - This is the secret you can set that Vapi will send with every request to your server. Will be sent as a header called x-vapi-secret. + These are the headers to include in the request. - Same precedence logic as server. + Each key-value pair represents a header name and its value. + + Note: Specifying an Authorization header here will override the authorization provided by the `credentialId` (if provided). This is an anti-pattern and should be avoided outside of edge case scenarios. """ + backoff_plan: typing_extensions.Annotated[ + typing.Optional[BackoffPlan], + FieldMetadata(alias="backoffPlan"), + pydantic.Field( + alias="backoffPlan", + description="This is the backoff plan if the request fails. Defaults to undefined (the request will not be retried).\n\n@default undefined (the request will not be retried)", + ), + ] = None + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/vapi/types/server_message.py b/src/vapi/types/server_message.py index 19522dc8..7a54c929 100644 --- a/src/vapi/types/server_message.py +++ b/src/vapi/types/server_message.py @@ -1,18 +1,16 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -from .callback_step import CallbackStep -from .create_workflow_block_dto import CreateWorkflowBlockDto -from .handoff_step import HandoffStep -from .server_message_message import ServerMessageMessage -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import typing -from ..core.pydantic_utilities import update_forward_refs + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .server_message_message import ServerMessageMessage -class ServerMessage(UniversalBaseModel): +class ServerMessage(UncheckedBaseModel): message: ServerMessageMessage = pydantic.Field() """ These are all the messages that can be sent to your server before, after and during the call. Configure the messages you'd like to receive in `assistant.serverMessages`. @@ -35,6 +33,4 @@ class Config: extra = pydantic.Extra.allow -update_forward_refs(CallbackStep, ServerMessage=ServerMessage) -update_forward_refs(CreateWorkflowBlockDto, ServerMessage=ServerMessage) -update_forward_refs(HandoffStep, ServerMessage=ServerMessage) +update_forward_refs(ServerMessage) diff --git a/src/vapi/types/server_message_assistant_request.py b/src/vapi/types/server_message_assistant_request.py index 57d81737..408b166f 100644 --- a/src/vapi/types/server_message_assistant_request.py +++ b/src/vapi/types/server_message_assistant_request.py @@ -1,44 +1,38 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -from .callback_step import CallbackStep -from .create_workflow_block_dto import CreateWorkflowBlockDto -from .handoff_step import HandoffStep -import typing_extensions + import typing -from .server_message_assistant_request_phone_number import ServerMessageAssistantRequestPhoneNumber -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel from .artifact import Artifact -from .create_assistant_dto import CreateAssistantDto -from .create_customer_dto import CreateCustomerDto from .call import Call -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.pydantic_utilities import update_forward_refs +from .chat import Chat +from .create_customer_dto import CreateCustomerDto +from .server_message_assistant_request_phone_number import ServerMessageAssistantRequestPhoneNumber +from .server_message_assistant_request_type import ServerMessageAssistantRequestType -class ServerMessageAssistantRequest(UniversalBaseModel): +class ServerMessageAssistantRequest(UncheckedBaseModel): phone_number: typing_extensions.Annotated[ - typing.Optional[ServerMessageAssistantRequestPhoneNumber], FieldMetadata(alias="phoneNumber") - ] = pydantic.Field(default=None) - """ - This is the phone number associated with the call. - - This matches one of the following: - - - `call.phoneNumber`, - - `call.phoneNumberId`. - """ - - type: typing.Literal["assistant-request"] = pydantic.Field(default="assistant-request") + typing.Optional[ServerMessageAssistantRequestPhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: ServerMessageAssistantRequestType = pydantic.Field() """ This is the type of the message. "assistant-request" is sent to fetch assistant configuration for an incoming call. """ - timestamp: typing.Optional[str] = pydantic.Field(default=None) + timestamp: typing.Optional[float] = pydantic.Field(default=None) """ - This is the ISO-8601 formatted timestamp of when the message was sent. + This is the timestamp of the message. """ artifact: typing.Optional[Artifact] = pydantic.Field(default=None) @@ -48,37 +42,24 @@ class ServerMessageAssistantRequest(UniversalBaseModel): This matches what is stored on `call.artifact` after the call. """ - assistant: typing.Optional[CreateAssistantDto] = pydantic.Field(default=None) + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) """ - This is the assistant that is currently active. This is provided for convenience. - - This matches one of the following: - - - `call.assistant`, - - `call.assistantId`, - - `call.squad[n].assistant`, - - `call.squad[n].assistantId`, - - `call.squadId->[n].assistant`, - - `call.squadId->[n].assistantId`. + This is the assistant that the message is associated with. """ customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) """ - This is the customer associated with the call. - - This matches one of the following: - - - `call.customer`, - - `call.customerId`. + This is the customer that the message is associated with. """ call: typing.Optional[Call] = pydantic.Field(default=None) """ - This is the call object. - - This matches what was returned in POST /call. - - Note: This might get stale during the call. To get the latest call object, especially after the call is ended, use GET /call/:id. + This is the call that the message is associated with. + """ + + chat: typing.Optional[Chat] = pydantic.Field(default=None) + """ + This is the chat object. """ if IS_PYDANTIC_V2: @@ -91,6 +72,121 @@ class Config: extra = pydantic.Extra.allow -update_forward_refs(CallbackStep, ServerMessageAssistantRequest=ServerMessageAssistantRequest) -update_forward_refs(CreateWorkflowBlockDto, ServerMessageAssistantRequest=ServerMessageAssistantRequest) -update_forward_refs(HandoffStep, ServerMessageAssistantRequest=ServerMessageAssistantRequest) +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ServerMessageAssistantRequest, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/server_message_assistant_request_phone_number.py b/src/vapi/types/server_message_assistant_request_phone_number.py index 52893069..7f3ebd05 100644 --- a/src/vapi/types/server_message_assistant_request_phone_number.py +++ b/src/vapi/types/server_message_assistant_request_phone_number.py @@ -1,11 +1,247 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .create_byo_phone_number_dto import CreateByoPhoneNumberDto -from .create_twilio_phone_number_dto import CreateTwilioPhoneNumberDto -from .create_vonage_phone_number_dto import CreateVonagePhoneNumberDto -from .create_vapi_phone_number_dto import CreateVapiPhoneNumberDto -ServerMessageAssistantRequestPhoneNumber = typing.Union[ - CreateByoPhoneNumberDto, CreateTwilioPhoneNumberDto, CreateVonagePhoneNumberDto, CreateVapiPhoneNumberDto +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ServerMessageAssistantRequestPhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageAssistantRequestPhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageAssistantRequestPhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageAssistantRequestPhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageAssistantRequestPhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ServerMessageAssistantRequestPhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ServerMessageAssistantRequestPhoneNumber_ByoPhoneNumber, + ServerMessageAssistantRequestPhoneNumber_Twilio, + ServerMessageAssistantRequestPhoneNumber_Vonage, + ServerMessageAssistantRequestPhoneNumber_Vapi, + ServerMessageAssistantRequestPhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), ] diff --git a/src/vapi/types/server_message_assistant_request_type.py b/src/vapi/types/server_message_assistant_request_type.py new file mode 100644 index 00000000..5a6c9dd2 --- /dev/null +++ b/src/vapi/types/server_message_assistant_request_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ServerMessageAssistantRequestType = typing.Union[typing.Literal["assistant-request"], typing.Any] diff --git a/src/vapi/types/server_message_assistant_speech.py b/src/vapi/types/server_message_assistant_speech.py new file mode 100644 index 00000000..7065ba59 --- /dev/null +++ b/src/vapi/types/server_message_assistant_speech.py @@ -0,0 +1,231 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .artifact import Artifact +from .call import Call +from .chat import Chat +from .create_customer_dto import CreateCustomerDto +from .server_message_assistant_speech_phone_number import ServerMessageAssistantSpeechPhoneNumber +from .server_message_assistant_speech_source import ServerMessageAssistantSpeechSource +from .server_message_assistant_speech_timing import ServerMessageAssistantSpeechTiming +from .server_message_assistant_speech_type import ServerMessageAssistantSpeechType + + +class ServerMessageAssistantSpeech(UncheckedBaseModel): + phone_number: typing_extensions.Annotated[ + typing.Optional[ServerMessageAssistantSpeechPhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: ServerMessageAssistantSpeechType = pydantic.Field() + """ + This is the type of the message. "assistant-speech" is sent as assistant audio is being played. + """ + + text: str = pydantic.Field() + """ + The full assistant text for the current turn. This is the complete text, + not an incremental delta — consumers should use `timing` metadata (e.g. + `wordsSpoken`) to determine which portion has been spoken so far. + """ + + turn: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the turn number of the assistant speech event (0-indexed). + """ + + source: typing.Optional[ServerMessageAssistantSpeechSource] = pydantic.Field(default=None) + """ + Indicates how the text was sourced. + """ + + timing: typing.Optional[ServerMessageAssistantSpeechTiming] = pydantic.Field(default=None) + """ + Optional timing metadata. Shape depends on `timing.type`: + + - `word-alignment` (ElevenLabs): per-character timing at playback + cadence. words[] includes space entries. Best consumed by tracking + a running character count: join timing.words, add to a char cursor, + and highlight text up to that position. No interpolation needed. + + - `word-progress` (Minimax with voice.subtitleType: 'word'): cursor- + based word count per TTS segment. Use wordsSpoken as the anchor, + interpolate forward using segmentDurationMs or timing.words until + the next event arrives. + + When absent, the event is a text-only fallback for providers without + word-level timing (e.g. Cartesia, Deepgram, Azure). Text emits once + per TTS chunk when audio is playing. Optionally interpolate a word + cursor at ~3.5 words/sec between events for approximate tracking. + """ + + timestamp: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the timestamp of the message. + """ + + artifact: typing.Optional[Artifact] = pydantic.Field(default=None) + """ + This is a live version of the `call.artifact`. + + This matches what is stored on `call.artifact` after the call. + """ + + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) + """ + This is the assistant that the message is associated with. + """ + + customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) + """ + This is the customer that the message is associated with. + """ + + call: typing.Optional[Call] = pydantic.Field(default=None) + """ + This is the call that the message is associated with. + """ + + chat: typing.Optional[Chat] = pydantic.Field(default=None) + """ + This is the chat object. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ServerMessageAssistantSpeech, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/server_message_assistant_speech_phone_number.py b/src/vapi/types/server_message_assistant_speech_phone_number.py new file mode 100644 index 00000000..231bbf8d --- /dev/null +++ b/src/vapi/types/server_message_assistant_speech_phone_number.py @@ -0,0 +1,247 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ServerMessageAssistantSpeechPhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageAssistantSpeechPhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageAssistantSpeechPhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageAssistantSpeechPhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageAssistantSpeechPhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ServerMessageAssistantSpeechPhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ServerMessageAssistantSpeechPhoneNumber_ByoPhoneNumber, + ServerMessageAssistantSpeechPhoneNumber_Twilio, + ServerMessageAssistantSpeechPhoneNumber_Vonage, + ServerMessageAssistantSpeechPhoneNumber_Vapi, + ServerMessageAssistantSpeechPhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/server_message_assistant_speech_source.py b/src/vapi/types/server_message_assistant_speech_source.py new file mode 100644 index 00000000..5c755583 --- /dev/null +++ b/src/vapi/types/server_message_assistant_speech_source.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ServerMessageAssistantSpeechSource = typing.Union[typing.Literal["model", "force-say", "custom-voice"], typing.Any] diff --git a/src/vapi/types/server_message_assistant_speech_timing.py b/src/vapi/types/server_message_assistant_speech_timing.py new file mode 100644 index 00000000..c9b8c0df --- /dev/null +++ b/src/vapi/types/server_message_assistant_speech_timing.py @@ -0,0 +1,100 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .assistant_speech_word_timestamp import AssistantSpeechWordTimestamp + + +class ServerMessageAssistantSpeechTiming_WordAlignment(UncheckedBaseModel): + """ + Optional timing metadata. Shape depends on `timing.type`: + + - `word-alignment` (ElevenLabs): per-character timing at playback + cadence. words[] includes space entries. Best consumed by tracking + a running character count: join timing.words, add to a char cursor, + and highlight text up to that position. No interpolation needed. + + - `word-progress` (Minimax with voice.subtitleType: 'word'): cursor- + based word count per TTS segment. Use wordsSpoken as the anchor, + interpolate forward using segmentDurationMs or timing.words until + the next event arrives. + + When absent, the event is a text-only fallback for providers without + word-level timing (e.g. Cartesia, Deepgram, Azure). Text emits once + per TTS chunk when audio is playing. Optionally interpolate a word + cursor at ~3.5 words/sec between events for approximate tracking. + """ + + type: typing.Literal["word-alignment"] = "word-alignment" + words: typing.List[str] + words_start_times_ms: typing_extensions.Annotated[ + typing.List[float], FieldMetadata(alias="wordsStartTimesMs"), pydantic.Field(alias="wordsStartTimesMs") + ] + words_end_times_ms: typing_extensions.Annotated[ + typing.List[float], FieldMetadata(alias="wordsEndTimesMs"), pydantic.Field(alias="wordsEndTimesMs") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageAssistantSpeechTiming_WordProgress(UncheckedBaseModel): + """ + Optional timing metadata. Shape depends on `timing.type`: + + - `word-alignment` (ElevenLabs): per-character timing at playback + cadence. words[] includes space entries. Best consumed by tracking + a running character count: join timing.words, add to a char cursor, + and highlight text up to that position. No interpolation needed. + + - `word-progress` (Minimax with voice.subtitleType: 'word'): cursor- + based word count per TTS segment. Use wordsSpoken as the anchor, + interpolate forward using segmentDurationMs or timing.words until + the next event arrives. + + When absent, the event is a text-only fallback for providers without + word-level timing (e.g. Cartesia, Deepgram, Azure). Text emits once + per TTS chunk when audio is playing. Optionally interpolate a word + cursor at ~3.5 words/sec between events for approximate tracking. + """ + + type: typing.Literal["word-progress"] = "word-progress" + words_spoken: typing_extensions.Annotated[ + float, FieldMetadata(alias="wordsSpoken"), pydantic.Field(alias="wordsSpoken") + ] + total_words: typing_extensions.Annotated[ + float, FieldMetadata(alias="totalWords"), pydantic.Field(alias="totalWords") + ] + segment: typing.Optional[str] = None + segment_duration_ms: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="segmentDurationMs"), pydantic.Field(alias="segmentDurationMs") + ] = None + words: typing.Optional[typing.List[AssistantSpeechWordTimestamp]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ServerMessageAssistantSpeechTiming = typing_extensions.Annotated[ + typing.Union[ServerMessageAssistantSpeechTiming_WordAlignment, ServerMessageAssistantSpeechTiming_WordProgress], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/server_message_assistant_speech_type.py b/src/vapi/types/server_message_assistant_speech_type.py new file mode 100644 index 00000000..acd678b5 --- /dev/null +++ b/src/vapi/types/server_message_assistant_speech_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ServerMessageAssistantSpeechType = typing.Union[typing.Literal["assistant.speechStarted"], typing.Any] diff --git a/src/vapi/types/server_message_call_delete_failed.py b/src/vapi/types/server_message_call_delete_failed.py new file mode 100644 index 00000000..81f1a577 --- /dev/null +++ b/src/vapi/types/server_message_call_delete_failed.py @@ -0,0 +1,192 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .artifact import Artifact +from .call import Call +from .chat import Chat +from .create_customer_dto import CreateCustomerDto +from .server_message_call_delete_failed_phone_number import ServerMessageCallDeleteFailedPhoneNumber +from .server_message_call_delete_failed_type import ServerMessageCallDeleteFailedType + + +class ServerMessageCallDeleteFailed(UncheckedBaseModel): + phone_number: typing_extensions.Annotated[ + typing.Optional[ServerMessageCallDeleteFailedPhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: ServerMessageCallDeleteFailedType = pydantic.Field() + """ + This is the type of the message. "call.deleted" is sent when a call is deleted. + """ + + timestamp: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the timestamp of the message. + """ + + artifact: typing.Optional[Artifact] = pydantic.Field(default=None) + """ + This is a live version of the `call.artifact`. + + This matches what is stored on `call.artifact` after the call. + """ + + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) + """ + This is the assistant that the message is associated with. + """ + + customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) + """ + This is the customer that the message is associated with. + """ + + call: typing.Optional[Call] = pydantic.Field(default=None) + """ + This is the call that the message is associated with. + """ + + chat: typing.Optional[Chat] = pydantic.Field(default=None) + """ + This is the chat object. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ServerMessageCallDeleteFailed, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/server_message_call_delete_failed_phone_number.py b/src/vapi/types/server_message_call_delete_failed_phone_number.py new file mode 100644 index 00000000..3f606941 --- /dev/null +++ b/src/vapi/types/server_message_call_delete_failed_phone_number.py @@ -0,0 +1,247 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ServerMessageCallDeleteFailedPhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageCallDeleteFailedPhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageCallDeleteFailedPhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageCallDeleteFailedPhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageCallDeleteFailedPhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ServerMessageCallDeleteFailedPhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ServerMessageCallDeleteFailedPhoneNumber_ByoPhoneNumber, + ServerMessageCallDeleteFailedPhoneNumber_Twilio, + ServerMessageCallDeleteFailedPhoneNumber_Vonage, + ServerMessageCallDeleteFailedPhoneNumber_Vapi, + ServerMessageCallDeleteFailedPhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/server_message_call_delete_failed_type.py b/src/vapi/types/server_message_call_delete_failed_type.py new file mode 100644 index 00000000..137c5674 --- /dev/null +++ b/src/vapi/types/server_message_call_delete_failed_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ServerMessageCallDeleteFailedType = typing.Union[typing.Literal["call.delete.failed"], typing.Any] diff --git a/src/vapi/types/server_message_call_deleted.py b/src/vapi/types/server_message_call_deleted.py new file mode 100644 index 00000000..a249f9ad --- /dev/null +++ b/src/vapi/types/server_message_call_deleted.py @@ -0,0 +1,192 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .artifact import Artifact +from .call import Call +from .chat import Chat +from .create_customer_dto import CreateCustomerDto +from .server_message_call_deleted_phone_number import ServerMessageCallDeletedPhoneNumber +from .server_message_call_deleted_type import ServerMessageCallDeletedType + + +class ServerMessageCallDeleted(UncheckedBaseModel): + phone_number: typing_extensions.Annotated[ + typing.Optional[ServerMessageCallDeletedPhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: ServerMessageCallDeletedType = pydantic.Field() + """ + This is the type of the message. "call.deleted" is sent when a call is deleted. + """ + + timestamp: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the timestamp of the message. + """ + + artifact: typing.Optional[Artifact] = pydantic.Field(default=None) + """ + This is a live version of the `call.artifact`. + + This matches what is stored on `call.artifact` after the call. + """ + + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) + """ + This is the assistant that the message is associated with. + """ + + customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) + """ + This is the customer that the message is associated with. + """ + + call: typing.Optional[Call] = pydantic.Field(default=None) + """ + This is the call that the message is associated with. + """ + + chat: typing.Optional[Chat] = pydantic.Field(default=None) + """ + This is the chat object. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ServerMessageCallDeleted, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/server_message_call_deleted_phone_number.py b/src/vapi/types/server_message_call_deleted_phone_number.py new file mode 100644 index 00000000..d811a82f --- /dev/null +++ b/src/vapi/types/server_message_call_deleted_phone_number.py @@ -0,0 +1,247 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ServerMessageCallDeletedPhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageCallDeletedPhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageCallDeletedPhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageCallDeletedPhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageCallDeletedPhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ServerMessageCallDeletedPhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ServerMessageCallDeletedPhoneNumber_ByoPhoneNumber, + ServerMessageCallDeletedPhoneNumber_Twilio, + ServerMessageCallDeletedPhoneNumber_Vonage, + ServerMessageCallDeletedPhoneNumber_Vapi, + ServerMessageCallDeletedPhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/server_message_call_deleted_type.py b/src/vapi/types/server_message_call_deleted_type.py new file mode 100644 index 00000000..fb9013eb --- /dev/null +++ b/src/vapi/types/server_message_call_deleted_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ServerMessageCallDeletedType = typing.Union[typing.Literal["call.deleted"], typing.Any] diff --git a/src/vapi/types/server_message_call_endpointing_request.py b/src/vapi/types/server_message_call_endpointing_request.py new file mode 100644 index 00000000..cd2b0a95 --- /dev/null +++ b/src/vapi/types/server_message_call_endpointing_request.py @@ -0,0 +1,231 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .artifact import Artifact +from .call import Call +from .chat import Chat +from .create_customer_dto import CreateCustomerDto +from .open_ai_message import OpenAiMessage +from .server_message_call_endpointing_request_messages_item import ServerMessageCallEndpointingRequestMessagesItem +from .server_message_call_endpointing_request_phone_number import ServerMessageCallEndpointingRequestPhoneNumber +from .server_message_call_endpointing_request_type import ServerMessageCallEndpointingRequestType + + +class ServerMessageCallEndpointingRequest(UncheckedBaseModel): + phone_number: typing_extensions.Annotated[ + typing.Optional[ServerMessageCallEndpointingRequestPhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: ServerMessageCallEndpointingRequestType = pydantic.Field() + """ + This is the type of the message. "call.endpointing.request" is sent when using `assistant.startSpeakingPlan.smartEndpointingPlan={ "provider": "custom-endpointing-model" }`. + + Here is what the request will look like: + + POST https://{assistant.startSpeakingPlan.smartEndpointingPlan.server.url} + Content-Type: application/json + + { + "message": { + "type": "call.endpointing.request", + "messages": [ + { + "role": "user", + "message": "Hello, how are you?", + "time": 1234567890, + "secondsFromStart": 0 + } + ], + ...other metadata about the call... + } + } + + The expected response: + { + "timeoutSeconds": 0.5 + } + """ + + messages: typing.Optional[typing.List[ServerMessageCallEndpointingRequestMessagesItem]] = pydantic.Field( + default=None + ) + """ + This is the conversation history at the time of the endpointing request. + """ + + messages_open_ai_formatted: typing_extensions.Annotated[ + typing.List[OpenAiMessage], + FieldMetadata(alias="messagesOpenAIFormatted"), + pydantic.Field(alias="messagesOpenAIFormatted", description="This is just `messages` formatted for OpenAI."), + ] + timestamp: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the timestamp of the message. + """ + + artifact: typing.Optional[Artifact] = pydantic.Field(default=None) + """ + This is a live version of the `call.artifact`. + + This matches what is stored on `call.artifact` after the call. + """ + + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) + """ + This is the assistant that the message is associated with. + """ + + customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) + """ + This is the customer that the message is associated with. + """ + + call: typing.Optional[Call] = pydantic.Field(default=None) + """ + This is the call that the message is associated with. + """ + + chat: typing.Optional[Chat] = pydantic.Field(default=None) + """ + This is the chat object. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ServerMessageCallEndpointingRequest, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/server_message_call_endpointing_request_messages_item.py b/src/vapi/types/server_message_call_endpointing_request_messages_item.py new file mode 100644 index 00000000..d614d97e --- /dev/null +++ b/src/vapi/types/server_message_call_endpointing_request_messages_item.py @@ -0,0 +1,13 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .bot_message import BotMessage +from .system_message import SystemMessage +from .tool_call_message import ToolCallMessage +from .tool_call_result_message import ToolCallResultMessage +from .user_message import UserMessage + +ServerMessageCallEndpointingRequestMessagesItem = typing.Union[ + UserMessage, SystemMessage, BotMessage, ToolCallMessage, ToolCallResultMessage +] diff --git a/src/vapi/types/server_message_call_endpointing_request_phone_number.py b/src/vapi/types/server_message_call_endpointing_request_phone_number.py new file mode 100644 index 00000000..f7c9fa70 --- /dev/null +++ b/src/vapi/types/server_message_call_endpointing_request_phone_number.py @@ -0,0 +1,247 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ServerMessageCallEndpointingRequestPhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageCallEndpointingRequestPhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageCallEndpointingRequestPhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageCallEndpointingRequestPhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageCallEndpointingRequestPhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ServerMessageCallEndpointingRequestPhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ServerMessageCallEndpointingRequestPhoneNumber_ByoPhoneNumber, + ServerMessageCallEndpointingRequestPhoneNumber_Twilio, + ServerMessageCallEndpointingRequestPhoneNumber_Vonage, + ServerMessageCallEndpointingRequestPhoneNumber_Vapi, + ServerMessageCallEndpointingRequestPhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/server_message_call_endpointing_request_type.py b/src/vapi/types/server_message_call_endpointing_request_type.py new file mode 100644 index 00000000..1c231a2a --- /dev/null +++ b/src/vapi/types/server_message_call_endpointing_request_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ServerMessageCallEndpointingRequestType = typing.Union[typing.Literal["call.endpointing.request"], typing.Any] diff --git a/src/vapi/types/server_message_chat_created.py b/src/vapi/types/server_message_chat_created.py new file mode 100644 index 00000000..866b5f4a --- /dev/null +++ b/src/vapi/types/server_message_chat_created.py @@ -0,0 +1,192 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .artifact import Artifact +from .call import Call +from .chat import Chat +from .create_customer_dto import CreateCustomerDto +from .server_message_chat_created_phone_number import ServerMessageChatCreatedPhoneNumber +from .server_message_chat_created_type import ServerMessageChatCreatedType + + +class ServerMessageChatCreated(UncheckedBaseModel): + phone_number: typing_extensions.Annotated[ + typing.Optional[ServerMessageChatCreatedPhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: ServerMessageChatCreatedType = pydantic.Field() + """ + This is the type of the message. "chat.created" is sent when a new chat is created. + """ + + timestamp: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the timestamp of the message. + """ + + artifact: typing.Optional[Artifact] = pydantic.Field(default=None) + """ + This is a live version of the `call.artifact`. + + This matches what is stored on `call.artifact` after the call. + """ + + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) + """ + This is the assistant that the message is associated with. + """ + + customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) + """ + This is the customer that the message is associated with. + """ + + call: typing.Optional[Call] = pydantic.Field(default=None) + """ + This is the call that the message is associated with. + """ + + chat: Chat = pydantic.Field() + """ + This is the chat that was created. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ServerMessageChatCreated, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/server_message_chat_created_phone_number.py b/src/vapi/types/server_message_chat_created_phone_number.py new file mode 100644 index 00000000..58df87f1 --- /dev/null +++ b/src/vapi/types/server_message_chat_created_phone_number.py @@ -0,0 +1,247 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ServerMessageChatCreatedPhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageChatCreatedPhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageChatCreatedPhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageChatCreatedPhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageChatCreatedPhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ServerMessageChatCreatedPhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ServerMessageChatCreatedPhoneNumber_ByoPhoneNumber, + ServerMessageChatCreatedPhoneNumber_Twilio, + ServerMessageChatCreatedPhoneNumber_Vonage, + ServerMessageChatCreatedPhoneNumber_Vapi, + ServerMessageChatCreatedPhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/server_message_chat_created_type.py b/src/vapi/types/server_message_chat_created_type.py new file mode 100644 index 00000000..a393c3e7 --- /dev/null +++ b/src/vapi/types/server_message_chat_created_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ServerMessageChatCreatedType = typing.Union[typing.Literal["chat.created"], typing.Any] diff --git a/src/vapi/types/server_message_chat_deleted.py b/src/vapi/types/server_message_chat_deleted.py new file mode 100644 index 00000000..700fac32 --- /dev/null +++ b/src/vapi/types/server_message_chat_deleted.py @@ -0,0 +1,192 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .artifact import Artifact +from .call import Call +from .chat import Chat +from .create_customer_dto import CreateCustomerDto +from .server_message_chat_deleted_phone_number import ServerMessageChatDeletedPhoneNumber +from .server_message_chat_deleted_type import ServerMessageChatDeletedType + + +class ServerMessageChatDeleted(UncheckedBaseModel): + phone_number: typing_extensions.Annotated[ + typing.Optional[ServerMessageChatDeletedPhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: ServerMessageChatDeletedType = pydantic.Field() + """ + This is the type of the message. "chat.deleted" is sent when a chat is deleted. + """ + + timestamp: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the timestamp of the message. + """ + + artifact: typing.Optional[Artifact] = pydantic.Field(default=None) + """ + This is a live version of the `call.artifact`. + + This matches what is stored on `call.artifact` after the call. + """ + + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) + """ + This is the assistant that the message is associated with. + """ + + customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) + """ + This is the customer that the message is associated with. + """ + + call: typing.Optional[Call] = pydantic.Field(default=None) + """ + This is the call that the message is associated with. + """ + + chat: Chat = pydantic.Field() + """ + This is the chat that was deleted. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ServerMessageChatDeleted, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/server_message_chat_deleted_phone_number.py b/src/vapi/types/server_message_chat_deleted_phone_number.py new file mode 100644 index 00000000..4e0cc24b --- /dev/null +++ b/src/vapi/types/server_message_chat_deleted_phone_number.py @@ -0,0 +1,247 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ServerMessageChatDeletedPhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageChatDeletedPhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageChatDeletedPhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageChatDeletedPhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageChatDeletedPhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ServerMessageChatDeletedPhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ServerMessageChatDeletedPhoneNumber_ByoPhoneNumber, + ServerMessageChatDeletedPhoneNumber_Twilio, + ServerMessageChatDeletedPhoneNumber_Vonage, + ServerMessageChatDeletedPhoneNumber_Vapi, + ServerMessageChatDeletedPhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/server_message_chat_deleted_type.py b/src/vapi/types/server_message_chat_deleted_type.py new file mode 100644 index 00000000..ee73fb17 --- /dev/null +++ b/src/vapi/types/server_message_chat_deleted_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ServerMessageChatDeletedType = typing.Union[typing.Literal["chat.deleted"], typing.Any] diff --git a/src/vapi/types/server_message_conversation_update.py b/src/vapi/types/server_message_conversation_update.py index 1ec44102..2a47bf67 100644 --- a/src/vapi/types/server_message_conversation_update.py +++ b/src/vapi/types/server_message_conversation_update.py @@ -1,39 +1,33 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -from .callback_step import CallbackStep -from .create_workflow_block_dto import CreateWorkflowBlockDto -from .handoff_step import HandoffStep -import typing_extensions + import typing -from .server_message_conversation_update_phone_number import ServerMessageConversationUpdatePhoneNumber -from ..core.serialization import FieldMetadata + import pydantic -from .server_message_conversation_update_messages_item import ServerMessageConversationUpdateMessagesItem -from .open_ai_message import OpenAiMessage +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel from .artifact import Artifact -from .create_assistant_dto import CreateAssistantDto -from .create_customer_dto import CreateCustomerDto from .call import Call -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.pydantic_utilities import update_forward_refs +from .chat import Chat +from .create_customer_dto import CreateCustomerDto +from .open_ai_message import OpenAiMessage +from .server_message_conversation_update_messages_item import ServerMessageConversationUpdateMessagesItem +from .server_message_conversation_update_phone_number import ServerMessageConversationUpdatePhoneNumber +from .server_message_conversation_update_type import ServerMessageConversationUpdateType -class ServerMessageConversationUpdate(UniversalBaseModel): +class ServerMessageConversationUpdate(UncheckedBaseModel): phone_number: typing_extensions.Annotated[ - typing.Optional[ServerMessageConversationUpdatePhoneNumber], FieldMetadata(alias="phoneNumber") - ] = pydantic.Field(default=None) - """ - This is the phone number associated with the call. - - This matches one of the following: - - - `call.phoneNumber`, - - `call.phoneNumberId`. - """ - - type: typing.Literal["conversation-update"] = pydantic.Field(default="conversation-update") + typing.Optional[ServerMessageConversationUpdatePhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: ServerMessageConversationUpdateType = pydantic.Field() """ This is the type of the message. "conversation-update" is sent when an update is committed to the conversation history. """ @@ -44,15 +38,16 @@ class ServerMessageConversationUpdate(UniversalBaseModel): """ messages_open_ai_formatted: typing_extensions.Annotated[ - typing.List[OpenAiMessage], FieldMetadata(alias="messagesOpenAIFormatted") - ] = pydantic.Field() - """ - This is the most up-to-date conversation history at the time the message is sent, formatted for OpenAI. + typing.List[OpenAiMessage], + FieldMetadata(alias="messagesOpenAIFormatted"), + pydantic.Field( + alias="messagesOpenAIFormatted", + description="This is the most up-to-date conversation history at the time the message is sent, formatted for OpenAI.", + ), + ] + timestamp: typing.Optional[float] = pydantic.Field(default=None) """ - - timestamp: typing.Optional[str] = pydantic.Field(default=None) - """ - This is the ISO-8601 formatted timestamp of when the message was sent. + This is the timestamp of the message. """ artifact: typing.Optional[Artifact] = pydantic.Field(default=None) @@ -62,37 +57,24 @@ class ServerMessageConversationUpdate(UniversalBaseModel): This matches what is stored on `call.artifact` after the call. """ - assistant: typing.Optional[CreateAssistantDto] = pydantic.Field(default=None) + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) """ - This is the assistant that is currently active. This is provided for convenience. - - This matches one of the following: - - - `call.assistant`, - - `call.assistantId`, - - `call.squad[n].assistant`, - - `call.squad[n].assistantId`, - - `call.squadId->[n].assistant`, - - `call.squadId->[n].assistantId`. + This is the assistant that the message is associated with. """ customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) """ - This is the customer associated with the call. - - This matches one of the following: - - - `call.customer`, - - `call.customerId`. + This is the customer that the message is associated with. """ call: typing.Optional[Call] = pydantic.Field(default=None) """ - This is the call object. - - This matches what was returned in POST /call. - - Note: This might get stale during the call. To get the latest call object, especially after the call is ended, use GET /call/:id. + This is the call that the message is associated with. + """ + + chat: typing.Optional[Chat] = pydantic.Field(default=None) + """ + This is the chat object. """ if IS_PYDANTIC_V2: @@ -105,6 +87,121 @@ class Config: extra = pydantic.Extra.allow -update_forward_refs(CallbackStep, ServerMessageConversationUpdate=ServerMessageConversationUpdate) -update_forward_refs(CreateWorkflowBlockDto, ServerMessageConversationUpdate=ServerMessageConversationUpdate) -update_forward_refs(HandoffStep, ServerMessageConversationUpdate=ServerMessageConversationUpdate) +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ServerMessageConversationUpdate, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/server_message_conversation_update_messages_item.py b/src/vapi/types/server_message_conversation_update_messages_item.py index b9a54ab4..18570aae 100644 --- a/src/vapi/types/server_message_conversation_update_messages_item.py +++ b/src/vapi/types/server_message_conversation_update_messages_item.py @@ -1,11 +1,12 @@ # This file was auto-generated by Fern from our API Definition. import typing -from .user_message import UserMessage -from .system_message import SystemMessage + from .bot_message import BotMessage +from .system_message import SystemMessage from .tool_call_message import ToolCallMessage from .tool_call_result_message import ToolCallResultMessage +from .user_message import UserMessage ServerMessageConversationUpdateMessagesItem = typing.Union[ UserMessage, SystemMessage, BotMessage, ToolCallMessage, ToolCallResultMessage diff --git a/src/vapi/types/server_message_conversation_update_phone_number.py b/src/vapi/types/server_message_conversation_update_phone_number.py index f5f62333..235dd13e 100644 --- a/src/vapi/types/server_message_conversation_update_phone_number.py +++ b/src/vapi/types/server_message_conversation_update_phone_number.py @@ -1,11 +1,247 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .create_byo_phone_number_dto import CreateByoPhoneNumberDto -from .create_twilio_phone_number_dto import CreateTwilioPhoneNumberDto -from .create_vonage_phone_number_dto import CreateVonagePhoneNumberDto -from .create_vapi_phone_number_dto import CreateVapiPhoneNumberDto -ServerMessageConversationUpdatePhoneNumber = typing.Union[ - CreateByoPhoneNumberDto, CreateTwilioPhoneNumberDto, CreateVonagePhoneNumberDto, CreateVapiPhoneNumberDto +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ServerMessageConversationUpdatePhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageConversationUpdatePhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageConversationUpdatePhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageConversationUpdatePhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageConversationUpdatePhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ServerMessageConversationUpdatePhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ServerMessageConversationUpdatePhoneNumber_ByoPhoneNumber, + ServerMessageConversationUpdatePhoneNumber_Twilio, + ServerMessageConversationUpdatePhoneNumber_Vonage, + ServerMessageConversationUpdatePhoneNumber_Vapi, + ServerMessageConversationUpdatePhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), ] diff --git a/src/vapi/types/server_message_conversation_update_type.py b/src/vapi/types/server_message_conversation_update_type.py new file mode 100644 index 00000000..3a897d28 --- /dev/null +++ b/src/vapi/types/server_message_conversation_update_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ServerMessageConversationUpdateType = typing.Union[typing.Literal["conversation-update"], typing.Any] diff --git a/src/vapi/types/server_message_end_of_call_report.py b/src/vapi/types/server_message_end_of_call_report.py index bfc105c6..0dc73a5c 100644 --- a/src/vapi/types/server_message_end_of_call_report.py +++ b/src/vapi/types/server_message_end_of_call_report.py @@ -1,52 +1,49 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -from .callback_step import CallbackStep -from .create_workflow_block_dto import CreateWorkflowBlockDto -from .handoff_step import HandoffStep -import typing_extensions + +import datetime as dt import typing -from .server_message_end_of_call_report_phone_number import ServerMessageEndOfCallReportPhoneNumber -from ..core.serialization import FieldMetadata + import pydantic -from .server_message_end_of_call_report_ended_reason import ServerMessageEndOfCallReportEndedReason -from .server_message_end_of_call_report_costs_item import ServerMessageEndOfCallReportCostsItem +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .analysis import Analysis from .artifact import Artifact -from .create_assistant_dto import CreateAssistantDto -from .create_customer_dto import CreateCustomerDto from .call import Call -from .analysis import Analysis -import datetime as dt -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.pydantic_utilities import update_forward_refs +from .chat import Chat +from .compliance import Compliance +from .create_customer_dto import CreateCustomerDto +from .server_message_end_of_call_report_costs_item import ServerMessageEndOfCallReportCostsItem +from .server_message_end_of_call_report_destination import ServerMessageEndOfCallReportDestination +from .server_message_end_of_call_report_ended_reason import ServerMessageEndOfCallReportEndedReason +from .server_message_end_of_call_report_phone_number import ServerMessageEndOfCallReportPhoneNumber +from .server_message_end_of_call_report_type import ServerMessageEndOfCallReportType -class ServerMessageEndOfCallReport(UniversalBaseModel): +class ServerMessageEndOfCallReport(UncheckedBaseModel): phone_number: typing_extensions.Annotated[ - typing.Optional[ServerMessageEndOfCallReportPhoneNumber], FieldMetadata(alias="phoneNumber") - ] = pydantic.Field(default=None) - """ - This is the phone number associated with the call. - - This matches one of the following: - - - `call.phoneNumber`, - - `call.phoneNumberId`. - """ - - type: typing.Literal["end-of-call-report"] = pydantic.Field(default="end-of-call-report") + typing.Optional[ServerMessageEndOfCallReportPhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: ServerMessageEndOfCallReportType = pydantic.Field() """ This is the type of the message. "end-of-call-report" is sent when the call ends and post-processing is complete. """ ended_reason: typing_extensions.Annotated[ - ServerMessageEndOfCallReportEndedReason, FieldMetadata(alias="endedReason") - ] = pydantic.Field() - """ - This is the reason the call ended. This can also be found at `call.endedReason` on GET /call/:id. - """ - + ServerMessageEndOfCallReportEndedReason, + FieldMetadata(alias="endedReason"), + pydantic.Field( + alias="endedReason", + description="This is the reason the call ended. This can also be found at `call.endedReason` on GET /call/:id.", + ), + ] cost: typing.Optional[float] = pydantic.Field(default=None) """ This is the cost of the call in USD. This can also be found at `call.cost` on GET /call/:id. @@ -57,9 +54,15 @@ class ServerMessageEndOfCallReport(UniversalBaseModel): These are the costs of individual components of the call in USD. This can also be found at `call.costs` on GET /call/:id. """ - timestamp: typing.Optional[str] = pydantic.Field(default=None) + destination: typing.Optional[ServerMessageEndOfCallReportDestination] = pydantic.Field(default=None) """ - This is the ISO-8601 formatted timestamp of when the message was sent. + This is the destination the call was transferred to, if the call was forwarded. + This can also be found at `call.destination` on GET /call/:id. + """ + + timestamp: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the timestamp of the message. """ artifact: Artifact = pydantic.Field() @@ -67,56 +70,50 @@ class ServerMessageEndOfCallReport(UniversalBaseModel): These are the artifacts from the call. This can also be found at `call.artifact` on GET /call/:id. """ - assistant: typing.Optional[CreateAssistantDto] = pydantic.Field(default=None) + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) """ - This is the assistant that is currently active. This is provided for convenience. - - This matches one of the following: - - - `call.assistant`, - - `call.assistantId`, - - `call.squad[n].assistant`, - - `call.squad[n].assistantId`, - - `call.squadId->[n].assistant`, - - `call.squadId->[n].assistantId`. + This is the assistant that the message is associated with. """ customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) """ - This is the customer associated with the call. - - This matches one of the following: - - - `call.customer`, - - `call.customerId`. + This is the customer that the message is associated with. """ call: typing.Optional[Call] = pydantic.Field(default=None) """ - This is the call object. - - This matches what was returned in POST /call. - - Note: This might get stale during the call. To get the latest call object, especially after the call is ended, use GET /call/:id. + This is the call that the message is associated with. """ - analysis: Analysis = pydantic.Field() + chat: typing.Optional[Chat] = pydantic.Field(default=None) """ - This is the analysis of the call. This can also be found at `call.analysis` on GET /call/:id. + This is the chat object. """ - started_at: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="startedAt")] = ( - pydantic.Field(default=None) - ) + analysis: Analysis = pydantic.Field() """ - This is the ISO 8601 date-time string of when the call started. This can also be found at `call.startedAt` on GET /call/:id. + This is the analysis of the call. This can also be found at `call.analysis` on GET /call/:id. """ - ended_at: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="endedAt")] = ( - pydantic.Field(default=None) - ) + started_at: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="startedAt"), + pydantic.Field( + alias="startedAt", + description="This is the ISO 8601 date-time string of when the call started. This can also be found at `call.startedAt` on GET /call/:id.", + ), + ] = None + ended_at: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="endedAt"), + pydantic.Field( + alias="endedAt", + description="This is the ISO 8601 date-time string of when the call ended. This can also be found at `call.endedAt` on GET /call/:id.", + ), + ] = None + compliance: typing.Optional[Compliance] = pydantic.Field(default=None) """ - This is the ISO 8601 date-time string of when the call ended. This can also be found at `call.endedAt` on GET /call/:id. + This is the compliance result of the call. This can also be found at `call.compliance` on GET /call/:id. """ if IS_PYDANTIC_V2: @@ -129,6 +126,121 @@ class Config: extra = pydantic.Extra.allow -update_forward_refs(CallbackStep, ServerMessageEndOfCallReport=ServerMessageEndOfCallReport) -update_forward_refs(CreateWorkflowBlockDto, ServerMessageEndOfCallReport=ServerMessageEndOfCallReport) -update_forward_refs(HandoffStep, ServerMessageEndOfCallReport=ServerMessageEndOfCallReport) +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ServerMessageEndOfCallReport, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/server_message_end_of_call_report_costs_item.py b/src/vapi/types/server_message_end_of_call_report_costs_item.py index 1c68e89d..2111c75d 100644 --- a/src/vapi/types/server_message_end_of_call_report_costs_item.py +++ b/src/vapi/types/server_message_end_of_call_report_costs_item.py @@ -1,13 +1,196 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .transport_cost import TransportCost -from .transcriber_cost import TranscriberCost -from .model_cost import ModelCost -from .voice_cost import VoiceCost -from .vapi_cost import VapiCost -from .analysis_cost import AnalysisCost - -ServerMessageEndOfCallReportCostsItem = typing.Union[ - TransportCost, TranscriberCost, ModelCost, VoiceCost, VapiCost, AnalysisCost + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .analysis_cost_analysis_type import AnalysisCostAnalysisType +from .transport_cost_provider import TransportCostProvider +from .vapi_cost_sub_type import VapiCostSubType +from .voicemail_detection_cost_provider import VoicemailDetectionCostProvider + + +class ServerMessageEndOfCallReportCostsItem_Transport(UncheckedBaseModel): + type: typing.Literal["transport"] = "transport" + provider: typing.Optional[TransportCostProvider] = None + minutes: float + cost: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageEndOfCallReportCostsItem_Transcriber(UncheckedBaseModel): + type: typing.Literal["transcriber"] = "transcriber" + transcriber: typing.Dict[str, typing.Any] + minutes: float + cost: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageEndOfCallReportCostsItem_Model(UncheckedBaseModel): + type: typing.Literal["model"] = "model" + model: typing.Dict[str, typing.Any] + prompt_tokens: typing_extensions.Annotated[ + float, FieldMetadata(alias="promptTokens"), pydantic.Field(alias="promptTokens") + ] + completion_tokens: typing_extensions.Annotated[ + float, FieldMetadata(alias="completionTokens"), pydantic.Field(alias="completionTokens") + ] + cached_prompt_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="cachedPromptTokens"), pydantic.Field(alias="cachedPromptTokens") + ] = None + cost: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageEndOfCallReportCostsItem_Voice(UncheckedBaseModel): + type: typing.Literal["voice"] = "voice" + voice: typing.Dict[str, typing.Any] + characters: float + cost: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageEndOfCallReportCostsItem_Vapi(UncheckedBaseModel): + type: typing.Literal["vapi"] = "vapi" + sub_type: typing_extensions.Annotated[ + VapiCostSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + minutes: float + cost: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageEndOfCallReportCostsItem_VoicemailDetection(UncheckedBaseModel): + type: typing.Literal["voicemail-detection"] = "voicemail-detection" + model: typing.Dict[str, typing.Any] + provider: VoicemailDetectionCostProvider + prompt_text_tokens: typing_extensions.Annotated[ + float, FieldMetadata(alias="promptTextTokens"), pydantic.Field(alias="promptTextTokens") + ] + prompt_audio_tokens: typing_extensions.Annotated[ + float, FieldMetadata(alias="promptAudioTokens"), pydantic.Field(alias="promptAudioTokens") + ] + completion_text_tokens: typing_extensions.Annotated[ + float, FieldMetadata(alias="completionTextTokens"), pydantic.Field(alias="completionTextTokens") + ] + completion_audio_tokens: typing_extensions.Annotated[ + float, FieldMetadata(alias="completionAudioTokens"), pydantic.Field(alias="completionAudioTokens") + ] + cost: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageEndOfCallReportCostsItem_Analysis(UncheckedBaseModel): + type: typing.Literal["analysis"] = "analysis" + analysis_type: typing_extensions.Annotated[ + AnalysisCostAnalysisType, FieldMetadata(alias="analysisType"), pydantic.Field(alias="analysisType") + ] + model: typing.Dict[str, typing.Any] + prompt_tokens: typing_extensions.Annotated[ + float, FieldMetadata(alias="promptTokens"), pydantic.Field(alias="promptTokens") + ] + completion_tokens: typing_extensions.Annotated[ + float, FieldMetadata(alias="completionTokens"), pydantic.Field(alias="completionTokens") + ] + cached_prompt_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="cachedPromptTokens"), pydantic.Field(alias="cachedPromptTokens") + ] = None + cost: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageEndOfCallReportCostsItem_KnowledgeBase(UncheckedBaseModel): + type: typing.Literal["knowledge-base"] = "knowledge-base" + model: typing.Dict[str, typing.Any] + prompt_tokens: typing_extensions.Annotated[ + float, FieldMetadata(alias="promptTokens"), pydantic.Field(alias="promptTokens") + ] + completion_tokens: typing_extensions.Annotated[ + float, FieldMetadata(alias="completionTokens"), pydantic.Field(alias="completionTokens") + ] + cost: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ServerMessageEndOfCallReportCostsItem = typing_extensions.Annotated[ + typing.Union[ + ServerMessageEndOfCallReportCostsItem_Transport, + ServerMessageEndOfCallReportCostsItem_Transcriber, + ServerMessageEndOfCallReportCostsItem_Model, + ServerMessageEndOfCallReportCostsItem_Voice, + ServerMessageEndOfCallReportCostsItem_Vapi, + ServerMessageEndOfCallReportCostsItem_VoicemailDetection, + ServerMessageEndOfCallReportCostsItem_Analysis, + ServerMessageEndOfCallReportCostsItem_KnowledgeBase, + ], + UnionMetadata(discriminant="type"), ] diff --git a/src/vapi/types/server_message_end_of_call_report_destination.py b/src/vapi/types/server_message_end_of_call_report_destination.py new file mode 100644 index 00000000..d47f1b33 --- /dev/null +++ b/src/vapi/types/server_message_end_of_call_report_destination.py @@ -0,0 +1,85 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .transfer_destination_number_message import TransferDestinationNumberMessage +from .transfer_destination_sip_message import TransferDestinationSipMessage +from .transfer_plan import TransferPlan + + +class ServerMessageEndOfCallReportDestination_Number(UncheckedBaseModel): + """ + This is the destination the call was transferred to, if the call was forwarded. + This can also be found at `call.destination` on GET /call/:id. + """ + + type: typing.Literal["number"] = "number" + message: typing.Optional[TransferDestinationNumberMessage] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: str + extension: typing.Optional[str] = None + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageEndOfCallReportDestination_Sip(UncheckedBaseModel): + """ + This is the destination the call was transferred to, if the call was forwarded. + This can also be found at `call.destination` on GET /call/:id. + """ + + type: typing.Literal["sip"] = "sip" + message: typing.Optional[TransferDestinationSipMessage] = None + sip_uri: typing_extensions.Annotated[str, FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri")] + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + sip_headers: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="sipHeaders"), + pydantic.Field(alias="sipHeaders"), + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ServerMessageEndOfCallReportDestination = typing_extensions.Annotated[ + typing.Union[ServerMessageEndOfCallReportDestination_Number, ServerMessageEndOfCallReportDestination_Sip], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/server_message_end_of_call_report_ended_reason.py b/src/vapi/types/server_message_end_of_call_report_ended_reason.py index 970a6253..b4eb92a2 100644 --- a/src/vapi/types/server_message_end_of_call_report_ended_reason.py +++ b/src/vapi/types/server_message_end_of_call_report_ended_reason.py @@ -4,133 +4,452 @@ ServerMessageEndOfCallReportEndedReason = typing.Union[ typing.Literal[ - "assistant-error", + "call-start-error-neither-assistant-nor-server-set", + "assistant-request-failed", + "assistant-request-returned-error", + "assistant-request-returned-unspeakable-error", + "assistant-request-returned-invalid-assistant", + "assistant-request-returned-no-assistant", + "assistant-request-returned-forwarding-phone-number", + "scheduled-call-deleted", + "call.start.error-vapifault-get-org", + "call.start.error-vapifault-get-subscription", + "call.start.error-get-assistant", + "call.start.error-get-phone-number", + "call.start.error-get-customer", + "call.start.error-get-resources-validation", + "call.start.error-vapi-number-international", + "call.start.error-vapi-number-outbound-daily-limit", + "call.start.error-get-transport", + "call.start.error-subscription-wallet-does-not-exist", + "call.start.error-fraud-check-failed", + "call.start.error-subscription-frozen", + "call.start.error-subscription-insufficient-credits", + "call.start.error-subscription-upgrade-failed", + "call.start.error-subscription-concurrency-limit-reached", + "call.start.error-enterprise-feature-not-available-recording-consent", + "assistant-not-valid", + "call.start.error-vapifault-database-error", "assistant-not-found", - "db-error", - "no-server-available", - "license-check-failed", - "pipeline-error-openai-llm-failed", - "pipeline-error-azure-openai-llm-failed", - "pipeline-error-groq-llm-failed", - "pipeline-error-anthropic-llm-failed", - "pipeline-error-vapi-llm-failed", - "pipeline-error-vapi-400-bad-request-validation-failed", - "pipeline-error-vapi-401-unauthorized", - "pipeline-error-vapi-403-model-access-denied", - "pipeline-error-vapi-429-exceeded-quota", - "pipeline-error-vapi-500-server-error", "pipeline-error-openai-voice-failed", "pipeline-error-cartesia-voice-failed", - "pipeline-error-deepgram-transcriber-failed", "pipeline-error-deepgram-voice-failed", - "pipeline-error-gladia-transcriber-failed", "pipeline-error-eleven-labs-voice-failed", "pipeline-error-playht-voice-failed", "pipeline-error-lmnt-voice-failed", "pipeline-error-azure-voice-failed", "pipeline-error-rime-ai-voice-failed", - "pipeline-error-neets-voice-failed", - "pipeline-no-available-model", + "pipeline-error-smallest-ai-voice-failed", + "pipeline-error-vapi-voice-failed", + "pipeline-error-neuphonic-voice-failed", + "pipeline-error-hume-voice-failed", + "pipeline-error-sesame-voice-failed", + "pipeline-error-inworld-voice-failed", + "pipeline-error-minimax-voice-failed", + "pipeline-error-wellsaid-voice-failed", + "pipeline-error-tavus-video-failed", + "call.in-progress.error-vapifault-openai-voice-failed", + "call.in-progress.error-vapifault-cartesia-voice-failed", + "call.in-progress.error-vapifault-deepgram-voice-failed", + "call.in-progress.error-vapifault-eleven-labs-voice-failed", + "call.in-progress.error-vapifault-playht-voice-failed", + "call.in-progress.error-vapifault-lmnt-voice-failed", + "call.in-progress.error-vapifault-azure-voice-failed", + "call.in-progress.error-vapifault-rime-ai-voice-failed", + "call.in-progress.error-vapifault-smallest-ai-voice-failed", + "call.in-progress.error-vapifault-vapi-voice-failed", + "call.in-progress.error-vapifault-neuphonic-voice-failed", + "call.in-progress.error-vapifault-hume-voice-failed", + "call.in-progress.error-vapifault-sesame-voice-failed", + "call.in-progress.error-vapifault-inworld-voice-failed", + "call.in-progress.error-vapifault-minimax-voice-failed", + "call.in-progress.error-vapifault-wellsaid-voice-failed", + "call.in-progress.error-vapifault-tavus-video-failed", + "pipeline-error-vapi-llm-failed", + "pipeline-error-vapi-400-bad-request-validation-failed", + "pipeline-error-vapi-401-unauthorized", + "pipeline-error-vapi-403-model-access-denied", + "pipeline-error-vapi-429-exceeded-quota", + "pipeline-error-vapi-500-server-error", + "pipeline-error-vapi-503-server-overloaded-error", + "call.in-progress.error-providerfault-vapi-llm-failed", + "call.in-progress.error-vapifault-vapi-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-vapi-401-unauthorized", + "call.in-progress.error-vapifault-vapi-403-model-access-denied", + "call.in-progress.error-vapifault-vapi-429-exceeded-quota", + "call.in-progress.error-providerfault-vapi-500-server-error", + "call.in-progress.error-providerfault-vapi-503-server-overloaded-error", + "pipeline-error-deepgram-transcriber-failed", + "pipeline-error-deepgram-transcriber-api-key-missing", + "call.in-progress.error-vapifault-deepgram-transcriber-failed", + "pipeline-error-gladia-transcriber-failed", + "call.in-progress.error-vapifault-gladia-transcriber-failed", + "pipeline-error-speechmatics-transcriber-failed", + "call.in-progress.error-vapifault-speechmatics-transcriber-failed", + "pipeline-error-assembly-ai-transcriber-failed", + "pipeline-error-assembly-ai-returning-400-insufficent-funds", + "pipeline-error-assembly-ai-returning-400-paid-only-feature", + "pipeline-error-assembly-ai-returning-401-invalid-credentials", + "pipeline-error-assembly-ai-returning-500-invalid-schema", + "pipeline-error-assembly-ai-returning-500-word-boost-parsing-failed", + "call.in-progress.error-vapifault-assembly-ai-transcriber-failed", + "call.in-progress.error-vapifault-assembly-ai-returning-400-insufficent-funds", + "call.in-progress.error-vapifault-assembly-ai-returning-400-paid-only-feature", + "call.in-progress.error-vapifault-assembly-ai-returning-401-invalid-credentials", + "call.in-progress.error-vapifault-assembly-ai-returning-500-invalid-schema", + "call.in-progress.error-vapifault-assembly-ai-returning-500-word-boost-parsing-failed", + "pipeline-error-talkscriber-transcriber-failed", + "call.in-progress.error-vapifault-talkscriber-transcriber-failed", + "pipeline-error-azure-speech-transcriber-failed", + "call.in-progress.error-vapifault-azure-speech-transcriber-failed", + "pipeline-error-eleven-labs-transcriber-failed", + "call.in-progress.error-vapifault-eleven-labs-transcriber-failed", + "pipeline-error-google-transcriber-failed", + "call.in-progress.error-vapifault-google-transcriber-failed", + "pipeline-error-openai-transcriber-failed", + "call.in-progress.error-vapifault-openai-transcriber-failed", + "pipeline-error-soniox-transcriber-auth-failed", + "pipeline-error-soniox-transcriber-rate-limited", + "pipeline-error-soniox-transcriber-invalid-config", + "pipeline-error-soniox-transcriber-server-error", + "pipeline-error-soniox-transcriber-failed", + "call.in-progress.error-vapifault-soniox-transcriber-auth-failed", + "call.in-progress.error-vapifault-soniox-transcriber-rate-limited", + "call.in-progress.error-vapifault-soniox-transcriber-invalid-config", + "call.in-progress.error-vapifault-soniox-transcriber-server-error", + "call.in-progress.error-vapifault-soniox-transcriber-failed", + "call.in-progress.error-pipeline-no-available-llm-model", "worker-shutdown", - "unknown-error", "vonage-disconnected", "vonage-failed-to-connect-call", + "vonage-completed", "phone-call-provider-bypass-enabled-but-no-call-received", - "vapifault-phone-call-worker-setup-socket-error", - "vapifault-phone-call-worker-worker-setup-socket-timeout", - "vapifault-phone-call-worker-could-not-find-call", - "vapifault-transport-never-connected", - "vapifault-web-call-worker-setup-failed", - "vapifault-transport-connected-but-call-not-active", - "assistant-not-invalid", - "assistant-not-provided", - "call-start-error-neither-assistant-nor-server-set", - "assistant-request-failed", - "assistant-request-returned-error", - "assistant-request-returned-unspeakable-error", - "assistant-request-returned-invalid-assistant", - "assistant-request-returned-no-assistant", - "assistant-request-returned-forwarding-phone-number", - "assistant-ended-call", - "assistant-said-end-call-phrase", - "assistant-forwarded-call", - "assistant-join-timed-out", - "customer-busy", - "customer-ended-call", - "customer-did-not-answer", - "customer-did-not-give-microphone-permission", - "assistant-said-message-with-end-call-enabled", - "exceeded-max-duration", - "manually-canceled", - "phone-call-provider-closed-websocket", + "call.in-progress.error-providerfault-transport-never-connected", + "call.in-progress.error-vapifault-worker-not-available", + "call.in-progress.error-vapifault-transport-never-connected", + "call.in-progress.error-vapifault-transport-connected-but-call-not-active", + "call.in-progress.error-vapifault-call-started-but-connection-to-transport-missing", + "call.in-progress.error-vapifault-worker-died", + "call.in-progress.twilio-completed-call", + "call.in-progress.sip-completed-call", + "call.in-progress.error-sip-inbound-call-failed-to-connect", + "call.in-progress.error-providerfault-outbound-sip-503-service-unavailable", + "call.in-progress.error-sip-outbound-call-failed-to-connect", + "call.ringing.error-sip-inbound-call-failed-to-connect", + "call.in-progress.error-providerfault-openai-llm-failed", + "call.in-progress.error-providerfault-azure-openai-llm-failed", + "call.in-progress.error-providerfault-groq-llm-failed", + "call.in-progress.error-providerfault-google-llm-failed", + "call.in-progress.error-providerfault-xai-llm-failed", + "call.in-progress.error-providerfault-mistral-llm-failed", + "call.in-progress.error-providerfault-minimax-llm-failed", + "call.in-progress.error-providerfault-inflection-ai-llm-failed", + "call.in-progress.error-providerfault-cerebras-llm-failed", + "call.in-progress.error-providerfault-deep-seek-llm-failed", + "call.in-progress.error-providerfault-baseten-llm-failed", + "call.in-progress.error-vapifault-chat-pipeline-failed-to-start", "pipeline-error-openai-400-bad-request-validation-failed", "pipeline-error-openai-401-unauthorized", + "pipeline-error-openai-401-incorrect-api-key", + "pipeline-error-openai-401-account-not-in-organization", "pipeline-error-openai-403-model-access-denied", "pipeline-error-openai-429-exceeded-quota", + "pipeline-error-openai-429-rate-limit-reached", "pipeline-error-openai-500-server-error", + "pipeline-error-openai-503-server-overloaded-error", + "pipeline-error-openai-llm-failed", + "call.in-progress.error-vapifault-openai-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-openai-401-unauthorized", + "call.in-progress.error-vapifault-openai-401-incorrect-api-key", + "call.in-progress.error-vapifault-openai-401-account-not-in-organization", + "call.in-progress.error-vapifault-openai-403-model-access-denied", + "call.in-progress.error-vapifault-openai-429-exceeded-quota", + "call.in-progress.error-vapifault-openai-429-rate-limit-reached", + "call.in-progress.error-providerfault-openai-500-server-error", + "call.in-progress.error-providerfault-openai-503-server-overloaded-error", "pipeline-error-azure-openai-400-bad-request-validation-failed", "pipeline-error-azure-openai-401-unauthorized", "pipeline-error-azure-openai-403-model-access-denied", "pipeline-error-azure-openai-429-exceeded-quota", "pipeline-error-azure-openai-500-server-error", + "pipeline-error-azure-openai-503-server-overloaded-error", + "pipeline-error-azure-openai-llm-failed", + "call.in-progress.error-vapifault-azure-openai-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-azure-openai-401-unauthorized", + "call.in-progress.error-vapifault-azure-openai-403-model-access-denied", + "call.in-progress.error-vapifault-azure-openai-429-exceeded-quota", + "call.in-progress.error-providerfault-azure-openai-500-server-error", + "call.in-progress.error-providerfault-azure-openai-503-server-overloaded-error", + "pipeline-error-google-400-bad-request-validation-failed", + "pipeline-error-google-401-unauthorized", + "pipeline-error-google-403-model-access-denied", + "pipeline-error-google-429-exceeded-quota", + "pipeline-error-google-500-server-error", + "pipeline-error-google-503-server-overloaded-error", + "pipeline-error-google-llm-failed", + "call.in-progress.error-vapifault-google-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-google-401-unauthorized", + "call.in-progress.error-vapifault-google-403-model-access-denied", + "call.in-progress.error-vapifault-google-429-exceeded-quota", + "call.in-progress.error-providerfault-google-500-server-error", + "call.in-progress.error-providerfault-google-503-server-overloaded-error", + "pipeline-error-xai-400-bad-request-validation-failed", + "pipeline-error-xai-401-unauthorized", + "pipeline-error-xai-403-model-access-denied", + "pipeline-error-xai-429-exceeded-quota", + "pipeline-error-xai-500-server-error", + "pipeline-error-xai-503-server-overloaded-error", + "pipeline-error-xai-llm-failed", + "call.in-progress.error-vapifault-xai-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-xai-401-unauthorized", + "call.in-progress.error-vapifault-xai-403-model-access-denied", + "call.in-progress.error-vapifault-xai-429-exceeded-quota", + "call.in-progress.error-providerfault-xai-500-server-error", + "call.in-progress.error-providerfault-xai-503-server-overloaded-error", + "pipeline-error-baseten-400-bad-request-validation-failed", + "pipeline-error-baseten-401-unauthorized", + "pipeline-error-baseten-403-model-access-denied", + "pipeline-error-baseten-429-exceeded-quota", + "pipeline-error-baseten-500-server-error", + "pipeline-error-baseten-503-server-overloaded-error", + "pipeline-error-baseten-llm-failed", + "call.in-progress.error-vapifault-baseten-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-baseten-401-unauthorized", + "call.in-progress.error-vapifault-baseten-403-model-access-denied", + "call.in-progress.error-vapifault-baseten-429-exceeded-quota", + "call.in-progress.error-providerfault-baseten-500-server-error", + "call.in-progress.error-providerfault-baseten-503-server-overloaded-error", + "pipeline-error-mistral-400-bad-request-validation-failed", + "pipeline-error-mistral-401-unauthorized", + "pipeline-error-mistral-403-model-access-denied", + "pipeline-error-mistral-429-exceeded-quota", + "pipeline-error-mistral-500-server-error", + "pipeline-error-mistral-503-server-overloaded-error", + "pipeline-error-mistral-llm-failed", + "call.in-progress.error-vapifault-mistral-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-mistral-401-unauthorized", + "call.in-progress.error-vapifault-mistral-403-model-access-denied", + "call.in-progress.error-vapifault-mistral-429-exceeded-quota", + "call.in-progress.error-providerfault-mistral-500-server-error", + "call.in-progress.error-providerfault-mistral-503-server-overloaded-error", + "pipeline-error-minimax-400-bad-request-validation-failed", + "pipeline-error-minimax-401-unauthorized", + "pipeline-error-minimax-403-model-access-denied", + "pipeline-error-minimax-429-exceeded-quota", + "pipeline-error-minimax-500-server-error", + "pipeline-error-minimax-503-server-overloaded-error", + "pipeline-error-minimax-llm-failed", + "call.in-progress.error-vapifault-minimax-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-minimax-401-unauthorized", + "call.in-progress.error-vapifault-minimax-403-model-access-denied", + "call.in-progress.error-vapifault-minimax-429-exceeded-quota", + "call.in-progress.error-providerfault-minimax-500-server-error", + "call.in-progress.error-providerfault-minimax-503-server-overloaded-error", + "pipeline-error-inflection-ai-400-bad-request-validation-failed", + "pipeline-error-inflection-ai-401-unauthorized", + "pipeline-error-inflection-ai-403-model-access-denied", + "pipeline-error-inflection-ai-429-exceeded-quota", + "pipeline-error-inflection-ai-500-server-error", + "pipeline-error-inflection-ai-503-server-overloaded-error", + "pipeline-error-inflection-ai-llm-failed", + "call.in-progress.error-vapifault-inflection-ai-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-inflection-ai-401-unauthorized", + "call.in-progress.error-vapifault-inflection-ai-403-model-access-denied", + "call.in-progress.error-vapifault-inflection-ai-429-exceeded-quota", + "call.in-progress.error-providerfault-inflection-ai-500-server-error", + "call.in-progress.error-providerfault-inflection-ai-503-server-overloaded-error", + "pipeline-error-deep-seek-400-bad-request-validation-failed", + "pipeline-error-deep-seek-401-unauthorized", + "pipeline-error-deep-seek-403-model-access-denied", + "pipeline-error-deep-seek-429-exceeded-quota", + "pipeline-error-deep-seek-500-server-error", + "pipeline-error-deep-seek-503-server-overloaded-error", + "pipeline-error-deep-seek-llm-failed", + "call.in-progress.error-vapifault-deep-seek-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-deep-seek-401-unauthorized", + "call.in-progress.error-vapifault-deep-seek-403-model-access-denied", + "call.in-progress.error-vapifault-deep-seek-429-exceeded-quota", + "call.in-progress.error-providerfault-deep-seek-500-server-error", + "call.in-progress.error-providerfault-deep-seek-503-server-overloaded-error", "pipeline-error-groq-400-bad-request-validation-failed", "pipeline-error-groq-401-unauthorized", "pipeline-error-groq-403-model-access-denied", "pipeline-error-groq-429-exceeded-quota", "pipeline-error-groq-500-server-error", + "pipeline-error-groq-503-server-overloaded-error", + "pipeline-error-groq-llm-failed", + "call.in-progress.error-vapifault-groq-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-groq-401-unauthorized", + "call.in-progress.error-vapifault-groq-403-model-access-denied", + "call.in-progress.error-vapifault-groq-429-exceeded-quota", + "call.in-progress.error-providerfault-groq-500-server-error", + "call.in-progress.error-providerfault-groq-503-server-overloaded-error", + "pipeline-error-cerebras-400-bad-request-validation-failed", + "pipeline-error-cerebras-401-unauthorized", + "pipeline-error-cerebras-403-model-access-denied", + "pipeline-error-cerebras-429-exceeded-quota", + "pipeline-error-cerebras-500-server-error", + "pipeline-error-cerebras-503-server-overloaded-error", + "pipeline-error-cerebras-llm-failed", + "call.in-progress.error-vapifault-cerebras-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-cerebras-401-unauthorized", + "call.in-progress.error-vapifault-cerebras-403-model-access-denied", + "call.in-progress.error-vapifault-cerebras-429-exceeded-quota", + "call.in-progress.error-providerfault-cerebras-500-server-error", + "call.in-progress.error-providerfault-cerebras-503-server-overloaded-error", "pipeline-error-anthropic-400-bad-request-validation-failed", "pipeline-error-anthropic-401-unauthorized", "pipeline-error-anthropic-403-model-access-denied", "pipeline-error-anthropic-429-exceeded-quota", "pipeline-error-anthropic-500-server-error", + "pipeline-error-anthropic-503-server-overloaded-error", + "pipeline-error-anthropic-llm-failed", + "call.in-progress.error-providerfault-anthropic-llm-failed", + "call.in-progress.error-vapifault-anthropic-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-anthropic-401-unauthorized", + "call.in-progress.error-vapifault-anthropic-403-model-access-denied", + "call.in-progress.error-vapifault-anthropic-429-exceeded-quota", + "call.in-progress.error-providerfault-anthropic-500-server-error", + "call.in-progress.error-providerfault-anthropic-503-server-overloaded-error", + "pipeline-error-anthropic-bedrock-400-bad-request-validation-failed", + "pipeline-error-anthropic-bedrock-401-unauthorized", + "pipeline-error-anthropic-bedrock-403-model-access-denied", + "pipeline-error-anthropic-bedrock-429-exceeded-quota", + "pipeline-error-anthropic-bedrock-500-server-error", + "pipeline-error-anthropic-bedrock-503-server-overloaded-error", + "pipeline-error-anthropic-bedrock-llm-failed", + "call.in-progress.error-providerfault-anthropic-bedrock-llm-failed", + "call.in-progress.error-vapifault-anthropic-bedrock-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-anthropic-bedrock-401-unauthorized", + "call.in-progress.error-vapifault-anthropic-bedrock-403-model-access-denied", + "call.in-progress.error-vapifault-anthropic-bedrock-429-exceeded-quota", + "call.in-progress.error-providerfault-anthropic-bedrock-500-server-error", + "call.in-progress.error-providerfault-anthropic-bedrock-503-server-overloaded-error", + "pipeline-error-anthropic-vertex-400-bad-request-validation-failed", + "pipeline-error-anthropic-vertex-401-unauthorized", + "pipeline-error-anthropic-vertex-403-model-access-denied", + "pipeline-error-anthropic-vertex-429-exceeded-quota", + "pipeline-error-anthropic-vertex-500-server-error", + "pipeline-error-anthropic-vertex-503-server-overloaded-error", + "pipeline-error-anthropic-vertex-llm-failed", + "call.in-progress.error-providerfault-anthropic-vertex-llm-failed", + "call.in-progress.error-vapifault-anthropic-vertex-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-anthropic-vertex-401-unauthorized", + "call.in-progress.error-vapifault-anthropic-vertex-403-model-access-denied", + "call.in-progress.error-vapifault-anthropic-vertex-429-exceeded-quota", + "call.in-progress.error-providerfault-anthropic-vertex-500-server-error", + "call.in-progress.error-providerfault-anthropic-vertex-503-server-overloaded-error", "pipeline-error-together-ai-400-bad-request-validation-failed", "pipeline-error-together-ai-401-unauthorized", "pipeline-error-together-ai-403-model-access-denied", "pipeline-error-together-ai-429-exceeded-quota", "pipeline-error-together-ai-500-server-error", + "pipeline-error-together-ai-503-server-overloaded-error", "pipeline-error-together-ai-llm-failed", + "call.in-progress.error-providerfault-together-ai-llm-failed", + "call.in-progress.error-vapifault-together-ai-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-together-ai-401-unauthorized", + "call.in-progress.error-vapifault-together-ai-403-model-access-denied", + "call.in-progress.error-vapifault-together-ai-429-exceeded-quota", + "call.in-progress.error-providerfault-together-ai-500-server-error", + "call.in-progress.error-providerfault-together-ai-503-server-overloaded-error", "pipeline-error-anyscale-400-bad-request-validation-failed", "pipeline-error-anyscale-401-unauthorized", "pipeline-error-anyscale-403-model-access-denied", "pipeline-error-anyscale-429-exceeded-quota", "pipeline-error-anyscale-500-server-error", + "pipeline-error-anyscale-503-server-overloaded-error", "pipeline-error-anyscale-llm-failed", + "call.in-progress.error-providerfault-anyscale-llm-failed", + "call.in-progress.error-vapifault-anyscale-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-anyscale-401-unauthorized", + "call.in-progress.error-vapifault-anyscale-403-model-access-denied", + "call.in-progress.error-vapifault-anyscale-429-exceeded-quota", + "call.in-progress.error-providerfault-anyscale-500-server-error", + "call.in-progress.error-providerfault-anyscale-503-server-overloaded-error", "pipeline-error-openrouter-400-bad-request-validation-failed", "pipeline-error-openrouter-401-unauthorized", "pipeline-error-openrouter-403-model-access-denied", "pipeline-error-openrouter-429-exceeded-quota", "pipeline-error-openrouter-500-server-error", + "pipeline-error-openrouter-503-server-overloaded-error", "pipeline-error-openrouter-llm-failed", + "call.in-progress.error-providerfault-openrouter-llm-failed", + "call.in-progress.error-vapifault-openrouter-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-openrouter-401-unauthorized", + "call.in-progress.error-vapifault-openrouter-403-model-access-denied", + "call.in-progress.error-vapifault-openrouter-429-exceeded-quota", + "call.in-progress.error-providerfault-openrouter-500-server-error", + "call.in-progress.error-providerfault-openrouter-503-server-overloaded-error", "pipeline-error-perplexity-ai-400-bad-request-validation-failed", "pipeline-error-perplexity-ai-401-unauthorized", "pipeline-error-perplexity-ai-403-model-access-denied", "pipeline-error-perplexity-ai-429-exceeded-quota", "pipeline-error-perplexity-ai-500-server-error", + "pipeline-error-perplexity-ai-503-server-overloaded-error", "pipeline-error-perplexity-ai-llm-failed", + "call.in-progress.error-providerfault-perplexity-ai-llm-failed", + "call.in-progress.error-vapifault-perplexity-ai-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-perplexity-ai-401-unauthorized", + "call.in-progress.error-vapifault-perplexity-ai-403-model-access-denied", + "call.in-progress.error-vapifault-perplexity-ai-429-exceeded-quota", + "call.in-progress.error-providerfault-perplexity-ai-500-server-error", + "call.in-progress.error-providerfault-perplexity-ai-503-server-overloaded-error", "pipeline-error-deepinfra-400-bad-request-validation-failed", "pipeline-error-deepinfra-401-unauthorized", "pipeline-error-deepinfra-403-model-access-denied", "pipeline-error-deepinfra-429-exceeded-quota", "pipeline-error-deepinfra-500-server-error", + "pipeline-error-deepinfra-503-server-overloaded-error", "pipeline-error-deepinfra-llm-failed", + "call.in-progress.error-providerfault-deepinfra-llm-failed", + "call.in-progress.error-vapifault-deepinfra-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-deepinfra-401-unauthorized", + "call.in-progress.error-vapifault-deepinfra-403-model-access-denied", + "call.in-progress.error-vapifault-deepinfra-429-exceeded-quota", + "call.in-progress.error-providerfault-deepinfra-500-server-error", + "call.in-progress.error-providerfault-deepinfra-503-server-overloaded-error", "pipeline-error-runpod-400-bad-request-validation-failed", "pipeline-error-runpod-401-unauthorized", "pipeline-error-runpod-403-model-access-denied", "pipeline-error-runpod-429-exceeded-quota", "pipeline-error-runpod-500-server-error", + "pipeline-error-runpod-503-server-overloaded-error", "pipeline-error-runpod-llm-failed", + "call.in-progress.error-providerfault-runpod-llm-failed", + "call.in-progress.error-vapifault-runpod-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-runpod-401-unauthorized", + "call.in-progress.error-vapifault-runpod-403-model-access-denied", + "call.in-progress.error-vapifault-runpod-429-exceeded-quota", + "call.in-progress.error-providerfault-runpod-500-server-error", + "call.in-progress.error-providerfault-runpod-503-server-overloaded-error", "pipeline-error-custom-llm-400-bad-request-validation-failed", "pipeline-error-custom-llm-401-unauthorized", "pipeline-error-custom-llm-403-model-access-denied", "pipeline-error-custom-llm-429-exceeded-quota", "pipeline-error-custom-llm-500-server-error", + "pipeline-error-custom-llm-503-server-overloaded-error", "pipeline-error-custom-llm-llm-failed", + "call.in-progress.error-providerfault-custom-llm-llm-failed", + "call.in-progress.error-vapifault-custom-llm-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-custom-llm-401-unauthorized", + "call.in-progress.error-vapifault-custom-llm-403-model-access-denied", + "call.in-progress.error-vapifault-custom-llm-429-exceeded-quota", + "call.in-progress.error-providerfault-custom-llm-500-server-error", + "call.in-progress.error-providerfault-custom-llm-503-server-overloaded-error", + "call.in-progress.error-pipeline-ws-model-connection-failed", + "pipeline-error-custom-voice-failed", "pipeline-error-cartesia-socket-hang-up", "pipeline-error-cartesia-requested-payment", "pipeline-error-cartesia-500-server-error", + "pipeline-error-cartesia-502-server-error", "pipeline-error-cartesia-503-server-error", "pipeline-error-cartesia-522-server-error", - "pipeline-error-custom-voice-failed", + "call.in-progress.error-vapifault-cartesia-socket-hang-up", + "call.in-progress.error-vapifault-cartesia-requested-payment", + "call.in-progress.error-providerfault-cartesia-500-server-error", + "call.in-progress.error-providerfault-cartesia-503-server-error", + "call.in-progress.error-providerfault-cartesia-522-server-error", "pipeline-error-eleven-labs-voice-not-found", "pipeline-error-eleven-labs-quota-exceeded", "pipeline-error-eleven-labs-unauthorized-access", @@ -144,17 +463,44 @@ "pipeline-error-eleven-labs-invalid-api-key", "pipeline-error-eleven-labs-invalid-voice-samples", "pipeline-error-eleven-labs-voice-disabled-by-owner", + "pipeline-error-eleven-labs-vapi-voice-disabled-by-owner", "pipeline-error-eleven-labs-blocked-account-in-probation", "pipeline-error-eleven-labs-blocked-content-against-their-policy", "pipeline-error-eleven-labs-missing-samples-for-voice-clone", "pipeline-error-eleven-labs-voice-not-fine-tuned-and-cannot-be-used", "pipeline-error-eleven-labs-voice-not-allowed-for-free-users", - "pipeline-error-eleven-labs-500-server-error", "pipeline-error-eleven-labs-max-character-limit-exceeded", + "pipeline-error-eleven-labs-blocked-voice-potentially-against-terms-of-service-and-awaiting-verification", + "pipeline-error-eleven-labs-500-server-error", + "pipeline-error-eleven-labs-503-server-error", + "call.in-progress.error-vapifault-eleven-labs-voice-not-found", + "call.in-progress.error-vapifault-eleven-labs-quota-exceeded", + "call.in-progress.error-vapifault-eleven-labs-unauthorized-access", + "call.in-progress.error-vapifault-eleven-labs-unauthorized-to-access-model", + "call.in-progress.error-vapifault-eleven-labs-professional-voices-only-for-creator-plus", + "call.in-progress.error-vapifault-eleven-labs-blocked-free-plan-and-requested-upgrade", + "call.in-progress.error-vapifault-eleven-labs-blocked-concurrent-requests-and-requested-upgrade", + "call.in-progress.error-vapifault-eleven-labs-blocked-using-instant-voice-clone-and-requested-upgrade", + "call.in-progress.error-vapifault-eleven-labs-system-busy-and-requested-upgrade", + "call.in-progress.error-vapifault-eleven-labs-voice-not-fine-tuned", + "call.in-progress.error-vapifault-eleven-labs-invalid-api-key", + "call.in-progress.error-vapifault-eleven-labs-invalid-voice-samples", + "call.in-progress.error-vapifault-eleven-labs-voice-disabled-by-owner", + "call.in-progress.error-vapifault-eleven-labs-blocked-account-in-probation", + "call.in-progress.error-vapifault-eleven-labs-blocked-content-against-their-policy", + "call.in-progress.error-vapifault-eleven-labs-missing-samples-for-voice-clone", + "call.in-progress.error-vapifault-eleven-labs-voice-not-fine-tuned-and-cannot-be-used", + "call.in-progress.error-vapifault-eleven-labs-voice-not-allowed-for-free-users", + "call.in-progress.error-vapifault-eleven-labs-max-character-limit-exceeded", + "call.in-progress.error-vapifault-eleven-labs-blocked-voice-potentially-against-terms-of-service-and-awaiting-verification", + "call.in-progress.error-providerfault-eleven-labs-system-busy-and-requested-upgrade", + "call.in-progress.error-providerfault-eleven-labs-500-server-error", + "call.in-progress.error-providerfault-eleven-labs-503-server-error", "pipeline-error-playht-request-timed-out", "pipeline-error-playht-invalid-voice", "pipeline-error-playht-unexpected-error", "pipeline-error-playht-out-of-credits", + "pipeline-error-playht-invalid-emotion", "pipeline-error-playht-voice-must-be-a-valid-voice-manifest-uri", "pipeline-error-playht-401-unauthorized", "pipeline-error-playht-403-forbidden-out-of-characters", @@ -162,16 +508,73 @@ "pipeline-error-playht-429-exceeded-quota", "pipeline-error-playht-502-gateway-error", "pipeline-error-playht-504-gateway-error", - "pipeline-error-deepgram-403-model-access-denied", - "pipeline-error-deepgram-404-not-found", - "pipeline-error-deepgram-400-no-such-model-language-tier-combination", - "pipeline-error-deepgram-500-returning-invalid-json", - "sip-gateway-failed-to-connect-call", + "call.in-progress.error-vapifault-playht-request-timed-out", + "call.in-progress.error-vapifault-playht-invalid-voice", + "call.in-progress.error-vapifault-playht-unexpected-error", + "call.in-progress.error-vapifault-playht-out-of-credits", + "call.in-progress.error-vapifault-playht-invalid-emotion", + "call.in-progress.error-vapifault-playht-voice-must-be-a-valid-voice-manifest-uri", + "call.in-progress.error-vapifault-playht-401-unauthorized", + "call.in-progress.error-vapifault-playht-403-forbidden-out-of-characters", + "call.in-progress.error-vapifault-playht-403-forbidden-api-access-not-available", + "call.in-progress.error-vapifault-playht-429-exceeded-quota", + "call.in-progress.error-providerfault-playht-502-gateway-error", + "call.in-progress.error-providerfault-playht-504-gateway-error", + "pipeline-error-custom-transcriber-failed", + "call.in-progress.error-vapifault-custom-transcriber-failed", + "pipeline-error-deepgram-returning-400-no-such-model-language-tier-combination", + "pipeline-error-deepgram-returning-401-invalid-credentials", + "pipeline-error-deepgram-returning-403-model-access-denied", + "pipeline-error-deepgram-returning-404-not-found", + "pipeline-error-deepgram-returning-500-invalid-json", + "pipeline-error-deepgram-returning-502-network-error", + "pipeline-error-deepgram-returning-502-bad-gateway-ehostunreach", + "pipeline-error-deepgram-returning-econnreset", + "call.in-progress.error-vapifault-deepgram-returning-400-no-such-model-language-tier-combination", + "call.in-progress.error-vapifault-deepgram-returning-401-invalid-credentials", + "call.in-progress.error-vapifault-deepgram-returning-404-not-found", + "call.in-progress.error-vapifault-deepgram-returning-403-model-access-denied", + "call.in-progress.error-providerfault-deepgram-returning-500-invalid-json", + "call.in-progress.error-providerfault-deepgram-returning-502-network-error", + "call.in-progress.error-providerfault-deepgram-returning-502-bad-gateway-ehostunreach", + "call.in-progress.error-warm-transfer-max-duration", + "call.in-progress.error-warm-transfer-assistant-cancelled", + "call.in-progress.error-warm-transfer-silence-timeout", + "call.in-progress.error-warm-transfer-microphone-timeout", + "assistant-ended-call", + "assistant-said-end-call-phrase", + "assistant-ended-call-with-hangup-task", + "assistant-ended-call-after-message-spoken", + "assistant-forwarded-call", + "assistant-join-timed-out", + "call.in-progress.error-assistant-did-not-receive-customer-audio", + "call.in-progress.error-transfer-failed", + "customer-busy", + "customer-ended-call", + "customer-ended-call-before-warm-transfer", + "customer-ended-call-after-warm-transfer-attempt", + "customer-ended-call-during-transfer", + "customer-did-not-answer", + "customer-did-not-give-microphone-permission", + "exceeded-max-duration", + "manually-canceled", + "phone-call-provider-closed-websocket", + "call.forwarding.operator-busy", "silence-timed-out", + "call.in-progress.error-providerfault-outbound-sip-403-forbidden", + "call.in-progress.error-providerfault-outbound-sip-407-proxy-authentication-required", + "call.in-progress.error-providerfault-outbound-sip-408-request-timeout", + "call.in-progress.error-providerfault-outbound-sip-480-temporarily-unavailable", + "call.ringing.hook-executed-say", + "call.ringing.hook-executed-transfer", + "call.ending.hook-executed-say", + "call.ending.hook-executed-transfer", + "call.ringing.sip-inbound-caller-hungup-before-call-connect", "twilio-failed-to-connect-call", "twilio-reported-customer-misdialed", - "voicemail", "vonage-rejected", + "voicemail", + "call-deleted", ], typing.Any, ] diff --git a/src/vapi/types/server_message_end_of_call_report_phone_number.py b/src/vapi/types/server_message_end_of_call_report_phone_number.py index 5578c1bf..fe34c76d 100644 --- a/src/vapi/types/server_message_end_of_call_report_phone_number.py +++ b/src/vapi/types/server_message_end_of_call_report_phone_number.py @@ -1,11 +1,247 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .create_byo_phone_number_dto import CreateByoPhoneNumberDto -from .create_twilio_phone_number_dto import CreateTwilioPhoneNumberDto -from .create_vonage_phone_number_dto import CreateVonagePhoneNumberDto -from .create_vapi_phone_number_dto import CreateVapiPhoneNumberDto -ServerMessageEndOfCallReportPhoneNumber = typing.Union[ - CreateByoPhoneNumberDto, CreateTwilioPhoneNumberDto, CreateVonagePhoneNumberDto, CreateVapiPhoneNumberDto +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ServerMessageEndOfCallReportPhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageEndOfCallReportPhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageEndOfCallReportPhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageEndOfCallReportPhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageEndOfCallReportPhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ServerMessageEndOfCallReportPhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ServerMessageEndOfCallReportPhoneNumber_ByoPhoneNumber, + ServerMessageEndOfCallReportPhoneNumber_Twilio, + ServerMessageEndOfCallReportPhoneNumber_Vonage, + ServerMessageEndOfCallReportPhoneNumber_Vapi, + ServerMessageEndOfCallReportPhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), ] diff --git a/src/vapi/types/server_message_end_of_call_report_type.py b/src/vapi/types/server_message_end_of_call_report_type.py new file mode 100644 index 00000000..05c3337d --- /dev/null +++ b/src/vapi/types/server_message_end_of_call_report_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ServerMessageEndOfCallReportType = typing.Union[typing.Literal["end-of-call-report"], typing.Any] diff --git a/src/vapi/types/server_message_handoff_destination_request.py b/src/vapi/types/server_message_handoff_destination_request.py new file mode 100644 index 00000000..c1a84199 --- /dev/null +++ b/src/vapi/types/server_message_handoff_destination_request.py @@ -0,0 +1,197 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .artifact import Artifact +from .call import Call +from .chat import Chat +from .create_customer_dto import CreateCustomerDto +from .server_message_handoff_destination_request_phone_number import ServerMessageHandoffDestinationRequestPhoneNumber +from .server_message_handoff_destination_request_type import ServerMessageHandoffDestinationRequestType + + +class ServerMessageHandoffDestinationRequest(UncheckedBaseModel): + phone_number: typing_extensions.Annotated[ + typing.Optional[ServerMessageHandoffDestinationRequestPhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: ServerMessageHandoffDestinationRequestType = pydantic.Field() + """ + This is the type of the message. "handoff-destination-request" is sent when the model is requesting handoff but destination is unknown. + """ + + timestamp: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the timestamp of the message. + """ + + artifact: typing.Optional[Artifact] = pydantic.Field(default=None) + """ + This is a live version of the `call.artifact`. + + This matches what is stored on `call.artifact` after the call. + """ + + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) + """ + This is the assistant that the message is associated with. + """ + + customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) + """ + This is the customer that the message is associated with. + """ + + call: typing.Optional[Call] = pydantic.Field(default=None) + """ + This is the call that the message is associated with. + """ + + chat: typing.Optional[Chat] = pydantic.Field(default=None) + """ + This is the chat object. + """ + + parameters: typing.Dict[str, typing.Any] = pydantic.Field() + """ + This is the parameters of the handoff destination request. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ServerMessageHandoffDestinationRequest, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/server_message_handoff_destination_request_phone_number.py b/src/vapi/types/server_message_handoff_destination_request_phone_number.py new file mode 100644 index 00000000..8a136fe5 --- /dev/null +++ b/src/vapi/types/server_message_handoff_destination_request_phone_number.py @@ -0,0 +1,247 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ServerMessageHandoffDestinationRequestPhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageHandoffDestinationRequestPhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageHandoffDestinationRequestPhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageHandoffDestinationRequestPhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageHandoffDestinationRequestPhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ServerMessageHandoffDestinationRequestPhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ServerMessageHandoffDestinationRequestPhoneNumber_ByoPhoneNumber, + ServerMessageHandoffDestinationRequestPhoneNumber_Twilio, + ServerMessageHandoffDestinationRequestPhoneNumber_Vonage, + ServerMessageHandoffDestinationRequestPhoneNumber_Vapi, + ServerMessageHandoffDestinationRequestPhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/server_message_handoff_destination_request_type.py b/src/vapi/types/server_message_handoff_destination_request_type.py new file mode 100644 index 00000000..46ea98f0 --- /dev/null +++ b/src/vapi/types/server_message_handoff_destination_request_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ServerMessageHandoffDestinationRequestType = typing.Union[typing.Literal["handoff-destination-request"], typing.Any] diff --git a/src/vapi/types/server_message_hang.py b/src/vapi/types/server_message_hang.py index 459e1954..3986c958 100644 --- a/src/vapi/types/server_message_hang.py +++ b/src/vapi/types/server_message_hang.py @@ -1,49 +1,42 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -from .callback_step import CallbackStep -from .create_workflow_block_dto import CreateWorkflowBlockDto -from .handoff_step import HandoffStep -import typing_extensions + import typing -from .server_message_hang_phone_number import ServerMessageHangPhoneNumber -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel from .artifact import Artifact -from .create_assistant_dto import CreateAssistantDto -from .create_customer_dto import CreateCustomerDto from .call import Call -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.pydantic_utilities import update_forward_refs +from .chat import Chat +from .create_customer_dto import CreateCustomerDto +from .server_message_hang_phone_number import ServerMessageHangPhoneNumber +from .server_message_hang_type import ServerMessageHangType -class ServerMessageHang(UniversalBaseModel): +class ServerMessageHang(UncheckedBaseModel): phone_number: typing_extensions.Annotated[ - typing.Optional[ServerMessageHangPhoneNumber], FieldMetadata(alias="phoneNumber") - ] = pydantic.Field(default=None) - """ - This is the phone number associated with the call. - - This matches one of the following: - - - `call.phoneNumber`, - - `call.phoneNumberId`. - """ - - type: typing.Literal["hang"] = pydantic.Field(default="hang") + typing.Optional[ServerMessageHangPhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: ServerMessageHangType = pydantic.Field() """ This is the type of the message. "hang" is sent when the assistant is hanging due to a delay. The delay can be caused by many factors, such as: - - the model is too slow to respond - the voice is too slow to respond - the tool call is still waiting for a response from your server - etc. """ - timestamp: typing.Optional[str] = pydantic.Field(default=None) + timestamp: typing.Optional[float] = pydantic.Field(default=None) """ - This is the ISO-8601 formatted timestamp of when the message was sent. + This is the timestamp of the message. """ artifact: typing.Optional[Artifact] = pydantic.Field(default=None) @@ -53,37 +46,24 @@ class ServerMessageHang(UniversalBaseModel): This matches what is stored on `call.artifact` after the call. """ - assistant: typing.Optional[CreateAssistantDto] = pydantic.Field(default=None) + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) """ - This is the assistant that is currently active. This is provided for convenience. - - This matches one of the following: - - - `call.assistant`, - - `call.assistantId`, - - `call.squad[n].assistant`, - - `call.squad[n].assistantId`, - - `call.squadId->[n].assistant`, - - `call.squadId->[n].assistantId`. + This is the assistant that the message is associated with. """ customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) """ - This is the customer associated with the call. - - This matches one of the following: - - - `call.customer`, - - `call.customerId`. + This is the customer that the message is associated with. """ call: typing.Optional[Call] = pydantic.Field(default=None) """ - This is the call object. - - This matches what was returned in POST /call. - - Note: This might get stale during the call. To get the latest call object, especially after the call is ended, use GET /call/:id. + This is the call that the message is associated with. + """ + + chat: typing.Optional[Chat] = pydantic.Field(default=None) + """ + This is the chat object. """ if IS_PYDANTIC_V2: @@ -96,6 +76,121 @@ class Config: extra = pydantic.Extra.allow -update_forward_refs(CallbackStep, ServerMessageHang=ServerMessageHang) -update_forward_refs(CreateWorkflowBlockDto, ServerMessageHang=ServerMessageHang) -update_forward_refs(HandoffStep, ServerMessageHang=ServerMessageHang) +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ServerMessageHang, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/server_message_hang_phone_number.py b/src/vapi/types/server_message_hang_phone_number.py index 2d8124ad..7462b4f6 100644 --- a/src/vapi/types/server_message_hang_phone_number.py +++ b/src/vapi/types/server_message_hang_phone_number.py @@ -1,11 +1,247 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .create_byo_phone_number_dto import CreateByoPhoneNumberDto -from .create_twilio_phone_number_dto import CreateTwilioPhoneNumberDto -from .create_vonage_phone_number_dto import CreateVonagePhoneNumberDto -from .create_vapi_phone_number_dto import CreateVapiPhoneNumberDto -ServerMessageHangPhoneNumber = typing.Union[ - CreateByoPhoneNumberDto, CreateTwilioPhoneNumberDto, CreateVonagePhoneNumberDto, CreateVapiPhoneNumberDto +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ServerMessageHangPhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageHangPhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageHangPhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageHangPhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageHangPhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ServerMessageHangPhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ServerMessageHangPhoneNumber_ByoPhoneNumber, + ServerMessageHangPhoneNumber_Twilio, + ServerMessageHangPhoneNumber_Vonage, + ServerMessageHangPhoneNumber_Vapi, + ServerMessageHangPhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), ] diff --git a/src/vapi/types/server_message_hang_type.py b/src/vapi/types/server_message_hang_type.py new file mode 100644 index 00000000..b695851d --- /dev/null +++ b/src/vapi/types/server_message_hang_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ServerMessageHangType = typing.Union[typing.Literal["hang"], typing.Any] diff --git a/src/vapi/types/server_message_knowledge_base_request.py b/src/vapi/types/server_message_knowledge_base_request.py new file mode 100644 index 00000000..67828816 --- /dev/null +++ b/src/vapi/types/server_message_knowledge_base_request.py @@ -0,0 +1,204 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .artifact import Artifact +from .call import Call +from .chat import Chat +from .create_customer_dto import CreateCustomerDto +from .open_ai_message import OpenAiMessage +from .server_message_knowledge_base_request_messages_item import ServerMessageKnowledgeBaseRequestMessagesItem +from .server_message_knowledge_base_request_phone_number import ServerMessageKnowledgeBaseRequestPhoneNumber +from .server_message_knowledge_base_request_type import ServerMessageKnowledgeBaseRequestType + + +class ServerMessageKnowledgeBaseRequest(UncheckedBaseModel): + phone_number: typing_extensions.Annotated[ + typing.Optional[ServerMessageKnowledgeBaseRequestPhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: ServerMessageKnowledgeBaseRequestType = pydantic.Field() + """ + This is the type of the message. "knowledge-base-request" is sent to request knowledge base documents. To enable, use `assistant.knowledgeBase.provider=custom-knowledge-base`. + """ + + messages: typing.Optional[typing.List[ServerMessageKnowledgeBaseRequestMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that are going to be sent to the `model` right after the `knowledge-base-request` webhook completes. + """ + + messages_open_ai_formatted: typing_extensions.Annotated[ + typing.List[OpenAiMessage], + FieldMetadata(alias="messagesOpenAIFormatted"), + pydantic.Field(alias="messagesOpenAIFormatted", description="This is just `messages` formatted for OpenAI."), + ] + timestamp: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the timestamp of the message. + """ + + artifact: typing.Optional[Artifact] = pydantic.Field(default=None) + """ + This is a live version of the `call.artifact`. + + This matches what is stored on `call.artifact` after the call. + """ + + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) + """ + This is the assistant that the message is associated with. + """ + + customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) + """ + This is the customer that the message is associated with. + """ + + call: typing.Optional[Call] = pydantic.Field(default=None) + """ + This is the call that the message is associated with. + """ + + chat: typing.Optional[Chat] = pydantic.Field(default=None) + """ + This is the chat object. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ServerMessageKnowledgeBaseRequest, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/server_message_knowledge_base_request_messages_item.py b/src/vapi/types/server_message_knowledge_base_request_messages_item.py new file mode 100644 index 00000000..7a31b3c5 --- /dev/null +++ b/src/vapi/types/server_message_knowledge_base_request_messages_item.py @@ -0,0 +1,13 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .bot_message import BotMessage +from .system_message import SystemMessage +from .tool_call_message import ToolCallMessage +from .tool_call_result_message import ToolCallResultMessage +from .user_message import UserMessage + +ServerMessageKnowledgeBaseRequestMessagesItem = typing.Union[ + UserMessage, SystemMessage, BotMessage, ToolCallMessage, ToolCallResultMessage +] diff --git a/src/vapi/types/server_message_knowledge_base_request_phone_number.py b/src/vapi/types/server_message_knowledge_base_request_phone_number.py new file mode 100644 index 00000000..658a1ca4 --- /dev/null +++ b/src/vapi/types/server_message_knowledge_base_request_phone_number.py @@ -0,0 +1,247 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ServerMessageKnowledgeBaseRequestPhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageKnowledgeBaseRequestPhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageKnowledgeBaseRequestPhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageKnowledgeBaseRequestPhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageKnowledgeBaseRequestPhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ServerMessageKnowledgeBaseRequestPhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ServerMessageKnowledgeBaseRequestPhoneNumber_ByoPhoneNumber, + ServerMessageKnowledgeBaseRequestPhoneNumber_Twilio, + ServerMessageKnowledgeBaseRequestPhoneNumber_Vonage, + ServerMessageKnowledgeBaseRequestPhoneNumber_Vapi, + ServerMessageKnowledgeBaseRequestPhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/server_message_knowledge_base_request_type.py b/src/vapi/types/server_message_knowledge_base_request_type.py new file mode 100644 index 00000000..74cf188a --- /dev/null +++ b/src/vapi/types/server_message_knowledge_base_request_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ServerMessageKnowledgeBaseRequestType = typing.Union[typing.Literal["knowledge-base-request"], typing.Any] diff --git a/src/vapi/types/server_message_language_change_detected.py b/src/vapi/types/server_message_language_change_detected.py new file mode 100644 index 00000000..cfb28ad7 --- /dev/null +++ b/src/vapi/types/server_message_language_change_detected.py @@ -0,0 +1,197 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .artifact import Artifact +from .call import Call +from .chat import Chat +from .create_customer_dto import CreateCustomerDto +from .server_message_language_change_detected_phone_number import ServerMessageLanguageChangeDetectedPhoneNumber +from .server_message_language_change_detected_type import ServerMessageLanguageChangeDetectedType + + +class ServerMessageLanguageChangeDetected(UncheckedBaseModel): + phone_number: typing_extensions.Annotated[ + typing.Optional[ServerMessageLanguageChangeDetectedPhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: ServerMessageLanguageChangeDetectedType = pydantic.Field() + """ + This is the type of the message. "language-change-detected" is sent when the transcriber is automatically switched based on the detected language. + """ + + timestamp: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the timestamp of the message. + """ + + artifact: typing.Optional[Artifact] = pydantic.Field(default=None) + """ + This is a live version of the `call.artifact`. + + This matches what is stored on `call.artifact` after the call. + """ + + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) + """ + This is the assistant that the message is associated with. + """ + + customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) + """ + This is the customer that the message is associated with. + """ + + call: typing.Optional[Call] = pydantic.Field(default=None) + """ + This is the call that the message is associated with. + """ + + chat: typing.Optional[Chat] = pydantic.Field(default=None) + """ + This is the chat object. + """ + + language: str = pydantic.Field() + """ + This is the language the transcriber is switched to. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ServerMessageLanguageChangeDetected, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/server_message_language_change_detected_phone_number.py b/src/vapi/types/server_message_language_change_detected_phone_number.py new file mode 100644 index 00000000..88d1cce4 --- /dev/null +++ b/src/vapi/types/server_message_language_change_detected_phone_number.py @@ -0,0 +1,247 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ServerMessageLanguageChangeDetectedPhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageLanguageChangeDetectedPhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageLanguageChangeDetectedPhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageLanguageChangeDetectedPhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageLanguageChangeDetectedPhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ServerMessageLanguageChangeDetectedPhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ServerMessageLanguageChangeDetectedPhoneNumber_ByoPhoneNumber, + ServerMessageLanguageChangeDetectedPhoneNumber_Twilio, + ServerMessageLanguageChangeDetectedPhoneNumber_Vonage, + ServerMessageLanguageChangeDetectedPhoneNumber_Vapi, + ServerMessageLanguageChangeDetectedPhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/server_message_language_change_detected_type.py b/src/vapi/types/server_message_language_change_detected_type.py new file mode 100644 index 00000000..ec3678c6 --- /dev/null +++ b/src/vapi/types/server_message_language_change_detected_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ServerMessageLanguageChangeDetectedType = typing.Union[typing.Literal["language-change-detected"], typing.Any] diff --git a/src/vapi/types/server_message_language_changed.py b/src/vapi/types/server_message_language_changed.py deleted file mode 100644 index 130542e1..00000000 --- a/src/vapi/types/server_message_language_changed.py +++ /dev/null @@ -1,101 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -from .callback_step import CallbackStep -from .create_workflow_block_dto import CreateWorkflowBlockDto -from .handoff_step import HandoffStep -import typing_extensions -import typing -from .server_message_language_changed_phone_number import ServerMessageLanguageChangedPhoneNumber -from ..core.serialization import FieldMetadata -import pydantic -from .artifact import Artifact -from .create_assistant_dto import CreateAssistantDto -from .create_customer_dto import CreateCustomerDto -from .call import Call -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.pydantic_utilities import update_forward_refs - - -class ServerMessageLanguageChanged(UniversalBaseModel): - phone_number: typing_extensions.Annotated[ - typing.Optional[ServerMessageLanguageChangedPhoneNumber], FieldMetadata(alias="phoneNumber") - ] = pydantic.Field(default=None) - """ - This is the phone number associated with the call. - - This matches one of the following: - - - `call.phoneNumber`, - - `call.phoneNumberId`. - """ - - type: typing.Literal["language-changed"] = pydantic.Field(default="language-changed") - """ - This is the type of the message. "language-switched" is sent when the transcriber is automatically switched based on the detected language. - """ - - timestamp: typing.Optional[str] = pydantic.Field(default=None) - """ - This is the ISO-8601 formatted timestamp of when the message was sent. - """ - - artifact: typing.Optional[Artifact] = pydantic.Field(default=None) - """ - This is a live version of the `call.artifact`. - - This matches what is stored on `call.artifact` after the call. - """ - - assistant: typing.Optional[CreateAssistantDto] = pydantic.Field(default=None) - """ - This is the assistant that is currently active. This is provided for convenience. - - This matches one of the following: - - - `call.assistant`, - - `call.assistantId`, - - `call.squad[n].assistant`, - - `call.squad[n].assistantId`, - - `call.squadId->[n].assistant`, - - `call.squadId->[n].assistantId`. - """ - - customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) - """ - This is the customer associated with the call. - - This matches one of the following: - - - `call.customer`, - - `call.customerId`. - """ - - call: typing.Optional[Call] = pydantic.Field(default=None) - """ - This is the call object. - - This matches what was returned in POST /call. - - Note: This might get stale during the call. To get the latest call object, especially after the call is ended, use GET /call/:id. - """ - - language: str = pydantic.Field() - """ - This is the language the transcriber is switched to. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -update_forward_refs(CallbackStep, ServerMessageLanguageChanged=ServerMessageLanguageChanged) -update_forward_refs(CreateWorkflowBlockDto, ServerMessageLanguageChanged=ServerMessageLanguageChanged) -update_forward_refs(HandoffStep, ServerMessageLanguageChanged=ServerMessageLanguageChanged) diff --git a/src/vapi/types/server_message_language_changed_phone_number.py b/src/vapi/types/server_message_language_changed_phone_number.py deleted file mode 100644 index 94d702f3..00000000 --- a/src/vapi/types/server_message_language_changed_phone_number.py +++ /dev/null @@ -1,11 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from .create_byo_phone_number_dto import CreateByoPhoneNumberDto -from .create_twilio_phone_number_dto import CreateTwilioPhoneNumberDto -from .create_vonage_phone_number_dto import CreateVonagePhoneNumberDto -from .create_vapi_phone_number_dto import CreateVapiPhoneNumberDto - -ServerMessageLanguageChangedPhoneNumber = typing.Union[ - CreateByoPhoneNumberDto, CreateTwilioPhoneNumberDto, CreateVonagePhoneNumberDto, CreateVapiPhoneNumberDto -] diff --git a/src/vapi/types/server_message_message.py b/src/vapi/types/server_message_message.py index 55f1d287..ac51a045 100644 --- a/src/vapi/types/server_message_message.py +++ b/src/vapi/types/server_message_message.py @@ -1,20 +1,32 @@ # This file was auto-generated by Fern from our API Definition. import typing + from .server_message_assistant_request import ServerMessageAssistantRequest +from .server_message_assistant_speech import ServerMessageAssistantSpeech +from .server_message_call_delete_failed import ServerMessageCallDeleteFailed +from .server_message_call_deleted import ServerMessageCallDeleted +from .server_message_call_endpointing_request import ServerMessageCallEndpointingRequest +from .server_message_chat_created import ServerMessageChatCreated +from .server_message_chat_deleted import ServerMessageChatDeleted from .server_message_conversation_update import ServerMessageConversationUpdate from .server_message_end_of_call_report import ServerMessageEndOfCallReport +from .server_message_handoff_destination_request import ServerMessageHandoffDestinationRequest from .server_message_hang import ServerMessageHang +from .server_message_knowledge_base_request import ServerMessageKnowledgeBaseRequest +from .server_message_language_change_detected import ServerMessageLanguageChangeDetected from .server_message_model_output import ServerMessageModelOutput from .server_message_phone_call_control import ServerMessagePhoneCallControl +from .server_message_session_created import ServerMessageSessionCreated +from .server_message_session_deleted import ServerMessageSessionDeleted +from .server_message_session_updated import ServerMessageSessionUpdated from .server_message_speech_update import ServerMessageSpeechUpdate from .server_message_status_update import ServerMessageStatusUpdate from .server_message_tool_calls import ServerMessageToolCalls +from .server_message_transcript import ServerMessageTranscript from .server_message_transfer_destination_request import ServerMessageTransferDestinationRequest from .server_message_transfer_update import ServerMessageTransferUpdate -from .server_message_transcript import ServerMessageTranscript from .server_message_user_interrupted import ServerMessageUserInterrupted -from .server_message_language_changed import ServerMessageLanguageChanged from .server_message_voice_input import ServerMessageVoiceInput from .server_message_voice_request import ServerMessageVoiceRequest @@ -22,7 +34,9 @@ ServerMessageAssistantRequest, ServerMessageConversationUpdate, ServerMessageEndOfCallReport, + ServerMessageHandoffDestinationRequest, ServerMessageHang, + ServerMessageKnowledgeBaseRequest, ServerMessageModelOutput, ServerMessagePhoneCallControl, ServerMessageSpeechUpdate, @@ -32,7 +46,16 @@ ServerMessageTransferUpdate, ServerMessageTranscript, ServerMessageUserInterrupted, - ServerMessageLanguageChanged, + ServerMessageLanguageChangeDetected, ServerMessageVoiceInput, + ServerMessageAssistantSpeech, ServerMessageVoiceRequest, + ServerMessageCallEndpointingRequest, + ServerMessageChatCreated, + ServerMessageChatDeleted, + ServerMessageSessionCreated, + ServerMessageSessionUpdated, + ServerMessageSessionDeleted, + ServerMessageCallDeleted, + ServerMessageCallDeleteFailed, ] diff --git a/src/vapi/types/server_message_model_output.py b/src/vapi/types/server_message_model_output.py index f2221d18..3c6aafa0 100644 --- a/src/vapi/types/server_message_model_output.py +++ b/src/vapi/types/server_message_model_output.py @@ -1,44 +1,46 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -from .callback_step import CallbackStep -from .create_workflow_block_dto import CreateWorkflowBlockDto -from .handoff_step import HandoffStep -import typing_extensions + import typing -from .server_message_model_output_phone_number import ServerMessageModelOutputPhoneNumber -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel from .artifact import Artifact -from .create_assistant_dto import CreateAssistantDto -from .create_customer_dto import CreateCustomerDto from .call import Call -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.pydantic_utilities import update_forward_refs +from .chat import Chat +from .create_customer_dto import CreateCustomerDto +from .server_message_model_output_phone_number import ServerMessageModelOutputPhoneNumber +from .server_message_model_output_type import ServerMessageModelOutputType -class ServerMessageModelOutput(UniversalBaseModel): +class ServerMessageModelOutput(UncheckedBaseModel): phone_number: typing_extensions.Annotated[ - typing.Optional[ServerMessageModelOutputPhoneNumber], FieldMetadata(alias="phoneNumber") - ] = pydantic.Field(default=None) - """ - This is the phone number associated with the call. - - This matches one of the following: - - - `call.phoneNumber`, - - `call.phoneNumberId`. - """ - - type: typing.Literal["model-output"] = pydantic.Field(default="model-output") + typing.Optional[ServerMessageModelOutputPhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: ServerMessageModelOutputType = pydantic.Field() """ This is the type of the message. "model-output" is sent as the model outputs tokens. """ - timestamp: typing.Optional[str] = pydantic.Field(default=None) - """ - This is the ISO-8601 formatted timestamp of when the message was sent. + turn_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="turnId"), + pydantic.Field( + alias="turnId", + description="This is the unique identifier for the current LLM turn. All tokens from the same\nLLM response share the same turnId. Use this to group tokens and discard on interruption.", + ), + ] = None + timestamp: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the timestamp of the message. """ artifact: typing.Optional[Artifact] = pydantic.Field(default=None) @@ -48,40 +50,27 @@ class ServerMessageModelOutput(UniversalBaseModel): This matches what is stored on `call.artifact` after the call. """ - assistant: typing.Optional[CreateAssistantDto] = pydantic.Field(default=None) + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) """ - This is the assistant that is currently active. This is provided for convenience. - - This matches one of the following: - - - `call.assistant`, - - `call.assistantId`, - - `call.squad[n].assistant`, - - `call.squad[n].assistantId`, - - `call.squadId->[n].assistant`, - - `call.squadId->[n].assistantId`. + This is the assistant that the message is associated with. """ customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) """ - This is the customer associated with the call. - - This matches one of the following: - - - `call.customer`, - - `call.customerId`. + This is the customer that the message is associated with. """ call: typing.Optional[Call] = pydantic.Field(default=None) """ - This is the call object. - - This matches what was returned in POST /call. - - Note: This might get stale during the call. To get the latest call object, especially after the call is ended, use GET /call/:id. + This is the call that the message is associated with. + """ + + chat: typing.Optional[Chat] = pydantic.Field(default=None) + """ + This is the chat object. """ - output: typing.Dict[str, typing.Optional[typing.Any]] = pydantic.Field() + output: typing.Dict[str, typing.Any] = pydantic.Field() """ This is the output of the model. It can be a token or tool call. """ @@ -96,6 +85,121 @@ class Config: extra = pydantic.Extra.allow -update_forward_refs(CallbackStep, ServerMessageModelOutput=ServerMessageModelOutput) -update_forward_refs(CreateWorkflowBlockDto, ServerMessageModelOutput=ServerMessageModelOutput) -update_forward_refs(HandoffStep, ServerMessageModelOutput=ServerMessageModelOutput) +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ServerMessageModelOutput, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/server_message_model_output_phone_number.py b/src/vapi/types/server_message_model_output_phone_number.py index e4622d45..89aea3fe 100644 --- a/src/vapi/types/server_message_model_output_phone_number.py +++ b/src/vapi/types/server_message_model_output_phone_number.py @@ -1,11 +1,247 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .create_byo_phone_number_dto import CreateByoPhoneNumberDto -from .create_twilio_phone_number_dto import CreateTwilioPhoneNumberDto -from .create_vonage_phone_number_dto import CreateVonagePhoneNumberDto -from .create_vapi_phone_number_dto import CreateVapiPhoneNumberDto -ServerMessageModelOutputPhoneNumber = typing.Union[ - CreateByoPhoneNumberDto, CreateTwilioPhoneNumberDto, CreateVonagePhoneNumberDto, CreateVapiPhoneNumberDto +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ServerMessageModelOutputPhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageModelOutputPhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageModelOutputPhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageModelOutputPhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageModelOutputPhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ServerMessageModelOutputPhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ServerMessageModelOutputPhoneNumber_ByoPhoneNumber, + ServerMessageModelOutputPhoneNumber_Twilio, + ServerMessageModelOutputPhoneNumber_Vonage, + ServerMessageModelOutputPhoneNumber_Vapi, + ServerMessageModelOutputPhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), ] diff --git a/src/vapi/types/server_message_model_output_type.py b/src/vapi/types/server_message_model_output_type.py new file mode 100644 index 00000000..219d5eeb --- /dev/null +++ b/src/vapi/types/server_message_model_output_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ServerMessageModelOutputType = typing.Union[typing.Literal["model-output"], typing.Any] diff --git a/src/vapi/types/server_message_phone_call_control.py b/src/vapi/types/server_message_phone_call_control.py index 80c7aec1..da15aa78 100644 --- a/src/vapi/types/server_message_phone_call_control.py +++ b/src/vapi/types/server_message_phone_call_control.py @@ -1,39 +1,33 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -from .callback_step import CallbackStep -from .create_workflow_block_dto import CreateWorkflowBlockDto -from .handoff_step import HandoffStep -import typing_extensions + import typing -from .server_message_phone_call_control_phone_number import ServerMessagePhoneCallControlPhoneNumber -from ..core.serialization import FieldMetadata + import pydantic -from .server_message_phone_call_control_request import ServerMessagePhoneCallControlRequest -from .server_message_phone_call_control_destination import ServerMessagePhoneCallControlDestination +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel from .artifact import Artifact -from .create_assistant_dto import CreateAssistantDto -from .create_customer_dto import CreateCustomerDto from .call import Call -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.pydantic_utilities import update_forward_refs +from .chat import Chat +from .create_customer_dto import CreateCustomerDto +from .server_message_phone_call_control_destination import ServerMessagePhoneCallControlDestination +from .server_message_phone_call_control_phone_number import ServerMessagePhoneCallControlPhoneNumber +from .server_message_phone_call_control_request import ServerMessagePhoneCallControlRequest +from .server_message_phone_call_control_type import ServerMessagePhoneCallControlType -class ServerMessagePhoneCallControl(UniversalBaseModel): +class ServerMessagePhoneCallControl(UncheckedBaseModel): phone_number: typing_extensions.Annotated[ - typing.Optional[ServerMessagePhoneCallControlPhoneNumber], FieldMetadata(alias="phoneNumber") - ] = pydantic.Field(default=None) - """ - This is the phone number associated with the call. - - This matches one of the following: - - - `call.phoneNumber`, - - `call.phoneNumberId`. - """ - - type: typing.Literal["phone-call-control"] = pydantic.Field(default="phone-call-control") + typing.Optional[ServerMessagePhoneCallControlPhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: ServerMessagePhoneCallControlType = pydantic.Field() """ This is the type of the message. "phone-call-control" is an advanced type of message. @@ -50,9 +44,9 @@ class ServerMessagePhoneCallControl(UniversalBaseModel): This is the destination to forward the call to if the request is "forward". """ - timestamp: typing.Optional[str] = pydantic.Field(default=None) + timestamp: typing.Optional[float] = pydantic.Field(default=None) """ - This is the ISO-8601 formatted timestamp of when the message was sent. + This is the timestamp of the message. """ artifact: typing.Optional[Artifact] = pydantic.Field(default=None) @@ -62,37 +56,24 @@ class ServerMessagePhoneCallControl(UniversalBaseModel): This matches what is stored on `call.artifact` after the call. """ - assistant: typing.Optional[CreateAssistantDto] = pydantic.Field(default=None) + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) """ - This is the assistant that is currently active. This is provided for convenience. - - This matches one of the following: - - - `call.assistant`, - - `call.assistantId`, - - `call.squad[n].assistant`, - - `call.squad[n].assistantId`, - - `call.squadId->[n].assistant`, - - `call.squadId->[n].assistantId`. + This is the assistant that the message is associated with. """ customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) """ - This is the customer associated with the call. - - This matches one of the following: - - - `call.customer`, - - `call.customerId`. + This is the customer that the message is associated with. """ call: typing.Optional[Call] = pydantic.Field(default=None) """ - This is the call object. - - This matches what was returned in POST /call. - - Note: This might get stale during the call. To get the latest call object, especially after the call is ended, use GET /call/:id. + This is the call that the message is associated with. + """ + + chat: typing.Optional[Chat] = pydantic.Field(default=None) + """ + This is the chat object. """ if IS_PYDANTIC_V2: @@ -105,6 +86,121 @@ class Config: extra = pydantic.Extra.allow -update_forward_refs(CallbackStep, ServerMessagePhoneCallControl=ServerMessagePhoneCallControl) -update_forward_refs(CreateWorkflowBlockDto, ServerMessagePhoneCallControl=ServerMessagePhoneCallControl) -update_forward_refs(HandoffStep, ServerMessagePhoneCallControl=ServerMessagePhoneCallControl) +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ServerMessagePhoneCallControl, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/server_message_phone_call_control_destination.py b/src/vapi/types/server_message_phone_call_control_destination.py index e057e4aa..dd7fea96 100644 --- a/src/vapi/types/server_message_phone_call_control_destination.py +++ b/src/vapi/types/server_message_phone_call_control_destination.py @@ -1,7 +1,83 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .transfer_destination_number import TransferDestinationNumber -from .transfer_destination_sip import TransferDestinationSip -ServerMessagePhoneCallControlDestination = typing.Union[TransferDestinationNumber, TransferDestinationSip] +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .transfer_destination_number_message import TransferDestinationNumberMessage +from .transfer_destination_sip_message import TransferDestinationSipMessage +from .transfer_plan import TransferPlan + + +class ServerMessagePhoneCallControlDestination_Number(UncheckedBaseModel): + """ + This is the destination to forward the call to if the request is "forward". + """ + + type: typing.Literal["number"] = "number" + message: typing.Optional[TransferDestinationNumberMessage] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: str + extension: typing.Optional[str] = None + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessagePhoneCallControlDestination_Sip(UncheckedBaseModel): + """ + This is the destination to forward the call to if the request is "forward". + """ + + type: typing.Literal["sip"] = "sip" + message: typing.Optional[TransferDestinationSipMessage] = None + sip_uri: typing_extensions.Annotated[str, FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri")] + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + sip_headers: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="sipHeaders"), + pydantic.Field(alias="sipHeaders"), + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ServerMessagePhoneCallControlDestination = typing_extensions.Annotated[ + typing.Union[ServerMessagePhoneCallControlDestination_Number, ServerMessagePhoneCallControlDestination_Sip], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/server_message_phone_call_control_phone_number.py b/src/vapi/types/server_message_phone_call_control_phone_number.py index 6c2cede8..f3c81331 100644 --- a/src/vapi/types/server_message_phone_call_control_phone_number.py +++ b/src/vapi/types/server_message_phone_call_control_phone_number.py @@ -1,11 +1,247 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .create_byo_phone_number_dto import CreateByoPhoneNumberDto -from .create_twilio_phone_number_dto import CreateTwilioPhoneNumberDto -from .create_vonage_phone_number_dto import CreateVonagePhoneNumberDto -from .create_vapi_phone_number_dto import CreateVapiPhoneNumberDto -ServerMessagePhoneCallControlPhoneNumber = typing.Union[ - CreateByoPhoneNumberDto, CreateTwilioPhoneNumberDto, CreateVonagePhoneNumberDto, CreateVapiPhoneNumberDto +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ServerMessagePhoneCallControlPhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessagePhoneCallControlPhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessagePhoneCallControlPhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessagePhoneCallControlPhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessagePhoneCallControlPhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ServerMessagePhoneCallControlPhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ServerMessagePhoneCallControlPhoneNumber_ByoPhoneNumber, + ServerMessagePhoneCallControlPhoneNumber_Twilio, + ServerMessagePhoneCallControlPhoneNumber_Vonage, + ServerMessagePhoneCallControlPhoneNumber_Vapi, + ServerMessagePhoneCallControlPhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), ] diff --git a/src/vapi/types/server_message_phone_call_control_type.py b/src/vapi/types/server_message_phone_call_control_type.py new file mode 100644 index 00000000..88c56c7c --- /dev/null +++ b/src/vapi/types/server_message_phone_call_control_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ServerMessagePhoneCallControlType = typing.Union[typing.Literal["phone-call-control"], typing.Any] diff --git a/src/vapi/types/server_message_response.py b/src/vapi/types/server_message_response.py index 27e28269..a1bde981 100644 --- a/src/vapi/types/server_message_response.py +++ b/src/vapi/types/server_message_response.py @@ -1,28 +1,26 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -from .callback_step import CallbackStep -from .create_workflow_block_dto import CreateWorkflowBlockDto -from .handoff_step import HandoffStep + +import typing + +import pydantic import typing_extensions -from .server_message_response_message_response import ServerMessageResponseMessageResponse +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.serialization import FieldMetadata -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -import typing -from ..core.pydantic_utilities import update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .server_message_response_message_response import ServerMessageResponseMessageResponse -class ServerMessageResponse(UniversalBaseModel): +class ServerMessageResponse(UncheckedBaseModel): message_response: typing_extensions.Annotated[ - ServerMessageResponseMessageResponse, FieldMetadata(alias="messageResponse") - ] = pydantic.Field() - """ - This is the response that is expected from the server to the message. - - Note: Most messages don't expect a response. Only "assistant-request", "tool-calls" and "transfer-destination-request" do. - """ + ServerMessageResponseMessageResponse, + FieldMetadata(alias="messageResponse"), + pydantic.Field( + alias="messageResponse", + description='This is the response that is expected from the server to the message.\n\nNote: Most messages don\'t expect a response. Only "assistant-request", "tool-calls" and "transfer-destination-request" do.', + ), + ] if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -34,6 +32,4 @@ class Config: extra = pydantic.Extra.allow -update_forward_refs(CallbackStep, ServerMessageResponse=ServerMessageResponse) -update_forward_refs(CreateWorkflowBlockDto, ServerMessageResponse=ServerMessageResponse) -update_forward_refs(HandoffStep, ServerMessageResponse=ServerMessageResponse) +update_forward_refs(ServerMessageResponse) diff --git a/src/vapi/types/server_message_response_assistant_request.py b/src/vapi/types/server_message_response_assistant_request.py index 4948cb26..2a7a3110 100644 --- a/src/vapi/types/server_message_response_assistant_request.py +++ b/src/vapi/types/server_message_response_assistant_request.py @@ -1,23 +1,20 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -from .callback_step import CallbackStep -from .create_workflow_block_dto import CreateWorkflowBlockDto -from .handoff_step import HandoffStep + import typing -from .server_message_response_assistant_request_destination import ServerMessageResponseAssistantRequestDestination + import pydantic import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.serialization import FieldMetadata -from .create_assistant_dto import CreateAssistantDto -from .assistant_overrides import AssistantOverrides -from .create_squad_dto import CreateSquadDto -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.pydantic_utilities import update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_workflow_dto import CreateWorkflowDto +from .server_message_response_assistant_request_destination import ServerMessageResponseAssistantRequestDestination +from .workflow_overrides import WorkflowOverrides -class ServerMessageResponseAssistantRequest(UniversalBaseModel): +class ServerMessageResponseAssistantRequest(UncheckedBaseModel): destination: typing.Optional[ServerMessageResponseAssistantRequestDestination] = pydantic.Field(default=None) """ This is the destination to transfer the inbound call to. This will immediately transfer without using any assistants. @@ -25,39 +22,84 @@ class ServerMessageResponseAssistantRequest(UniversalBaseModel): If this is sent, `assistantId`, `assistant`, `squadId`, and `squad` are ignored. """ - assistant_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="assistantId")] = ( - pydantic.Field(default=None) - ) - """ - This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead. - """ - - assistant: typing.Optional[CreateAssistantDto] = pydantic.Field(default=None) + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assistantId"), + pydantic.Field( + alias="assistantId", + description="This is the assistant ID that will be used for the call. To use a transient assistant, use `assistant` instead.\n\nTo start a call with:\n- Assistant, use `assistantId` or `assistant`\n- Squad, use `squadId` or `squad`\n- Workflow, use `workflowId` or `workflow`", + ), + ] = None + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) """ This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. - If you're unsure why you're getting an invalid assistant, try logging your response and send the JSON blob to POST /assistant which will return the validation errors. + To start a call with: + - Assistant, use `assistant` + - Squad, use `squad` + - Workflow, use `workflow` """ assistant_overrides: typing_extensions.Annotated[ - typing.Optional[AssistantOverrides], FieldMetadata(alias="assistantOverrides") - ] = pydantic.Field(default=None) - """ - These are the overrides for the `assistant` or `assistantId`'s settings and template variables. + typing.Optional["AssistantOverrides"], + FieldMetadata(alias="assistantOverrides"), + pydantic.Field( + alias="assistantOverrides", + description="These are the overrides for the `assistant` or `assistantId`'s settings and template variables.", + ), + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="squadId"), + pydantic.Field( + alias="squadId", + description="This is the squad that will be used for the call. To use a transient squad, use `squad` instead.\n\nTo start a call with:\n- Assistant, use `assistant` or `assistantId`\n- Squad, use `squad` or `squadId`\n- Workflow, use `workflow` or `workflowId`", + ), + ] = None + squad: typing.Optional["CreateSquadDto"] = pydantic.Field(default=None) """ - - squad_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="squadId")] = pydantic.Field( - default=None - ) - """ - This is the squad that will be used for the call. To use a transient squad, use `squad` instead. + This is a squad that will be used for the call. To use an existing squad, use `squadId` instead. + + To start a call with: + - Assistant, use `assistant` or `assistantId` + - Squad, use `squad` or `squadId` + - Workflow, use `workflow` or `workflowId` """ - squad: typing.Optional[CreateSquadDto] = pydantic.Field(default=None) + squad_overrides: typing_extensions.Annotated[ + typing.Optional["AssistantOverrides"], + FieldMetadata(alias="squadOverrides"), + pydantic.Field( + alias="squadOverrides", + description="These are the overrides for the `squad` or `squadId`'s member settings and template variables.\nThis will apply to all members of the squad.", + ), + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="workflowId"), + pydantic.Field( + alias="workflowId", + description="This is the workflow that will be used for the call. To use a transient workflow, use `workflow` instead.\n\nTo start a call with:\n- Assistant, use `assistant` or `assistantId`\n- Squad, use `squad` or `squadId`\n- Workflow, use `workflow` or `workflowId`", + ), + ] = None + workflow: typing.Optional[CreateWorkflowDto] = pydantic.Field(default=None) """ - This is a squad that will be used for the call. To use an existing squad, use `squadId` instead. + This is a workflow that will be used for the call. To use an existing workflow, use `workflowId` instead. + + To start a call with: + - Assistant, use `assistant` or `assistantId` + - Squad, use `squad` or `squadId` + - Workflow, use `workflow` or `workflowId` """ + workflow_overrides: typing_extensions.Annotated[ + typing.Optional[WorkflowOverrides], + FieldMetadata(alias="workflowOverrides"), + pydantic.Field( + alias="workflowOverrides", + description="These are the overrides for the `workflow` or `workflowId`'s settings and template variables.", + ), + ] = None error: typing.Optional[str] = pydantic.Field(default=None) """ This is the error if the call shouldn't be accepted. This is spoken to the customer. @@ -75,6 +117,121 @@ class Config: extra = pydantic.Extra.allow -update_forward_refs(CallbackStep, ServerMessageResponseAssistantRequest=ServerMessageResponseAssistantRequest) -update_forward_refs(CreateWorkflowBlockDto, ServerMessageResponseAssistantRequest=ServerMessageResponseAssistantRequest) -update_forward_refs(HandoffStep, ServerMessageResponseAssistantRequest=ServerMessageResponseAssistantRequest) +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ServerMessageResponseAssistantRequest, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/server_message_response_assistant_request_destination.py b/src/vapi/types/server_message_response_assistant_request_destination.py index c5b7f0ba..ffdbe6a6 100644 --- a/src/vapi/types/server_message_response_assistant_request_destination.py +++ b/src/vapi/types/server_message_response_assistant_request_destination.py @@ -1,7 +1,89 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .transfer_destination_number import TransferDestinationNumber -from .transfer_destination_sip import TransferDestinationSip -ServerMessageResponseAssistantRequestDestination = typing.Union[TransferDestinationNumber, TransferDestinationSip] +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .transfer_destination_number_message import TransferDestinationNumberMessage +from .transfer_destination_sip_message import TransferDestinationSipMessage +from .transfer_plan import TransferPlan + + +class ServerMessageResponseAssistantRequestDestination_Number(UncheckedBaseModel): + """ + This is the destination to transfer the inbound call to. This will immediately transfer without using any assistants. + + If this is sent, `assistantId`, `assistant`, `squadId`, and `squad` are ignored. + """ + + type: typing.Literal["number"] = "number" + message: typing.Optional[TransferDestinationNumberMessage] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: str + extension: typing.Optional[str] = None + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageResponseAssistantRequestDestination_Sip(UncheckedBaseModel): + """ + This is the destination to transfer the inbound call to. This will immediately transfer without using any assistants. + + If this is sent, `assistantId`, `assistant`, `squadId`, and `squad` are ignored. + """ + + type: typing.Literal["sip"] = "sip" + message: typing.Optional[TransferDestinationSipMessage] = None + sip_uri: typing_extensions.Annotated[str, FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri")] + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + sip_headers: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="sipHeaders"), + pydantic.Field(alias="sipHeaders"), + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ServerMessageResponseAssistantRequestDestination = typing_extensions.Annotated[ + typing.Union[ + ServerMessageResponseAssistantRequestDestination_Number, ServerMessageResponseAssistantRequestDestination_Sip + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/server_message_response_call_endpointing_request.py b/src/vapi/types/server_message_response_call_endpointing_request.py new file mode 100644 index 00000000..0c00eca5 --- /dev/null +++ b/src/vapi/types/server_message_response_call_endpointing_request.py @@ -0,0 +1,29 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class ServerMessageResponseCallEndpointingRequest(UncheckedBaseModel): + timeout_seconds: typing_extensions.Annotated[ + float, + FieldMetadata(alias="timeoutSeconds"), + pydantic.Field( + alias="timeoutSeconds", + description="This is the timeout in seconds to wait before considering the user's speech as finished.", + ), + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/server_message_response_handoff_destination_request.py b/src/vapi/types/server_message_response_handoff_destination_request.py new file mode 100644 index 00000000..1bcb1fd3 --- /dev/null +++ b/src/vapi/types/server_message_response_handoff_destination_request.py @@ -0,0 +1,33 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class ServerMessageResponseHandoffDestinationRequest(UncheckedBaseModel): + result: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the local tool result message returned for the handoff tool call. + """ + + destination: typing.Dict[str, typing.Any] = pydantic.Field() + """ + This is the destination you'd like the call to be transferred to. + """ + + error: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the error message if the handoff should not be made. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/server_message_response_knowledge_base_request.py b/src/vapi/types/server_message_response_knowledge_base_request.py new file mode 100644 index 00000000..206da6de --- /dev/null +++ b/src/vapi/types/server_message_response_knowledge_base_request.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .custom_message import CustomMessage +from .knowledge_base_response_document import KnowledgeBaseResponseDocument + + +class ServerMessageResponseKnowledgeBaseRequest(UncheckedBaseModel): + documents: typing.Optional[typing.List[KnowledgeBaseResponseDocument]] = pydantic.Field(default=None) + """ + This is the list of documents that will be sent to the model alongside the `messages` to generate a response. + """ + + message: typing.Optional[CustomMessage] = pydantic.Field(default=None) + """ + This can be used to skip the model output generation and speak a custom message. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/server_message_response_message_response.py b/src/vapi/types/server_message_response_message_response.py index 3196d2fd..60e7929d 100644 --- a/src/vapi/types/server_message_response_message_response.py +++ b/src/vapi/types/server_message_response_message_response.py @@ -1,14 +1,21 @@ # This file was auto-generated by Fern from our API Definition. import typing + from .server_message_response_assistant_request import ServerMessageResponseAssistantRequest +from .server_message_response_call_endpointing_request import ServerMessageResponseCallEndpointingRequest +from .server_message_response_handoff_destination_request import ServerMessageResponseHandoffDestinationRequest +from .server_message_response_knowledge_base_request import ServerMessageResponseKnowledgeBaseRequest from .server_message_response_tool_calls import ServerMessageResponseToolCalls from .server_message_response_transfer_destination_request import ServerMessageResponseTransferDestinationRequest from .server_message_response_voice_request import ServerMessageResponseVoiceRequest ServerMessageResponseMessageResponse = typing.Union[ ServerMessageResponseAssistantRequest, + ServerMessageResponseHandoffDestinationRequest, + ServerMessageResponseKnowledgeBaseRequest, ServerMessageResponseToolCalls, ServerMessageResponseTransferDestinationRequest, ServerMessageResponseVoiceRequest, + ServerMessageResponseCallEndpointingRequest, ] diff --git a/src/vapi/types/server_message_response_tool_calls.py b/src/vapi/types/server_message_response_tool_calls.py index 689dbca6..3b6c2b42 100644 --- a/src/vapi/types/server_message_response_tool_calls.py +++ b/src/vapi/types/server_message_response_tool_calls.py @@ -1,13 +1,14 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -from .tool_call_result import ToolCallResult + import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .tool_call_result import ToolCallResult -class ServerMessageResponseToolCalls(UniversalBaseModel): +class ServerMessageResponseToolCalls(UncheckedBaseModel): results: typing.Optional[typing.List[ToolCallResult]] = pydantic.Field(default=None) """ These are the results of the "tool-calls" message. diff --git a/src/vapi/types/server_message_response_transfer_destination_request.py b/src/vapi/types/server_message_response_transfer_destination_request.py index e066d3fa..4e120784 100644 --- a/src/vapi/types/server_message_response_transfer_destination_request.py +++ b/src/vapi/types/server_message_response_transfer_destination_request.py @@ -1,15 +1,19 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel from .server_message_response_transfer_destination_request_destination import ( ServerMessageResponseTransferDestinationRequestDestination, ) -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from .server_message_response_transfer_destination_request_message import ( + ServerMessageResponseTransferDestinationRequestMessage, +) -class ServerMessageResponseTransferDestinationRequest(UniversalBaseModel): +class ServerMessageResponseTransferDestinationRequest(UncheckedBaseModel): destination: typing.Optional[ServerMessageResponseTransferDestinationRequestDestination] = pydantic.Field( default=None ) @@ -17,6 +21,11 @@ class ServerMessageResponseTransferDestinationRequest(UniversalBaseModel): This is the destination you'd like the call to be transferred to. """ + message: typing.Optional[ServerMessageResponseTransferDestinationRequestMessage] = pydantic.Field(default=None) + """ + This is the message that will be spoken to the user as the tool is running. + """ + error: typing.Optional[str] = pydantic.Field(default=None) """ This is the error message if the transfer should not be made. diff --git a/src/vapi/types/server_message_response_transfer_destination_request_destination.py b/src/vapi/types/server_message_response_transfer_destination_request_destination.py index 5cf91d18..ba7c77c0 100644 --- a/src/vapi/types/server_message_response_transfer_destination_request_destination.py +++ b/src/vapi/types/server_message_response_transfer_destination_request_destination.py @@ -1,11 +1,114 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .transfer_destination_assistant import TransferDestinationAssistant -from .transfer_destination_step import TransferDestinationStep -from .transfer_destination_number import TransferDestinationNumber -from .transfer_destination_sip import TransferDestinationSip -ServerMessageResponseTransferDestinationRequestDestination = typing.Union[ - TransferDestinationAssistant, TransferDestinationStep, TransferDestinationNumber, TransferDestinationSip +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .transfer_destination_assistant_message import TransferDestinationAssistantMessage +from .transfer_destination_number_message import TransferDestinationNumberMessage +from .transfer_destination_sip_message import TransferDestinationSipMessage +from .transfer_mode import TransferMode +from .transfer_plan import TransferPlan + + +class ServerMessageResponseTransferDestinationRequestDestination_Assistant(UncheckedBaseModel): + """ + This is the destination you'd like the call to be transferred to. + """ + + type: typing.Literal["assistant"] = "assistant" + message: typing.Optional[TransferDestinationAssistantMessage] = None + transfer_mode: typing_extensions.Annotated[ + typing.Optional[TransferMode], FieldMetadata(alias="transferMode"), pydantic.Field(alias="transferMode") + ] = None + assistant_name: typing_extensions.Annotated[ + str, FieldMetadata(alias="assistantName"), pydantic.Field(alias="assistantName") + ] + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageResponseTransferDestinationRequestDestination_Number(UncheckedBaseModel): + """ + This is the destination you'd like the call to be transferred to. + """ + + type: typing.Literal["number"] = "number" + message: typing.Optional[TransferDestinationNumberMessage] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: str + extension: typing.Optional[str] = None + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageResponseTransferDestinationRequestDestination_Sip(UncheckedBaseModel): + """ + This is the destination you'd like the call to be transferred to. + """ + + type: typing.Literal["sip"] = "sip" + message: typing.Optional[TransferDestinationSipMessage] = None + sip_uri: typing_extensions.Annotated[str, FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri")] + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + sip_headers: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="sipHeaders"), + pydantic.Field(alias="sipHeaders"), + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ServerMessageResponseTransferDestinationRequestDestination = typing_extensions.Annotated[ + typing.Union[ + ServerMessageResponseTransferDestinationRequestDestination_Assistant, + ServerMessageResponseTransferDestinationRequestDestination_Number, + ServerMessageResponseTransferDestinationRequestDestination_Sip, + ], + UnionMetadata(discriminant="type"), ] diff --git a/src/vapi/types/server_message_response_transfer_destination_request_message.py b/src/vapi/types/server_message_response_transfer_destination_request_message.py new file mode 100644 index 00000000..fe84b204 --- /dev/null +++ b/src/vapi/types/server_message_response_transfer_destination_request_message.py @@ -0,0 +1,120 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class ServerMessageResponseTransferDestinationRequestMessage_RequestStart(UncheckedBaseModel): + """ + This is the message that will be spoken to the user as the tool is running. + """ + + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageResponseTransferDestinationRequestMessage_RequestComplete(UncheckedBaseModel): + """ + This is the message that will be spoken to the user as the tool is running. + """ + + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageResponseTransferDestinationRequestMessage_RequestFailed(UncheckedBaseModel): + """ + This is the message that will be spoken to the user as the tool is running. + """ + + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageResponseTransferDestinationRequestMessage_RequestResponseDelayed(UncheckedBaseModel): + """ + This is the message that will be spoken to the user as the tool is running. + """ + + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ServerMessageResponseTransferDestinationRequestMessage = typing_extensions.Annotated[ + typing.Union[ + ServerMessageResponseTransferDestinationRequestMessage_RequestStart, + ServerMessageResponseTransferDestinationRequestMessage_RequestComplete, + ServerMessageResponseTransferDestinationRequestMessage_RequestFailed, + ServerMessageResponseTransferDestinationRequestMessage_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/server_message_response_voice_request.py b/src/vapi/types/server_message_response_voice_request.py index e6ccf314..d69bc2fb 100644 --- a/src/vapi/types/server_message_response_voice_request.py +++ b/src/vapi/types/server_message_response_voice_request.py @@ -1,12 +1,13 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +import typing + import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 -import typing +from ..core.unchecked_base_model import UncheckedBaseModel -class ServerMessageResponseVoiceRequest(UniversalBaseModel): +class ServerMessageResponseVoiceRequest(UncheckedBaseModel): data: str = pydantic.Field() """ DO NOT respond to a `voice-request` webhook with this schema of { data }. This schema just exists to document what the response should look like. Follow these instructions: @@ -17,16 +18,15 @@ class ServerMessageResponseVoiceRequest(UniversalBaseModel): Content-Type: application/json { - "messsage": { - "type": "voice-request", - "text": "Hello, world!", - "sampleRate": 24000, - ...other metadata about the call... - } + "messsage": { + "type": "voice-request", + "text": "Hello, world!", + "sampleRate": 24000, + ...other metadata about the call... + } } The expected response is 1-channel 16-bit raw PCM audio at the sample rate specified in the request. Here is how the response will be piped to the transport: - ``` response.on('data', (chunk: Buffer) => { outputStream.write(chunk); diff --git a/src/vapi/types/server_message_session_created.py b/src/vapi/types/server_message_session_created.py new file mode 100644 index 00000000..5fb13ce3 --- /dev/null +++ b/src/vapi/types/server_message_session_created.py @@ -0,0 +1,198 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .artifact import Artifact +from .call import Call +from .chat import Chat +from .create_customer_dto import CreateCustomerDto +from .server_message_session_created_phone_number import ServerMessageSessionCreatedPhoneNumber +from .server_message_session_created_type import ServerMessageSessionCreatedType +from .session import Session + + +class ServerMessageSessionCreated(UncheckedBaseModel): + phone_number: typing_extensions.Annotated[ + typing.Optional[ServerMessageSessionCreatedPhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: ServerMessageSessionCreatedType = pydantic.Field() + """ + This is the type of the message. "session.created" is sent when a new session is created. + """ + + timestamp: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the timestamp of the message. + """ + + artifact: typing.Optional[Artifact] = pydantic.Field(default=None) + """ + This is a live version of the `call.artifact`. + + This matches what is stored on `call.artifact` after the call. + """ + + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) + """ + This is the assistant that the message is associated with. + """ + + customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) + """ + This is the customer that the message is associated with. + """ + + call: typing.Optional[Call] = pydantic.Field(default=None) + """ + This is the call that the message is associated with. + """ + + chat: typing.Optional[Chat] = pydantic.Field(default=None) + """ + This is the chat object. + """ + + session: Session = pydantic.Field() + """ + This is the session that was created. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ServerMessageSessionCreated, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/server_message_session_created_phone_number.py b/src/vapi/types/server_message_session_created_phone_number.py new file mode 100644 index 00000000..1ce563d1 --- /dev/null +++ b/src/vapi/types/server_message_session_created_phone_number.py @@ -0,0 +1,247 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ServerMessageSessionCreatedPhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageSessionCreatedPhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageSessionCreatedPhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageSessionCreatedPhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageSessionCreatedPhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ServerMessageSessionCreatedPhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ServerMessageSessionCreatedPhoneNumber_ByoPhoneNumber, + ServerMessageSessionCreatedPhoneNumber_Twilio, + ServerMessageSessionCreatedPhoneNumber_Vonage, + ServerMessageSessionCreatedPhoneNumber_Vapi, + ServerMessageSessionCreatedPhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/server_message_session_created_type.py b/src/vapi/types/server_message_session_created_type.py new file mode 100644 index 00000000..88699f2d --- /dev/null +++ b/src/vapi/types/server_message_session_created_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ServerMessageSessionCreatedType = typing.Union[typing.Literal["session.created"], typing.Any] diff --git a/src/vapi/types/server_message_session_deleted.py b/src/vapi/types/server_message_session_deleted.py new file mode 100644 index 00000000..6ea07e8f --- /dev/null +++ b/src/vapi/types/server_message_session_deleted.py @@ -0,0 +1,198 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .artifact import Artifact +from .call import Call +from .chat import Chat +from .create_customer_dto import CreateCustomerDto +from .server_message_session_deleted_phone_number import ServerMessageSessionDeletedPhoneNumber +from .server_message_session_deleted_type import ServerMessageSessionDeletedType +from .session import Session + + +class ServerMessageSessionDeleted(UncheckedBaseModel): + phone_number: typing_extensions.Annotated[ + typing.Optional[ServerMessageSessionDeletedPhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: ServerMessageSessionDeletedType = pydantic.Field() + """ + This is the type of the message. "session.deleted" is sent when a session is deleted. + """ + + timestamp: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the timestamp of the message. + """ + + artifact: typing.Optional[Artifact] = pydantic.Field(default=None) + """ + This is a live version of the `call.artifact`. + + This matches what is stored on `call.artifact` after the call. + """ + + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) + """ + This is the assistant that the message is associated with. + """ + + customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) + """ + This is the customer that the message is associated with. + """ + + call: typing.Optional[Call] = pydantic.Field(default=None) + """ + This is the call that the message is associated with. + """ + + chat: typing.Optional[Chat] = pydantic.Field(default=None) + """ + This is the chat object. + """ + + session: Session = pydantic.Field() + """ + This is the session that was deleted. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ServerMessageSessionDeleted, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/server_message_session_deleted_phone_number.py b/src/vapi/types/server_message_session_deleted_phone_number.py new file mode 100644 index 00000000..ce12d8ea --- /dev/null +++ b/src/vapi/types/server_message_session_deleted_phone_number.py @@ -0,0 +1,247 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ServerMessageSessionDeletedPhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageSessionDeletedPhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageSessionDeletedPhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageSessionDeletedPhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageSessionDeletedPhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ServerMessageSessionDeletedPhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ServerMessageSessionDeletedPhoneNumber_ByoPhoneNumber, + ServerMessageSessionDeletedPhoneNumber_Twilio, + ServerMessageSessionDeletedPhoneNumber_Vonage, + ServerMessageSessionDeletedPhoneNumber_Vapi, + ServerMessageSessionDeletedPhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/server_message_session_deleted_type.py b/src/vapi/types/server_message_session_deleted_type.py new file mode 100644 index 00000000..e729035d --- /dev/null +++ b/src/vapi/types/server_message_session_deleted_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ServerMessageSessionDeletedType = typing.Union[typing.Literal["session.deleted"], typing.Any] diff --git a/src/vapi/types/server_message_session_updated.py b/src/vapi/types/server_message_session_updated.py new file mode 100644 index 00000000..0f977712 --- /dev/null +++ b/src/vapi/types/server_message_session_updated.py @@ -0,0 +1,198 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .artifact import Artifact +from .call import Call +from .chat import Chat +from .create_customer_dto import CreateCustomerDto +from .server_message_session_updated_phone_number import ServerMessageSessionUpdatedPhoneNumber +from .server_message_session_updated_type import ServerMessageSessionUpdatedType +from .session import Session + + +class ServerMessageSessionUpdated(UncheckedBaseModel): + phone_number: typing_extensions.Annotated[ + typing.Optional[ServerMessageSessionUpdatedPhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: ServerMessageSessionUpdatedType = pydantic.Field() + """ + This is the type of the message. "session.updated" is sent when a session is updated. + """ + + timestamp: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the timestamp of the message. + """ + + artifact: typing.Optional[Artifact] = pydantic.Field(default=None) + """ + This is a live version of the `call.artifact`. + + This matches what is stored on `call.artifact` after the call. + """ + + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) + """ + This is the assistant that the message is associated with. + """ + + customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) + """ + This is the customer that the message is associated with. + """ + + call: typing.Optional[Call] = pydantic.Field(default=None) + """ + This is the call that the message is associated with. + """ + + chat: typing.Optional[Chat] = pydantic.Field(default=None) + """ + This is the chat object. + """ + + session: Session = pydantic.Field() + """ + This is the session that was updated. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ServerMessageSessionUpdated, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/server_message_session_updated_phone_number.py b/src/vapi/types/server_message_session_updated_phone_number.py new file mode 100644 index 00000000..1ed307e3 --- /dev/null +++ b/src/vapi/types/server_message_session_updated_phone_number.py @@ -0,0 +1,247 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ServerMessageSessionUpdatedPhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageSessionUpdatedPhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageSessionUpdatedPhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageSessionUpdatedPhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageSessionUpdatedPhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ServerMessageSessionUpdatedPhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ServerMessageSessionUpdatedPhoneNumber_ByoPhoneNumber, + ServerMessageSessionUpdatedPhoneNumber_Twilio, + ServerMessageSessionUpdatedPhoneNumber_Vonage, + ServerMessageSessionUpdatedPhoneNumber_Vapi, + ServerMessageSessionUpdatedPhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/server_message_session_updated_type.py b/src/vapi/types/server_message_session_updated_type.py new file mode 100644 index 00000000..f5a51dd9 --- /dev/null +++ b/src/vapi/types/server_message_session_updated_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ServerMessageSessionUpdatedType = typing.Union[typing.Literal["session.updated"], typing.Any] diff --git a/src/vapi/types/server_message_speech_update.py b/src/vapi/types/server_message_speech_update.py index 09179a71..57c24be9 100644 --- a/src/vapi/types/server_message_speech_update.py +++ b/src/vapi/types/server_message_speech_update.py @@ -1,39 +1,33 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -from .callback_step import CallbackStep -from .create_workflow_block_dto import CreateWorkflowBlockDto -from .handoff_step import HandoffStep -import typing_extensions + import typing -from .server_message_speech_update_phone_number import ServerMessageSpeechUpdatePhoneNumber -from ..core.serialization import FieldMetadata + import pydantic -from .server_message_speech_update_status import ServerMessageSpeechUpdateStatus -from .server_message_speech_update_role import ServerMessageSpeechUpdateRole +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel from .artifact import Artifact -from .create_assistant_dto import CreateAssistantDto -from .create_customer_dto import CreateCustomerDto from .call import Call -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.pydantic_utilities import update_forward_refs +from .chat import Chat +from .create_customer_dto import CreateCustomerDto +from .server_message_speech_update_phone_number import ServerMessageSpeechUpdatePhoneNumber +from .server_message_speech_update_role import ServerMessageSpeechUpdateRole +from .server_message_speech_update_status import ServerMessageSpeechUpdateStatus +from .server_message_speech_update_type import ServerMessageSpeechUpdateType -class ServerMessageSpeechUpdate(UniversalBaseModel): +class ServerMessageSpeechUpdate(UncheckedBaseModel): phone_number: typing_extensions.Annotated[ - typing.Optional[ServerMessageSpeechUpdatePhoneNumber], FieldMetadata(alias="phoneNumber") - ] = pydantic.Field(default=None) - """ - This is the phone number associated with the call. - - This matches one of the following: - - - `call.phoneNumber`, - - `call.phoneNumberId`. - """ - - type: typing.Literal["speech-update"] = pydantic.Field(default="speech-update") + typing.Optional[ServerMessageSpeechUpdatePhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: ServerMessageSpeechUpdateType = pydantic.Field() """ This is the type of the message. "speech-update" is sent whenever assistant or user start or stop speaking. """ @@ -48,9 +42,14 @@ class ServerMessageSpeechUpdate(UniversalBaseModel): This is the role which the speech update is for. """ - timestamp: typing.Optional[str] = pydantic.Field(default=None) + turn: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the turn number of the speech update (0-indexed). + """ + + timestamp: typing.Optional[float] = pydantic.Field(default=None) """ - This is the ISO-8601 formatted timestamp of when the message was sent. + This is the timestamp of the message. """ artifact: typing.Optional[Artifact] = pydantic.Field(default=None) @@ -60,37 +59,24 @@ class ServerMessageSpeechUpdate(UniversalBaseModel): This matches what is stored on `call.artifact` after the call. """ - assistant: typing.Optional[CreateAssistantDto] = pydantic.Field(default=None) + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) """ - This is the assistant that is currently active. This is provided for convenience. - - This matches one of the following: - - - `call.assistant`, - - `call.assistantId`, - - `call.squad[n].assistant`, - - `call.squad[n].assistantId`, - - `call.squadId->[n].assistant`, - - `call.squadId->[n].assistantId`. + This is the assistant that the message is associated with. """ customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) """ - This is the customer associated with the call. - - This matches one of the following: - - - `call.customer`, - - `call.customerId`. + This is the customer that the message is associated with. """ call: typing.Optional[Call] = pydantic.Field(default=None) """ - This is the call object. - - This matches what was returned in POST /call. - - Note: This might get stale during the call. To get the latest call object, especially after the call is ended, use GET /call/:id. + This is the call that the message is associated with. + """ + + chat: typing.Optional[Chat] = pydantic.Field(default=None) + """ + This is the chat object. """ if IS_PYDANTIC_V2: @@ -103,6 +89,121 @@ class Config: extra = pydantic.Extra.allow -update_forward_refs(CallbackStep, ServerMessageSpeechUpdate=ServerMessageSpeechUpdate) -update_forward_refs(CreateWorkflowBlockDto, ServerMessageSpeechUpdate=ServerMessageSpeechUpdate) -update_forward_refs(HandoffStep, ServerMessageSpeechUpdate=ServerMessageSpeechUpdate) +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ServerMessageSpeechUpdate, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/server_message_speech_update_phone_number.py b/src/vapi/types/server_message_speech_update_phone_number.py index 8fc5b0a5..62e5a690 100644 --- a/src/vapi/types/server_message_speech_update_phone_number.py +++ b/src/vapi/types/server_message_speech_update_phone_number.py @@ -1,11 +1,247 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .create_byo_phone_number_dto import CreateByoPhoneNumberDto -from .create_twilio_phone_number_dto import CreateTwilioPhoneNumberDto -from .create_vonage_phone_number_dto import CreateVonagePhoneNumberDto -from .create_vapi_phone_number_dto import CreateVapiPhoneNumberDto -ServerMessageSpeechUpdatePhoneNumber = typing.Union[ - CreateByoPhoneNumberDto, CreateTwilioPhoneNumberDto, CreateVonagePhoneNumberDto, CreateVapiPhoneNumberDto +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ServerMessageSpeechUpdatePhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageSpeechUpdatePhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageSpeechUpdatePhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageSpeechUpdatePhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageSpeechUpdatePhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ServerMessageSpeechUpdatePhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ServerMessageSpeechUpdatePhoneNumber_ByoPhoneNumber, + ServerMessageSpeechUpdatePhoneNumber_Twilio, + ServerMessageSpeechUpdatePhoneNumber_Vonage, + ServerMessageSpeechUpdatePhoneNumber_Vapi, + ServerMessageSpeechUpdatePhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), ] diff --git a/src/vapi/types/server_message_speech_update_type.py b/src/vapi/types/server_message_speech_update_type.py new file mode 100644 index 00000000..b5248d6c --- /dev/null +++ b/src/vapi/types/server_message_speech_update_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ServerMessageSpeechUpdateType = typing.Union[typing.Literal["speech-update"], typing.Any] diff --git a/src/vapi/types/server_message_status_update.py b/src/vapi/types/server_message_status_update.py index 126f3b60..f1a92b10 100644 --- a/src/vapi/types/server_message_status_update.py +++ b/src/vapi/types/server_message_status_update.py @@ -1,42 +1,36 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -from .callback_step import CallbackStep -from .create_workflow_block_dto import CreateWorkflowBlockDto -from .handoff_step import HandoffStep -import typing_extensions + import typing -from .server_message_status_update_phone_number import ServerMessageStatusUpdatePhoneNumber -from ..core.serialization import FieldMetadata + import pydantic -from .server_message_status_update_status import ServerMessageStatusUpdateStatus -from .server_message_status_update_ended_reason import ServerMessageStatusUpdateEndedReason -from .server_message_status_update_messages_item import ServerMessageStatusUpdateMessagesItem -from .open_ai_message import OpenAiMessage -from .server_message_status_update_destination import ServerMessageStatusUpdateDestination +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel from .artifact import Artifact -from .create_assistant_dto import CreateAssistantDto -from .create_customer_dto import CreateCustomerDto from .call import Call -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.pydantic_utilities import update_forward_refs +from .chat import Chat +from .create_customer_dto import CreateCustomerDto +from .open_ai_message import OpenAiMessage +from .server_message_status_update_destination import ServerMessageStatusUpdateDestination +from .server_message_status_update_ended_reason import ServerMessageStatusUpdateEndedReason +from .server_message_status_update_messages_item import ServerMessageStatusUpdateMessagesItem +from .server_message_status_update_phone_number import ServerMessageStatusUpdatePhoneNumber +from .server_message_status_update_status import ServerMessageStatusUpdateStatus +from .server_message_status_update_type import ServerMessageStatusUpdateType -class ServerMessageStatusUpdate(UniversalBaseModel): +class ServerMessageStatusUpdate(UncheckedBaseModel): phone_number: typing_extensions.Annotated[ - typing.Optional[ServerMessageStatusUpdatePhoneNumber], FieldMetadata(alias="phoneNumber") - ] = pydantic.Field(default=None) - """ - This is the phone number associated with the call. - - This matches one of the following: - - - `call.phoneNumber`, - - `call.phoneNumberId`. - """ - - type: typing.Literal["status-update"] = pydantic.Field(default="status-update") + typing.Optional[ServerMessageStatusUpdatePhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: ServerMessageStatusUpdateType = pydantic.Field() """ This is the type of the message. "status-update" is sent whenever the `call.status` changes. """ @@ -47,32 +41,34 @@ class ServerMessageStatusUpdate(UniversalBaseModel): """ ended_reason: typing_extensions.Annotated[ - typing.Optional[ServerMessageStatusUpdateEndedReason], FieldMetadata(alias="endedReason") - ] = pydantic.Field(default=None) - """ - This is the reason the call ended. This is only sent if the status is "ended". - """ - + typing.Optional[ServerMessageStatusUpdateEndedReason], + FieldMetadata(alias="endedReason"), + pydantic.Field( + alias="endedReason", + description='This is the reason the call ended. This is only sent if the status is "ended".', + ), + ] = None messages: typing.Optional[typing.List[ServerMessageStatusUpdateMessagesItem]] = pydantic.Field(default=None) """ These are the conversation messages of the call. This is only sent if the status is "forwarding". """ messages_open_ai_formatted: typing_extensions.Annotated[ - typing.Optional[typing.List[OpenAiMessage]], FieldMetadata(alias="messagesOpenAIFormatted") - ] = pydantic.Field(default=None) - """ - These are the conversation messages of the call. This is only sent if the status is "forwarding". - """ - + typing.Optional[typing.List[OpenAiMessage]], + FieldMetadata(alias="messagesOpenAIFormatted"), + pydantic.Field( + alias="messagesOpenAIFormatted", + description='These are the conversation messages of the call. This is only sent if the status is "forwarding".', + ), + ] = None destination: typing.Optional[ServerMessageStatusUpdateDestination] = pydantic.Field(default=None) """ This is the destination the call is being transferred to. This is only sent if the status is "forwarding". """ - timestamp: typing.Optional[str] = pydantic.Field(default=None) + timestamp: typing.Optional[float] = pydantic.Field(default=None) """ - This is the ISO-8601 formatted timestamp of when the message was sent. + This is the timestamp of the message. """ artifact: typing.Optional[Artifact] = pydantic.Field(default=None) @@ -82,37 +78,24 @@ class ServerMessageStatusUpdate(UniversalBaseModel): This matches what is stored on `call.artifact` after the call. """ - assistant: typing.Optional[CreateAssistantDto] = pydantic.Field(default=None) + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) """ - This is the assistant that is currently active. This is provided for convenience. - - This matches one of the following: - - - `call.assistant`, - - `call.assistantId`, - - `call.squad[n].assistant`, - - `call.squad[n].assistantId`, - - `call.squadId->[n].assistant`, - - `call.squadId->[n].assistantId`. + This is the assistant that the message is associated with. """ customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) """ - This is the customer associated with the call. - - This matches one of the following: - - - `call.customer`, - - `call.customerId`. + This is the customer that the message is associated with. """ call: typing.Optional[Call] = pydantic.Field(default=None) """ - This is the call object. - - This matches what was returned in POST /call. - - Note: This might get stale during the call. To get the latest call object, especially after the call is ended, use GET /call/:id. + This is the call that the message is associated with. + """ + + chat: typing.Optional[Chat] = pydantic.Field(default=None) + """ + This is the chat object. """ transcript: typing.Optional[str] = pydantic.Field(default=None) @@ -120,16 +103,20 @@ class ServerMessageStatusUpdate(UniversalBaseModel): This is the transcript of the call. This is only sent if the status is "forwarding". """ - inbound_phone_call_debugging_artifacts: typing_extensions.Annotated[ - typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]], - FieldMetadata(alias="inboundPhoneCallDebuggingArtifacts"), - ] = pydantic.Field(default=None) + summary: typing.Optional[str] = pydantic.Field(default=None) """ - This is the inbound phone call debugging artifacts. This is only sent if the status is "ended" and there was an error accepting the inbound phone call. - - This will include any errors related to the "assistant-request" if one was made. + This is the summary of the call. This is only sent if the status is "forwarding". """ + inbound_phone_call_debugging_artifacts: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="inboundPhoneCallDebuggingArtifacts"), + pydantic.Field( + alias="inboundPhoneCallDebuggingArtifacts", + description='This is the inbound phone call debugging artifacts. This is only sent if the status is "ended" and there was an error accepting the inbound phone call.\n\nThis will include any errors related to the "assistant-request" if one was made.', + ), + ] = None + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: @@ -140,6 +127,121 @@ class Config: extra = pydantic.Extra.allow -update_forward_refs(CallbackStep, ServerMessageStatusUpdate=ServerMessageStatusUpdate) -update_forward_refs(CreateWorkflowBlockDto, ServerMessageStatusUpdate=ServerMessageStatusUpdate) -update_forward_refs(HandoffStep, ServerMessageStatusUpdate=ServerMessageStatusUpdate) +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ServerMessageStatusUpdate, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/server_message_status_update_destination.py b/src/vapi/types/server_message_status_update_destination.py index 9ca53e46..72e1e8f3 100644 --- a/src/vapi/types/server_message_status_update_destination.py +++ b/src/vapi/types/server_message_status_update_destination.py @@ -1,7 +1,83 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .transfer_destination_number import TransferDestinationNumber -from .transfer_destination_sip import TransferDestinationSip -ServerMessageStatusUpdateDestination = typing.Union[TransferDestinationNumber, TransferDestinationSip] +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .transfer_destination_number_message import TransferDestinationNumberMessage +from .transfer_destination_sip_message import TransferDestinationSipMessage +from .transfer_plan import TransferPlan + + +class ServerMessageStatusUpdateDestination_Number(UncheckedBaseModel): + """ + This is the destination the call is being transferred to. This is only sent if the status is "forwarding". + """ + + type: typing.Literal["number"] = "number" + message: typing.Optional[TransferDestinationNumberMessage] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: str + extension: typing.Optional[str] = None + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageStatusUpdateDestination_Sip(UncheckedBaseModel): + """ + This is the destination the call is being transferred to. This is only sent if the status is "forwarding". + """ + + type: typing.Literal["sip"] = "sip" + message: typing.Optional[TransferDestinationSipMessage] = None + sip_uri: typing_extensions.Annotated[str, FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri")] + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + sip_headers: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="sipHeaders"), + pydantic.Field(alias="sipHeaders"), + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ServerMessageStatusUpdateDestination = typing_extensions.Annotated[ + typing.Union[ServerMessageStatusUpdateDestination_Number, ServerMessageStatusUpdateDestination_Sip], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/server_message_status_update_ended_reason.py b/src/vapi/types/server_message_status_update_ended_reason.py index c1df2f62..37aeffba 100644 --- a/src/vapi/types/server_message_status_update_ended_reason.py +++ b/src/vapi/types/server_message_status_update_ended_reason.py @@ -4,133 +4,452 @@ ServerMessageStatusUpdateEndedReason = typing.Union[ typing.Literal[ - "assistant-error", + "call-start-error-neither-assistant-nor-server-set", + "assistant-request-failed", + "assistant-request-returned-error", + "assistant-request-returned-unspeakable-error", + "assistant-request-returned-invalid-assistant", + "assistant-request-returned-no-assistant", + "assistant-request-returned-forwarding-phone-number", + "scheduled-call-deleted", + "call.start.error-vapifault-get-org", + "call.start.error-vapifault-get-subscription", + "call.start.error-get-assistant", + "call.start.error-get-phone-number", + "call.start.error-get-customer", + "call.start.error-get-resources-validation", + "call.start.error-vapi-number-international", + "call.start.error-vapi-number-outbound-daily-limit", + "call.start.error-get-transport", + "call.start.error-subscription-wallet-does-not-exist", + "call.start.error-fraud-check-failed", + "call.start.error-subscription-frozen", + "call.start.error-subscription-insufficient-credits", + "call.start.error-subscription-upgrade-failed", + "call.start.error-subscription-concurrency-limit-reached", + "call.start.error-enterprise-feature-not-available-recording-consent", + "assistant-not-valid", + "call.start.error-vapifault-database-error", "assistant-not-found", - "db-error", - "no-server-available", - "license-check-failed", - "pipeline-error-openai-llm-failed", - "pipeline-error-azure-openai-llm-failed", - "pipeline-error-groq-llm-failed", - "pipeline-error-anthropic-llm-failed", - "pipeline-error-vapi-llm-failed", - "pipeline-error-vapi-400-bad-request-validation-failed", - "pipeline-error-vapi-401-unauthorized", - "pipeline-error-vapi-403-model-access-denied", - "pipeline-error-vapi-429-exceeded-quota", - "pipeline-error-vapi-500-server-error", "pipeline-error-openai-voice-failed", "pipeline-error-cartesia-voice-failed", - "pipeline-error-deepgram-transcriber-failed", "pipeline-error-deepgram-voice-failed", - "pipeline-error-gladia-transcriber-failed", "pipeline-error-eleven-labs-voice-failed", "pipeline-error-playht-voice-failed", "pipeline-error-lmnt-voice-failed", "pipeline-error-azure-voice-failed", "pipeline-error-rime-ai-voice-failed", - "pipeline-error-neets-voice-failed", - "pipeline-no-available-model", + "pipeline-error-smallest-ai-voice-failed", + "pipeline-error-vapi-voice-failed", + "pipeline-error-neuphonic-voice-failed", + "pipeline-error-hume-voice-failed", + "pipeline-error-sesame-voice-failed", + "pipeline-error-inworld-voice-failed", + "pipeline-error-minimax-voice-failed", + "pipeline-error-wellsaid-voice-failed", + "pipeline-error-tavus-video-failed", + "call.in-progress.error-vapifault-openai-voice-failed", + "call.in-progress.error-vapifault-cartesia-voice-failed", + "call.in-progress.error-vapifault-deepgram-voice-failed", + "call.in-progress.error-vapifault-eleven-labs-voice-failed", + "call.in-progress.error-vapifault-playht-voice-failed", + "call.in-progress.error-vapifault-lmnt-voice-failed", + "call.in-progress.error-vapifault-azure-voice-failed", + "call.in-progress.error-vapifault-rime-ai-voice-failed", + "call.in-progress.error-vapifault-smallest-ai-voice-failed", + "call.in-progress.error-vapifault-vapi-voice-failed", + "call.in-progress.error-vapifault-neuphonic-voice-failed", + "call.in-progress.error-vapifault-hume-voice-failed", + "call.in-progress.error-vapifault-sesame-voice-failed", + "call.in-progress.error-vapifault-inworld-voice-failed", + "call.in-progress.error-vapifault-minimax-voice-failed", + "call.in-progress.error-vapifault-wellsaid-voice-failed", + "call.in-progress.error-vapifault-tavus-video-failed", + "pipeline-error-vapi-llm-failed", + "pipeline-error-vapi-400-bad-request-validation-failed", + "pipeline-error-vapi-401-unauthorized", + "pipeline-error-vapi-403-model-access-denied", + "pipeline-error-vapi-429-exceeded-quota", + "pipeline-error-vapi-500-server-error", + "pipeline-error-vapi-503-server-overloaded-error", + "call.in-progress.error-providerfault-vapi-llm-failed", + "call.in-progress.error-vapifault-vapi-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-vapi-401-unauthorized", + "call.in-progress.error-vapifault-vapi-403-model-access-denied", + "call.in-progress.error-vapifault-vapi-429-exceeded-quota", + "call.in-progress.error-providerfault-vapi-500-server-error", + "call.in-progress.error-providerfault-vapi-503-server-overloaded-error", + "pipeline-error-deepgram-transcriber-failed", + "pipeline-error-deepgram-transcriber-api-key-missing", + "call.in-progress.error-vapifault-deepgram-transcriber-failed", + "pipeline-error-gladia-transcriber-failed", + "call.in-progress.error-vapifault-gladia-transcriber-failed", + "pipeline-error-speechmatics-transcriber-failed", + "call.in-progress.error-vapifault-speechmatics-transcriber-failed", + "pipeline-error-assembly-ai-transcriber-failed", + "pipeline-error-assembly-ai-returning-400-insufficent-funds", + "pipeline-error-assembly-ai-returning-400-paid-only-feature", + "pipeline-error-assembly-ai-returning-401-invalid-credentials", + "pipeline-error-assembly-ai-returning-500-invalid-schema", + "pipeline-error-assembly-ai-returning-500-word-boost-parsing-failed", + "call.in-progress.error-vapifault-assembly-ai-transcriber-failed", + "call.in-progress.error-vapifault-assembly-ai-returning-400-insufficent-funds", + "call.in-progress.error-vapifault-assembly-ai-returning-400-paid-only-feature", + "call.in-progress.error-vapifault-assembly-ai-returning-401-invalid-credentials", + "call.in-progress.error-vapifault-assembly-ai-returning-500-invalid-schema", + "call.in-progress.error-vapifault-assembly-ai-returning-500-word-boost-parsing-failed", + "pipeline-error-talkscriber-transcriber-failed", + "call.in-progress.error-vapifault-talkscriber-transcriber-failed", + "pipeline-error-azure-speech-transcriber-failed", + "call.in-progress.error-vapifault-azure-speech-transcriber-failed", + "pipeline-error-eleven-labs-transcriber-failed", + "call.in-progress.error-vapifault-eleven-labs-transcriber-failed", + "pipeline-error-google-transcriber-failed", + "call.in-progress.error-vapifault-google-transcriber-failed", + "pipeline-error-openai-transcriber-failed", + "call.in-progress.error-vapifault-openai-transcriber-failed", + "pipeline-error-soniox-transcriber-auth-failed", + "pipeline-error-soniox-transcriber-rate-limited", + "pipeline-error-soniox-transcriber-invalid-config", + "pipeline-error-soniox-transcriber-server-error", + "pipeline-error-soniox-transcriber-failed", + "call.in-progress.error-vapifault-soniox-transcriber-auth-failed", + "call.in-progress.error-vapifault-soniox-transcriber-rate-limited", + "call.in-progress.error-vapifault-soniox-transcriber-invalid-config", + "call.in-progress.error-vapifault-soniox-transcriber-server-error", + "call.in-progress.error-vapifault-soniox-transcriber-failed", + "call.in-progress.error-pipeline-no-available-llm-model", "worker-shutdown", - "unknown-error", "vonage-disconnected", "vonage-failed-to-connect-call", + "vonage-completed", "phone-call-provider-bypass-enabled-but-no-call-received", - "vapifault-phone-call-worker-setup-socket-error", - "vapifault-phone-call-worker-worker-setup-socket-timeout", - "vapifault-phone-call-worker-could-not-find-call", - "vapifault-transport-never-connected", - "vapifault-web-call-worker-setup-failed", - "vapifault-transport-connected-but-call-not-active", - "assistant-not-invalid", - "assistant-not-provided", - "call-start-error-neither-assistant-nor-server-set", - "assistant-request-failed", - "assistant-request-returned-error", - "assistant-request-returned-unspeakable-error", - "assistant-request-returned-invalid-assistant", - "assistant-request-returned-no-assistant", - "assistant-request-returned-forwarding-phone-number", - "assistant-ended-call", - "assistant-said-end-call-phrase", - "assistant-forwarded-call", - "assistant-join-timed-out", - "customer-busy", - "customer-ended-call", - "customer-did-not-answer", - "customer-did-not-give-microphone-permission", - "assistant-said-message-with-end-call-enabled", - "exceeded-max-duration", - "manually-canceled", - "phone-call-provider-closed-websocket", + "call.in-progress.error-providerfault-transport-never-connected", + "call.in-progress.error-vapifault-worker-not-available", + "call.in-progress.error-vapifault-transport-never-connected", + "call.in-progress.error-vapifault-transport-connected-but-call-not-active", + "call.in-progress.error-vapifault-call-started-but-connection-to-transport-missing", + "call.in-progress.error-vapifault-worker-died", + "call.in-progress.twilio-completed-call", + "call.in-progress.sip-completed-call", + "call.in-progress.error-sip-inbound-call-failed-to-connect", + "call.in-progress.error-providerfault-outbound-sip-503-service-unavailable", + "call.in-progress.error-sip-outbound-call-failed-to-connect", + "call.ringing.error-sip-inbound-call-failed-to-connect", + "call.in-progress.error-providerfault-openai-llm-failed", + "call.in-progress.error-providerfault-azure-openai-llm-failed", + "call.in-progress.error-providerfault-groq-llm-failed", + "call.in-progress.error-providerfault-google-llm-failed", + "call.in-progress.error-providerfault-xai-llm-failed", + "call.in-progress.error-providerfault-mistral-llm-failed", + "call.in-progress.error-providerfault-minimax-llm-failed", + "call.in-progress.error-providerfault-inflection-ai-llm-failed", + "call.in-progress.error-providerfault-cerebras-llm-failed", + "call.in-progress.error-providerfault-deep-seek-llm-failed", + "call.in-progress.error-providerfault-baseten-llm-failed", + "call.in-progress.error-vapifault-chat-pipeline-failed-to-start", "pipeline-error-openai-400-bad-request-validation-failed", "pipeline-error-openai-401-unauthorized", + "pipeline-error-openai-401-incorrect-api-key", + "pipeline-error-openai-401-account-not-in-organization", "pipeline-error-openai-403-model-access-denied", "pipeline-error-openai-429-exceeded-quota", + "pipeline-error-openai-429-rate-limit-reached", "pipeline-error-openai-500-server-error", + "pipeline-error-openai-503-server-overloaded-error", + "pipeline-error-openai-llm-failed", + "call.in-progress.error-vapifault-openai-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-openai-401-unauthorized", + "call.in-progress.error-vapifault-openai-401-incorrect-api-key", + "call.in-progress.error-vapifault-openai-401-account-not-in-organization", + "call.in-progress.error-vapifault-openai-403-model-access-denied", + "call.in-progress.error-vapifault-openai-429-exceeded-quota", + "call.in-progress.error-vapifault-openai-429-rate-limit-reached", + "call.in-progress.error-providerfault-openai-500-server-error", + "call.in-progress.error-providerfault-openai-503-server-overloaded-error", "pipeline-error-azure-openai-400-bad-request-validation-failed", "pipeline-error-azure-openai-401-unauthorized", "pipeline-error-azure-openai-403-model-access-denied", "pipeline-error-azure-openai-429-exceeded-quota", "pipeline-error-azure-openai-500-server-error", + "pipeline-error-azure-openai-503-server-overloaded-error", + "pipeline-error-azure-openai-llm-failed", + "call.in-progress.error-vapifault-azure-openai-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-azure-openai-401-unauthorized", + "call.in-progress.error-vapifault-azure-openai-403-model-access-denied", + "call.in-progress.error-vapifault-azure-openai-429-exceeded-quota", + "call.in-progress.error-providerfault-azure-openai-500-server-error", + "call.in-progress.error-providerfault-azure-openai-503-server-overloaded-error", + "pipeline-error-google-400-bad-request-validation-failed", + "pipeline-error-google-401-unauthorized", + "pipeline-error-google-403-model-access-denied", + "pipeline-error-google-429-exceeded-quota", + "pipeline-error-google-500-server-error", + "pipeline-error-google-503-server-overloaded-error", + "pipeline-error-google-llm-failed", + "call.in-progress.error-vapifault-google-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-google-401-unauthorized", + "call.in-progress.error-vapifault-google-403-model-access-denied", + "call.in-progress.error-vapifault-google-429-exceeded-quota", + "call.in-progress.error-providerfault-google-500-server-error", + "call.in-progress.error-providerfault-google-503-server-overloaded-error", + "pipeline-error-xai-400-bad-request-validation-failed", + "pipeline-error-xai-401-unauthorized", + "pipeline-error-xai-403-model-access-denied", + "pipeline-error-xai-429-exceeded-quota", + "pipeline-error-xai-500-server-error", + "pipeline-error-xai-503-server-overloaded-error", + "pipeline-error-xai-llm-failed", + "call.in-progress.error-vapifault-xai-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-xai-401-unauthorized", + "call.in-progress.error-vapifault-xai-403-model-access-denied", + "call.in-progress.error-vapifault-xai-429-exceeded-quota", + "call.in-progress.error-providerfault-xai-500-server-error", + "call.in-progress.error-providerfault-xai-503-server-overloaded-error", + "pipeline-error-baseten-400-bad-request-validation-failed", + "pipeline-error-baseten-401-unauthorized", + "pipeline-error-baseten-403-model-access-denied", + "pipeline-error-baseten-429-exceeded-quota", + "pipeline-error-baseten-500-server-error", + "pipeline-error-baseten-503-server-overloaded-error", + "pipeline-error-baseten-llm-failed", + "call.in-progress.error-vapifault-baseten-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-baseten-401-unauthorized", + "call.in-progress.error-vapifault-baseten-403-model-access-denied", + "call.in-progress.error-vapifault-baseten-429-exceeded-quota", + "call.in-progress.error-providerfault-baseten-500-server-error", + "call.in-progress.error-providerfault-baseten-503-server-overloaded-error", + "pipeline-error-mistral-400-bad-request-validation-failed", + "pipeline-error-mistral-401-unauthorized", + "pipeline-error-mistral-403-model-access-denied", + "pipeline-error-mistral-429-exceeded-quota", + "pipeline-error-mistral-500-server-error", + "pipeline-error-mistral-503-server-overloaded-error", + "pipeline-error-mistral-llm-failed", + "call.in-progress.error-vapifault-mistral-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-mistral-401-unauthorized", + "call.in-progress.error-vapifault-mistral-403-model-access-denied", + "call.in-progress.error-vapifault-mistral-429-exceeded-quota", + "call.in-progress.error-providerfault-mistral-500-server-error", + "call.in-progress.error-providerfault-mistral-503-server-overloaded-error", + "pipeline-error-minimax-400-bad-request-validation-failed", + "pipeline-error-minimax-401-unauthorized", + "pipeline-error-minimax-403-model-access-denied", + "pipeline-error-minimax-429-exceeded-quota", + "pipeline-error-minimax-500-server-error", + "pipeline-error-minimax-503-server-overloaded-error", + "pipeline-error-minimax-llm-failed", + "call.in-progress.error-vapifault-minimax-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-minimax-401-unauthorized", + "call.in-progress.error-vapifault-minimax-403-model-access-denied", + "call.in-progress.error-vapifault-minimax-429-exceeded-quota", + "call.in-progress.error-providerfault-minimax-500-server-error", + "call.in-progress.error-providerfault-minimax-503-server-overloaded-error", + "pipeline-error-inflection-ai-400-bad-request-validation-failed", + "pipeline-error-inflection-ai-401-unauthorized", + "pipeline-error-inflection-ai-403-model-access-denied", + "pipeline-error-inflection-ai-429-exceeded-quota", + "pipeline-error-inflection-ai-500-server-error", + "pipeline-error-inflection-ai-503-server-overloaded-error", + "pipeline-error-inflection-ai-llm-failed", + "call.in-progress.error-vapifault-inflection-ai-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-inflection-ai-401-unauthorized", + "call.in-progress.error-vapifault-inflection-ai-403-model-access-denied", + "call.in-progress.error-vapifault-inflection-ai-429-exceeded-quota", + "call.in-progress.error-providerfault-inflection-ai-500-server-error", + "call.in-progress.error-providerfault-inflection-ai-503-server-overloaded-error", + "pipeline-error-deep-seek-400-bad-request-validation-failed", + "pipeline-error-deep-seek-401-unauthorized", + "pipeline-error-deep-seek-403-model-access-denied", + "pipeline-error-deep-seek-429-exceeded-quota", + "pipeline-error-deep-seek-500-server-error", + "pipeline-error-deep-seek-503-server-overloaded-error", + "pipeline-error-deep-seek-llm-failed", + "call.in-progress.error-vapifault-deep-seek-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-deep-seek-401-unauthorized", + "call.in-progress.error-vapifault-deep-seek-403-model-access-denied", + "call.in-progress.error-vapifault-deep-seek-429-exceeded-quota", + "call.in-progress.error-providerfault-deep-seek-500-server-error", + "call.in-progress.error-providerfault-deep-seek-503-server-overloaded-error", "pipeline-error-groq-400-bad-request-validation-failed", "pipeline-error-groq-401-unauthorized", "pipeline-error-groq-403-model-access-denied", "pipeline-error-groq-429-exceeded-quota", "pipeline-error-groq-500-server-error", + "pipeline-error-groq-503-server-overloaded-error", + "pipeline-error-groq-llm-failed", + "call.in-progress.error-vapifault-groq-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-groq-401-unauthorized", + "call.in-progress.error-vapifault-groq-403-model-access-denied", + "call.in-progress.error-vapifault-groq-429-exceeded-quota", + "call.in-progress.error-providerfault-groq-500-server-error", + "call.in-progress.error-providerfault-groq-503-server-overloaded-error", + "pipeline-error-cerebras-400-bad-request-validation-failed", + "pipeline-error-cerebras-401-unauthorized", + "pipeline-error-cerebras-403-model-access-denied", + "pipeline-error-cerebras-429-exceeded-quota", + "pipeline-error-cerebras-500-server-error", + "pipeline-error-cerebras-503-server-overloaded-error", + "pipeline-error-cerebras-llm-failed", + "call.in-progress.error-vapifault-cerebras-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-cerebras-401-unauthorized", + "call.in-progress.error-vapifault-cerebras-403-model-access-denied", + "call.in-progress.error-vapifault-cerebras-429-exceeded-quota", + "call.in-progress.error-providerfault-cerebras-500-server-error", + "call.in-progress.error-providerfault-cerebras-503-server-overloaded-error", "pipeline-error-anthropic-400-bad-request-validation-failed", "pipeline-error-anthropic-401-unauthorized", "pipeline-error-anthropic-403-model-access-denied", "pipeline-error-anthropic-429-exceeded-quota", "pipeline-error-anthropic-500-server-error", + "pipeline-error-anthropic-503-server-overloaded-error", + "pipeline-error-anthropic-llm-failed", + "call.in-progress.error-providerfault-anthropic-llm-failed", + "call.in-progress.error-vapifault-anthropic-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-anthropic-401-unauthorized", + "call.in-progress.error-vapifault-anthropic-403-model-access-denied", + "call.in-progress.error-vapifault-anthropic-429-exceeded-quota", + "call.in-progress.error-providerfault-anthropic-500-server-error", + "call.in-progress.error-providerfault-anthropic-503-server-overloaded-error", + "pipeline-error-anthropic-bedrock-400-bad-request-validation-failed", + "pipeline-error-anthropic-bedrock-401-unauthorized", + "pipeline-error-anthropic-bedrock-403-model-access-denied", + "pipeline-error-anthropic-bedrock-429-exceeded-quota", + "pipeline-error-anthropic-bedrock-500-server-error", + "pipeline-error-anthropic-bedrock-503-server-overloaded-error", + "pipeline-error-anthropic-bedrock-llm-failed", + "call.in-progress.error-providerfault-anthropic-bedrock-llm-failed", + "call.in-progress.error-vapifault-anthropic-bedrock-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-anthropic-bedrock-401-unauthorized", + "call.in-progress.error-vapifault-anthropic-bedrock-403-model-access-denied", + "call.in-progress.error-vapifault-anthropic-bedrock-429-exceeded-quota", + "call.in-progress.error-providerfault-anthropic-bedrock-500-server-error", + "call.in-progress.error-providerfault-anthropic-bedrock-503-server-overloaded-error", + "pipeline-error-anthropic-vertex-400-bad-request-validation-failed", + "pipeline-error-anthropic-vertex-401-unauthorized", + "pipeline-error-anthropic-vertex-403-model-access-denied", + "pipeline-error-anthropic-vertex-429-exceeded-quota", + "pipeline-error-anthropic-vertex-500-server-error", + "pipeline-error-anthropic-vertex-503-server-overloaded-error", + "pipeline-error-anthropic-vertex-llm-failed", + "call.in-progress.error-providerfault-anthropic-vertex-llm-failed", + "call.in-progress.error-vapifault-anthropic-vertex-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-anthropic-vertex-401-unauthorized", + "call.in-progress.error-vapifault-anthropic-vertex-403-model-access-denied", + "call.in-progress.error-vapifault-anthropic-vertex-429-exceeded-quota", + "call.in-progress.error-providerfault-anthropic-vertex-500-server-error", + "call.in-progress.error-providerfault-anthropic-vertex-503-server-overloaded-error", "pipeline-error-together-ai-400-bad-request-validation-failed", "pipeline-error-together-ai-401-unauthorized", "pipeline-error-together-ai-403-model-access-denied", "pipeline-error-together-ai-429-exceeded-quota", "pipeline-error-together-ai-500-server-error", + "pipeline-error-together-ai-503-server-overloaded-error", "pipeline-error-together-ai-llm-failed", + "call.in-progress.error-providerfault-together-ai-llm-failed", + "call.in-progress.error-vapifault-together-ai-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-together-ai-401-unauthorized", + "call.in-progress.error-vapifault-together-ai-403-model-access-denied", + "call.in-progress.error-vapifault-together-ai-429-exceeded-quota", + "call.in-progress.error-providerfault-together-ai-500-server-error", + "call.in-progress.error-providerfault-together-ai-503-server-overloaded-error", "pipeline-error-anyscale-400-bad-request-validation-failed", "pipeline-error-anyscale-401-unauthorized", "pipeline-error-anyscale-403-model-access-denied", "pipeline-error-anyscale-429-exceeded-quota", "pipeline-error-anyscale-500-server-error", + "pipeline-error-anyscale-503-server-overloaded-error", "pipeline-error-anyscale-llm-failed", + "call.in-progress.error-providerfault-anyscale-llm-failed", + "call.in-progress.error-vapifault-anyscale-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-anyscale-401-unauthorized", + "call.in-progress.error-vapifault-anyscale-403-model-access-denied", + "call.in-progress.error-vapifault-anyscale-429-exceeded-quota", + "call.in-progress.error-providerfault-anyscale-500-server-error", + "call.in-progress.error-providerfault-anyscale-503-server-overloaded-error", "pipeline-error-openrouter-400-bad-request-validation-failed", "pipeline-error-openrouter-401-unauthorized", "pipeline-error-openrouter-403-model-access-denied", "pipeline-error-openrouter-429-exceeded-quota", "pipeline-error-openrouter-500-server-error", + "pipeline-error-openrouter-503-server-overloaded-error", "pipeline-error-openrouter-llm-failed", + "call.in-progress.error-providerfault-openrouter-llm-failed", + "call.in-progress.error-vapifault-openrouter-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-openrouter-401-unauthorized", + "call.in-progress.error-vapifault-openrouter-403-model-access-denied", + "call.in-progress.error-vapifault-openrouter-429-exceeded-quota", + "call.in-progress.error-providerfault-openrouter-500-server-error", + "call.in-progress.error-providerfault-openrouter-503-server-overloaded-error", "pipeline-error-perplexity-ai-400-bad-request-validation-failed", "pipeline-error-perplexity-ai-401-unauthorized", "pipeline-error-perplexity-ai-403-model-access-denied", "pipeline-error-perplexity-ai-429-exceeded-quota", "pipeline-error-perplexity-ai-500-server-error", + "pipeline-error-perplexity-ai-503-server-overloaded-error", "pipeline-error-perplexity-ai-llm-failed", + "call.in-progress.error-providerfault-perplexity-ai-llm-failed", + "call.in-progress.error-vapifault-perplexity-ai-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-perplexity-ai-401-unauthorized", + "call.in-progress.error-vapifault-perplexity-ai-403-model-access-denied", + "call.in-progress.error-vapifault-perplexity-ai-429-exceeded-quota", + "call.in-progress.error-providerfault-perplexity-ai-500-server-error", + "call.in-progress.error-providerfault-perplexity-ai-503-server-overloaded-error", "pipeline-error-deepinfra-400-bad-request-validation-failed", "pipeline-error-deepinfra-401-unauthorized", "pipeline-error-deepinfra-403-model-access-denied", "pipeline-error-deepinfra-429-exceeded-quota", "pipeline-error-deepinfra-500-server-error", + "pipeline-error-deepinfra-503-server-overloaded-error", "pipeline-error-deepinfra-llm-failed", + "call.in-progress.error-providerfault-deepinfra-llm-failed", + "call.in-progress.error-vapifault-deepinfra-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-deepinfra-401-unauthorized", + "call.in-progress.error-vapifault-deepinfra-403-model-access-denied", + "call.in-progress.error-vapifault-deepinfra-429-exceeded-quota", + "call.in-progress.error-providerfault-deepinfra-500-server-error", + "call.in-progress.error-providerfault-deepinfra-503-server-overloaded-error", "pipeline-error-runpod-400-bad-request-validation-failed", "pipeline-error-runpod-401-unauthorized", "pipeline-error-runpod-403-model-access-denied", "pipeline-error-runpod-429-exceeded-quota", "pipeline-error-runpod-500-server-error", + "pipeline-error-runpod-503-server-overloaded-error", "pipeline-error-runpod-llm-failed", + "call.in-progress.error-providerfault-runpod-llm-failed", + "call.in-progress.error-vapifault-runpod-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-runpod-401-unauthorized", + "call.in-progress.error-vapifault-runpod-403-model-access-denied", + "call.in-progress.error-vapifault-runpod-429-exceeded-quota", + "call.in-progress.error-providerfault-runpod-500-server-error", + "call.in-progress.error-providerfault-runpod-503-server-overloaded-error", "pipeline-error-custom-llm-400-bad-request-validation-failed", "pipeline-error-custom-llm-401-unauthorized", "pipeline-error-custom-llm-403-model-access-denied", "pipeline-error-custom-llm-429-exceeded-quota", "pipeline-error-custom-llm-500-server-error", + "pipeline-error-custom-llm-503-server-overloaded-error", "pipeline-error-custom-llm-llm-failed", + "call.in-progress.error-providerfault-custom-llm-llm-failed", + "call.in-progress.error-vapifault-custom-llm-400-bad-request-validation-failed", + "call.in-progress.error-vapifault-custom-llm-401-unauthorized", + "call.in-progress.error-vapifault-custom-llm-403-model-access-denied", + "call.in-progress.error-vapifault-custom-llm-429-exceeded-quota", + "call.in-progress.error-providerfault-custom-llm-500-server-error", + "call.in-progress.error-providerfault-custom-llm-503-server-overloaded-error", + "call.in-progress.error-pipeline-ws-model-connection-failed", + "pipeline-error-custom-voice-failed", "pipeline-error-cartesia-socket-hang-up", "pipeline-error-cartesia-requested-payment", "pipeline-error-cartesia-500-server-error", + "pipeline-error-cartesia-502-server-error", "pipeline-error-cartesia-503-server-error", "pipeline-error-cartesia-522-server-error", - "pipeline-error-custom-voice-failed", + "call.in-progress.error-vapifault-cartesia-socket-hang-up", + "call.in-progress.error-vapifault-cartesia-requested-payment", + "call.in-progress.error-providerfault-cartesia-500-server-error", + "call.in-progress.error-providerfault-cartesia-503-server-error", + "call.in-progress.error-providerfault-cartesia-522-server-error", "pipeline-error-eleven-labs-voice-not-found", "pipeline-error-eleven-labs-quota-exceeded", "pipeline-error-eleven-labs-unauthorized-access", @@ -144,17 +463,44 @@ "pipeline-error-eleven-labs-invalid-api-key", "pipeline-error-eleven-labs-invalid-voice-samples", "pipeline-error-eleven-labs-voice-disabled-by-owner", + "pipeline-error-eleven-labs-vapi-voice-disabled-by-owner", "pipeline-error-eleven-labs-blocked-account-in-probation", "pipeline-error-eleven-labs-blocked-content-against-their-policy", "pipeline-error-eleven-labs-missing-samples-for-voice-clone", "pipeline-error-eleven-labs-voice-not-fine-tuned-and-cannot-be-used", "pipeline-error-eleven-labs-voice-not-allowed-for-free-users", - "pipeline-error-eleven-labs-500-server-error", "pipeline-error-eleven-labs-max-character-limit-exceeded", + "pipeline-error-eleven-labs-blocked-voice-potentially-against-terms-of-service-and-awaiting-verification", + "pipeline-error-eleven-labs-500-server-error", + "pipeline-error-eleven-labs-503-server-error", + "call.in-progress.error-vapifault-eleven-labs-voice-not-found", + "call.in-progress.error-vapifault-eleven-labs-quota-exceeded", + "call.in-progress.error-vapifault-eleven-labs-unauthorized-access", + "call.in-progress.error-vapifault-eleven-labs-unauthorized-to-access-model", + "call.in-progress.error-vapifault-eleven-labs-professional-voices-only-for-creator-plus", + "call.in-progress.error-vapifault-eleven-labs-blocked-free-plan-and-requested-upgrade", + "call.in-progress.error-vapifault-eleven-labs-blocked-concurrent-requests-and-requested-upgrade", + "call.in-progress.error-vapifault-eleven-labs-blocked-using-instant-voice-clone-and-requested-upgrade", + "call.in-progress.error-vapifault-eleven-labs-system-busy-and-requested-upgrade", + "call.in-progress.error-vapifault-eleven-labs-voice-not-fine-tuned", + "call.in-progress.error-vapifault-eleven-labs-invalid-api-key", + "call.in-progress.error-vapifault-eleven-labs-invalid-voice-samples", + "call.in-progress.error-vapifault-eleven-labs-voice-disabled-by-owner", + "call.in-progress.error-vapifault-eleven-labs-blocked-account-in-probation", + "call.in-progress.error-vapifault-eleven-labs-blocked-content-against-their-policy", + "call.in-progress.error-vapifault-eleven-labs-missing-samples-for-voice-clone", + "call.in-progress.error-vapifault-eleven-labs-voice-not-fine-tuned-and-cannot-be-used", + "call.in-progress.error-vapifault-eleven-labs-voice-not-allowed-for-free-users", + "call.in-progress.error-vapifault-eleven-labs-max-character-limit-exceeded", + "call.in-progress.error-vapifault-eleven-labs-blocked-voice-potentially-against-terms-of-service-and-awaiting-verification", + "call.in-progress.error-providerfault-eleven-labs-system-busy-and-requested-upgrade", + "call.in-progress.error-providerfault-eleven-labs-500-server-error", + "call.in-progress.error-providerfault-eleven-labs-503-server-error", "pipeline-error-playht-request-timed-out", "pipeline-error-playht-invalid-voice", "pipeline-error-playht-unexpected-error", "pipeline-error-playht-out-of-credits", + "pipeline-error-playht-invalid-emotion", "pipeline-error-playht-voice-must-be-a-valid-voice-manifest-uri", "pipeline-error-playht-401-unauthorized", "pipeline-error-playht-403-forbidden-out-of-characters", @@ -162,16 +508,73 @@ "pipeline-error-playht-429-exceeded-quota", "pipeline-error-playht-502-gateway-error", "pipeline-error-playht-504-gateway-error", - "pipeline-error-deepgram-403-model-access-denied", - "pipeline-error-deepgram-404-not-found", - "pipeline-error-deepgram-400-no-such-model-language-tier-combination", - "pipeline-error-deepgram-500-returning-invalid-json", - "sip-gateway-failed-to-connect-call", + "call.in-progress.error-vapifault-playht-request-timed-out", + "call.in-progress.error-vapifault-playht-invalid-voice", + "call.in-progress.error-vapifault-playht-unexpected-error", + "call.in-progress.error-vapifault-playht-out-of-credits", + "call.in-progress.error-vapifault-playht-invalid-emotion", + "call.in-progress.error-vapifault-playht-voice-must-be-a-valid-voice-manifest-uri", + "call.in-progress.error-vapifault-playht-401-unauthorized", + "call.in-progress.error-vapifault-playht-403-forbidden-out-of-characters", + "call.in-progress.error-vapifault-playht-403-forbidden-api-access-not-available", + "call.in-progress.error-vapifault-playht-429-exceeded-quota", + "call.in-progress.error-providerfault-playht-502-gateway-error", + "call.in-progress.error-providerfault-playht-504-gateway-error", + "pipeline-error-custom-transcriber-failed", + "call.in-progress.error-vapifault-custom-transcriber-failed", + "pipeline-error-deepgram-returning-400-no-such-model-language-tier-combination", + "pipeline-error-deepgram-returning-401-invalid-credentials", + "pipeline-error-deepgram-returning-403-model-access-denied", + "pipeline-error-deepgram-returning-404-not-found", + "pipeline-error-deepgram-returning-500-invalid-json", + "pipeline-error-deepgram-returning-502-network-error", + "pipeline-error-deepgram-returning-502-bad-gateway-ehostunreach", + "pipeline-error-deepgram-returning-econnreset", + "call.in-progress.error-vapifault-deepgram-returning-400-no-such-model-language-tier-combination", + "call.in-progress.error-vapifault-deepgram-returning-401-invalid-credentials", + "call.in-progress.error-vapifault-deepgram-returning-404-not-found", + "call.in-progress.error-vapifault-deepgram-returning-403-model-access-denied", + "call.in-progress.error-providerfault-deepgram-returning-500-invalid-json", + "call.in-progress.error-providerfault-deepgram-returning-502-network-error", + "call.in-progress.error-providerfault-deepgram-returning-502-bad-gateway-ehostunreach", + "call.in-progress.error-warm-transfer-max-duration", + "call.in-progress.error-warm-transfer-assistant-cancelled", + "call.in-progress.error-warm-transfer-silence-timeout", + "call.in-progress.error-warm-transfer-microphone-timeout", + "assistant-ended-call", + "assistant-said-end-call-phrase", + "assistant-ended-call-with-hangup-task", + "assistant-ended-call-after-message-spoken", + "assistant-forwarded-call", + "assistant-join-timed-out", + "call.in-progress.error-assistant-did-not-receive-customer-audio", + "call.in-progress.error-transfer-failed", + "customer-busy", + "customer-ended-call", + "customer-ended-call-before-warm-transfer", + "customer-ended-call-after-warm-transfer-attempt", + "customer-ended-call-during-transfer", + "customer-did-not-answer", + "customer-did-not-give-microphone-permission", + "exceeded-max-duration", + "manually-canceled", + "phone-call-provider-closed-websocket", + "call.forwarding.operator-busy", "silence-timed-out", + "call.in-progress.error-providerfault-outbound-sip-403-forbidden", + "call.in-progress.error-providerfault-outbound-sip-407-proxy-authentication-required", + "call.in-progress.error-providerfault-outbound-sip-408-request-timeout", + "call.in-progress.error-providerfault-outbound-sip-480-temporarily-unavailable", + "call.ringing.hook-executed-say", + "call.ringing.hook-executed-transfer", + "call.ending.hook-executed-say", + "call.ending.hook-executed-transfer", + "call.ringing.sip-inbound-caller-hungup-before-call-connect", "twilio-failed-to-connect-call", "twilio-reported-customer-misdialed", - "voicemail", "vonage-rejected", + "voicemail", + "call-deleted", ], typing.Any, ] diff --git a/src/vapi/types/server_message_status_update_messages_item.py b/src/vapi/types/server_message_status_update_messages_item.py index 5982d0de..57346f6f 100644 --- a/src/vapi/types/server_message_status_update_messages_item.py +++ b/src/vapi/types/server_message_status_update_messages_item.py @@ -1,11 +1,12 @@ # This file was auto-generated by Fern from our API Definition. import typing -from .user_message import UserMessage -from .system_message import SystemMessage + from .bot_message import BotMessage +from .system_message import SystemMessage from .tool_call_message import ToolCallMessage from .tool_call_result_message import ToolCallResultMessage +from .user_message import UserMessage ServerMessageStatusUpdateMessagesItem = typing.Union[ UserMessage, SystemMessage, BotMessage, ToolCallMessage, ToolCallResultMessage diff --git a/src/vapi/types/server_message_status_update_phone_number.py b/src/vapi/types/server_message_status_update_phone_number.py index 74b53af6..6c18f063 100644 --- a/src/vapi/types/server_message_status_update_phone_number.py +++ b/src/vapi/types/server_message_status_update_phone_number.py @@ -1,11 +1,247 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .create_byo_phone_number_dto import CreateByoPhoneNumberDto -from .create_twilio_phone_number_dto import CreateTwilioPhoneNumberDto -from .create_vonage_phone_number_dto import CreateVonagePhoneNumberDto -from .create_vapi_phone_number_dto import CreateVapiPhoneNumberDto -ServerMessageStatusUpdatePhoneNumber = typing.Union[ - CreateByoPhoneNumberDto, CreateTwilioPhoneNumberDto, CreateVonagePhoneNumberDto, CreateVapiPhoneNumberDto +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ServerMessageStatusUpdatePhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageStatusUpdatePhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageStatusUpdatePhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageStatusUpdatePhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageStatusUpdatePhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ServerMessageStatusUpdatePhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ServerMessageStatusUpdatePhoneNumber_ByoPhoneNumber, + ServerMessageStatusUpdatePhoneNumber_Twilio, + ServerMessageStatusUpdatePhoneNumber_Vonage, + ServerMessageStatusUpdatePhoneNumber_Vapi, + ServerMessageStatusUpdatePhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), ] diff --git a/src/vapi/types/server_message_status_update_status.py b/src/vapi/types/server_message_status_update_status.py index b9f6a9eb..0a279a6a 100644 --- a/src/vapi/types/server_message_status_update_status.py +++ b/src/vapi/types/server_message_status_update_status.py @@ -3,5 +3,8 @@ import typing ServerMessageStatusUpdateStatus = typing.Union[ - typing.Literal["queued", "ringing", "in-progress", "forwarding", "ended"], typing.Any + typing.Literal[ + "scheduled", "queued", "ringing", "in-progress", "forwarding", "ended", "not-found", "deletion-failed" + ], + typing.Any, ] diff --git a/src/vapi/types/server_message_status_update_type.py b/src/vapi/types/server_message_status_update_type.py new file mode 100644 index 00000000..b7d87f80 --- /dev/null +++ b/src/vapi/types/server_message_status_update_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ServerMessageStatusUpdateType = typing.Union[typing.Literal["status-update"], typing.Any] diff --git a/src/vapi/types/server_message_tool_calls.py b/src/vapi/types/server_message_tool_calls.py index 0cf696db..668ccf82 100644 --- a/src/vapi/types/server_message_tool_calls.py +++ b/src/vapi/types/server_message_tool_calls.py @@ -1,53 +1,48 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -from .callback_step import CallbackStep -from .create_workflow_block_dto import CreateWorkflowBlockDto -from .handoff_step import HandoffStep -import typing_extensions + import typing -from .server_message_tool_calls_phone_number import ServerMessageToolCallsPhoneNumber -from ..core.serialization import FieldMetadata + import pydantic -from .server_message_tool_calls_tool_with_tool_call_list_item import ServerMessageToolCallsToolWithToolCallListItem +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel from .artifact import Artifact -from .create_assistant_dto import CreateAssistantDto -from .create_customer_dto import CreateCustomerDto from .call import Call +from .chat import Chat +from .create_customer_dto import CreateCustomerDto +from .server_message_tool_calls_phone_number import ServerMessageToolCallsPhoneNumber +from .server_message_tool_calls_tool_with_tool_call_list_item import ServerMessageToolCallsToolWithToolCallListItem +from .server_message_tool_calls_type import ServerMessageToolCallsType from .tool_call import ToolCall -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.pydantic_utilities import update_forward_refs -class ServerMessageToolCalls(UniversalBaseModel): +class ServerMessageToolCalls(UncheckedBaseModel): phone_number: typing_extensions.Annotated[ - typing.Optional[ServerMessageToolCallsPhoneNumber], FieldMetadata(alias="phoneNumber") - ] = pydantic.Field(default=None) - """ - This is the phone number associated with the call. - - This matches one of the following: - - - `call.phoneNumber`, - - `call.phoneNumberId`. - """ - - type: typing.Optional[typing.Literal["tool-calls"]] = pydantic.Field(default=None) + typing.Optional[ServerMessageToolCallsPhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: typing.Optional[ServerMessageToolCallsType] = pydantic.Field(default=None) """ This is the type of the message. "tool-calls" is sent to call a tool. """ tool_with_tool_call_list: typing_extensions.Annotated[ - typing.List[ServerMessageToolCallsToolWithToolCallListItem], FieldMetadata(alias="toolWithToolCallList") - ] = pydantic.Field() + typing.List[ServerMessageToolCallsToolWithToolCallListItem], + FieldMetadata(alias="toolWithToolCallList"), + pydantic.Field( + alias="toolWithToolCallList", + description="This is the list of tools calls that the model is requesting along with the original tool configuration.", + ), + ] + timestamp: typing.Optional[float] = pydantic.Field(default=None) """ - This is the list of tools calls that the model is requesting along with the original tool configuration. - """ - - timestamp: typing.Optional[str] = pydantic.Field(default=None) - """ - This is the ISO-8601 formatted timestamp of when the message was sent. + This is the timestamp of the message. """ artifact: typing.Optional[Artifact] = pydantic.Field(default=None) @@ -57,46 +52,34 @@ class ServerMessageToolCalls(UniversalBaseModel): This matches what is stored on `call.artifact` after the call. """ - assistant: typing.Optional[CreateAssistantDto] = pydantic.Field(default=None) + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) """ - This is the assistant that is currently active. This is provided for convenience. - - This matches one of the following: - - - `call.assistant`, - - `call.assistantId`, - - `call.squad[n].assistant`, - - `call.squad[n].assistantId`, - - `call.squadId->[n].assistant`, - - `call.squadId->[n].assistantId`. + This is the assistant that the message is associated with. """ customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) """ - This is the customer associated with the call. - - This matches one of the following: - - - `call.customer`, - - `call.customerId`. + This is the customer that the message is associated with. """ call: typing.Optional[Call] = pydantic.Field(default=None) """ - This is the call object. - - This matches what was returned in POST /call. - - Note: This might get stale during the call. To get the latest call object, especially after the call is ended, use GET /call/:id. + This is the call that the message is associated with. """ - tool_call_list: typing_extensions.Annotated[typing.List[ToolCall], FieldMetadata(alias="toolCallList")] = ( - pydantic.Field() - ) + chat: typing.Optional[Chat] = pydantic.Field(default=None) """ - This is the list of tool calls that the model is requesting. + This is the chat object. """ + tool_call_list: typing_extensions.Annotated[ + typing.List[ToolCall], + FieldMetadata(alias="toolCallList"), + pydantic.Field( + alias="toolCallList", description="This is the list of tool calls that the model is requesting." + ), + ] + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: @@ -107,6 +90,121 @@ class Config: extra = pydantic.Extra.allow -update_forward_refs(CallbackStep, ServerMessageToolCalls=ServerMessageToolCalls) -update_forward_refs(CreateWorkflowBlockDto, ServerMessageToolCalls=ServerMessageToolCalls) -update_forward_refs(HandoffStep, ServerMessageToolCalls=ServerMessageToolCalls) +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ServerMessageToolCalls, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/server_message_tool_calls_phone_number.py b/src/vapi/types/server_message_tool_calls_phone_number.py index c3d73351..36f5ffb1 100644 --- a/src/vapi/types/server_message_tool_calls_phone_number.py +++ b/src/vapi/types/server_message_tool_calls_phone_number.py @@ -1,11 +1,247 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .create_byo_phone_number_dto import CreateByoPhoneNumberDto -from .create_twilio_phone_number_dto import CreateTwilioPhoneNumberDto -from .create_vonage_phone_number_dto import CreateVonagePhoneNumberDto -from .create_vapi_phone_number_dto import CreateVapiPhoneNumberDto -ServerMessageToolCallsPhoneNumber = typing.Union[ - CreateByoPhoneNumberDto, CreateTwilioPhoneNumberDto, CreateVonagePhoneNumberDto, CreateVapiPhoneNumberDto +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ServerMessageToolCallsPhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageToolCallsPhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageToolCallsPhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageToolCallsPhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageToolCallsPhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ServerMessageToolCallsPhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ServerMessageToolCallsPhoneNumber_ByoPhoneNumber, + ServerMessageToolCallsPhoneNumber_Twilio, + ServerMessageToolCallsPhoneNumber_Vonage, + ServerMessageToolCallsPhoneNumber_Vapi, + ServerMessageToolCallsPhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), ] diff --git a/src/vapi/types/server_message_tool_calls_tool_with_tool_call_list_item.py b/src/vapi/types/server_message_tool_calls_tool_with_tool_call_list_item.py index 3b9a29ec..053d0cd7 100644 --- a/src/vapi/types/server_message_tool_calls_tool_with_tool_call_list_item.py +++ b/src/vapi/types/server_message_tool_calls_tool_with_tool_call_list_item.py @@ -1,10 +1,218 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .function_tool_with_tool_call import FunctionToolWithToolCall -from .ghl_tool_with_tool_call import GhlToolWithToolCall -from .make_tool_with_tool_call import MakeToolWithToolCall -ServerMessageToolCallsToolWithToolCallListItem = typing.Union[ - FunctionToolWithToolCall, GhlToolWithToolCall, MakeToolWithToolCall +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .bash_tool_with_tool_call_messages_item import BashToolWithToolCallMessagesItem +from .bash_tool_with_tool_call_name import BashToolWithToolCallName +from .bash_tool_with_tool_call_sub_type import BashToolWithToolCallSubType +from .computer_tool_with_tool_call_messages_item import ComputerToolWithToolCallMessagesItem +from .computer_tool_with_tool_call_name import ComputerToolWithToolCallName +from .computer_tool_with_tool_call_sub_type import ComputerToolWithToolCallSubType +from .function_tool_with_tool_call_messages_item import FunctionToolWithToolCallMessagesItem +from .ghl_tool_metadata import GhlToolMetadata +from .ghl_tool_with_tool_call_messages_item import GhlToolWithToolCallMessagesItem +from .google_calendar_create_event_tool_with_tool_call_messages_item import ( + GoogleCalendarCreateEventToolWithToolCallMessagesItem, +) +from .make_tool_metadata import MakeToolMetadata +from .make_tool_with_tool_call_messages_item import MakeToolWithToolCallMessagesItem +from .open_ai_function import OpenAiFunction +from .server import Server +from .text_editor_tool_with_tool_call_messages_item import TextEditorToolWithToolCallMessagesItem +from .text_editor_tool_with_tool_call_name import TextEditorToolWithToolCallName +from .text_editor_tool_with_tool_call_sub_type import TextEditorToolWithToolCallSubType +from .tool_call import ToolCall +from .tool_parameter import ToolParameter +from .tool_rejection_plan import ToolRejectionPlan +from .variable_extraction_plan import VariableExtractionPlan + + +class ServerMessageToolCallsToolWithToolCallListItem_Function(UncheckedBaseModel): + type: typing.Literal["function"] = "function" + messages: typing.Optional[typing.List[FunctionToolWithToolCallMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + tool_call: typing_extensions.Annotated[ToolCall, FieldMetadata(alias="toolCall"), pydantic.Field(alias="toolCall")] + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageToolCallsToolWithToolCallListItem_Ghl(UncheckedBaseModel): + type: typing.Literal["ghl"] = "ghl" + messages: typing.Optional[typing.List[GhlToolWithToolCallMessagesItem]] = None + tool_call: typing_extensions.Annotated[ToolCall, FieldMetadata(alias="toolCall"), pydantic.Field(alias="toolCall")] + metadata: GhlToolMetadata + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageToolCallsToolWithToolCallListItem_Make(UncheckedBaseModel): + type: typing.Literal["make"] = "make" + messages: typing.Optional[typing.List[MakeToolWithToolCallMessagesItem]] = None + tool_call: typing_extensions.Annotated[ToolCall, FieldMetadata(alias="toolCall"), pydantic.Field(alias="toolCall")] + metadata: MakeToolMetadata + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageToolCallsToolWithToolCallListItem_Bash(UncheckedBaseModel): + type: typing.Literal["bash"] = "bash" + messages: typing.Optional[typing.List[BashToolWithToolCallMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + BashToolWithToolCallSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + tool_call: typing_extensions.Annotated[ToolCall, FieldMetadata(alias="toolCall"), pydantic.Field(alias="toolCall")] + name: BashToolWithToolCallName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageToolCallsToolWithToolCallListItem_Computer(UncheckedBaseModel): + type: typing.Literal["computer"] = "computer" + messages: typing.Optional[typing.List[ComputerToolWithToolCallMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + ComputerToolWithToolCallSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + tool_call: typing_extensions.Annotated[ToolCall, FieldMetadata(alias="toolCall"), pydantic.Field(alias="toolCall")] + name: ComputerToolWithToolCallName + display_width_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayWidthPx"), pydantic.Field(alias="displayWidthPx") + ] + display_height_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayHeightPx"), pydantic.Field(alias="displayHeightPx") + ] + display_number: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="displayNumber"), pydantic.Field(alias="displayNumber") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageToolCallsToolWithToolCallListItem_TextEditor(UncheckedBaseModel): + type: typing.Literal["textEditor"] = "textEditor" + messages: typing.Optional[typing.List[TextEditorToolWithToolCallMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + TextEditorToolWithToolCallSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + tool_call: typing_extensions.Annotated[ToolCall, FieldMetadata(alias="toolCall"), pydantic.Field(alias="toolCall")] + name: TextEditorToolWithToolCallName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageToolCallsToolWithToolCallListItem_GoogleCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["google.calendar.event.create"] = "google.calendar.event.create" + messages: typing.Optional[typing.List[GoogleCalendarCreateEventToolWithToolCallMessagesItem]] = None + tool_call: typing_extensions.Annotated[ToolCall, FieldMetadata(alias="toolCall"), pydantic.Field(alias="toolCall")] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ServerMessageToolCallsToolWithToolCallListItem = typing_extensions.Annotated[ + typing.Union[ + ServerMessageToolCallsToolWithToolCallListItem_Function, + ServerMessageToolCallsToolWithToolCallListItem_Ghl, + ServerMessageToolCallsToolWithToolCallListItem_Make, + ServerMessageToolCallsToolWithToolCallListItem_Bash, + ServerMessageToolCallsToolWithToolCallListItem_Computer, + ServerMessageToolCallsToolWithToolCallListItem_TextEditor, + ServerMessageToolCallsToolWithToolCallListItem_GoogleCalendarEventCreate, + ], + UnionMetadata(discriminant="type"), ] +update_forward_refs(ServerMessageToolCallsToolWithToolCallListItem_Function) +update_forward_refs(ServerMessageToolCallsToolWithToolCallListItem_Ghl) +update_forward_refs(ServerMessageToolCallsToolWithToolCallListItem_Make) +update_forward_refs(ServerMessageToolCallsToolWithToolCallListItem_Bash) +update_forward_refs(ServerMessageToolCallsToolWithToolCallListItem_Computer) +update_forward_refs(ServerMessageToolCallsToolWithToolCallListItem_TextEditor) +update_forward_refs(ServerMessageToolCallsToolWithToolCallListItem_GoogleCalendarEventCreate) diff --git a/src/vapi/types/server_message_tool_calls_type.py b/src/vapi/types/server_message_tool_calls_type.py new file mode 100644 index 00000000..4292b9e4 --- /dev/null +++ b/src/vapi/types/server_message_tool_calls_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ServerMessageToolCallsType = typing.Union[typing.Literal["tool-calls"], typing.Any] diff --git a/src/vapi/types/server_message_transcript.py b/src/vapi/types/server_message_transcript.py index df946236..002d0903 100644 --- a/src/vapi/types/server_message_transcript.py +++ b/src/vapi/types/server_message_transcript.py @@ -1,46 +1,40 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -from .callback_step import CallbackStep -from .create_workflow_block_dto import CreateWorkflowBlockDto -from .handoff_step import HandoffStep -import typing_extensions + import typing -from .server_message_transcript_phone_number import ServerMessageTranscriptPhoneNumber -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel from .artifact import Artifact -from .create_assistant_dto import CreateAssistantDto -from .create_customer_dto import CreateCustomerDto from .call import Call +from .chat import Chat +from .create_customer_dto import CreateCustomerDto +from .server_message_transcript_phone_number import ServerMessageTranscriptPhoneNumber from .server_message_transcript_role import ServerMessageTranscriptRole from .server_message_transcript_transcript_type import ServerMessageTranscriptTranscriptType -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.pydantic_utilities import update_forward_refs +from .server_message_transcript_type import ServerMessageTranscriptType -class ServerMessageTranscript(UniversalBaseModel): +class ServerMessageTranscript(UncheckedBaseModel): phone_number: typing_extensions.Annotated[ - typing.Optional[ServerMessageTranscriptPhoneNumber], FieldMetadata(alias="phoneNumber") - ] = pydantic.Field(default=None) - """ - This is the phone number associated with the call. - - This matches one of the following: - - - `call.phoneNumber`, - - `call.phoneNumberId`. - """ - - type: typing.Literal["transcript"] = pydantic.Field(default="transcript") + typing.Optional[ServerMessageTranscriptPhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: ServerMessageTranscriptType = pydantic.Field() """ This is the type of the message. "transcript" is sent as transcriber outputs partial or final transcript. """ - timestamp: typing.Optional[str] = pydantic.Field(default=None) + timestamp: typing.Optional[float] = pydantic.Field(default=None) """ - This is the ISO-8601 formatted timestamp of when the message was sent. + This is the timestamp of the message. """ artifact: typing.Optional[Artifact] = pydantic.Field(default=None) @@ -50,56 +44,64 @@ class ServerMessageTranscript(UniversalBaseModel): This matches what is stored on `call.artifact` after the call. """ - assistant: typing.Optional[CreateAssistantDto] = pydantic.Field(default=None) + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) """ - This is the assistant that is currently active. This is provided for convenience. - - This matches one of the following: - - - `call.assistant`, - - `call.assistantId`, - - `call.squad[n].assistant`, - - `call.squad[n].assistantId`, - - `call.squadId->[n].assistant`, - - `call.squadId->[n].assistantId`. + This is the assistant that the message is associated with. """ customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) """ - This is the customer associated with the call. - - This matches one of the following: - - - `call.customer`, - - `call.customerId`. + This is the customer that the message is associated with. """ call: typing.Optional[Call] = pydantic.Field(default=None) """ - This is the call object. - - This matches what was returned in POST /call. - - Note: This might get stale during the call. To get the latest call object, especially after the call is ended, use GET /call/:id. + This is the call that the message is associated with. """ - role: ServerMessageTranscriptRole = pydantic.Field() + chat: typing.Optional[Chat] = pydantic.Field(default=None) """ - This is the role for which the transcript is for. + This is the chat object. """ - transcript_type: typing_extensions.Annotated[ - ServerMessageTranscriptTranscriptType, FieldMetadata(alias="transcriptType") - ] = pydantic.Field() + role: ServerMessageTranscriptRole = pydantic.Field() """ - This is the type of the transcript. + This is the role for which the transcript is for. """ + transcript_type: typing_extensions.Annotated[ + ServerMessageTranscriptTranscriptType, + FieldMetadata(alias="transcriptType"), + pydantic.Field(alias="transcriptType", description="This is the type of the transcript."), + ] transcript: str = pydantic.Field() """ This is the transcript content. """ + is_filtered: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="isFiltered"), + pydantic.Field( + alias="isFiltered", description="Indicates if the transcript was filtered for security reasons." + ), + ] = None + detected_threats: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="detectedThreats"), + pydantic.Field( + alias="detectedThreats", description="List of detected security threats if the transcript was filtered." + ), + ] = None + original_transcript: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="originalTranscript"), + pydantic.Field( + alias="originalTranscript", + description="The original transcript before filtering (only included if content was filtered).", + ), + ] = None + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: @@ -110,6 +112,121 @@ class Config: extra = pydantic.Extra.allow -update_forward_refs(CallbackStep, ServerMessageTranscript=ServerMessageTranscript) -update_forward_refs(CreateWorkflowBlockDto, ServerMessageTranscript=ServerMessageTranscript) -update_forward_refs(HandoffStep, ServerMessageTranscript=ServerMessageTranscript) +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ServerMessageTranscript, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/server_message_transcript_phone_number.py b/src/vapi/types/server_message_transcript_phone_number.py index 9a610ac7..30b8d582 100644 --- a/src/vapi/types/server_message_transcript_phone_number.py +++ b/src/vapi/types/server_message_transcript_phone_number.py @@ -1,11 +1,247 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .create_byo_phone_number_dto import CreateByoPhoneNumberDto -from .create_twilio_phone_number_dto import CreateTwilioPhoneNumberDto -from .create_vonage_phone_number_dto import CreateVonagePhoneNumberDto -from .create_vapi_phone_number_dto import CreateVapiPhoneNumberDto -ServerMessageTranscriptPhoneNumber = typing.Union[ - CreateByoPhoneNumberDto, CreateTwilioPhoneNumberDto, CreateVonagePhoneNumberDto, CreateVapiPhoneNumberDto +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ServerMessageTranscriptPhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageTranscriptPhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageTranscriptPhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageTranscriptPhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageTranscriptPhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ServerMessageTranscriptPhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ServerMessageTranscriptPhoneNumber_ByoPhoneNumber, + ServerMessageTranscriptPhoneNumber_Twilio, + ServerMessageTranscriptPhoneNumber_Vonage, + ServerMessageTranscriptPhoneNumber_Vapi, + ServerMessageTranscriptPhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), ] diff --git a/src/vapi/types/server_message_transcript_type.py b/src/vapi/types/server_message_transcript_type.py new file mode 100644 index 00000000..977ac82e --- /dev/null +++ b/src/vapi/types/server_message_transcript_type.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ServerMessageTranscriptType = typing.Union[ + typing.Literal["transcript", 'transcript[transcriptType="final"]'], typing.Any +] diff --git a/src/vapi/types/server_message_transfer_destination_request.py b/src/vapi/types/server_message_transfer_destination_request.py index a1c0c4e2..7855a754 100644 --- a/src/vapi/types/server_message_transfer_destination_request.py +++ b/src/vapi/types/server_message_transfer_destination_request.py @@ -1,44 +1,38 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -from .callback_step import CallbackStep -from .create_workflow_block_dto import CreateWorkflowBlockDto -from .handoff_step import HandoffStep -import typing_extensions + import typing -from .server_message_transfer_destination_request_phone_number import ServerMessageTransferDestinationRequestPhoneNumber -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel from .artifact import Artifact -from .create_assistant_dto import CreateAssistantDto -from .create_customer_dto import CreateCustomerDto from .call import Call -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.pydantic_utilities import update_forward_refs +from .chat import Chat +from .create_customer_dto import CreateCustomerDto +from .server_message_transfer_destination_request_phone_number import ServerMessageTransferDestinationRequestPhoneNumber +from .server_message_transfer_destination_request_type import ServerMessageTransferDestinationRequestType -class ServerMessageTransferDestinationRequest(UniversalBaseModel): +class ServerMessageTransferDestinationRequest(UncheckedBaseModel): phone_number: typing_extensions.Annotated[ - typing.Optional[ServerMessageTransferDestinationRequestPhoneNumber], FieldMetadata(alias="phoneNumber") - ] = pydantic.Field(default=None) - """ - This is the phone number associated with the call. - - This matches one of the following: - - - `call.phoneNumber`, - - `call.phoneNumberId`. - """ - - type: typing.Literal["transfer-destination-request"] = pydantic.Field(default="transfer-destination-request") + typing.Optional[ServerMessageTransferDestinationRequestPhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: ServerMessageTransferDestinationRequestType = pydantic.Field() """ This is the type of the message. "transfer-destination-request" is sent when the model is requesting transfer but destination is unknown. """ - timestamp: typing.Optional[str] = pydantic.Field(default=None) + timestamp: typing.Optional[float] = pydantic.Field(default=None) """ - This is the ISO-8601 formatted timestamp of when the message was sent. + This is the timestamp of the message. """ artifact: typing.Optional[Artifact] = pydantic.Field(default=None) @@ -48,37 +42,24 @@ class ServerMessageTransferDestinationRequest(UniversalBaseModel): This matches what is stored on `call.artifact` after the call. """ - assistant: typing.Optional[CreateAssistantDto] = pydantic.Field(default=None) + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) """ - This is the assistant that is currently active. This is provided for convenience. - - This matches one of the following: - - - `call.assistant`, - - `call.assistantId`, - - `call.squad[n].assistant`, - - `call.squad[n].assistantId`, - - `call.squadId->[n].assistant`, - - `call.squadId->[n].assistantId`. + This is the assistant that the message is associated with. """ customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) """ - This is the customer associated with the call. - - This matches one of the following: - - - `call.customer`, - - `call.customerId`. + This is the customer that the message is associated with. """ call: typing.Optional[Call] = pydantic.Field(default=None) """ - This is the call object. - - This matches what was returned in POST /call. - - Note: This might get stale during the call. To get the latest call object, especially after the call is ended, use GET /call/:id. + This is the call that the message is associated with. + """ + + chat: typing.Optional[Chat] = pydantic.Field(default=None) + """ + This is the chat object. """ if IS_PYDANTIC_V2: @@ -91,8 +72,121 @@ class Config: extra = pydantic.Extra.allow -update_forward_refs(CallbackStep, ServerMessageTransferDestinationRequest=ServerMessageTransferDestinationRequest) +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + update_forward_refs( - CreateWorkflowBlockDto, ServerMessageTransferDestinationRequest=ServerMessageTransferDestinationRequest + ServerMessageTransferDestinationRequest, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, ) -update_forward_refs(HandoffStep, ServerMessageTransferDestinationRequest=ServerMessageTransferDestinationRequest) diff --git a/src/vapi/types/server_message_transfer_destination_request_phone_number.py b/src/vapi/types/server_message_transfer_destination_request_phone_number.py index 1b7cacdd..fd0cad1c 100644 --- a/src/vapi/types/server_message_transfer_destination_request_phone_number.py +++ b/src/vapi/types/server_message_transfer_destination_request_phone_number.py @@ -1,11 +1,247 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .create_byo_phone_number_dto import CreateByoPhoneNumberDto -from .create_twilio_phone_number_dto import CreateTwilioPhoneNumberDto -from .create_vonage_phone_number_dto import CreateVonagePhoneNumberDto -from .create_vapi_phone_number_dto import CreateVapiPhoneNumberDto -ServerMessageTransferDestinationRequestPhoneNumber = typing.Union[ - CreateByoPhoneNumberDto, CreateTwilioPhoneNumberDto, CreateVonagePhoneNumberDto, CreateVapiPhoneNumberDto +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ServerMessageTransferDestinationRequestPhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageTransferDestinationRequestPhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageTransferDestinationRequestPhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageTransferDestinationRequestPhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageTransferDestinationRequestPhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ServerMessageTransferDestinationRequestPhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ServerMessageTransferDestinationRequestPhoneNumber_ByoPhoneNumber, + ServerMessageTransferDestinationRequestPhoneNumber_Twilio, + ServerMessageTransferDestinationRequestPhoneNumber_Vonage, + ServerMessageTransferDestinationRequestPhoneNumber_Vapi, + ServerMessageTransferDestinationRequestPhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), ] diff --git a/src/vapi/types/server_message_transfer_destination_request_type.py b/src/vapi/types/server_message_transfer_destination_request_type.py new file mode 100644 index 00000000..17ef6ae9 --- /dev/null +++ b/src/vapi/types/server_message_transfer_destination_request_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ServerMessageTransferDestinationRequestType = typing.Union[typing.Literal["transfer-destination-request"], typing.Any] diff --git a/src/vapi/types/server_message_transfer_update.py b/src/vapi/types/server_message_transfer_update.py index 644c2145..02054251 100644 --- a/src/vapi/types/server_message_transfer_update.py +++ b/src/vapi/types/server_message_transfer_update.py @@ -1,38 +1,32 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -from .callback_step import CallbackStep -from .create_workflow_block_dto import CreateWorkflowBlockDto -from .handoff_step import HandoffStep -import typing_extensions + import typing -from .server_message_transfer_update_phone_number import ServerMessageTransferUpdatePhoneNumber -from ..core.serialization import FieldMetadata + import pydantic -from .server_message_transfer_update_destination import ServerMessageTransferUpdateDestination +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel from .artifact import Artifact -from .create_assistant_dto import CreateAssistantDto -from .create_customer_dto import CreateCustomerDto from .call import Call -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.pydantic_utilities import update_forward_refs +from .chat import Chat +from .create_customer_dto import CreateCustomerDto +from .server_message_transfer_update_destination import ServerMessageTransferUpdateDestination +from .server_message_transfer_update_phone_number import ServerMessageTransferUpdatePhoneNumber +from .server_message_transfer_update_type import ServerMessageTransferUpdateType -class ServerMessageTransferUpdate(UniversalBaseModel): +class ServerMessageTransferUpdate(UncheckedBaseModel): phone_number: typing_extensions.Annotated[ - typing.Optional[ServerMessageTransferUpdatePhoneNumber], FieldMetadata(alias="phoneNumber") - ] = pydantic.Field(default=None) - """ - This is the phone number associated with the call. - - This matches one of the following: - - - `call.phoneNumber`, - - `call.phoneNumberId`. - """ - - type: typing.Literal["transfer-update"] = pydantic.Field(default="transfer-update") + typing.Optional[ServerMessageTransferUpdatePhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: ServerMessageTransferUpdateType = pydantic.Field() """ This is the type of the message. "transfer-update" is sent whenever a transfer happens. """ @@ -42,9 +36,9 @@ class ServerMessageTransferUpdate(UniversalBaseModel): This is the destination of the transfer. """ - timestamp: typing.Optional[str] = pydantic.Field(default=None) + timestamp: typing.Optional[float] = pydantic.Field(default=None) """ - This is the ISO-8601 formatted timestamp of when the message was sent. + This is the timestamp of the message. """ artifact: typing.Optional[Artifact] = pydantic.Field(default=None) @@ -54,52 +48,52 @@ class ServerMessageTransferUpdate(UniversalBaseModel): This matches what is stored on `call.artifact` after the call. """ - assistant: typing.Optional[CreateAssistantDto] = pydantic.Field(default=None) + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) """ - This is the assistant that is currently active. This is provided for convenience. - - This matches one of the following: - - - `call.assistant`, - - `call.assistantId`, - - `call.squad[n].assistant`, - - `call.squad[n].assistantId`, - - `call.squadId->[n].assistant`, - - `call.squadId->[n].assistantId`. + This is the assistant that the message is associated with. """ customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) """ - This is the customer associated with the call. - - This matches one of the following: - - - `call.customer`, - - `call.customerId`. + This is the customer that the message is associated with. """ call: typing.Optional[Call] = pydantic.Field(default=None) """ - This is the call object. - - This matches what was returned in POST /call. - - Note: This might get stale during the call. To get the latest call object, especially after the call is ended, use GET /call/:id. + This is the call that the message is associated with. """ - to_assistant: typing_extensions.Annotated[ - typing.Optional[CreateAssistantDto], FieldMetadata(alias="toAssistant") - ] = pydantic.Field(default=None) + chat: typing.Optional[Chat] = pydantic.Field(default=None) """ - This is the assistant that the call is being transferred to. This is only sent if `destination.type` is "assistant". + This is the chat object. """ + to_assistant: typing_extensions.Annotated[ + typing.Optional["CreateAssistantDto"], + FieldMetadata(alias="toAssistant"), + pydantic.Field( + alias="toAssistant", + description='This is the assistant that the call is being transferred to. This is only sent if `destination.type` is "assistant".', + ), + ] = None from_assistant: typing_extensions.Annotated[ - typing.Optional[CreateAssistantDto], FieldMetadata(alias="fromAssistant") - ] = pydantic.Field(default=None) - """ - This is the assistant that the call is being transferred from. This is only sent if `destination.type` is "assistant". - """ + typing.Optional["CreateAssistantDto"], + FieldMetadata(alias="fromAssistant"), + pydantic.Field( + alias="fromAssistant", + description='This is the assistant that the call is being transferred from. This is only sent if `destination.type` is "assistant".', + ), + ] = None + to_step_record: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="toStepRecord"), + pydantic.Field(alias="toStepRecord", description="This is the step that the conversation moved to."), + ] = None + from_step_record: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="fromStepRecord"), + pydantic.Field(alias="fromStepRecord", description="This is the step that the conversation moved from. ="), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -111,6 +105,121 @@ class Config: extra = pydantic.Extra.allow -update_forward_refs(CallbackStep, ServerMessageTransferUpdate=ServerMessageTransferUpdate) -update_forward_refs(CreateWorkflowBlockDto, ServerMessageTransferUpdate=ServerMessageTransferUpdate) -update_forward_refs(HandoffStep, ServerMessageTransferUpdate=ServerMessageTransferUpdate) +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ServerMessageTransferUpdate, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/server_message_transfer_update_destination.py b/src/vapi/types/server_message_transfer_update_destination.py index 0e1f61c2..63a5713d 100644 --- a/src/vapi/types/server_message_transfer_update_destination.py +++ b/src/vapi/types/server_message_transfer_update_destination.py @@ -1,11 +1,114 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .transfer_destination_assistant import TransferDestinationAssistant -from .transfer_destination_step import TransferDestinationStep -from .transfer_destination_number import TransferDestinationNumber -from .transfer_destination_sip import TransferDestinationSip -ServerMessageTransferUpdateDestination = typing.Union[ - TransferDestinationAssistant, TransferDestinationStep, TransferDestinationNumber, TransferDestinationSip +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .transfer_destination_assistant_message import TransferDestinationAssistantMessage +from .transfer_destination_number_message import TransferDestinationNumberMessage +from .transfer_destination_sip_message import TransferDestinationSipMessage +from .transfer_mode import TransferMode +from .transfer_plan import TransferPlan + + +class ServerMessageTransferUpdateDestination_Assistant(UncheckedBaseModel): + """ + This is the destination of the transfer. + """ + + type: typing.Literal["assistant"] = "assistant" + message: typing.Optional[TransferDestinationAssistantMessage] = None + transfer_mode: typing_extensions.Annotated[ + typing.Optional[TransferMode], FieldMetadata(alias="transferMode"), pydantic.Field(alias="transferMode") + ] = None + assistant_name: typing_extensions.Annotated[ + str, FieldMetadata(alias="assistantName"), pydantic.Field(alias="assistantName") + ] + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageTransferUpdateDestination_Number(UncheckedBaseModel): + """ + This is the destination of the transfer. + """ + + type: typing.Literal["number"] = "number" + message: typing.Optional[TransferDestinationNumberMessage] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: str + extension: typing.Optional[str] = None + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageTransferUpdateDestination_Sip(UncheckedBaseModel): + """ + This is the destination of the transfer. + """ + + type: typing.Literal["sip"] = "sip" + message: typing.Optional[TransferDestinationSipMessage] = None + sip_uri: typing_extensions.Annotated[str, FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri")] + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + sip_headers: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="sipHeaders"), + pydantic.Field(alias="sipHeaders"), + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ServerMessageTransferUpdateDestination = typing_extensions.Annotated[ + typing.Union[ + ServerMessageTransferUpdateDestination_Assistant, + ServerMessageTransferUpdateDestination_Number, + ServerMessageTransferUpdateDestination_Sip, + ], + UnionMetadata(discriminant="type"), ] diff --git a/src/vapi/types/server_message_transfer_update_phone_number.py b/src/vapi/types/server_message_transfer_update_phone_number.py index 16e5f8d6..40a96f11 100644 --- a/src/vapi/types/server_message_transfer_update_phone_number.py +++ b/src/vapi/types/server_message_transfer_update_phone_number.py @@ -1,11 +1,247 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .create_byo_phone_number_dto import CreateByoPhoneNumberDto -from .create_twilio_phone_number_dto import CreateTwilioPhoneNumberDto -from .create_vonage_phone_number_dto import CreateVonagePhoneNumberDto -from .create_vapi_phone_number_dto import CreateVapiPhoneNumberDto -ServerMessageTransferUpdatePhoneNumber = typing.Union[ - CreateByoPhoneNumberDto, CreateTwilioPhoneNumberDto, CreateVonagePhoneNumberDto, CreateVapiPhoneNumberDto +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ServerMessageTransferUpdatePhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageTransferUpdatePhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageTransferUpdatePhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageTransferUpdatePhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageTransferUpdatePhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ServerMessageTransferUpdatePhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ServerMessageTransferUpdatePhoneNumber_ByoPhoneNumber, + ServerMessageTransferUpdatePhoneNumber_Twilio, + ServerMessageTransferUpdatePhoneNumber_Vonage, + ServerMessageTransferUpdatePhoneNumber_Vapi, + ServerMessageTransferUpdatePhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), ] diff --git a/src/vapi/types/server_message_transfer_update_type.py b/src/vapi/types/server_message_transfer_update_type.py new file mode 100644 index 00000000..d6772ccb --- /dev/null +++ b/src/vapi/types/server_message_transfer_update_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ServerMessageTransferUpdateType = typing.Union[typing.Literal["transfer-update"], typing.Any] diff --git a/src/vapi/types/server_message_user_interrupted.py b/src/vapi/types/server_message_user_interrupted.py index 146f4914..73aea41e 100644 --- a/src/vapi/types/server_message_user_interrupted.py +++ b/src/vapi/types/server_message_user_interrupted.py @@ -1,44 +1,46 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -from .callback_step import CallbackStep -from .create_workflow_block_dto import CreateWorkflowBlockDto -from .handoff_step import HandoffStep -import typing_extensions + import typing -from .server_message_user_interrupted_phone_number import ServerMessageUserInterruptedPhoneNumber -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel from .artifact import Artifact -from .create_assistant_dto import CreateAssistantDto -from .create_customer_dto import CreateCustomerDto from .call import Call -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.pydantic_utilities import update_forward_refs +from .chat import Chat +from .create_customer_dto import CreateCustomerDto +from .server_message_user_interrupted_phone_number import ServerMessageUserInterruptedPhoneNumber +from .server_message_user_interrupted_type import ServerMessageUserInterruptedType -class ServerMessageUserInterrupted(UniversalBaseModel): +class ServerMessageUserInterrupted(UncheckedBaseModel): phone_number: typing_extensions.Annotated[ - typing.Optional[ServerMessageUserInterruptedPhoneNumber], FieldMetadata(alias="phoneNumber") - ] = pydantic.Field(default=None) - """ - This is the phone number associated with the call. - - This matches one of the following: - - - `call.phoneNumber`, - - `call.phoneNumberId`. - """ - - type: typing.Literal["user-interrupted"] = pydantic.Field(default="user-interrupted") + typing.Optional[ServerMessageUserInterruptedPhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: ServerMessageUserInterruptedType = pydantic.Field() """ This is the type of the message. "user-interrupted" is sent when the user interrupts the assistant. """ - timestamp: typing.Optional[str] = pydantic.Field(default=None) + turn_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="turnId"), + pydantic.Field( + alias="turnId", + description="This is the turnId of the LLM response that was interrupted. Matches the turnId\non model-output messages so clients can discard the interrupted turn's tokens.", + ), + ] = None + timestamp: typing.Optional[float] = pydantic.Field(default=None) """ - This is the ISO-8601 formatted timestamp of when the message was sent. + This is the timestamp of the message. """ artifact: typing.Optional[Artifact] = pydantic.Field(default=None) @@ -48,37 +50,24 @@ class ServerMessageUserInterrupted(UniversalBaseModel): This matches what is stored on `call.artifact` after the call. """ - assistant: typing.Optional[CreateAssistantDto] = pydantic.Field(default=None) + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) """ - This is the assistant that is currently active. This is provided for convenience. - - This matches one of the following: - - - `call.assistant`, - - `call.assistantId`, - - `call.squad[n].assistant`, - - `call.squad[n].assistantId`, - - `call.squadId->[n].assistant`, - - `call.squadId->[n].assistantId`. + This is the assistant that the message is associated with. """ customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) """ - This is the customer associated with the call. - - This matches one of the following: - - - `call.customer`, - - `call.customerId`. + This is the customer that the message is associated with. """ call: typing.Optional[Call] = pydantic.Field(default=None) """ - This is the call object. - - This matches what was returned in POST /call. - - Note: This might get stale during the call. To get the latest call object, especially after the call is ended, use GET /call/:id. + This is the call that the message is associated with. + """ + + chat: typing.Optional[Chat] = pydantic.Field(default=None) + """ + This is the chat object. """ if IS_PYDANTIC_V2: @@ -91,6 +80,121 @@ class Config: extra = pydantic.Extra.allow -update_forward_refs(CallbackStep, ServerMessageUserInterrupted=ServerMessageUserInterrupted) -update_forward_refs(CreateWorkflowBlockDto, ServerMessageUserInterrupted=ServerMessageUserInterrupted) -update_forward_refs(HandoffStep, ServerMessageUserInterrupted=ServerMessageUserInterrupted) +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ServerMessageUserInterrupted, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/server_message_user_interrupted_phone_number.py b/src/vapi/types/server_message_user_interrupted_phone_number.py index 58bbd6bc..561999ca 100644 --- a/src/vapi/types/server_message_user_interrupted_phone_number.py +++ b/src/vapi/types/server_message_user_interrupted_phone_number.py @@ -1,11 +1,247 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .create_byo_phone_number_dto import CreateByoPhoneNumberDto -from .create_twilio_phone_number_dto import CreateTwilioPhoneNumberDto -from .create_vonage_phone_number_dto import CreateVonagePhoneNumberDto -from .create_vapi_phone_number_dto import CreateVapiPhoneNumberDto -ServerMessageUserInterruptedPhoneNumber = typing.Union[ - CreateByoPhoneNumberDto, CreateTwilioPhoneNumberDto, CreateVonagePhoneNumberDto, CreateVapiPhoneNumberDto +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ServerMessageUserInterruptedPhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageUserInterruptedPhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageUserInterruptedPhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageUserInterruptedPhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageUserInterruptedPhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ServerMessageUserInterruptedPhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ServerMessageUserInterruptedPhoneNumber_ByoPhoneNumber, + ServerMessageUserInterruptedPhoneNumber_Twilio, + ServerMessageUserInterruptedPhoneNumber_Vonage, + ServerMessageUserInterruptedPhoneNumber_Vapi, + ServerMessageUserInterruptedPhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), ] diff --git a/src/vapi/types/server_message_user_interrupted_type.py b/src/vapi/types/server_message_user_interrupted_type.py new file mode 100644 index 00000000..3fc6408a --- /dev/null +++ b/src/vapi/types/server_message_user_interrupted_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ServerMessageUserInterruptedType = typing.Union[typing.Literal["user-interrupted"], typing.Any] diff --git a/src/vapi/types/server_message_voice_input.py b/src/vapi/types/server_message_voice_input.py index c767c926..bbfc264a 100644 --- a/src/vapi/types/server_message_voice_input.py +++ b/src/vapi/types/server_message_voice_input.py @@ -1,44 +1,38 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -from .callback_step import CallbackStep -from .create_workflow_block_dto import CreateWorkflowBlockDto -from .handoff_step import HandoffStep -import typing_extensions + import typing -from .server_message_voice_input_phone_number import ServerMessageVoiceInputPhoneNumber -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel from .artifact import Artifact -from .create_assistant_dto import CreateAssistantDto -from .create_customer_dto import CreateCustomerDto from .call import Call -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.pydantic_utilities import update_forward_refs +from .chat import Chat +from .create_customer_dto import CreateCustomerDto +from .server_message_voice_input_phone_number import ServerMessageVoiceInputPhoneNumber +from .server_message_voice_input_type import ServerMessageVoiceInputType -class ServerMessageVoiceInput(UniversalBaseModel): +class ServerMessageVoiceInput(UncheckedBaseModel): phone_number: typing_extensions.Annotated[ - typing.Optional[ServerMessageVoiceInputPhoneNumber], FieldMetadata(alias="phoneNumber") - ] = pydantic.Field(default=None) - """ - This is the phone number associated with the call. - - This matches one of the following: - - - `call.phoneNumber`, - - `call.phoneNumberId`. - """ - - type: typing.Literal["voice-input"] = pydantic.Field(default="voice-input") + typing.Optional[ServerMessageVoiceInputPhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: ServerMessageVoiceInputType = pydantic.Field() """ This is the type of the message. "voice-input" is sent when a generation is requested from voice provider. """ - timestamp: typing.Optional[str] = pydantic.Field(default=None) + timestamp: typing.Optional[float] = pydantic.Field(default=None) """ - This is the ISO-8601 formatted timestamp of when the message was sent. + This is the timestamp of the message. """ artifact: typing.Optional[Artifact] = pydantic.Field(default=None) @@ -48,37 +42,24 @@ class ServerMessageVoiceInput(UniversalBaseModel): This matches what is stored on `call.artifact` after the call. """ - assistant: typing.Optional[CreateAssistantDto] = pydantic.Field(default=None) + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) """ - This is the assistant that is currently active. This is provided for convenience. - - This matches one of the following: - - - `call.assistant`, - - `call.assistantId`, - - `call.squad[n].assistant`, - - `call.squad[n].assistantId`, - - `call.squadId->[n].assistant`, - - `call.squadId->[n].assistantId`. + This is the assistant that the message is associated with. """ customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) """ - This is the customer associated with the call. - - This matches one of the following: - - - `call.customer`, - - `call.customerId`. + This is the customer that the message is associated with. """ call: typing.Optional[Call] = pydantic.Field(default=None) """ - This is the call object. - - This matches what was returned in POST /call. - - Note: This might get stale during the call. To get the latest call object, especially after the call is ended, use GET /call/:id. + This is the call that the message is associated with. + """ + + chat: typing.Optional[Chat] = pydantic.Field(default=None) + """ + This is the chat object. """ input: str = pydantic.Field() @@ -96,6 +77,121 @@ class Config: extra = pydantic.Extra.allow -update_forward_refs(CallbackStep, ServerMessageVoiceInput=ServerMessageVoiceInput) -update_forward_refs(CreateWorkflowBlockDto, ServerMessageVoiceInput=ServerMessageVoiceInput) -update_forward_refs(HandoffStep, ServerMessageVoiceInput=ServerMessageVoiceInput) +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ServerMessageVoiceInput, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/server_message_voice_input_phone_number.py b/src/vapi/types/server_message_voice_input_phone_number.py index b3d56367..e515f6f1 100644 --- a/src/vapi/types/server_message_voice_input_phone_number.py +++ b/src/vapi/types/server_message_voice_input_phone_number.py @@ -1,11 +1,247 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .create_byo_phone_number_dto import CreateByoPhoneNumberDto -from .create_twilio_phone_number_dto import CreateTwilioPhoneNumberDto -from .create_vonage_phone_number_dto import CreateVonagePhoneNumberDto -from .create_vapi_phone_number_dto import CreateVapiPhoneNumberDto -ServerMessageVoiceInputPhoneNumber = typing.Union[ - CreateByoPhoneNumberDto, CreateTwilioPhoneNumberDto, CreateVonagePhoneNumberDto, CreateVapiPhoneNumberDto +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ServerMessageVoiceInputPhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageVoiceInputPhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageVoiceInputPhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageVoiceInputPhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageVoiceInputPhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ServerMessageVoiceInputPhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ServerMessageVoiceInputPhoneNumber_ByoPhoneNumber, + ServerMessageVoiceInputPhoneNumber_Twilio, + ServerMessageVoiceInputPhoneNumber_Vonage, + ServerMessageVoiceInputPhoneNumber_Vapi, + ServerMessageVoiceInputPhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), ] diff --git a/src/vapi/types/server_message_voice_input_type.py b/src/vapi/types/server_message_voice_input_type.py new file mode 100644 index 00000000..465cd717 --- /dev/null +++ b/src/vapi/types/server_message_voice_input_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ServerMessageVoiceInputType = typing.Union[typing.Literal["voice-input"], typing.Any] diff --git a/src/vapi/types/server_message_voice_request.py b/src/vapi/types/server_message_voice_request.py index 5edecb4d..a14e5e0b 100644 --- a/src/vapi/types/server_message_voice_request.py +++ b/src/vapi/types/server_message_voice_request.py @@ -1,37 +1,31 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -from .callback_step import CallbackStep -from .create_workflow_block_dto import CreateWorkflowBlockDto -from .handoff_step import HandoffStep -import typing_extensions + import typing -from .server_message_voice_request_phone_number import ServerMessageVoiceRequestPhoneNumber -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel from .artifact import Artifact -from .create_assistant_dto import CreateAssistantDto -from .create_customer_dto import CreateCustomerDto from .call import Call -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.pydantic_utilities import update_forward_refs +from .chat import Chat +from .create_customer_dto import CreateCustomerDto +from .server_message_voice_request_phone_number import ServerMessageVoiceRequestPhoneNumber +from .server_message_voice_request_type import ServerMessageVoiceRequestType -class ServerMessageVoiceRequest(UniversalBaseModel): +class ServerMessageVoiceRequest(UncheckedBaseModel): phone_number: typing_extensions.Annotated[ - typing.Optional[ServerMessageVoiceRequestPhoneNumber], FieldMetadata(alias="phoneNumber") - ] = pydantic.Field(default=None) - """ - This is the phone number associated with the call. - - This matches one of the following: - - - `call.phoneNumber`, - - `call.phoneNumberId`. - """ - - type: typing.Literal["voice-request"] = pydantic.Field(default="voice-request") + typing.Optional[ServerMessageVoiceRequestPhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", description="This is the phone number that the message is associated with." + ), + ] = None + type: ServerMessageVoiceRequestType = pydantic.Field() """ This is the type of the message. "voice-request" is sent when using `assistant.voice={ "type": "custom-voice" }`. @@ -41,16 +35,15 @@ class ServerMessageVoiceRequest(UniversalBaseModel): Content-Type: application/json { - "messsage": { - "type": "voice-request", - "text": "Hello, world!", - "sampleRate": 24000, - ...other metadata about the call... - } + "messsage": { + "type": "voice-request", + "text": "Hello, world!", + "sampleRate": 24000, + ...other metadata about the call... + } } The expected response is 1-channel 16-bit raw PCM audio at the sample rate specified in the request. Here is how the response will be piped to the transport: - ``` response.on('data', (chunk: Buffer) => { outputStream.write(chunk); @@ -58,9 +51,9 @@ class ServerMessageVoiceRequest(UniversalBaseModel): ``` """ - timestamp: typing.Optional[str] = pydantic.Field(default=None) + timestamp: typing.Optional[float] = pydantic.Field(default=None) """ - This is the ISO-8601 formatted timestamp of when the message was sent. + This is the timestamp of the message. """ artifact: typing.Optional[Artifact] = pydantic.Field(default=None) @@ -70,49 +63,37 @@ class ServerMessageVoiceRequest(UniversalBaseModel): This matches what is stored on `call.artifact` after the call. """ - assistant: typing.Optional[CreateAssistantDto] = pydantic.Field(default=None) + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) """ - This is the assistant that is currently active. This is provided for convenience. - - This matches one of the following: - - - `call.assistant`, - - `call.assistantId`, - - `call.squad[n].assistant`, - - `call.squad[n].assistantId`, - - `call.squadId->[n].assistant`, - - `call.squadId->[n].assistantId`. + This is the assistant that the message is associated with. """ customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) """ - This is the customer associated with the call. - - This matches one of the following: - - - `call.customer`, - - `call.customerId`. + This is the customer that the message is associated with. """ call: typing.Optional[Call] = pydantic.Field(default=None) """ - This is the call object. - - This matches what was returned in POST /call. - - Note: This might get stale during the call. To get the latest call object, especially after the call is ended, use GET /call/:id. + This is the call that the message is associated with. """ - text: str = pydantic.Field() + chat: typing.Optional[Chat] = pydantic.Field(default=None) """ - This is the text to be synthesized. + This is the chat object. """ - sample_rate: typing_extensions.Annotated[float, FieldMetadata(alias="sampleRate")] = pydantic.Field() + text: str = pydantic.Field() """ - This is the sample rate to be synthesized. + This is the text to be synthesized. """ + sample_rate: typing_extensions.Annotated[ + float, + FieldMetadata(alias="sampleRate"), + pydantic.Field(alias="sampleRate", description="This is the sample rate to be synthesized."), + ] + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: @@ -123,6 +104,121 @@ class Config: extra = pydantic.Extra.allow -update_forward_refs(CallbackStep, ServerMessageVoiceRequest=ServerMessageVoiceRequest) -update_forward_refs(CreateWorkflowBlockDto, ServerMessageVoiceRequest=ServerMessageVoiceRequest) -update_forward_refs(HandoffStep, ServerMessageVoiceRequest=ServerMessageVoiceRequest) +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ServerMessageVoiceRequest, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/server_message_voice_request_phone_number.py b/src/vapi/types/server_message_voice_request_phone_number.py index 4ab79b2e..b2c05af0 100644 --- a/src/vapi/types/server_message_voice_request_phone_number.py +++ b/src/vapi/types/server_message_voice_request_phone_number.py @@ -1,11 +1,247 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .create_byo_phone_number_dto import CreateByoPhoneNumberDto -from .create_twilio_phone_number_dto import CreateTwilioPhoneNumberDto -from .create_vonage_phone_number_dto import CreateVonagePhoneNumberDto -from .create_vapi_phone_number_dto import CreateVapiPhoneNumberDto -ServerMessageVoiceRequestPhoneNumber = typing.Union[ - CreateByoPhoneNumberDto, CreateTwilioPhoneNumberDto, CreateVonagePhoneNumberDto, CreateVapiPhoneNumberDto +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_byo_phone_number_dto_fallback_destination import CreateByoPhoneNumberDtoFallbackDestination +from .create_byo_phone_number_dto_hooks_item import CreateByoPhoneNumberDtoHooksItem +from .create_telnyx_phone_number_dto_fallback_destination import CreateTelnyxPhoneNumberDtoFallbackDestination +from .create_telnyx_phone_number_dto_hooks_item import CreateTelnyxPhoneNumberDtoHooksItem +from .create_twilio_phone_number_dto_fallback_destination import CreateTwilioPhoneNumberDtoFallbackDestination +from .create_twilio_phone_number_dto_hooks_item import CreateTwilioPhoneNumberDtoHooksItem +from .create_vapi_phone_number_dto_fallback_destination import CreateVapiPhoneNumberDtoFallbackDestination +from .create_vapi_phone_number_dto_hooks_item import CreateVapiPhoneNumberDtoHooksItem +from .create_vonage_phone_number_dto_fallback_destination import CreateVonagePhoneNumberDtoFallbackDestination +from .create_vonage_phone_number_dto_hooks_item import CreateVonagePhoneNumberDtoHooksItem +from .server import Server +from .sip_authentication import SipAuthentication + + +class ServerMessageVoiceRequestPhoneNumber_ByoPhoneNumber(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["byo-phone-number"] = "byo-phone-number" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateByoPhoneNumberDtoHooksItem]] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: typing.Optional[str] = None + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageVoiceRequestPhoneNumber_Twilio(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["twilio"] = "twilio" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTwilioPhoneNumberDtoHooksItem]] = None + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smsEnabled"), pydantic.Field(alias="smsEnabled") + ] = None + number: str + twilio_account_sid: typing_extensions.Annotated[ + str, FieldMetadata(alias="twilioAccountSid"), pydantic.Field(alias="twilioAccountSid") + ] + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioAuthToken"), pydantic.Field(alias="twilioAuthToken") + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiKey"), pydantic.Field(alias="twilioApiKey") + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="twilioApiSecret"), pydantic.Field(alias="twilioApiSecret") + ] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageVoiceRequestPhoneNumber_Vonage(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vonage"] = "vonage" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVonagePhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageVoiceRequestPhoneNumber_Vapi(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["vapi"] = "vapi" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateVapiPhoneNumberDtoHooksItem]] = None + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field(alias="numberDesiredAreaCode"), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri") + ] = None + authentication: typing.Optional[SipAuthentication] = None + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ServerMessageVoiceRequestPhoneNumber_Telnyx(UncheckedBaseModel): + """ + This is the phone number that the message is associated with. + """ + + provider: typing.Literal["telnyx"] = "telnyx" + fallback_destination: typing_extensions.Annotated[ + typing.Optional[CreateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field(alias="fallbackDestination"), + ] = None + hooks: typing.Optional[typing.List[CreateTelnyxPhoneNumberDtoHooksItem]] = None + number: str + credential_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] + name: typing.Optional[str] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + server: typing.Optional[Server] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ServerMessageVoiceRequestPhoneNumber = typing_extensions.Annotated[ + typing.Union[ + ServerMessageVoiceRequestPhoneNumber_ByoPhoneNumber, + ServerMessageVoiceRequestPhoneNumber_Twilio, + ServerMessageVoiceRequestPhoneNumber_Vonage, + ServerMessageVoiceRequestPhoneNumber_Vapi, + ServerMessageVoiceRequestPhoneNumber_Telnyx, + ], + UnionMetadata(discriminant="provider"), ] diff --git a/src/vapi/types/server_message_voice_request_type.py b/src/vapi/types/server_message_voice_request_type.py new file mode 100644 index 00000000..9033155d --- /dev/null +++ b/src/vapi/types/server_message_voice_request_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ServerMessageVoiceRequestType = typing.Union[typing.Literal["voice-request"], typing.Any] diff --git a/src/vapi/types/sesame_voice.py b/src/vapi/types/sesame_voice.py new file mode 100644 index 00000000..aa7b6981 --- /dev/null +++ b/src/vapi/types/sesame_voice.py @@ -0,0 +1,57 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .chunk_plan import ChunkPlan +from .fallback_plan import FallbackPlan +from .sesame_voice_model import SesameVoiceModel + + +class SesameVoice(UncheckedBaseModel): + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="cachingEnabled"), + pydantic.Field( + alias="cachingEnabled", description="This is the flag to toggle voice caching for the assistant." + ), + ] = None + voice_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="voiceId"), + pydantic.Field(alias="voiceId", description="This is the provider-specific ID that will be used."), + ] + model: SesameVoiceModel = pydantic.Field() + """ + This is the model that will be used. + """ + + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], + FieldMetadata(alias="chunkPlan"), + pydantic.Field( + alias="chunkPlan", + description="This is the plan for chunking the model output before it is sent to the voice provider.", + ), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field( + alias="fallbackPlan", + description="This is the plan for voice provider fallbacks in the event that the primary voice provider fails.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/sesame_voice_model.py b/src/vapi/types/sesame_voice_model.py new file mode 100644 index 00000000..e5e960b4 --- /dev/null +++ b/src/vapi/types/sesame_voice_model.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +SesameVoiceModel = typing.Union[typing.Literal["csm-1b"], typing.Any] diff --git a/src/vapi/types/session.py b/src/vapi/types/session.py new file mode 100644 index 00000000..a4856475 --- /dev/null +++ b/src/vapi/types/session.py @@ -0,0 +1,278 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .artifact import Artifact +from .create_customer_dto import CreateCustomerDto +from .import_twilio_phone_number_dto import ImportTwilioPhoneNumberDto +from .session_costs_item import SessionCostsItem +from .session_messages_item import SessionMessagesItem +from .session_status import SessionStatus + + +class Session(UncheckedBaseModel): + id: str = pydantic.Field() + """ + This is the unique identifier for the session. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the organization that owns this session." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 timestamp indicating when the session was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 timestamp indicating when the session was last updated.", + ), + ] + cost: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the cost of the session in USD. + """ + + costs: typing.Optional[typing.List[SessionCostsItem]] = pydantic.Field(default=None) + """ + These are the costs of individual components of the session in USD. + """ + + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is a user-defined name for the session. Maximum length is 40 characters. + """ + + status: typing.Optional[SessionStatus] = pydantic.Field(default=None) + """ + This is the current status of the session. Can be either 'active' or 'completed'. + """ + + expiration_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="expirationSeconds"), + pydantic.Field( + alias="expirationSeconds", + description="Session expiration time in seconds. Defaults to 24 hours (86400 seconds) if not set.", + ), + ] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assistantId"), + pydantic.Field( + alias="assistantId", + description="This is the ID of the assistant associated with this session. Use this when referencing an existing assistant.", + ), + ] = None + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) + """ + This is the assistant configuration for this session. Use this when creating a new assistant configuration. + If assistantId is provided, this will be ignored. + """ + + assistant_overrides: typing_extensions.Annotated[ + typing.Optional["AssistantOverrides"], + FieldMetadata(alias="assistantOverrides"), + pydantic.Field( + alias="assistantOverrides", + description="These are the overrides for the assistant configuration.\nUse this to provide variable values and other overrides when using assistantId.\nVariable substitution will be applied to the assistant's messages and other text-based fields.", + ), + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="squadId"), + pydantic.Field( + alias="squadId", + description="This is the squad ID associated with this session. Use this when referencing an existing squad.", + ), + ] = None + squad: typing.Optional["CreateSquadDto"] = pydantic.Field(default=None) + """ + This is the squad configuration for this session. Use this when creating a new squad configuration. + If squadId is provided, this will be ignored. + """ + + messages: typing.Optional[typing.List[SessionMessagesItem]] = pydantic.Field(default=None) + """ + This is an array of chat messages in the session. + """ + + customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) + """ + This is the customer information associated with this session. + """ + + customer_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="customerId"), + pydantic.Field( + alias="customerId", description="This is the customerId of the customer associated with this session." + ), + ] = None + phone_number_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="phoneNumberId"), + pydantic.Field( + alias="phoneNumberId", description="This is the ID of the phone number associated with this session." + ), + ] = None + phone_number: typing_extensions.Annotated[ + typing.Optional[ImportTwilioPhoneNumberDto], + FieldMetadata(alias="phoneNumber"), + pydantic.Field(alias="phoneNumber", description="This is the phone number configuration for this session."), + ] = None + artifact: typing.Optional[Artifact] = pydantic.Field(default=None) + """ + These are the artifacts that were extracted from the session messages. + They are only available after the session has completed. + The artifact plan from the assistant or active assistant of squad is used to generate the artifact. + Currently the only supported fields of assistant artifact plan are: + - structuredOutputIds + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + Session, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/session_cost.py b/src/vapi/types/session_cost.py new file mode 100644 index 00000000..bd798b2b --- /dev/null +++ b/src/vapi/types/session_cost.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class SessionCost(UncheckedBaseModel): + cost: float = pydantic.Field() + """ + This is the cost of the component in USD. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/session_costs_item.py b/src/vapi/types/session_costs_item.py new file mode 100644 index 00000000..0a8d65a5 --- /dev/null +++ b/src/vapi/types/session_costs_item.py @@ -0,0 +1,83 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .analysis_cost_analysis_type import AnalysisCostAnalysisType + + +class SessionCostsItem_Model(UncheckedBaseModel): + type: typing.Literal["model"] = "model" + model: typing.Dict[str, typing.Any] + prompt_tokens: typing_extensions.Annotated[ + float, FieldMetadata(alias="promptTokens"), pydantic.Field(alias="promptTokens") + ] + completion_tokens: typing_extensions.Annotated[ + float, FieldMetadata(alias="completionTokens"), pydantic.Field(alias="completionTokens") + ] + cached_prompt_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="cachedPromptTokens"), pydantic.Field(alias="cachedPromptTokens") + ] = None + cost: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class SessionCostsItem_Analysis(UncheckedBaseModel): + type: typing.Literal["analysis"] = "analysis" + analysis_type: typing_extensions.Annotated[ + AnalysisCostAnalysisType, FieldMetadata(alias="analysisType"), pydantic.Field(alias="analysisType") + ] + model: typing.Dict[str, typing.Any] + prompt_tokens: typing_extensions.Annotated[ + float, FieldMetadata(alias="promptTokens"), pydantic.Field(alias="promptTokens") + ] + completion_tokens: typing_extensions.Annotated[ + float, FieldMetadata(alias="completionTokens"), pydantic.Field(alias="completionTokens") + ] + cached_prompt_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="cachedPromptTokens"), pydantic.Field(alias="cachedPromptTokens") + ] = None + cost: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class SessionCostsItem_Session(UncheckedBaseModel): + type: typing.Literal["session"] = "session" + cost: float + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +SessionCostsItem = typing_extensions.Annotated[ + typing.Union[SessionCostsItem_Model, SessionCostsItem_Analysis, SessionCostsItem_Session], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/session_created_hook.py b/src/vapi/types/session_created_hook.py new file mode 100644 index 00000000..b4f309bd --- /dev/null +++ b/src/vapi/types/session_created_hook.py @@ -0,0 +1,157 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .session_created_hook_on import SessionCreatedHookOn + + +class SessionCreatedHook(UncheckedBaseModel): + on: SessionCreatedHookOn = pydantic.Field() + """ + This is the event that triggers this hook + """ + + do: typing.List["ToolCallHookAction"] = pydantic.Field() + """ + This is the set of actions to perform when the hook triggers. + """ + + name: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional name for this hook instance. + If no name is provided, the hook will be auto generated as UUID. + + @default UUID + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + SessionCreatedHook, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/session_created_hook_on.py b/src/vapi/types/session_created_hook_on.py new file mode 100644 index 00000000..d19af37c --- /dev/null +++ b/src/vapi/types/session_created_hook_on.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +SessionCreatedHookOn = typing.Union[typing.Literal["session.created"], typing.Any] diff --git a/src/vapi/types/session_messages_item.py b/src/vapi/types/session_messages_item.py new file mode 100644 index 00000000..abc2c470 --- /dev/null +++ b/src/vapi/types/session_messages_item.py @@ -0,0 +1,11 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .assistant_message import AssistantMessage +from .developer_message import DeveloperMessage +from .system_message import SystemMessage +from .tool_message import ToolMessage +from .user_message import UserMessage + +SessionMessagesItem = typing.Union[SystemMessage, UserMessage, AssistantMessage, ToolMessage, DeveloperMessage] diff --git a/src/vapi/types/session_paginated_response.py b/src/vapi/types/session_paginated_response.py new file mode 100644 index 00000000..594e9f21 --- /dev/null +++ b/src/vapi/types/session_paginated_response.py @@ -0,0 +1,28 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .pagination_meta import PaginationMeta +from .session import Session + + +class SessionPaginatedResponse(UncheckedBaseModel): + results: typing.List[Session] + metadata: PaginationMeta + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(SessionPaginatedResponse) diff --git a/src/vapi/types/session_status.py b/src/vapi/types/session_status.py new file mode 100644 index 00000000..cff82924 --- /dev/null +++ b/src/vapi/types/session_status.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +SessionStatus = typing.Union[typing.Literal["active", "completed"], typing.Any] diff --git a/src/vapi/types/simulation.py b/src/vapi/types/simulation.py new file mode 100644 index 00000000..d5689888 --- /dev/null +++ b/src/vapi/types/simulation.py @@ -0,0 +1,72 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class Simulation(UncheckedBaseModel): + id: str = pydantic.Field() + """ + This is the unique identifier for the simulation. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the organization this simulation belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the simulation was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the simulation was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is an optional friendly name for the simulation. + """ + + scenario_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="scenarioId"), + pydantic.Field(alias="scenarioId", description="This is the ID of the scenario to use for this simulation."), + ] + personality_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="personalityId"), + pydantic.Field( + alias="personalityId", description="This is the ID of the personality to use for this simulation." + ), + ] + path: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional folder path for organizing simulations. + Supports up to 3 levels (e.g., "dept/feature/variant"). + Maps to GitOps resource folder structure. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/simulation_concurrency_response.py b/src/vapi/types/simulation_concurrency_response.py new file mode 100644 index 00000000..c64f8a3d --- /dev/null +++ b/src/vapi/types/simulation_concurrency_response.py @@ -0,0 +1,57 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class SimulationConcurrencyResponse(UncheckedBaseModel): + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + concurrency_limit: typing_extensions.Annotated[ + float, + FieldMetadata(alias="concurrencyLimit"), + pydantic.Field( + alias="concurrencyLimit", + description="Max call slots for simulations (each voice simulation uses 2 call slots: tester + target)", + ), + ] + active_simulations: typing_extensions.Annotated[ + float, + FieldMetadata(alias="activeSimulations"), + pydantic.Field( + alias="activeSimulations", description="Number of call slots currently in use by running simulations" + ), + ] + available_to_start: typing_extensions.Annotated[ + float, + FieldMetadata(alias="availableToStart"), + pydantic.Field( + alias="availableToStart", + description="Number of voice simulations that can start now (available call slots / 2)", + ), + ] + created_at: typing_extensions.Annotated[ + typing.Optional[dt.datetime], FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] = None + updated_at: typing_extensions.Annotated[ + typing.Optional[dt.datetime], FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] = None + is_default: typing_extensions.Annotated[ + bool, + FieldMetadata(alias="isDefault"), + pydantic.Field(alias="isDefault", description="True if org is using platform default concurrency limit"), + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/simulation_hook_call_ended.py b/src/vapi/types/simulation_hook_call_ended.py new file mode 100644 index 00000000..2bc9b582 --- /dev/null +++ b/src/vapi/types/simulation_hook_call_ended.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .simulation_hook_webhook_action import SimulationHookWebhookAction + + +class SimulationHookCallEnded(UncheckedBaseModel): + do: typing.List[SimulationHookWebhookAction] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/simulation_hook_call_started.py b/src/vapi/types/simulation_hook_call_started.py new file mode 100644 index 00000000..e880a329 --- /dev/null +++ b/src/vapi/types/simulation_hook_call_started.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .simulation_hook_webhook_action import SimulationHookWebhookAction + + +class SimulationHookCallStarted(UncheckedBaseModel): + do: typing.List[SimulationHookWebhookAction] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/simulation_hook_include.py b/src/vapi/types/simulation_hook_include.py new file mode 100644 index 00000000..0b4d3719 --- /dev/null +++ b/src/vapi/types/simulation_hook_include.py @@ -0,0 +1,36 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class SimulationHookInclude(UncheckedBaseModel): + transcript: typing.Optional[bool] = pydantic.Field(default=None) + """ + Include transcript in the hook payload + """ + + messages: typing.Optional[bool] = pydantic.Field(default=None) + """ + Include messages in the hook payload + """ + + recording_url: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="recordingUrl"), + pydantic.Field(alias="recordingUrl", description="Include recordingUrl in the hook payload"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/simulation_hook_webhook_action.py b/src/vapi/types/simulation_hook_webhook_action.py new file mode 100644 index 00000000..1a7bdb72 --- /dev/null +++ b/src/vapi/types/simulation_hook_webhook_action.py @@ -0,0 +1,33 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .server import Server +from .simulation_hook_include import SimulationHookInclude +from .simulation_hook_webhook_action_type import SimulationHookWebhookActionType + + +class SimulationHookWebhookAction(UncheckedBaseModel): + type: SimulationHookWebhookActionType + server: typing.Optional[Server] = pydantic.Field(default=None) + """ + Optional server override for this hook action. + If omitted, runtime defaults may apply (e.g. org server). + """ + + include: typing.Optional[SimulationHookInclude] = pydantic.Field(default=None) + """ + Optional payload include controls. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/simulation_hook_webhook_action_type.py b/src/vapi/types/simulation_hook_webhook_action_type.py new file mode 100644 index 00000000..3ce94d34 --- /dev/null +++ b/src/vapi/types/simulation_hook_webhook_action_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +SimulationHookWebhookActionType = typing.Union[typing.Literal["webhook"], typing.Any] diff --git a/src/vapi/types/simulation_run.py b/src/vapi/types/simulation_run.py new file mode 100644 index 00000000..024e11fb --- /dev/null +++ b/src/vapi/types/simulation_run.py @@ -0,0 +1,99 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .simulation_run_item_counts import SimulationRunItemCounts +from .simulation_run_simulations_item import SimulationRunSimulationsItem +from .simulation_run_status import SimulationRunStatus +from .simulation_run_target import SimulationRunTarget +from .simulation_run_transport_configuration import SimulationRunTransportConfiguration + + +class SimulationRun(UncheckedBaseModel): + id: str = pydantic.Field() + """ + Unique identifier for the run + """ + + org_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId", description="Organization ID") + ] + status: SimulationRunStatus = pydantic.Field() + """ + Current status of the run + """ + + queued_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="queuedAt"), + pydantic.Field(alias="queuedAt", description="When the run was queued"), + ] + started_at: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="startedAt"), + pydantic.Field(alias="startedAt", description="When the run started"), + ] = None + ended_at: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="endedAt"), + pydantic.Field(alias="endedAt", description="When the run ended"), + ] = None + ended_reason: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="endedReason"), + pydantic.Field(alias="endedReason", description="Reason the run ended"), + ] = None + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field(alias="createdAt", description="ISO 8601 date-time when created"), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field(alias="updatedAt", description="ISO 8601 date-time when last updated"), + ] + item_counts: typing_extensions.Annotated[ + typing.Optional[SimulationRunItemCounts], + FieldMetadata(alias="itemCounts"), + pydantic.Field(alias="itemCounts", description="Aggregate counts of run items by status"), + ] = None + simulations: typing.List[SimulationRunSimulationsItem] = pydantic.Field() + """ + Array of simulations and/or suites to run + """ + + target: SimulationRunTarget = pydantic.Field() + """ + Target to test against + """ + + iterations: typing.Optional[float] = pydantic.Field(default=None) + """ + Number of times to run each simulation (default: 1) + """ + + transport: typing.Optional[SimulationRunTransportConfiguration] = pydantic.Field(default=None) + """ + Transport configuration for the simulation runs + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(SimulationRun) diff --git a/src/vapi/types/simulation_run_configuration.py b/src/vapi/types/simulation_run_configuration.py new file mode 100644 index 00000000..3f120ac2 --- /dev/null +++ b/src/vapi/types/simulation_run_configuration.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .simulation_run_transport_configuration import SimulationRunTransportConfiguration + + +class SimulationRunConfiguration(UncheckedBaseModel): + transport: typing.Optional[SimulationRunTransportConfiguration] = pydantic.Field(default=None) + """ + Transport configuration for the simulation run + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/simulation_run_item.py b/src/vapi/types/simulation_run_item.py new file mode 100644 index 00000000..02b3147e --- /dev/null +++ b/src/vapi/types/simulation_run_item.py @@ -0,0 +1,163 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .simulation_run_configuration import SimulationRunConfiguration +from .simulation_run_item_hooks_item import SimulationRunItemHooksItem +from .simulation_run_item_improvements import SimulationRunItemImprovements +from .simulation_run_item_metadata import SimulationRunItemMetadata +from .simulation_run_item_results import SimulationRunItemResults +from .simulation_run_item_status import SimulationRunItemStatus + + +class SimulationRunItem(UncheckedBaseModel): + id: str = pydantic.Field() + """ + This is the unique identifier for the simulation run item. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field(alias="orgId", description="This is the unique identifier for the organization."), + ] + simulation_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="simulationId"), + pydantic.Field(alias="simulationId", description="This is the ID of the simulation this run belongs to."), + ] + status: SimulationRunItemStatus = pydantic.Field() + """ + This is the current status of the run. + """ + + queued_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="queuedAt"), + pydantic.Field( + alias="queuedAt", description="This is the ISO 8601 date-time string of when the run was queued." + ), + ] + started_at: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="startedAt"), + pydantic.Field(alias="startedAt", description="This is the ISO 8601 date-time string of when the run started."), + ] = None + completed_at: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="completedAt"), + pydantic.Field( + alias="completedAt", description="This is the ISO 8601 date-time string of when the run completed." + ), + ] = None + failed_at: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="failedAt"), + pydantic.Field(alias="failedAt", description="This is the ISO 8601 date-time string of when the run failed."), + ] = None + canceled_at: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="canceledAt"), + pydantic.Field( + alias="canceledAt", description="This is the ISO 8601 date-time string of when the run was canceled." + ), + ] = None + failure_reason: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="failureReason"), + pydantic.Field(alias="failureReason", description="This is the reason for failure."), + ] = None + call_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="callId"), + pydantic.Field( + alias="callId", description="This is the ID of the target Vapi call (the assistant being tested)." + ), + ] = None + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the run item was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the run item was last updated.", + ), + ] + run_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="runId"), + pydantic.Field(alias="runId", description="This is the ID of the parent run (batch/group)."), + ] = None + hooks: typing.Optional[typing.List[SimulationRunItemHooksItem]] = pydantic.Field(default=None) + """ + Hooks configured for this simulation run item + """ + + iteration_number: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="iterationNumber"), + pydantic.Field( + alias="iterationNumber", + description="This is the iteration number (1-indexed) when run with iterations > 1.", + ), + ] = None + session_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="sessionId"), + pydantic.Field( + alias="sessionId", description="This is the session ID for chat-based simulations (webchat transport)." + ), + ] = None + scenario_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="scenarioId"), + pydantic.Field(alias="scenarioId", description="This is the scenario ID at run creation time."), + ] = None + personality_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="personalityId"), + pydantic.Field(alias="personalityId", description="This is the personality ID at run creation time."), + ] = None + metadata: typing.Optional[SimulationRunItemMetadata] = pydantic.Field(default=None) + """ + This is the metadata containing snapshots and call data. + """ + + results: typing.Optional[SimulationRunItemResults] = pydantic.Field(default=None) + """ + This is the results of the simulation run. + """ + + improvement_suggestions: typing_extensions.Annotated[ + typing.Optional[SimulationRunItemImprovements], + FieldMetadata(alias="improvementSuggestions"), + pydantic.Field( + alias="improvementSuggestions", + description="This is the AI-generated improvement suggestions for failed runs.", + ), + ] = None + configurations: typing.Optional[SimulationRunConfiguration] = pydantic.Field(default=None) + """ + This is the configuration for how this simulation run executes. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/simulation_run_item_call_metadata.py b/src/vapi/types/simulation_run_item_call_metadata.py new file mode 100644 index 00000000..df5b6d73 --- /dev/null +++ b/src/vapi/types/simulation_run_item_call_metadata.py @@ -0,0 +1,41 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .simulation_run_item_call_monitor import SimulationRunItemCallMonitor + + +class SimulationRunItemCallMetadata(UncheckedBaseModel): + transcript: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the transcript of the conversation. + """ + + messages: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = pydantic.Field(default=None) + """ + This is the list of conversation messages in OpenAI format. + """ + + recording_url: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="recordingUrl"), + pydantic.Field(alias="recordingUrl", description="This is the URL to the call recording."), + ] = None + monitor: typing.Optional[SimulationRunItemCallMonitor] = pydantic.Field(default=None) + """ + This is the call monitoring data (live listen URL). + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/simulation_run_item_call_monitor.py b/src/vapi/types/simulation_run_item_call_monitor.py new file mode 100644 index 00000000..21a1007f --- /dev/null +++ b/src/vapi/types/simulation_run_item_call_monitor.py @@ -0,0 +1,29 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class SimulationRunItemCallMonitor(UncheckedBaseModel): + listen_url: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="listenUrl"), + pydantic.Field( + alias="listenUrl", + description="This is the WebSocket URL to listen to the live call audio (combined both parties).", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/simulation_run_item_counts.py b/src/vapi/types/simulation_run_item_counts.py new file mode 100644 index 00000000..06eb420e --- /dev/null +++ b/src/vapi/types/simulation_run_item_counts.py @@ -0,0 +1,48 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class SimulationRunItemCounts(UncheckedBaseModel): + total: float = pydantic.Field() + """ + Total number of run items + """ + + passed: float = pydantic.Field() + """ + Number of passed run items + """ + + failed: float = pydantic.Field() + """ + Number of failed run items + """ + + running: float = pydantic.Field() + """ + Number of running/evaluating run items + """ + + queued: float = pydantic.Field() + """ + Number of queued run items + """ + + canceled: float = pydantic.Field() + """ + Number of canceled run items + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/simulation_run_item_hooks_item.py b/src/vapi/types/simulation_run_item_hooks_item.py new file mode 100644 index 00000000..77fe6a4d --- /dev/null +++ b/src/vapi/types/simulation_run_item_hooks_item.py @@ -0,0 +1,45 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .simulation_hook_webhook_action import SimulationHookWebhookAction + + +class SimulationRunItemHooksItem_SimulationRunStarted(UncheckedBaseModel): + on: typing.Literal["simulation.run.started"] = "simulation.run.started" + do: typing.List[SimulationHookWebhookAction] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class SimulationRunItemHooksItem_SimulationRunEnded(UncheckedBaseModel): + on: typing.Literal["simulation.run.ended"] = "simulation.run.ended" + do: typing.List[SimulationHookWebhookAction] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +SimulationRunItemHooksItem = typing_extensions.Annotated[ + typing.Union[SimulationRunItemHooksItem_SimulationRunStarted, SimulationRunItemHooksItem_SimulationRunEnded], + UnionMetadata(discriminant="on"), +] diff --git a/src/vapi/types/simulation_run_item_improvement_suggestion.py b/src/vapi/types/simulation_run_item_improvement_suggestion.py new file mode 100644 index 00000000..0d48dc51 --- /dev/null +++ b/src/vapi/types/simulation_run_item_improvement_suggestion.py @@ -0,0 +1,28 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class SimulationRunItemImprovementSuggestion(UncheckedBaseModel): + issue: str = pydantic.Field() + """ + This is the issue identified. + """ + + suggestion: str = pydantic.Field() + """ + This is the suggested improvement. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/simulation_run_item_improvements.py b/src/vapi/types/simulation_run_item_improvements.py new file mode 100644 index 00000000..03285811 --- /dev/null +++ b/src/vapi/types/simulation_run_item_improvements.py @@ -0,0 +1,56 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .simulation_run_item_improvement_suggestion import SimulationRunItemImprovementSuggestion + + +class SimulationRunItemImprovements(UncheckedBaseModel): + analysis: str = pydantic.Field() + """ + This is a summary analysis of why evaluations failed. + """ + + system_prompt_suggestions: typing_extensions.Annotated[ + typing.List[SimulationRunItemImprovementSuggestion], + FieldMetadata(alias="systemPromptSuggestions"), + pydantic.Field( + alias="systemPromptSuggestions", + description="This is the list of suggestions for improving the system prompt.", + ), + ] + tool_suggestions: typing_extensions.Annotated[ + typing.List[SimulationRunItemImprovementSuggestion], + FieldMetadata(alias="toolSuggestions"), + pydantic.Field(alias="toolSuggestions", description="This is the list of suggestions for improving tools."), + ] + scenario_suggestions: typing_extensions.Annotated[ + typing.List[SimulationRunItemImprovementSuggestion], + FieldMetadata(alias="scenarioSuggestions"), + pydantic.Field( + alias="scenarioSuggestions", + description="This is the list of suggestions for improving the scenario/evaluation plan.", + ), + ] + suggested_system_prompt: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="suggestedSystemPrompt"), + pydantic.Field( + alias="suggestedSystemPrompt", + description="This is a complete revised system prompt if major changes are needed.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/simulation_run_item_metadata.py b/src/vapi/types/simulation_run_item_metadata.py new file mode 100644 index 00000000..b37d04a5 --- /dev/null +++ b/src/vapi/types/simulation_run_item_metadata.py @@ -0,0 +1,54 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .simulation_run_item_call_metadata import SimulationRunItemCallMetadata + + +class SimulationRunItemMetadata(UncheckedBaseModel): + assistant: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) + """ + This is a snapshot of the assistant at run creation time. + """ + + squad: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) + """ + This is a snapshot of the squad at run creation time. + """ + + scenario: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) + """ + This is a snapshot of the scenario at run creation time. + """ + + personality: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) + """ + This is a snapshot of the personality at run creation time. + """ + + simulation: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) + """ + This is a snapshot of the simulation at run creation time. + """ + + call: typing.Optional[SimulationRunItemCallMetadata] = pydantic.Field(default=None) + """ + This is the call-related data (transcript, messages, recording). + """ + + hooks: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) + """ + Hook execution state for this run item (used for idempotency + debugging). + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/simulation_run_item_results.py b/src/vapi/types/simulation_run_item_results.py new file mode 100644 index 00000000..7ebe4f6e --- /dev/null +++ b/src/vapi/types/simulation_run_item_results.py @@ -0,0 +1,40 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .latency_metrics import LatencyMetrics +from .structured_output_evaluation_result import StructuredOutputEvaluationResult + + +class SimulationRunItemResults(UncheckedBaseModel): + evaluations: typing.List[StructuredOutputEvaluationResult] = pydantic.Field() + """ + This is the list of results from structured output evaluations. + """ + + passed: bool = pydantic.Field() + """ + This indicates whether all required evaluations passed. + """ + + latency_metrics: typing_extensions.Annotated[ + typing.Optional[LatencyMetrics], + FieldMetadata(alias="latencyMetrics"), + pydantic.Field( + alias="latencyMetrics", description="This contains the latency metrics collected from the call." + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/simulation_run_item_status.py b/src/vapi/types/simulation_run_item_status.py new file mode 100644 index 00000000..7f53e400 --- /dev/null +++ b/src/vapi/types/simulation_run_item_status.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +SimulationRunItemStatus = typing.Union[ + typing.Literal["queued", "running", "evaluating", "passed", "failed", "canceled"], typing.Any +] diff --git a/src/vapi/types/simulation_run_simulation_entry.py b/src/vapi/types/simulation_run_simulation_entry.py new file mode 100644 index 00000000..166910cc --- /dev/null +++ b/src/vapi/types/simulation_run_simulation_entry.py @@ -0,0 +1,65 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_personality_dto import CreatePersonalityDto +from .create_scenario_dto import CreateScenarioDto + + +class SimulationRunSimulationEntry(UncheckedBaseModel): + simulation_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="simulationId"), + pydantic.Field( + alias="simulationId", + description="ID of an existing simulation to run. When provided, scenarioId/personalityId/inline fields are ignored.", + ), + ] = None + scenario_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="scenarioId"), + pydantic.Field( + alias="scenarioId", description="ID of an existing scenario. Cannot be combined with inline scenario." + ), + ] = None + scenario: typing.Optional[CreateScenarioDto] = pydantic.Field(default=None) + """ + Inline scenario configuration. Cannot be combined with scenarioId. + """ + + personality_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="personalityId"), + pydantic.Field( + alias="personalityId", + description="ID of an existing personality. Cannot be combined with inline personality.", + ), + ] = None + personality: typing.Optional[CreatePersonalityDto] = pydantic.Field(default=None) + """ + Inline personality configuration. Cannot be combined with personalityId. + """ + + name: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional name for this simulation entry + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(SimulationRunSimulationEntry) diff --git a/src/vapi/types/simulation_run_simulations_item.py b/src/vapi/types/simulation_run_simulations_item.py new file mode 100644 index 00000000..64def441 --- /dev/null +++ b/src/vapi/types/simulation_run_simulations_item.py @@ -0,0 +1,64 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .create_personality_dto import CreatePersonalityDto +from .create_scenario_dto import CreateScenarioDto + + +class SimulationRunSimulationsItem_Simulation(UncheckedBaseModel): + type: typing.Literal["simulation"] = "simulation" + simulation_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="simulationId"), pydantic.Field(alias="simulationId") + ] = None + scenario_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="scenarioId"), pydantic.Field(alias="scenarioId") + ] = None + scenario: typing.Optional[CreateScenarioDto] = None + personality_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="personalityId"), pydantic.Field(alias="personalityId") + ] = None + personality: typing.Optional[CreatePersonalityDto] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class SimulationRunSimulationsItem_SimulationSuite(UncheckedBaseModel): + type: typing.Literal["simulationSuite"] = "simulationSuite" + simulation_suite_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="simulationSuiteId"), pydantic.Field(alias="simulationSuiteId") + ] = None + suite_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="suiteId"), pydantic.Field(alias="suiteId") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +SimulationRunSimulationsItem = typing_extensions.Annotated[ + typing.Union[SimulationRunSimulationsItem_Simulation, SimulationRunSimulationsItem_SimulationSuite], + UnionMetadata(discriminant="type"), +] +update_forward_refs(SimulationRunSimulationsItem_Simulation) diff --git a/src/vapi/types/simulation_run_status.py b/src/vapi/types/simulation_run_status.py new file mode 100644 index 00000000..81668a70 --- /dev/null +++ b/src/vapi/types/simulation_run_status.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +SimulationRunStatus = typing.Union[typing.Literal["queued", "running", "ended"], typing.Any] diff --git a/src/vapi/types/simulation_run_suite_entry.py b/src/vapi/types/simulation_run_suite_entry.py new file mode 100644 index 00000000..cf8f7788 --- /dev/null +++ b/src/vapi/types/simulation_run_suite_entry.py @@ -0,0 +1,29 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class SimulationRunSuiteEntry(UncheckedBaseModel): + simulation_suite_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="simulationSuiteId"), + pydantic.Field(alias="simulationSuiteId", description="ID of the simulation suite to run"), + ] = None + suite_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="suiteId"), pydantic.Field(alias="suiteId") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/simulation_run_target.py b/src/vapi/types/simulation_run_target.py new file mode 100644 index 00000000..57eff97a --- /dev/null +++ b/src/vapi/types/simulation_run_target.py @@ -0,0 +1,236 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class SimulationRunTarget_Assistant(UncheckedBaseModel): + """ + Target to test against + """ + + type: typing.Literal["assistant"] = "assistant" + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + assistant: typing.Optional["CreateAssistantDto"] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class SimulationRunTarget_Squad(UncheckedBaseModel): + """ + Target to test against + """ + + type: typing.Literal["squad"] = "squad" + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + squad: typing.Optional["CreateSquadDto"] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +SimulationRunTarget = typing_extensions.Annotated[ + typing.Union[SimulationRunTarget_Assistant, SimulationRunTarget_Squad], UnionMetadata(discriminant="type") +] +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + SimulationRunTarget_Assistant, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + SimulationRunTarget_Squad, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/simulation_run_target_assistant.py b/src/vapi/types/simulation_run_target_assistant.py new file mode 100644 index 00000000..eeeba169 --- /dev/null +++ b/src/vapi/types/simulation_run_target_assistant.py @@ -0,0 +1,155 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class SimulationRunTargetAssistant(UncheckedBaseModel): + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assistantId"), + pydantic.Field( + alias="assistantId", + description="ID of an existing assistant to test against. Cannot be combined with inline assistant.", + ), + ] = None + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) + """ + Inline assistant configuration to test against. Cannot be combined with assistantId. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + SimulationRunTargetAssistant, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/simulation_run_target_squad.py b/src/vapi/types/simulation_run_target_squad.py new file mode 100644 index 00000000..7ff968f9 --- /dev/null +++ b/src/vapi/types/simulation_run_target_squad.py @@ -0,0 +1,155 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class SimulationRunTargetSquad(UncheckedBaseModel): + squad_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="squadId"), + pydantic.Field( + alias="squadId", + description="ID of an existing squad to test against. Cannot be combined with inline squad.", + ), + ] = None + squad: typing.Optional["CreateSquadDto"] = pydantic.Field(default=None) + """ + Inline squad configuration to test against. Cannot be combined with squadId. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + SimulationRunTargetSquad, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/simulation_run_transport_configuration.py b/src/vapi/types/simulation_run_transport_configuration.py new file mode 100644 index 00000000..720219e2 --- /dev/null +++ b/src/vapi/types/simulation_run_transport_configuration.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .simulation_run_transport_configuration_provider import SimulationRunTransportConfigurationProvider + + +class SimulationRunTransportConfiguration(UncheckedBaseModel): + provider: SimulationRunTransportConfigurationProvider = pydantic.Field() + """ + Transport provider for the simulation run + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/simulation_run_transport_configuration_provider.py b/src/vapi/types/simulation_run_transport_configuration_provider.py new file mode 100644 index 00000000..8f3e98ac --- /dev/null +++ b/src/vapi/types/simulation_run_transport_configuration_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +SimulationRunTransportConfigurationProvider = typing.Union[typing.Literal["vapi.websocket", "vapi.webchat"], typing.Any] diff --git a/src/vapi/types/simulation_suite.py b/src/vapi/types/simulation_suite.py new file mode 100644 index 00000000..531b5475 --- /dev/null +++ b/src/vapi/types/simulation_suite.py @@ -0,0 +1,70 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class SimulationSuite(UncheckedBaseModel): + id: str = pydantic.Field() + """ + This is the unique identifier for the simulation suite. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the organization this suite belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the suite was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", description="This is the ISO 8601 date-time string of when the suite was last updated." + ), + ] + name: str = pydantic.Field() + """ + This is the name of the simulation suite. + """ + + slack_webhook_url: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="slackWebhookUrl"), + pydantic.Field(alias="slackWebhookUrl", description="This is the Slack webhook URL for notifications."), + ] = None + path: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional folder path for organizing simulation suites. + Supports up to 3 levels (e.g., "dept/feature/variant"). + Maps to GitOps resource folder structure. + """ + + simulation_ids: typing_extensions.Annotated[ + typing.List[str], + FieldMetadata(alias="simulationIds"), + pydantic.Field(alias="simulationIds", description="This is the list of simulation IDs in this suite."), + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/sip_authentication.py b/src/vapi/types/sip_authentication.py new file mode 100644 index 00000000..75651cfc --- /dev/null +++ b/src/vapi/types/sip_authentication.py @@ -0,0 +1,33 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class SipAuthentication(UncheckedBaseModel): + realm: typing.Optional[str] = pydantic.Field(default=None) + """ + This will be expected in the `realm` field of the `authorization` header of the SIP INVITE. Defaults to sip.vapi.ai. + """ + + username: str = pydantic.Field() + """ + This will be expected in the `username` field of the `authorization` header of the SIP INVITE. + """ + + password: str = pydantic.Field() + """ + This will be expected to generate the `response` field of the `authorization` header of the SIP INVITE, through digest authentication. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/sip_request_tool.py b/src/vapi/types/sip_request_tool.py new file mode 100644 index 00000000..3fab1c16 --- /dev/null +++ b/src/vapi/types/sip_request_tool.py @@ -0,0 +1,89 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .sip_request_tool_body import SipRequestToolBody +from .sip_request_tool_messages_item import SipRequestToolMessagesItem +from .sip_request_tool_verb import SipRequestToolVerb +from .tool_rejection_plan import ToolRejectionPlan + + +class SipRequestTool(UncheckedBaseModel): + messages: typing.Optional[typing.List[SipRequestToolMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + verb: SipRequestToolVerb = pydantic.Field() + """ + The SIP method to send. + """ + + headers: typing.Optional["JsonSchema"] = pydantic.Field(default=None) + """ + JSON schema for headers the model should populate when sending the SIP request. + """ + + body: typing.Optional[SipRequestToolBody] = pydantic.Field(default=None) + """ + Body to include in the SIP request. Either a literal string body, or a JSON schema describing a structured body that the model should populate. + """ + + id: str = pydantic.Field() + """ + This is the unique identifier for the tool. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the organization that this tool belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the tool was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", description="This is the ISO 8601 date-time string of when the tool was last updated." + ), + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .json_schema import JsonSchema # noqa: E402, I001 + +update_forward_refs(SipRequestTool, JsonSchema=JsonSchema) diff --git a/src/vapi/types/sip_request_tool_body.py b/src/vapi/types/sip_request_tool_body.py new file mode 100644 index 00000000..16e91f50 --- /dev/null +++ b/src/vapi/types/sip_request_tool_body.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .json_schema import JsonSchema + +SipRequestToolBody = typing.Union[str, JsonSchema] diff --git a/src/vapi/types/sip_request_tool_messages_item.py b/src/vapi/types/sip_request_tool_messages_item.py new file mode 100644 index 00000000..3fca8fbb --- /dev/null +++ b/src/vapi/types/sip_request_tool_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class SipRequestToolMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class SipRequestToolMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class SipRequestToolMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class SipRequestToolMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +SipRequestToolMessagesItem = typing_extensions.Annotated[ + typing.Union[ + SipRequestToolMessagesItem_RequestStart, + SipRequestToolMessagesItem_RequestComplete, + SipRequestToolMessagesItem_RequestFailed, + SipRequestToolMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/sip_request_tool_verb.py b/src/vapi/types/sip_request_tool_verb.py new file mode 100644 index 00000000..2109f450 --- /dev/null +++ b/src/vapi/types/sip_request_tool_verb.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +SipRequestToolVerb = typing.Union[typing.Literal["INFO", "MESSAGE", "NOTIFY"], typing.Any] diff --git a/src/vapi/types/sip_trunk_gateway.py b/src/vapi/types/sip_trunk_gateway.py index 5b76c039..fac6d213 100644 --- a/src/vapi/types/sip_trunk_gateway.py +++ b/src/vapi/types/sip_trunk_gateway.py @@ -1,15 +1,16 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import pydantic import typing + +import pydantic import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel from .sip_trunk_gateway_outbound_protocol import SipTrunkGatewayOutboundProtocol -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -class SipTrunkGateway(UniversalBaseModel): +class SipTrunkGateway(UncheckedBaseModel): ip: str = pydantic.Field() """ This is the address of the gateway. It can be an IPv4 address like 1.1.1.1 or a fully qualified domain name like my-sip-trunk.pstn.twilio.com. @@ -29,45 +30,38 @@ class SipTrunkGateway(UniversalBaseModel): @default 32 """ - inbound_enabled: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="inboundEnabled")] = ( - pydantic.Field(default=None) - ) - """ - This is whether inbound calls are allowed from this gateway. Default is true. - - @default true - """ - - outbound_enabled: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="outboundEnabled")] = ( - pydantic.Field(default=None) - ) - """ - This is whether outbound calls should be sent to this gateway. Default is true. - - Note, if netmask is less than 32, it doesn't affect the outbound IPs that are tried. 1 attempt is made to `ip:port`. - - @default true - """ - + inbound_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="inboundEnabled"), + pydantic.Field( + alias="inboundEnabled", + description="This is whether inbound calls are allowed from this gateway. Default is true.\n\n@default true", + ), + ] = None + outbound_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="outboundEnabled"), + pydantic.Field( + alias="outboundEnabled", + description="This is whether outbound calls should be sent to this gateway. Default is true.\n\nNote, if netmask is less than 32, it doesn't affect the outbound IPs that are tried. 1 attempt is made to `ip:port`.\n\n@default true", + ), + ] = None outbound_protocol: typing_extensions.Annotated[ - typing.Optional[SipTrunkGatewayOutboundProtocol], FieldMetadata(alias="outboundProtocol") - ] = pydantic.Field(default=None) - """ - This is the protocol to use for SIP signaling outbound calls. Default is udp. - - @default udp - """ - + typing.Optional[SipTrunkGatewayOutboundProtocol], + FieldMetadata(alias="outboundProtocol"), + pydantic.Field( + alias="outboundProtocol", + description="This is the protocol to use for SIP signaling outbound calls. Default is udp.\n\n@default udp", + ), + ] = None options_ping_enabled: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="optionsPingEnabled") - ] = pydantic.Field(default=None) - """ - This is whether to send options ping to the gateway. This can be used to check if the gateway is reachable. Default is false. - - This is useful for high availability setups where you want to check if the gateway is reachable before routing calls to it. Note, if no gateway for a trunk is reachable, outbound calls will be rejected. - - @default false - """ + typing.Optional[bool], + FieldMetadata(alias="optionsPingEnabled"), + pydantic.Field( + alias="optionsPingEnabled", + description="This is whether to send options ping to the gateway. This can be used to check if the gateway is reachable. Default is false.\n\nThis is useful for high availability setups where you want to check if the gateway is reachable before routing calls to it. Note, if no gateway for a trunk is reachable, outbound calls will be rejected.\n\n@default false", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/sip_trunk_outbound_authentication_plan.py b/src/vapi/types/sip_trunk_outbound_authentication_plan.py index 63c7acda..c799190c 100644 --- a/src/vapi/types/sip_trunk_outbound_authentication_plan.py +++ b/src/vapi/types/sip_trunk_outbound_authentication_plan.py @@ -1,29 +1,32 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions import typing -from ..core.serialization import FieldMetadata + import pydantic -from .sip_trunk_outbound_sip_register_plan import SipTrunkOutboundSipRegisterPlan +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .sip_trunk_outbound_sip_register_plan import SipTrunkOutboundSipRegisterPlan -class SipTrunkOutboundAuthenticationPlan(UniversalBaseModel): - auth_password: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="authPassword")] = ( - pydantic.Field(default=None) - ) - """ - This is not returned in the API. - """ - - auth_username: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="authUsername")] = None +class SipTrunkOutboundAuthenticationPlan(UncheckedBaseModel): + auth_password: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="authPassword"), + pydantic.Field(alias="authPassword", description="This is not returned in the API."), + ] = None + auth_username: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="authUsername"), pydantic.Field(alias="authUsername") + ] = None sip_register_plan: typing_extensions.Annotated[ - typing.Optional[SipTrunkOutboundSipRegisterPlan], FieldMetadata(alias="sipRegisterPlan") - ] = pydantic.Field(default=None) - """ - This can be used to configure if SIP register is required by the SIP trunk. If not provided, no SIP registration will be attempted. - """ + typing.Optional[SipTrunkOutboundSipRegisterPlan], + FieldMetadata(alias="sipRegisterPlan"), + pydantic.Field( + alias="sipRegisterPlan", + description="This can be used to configure if SIP register is required by the SIP trunk. If not provided, no SIP registration will be attempted.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/sip_trunk_outbound_sip_register_plan.py b/src/vapi/types/sip_trunk_outbound_sip_register_plan.py index 25536fe7..b70dfadb 100644 --- a/src/vapi/types/sip_trunk_outbound_sip_register_plan.py +++ b/src/vapi/types/sip_trunk_outbound_sip_register_plan.py @@ -1,12 +1,13 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel -class SipTrunkOutboundSipRegisterPlan(UniversalBaseModel): +class SipTrunkOutboundSipRegisterPlan(UncheckedBaseModel): domain: typing.Optional[str] = None username: typing.Optional[str] = None realm: typing.Optional[str] = None diff --git a/src/vapi/types/slack_o_auth_2_authorization_credential.py b/src/vapi/types/slack_o_auth_2_authorization_credential.py new file mode 100644 index 00000000..57f73dff --- /dev/null +++ b/src/vapi/types/slack_o_auth_2_authorization_credential.py @@ -0,0 +1,60 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .slack_o_auth_2_authorization_credential_provider import SlackOAuth2AuthorizationCredentialProvider + + +class SlackOAuth2AuthorizationCredential(UncheckedBaseModel): + provider: SlackOAuth2AuthorizationCredentialProvider + authorization_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="authorizationId"), + pydantic.Field(alias="authorizationId", description="The authorization ID for the OAuth2 authorization"), + ] + id: str = pydantic.Field() + """ + This is the unique identifier for the credential. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/slack_o_auth_2_authorization_credential_provider.py b/src/vapi/types/slack_o_auth_2_authorization_credential_provider.py new file mode 100644 index 00000000..b2d669c8 --- /dev/null +++ b/src/vapi/types/slack_o_auth_2_authorization_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +SlackOAuth2AuthorizationCredentialProvider = typing.Union[typing.Literal["slack.oauth2-authorization"], typing.Any] diff --git a/src/vapi/types/slack_send_message_tool.py b/src/vapi/types/slack_send_message_tool.py new file mode 100644 index 00000000..3bc76825 --- /dev/null +++ b/src/vapi/types/slack_send_message_tool.py @@ -0,0 +1,70 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .slack_send_message_tool_messages_item import SlackSendMessageToolMessagesItem +from .tool_rejection_plan import ToolRejectionPlan + + +class SlackSendMessageTool(UncheckedBaseModel): + messages: typing.Optional[typing.List[SlackSendMessageToolMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + id: str = pydantic.Field() + """ + This is the unique identifier for the tool. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the organization that this tool belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the tool was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", description="This is the ISO 8601 date-time string of when the tool was last updated." + ), + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(SlackSendMessageTool) diff --git a/src/vapi/types/slack_send_message_tool_messages_item.py b/src/vapi/types/slack_send_message_tool_messages_item.py new file mode 100644 index 00000000..4b88674e --- /dev/null +++ b/src/vapi/types/slack_send_message_tool_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class SlackSendMessageToolMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class SlackSendMessageToolMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class SlackSendMessageToolMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class SlackSendMessageToolMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +SlackSendMessageToolMessagesItem = typing_extensions.Annotated[ + typing.Union[ + SlackSendMessageToolMessagesItem_RequestStart, + SlackSendMessageToolMessagesItem_RequestComplete, + SlackSendMessageToolMessagesItem_RequestFailed, + SlackSendMessageToolMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/slack_webhook_credential.py b/src/vapi/types/slack_webhook_credential.py new file mode 100644 index 00000000..3b3d816a --- /dev/null +++ b/src/vapi/types/slack_webhook_credential.py @@ -0,0 +1,63 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .slack_webhook_credential_provider import SlackWebhookCredentialProvider + + +class SlackWebhookCredential(UncheckedBaseModel): + provider: SlackWebhookCredentialProvider + webhook_url: typing_extensions.Annotated[ + str, + FieldMetadata(alias="webhookUrl"), + pydantic.Field( + alias="webhookUrl", + description="Slack incoming webhook URL. See https://api.slack.com/messaging/webhooks for setup instructions. This is not returned in the API.", + ), + ] + id: str = pydantic.Field() + """ + This is the unique identifier for the credential. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/slack_webhook_credential_provider.py b/src/vapi/types/slack_webhook_credential_provider.py new file mode 100644 index 00000000..4d186cff --- /dev/null +++ b/src/vapi/types/slack_webhook_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +SlackWebhookCredentialProvider = typing.Union[typing.Literal["slack-webhook"], typing.Any] diff --git a/src/vapi/types/smallest_ai_credential.py b/src/vapi/types/smallest_ai_credential.py new file mode 100644 index 00000000..cb4538d7 --- /dev/null +++ b/src/vapi/types/smallest_ai_credential.py @@ -0,0 +1,60 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .smallest_ai_credential_provider import SmallestAiCredentialProvider + + +class SmallestAiCredential(UncheckedBaseModel): + provider: SmallestAiCredentialProvider + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + id: str = pydantic.Field() + """ + This is the unique identifier for the credential. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/smallest_ai_credential_provider.py b/src/vapi/types/smallest_ai_credential_provider.py new file mode 100644 index 00000000..49413e95 --- /dev/null +++ b/src/vapi/types/smallest_ai_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +SmallestAiCredentialProvider = typing.Union[typing.Literal["smallest-ai"], typing.Any] diff --git a/src/vapi/types/smallest_ai_voice.py b/src/vapi/types/smallest_ai_voice.py new file mode 100644 index 00000000..e8257f2f --- /dev/null +++ b/src/vapi/types/smallest_ai_voice.py @@ -0,0 +1,63 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .chunk_plan import ChunkPlan +from .fallback_plan import FallbackPlan +from .smallest_ai_voice_id import SmallestAiVoiceId +from .smallest_ai_voice_model import SmallestAiVoiceModel + + +class SmallestAiVoice(UncheckedBaseModel): + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="cachingEnabled"), + pydantic.Field( + alias="cachingEnabled", description="This is the flag to toggle voice caching for the assistant." + ), + ] = None + voice_id: typing_extensions.Annotated[ + SmallestAiVoiceId, + FieldMetadata(alias="voiceId"), + pydantic.Field(alias="voiceId", description="This is the provider-specific ID that will be used."), + ] + model: typing.Optional[SmallestAiVoiceModel] = pydantic.Field(default=None) + """ + Smallest AI voice model to use. Defaults to 'lightning' when not specified. + """ + + speed: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the speed multiplier that will be used. + """ + + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], + FieldMetadata(alias="chunkPlan"), + pydantic.Field( + alias="chunkPlan", + description="This is the plan for chunking the model output before it is sent to the voice provider.", + ), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field( + alias="fallbackPlan", + description="This is the plan for voice provider fallbacks in the event that the primary voice provider fails.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/smallest_ai_voice_id.py b/src/vapi/types/smallest_ai_voice_id.py new file mode 100644 index 00000000..7dcdc15b --- /dev/null +++ b/src/vapi/types/smallest_ai_voice_id.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .smallest_ai_voice_id_enum import SmallestAiVoiceIdEnum + +SmallestAiVoiceId = typing.Union[SmallestAiVoiceIdEnum, str] diff --git a/src/vapi/types/smallest_ai_voice_id_enum.py b/src/vapi/types/smallest_ai_voice_id_enum.py new file mode 100644 index 00000000..0903b197 --- /dev/null +++ b/src/vapi/types/smallest_ai_voice_id_enum.py @@ -0,0 +1,34 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +SmallestAiVoiceIdEnum = typing.Union[ + typing.Literal[ + "emily", + "jasmine", + "arman", + "james", + "mithali", + "aravind", + "raj", + "diya", + "raman", + "ananya", + "isha", + "william", + "aarav", + "monika", + "niharika", + "deepika", + "raghav", + "kajal", + "radhika", + "mansi", + "nisha", + "saurabh", + "pooja", + "saina", + "sanya", + ], + typing.Any, +] diff --git a/src/vapi/types/smallest_ai_voice_model.py b/src/vapi/types/smallest_ai_voice_model.py new file mode 100644 index 00000000..b85f8822 --- /dev/null +++ b/src/vapi/types/smallest_ai_voice_model.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +SmallestAiVoiceModel = typing.Union[typing.Literal["lightning"], typing.Any] diff --git a/src/vapi/types/smart_denoising_plan.py b/src/vapi/types/smart_denoising_plan.py new file mode 100644 index 00000000..189018f7 --- /dev/null +++ b/src/vapi/types/smart_denoising_plan.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class SmartDenoisingPlan(UncheckedBaseModel): + enabled: typing.Optional[bool] = pydantic.Field(default=None) + """ + Whether smart denoising using Krisp is enabled. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/sms_tool.py b/src/vapi/types/sms_tool.py new file mode 100644 index 00000000..00c4e550 --- /dev/null +++ b/src/vapi/types/sms_tool.py @@ -0,0 +1,70 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .sms_tool_messages_item import SmsToolMessagesItem +from .tool_rejection_plan import ToolRejectionPlan + + +class SmsTool(UncheckedBaseModel): + messages: typing.Optional[typing.List[SmsToolMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + id: str = pydantic.Field() + """ + This is the unique identifier for the tool. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the organization that this tool belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the tool was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", description="This is the ISO 8601 date-time string of when the tool was last updated." + ), + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(SmsTool) diff --git a/src/vapi/types/sms_tool_messages_item.py b/src/vapi/types/sms_tool_messages_item.py new file mode 100644 index 00000000..007f19a1 --- /dev/null +++ b/src/vapi/types/sms_tool_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class SmsToolMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class SmsToolMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class SmsToolMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class SmsToolMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +SmsToolMessagesItem = typing_extensions.Annotated[ + typing.Union[ + SmsToolMessagesItem_RequestStart, + SmsToolMessagesItem_RequestComplete, + SmsToolMessagesItem_RequestFailed, + SmsToolMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/soniox_credential.py b/src/vapi/types/soniox_credential.py new file mode 100644 index 00000000..5fd66453 --- /dev/null +++ b/src/vapi/types/soniox_credential.py @@ -0,0 +1,60 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .soniox_credential_provider import SonioxCredentialProvider + + +class SonioxCredential(UncheckedBaseModel): + provider: SonioxCredentialProvider + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + id: str = pydantic.Field() + """ + This is the unique identifier for the credential. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/soniox_credential_provider.py b/src/vapi/types/soniox_credential_provider.py new file mode 100644 index 00000000..b4251f69 --- /dev/null +++ b/src/vapi/types/soniox_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +SonioxCredentialProvider = typing.Union[typing.Literal["soniox"], typing.Any] diff --git a/src/vapi/types/soniox_transcriber.py b/src/vapi/types/soniox_transcriber.py new file mode 100644 index 00000000..a5b89f62 --- /dev/null +++ b/src/vapi/types/soniox_transcriber.py @@ -0,0 +1,66 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .fallback_transcriber_plan import FallbackTranscriberPlan +from .soniox_transcriber_language import SonioxTranscriberLanguage +from .soniox_transcriber_model import SonioxTranscriberModel + + +class SonioxTranscriber(UncheckedBaseModel): + model: typing.Optional[SonioxTranscriberModel] = pydantic.Field(default=None) + """ + The Soniox model to use for transcription. + """ + + language: typing.Optional[SonioxTranscriberLanguage] = pydantic.Field(default=None) + """ + The language for transcription. Uses ISO 639-1 codes. Soniox supports 60+ languages with a single universal model. + """ + + language_hints_strict: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="languageHintsStrict"), + pydantic.Field( + alias="languageHintsStrict", + description="When enabled, restricts transcription to the language specified in the language field. When disabled, the model can detect and transcribe any of 60+ supported languages. Defaults to true.", + ), + ] = None + max_endpoint_delay_ms: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="maxEndpointDelayMs"), + pydantic.Field( + alias="maxEndpointDelayMs", + description="Maximum delay in milliseconds between when the speaker stops and when the endpoint is detected. Lower values mean faster turn-taking but more false endpoints. Range: 500-3000. Default: 500.", + ), + ] = None + custom_vocabulary: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="customVocabulary"), + pydantic.Field( + alias="customVocabulary", + description="Custom vocabulary terms to boost recognition accuracy. Useful for brand names, product names, and domain-specific terminology. Maps to Soniox context.terms.", + ), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field( + alias="fallbackPlan", + description="This is the plan for transcriber provider fallbacks in the event that the primary transcriber provider fails.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/soniox_transcriber_language.py b/src/vapi/types/soniox_transcriber_language.py new file mode 100644 index 00000000..e1e3109c --- /dev/null +++ b/src/vapi/types/soniox_transcriber_language.py @@ -0,0 +1,194 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +SonioxTranscriberLanguage = typing.Union[ + typing.Literal[ + "aa", + "ab", + "ae", + "af", + "ak", + "am", + "an", + "ar", + "as", + "av", + "ay", + "az", + "ba", + "be", + "bg", + "bh", + "bi", + "bm", + "bn", + "bo", + "br", + "bs", + "ca", + "ce", + "ch", + "co", + "cr", + "cs", + "cu", + "cv", + "cy", + "da", + "de", + "dv", + "dz", + "ee", + "el", + "en", + "eo", + "es", + "et", + "eu", + "fa", + "ff", + "fi", + "fj", + "fo", + "fr", + "fy", + "ga", + "gd", + "gl", + "gn", + "gu", + "gv", + "ha", + "he", + "hi", + "ho", + "hr", + "ht", + "hu", + "hy", + "hz", + "ia", + "id", + "ie", + "ig", + "ii", + "ik", + "io", + "is", + "it", + "iu", + "ja", + "jv", + "ka", + "kg", + "ki", + "kj", + "kk", + "kl", + "km", + "kn", + "ko", + "kr", + "ks", + "ku", + "kv", + "kw", + "ky", + "la", + "lb", + "lg", + "li", + "ln", + "lo", + "lt", + "lu", + "lv", + "mg", + "mh", + "mi", + "mk", + "ml", + "mn", + "mr", + "ms", + "mt", + "my", + "na", + "nb", + "nd", + "ne", + "ng", + "nl", + "nn", + "no", + "nr", + "nv", + "ny", + "oc", + "oj", + "om", + "or", + "os", + "pa", + "pi", + "pl", + "ps", + "pt", + "qu", + "rm", + "rn", + "ro", + "ru", + "rw", + "sa", + "sc", + "sd", + "se", + "sg", + "si", + "sk", + "sl", + "sm", + "sn", + "so", + "sq", + "sr", + "ss", + "st", + "su", + "sv", + "sw", + "ta", + "te", + "tg", + "th", + "ti", + "tk", + "tl", + "tn", + "to", + "tr", + "ts", + "tt", + "tw", + "ty", + "ug", + "uk", + "ur", + "uz", + "ve", + "vi", + "vo", + "wa", + "wo", + "xh", + "yi", + "yue", + "yo", + "za", + "zh", + "zu", + ], + typing.Any, +] diff --git a/src/vapi/types/soniox_transcriber_model.py b/src/vapi/types/soniox_transcriber_model.py new file mode 100644 index 00000000..9232ec1c --- /dev/null +++ b/src/vapi/types/soniox_transcriber_model.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +SonioxTranscriberModel = typing.Union[typing.Literal["stt-rt-v4"], typing.Any] diff --git a/src/vapi/types/speechmatics_credential.py b/src/vapi/types/speechmatics_credential.py new file mode 100644 index 00000000..3afc7034 --- /dev/null +++ b/src/vapi/types/speechmatics_credential.py @@ -0,0 +1,60 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .speechmatics_credential_provider import SpeechmaticsCredentialProvider + + +class SpeechmaticsCredential(UncheckedBaseModel): + provider: SpeechmaticsCredentialProvider + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + id: str = pydantic.Field() + """ + This is the unique identifier for the credential. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/speechmatics_credential_provider.py b/src/vapi/types/speechmatics_credential_provider.py new file mode 100644 index 00000000..c3978c19 --- /dev/null +++ b/src/vapi/types/speechmatics_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +SpeechmaticsCredentialProvider = typing.Union[typing.Literal["speechmatics"], typing.Any] diff --git a/src/vapi/types/speechmatics_custom_vocabulary_item.py b/src/vapi/types/speechmatics_custom_vocabulary_item.py new file mode 100644 index 00000000..b7b7fbdc --- /dev/null +++ b/src/vapi/types/speechmatics_custom_vocabulary_item.py @@ -0,0 +1,34 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class SpeechmaticsCustomVocabularyItem(UncheckedBaseModel): + content: str = pydantic.Field() + """ + The word or phrase to add to the custom vocabulary. + """ + + sounds_like: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="soundsLike"), + pydantic.Field( + alias="soundsLike", + description="Alternative phonetic representations of how the word might sound. This helps recognition when the word might be pronounced differently.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/speechmatics_transcriber.py b/src/vapi/types/speechmatics_transcriber.py new file mode 100644 index 00000000..0d220c89 --- /dev/null +++ b/src/vapi/types/speechmatics_transcriber.py @@ -0,0 +1,110 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .fallback_transcriber_plan import FallbackTranscriberPlan +from .speechmatics_custom_vocabulary_item import SpeechmaticsCustomVocabularyItem +from .speechmatics_transcriber_language import SpeechmaticsTranscriberLanguage +from .speechmatics_transcriber_model import SpeechmaticsTranscriberModel +from .speechmatics_transcriber_numeral_style import SpeechmaticsTranscriberNumeralStyle +from .speechmatics_transcriber_operating_point import SpeechmaticsTranscriberOperatingPoint +from .speechmatics_transcriber_region import SpeechmaticsTranscriberRegion + + +class SpeechmaticsTranscriber(UncheckedBaseModel): + model: typing.Optional[SpeechmaticsTranscriberModel] = pydantic.Field(default=None) + """ + This is the model that will be used for the transcription. + """ + + language: typing.Optional[SpeechmaticsTranscriberLanguage] = None + operating_point: typing_extensions.Annotated[ + typing.Optional[SpeechmaticsTranscriberOperatingPoint], + FieldMetadata(alias="operatingPoint"), + pydantic.Field( + alias="operatingPoint", + description="This is the operating point for the transcription. Choose between `standard` for faster turnaround with strong accuracy or `enhanced` for highest accuracy when precision is critical.\n\n@default 'enhanced'", + ), + ] = None + region: typing.Optional[SpeechmaticsTranscriberRegion] = pydantic.Field(default=None) + """ + This is the region for the Speechmatics API. Choose between EU (Europe) and US (United States) regions for lower latency and data sovereignty compliance. + + @default 'eu' + """ + + enable_diarization: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="enableDiarization"), + pydantic.Field( + alias="enableDiarization", + description="This enables speaker diarization, which identifies and separates speakers in the transcription. Essential for multi-speaker conversations and conference calls.\n\n@default false", + ), + ] = None + max_delay: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="maxDelay"), + pydantic.Field( + alias="maxDelay", + description="This sets the maximum delay in milliseconds for partial transcripts. Balances latency and accuracy.\n\n@default 3000", + ), + ] = None + custom_vocabulary: typing_extensions.Annotated[ + typing.List[SpeechmaticsCustomVocabularyItem], + FieldMetadata(alias="customVocabulary"), + pydantic.Field(alias="customVocabulary"), + ] + numeral_style: typing_extensions.Annotated[ + typing.Optional[SpeechmaticsTranscriberNumeralStyle], + FieldMetadata(alias="numeralStyle"), + pydantic.Field( + alias="numeralStyle", + description="This controls how numbers, dates, currencies, and other entities are formatted in the transcription output.\n\n@default 'written'", + ), + ] = None + end_of_turn_sensitivity: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="endOfTurnSensitivity"), + pydantic.Field( + alias="endOfTurnSensitivity", + description="This is the sensitivity level for end-of-turn detection, which determines when a speaker has finished talking. Higher values are more sensitive.\n\n@default 0.5", + ), + ] = None + remove_disfluencies: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="removeDisfluencies"), + pydantic.Field( + alias="removeDisfluencies", + description="This enables removal of disfluencies (um, uh) from the transcript to create cleaner, more professional output.\n\nThis is only supported for the English language transcriber.\n\n@default false", + ), + ] = None + minimum_speech_duration: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minimumSpeechDuration"), + pydantic.Field( + alias="minimumSpeechDuration", + description="This is the minimum duration in seconds for speech segments. Shorter segments will be filtered out. Helps remove noise and improve accuracy.\n\n@default 0.0", + ), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field( + alias="fallbackPlan", + description="This is the plan for transcriber provider fallbacks in the event that the primary transcriber provider fails.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/speechmatics_transcriber_language.py b/src/vapi/types/speechmatics_transcriber_language.py new file mode 100644 index 00000000..fc8ed69c --- /dev/null +++ b/src/vapi/types/speechmatics_transcriber_language.py @@ -0,0 +1,71 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +SpeechmaticsTranscriberLanguage = typing.Union[ + typing.Literal[ + "auto", + "ar", + "ar_en", + "ba", + "eu", + "be", + "bn", + "bg", + "yue", + "ca", + "hr", + "cs", + "da", + "nl", + "en", + "eo", + "et", + "fi", + "fr", + "gl", + "de", + "el", + "he", + "hi", + "hu", + "id", + "ia", + "ga", + "it", + "ja", + "ko", + "lv", + "lt", + "ms", + "en_ms", + "mt", + "cmn", + "cmn_en", + "mr", + "mn", + "no", + "fa", + "pl", + "pt", + "ro", + "ru", + "sk", + "sl", + "es", + "en_es", + "sw", + "sv", + "tl", + "ta", + "en_ta", + "th", + "tr", + "uk", + "ur", + "ug", + "vi", + "cy", + ], + typing.Any, +] diff --git a/src/vapi/types/speechmatics_transcriber_model.py b/src/vapi/types/speechmatics_transcriber_model.py new file mode 100644 index 00000000..8e1a3e98 --- /dev/null +++ b/src/vapi/types/speechmatics_transcriber_model.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +SpeechmaticsTranscriberModel = typing.Union[typing.Literal["default"], typing.Any] diff --git a/src/vapi/types/speechmatics_transcriber_numeral_style.py b/src/vapi/types/speechmatics_transcriber_numeral_style.py new file mode 100644 index 00000000..77228657 --- /dev/null +++ b/src/vapi/types/speechmatics_transcriber_numeral_style.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +SpeechmaticsTranscriberNumeralStyle = typing.Union[typing.Literal["written", "spoken"], typing.Any] diff --git a/src/vapi/types/speechmatics_transcriber_operating_point.py b/src/vapi/types/speechmatics_transcriber_operating_point.py new file mode 100644 index 00000000..ea230e33 --- /dev/null +++ b/src/vapi/types/speechmatics_transcriber_operating_point.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +SpeechmaticsTranscriberOperatingPoint = typing.Union[typing.Literal["standard", "enhanced"], typing.Any] diff --git a/src/vapi/types/speechmatics_transcriber_region.py b/src/vapi/types/speechmatics_transcriber_region.py new file mode 100644 index 00000000..1574c83b --- /dev/null +++ b/src/vapi/types/speechmatics_transcriber_region.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +SpeechmaticsTranscriberRegion = typing.Union[typing.Literal["eu", "us"], typing.Any] diff --git a/src/vapi/types/spki_pem_public_key_config.py b/src/vapi/types/spki_pem_public_key_config.py new file mode 100644 index 00000000..fbf5f59a --- /dev/null +++ b/src/vapi/types/spki_pem_public_key_config.py @@ -0,0 +1,28 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class SpkiPemPublicKeyConfig(UncheckedBaseModel): + name: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional name of the key for identification purposes. + """ + + pem: str = pydantic.Field() + """ + The PEM-encoded public key. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/sql_injection_security_filter.py b/src/vapi/types/sql_injection_security_filter.py new file mode 100644 index 00000000..e4b31f43 --- /dev/null +++ b/src/vapi/types/sql_injection_security_filter.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .sql_injection_security_filter_type import SqlInjectionSecurityFilterType + + +class SqlInjectionSecurityFilter(UncheckedBaseModel): + type: SqlInjectionSecurityFilterType = pydantic.Field() + """ + The type of security threat to filter. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/sql_injection_security_filter_type.py b/src/vapi/types/sql_injection_security_filter_type.py new file mode 100644 index 00000000..cd0d3210 --- /dev/null +++ b/src/vapi/types/sql_injection_security_filter_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +SqlInjectionSecurityFilterType = typing.Union[typing.Literal["sql-injection"], typing.Any] diff --git a/src/vapi/types/squad.py b/src/vapi/types/squad.py index ff6da730..d3d69bb2 100644 --- a/src/vapi/types/squad.py +++ b/src/vapi/types/squad.py @@ -1,28 +1,24 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -from .callback_step import CallbackStep -from .create_workflow_block_dto import CreateWorkflowBlockDto -from .handoff_step import HandoffStep + +import datetime as dt import typing + import pydantic -from .squad_member_dto import SquadMemberDto import typing_extensions -from .assistant_overrides import AssistantOverrides +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.serialization import FieldMetadata -import datetime as dt -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.pydantic_utilities import update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel -class Squad(UniversalBaseModel): +class Squad(UncheckedBaseModel): name: typing.Optional[str] = pydantic.Field(default=None) """ This is the name of the squad. """ - members: typing.List[SquadMemberDto] = pydantic.Field() + members: typing.List["SquadMemberDto"] = pydantic.Field() """ This is the list of assistants that make up the squad. @@ -30,33 +26,39 @@ class Squad(UniversalBaseModel): """ members_overrides: typing_extensions.Annotated[ - typing.Optional[AssistantOverrides], FieldMetadata(alias="membersOverrides") - ] = pydantic.Field(default=None) - """ - This can be used to override all the assistants' settings and provide values for their template variables. - - Both `membersOverrides` and `members[n].assistantOverrides` can be used together. First, `members[n].assistantOverrides` is applied. Then, `membersOverrides` is applied as a global override. - """ - + typing.Optional["AssistantOverrides"], + FieldMetadata(alias="membersOverrides"), + pydantic.Field( + alias="membersOverrides", + description="This can be used to override all the assistants' settings and provide values for their template variables.\n\nBoth `membersOverrides` and `members[n].assistantOverrides` can be used together. First, `members[n].assistantOverrides` is applied. Then, `membersOverrides` is applied as a global override.", + ), + ] = None id: str = pydantic.Field() """ This is the unique identifier for the squad. """ - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field() - """ - This is the unique identifier for the org that this squad belongs to. - """ - - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the squad was created. - """ - - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the squad was last updated. - """ + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this squad belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the squad was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", description="This is the ISO 8601 date-time string of when the squad was last updated." + ), + ] if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -68,6 +70,121 @@ class Config: extra = pydantic.Extra.allow -update_forward_refs(CallbackStep, Squad=Squad) -update_forward_refs(CreateWorkflowBlockDto, Squad=Squad) -update_forward_refs(HandoffStep, Squad=Squad) +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + Squad, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/squad_member_dto.py b/src/vapi/types/squad_member_dto.py index ee6a85ea..36dc4aac 100644 --- a/src/vapi/types/squad_member_dto.py +++ b/src/vapi/types/squad_member_dto.py @@ -1,49 +1,43 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -from .callback_step import CallbackStep -from .create_workflow_block_dto import CreateWorkflowBlockDto -from .handoff_step import HandoffStep -import typing_extensions + import typing -from ..core.serialization import FieldMetadata -import pydantic -from .create_assistant_dto import CreateAssistantDto -from .assistant_overrides import AssistantOverrides -from .transfer_destination_assistant import TransferDestinationAssistant -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.pydantic_utilities import update_forward_refs +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class SquadMemberDto(UniversalBaseModel): - assistant_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="assistantId")] = ( - pydantic.Field(default=None) - ) - """ - This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead. - """ - assistant: typing.Optional[CreateAssistantDto] = pydantic.Field(default=None) +class SquadMemberDto(UncheckedBaseModel): + assistant_destinations: typing_extensions.Annotated[ + typing.Optional[typing.List["SquadMemberDtoAssistantDestinationsItem"]], + FieldMetadata(alias="assistantDestinations"), + pydantic.Field(alias="assistantDestinations"), + ] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assistantId"), + pydantic.Field( + alias="assistantId", + description="This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead.", + ), + ] = None + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) """ This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. """ assistant_overrides: typing_extensions.Annotated[ - typing.Optional[AssistantOverrides], FieldMetadata(alias="assistantOverrides") - ] = pydantic.Field(default=None) - """ - This can be used to override the assistant's settings and provide values for it's template variables. - """ - - assistant_destinations: typing_extensions.Annotated[ - typing.Optional[typing.List[TransferDestinationAssistant]], FieldMetadata(alias="assistantDestinations") - ] = pydantic.Field(default=None) - """ - These are the others assistants that this assistant can transfer to. - - If the assistant already has transfer call tool, these destinations are just appended to existing ones. - """ + typing.Optional["AssistantOverrides"], + FieldMetadata(alias="assistantOverrides"), + pydantic.Field( + alias="assistantOverrides", + description="This can be used to override the assistant's settings and provide values for it's template variables.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -55,6 +49,119 @@ class Config: extra = pydantic.Extra.allow -update_forward_refs(CallbackStep, SquadMemberDto=SquadMemberDto) -update_forward_refs(CreateWorkflowBlockDto, SquadMemberDto=SquadMemberDto) -update_forward_refs(HandoffStep, SquadMemberDto=SquadMemberDto) +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + SquadMemberDto, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/squad_member_dto_assistant_destinations_item.py b/src/vapi/types/squad_member_dto_assistant_destinations_item.py new file mode 100644 index 00000000..c7864eea --- /dev/null +++ b/src/vapi/types/squad_member_dto_assistant_destinations_item.py @@ -0,0 +1,11 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +from .transfer_destination_assistant import TransferDestinationAssistant + +if typing.TYPE_CHECKING: + from .handoff_destination_assistant import HandoffDestinationAssistant +SquadMemberDtoAssistantDestinationsItem = typing.Union[TransferDestinationAssistant, "HandoffDestinationAssistant"] diff --git a/src/vapi/types/ssrf_security_filter.py b/src/vapi/types/ssrf_security_filter.py new file mode 100644 index 00000000..586c3f06 --- /dev/null +++ b/src/vapi/types/ssrf_security_filter.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .ssrf_security_filter_type import SsrfSecurityFilterType + + +class SsrfSecurityFilter(UncheckedBaseModel): + type: SsrfSecurityFilterType = pydantic.Field() + """ + The type of security threat to filter. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/ssrf_security_filter_type.py b/src/vapi/types/ssrf_security_filter_type.py new file mode 100644 index 00000000..cae99a6f --- /dev/null +++ b/src/vapi/types/ssrf_security_filter_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +SsrfSecurityFilterType = typing.Union[typing.Literal["ssrf"], typing.Any] diff --git a/src/vapi/types/start_speaking_plan.py b/src/vapi/types/start_speaking_plan.py index 280eb8db..5c0c0d0c 100644 --- a/src/vapi/types/start_speaking_plan.py +++ b/src/vapi/types/start_speaking_plan.py @@ -1,56 +1,56 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions import typing -from ..core.serialization import FieldMetadata + import pydantic -from .transcription_endpointing_plan import TranscriptionEndpointingPlan +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .start_speaking_plan_custom_endpointing_rules_item import StartSpeakingPlanCustomEndpointingRulesItem +from .start_speaking_plan_smart_endpointing_enabled import StartSpeakingPlanSmartEndpointingEnabled +from .start_speaking_plan_smart_endpointing_plan import StartSpeakingPlanSmartEndpointingPlan +from .transcription_endpointing_plan import TranscriptionEndpointingPlan -class StartSpeakingPlan(UniversalBaseModel): - wait_seconds: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="waitSeconds")] = ( - pydantic.Field(default=None) - ) - """ - This is how long assistant waits before speaking. Defaults to 0.4. - - This is the minimum it will wait but if there is latency is the pipeline, this minimum will be exceeded. This is really a stopgap in case the pipeline is moving too fast. - - Example: - - - If model generates tokens and voice generates bytes within 100ms, the pipeline still waits 300ms before outputting speech. - - Usage: - - - If the customer is taking long pauses, set this to a higher value. - - If the assistant is accidentally jumping in too much, set this to a higher value. - - @default 0.4 - """ - +class StartSpeakingPlan(UncheckedBaseModel): + wait_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="waitSeconds"), + pydantic.Field( + alias="waitSeconds", + description="This is how long assistant waits before speaking. Defaults to 0.4.\n\nThis is the minimum it will wait but if there is latency is the pipeline, this minimum will be exceeded. This is intended as a stopgap in case the pipeline is moving too fast.\n\nExample:\n- If model generates tokens and voice generates bytes within 100ms, the pipeline still waits 300ms before outputting speech.\n\nUsage:\n- If the customer is taking long pauses, set this to a higher value.\n- If the assistant is accidentally jumping in too much, set this to a higher value.\n\n@default 0.4", + ), + ] = None smart_endpointing_enabled: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="smartEndpointingEnabled") - ] = pydantic.Field(default=None) - """ - This determines if a customer speech is considered done (endpointing) using the VAP model on customer's speech. This is good for middle-of-thought detection. - - Once an endpoint is triggered, the request is sent to `assistant.model`. - - Default `false` since experimental. - - @default false - """ - + typing.Optional[StartSpeakingPlanSmartEndpointingEnabled], + FieldMetadata(alias="smartEndpointingEnabled"), + pydantic.Field(alias="smartEndpointingEnabled"), + ] = None + smart_endpointing_plan: typing_extensions.Annotated[ + typing.Optional[StartSpeakingPlanSmartEndpointingPlan], + FieldMetadata(alias="smartEndpointingPlan"), + pydantic.Field( + alias="smartEndpointingPlan", + description="This is the plan for smart endpointing. Pick between Vapi smart endpointing, LiveKit, or custom endpointing model (or nothing). We strongly recommend using livekit endpointing when working in English. LiveKit endpointing is not supported in other languages, yet.\n\nIf this is set, it will override and take precedence over `transcriptionEndpointingPlan`.\nThis plan will still be overridden by any matching `customEndpointingRules`.\n\nIf this is not set, the system will automatically use the transcriber's built-in endpointing capabilities if available.", + ), + ] = None + custom_endpointing_rules: typing_extensions.Annotated[ + typing.Optional[typing.List[StartSpeakingPlanCustomEndpointingRulesItem]], + FieldMetadata(alias="customEndpointingRules"), + pydantic.Field( + alias="customEndpointingRules", + description='These are the custom endpointing rules to set an endpointing timeout based on a regex on the customer\'s speech or the assistant\'s last message.\n\nUsage:\n- If you have yes/no questions like "are you interested in a loan?", you can set a shorter timeout.\n- If you have questions where the customer may pause to look up information like "what\'s my account number?", you can set a longer timeout.\n- If you want to wait longer while customer is enumerating a list of numbers, you can set a longer timeout.\n\nThese rules have the highest precedence and will override both `smartEndpointingPlan` and `transcriptionEndpointingPlan` when a rule is matched.\n\nThe rules are evaluated in order and the first one that matches will be used.\n\nOrder of precedence for endpointing:\n1. customEndpointingRules (if any match)\n2. smartEndpointingPlan (if set)\n3. transcriptionEndpointingPlan\n\n@default []', + ), + ] = None transcription_endpointing_plan: typing_extensions.Annotated[ - typing.Optional[TranscriptionEndpointingPlan], FieldMetadata(alias="transcriptionEndpointingPlan") - ] = pydantic.Field(default=None) - """ - This determines how a customer speech is considered done (endpointing) using the transcription of customer's speech. - - Once an endpoint is triggered, the request is sent to `assistant.model`. - """ + typing.Optional[TranscriptionEndpointingPlan], + FieldMetadata(alias="transcriptionEndpointingPlan"), + pydantic.Field( + alias="transcriptionEndpointingPlan", + description="This determines how a customer speech is considered done (endpointing) using the transcription of customer's speech.\n\nOnce an endpoint is triggered, the request is sent to `assistant.model`.\n\nNote: This plan is only used if `smartEndpointingPlan` is not set and transcriber does not have built-in endpointing capabilities. If both are provided, `smartEndpointingPlan` takes precedence.\nThis plan will also be overridden by any matching `customEndpointingRules`.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/start_speaking_plan_custom_endpointing_rules_item.py b/src/vapi/types/start_speaking_plan_custom_endpointing_rules_item.py new file mode 100644 index 00000000..c4778b7c --- /dev/null +++ b/src/vapi/types/start_speaking_plan_custom_endpointing_rules_item.py @@ -0,0 +1,98 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .regex_option import RegexOption + + +class StartSpeakingPlanCustomEndpointingRulesItem_Assistant(UncheckedBaseModel): + type: typing.Literal["assistant"] = "assistant" + regex: str + regex_options: typing_extensions.Annotated[ + typing.Optional[typing.List[RegexOption]], + FieldMetadata(alias="regexOptions"), + pydantic.Field(alias="regexOptions"), + ] = None + timeout_seconds: typing_extensions.Annotated[ + float, FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class StartSpeakingPlanCustomEndpointingRulesItem_Customer(UncheckedBaseModel): + type: typing.Literal["customer"] = "customer" + regex: str + regex_options: typing_extensions.Annotated[ + typing.Optional[typing.List[RegexOption]], + FieldMetadata(alias="regexOptions"), + pydantic.Field(alias="regexOptions"), + ] = None + timeout_seconds: typing_extensions.Annotated[ + float, FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class StartSpeakingPlanCustomEndpointingRulesItem_Both(UncheckedBaseModel): + type: typing.Literal["both"] = "both" + assistant_regex: typing_extensions.Annotated[ + str, FieldMetadata(alias="assistantRegex"), pydantic.Field(alias="assistantRegex") + ] + assistant_regex_options: typing_extensions.Annotated[ + typing.Optional[typing.List[RegexOption]], + FieldMetadata(alias="assistantRegexOptions"), + pydantic.Field(alias="assistantRegexOptions"), + ] = None + customer_regex: typing_extensions.Annotated[ + str, FieldMetadata(alias="customerRegex"), pydantic.Field(alias="customerRegex") + ] + customer_regex_options: typing_extensions.Annotated[ + typing.Optional[typing.List[RegexOption]], + FieldMetadata(alias="customerRegexOptions"), + pydantic.Field(alias="customerRegexOptions"), + ] = None + timeout_seconds: typing_extensions.Annotated[ + float, FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +StartSpeakingPlanCustomEndpointingRulesItem = typing_extensions.Annotated[ + typing.Union[ + StartSpeakingPlanCustomEndpointingRulesItem_Assistant, + StartSpeakingPlanCustomEndpointingRulesItem_Customer, + StartSpeakingPlanCustomEndpointingRulesItem_Both, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/start_speaking_plan_smart_endpointing_enabled.py b/src/vapi/types/start_speaking_plan_smart_endpointing_enabled.py new file mode 100644 index 00000000..db23add8 --- /dev/null +++ b/src/vapi/types/start_speaking_plan_smart_endpointing_enabled.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .start_speaking_plan_smart_endpointing_enabled_one import StartSpeakingPlanSmartEndpointingEnabledOne + +StartSpeakingPlanSmartEndpointingEnabled = typing.Union[bool, StartSpeakingPlanSmartEndpointingEnabledOne] diff --git a/src/vapi/types/start_speaking_plan_smart_endpointing_enabled_one.py b/src/vapi/types/start_speaking_plan_smart_endpointing_enabled_one.py new file mode 100644 index 00000000..99fe46cf --- /dev/null +++ b/src/vapi/types/start_speaking_plan_smart_endpointing_enabled_one.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +StartSpeakingPlanSmartEndpointingEnabledOne = typing.Union[typing.Literal["livekit"], typing.Any] diff --git a/src/vapi/types/start_speaking_plan_smart_endpointing_plan.py b/src/vapi/types/start_speaking_plan_smart_endpointing_plan.py new file mode 100644 index 00000000..ece1e7cc --- /dev/null +++ b/src/vapi/types/start_speaking_plan_smart_endpointing_plan.py @@ -0,0 +1,11 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .custom_endpointing_model_smart_endpointing_plan import CustomEndpointingModelSmartEndpointingPlan +from .livekit_smart_endpointing_plan import LivekitSmartEndpointingPlan +from .vapi_smart_endpointing_plan import VapiSmartEndpointingPlan + +StartSpeakingPlanSmartEndpointingPlan = typing.Union[ + VapiSmartEndpointingPlan, LivekitSmartEndpointingPlan, CustomEndpointingModelSmartEndpointingPlan +] diff --git a/src/vapi/types/step_destination.py b/src/vapi/types/step_destination.py deleted file mode 100644 index b05bee53..00000000 --- a/src/vapi/types/step_destination.py +++ /dev/null @@ -1,28 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from ..core.pydantic_utilities import UniversalBaseModel -import typing -from .step_destination_conditions_item import StepDestinationConditionsItem -import pydantic -import typing_extensions -from ..core.serialization import FieldMetadata -from ..core.pydantic_utilities import IS_PYDANTIC_V2 - - -class StepDestination(UniversalBaseModel): - type: typing.Literal["step"] = "step" - conditions: typing.Optional[typing.List[StepDestinationConditionsItem]] = pydantic.Field(default=None) - """ - This is an optional array of conditions that must be met for this destination to be triggered. If empty, this is the default destination that the step transfers to. - """ - - step_name: typing_extensions.Annotated[str, FieldMetadata(alias="stepName")] - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/vapi/types/step_destination_conditions_item.py b/src/vapi/types/step_destination_conditions_item.py deleted file mode 100644 index 9698a1c9..00000000 --- a/src/vapi/types/step_destination_conditions_item.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from .model_based_condition import ModelBasedCondition -from .rule_based_condition import RuleBasedCondition - -StepDestinationConditionsItem = typing.Union[ModelBasedCondition, RuleBasedCondition] diff --git a/src/vapi/types/stop_speaking_plan.py b/src/vapi/types/stop_speaking_plan.py index 4d22a7ec..ab1a6b9f 100644 --- a/src/vapi/types/stop_speaking_plan.py +++ b/src/vapi/types/stop_speaking_plan.py @@ -1,59 +1,55 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions import typing -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class StopSpeakingPlan(UniversalBaseModel): - num_words: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="numWords")] = pydantic.Field( - default=None - ) - """ - This is the number of words that the customer has to say before the assistant will stop talking. - - Words like "stop", "actually", "no", etc. will always interrupt immediately regardless of this value. - - Words like "okay", "yeah", "right" will never interrupt. - - When set to 0, `voiceSeconds` is used in addition to the transcriptions to determine the customer has started speaking. - - Defaults to 0. - - @default 0 - """ - - voice_seconds: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="voiceSeconds")] = ( - pydantic.Field(default=None) - ) - """ - This is the seconds customer has to speak before the assistant stops talking. This uses the VAD (Voice Activity Detection) spike to determine if the customer has started speaking. - - Considerations: - - - A lower value might be more responsive but could potentially pick up non-speech sounds. - - A higher value reduces false positives but might slightly delay the detection of speech onset. - - This is only used if `numWords` is set to 0. - - Defaults to 0.2 - - @default 0.2 - """ - - backoff_seconds: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="backoffSeconds")] = ( - pydantic.Field(default=None) - ) - """ - This is the seconds to wait before the assistant will start talking again after being interrupted. - - Defaults to 1. - - @default 1 - """ +class StopSpeakingPlan(UncheckedBaseModel): + num_words: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="numWords"), + pydantic.Field( + alias="numWords", + description='This is the number of words that the customer has to say before the assistant will stop talking.\n\nWords like "stop", "actually", "no", etc. will always interrupt immediately regardless of this value.\n\nWords like "okay", "yeah", "right" will never interrupt.\n\nWhen set to 0, `voiceSeconds` is used in addition to the transcriptions to determine the customer has started speaking.\n\nDefaults to 0.\n\n@default 0', + ), + ] = None + voice_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="voiceSeconds"), + pydantic.Field( + alias="voiceSeconds", + description="This is the seconds customer has to speak before the assistant stops talking. This uses the VAD (Voice Activity Detection) spike to determine if the customer has started speaking.\n\nConsiderations:\n- A lower value might be more responsive but could potentially pick up non-speech sounds.\n- A higher value reduces false positives but might slightly delay the detection of speech onset.\n\nThis is only used if `numWords` is set to 0.\n\nDefaults to 0.2\n\n@default 0.2", + ), + ] = None + backoff_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="backoffSeconds"), + pydantic.Field( + alias="backoffSeconds", + description="This is the seconds to wait before the assistant will start talking again after being interrupted.\n\nDefaults to 1.\n\n@default 1", + ), + ] = None + acknowledgement_phrases: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="acknowledgementPhrases"), + pydantic.Field( + alias="acknowledgementPhrases", + description="These are the phrases that will never interrupt the assistant, even if numWords threshold is met.\nThese are typically acknowledgement or backchanneling phrases.", + ), + ] = None + interruption_phrases: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="interruptionPhrases"), + pydantic.Field( + alias="interruptionPhrases", + description="These are the phrases that will always interrupt the assistant immediately, regardless of numWords.\nThese are typically phrases indicating disagreement or desire to stop.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/structured_data_multi_plan.py b/src/vapi/types/structured_data_multi_plan.py new file mode 100644 index 00000000..755c77e3 --- /dev/null +++ b/src/vapi/types/structured_data_multi_plan.py @@ -0,0 +1,34 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .structured_data_plan import StructuredDataPlan + + +class StructuredDataMultiPlan(UncheckedBaseModel): + key: str = pydantic.Field() + """ + This is the key of the structured data plan in the catalog. + """ + + plan: StructuredDataPlan = pydantic.Field() + """ + This is an individual structured data plan in the catalog. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(StructuredDataMultiPlan) diff --git a/src/vapi/types/structured_data_plan.py b/src/vapi/types/structured_data_plan.py index cf5a06ac..8108b4c4 100644 --- a/src/vapi/types/structured_data_plan.py +++ b/src/vapi/types/structured_data_plan.py @@ -1,26 +1,37 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +from __future__ import annotations + import typing + import pydantic import typing_extensions -from .json_schema import JsonSchema +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.serialization import FieldMetadata -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel -class StructuredDataPlan(UniversalBaseModel): - messages: typing.Optional[typing.List[typing.Dict[str, typing.Optional[typing.Any]]]] = pydantic.Field(default=None) +class StructuredDataPlan(UncheckedBaseModel): + messages: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = pydantic.Field(default=None) """ These are the messages used to generate the structured data. - @default: ` [ { "role": "system", "content": "You are an expert data extractor. You will be given a transcript of a call. Extract structured data per the JSON Schema. DO NOT return anything except the structured data.\n\nJson Schema:\\n{{schema}}\n\nOnly respond with the JSON." }, { "role": "user", "content": "Here is the transcript:\n\n{{transcript}}\n\n" } ]` + @default: ``` + [ + { + "role": "system", + "content": "You are an expert data extractor. You will be given a transcript of a call. Extract structured data per the JSON Schema. DO NOT return anything except the structured data.\\n\\nJson Schema:\\\\n{{schema}}\\n\\nOnly respond with the JSON." + }, + { + "role": "user", + "content": "Here is the transcript:\\n\\n{{transcript}}\\n\\n. Here is the ended reason of the call:\\n\\n{{endedReason}}\\n\\n" + } + ]``` You can customize by providing any messages you want. Here are the template variables available: - - - {{transcript}}: the transcript of the call from `call.artifact.transcript`- {{systemPrompt}}: the system prompt of the call from `assistant.model.messages[type=system].content`- {{schema}}: the schema of the structured data from `structuredDataPlan.schema` + - {{transcript}}: the transcript of the call from `call.artifact.transcript`- {{systemPrompt}}: the system prompt of the call from `assistant.model.messages[type=system].content`- {{messages}}: the messages of the call from `assistant.model.messages`- {{schema}}: the schema of the structured data from `structuredDataPlan.schema`- {{endedReason}}: the ended reason of the call from `call.endedReason` """ enabled: typing.Optional[bool] = pydantic.Field(default=None) @@ -28,33 +39,27 @@ class StructuredDataPlan(UniversalBaseModel): This determines whether structured data is generated and stored in `call.analysis.structuredData`. Defaults to false. Usage: - - If you want to extract structured data, set this to true and provide a `schema`. @default false """ - schema_: typing_extensions.Annotated[typing.Optional[JsonSchema], FieldMetadata(alias="schema")] = pydantic.Field( - default=None - ) - """ - This is the schema of the structured data. The output is stored in `call.analysis.structuredData`. - - Complete guide on JSON Schema can be found [here](https://ajv.js.org/json-schema.html#json-data-type). - """ - - timeout_seconds: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="timeoutSeconds")] = ( - pydantic.Field(default=None) - ) - """ - This is how long the request is tried before giving up. When request times out, `call.analysis.structuredData` will be empty. - - Usage: - - - To guarantee the structured data is generated, set this value high. Note, this will delay the end of call report in cases where model is slow to respond. - - @default 5 seconds - """ + schema_: typing_extensions.Annotated[ + typing.Optional["JsonSchema"], + FieldMetadata(alias="schema"), + pydantic.Field( + alias="schema", + description="This is the schema of the structured data. The output is stored in `call.analysis.structuredData`.\n\nComplete guide on JSON Schema can be found [here](https://ajv.js.org/json-schema.html#json-data-type).", + ), + ] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="timeoutSeconds"), + pydantic.Field( + alias="timeoutSeconds", + description="This is how long the request is tried before giving up. When request times out, `call.analysis.structuredData` will be empty.\n\nUsage:\n- To guarantee the structured data is generated, set this value high. Note, this will delay the end of call report in cases where model is slow to respond.\n\n@default 5 seconds", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -64,3 +69,8 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .json_schema import JsonSchema # noqa: E402, I001 + +update_forward_refs(StructuredDataPlan, JsonSchema=JsonSchema) diff --git a/src/vapi/types/structured_output.py b/src/vapi/types/structured_output.py new file mode 100644 index 00000000..6af644e1 --- /dev/null +++ b/src/vapi/types/structured_output.py @@ -0,0 +1,144 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .compliance_override import ComplianceOverride +from .structured_output_model import StructuredOutputModel +from .structured_output_type import StructuredOutputType + + +class StructuredOutput(UncheckedBaseModel): + type: typing.Optional[StructuredOutputType] = pydantic.Field(default=None) + """ + This is the type of structured output. + + - 'ai': Uses an LLM to extract structured data from the conversation (default). + - 'regex': Uses a regex pattern to extract data from the transcript without an LLM. + """ + + regex: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the regex pattern to match against the transcript. + + Only used when type is 'regex'. Supports both raw patterns (e.g. '\\d+') and + regex literal format (e.g. '/\\d+/gi'). Uses RE2 syntax for safety. + + The result depends on the schema type: + - boolean: true if the pattern matches, false otherwise + - string: the first match or first capture group + - number/integer: the first match parsed as a number + - array: all matches + """ + + model: typing.Optional[StructuredOutputModel] = pydantic.Field(default=None) + """ + This is the model that will be used to extract the structured output. + + To provide your own custom system and user prompts for structured output extraction, populate the messages array with your system and user messages. You can specify liquid templating in your system and user messages. + Between the system or user messages, you must reference either 'transcript' or 'messages' with the `{{}}` syntax to access the conversation history. + Between the system or user messages, you must reference a variation of the structured output with the `{{}}` syntax to access the structured output definition. + i.e.: + `{{structuredOutput}}` + `{{structuredOutput.name}}` + `{{structuredOutput.description}}` + `{{structuredOutput.schema}}` + + If model is not specified, GPT-4.1 will be used by default for extraction, utilizing default system and user prompts. + If messages or required fields are not specified, the default system and user prompts will be used. + """ + + compliance_plan: typing_extensions.Annotated[ + typing.Optional[ComplianceOverride], + FieldMetadata(alias="compliancePlan"), + pydantic.Field( + alias="compliancePlan", + description="Compliance configuration for this output. Only enable overrides if no sensitive data will be stored.", + ), + ] = None + id: str = pydantic.Field() + """ + This is the unique identifier for the structured output. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", + description="This is the unique identifier for the org that this structured output belongs to.", + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", + description="This is the ISO 8601 date-time string of when the structured output was created.", + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the structured output was last updated.", + ), + ] + name: str = pydantic.Field() + """ + This is the name of the structured output. + """ + + description: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the description of what the structured output extracts. + + Use this to provide context about what data will be extracted and how it will be used. + """ + + assistant_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="assistantIds"), + pydantic.Field( + alias="assistantIds", + description="These are the assistant IDs that this structured output is linked to.\n\nWhen linked to assistants, this structured output will be available for extraction during those assistant's calls.", + ), + ] = None + workflow_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="workflowIds"), + pydantic.Field( + alias="workflowIds", + description="These are the workflow IDs that this structured output is linked to.\n\nWhen linked to workflows, this structured output will be available for extraction during those workflow's execution.", + ), + ] = None + schema_: typing_extensions.Annotated[ + "JsonSchema", + FieldMetadata(alias="schema"), + pydantic.Field( + alias="schema", + description="This is the JSON Schema definition for the structured output.\n\nDefines the structure and validation rules for the data that will be extracted. Supports all JSON Schema features including:\n- Objects and nested properties\n- Arrays and array validation\n- String, number, boolean, and null types\n- Enums and const values\n- Validation constraints (min/max, patterns, etc.)\n- Composition with allOf, anyOf, oneOf", + ), + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .json_schema import JsonSchema # noqa: E402, I001 + +update_forward_refs(StructuredOutput, JsonSchema=JsonSchema) diff --git a/src/vapi/types/structured_output_evaluation_result.py b/src/vapi/types/structured_output_evaluation_result.py new file mode 100644 index 00000000..e43662b5 --- /dev/null +++ b/src/vapi/types/structured_output_evaluation_result.py @@ -0,0 +1,84 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .structured_output_evaluation_result_comparator import StructuredOutputEvaluationResultComparator +from .structured_output_evaluation_result_expected_value import StructuredOutputEvaluationResultExpectedValue +from .structured_output_evaluation_result_extracted_value import StructuredOutputEvaluationResultExtractedValue + + +class StructuredOutputEvaluationResult(UncheckedBaseModel): + structured_output_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="structuredOutputId"), + pydantic.Field( + alias="structuredOutputId", + description="This is the ID of the structured output that was evaluated.\nWill be 'inline' for inline structured output definitions.", + ), + ] + name: str = pydantic.Field() + """ + This is the name of the structured output. + """ + + extracted_value: typing_extensions.Annotated[ + typing.Optional[StructuredOutputEvaluationResultExtractedValue], + FieldMetadata(alias="extractedValue"), + pydantic.Field( + alias="extractedValue", description="This is the value extracted from the call by the structured output." + ), + ] = None + expected_value: typing_extensions.Annotated[ + StructuredOutputEvaluationResultExpectedValue, + FieldMetadata(alias="expectedValue"), + pydantic.Field( + alias="expectedValue", description="This is the expected value that was defined in the evaluation plan." + ), + ] + comparator: StructuredOutputEvaluationResultComparator = pydantic.Field() + """ + This is the comparison operator used for evaluation. + """ + + passed: bool = pydantic.Field() + """ + This indicates whether the evaluation passed (extracted value matched expected value using comparator). + """ + + required: bool = pydantic.Field() + """ + This indicates whether this evaluation was required for the simulation to pass. + """ + + error: typing.Optional[str] = pydantic.Field(default=None) + """ + This contains any error that occurred during extraction. + """ + + is_skipped: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="isSkipped"), + pydantic.Field( + alias="isSkipped", + description="This indicates whether this evaluation was skipped (e.g., multimodal in chat mode).", + ), + ] = None + skip_reason: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="skipReason"), + pydantic.Field(alias="skipReason", description="This contains the reason for skipping the evaluation."), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/structured_output_evaluation_result_comparator.py b/src/vapi/types/structured_output_evaluation_result_comparator.py new file mode 100644 index 00000000..b1799154 --- /dev/null +++ b/src/vapi/types/structured_output_evaluation_result_comparator.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +StructuredOutputEvaluationResultComparator = typing.Union[typing.Literal["=", "!=", ">", "<", ">=", "<="], typing.Any] diff --git a/src/vapi/types/structured_output_evaluation_result_expected_value.py b/src/vapi/types/structured_output_evaluation_result_expected_value.py new file mode 100644 index 00000000..3a8accc6 --- /dev/null +++ b/src/vapi/types/structured_output_evaluation_result_expected_value.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +StructuredOutputEvaluationResultExpectedValue = typing.Union[float, str, bool] diff --git a/src/vapi/types/structured_output_evaluation_result_extracted_value.py b/src/vapi/types/structured_output_evaluation_result_extracted_value.py new file mode 100644 index 00000000..4426ce53 --- /dev/null +++ b/src/vapi/types/structured_output_evaluation_result_extracted_value.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +StructuredOutputEvaluationResultExtractedValue = typing.Union[float, str, bool] diff --git a/src/vapi/types/structured_output_filter_dto.py b/src/vapi/types/structured_output_filter_dto.py new file mode 100644 index 00000000..9fe67783 --- /dev/null +++ b/src/vapi/types/structured_output_filter_dto.py @@ -0,0 +1,61 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class StructuredOutputFilterDto(UncheckedBaseModel): + eq: typing.Optional[str] = pydantic.Field(default=None) + """ + Equal to + """ + + neq: typing.Optional[str] = pydantic.Field(default=None) + """ + Not equal to + """ + + gt: typing.Optional[str] = pydantic.Field(default=None) + """ + Greater than + """ + + gte: typing.Optional[str] = pydantic.Field(default=None) + """ + Greater than or equal to + """ + + lt: typing.Optional[str] = pydantic.Field(default=None) + """ + Less than + """ + + lte: typing.Optional[str] = pydantic.Field(default=None) + """ + Less than or equal to + """ + + contains: typing.Optional[str] = pydantic.Field(default=None) + """ + Contains + """ + + not_contains: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="notContains"), + pydantic.Field(alias="notContains", description="Not contains"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/structured_output_model.py b/src/vapi/types/structured_output_model.py new file mode 100644 index 00000000..27e76ed5 --- /dev/null +++ b/src/vapi/types/structured_output_model.py @@ -0,0 +1,211 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .anthropic_thinking_config import AnthropicThinkingConfig +from .workflow_anthropic_bedrock_model_model import WorkflowAnthropicBedrockModelModel +from .workflow_anthropic_model_model import WorkflowAnthropicModelModel +from .workflow_custom_model_metadata_send_mode import WorkflowCustomModelMetadataSendMode +from .workflow_google_model_model import WorkflowGoogleModelModel +from .workflow_open_ai_model_model import WorkflowOpenAiModelModel + + +class StructuredOutputModel_Openai(UncheckedBaseModel): + """ + This is the model that will be used to extract the structured output. + + To provide your own custom system and user prompts for structured output extraction, populate the messages array with your system and user messages. You can specify liquid templating in your system and user messages. + Between the system or user messages, you must reference either 'transcript' or 'messages' with the `{{}}` syntax to access the conversation history. + Between the system or user messages, you must reference a variation of the structured output with the `{{}}` syntax to access the structured output definition. + i.e.: + `{{structuredOutput}}` + `{{structuredOutput.name}}` + `{{structuredOutput.description}}` + `{{structuredOutput.schema}}` + + If model is not specified, GPT-4.1 will be used by default for extraction, utilizing default system and user prompts. + If messages or required fields are not specified, the default system and user prompts will be used. + """ + + provider: typing.Literal["openai"] = "openai" + model: WorkflowOpenAiModelModel + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class StructuredOutputModel_Anthropic(UncheckedBaseModel): + """ + This is the model that will be used to extract the structured output. + + To provide your own custom system and user prompts for structured output extraction, populate the messages array with your system and user messages. You can specify liquid templating in your system and user messages. + Between the system or user messages, you must reference either 'transcript' or 'messages' with the `{{}}` syntax to access the conversation history. + Between the system or user messages, you must reference a variation of the structured output with the `{{}}` syntax to access the structured output definition. + i.e.: + `{{structuredOutput}}` + `{{structuredOutput.name}}` + `{{structuredOutput.description}}` + `{{structuredOutput.schema}}` + + If model is not specified, GPT-4.1 will be used by default for extraction, utilizing default system and user prompts. + If messages or required fields are not specified, the default system and user prompts will be used. + """ + + provider: typing.Literal["anthropic"] = "anthropic" + model: WorkflowAnthropicModelModel + thinking: typing.Optional[AnthropicThinkingConfig] = None + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class StructuredOutputModel_AnthropicBedrock(UncheckedBaseModel): + """ + This is the model that will be used to extract the structured output. + + To provide your own custom system and user prompts for structured output extraction, populate the messages array with your system and user messages. You can specify liquid templating in your system and user messages. + Between the system or user messages, you must reference either 'transcript' or 'messages' with the `{{}}` syntax to access the conversation history. + Between the system or user messages, you must reference a variation of the structured output with the `{{}}` syntax to access the structured output definition. + i.e.: + `{{structuredOutput}}` + `{{structuredOutput.name}}` + `{{structuredOutput.description}}` + `{{structuredOutput.schema}}` + + If model is not specified, GPT-4.1 will be used by default for extraction, utilizing default system and user prompts. + If messages or required fields are not specified, the default system and user prompts will be used. + """ + + provider: typing.Literal["anthropic-bedrock"] = "anthropic-bedrock" + model: WorkflowAnthropicBedrockModelModel + thinking: typing.Optional[AnthropicThinkingConfig] = None + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class StructuredOutputModel_Google(UncheckedBaseModel): + """ + This is the model that will be used to extract the structured output. + + To provide your own custom system and user prompts for structured output extraction, populate the messages array with your system and user messages. You can specify liquid templating in your system and user messages. + Between the system or user messages, you must reference either 'transcript' or 'messages' with the `{{}}` syntax to access the conversation history. + Between the system or user messages, you must reference a variation of the structured output with the `{{}}` syntax to access the structured output definition. + i.e.: + `{{structuredOutput}}` + `{{structuredOutput.name}}` + `{{structuredOutput.description}}` + `{{structuredOutput.schema}}` + + If model is not specified, GPT-4.1 will be used by default for extraction, utilizing default system and user prompts. + If messages or required fields are not specified, the default system and user prompts will be used. + """ + + provider: typing.Literal["google"] = "google" + model: WorkflowGoogleModelModel + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class StructuredOutputModel_CustomLlm(UncheckedBaseModel): + """ + This is the model that will be used to extract the structured output. + + To provide your own custom system and user prompts for structured output extraction, populate the messages array with your system and user messages. You can specify liquid templating in your system and user messages. + Between the system or user messages, you must reference either 'transcript' or 'messages' with the `{{}}` syntax to access the conversation history. + Between the system or user messages, you must reference a variation of the structured output with the `{{}}` syntax to access the structured output definition. + i.e.: + `{{structuredOutput}}` + `{{structuredOutput.name}}` + `{{structuredOutput.description}}` + `{{structuredOutput.schema}}` + + If model is not specified, GPT-4.1 will be used by default for extraction, utilizing default system and user prompts. + If messages or required fields are not specified, the default system and user prompts will be used. + """ + + provider: typing.Literal["custom-llm"] = "custom-llm" + metadata_send_mode: typing_extensions.Annotated[ + typing.Optional[WorkflowCustomModelMetadataSendMode], + FieldMetadata(alias="metadataSendMode"), + pydantic.Field(alias="metadataSendMode"), + ] = None + url: str + headers: typing.Optional[typing.Dict[str, typing.Any]] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + model: str + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +StructuredOutputModel = typing_extensions.Annotated[ + typing.Union[ + StructuredOutputModel_Openai, + StructuredOutputModel_Anthropic, + StructuredOutputModel_AnthropicBedrock, + StructuredOutputModel_Google, + StructuredOutputModel_CustomLlm, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/structured_output_paginated_response.py b/src/vapi/types/structured_output_paginated_response.py new file mode 100644 index 00000000..c03572b4 --- /dev/null +++ b/src/vapi/types/structured_output_paginated_response.py @@ -0,0 +1,28 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .pagination_meta import PaginationMeta +from .structured_output import StructuredOutput + + +class StructuredOutputPaginatedResponse(UncheckedBaseModel): + results: typing.List[StructuredOutput] + metadata: PaginationMeta + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(StructuredOutputPaginatedResponse) diff --git a/src/vapi/types/structured_output_type.py b/src/vapi/types/structured_output_type.py new file mode 100644 index 00000000..d4eee46e --- /dev/null +++ b/src/vapi/types/structured_output_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +StructuredOutputType = typing.Union[typing.Literal["ai", "regex"], typing.Any] diff --git a/src/vapi/types/subscription.py b/src/vapi/types/subscription.py new file mode 100644 index 00000000..686f2719 --- /dev/null +++ b/src/vapi/types/subscription.py @@ -0,0 +1,320 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .auto_reload_plan import AutoReloadPlan +from .invoice_plan import InvoicePlan +from .subscription_minutes_included_reset_frequency import SubscriptionMinutesIncludedResetFrequency +from .subscription_status import SubscriptionStatus +from .subscription_type import SubscriptionType + + +class Subscription(UncheckedBaseModel): + id: str = pydantic.Field() + """ + This is the unique identifier for the subscription. + """ + + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field(alias="createdAt", description="This is the timestamp when the subscription was created."), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field(alias="updatedAt", description="This is the timestamp when the subscription was last updated."), + ] + type: SubscriptionType = pydantic.Field() + """ + This is the type / tier of the subscription. + """ + + status: SubscriptionStatus = pydantic.Field() + """ + This is the status of the subscription. Past due subscriptions are subscriptions + with past due payments. + """ + + credits: str = pydantic.Field() + """ + This is the number of credits the subscription currently has. + + Note: This is a string to avoid floating point precision issues. + """ + + concurrency_counter: typing_extensions.Annotated[ + float, + FieldMetadata(alias="concurrencyCounter"), + pydantic.Field( + alias="concurrencyCounter", + description="This is the total number of active calls (concurrency) across all orgs under this subscription.", + ), + ] + concurrency_limit_included: typing_extensions.Annotated[ + float, + FieldMetadata(alias="concurrencyLimitIncluded"), + pydantic.Field( + alias="concurrencyLimitIncluded", description="This is the default concurrency limit for the subscription." + ), + ] + phone_numbers_counter: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="phoneNumbersCounter"), + pydantic.Field( + alias="phoneNumbersCounter", description="This is the number of free phone numbers the subscription has" + ), + ] = None + phone_numbers_included: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="phoneNumbersIncluded"), + pydantic.Field( + alias="phoneNumbersIncluded", + description="This is the maximum number of free phone numbers the subscription can have", + ), + ] = None + concurrency_limit_purchased: typing_extensions.Annotated[ + float, + FieldMetadata(alias="concurrencyLimitPurchased"), + pydantic.Field( + alias="concurrencyLimitPurchased", + description="This is the purchased add-on concurrency limit for the subscription.", + ), + ] + monthly_charge_schedule_id: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="monthlyChargeScheduleId"), + pydantic.Field( + alias="monthlyChargeScheduleId", + description="This is the ID of the monthly job that charges for subscription add ons and phone numbers.", + ), + ] = None + monthly_credit_check_schedule_id: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="monthlyCreditCheckScheduleId"), + pydantic.Field( + alias="monthlyCreditCheckScheduleId", + description="This is the ID of the monthly job that checks whether the credit balance of the subscription\nis sufficient for the monthly charge.", + ), + ] = None + stripe_customer_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="stripeCustomerId"), + pydantic.Field(alias="stripeCustomerId", description="This is the Stripe customer ID."), + ] = None + stripe_payment_method_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="stripePaymentMethodId"), + pydantic.Field(alias="stripePaymentMethodId", description="This is the Stripe payment ID."), + ] = None + slack_support_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="slackSupportEnabled"), + pydantic.Field( + alias="slackSupportEnabled", description="If this flag is true, then the user has purchased slack support." + ), + ] = None + slack_channel_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="slackChannelId"), + pydantic.Field( + alias="slackChannelId", + description="If this subscription has a slack support subscription, the slack channel's ID will be stored here.", + ), + ] = None + hipaa_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="hipaaEnabled"), + pydantic.Field( + alias="hipaaEnabled", + description="This is the HIPAA enabled flag for the subscription. It determines whether orgs under this\nsubscription have the option to enable HIPAA compliance.", + ), + ] = None + zdr_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="zdrEnabled"), + pydantic.Field( + alias="zdrEnabled", + description="This is the ZDR enabled flag for the subscription. It determines whether orgs under this\nsubscription have the option to enable ZDR.", + ), + ] = None + data_retention_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="dataRetentionEnabled"), + pydantic.Field( + alias="dataRetentionEnabled", + description="This is the data retention enabled flag for the subscription. It determines whether orgs under this\nsubscription have the option to enable data retention.", + ), + ] = None + hipaa_common_paper_agreement_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="hipaaCommonPaperAgreementId"), + pydantic.Field( + alias="hipaaCommonPaperAgreementId", + description="This is the ID for the Common Paper agreement outlining the HIPAA contract.", + ), + ] = None + stripe_payment_method_fingerprint: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="stripePaymentMethodFingerprint"), + pydantic.Field( + alias="stripePaymentMethodFingerprint", + description="This is the Stripe fingerprint of the payment method (card). It allows us\nto detect users who try to abuse our system through multiple sign-ups.", + ), + ] = None + stripe_customer_email: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="stripeCustomerEmail"), + pydantic.Field(alias="stripeCustomerEmail", description="This is the customer's email on Stripe."), + ] = None + referred_by_email: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="referredByEmail"), + pydantic.Field(alias="referredByEmail", description="This is the email of the referrer for the subscription."), + ] = None + auto_reload_plan: typing_extensions.Annotated[ + typing.Optional[AutoReloadPlan], + FieldMetadata(alias="autoReloadPlan"), + pydantic.Field( + alias="autoReloadPlan", description="This is the auto reload plan configured for the subscription." + ), + ] = None + minutes_included: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minutesIncluded"), + pydantic.Field(alias="minutesIncluded", description="The number of minutes included in the subscription."), + ] = None + minutes_used: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minutesUsed"), + pydantic.Field(alias="minutesUsed", description="The number of minutes used in the subscription."), + ] = None + minutes_used_next_reset_at: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="minutesUsedNextResetAt"), + pydantic.Field( + alias="minutesUsedNextResetAt", + description="This is the timestamp at which the number of monthly free minutes is scheduled to reset at.", + ), + ] = None + minutes_overage_cost: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minutesOverageCost"), + pydantic.Field( + alias="minutesOverageCost", + description="The per minute charge on minutes that exceed the included minutes. Enterprise only.", + ), + ] = None + providers_included: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="providersIncluded"), + pydantic.Field( + alias="providersIncluded", + description="The list of providers included in the subscription. Enterprise only.", + ), + ] = None + outbound_calls_daily_limit: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="outboundCallsDailyLimit"), + pydantic.Field( + alias="outboundCallsDailyLimit", + description="The maximum number of outbound calls this subscription may make in a day. Resets every night.", + ), + ] = None + outbound_calls_counter: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="outboundCallsCounter"), + pydantic.Field( + alias="outboundCallsCounter", + description="The current number of outbound calls the subscription has made in the current day.", + ), + ] = None + outbound_calls_counter_next_reset_at: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="outboundCallsCounterNextResetAt"), + pydantic.Field( + alias="outboundCallsCounterNextResetAt", + description="This is the timestamp at which the outbound calls counter is scheduled to reset at.", + ), + ] = None + coupon_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="couponIds"), + pydantic.Field( + alias="couponIds", description="This is the IDs of the coupons applicable to this subscription." + ), + ] = None + coupon_usage_left: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="couponUsageLeft"), + pydantic.Field( + alias="couponUsageLeft", description="This is the number of credits left obtained from a coupon." + ), + ] = None + invoice_plan: typing_extensions.Annotated[ + typing.Optional[InvoicePlan], + FieldMetadata(alias="invoicePlan"), + pydantic.Field(alias="invoicePlan", description="This is the invoice plan for the subscription."), + ] = None + pci_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="pciEnabled"), + pydantic.Field( + alias="pciEnabled", + description="This is the PCI enabled flag for the subscription. It determines whether orgs under this\nsubscription have the option to enable PCI compliance.", + ), + ] = None + pci_common_paper_agreement_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="pciCommonPaperAgreementId"), + pydantic.Field( + alias="pciCommonPaperAgreementId", + description="This is the ID for the Common Paper agreement outlining the PCI contract.", + ), + ] = None + call_retention_days: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="callRetentionDays"), + pydantic.Field(alias="callRetentionDays", description="This is the call retention days for the subscription."), + ] = None + chat_retention_days: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="chatRetentionDays"), + pydantic.Field(alias="chatRetentionDays", description="This is the chat retention days for the subscription."), + ] = None + minutes_included_reset_frequency: typing_extensions.Annotated[ + typing.Optional[SubscriptionMinutesIncludedResetFrequency], + FieldMetadata(alias="minutesIncludedResetFrequency"), + pydantic.Field( + alias="minutesIncludedResetFrequency", + description="This is the minutes_included reset frequency for the subscription.", + ), + ] = None + rbac_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="rbacEnabled"), + pydantic.Field( + alias="rbacEnabled", + description="This is the Role Based Access Control (RBAC) enabled flag for the subscription.", + ), + ] = None + platform_fee: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="platformFee"), + pydantic.Field(alias="platformFee", description="This is the platform fee for the subscription."), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/subscription_limits.py b/src/vapi/types/subscription_limits.py new file mode 100644 index 00000000..bc48781b --- /dev/null +++ b/src/vapi/types/subscription_limits.py @@ -0,0 +1,41 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class SubscriptionLimits(UncheckedBaseModel): + concurrency_blocked: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="concurrencyBlocked"), + pydantic.Field( + alias="concurrencyBlocked", description="True if this call was blocked by the Call Concurrency limit" + ), + ] = None + concurrency_limit: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="concurrencyLimit"), + pydantic.Field(alias="concurrencyLimit", description="Account Call Concurrency limit"), + ] = None + remaining_concurrent_calls: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="remainingConcurrentCalls"), + pydantic.Field( + alias="remainingConcurrentCalls", + description="Incremental number of concurrent calls that will be allowed, including this call", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/subscription_minutes_included_reset_frequency.py b/src/vapi/types/subscription_minutes_included_reset_frequency.py new file mode 100644 index 00000000..9146f5f5 --- /dev/null +++ b/src/vapi/types/subscription_minutes_included_reset_frequency.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +SubscriptionMinutesIncludedResetFrequency = typing.Union[typing.Literal["monthly", "annually"], typing.Any] diff --git a/src/vapi/types/subscription_status.py b/src/vapi/types/subscription_status.py new file mode 100644 index 00000000..e41f4421 --- /dev/null +++ b/src/vapi/types/subscription_status.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +SubscriptionStatus = typing.Union[typing.Literal["active", "frozen"], typing.Any] diff --git a/src/vapi/types/subscription_type.py b/src/vapi/types/subscription_type.py new file mode 100644 index 00000000..4eae5c7b --- /dev/null +++ b/src/vapi/types/subscription_type.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +SubscriptionType = typing.Union[ + typing.Literal["pay-as-you-go", "enterprise", "agency", "startup", "growth", "scale"], typing.Any +] diff --git a/src/vapi/types/success_evaluation_plan.py b/src/vapi/types/success_evaluation_plan.py index d2b428b3..391d117d 100644 --- a/src/vapi/types/success_evaluation_plan.py +++ b/src/vapi/types/success_evaluation_plan.py @@ -1,21 +1,21 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -from .success_evaluation_plan_rubric import SuccessEvaluationPlanRubric + import pydantic import typing_extensions -from ..core.serialization import FieldMetadata from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .success_evaluation_plan_rubric import SuccessEvaluationPlanRubric -class SuccessEvaluationPlan(UniversalBaseModel): +class SuccessEvaluationPlan(UncheckedBaseModel): rubric: typing.Optional[SuccessEvaluationPlanRubric] = pydantic.Field(default=None) """ This enforces the rubric of the evaluation. The output is stored in `call.analysis.successEvaluation`. Options include: - - 'NumericScale': A scale of 1 to 10. - 'DescriptiveScale': A scale of Excellent, Good, Fair, Poor. - 'Checklist': A checklist of criteria and their status. @@ -28,17 +28,30 @@ class SuccessEvaluationPlan(UniversalBaseModel): Default is 'PassFail'. """ - messages: typing.Optional[typing.List[typing.Dict[str, typing.Optional[typing.Any]]]] = pydantic.Field(default=None) + messages: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = pydantic.Field(default=None) """ These are the messages used to generate the success evaluation. - @default: ` [ { "role": "system", "content": "You are an expert call evaluator. You will be given a transcript of a call and the system prompt of the AI participant. Determine if the call was successful based on the objectives inferred from the system prompt. DO NOT return anything except the result.\n\nRubric:\\n{{rubric}}\n\nOnly respond with the result." }, { "role": "user", "content": "Here is the transcript:\n\n{{transcript}}\n\n" }, { "role": "user", "content": "Here was the system prompt of the call:\n\n{{systemPrompt}}\n\n" } ]` + @default: ``` + [ + { + "role": "system", + "content": "You are an expert call evaluator. You will be given a transcript of a call and the system prompt of the AI participant. Determine if the call was successful based on the objectives inferred from the system prompt. DO NOT return anything except the result.\\n\\nRubric:\\\\n{{rubric}}\\n\\nOnly respond with the result." + }, + { + "role": "user", + "content": "Here is the transcript:\\n\\n{{transcript}}\\n\\n" + }, + { + "role": "user", + "content": "Here was the system prompt of the call:\\n\\n{{systemPrompt}}\\n\\n. Here is the ended reason of the call:\\n\\n{{endedReason}}\\n\\n" + } + ]``` You can customize by providing any messages you want. Here are the template variables available: - - - {{transcript}}: the transcript of the call from `call.artifact.transcript`- {{systemPrompt}}: the system prompt of the call from `assistant.model.messages[type=system].content`- {{rubric}}: the rubric of the success evaluation from `successEvaluationPlan.rubric` + - {{transcript}}: the transcript of the call from `call.artifact.transcript`- {{systemPrompt}}: the system prompt of the call from `assistant.model.messages[type=system].content`- {{messages}}: the messages of the call from `assistant.model.messages`- {{rubric}}: the rubric of the success evaluation from `successEvaluationPlan.rubric`- {{endedReason}}: the ended reason of the call from `call.endedReason` """ enabled: typing.Optional[bool] = pydantic.Field(default=None) @@ -46,24 +59,19 @@ class SuccessEvaluationPlan(UniversalBaseModel): This determines whether a success evaluation is generated and stored in `call.analysis.successEvaluation`. Defaults to true. Usage: - - If you want to disable the success evaluation, set this to false. @default true """ - timeout_seconds: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="timeoutSeconds")] = ( - pydantic.Field(default=None) - ) - """ - This is how long the request is tried before giving up. When request times out, `call.analysis.successEvaluation` will be empty. - - Usage: - - - To guarantee the success evaluation is generated, set this value high. Note, this will delay the end of call report in cases where model is slow to respond. - - @default 5 seconds - """ + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="timeoutSeconds"), + pydantic.Field( + alias="timeoutSeconds", + description="This is how long the request is tried before giving up. When request times out, `call.analysis.successEvaluation` will be empty.\n\nUsage:\n- To guarantee the success evaluation is generated, set this value high. Note, this will delay the end of call report in cases where model is slow to respond.\n\n@default 5 seconds", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/summary_plan.py b/src/vapi/types/summary_plan.py index 9d1c222d..98818af8 100644 --- a/src/vapi/types/summary_plan.py +++ b/src/vapi/types/summary_plan.py @@ -1,25 +1,38 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing + import pydantic import typing_extensions -from ..core.serialization import FieldMetadata from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class SummaryPlan(UniversalBaseModel): - messages: typing.Optional[typing.List[typing.Dict[str, typing.Optional[typing.Any]]]] = pydantic.Field(default=None) +class SummaryPlan(UncheckedBaseModel): + messages: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = pydantic.Field(default=None) """ These are the messages used to generate the summary. - @default: ` [ { "role": "system", "content": "You are an expert note-taker. You will be given a transcript of a call. Summarize the call in 2-3 sentences. DO NOT return anything except the summary." }, { "role": "user", "content": "Here is the transcript:\n\n{{transcript}}\n\n" } ]` + @default: ``` + [ + { + "role": "system", + "content": "You are an expert note-taker. You will be given a transcript of a call. Summarize the call in 2-3 sentences. DO NOT return anything except the summary." + }, + { + "role": "user", + "content": "Here is the transcript:\\n\\n{{transcript}}\\n\\n. Here is the ended reason of the call:\\n\\n{{endedReason}}\\n\\n" + } + ]``` You can customize by providing any messages you want. Here are the template variables available: - - - {{transcript}}: The transcript of the call from `call.artifact.transcript`- {{systemPrompt}}: The system prompt of the call from `assistant.model.messages[type=system].content` + - {{transcript}}: The transcript of the call from `call.artifact.transcript` + - {{systemPrompt}}: The system prompt of the call from `assistant.model.messages[type=system].content` + - {{messages}}: The messages of the call from `assistant.model.messages` + - {{endedReason}}: The ended reason of the call from `call.endedReason` """ enabled: typing.Optional[bool] = pydantic.Field(default=None) @@ -27,24 +40,19 @@ class SummaryPlan(UniversalBaseModel): This determines whether a summary is generated and stored in `call.analysis.summary`. Defaults to true. Usage: - - If you want to disable the summary, set this to false. @default true """ - timeout_seconds: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="timeoutSeconds")] = ( - pydantic.Field(default=None) - ) - """ - This is how long the request is tried before giving up. When request times out, `call.analysis.summary` will be empty. - - Usage: - - - To guarantee the summary is generated, set this value high. Note, this will delay the end of call report in cases where model is slow to respond. - - @default 5 seconds - """ + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="timeoutSeconds"), + pydantic.Field( + alias="timeoutSeconds", + description="This is how long the request is tried before giving up. When request times out, `call.analysis.summary` will be empty.\n\nUsage:\n- To guarantee the summary is generated, set this value high. Note, this will delay the end of call report in cases where model is slow to respond.\n\n@default 5 seconds", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/supabase_bucket_plan.py b/src/vapi/types/supabase_bucket_plan.py new file mode 100644 index 00000000..bb8327e5 --- /dev/null +++ b/src/vapi/types/supabase_bucket_plan.py @@ -0,0 +1,66 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .supabase_bucket_plan_region import SupabaseBucketPlanRegion + + +class SupabaseBucketPlan(UncheckedBaseModel): + region: SupabaseBucketPlanRegion = pydantic.Field() + """ + This is the S3 Region. It should look like us-east-1 + It should be one of the supabase regions defined in the SUPABASE_REGION enum + Check https://supabase.com/docs/guides/platform/regions for up to date regions + """ + + url: str = pydantic.Field() + """ + This is the S3 compatible URL for Supabase S3 + This should look like https://.supabase.co/storage/v1/s3 + """ + + access_key_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="accessKeyId"), + pydantic.Field( + alias="accessKeyId", + description="This is the Supabase S3 Access Key ID.\nThe user creates this in the Supabase project Storage settings", + ), + ] + secret_access_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="secretAccessKey"), + pydantic.Field( + alias="secretAccessKey", + description="This is the Supabase S3 Secret Access Key.\nThe user creates this in the Supabase project Storage settings along with the access key id", + ), + ] + name: str = pydantic.Field() + """ + This is the Supabase S3 Bucket Name. + The user must create this in Supabase under Storage > Buckets + A bucket that does not exist will not be checked now, but file uploads will fail + """ + + path: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the Supabase S3 Bucket Folder Path. + The user can create this in Supabase under Storage > Buckets + A path that does not exist will not be checked now, but file uploads will fail + A Path is like a folder in the bucket + Eg. If the bucket is called "my-bucket" and the path is "my-folder", the full path is "my-bucket/my-folder" + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/supabase_bucket_plan_region.py b/src/vapi/types/supabase_bucket_plan_region.py new file mode 100644 index 00000000..fe719bc1 --- /dev/null +++ b/src/vapi/types/supabase_bucket_plan_region.py @@ -0,0 +1,25 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +SupabaseBucketPlanRegion = typing.Union[ + typing.Literal[ + "us-west-1", + "us-east-1", + "us-east-2", + "ca-central-1", + "eu-west-1", + "eu-west-2", + "eu-west-3", + "eu-central-1", + "eu-central-2", + "eu-north-1", + "ap-south-1", + "ap-southeast-1", + "ap-northeast-1", + "ap-northeast-2", + "ap-southeast-2", + "sa-east-1", + ], + typing.Any, +] diff --git a/src/vapi/types/supabase_credential.py b/src/vapi/types/supabase_credential.py new file mode 100644 index 00000000..1da15db0 --- /dev/null +++ b/src/vapi/types/supabase_credential.py @@ -0,0 +1,72 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .supabase_bucket_plan import SupabaseBucketPlan +from .supabase_credential_provider import SupabaseCredentialProvider + + +class SupabaseCredential(UncheckedBaseModel): + provider: SupabaseCredentialProvider = pydantic.Field() + """ + This is for supabase storage. + """ + + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="fallbackIndex"), + pydantic.Field( + alias="fallbackIndex", + description="This is the order in which this storage provider is tried during upload retries. Lower numbers are tried first in increasing order.", + ), + ] = None + id: str = pydantic.Field() + """ + This is the unique identifier for the credential. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + bucket_plan: typing_extensions.Annotated[ + typing.Optional[SupabaseBucketPlan], FieldMetadata(alias="bucketPlan"), pydantic.Field(alias="bucketPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/supabase_credential_provider.py b/src/vapi/types/supabase_credential_provider.py new file mode 100644 index 00000000..00cc82d3 --- /dev/null +++ b/src/vapi/types/supabase_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +SupabaseCredentialProvider = typing.Union[typing.Literal["supabase"], typing.Any] diff --git a/src/vapi/types/sync_voice_library_dto.py b/src/vapi/types/sync_voice_library_dto.py index a31bf6ec..679856f6 100644 --- a/src/vapi/types/sync_voice_library_dto.py +++ b/src/vapi/types/sync_voice_library_dto.py @@ -1,13 +1,14 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -from .sync_voice_library_dto_providers_item import SyncVoiceLibraryDtoProvidersItem + import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .sync_voice_library_dto_providers_item import SyncVoiceLibraryDtoProvidersItem -class SyncVoiceLibraryDto(UniversalBaseModel): +class SyncVoiceLibraryDto(UncheckedBaseModel): providers: typing.Optional[typing.List[SyncVoiceLibraryDtoProvidersItem]] = pydantic.Field(default=None) """ List of providers you want to sync. diff --git a/src/vapi/types/sync_voice_library_dto_providers_item.py b/src/vapi/types/sync_voice_library_dto_providers_item.py index 76b8a08a..844b70a5 100644 --- a/src/vapi/types/sync_voice_library_dto_providers_item.py +++ b/src/vapi/types/sync_voice_library_dto_providers_item.py @@ -4,7 +4,25 @@ SyncVoiceLibraryDtoProvidersItem = typing.Union[ typing.Literal[ - "11labs", "azure", "cartesia", "custom-voice", "deepgram", "lmnt", "neets", "openai", "playht", "rime-ai" + "vapi", + "11labs", + "azure", + "cartesia", + "custom-voice", + "deepgram", + "hume", + "lmnt", + "neuphonic", + "openai", + "playht", + "rime-ai", + "smallest-ai", + "tavus", + "sesame", + "inworld", + "minimax", + "wellsaid", + "orpheus", ], typing.Any, ] diff --git a/src/vapi/types/system_message.py b/src/vapi/types/system_message.py index 3855e827..e94cb04c 100644 --- a/src/vapi/types/system_message.py +++ b/src/vapi/types/system_message.py @@ -1,14 +1,15 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +import typing + import pydantic import typing_extensions -from ..core.serialization import FieldMetadata from ..core.pydantic_utilities import IS_PYDANTIC_V2 -import typing +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class SystemMessage(UniversalBaseModel): +class SystemMessage(UncheckedBaseModel): role: str = pydantic.Field() """ The role of the system in the conversation. @@ -24,10 +25,13 @@ class SystemMessage(UniversalBaseModel): The timestamp when the message was sent. """ - seconds_from_start: typing_extensions.Annotated[float, FieldMetadata(alias="secondsFromStart")] = pydantic.Field() - """ - The number of seconds from the start of the conversation. - """ + seconds_from_start: typing_extensions.Annotated[ + float, + FieldMetadata(alias="secondsFromStart"), + pydantic.Field( + alias="secondsFromStart", description="The number of seconds from the start of the conversation." + ), + ] if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/talkscriber_transcriber.py b/src/vapi/types/talkscriber_transcriber.py index 2eb6339d..fd6115dc 100644 --- a/src/vapi/types/talkscriber_transcriber.py +++ b/src/vapi/types/talkscriber_transcriber.py @@ -1,19 +1,19 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing + import pydantic -from .talkscriber_transcriber_language import TalkscriberTranscriberLanguage +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .fallback_transcriber_plan import FallbackTranscriberPlan +from .talkscriber_transcriber_language import TalkscriberTranscriberLanguage +from .talkscriber_transcriber_model import TalkscriberTranscriberModel -class TalkscriberTranscriber(UniversalBaseModel): - provider: typing.Literal["talkscriber"] = pydantic.Field(default="talkscriber") - """ - This is the transcription provider that will be used. - """ - - model: typing.Optional[typing.Literal["whisper"]] = pydantic.Field(default=None) +class TalkscriberTranscriber(UncheckedBaseModel): + model: typing.Optional[TalkscriberTranscriberModel] = pydantic.Field(default=None) """ This is the model that will be used for the transcription. """ @@ -23,6 +23,15 @@ class TalkscriberTranscriber(UniversalBaseModel): This is the language that will be set for the transcription. The list of languages Whisper supports can be found here: https://github.com/openai/whisper/blob/main/whisper/tokenizer.py """ + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field( + alias="fallbackPlan", + description="This is the plan for transcriber provider fallbacks in the event that the primary transcriber provider fails.", + ), + ] = None + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/vapi/types/talkscriber_transcriber_model.py b/src/vapi/types/talkscriber_transcriber_model.py new file mode 100644 index 00000000..68ad39cd --- /dev/null +++ b/src/vapi/types/talkscriber_transcriber_model.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TalkscriberTranscriberModel = typing.Union[typing.Literal["whisper"], typing.Any] diff --git a/src/vapi/types/target_plan.py b/src/vapi/types/target_plan.py new file mode 100644 index 00000000..beb9fc8b --- /dev/null +++ b/src/vapi/types/target_plan.py @@ -0,0 +1,176 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .test_suite_phone_number import TestSuitePhoneNumber + + +class TargetPlan(UncheckedBaseModel): + phone_number_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="phoneNumberId"), + pydantic.Field( + alias="phoneNumberId", + description="This is the phone number that is being tested.\nDuring the actual test, it'll be called and the assistant attached to it will pick up and be tested.\nTo test an assistant directly, send assistantId instead.", + ), + ] = None + phone_number: typing_extensions.Annotated[ + typing.Optional[TestSuitePhoneNumber], + FieldMetadata(alias="phoneNumber"), + pydantic.Field( + alias="phoneNumber", + description="This can be any phone number (even not on Vapi).\nDuring the actual test, it'll be called.\nTo test a Vapi number, send phoneNumberId. To test an assistant directly, send assistantId instead.", + ), + ] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assistantId"), + pydantic.Field( + alias="assistantId", + description="This is the assistant being tested.\nDuring the actual test, it'll invoked directly.\nTo test the assistant over phone number, send phoneNumberId instead.", + ), + ] = None + assistant_overrides: typing_extensions.Annotated[ + typing.Optional["AssistantOverrides"], + FieldMetadata(alias="assistantOverrides"), + pydantic.Field( + alias="assistantOverrides", + description="This is the assistant overrides applied to assistantId before it is tested.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + TargetPlan, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/tavus_conversation_properties.py b/src/vapi/types/tavus_conversation_properties.py new file mode 100644 index 00000000..f1ea63e0 --- /dev/null +++ b/src/vapi/types/tavus_conversation_properties.py @@ -0,0 +1,98 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class TavusConversationProperties(UncheckedBaseModel): + max_call_duration: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="maxCallDuration"), + pydantic.Field( + alias="maxCallDuration", + description="The maximum duration of the call in seconds. The default `maxCallDuration` is 3600 seconds (1 hour).\nOnce the time limit specified by this parameter has been reached, the conversation will automatically shut down.", + ), + ] = None + participant_left_timeout: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="participantLeftTimeout"), + pydantic.Field( + alias="participantLeftTimeout", + description="The duration in seconds after which the call will be automatically shut down once the last participant leaves.", + ), + ] = None + participant_absent_timeout: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="participantAbsentTimeout"), + pydantic.Field( + alias="participantAbsentTimeout", + description="Starting from conversation creation, the duration in seconds after which the call will be automatically shut down if no participant joins the call.\nDefault is 300 seconds (5 minutes).", + ), + ] = None + enable_recording: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="enableRecording"), + pydantic.Field( + alias="enableRecording", description="If true, the user will be able to record the conversation." + ), + ] = None + enable_transcription: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="enableTranscription"), + pydantic.Field( + alias="enableTranscription", + description="If true, the user will be able to transcribe the conversation.\nYou can find more instructions on displaying transcriptions if you are using your custom DailyJS components here.\nYou need to have an event listener on Daily that listens for `app-messages`.", + ), + ] = None + apply_greenscreen: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="applyGreenscreen"), + pydantic.Field( + alias="applyGreenscreen", + description="If true, the background will be replaced with a greenscreen (RGB values: `[0, 255, 155]`).\nYou can use WebGL on the frontend to make the greenscreen transparent or change its color.", + ), + ] = None + language: typing.Optional[str] = pydantic.Field(default=None) + """ + The language of the conversation. Please provide the **full language name**, not the two-letter code. + If you are using your own TTS voice, please ensure it supports the language you provide. + If you are using a stock replica or default persona, please note that only ElevenLabs and Cartesia supported languages are available. + You can find a full list of supported languages for Cartesia here, for ElevenLabs here, and for PlayHT here. + """ + + recording_s_3_bucket_name: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="recordingS3BucketName"), + pydantic.Field( + alias="recordingS3BucketName", description="The name of the S3 bucket where the recording will be stored." + ), + ] = None + recording_s_3_bucket_region: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="recordingS3BucketRegion"), + pydantic.Field( + alias="recordingS3BucketRegion", + description="The region of the S3 bucket where the recording will be stored.", + ), + ] = None + aws_assume_role_arn: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="awsAssumeRoleArn"), + pydantic.Field( + alias="awsAssumeRoleArn", description="The ARN of the role that will be assumed to access the S3 bucket." + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/tavus_credential.py b/src/vapi/types/tavus_credential.py new file mode 100644 index 00000000..86fb801d --- /dev/null +++ b/src/vapi/types/tavus_credential.py @@ -0,0 +1,60 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .tavus_credential_provider import TavusCredentialProvider + + +class TavusCredential(UncheckedBaseModel): + provider: TavusCredentialProvider + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + id: str = pydantic.Field() + """ + This is the unique identifier for the credential. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/tavus_credential_provider.py b/src/vapi/types/tavus_credential_provider.py new file mode 100644 index 00000000..838f20b5 --- /dev/null +++ b/src/vapi/types/tavus_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TavusCredentialProvider = typing.Union[typing.Literal["tavus"], typing.Any] diff --git a/src/vapi/types/tavus_voice.py b/src/vapi/types/tavus_voice.py new file mode 100644 index 00000000..d416f5d6 --- /dev/null +++ b/src/vapi/types/tavus_voice.py @@ -0,0 +1,95 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .chunk_plan import ChunkPlan +from .fallback_plan import FallbackPlan +from .tavus_conversation_properties import TavusConversationProperties +from .tavus_voice_voice_id import TavusVoiceVoiceId + + +class TavusVoice(UncheckedBaseModel): + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="cachingEnabled"), + pydantic.Field( + alias="cachingEnabled", description="This is the flag to toggle voice caching for the assistant." + ), + ] = None + voice_id: typing_extensions.Annotated[ + TavusVoiceVoiceId, + FieldMetadata(alias="voiceId"), + pydantic.Field(alias="voiceId", description="This is the provider-specific ID that will be used."), + ] + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], + FieldMetadata(alias="chunkPlan"), + pydantic.Field( + alias="chunkPlan", + description="This is the plan for chunking the model output before it is sent to the voice provider.", + ), + ] = None + persona_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="personaId"), + pydantic.Field( + alias="personaId", + description="This is the unique identifier for the persona that the replica will use in the conversation.", + ), + ] = None + callback_url: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="callbackUrl"), + pydantic.Field( + alias="callbackUrl", + description="This is the url that will receive webhooks with updates regarding the conversation state.", + ), + ] = None + conversation_name: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="conversationName"), + pydantic.Field(alias="conversationName", description="This is the name for the conversation."), + ] = None + conversational_context: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="conversationalContext"), + pydantic.Field( + alias="conversationalContext", + description="This is the context that will be appended to any context provided in the persona, if one is provided.", + ), + ] = None + custom_greeting: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="customGreeting"), + pydantic.Field( + alias="customGreeting", + description="This is the custom greeting that the replica will give once a participant joines the conversation.", + ), + ] = None + properties: typing.Optional[TavusConversationProperties] = pydantic.Field(default=None) + """ + These are optional properties used to customize the conversation. + """ + + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field( + alias="fallbackPlan", + description="This is the plan for voice provider fallbacks in the event that the primary voice provider fails.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/tavus_voice_voice_id.py b/src/vapi/types/tavus_voice_voice_id.py new file mode 100644 index 00000000..093843fd --- /dev/null +++ b/src/vapi/types/tavus_voice_voice_id.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .tavus_voice_voice_id_zero import TavusVoiceVoiceIdZero + +TavusVoiceVoiceId = typing.Union[TavusVoiceVoiceIdZero, str] diff --git a/src/vapi/types/tavus_voice_voice_id_zero.py b/src/vapi/types/tavus_voice_voice_id_zero.py new file mode 100644 index 00000000..416f3b60 --- /dev/null +++ b/src/vapi/types/tavus_voice_voice_id_zero.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TavusVoiceVoiceIdZero = typing.Union[typing.Literal["r52da2535a"], typing.Any] diff --git a/src/vapi/types/telnyx_phone_number.py b/src/vapi/types/telnyx_phone_number.py new file mode 100644 index 00000000..e707f316 --- /dev/null +++ b/src/vapi/types/telnyx_phone_number.py @@ -0,0 +1,124 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .server import Server +from .telnyx_phone_number_fallback_destination import TelnyxPhoneNumberFallbackDestination +from .telnyx_phone_number_hooks_item import TelnyxPhoneNumberHooksItem +from .telnyx_phone_number_status import TelnyxPhoneNumberStatus + + +class TelnyxPhoneNumber(UncheckedBaseModel): + fallback_destination: typing_extensions.Annotated[ + typing.Optional[TelnyxPhoneNumberFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field( + alias="fallbackDestination", + description="This is the fallback destination an inbound call will be transferred to if:\n1. `assistantId` is not set\n2. `squadId` is not set\n3. and, `assistant-request` message to the `serverUrl` fails\n\nIf this is not set and above conditions are met, the inbound call is hung up with an error message.", + ), + ] = None + hooks: typing.Optional[typing.List[TelnyxPhoneNumberHooksItem]] = pydantic.Field(default=None) + """ + This is the hooks that will be used for incoming calls to this phone number. + """ + + id: str = pydantic.Field() + """ + This is the unique identifier for the phone number. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this phone number belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the phone number was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the phone number was last updated.", + ), + ] + status: typing.Optional[TelnyxPhoneNumberStatus] = pydantic.Field(default=None) + """ + This is the status of the phone number. + """ + + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the phone number. This is just for your own reference. + """ + + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assistantId"), + pydantic.Field( + alias="assistantId", + description="This is the assistant that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="workflowId"), + pydantic.Field( + alias="workflowId", + description="This is the workflow that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="squadId"), + pydantic.Field( + alias="squadId", + description="This is the squad that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + server: typing.Optional[Server] = pydantic.Field(default=None) + """ + This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema. + + The order of precedence is: + + 1. assistant.server + 2. phoneNumber.server + 3. org.server + """ + + number: str = pydantic.Field() + """ + These are the digits of the phone number you own on your Telnyx. + """ + + credential_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="credentialId"), + pydantic.Field( + alias="credentialId", + description="This is the credential you added in dashboard.vapi.ai/keys. This is used to configure the number to send inbound calls to Vapi, make outbound calls and do live call updates like transfers and hangups.", + ), + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/telnyx_phone_number_fallback_destination.py b/src/vapi/types/telnyx_phone_number_fallback_destination.py new file mode 100644 index 00000000..4a860d4c --- /dev/null +++ b/src/vapi/types/telnyx_phone_number_fallback_destination.py @@ -0,0 +1,93 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .transfer_destination_number_message import TransferDestinationNumberMessage +from .transfer_destination_sip_message import TransferDestinationSipMessage +from .transfer_plan import TransferPlan + + +class TelnyxPhoneNumberFallbackDestination_Number(UncheckedBaseModel): + """ + This is the fallback destination an inbound call will be transferred to if: + 1. `assistantId` is not set + 2. `squadId` is not set + 3. and, `assistant-request` message to the `serverUrl` fails + + If this is not set and above conditions are met, the inbound call is hung up with an error message. + """ + + type: typing.Literal["number"] = "number" + message: typing.Optional[TransferDestinationNumberMessage] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: str + extension: typing.Optional[str] = None + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TelnyxPhoneNumberFallbackDestination_Sip(UncheckedBaseModel): + """ + This is the fallback destination an inbound call will be transferred to if: + 1. `assistantId` is not set + 2. `squadId` is not set + 3. and, `assistant-request` message to the `serverUrl` fails + + If this is not set and above conditions are met, the inbound call is hung up with an error message. + """ + + type: typing.Literal["sip"] = "sip" + message: typing.Optional[TransferDestinationSipMessage] = None + sip_uri: typing_extensions.Annotated[str, FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri")] + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + sip_headers: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="sipHeaders"), + pydantic.Field(alias="sipHeaders"), + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +TelnyxPhoneNumberFallbackDestination = typing_extensions.Annotated[ + typing.Union[TelnyxPhoneNumberFallbackDestination_Number, TelnyxPhoneNumberFallbackDestination_Sip], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/telnyx_phone_number_hooks_item.py b/src/vapi/types/telnyx_phone_number_hooks_item.py new file mode 100644 index 00000000..feaee9fd --- /dev/null +++ b/src/vapi/types/telnyx_phone_number_hooks_item.py @@ -0,0 +1,50 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .phone_number_call_ending_hook_filter import PhoneNumberCallEndingHookFilter +from .phone_number_call_ringing_hook_filter import PhoneNumberCallRingingHookFilter +from .phone_number_hook_call_ending_do import PhoneNumberHookCallEndingDo +from .phone_number_hook_call_ringing_do_item import PhoneNumberHookCallRingingDoItem + + +class TelnyxPhoneNumberHooksItem_CallRinging(UncheckedBaseModel): + on: typing.Literal["call.ringing"] = "call.ringing" + filters: typing.Optional[typing.List[PhoneNumberCallRingingHookFilter]] = None + do: typing.List[PhoneNumberHookCallRingingDoItem] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TelnyxPhoneNumberHooksItem_CallEnding(UncheckedBaseModel): + on: typing.Literal["call.ending"] = "call.ending" + filters: typing.Optional[typing.List[PhoneNumberCallEndingHookFilter]] = None + do: typing.Optional[PhoneNumberHookCallEndingDo] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +TelnyxPhoneNumberHooksItem = typing_extensions.Annotated[ + typing.Union[TelnyxPhoneNumberHooksItem_CallRinging, TelnyxPhoneNumberHooksItem_CallEnding], + UnionMetadata(discriminant="on"), +] diff --git a/src/vapi/types/telnyx_phone_number_status.py b/src/vapi/types/telnyx_phone_number_status.py new file mode 100644 index 00000000..06a7e31e --- /dev/null +++ b/src/vapi/types/telnyx_phone_number_status.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TelnyxPhoneNumberStatus = typing.Union[typing.Literal["active", "activating", "blocked"], typing.Any] diff --git a/src/vapi/types/template.py b/src/vapi/types/template.py index 5e396f80..97394241 100644 --- a/src/vapi/types/template.py +++ b/src/vapi/types/template.py @@ -1,27 +1,33 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +from __future__ import annotations + +import datetime as dt import typing -from .template_details import TemplateDetails + +import pydantic import typing_extensions -from .template_provider_details import TemplateProviderDetails +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.serialization import FieldMetadata -from .tool_template_metadata import ToolTemplateMetadata -from .template_visibility import TemplateVisibility -import pydantic +from ..core.unchecked_base_model import UncheckedBaseModel +from .template_details import TemplateDetails from .template_provider import TemplateProvider -import datetime as dt -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from .template_provider_details import TemplateProviderDetails +from .template_type import TemplateType +from .template_visibility import TemplateVisibility +from .tool_template_metadata import ToolTemplateMetadata -class Template(UniversalBaseModel): +class Template(UncheckedBaseModel): details: typing.Optional[TemplateDetails] = None provider_details: typing_extensions.Annotated[ - typing.Optional[TemplateProviderDetails], FieldMetadata(alias="providerDetails") + typing.Optional[TemplateProviderDetails], + FieldMetadata(alias="providerDetails"), + pydantic.Field(alias="providerDetails"), ] = None metadata: typing.Optional[ToolTemplateMetadata] = None visibility: typing.Optional[TemplateVisibility] = None - type: typing.Literal["tool"] = "tool" + type: TemplateType name: typing.Optional[str] = pydantic.Field(default=None) """ The name of the template. This is just for your own reference. @@ -33,20 +39,27 @@ class Template(UniversalBaseModel): The unique identifier for the template. """ - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field() - """ - The unique identifier for the organization that this template belongs to. - """ - - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() - """ - The ISO 8601 date-time string of when the template was created. - """ - - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() - """ - The ISO 8601 date-time string of when the template was last updated. - """ + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="The unique identifier for the organization that this template belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="The ISO 8601 date-time string of when the template was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", description="The ISO 8601 date-time string of when the template was last updated." + ), + ] if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -56,3 +69,6 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +update_forward_refs(Template) diff --git a/src/vapi/types/template_details.py b/src/vapi/types/template_details.py index 3a1d6788..69ff5b18 100644 --- a/src/vapi/types/template_details.py +++ b/src/vapi/types/template_details.py @@ -1,20 +1,732 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .create_dtmf_tool_dto import CreateDtmfToolDto -from .create_end_call_tool_dto import CreateEndCallToolDto -from .create_voicemail_tool_dto import CreateVoicemailToolDto -from .create_function_tool_dto import CreateFunctionToolDto -from .create_ghl_tool_dto import CreateGhlToolDto -from .create_make_tool_dto import CreateMakeToolDto -from .create_transfer_call_tool_dto import CreateTransferCallToolDto - -TemplateDetails = typing.Union[ - CreateDtmfToolDto, - CreateEndCallToolDto, - CreateVoicemailToolDto, - CreateFunctionToolDto, - CreateGhlToolDto, - CreateMakeToolDto, - CreateTransferCallToolDto, + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .backoff_plan import BackoffPlan +from .code_tool_environment_variable import CodeToolEnvironmentVariable +from .create_api_request_tool_dto_messages_item import CreateApiRequestToolDtoMessagesItem +from .create_api_request_tool_dto_method import CreateApiRequestToolDtoMethod +from .create_bash_tool_dto_messages_item import CreateBashToolDtoMessagesItem +from .create_bash_tool_dto_name import CreateBashToolDtoName +from .create_bash_tool_dto_sub_type import CreateBashToolDtoSubType +from .create_code_tool_dto_messages_item import CreateCodeToolDtoMessagesItem +from .create_computer_tool_dto_messages_item import CreateComputerToolDtoMessagesItem +from .create_computer_tool_dto_name import CreateComputerToolDtoName +from .create_computer_tool_dto_sub_type import CreateComputerToolDtoSubType +from .create_dtmf_tool_dto_messages_item import CreateDtmfToolDtoMessagesItem +from .create_end_call_tool_dto_messages_item import CreateEndCallToolDtoMessagesItem +from .create_function_tool_dto_messages_item import CreateFunctionToolDtoMessagesItem +from .create_go_high_level_calendar_availability_tool_dto_messages_item import ( + CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem, +) +from .create_go_high_level_calendar_event_create_tool_dto_messages_item import ( + CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_create_tool_dto_messages_item import ( + CreateGoHighLevelContactCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_get_tool_dto_messages_item import CreateGoHighLevelContactGetToolDtoMessagesItem +from .create_google_calendar_check_availability_tool_dto_messages_item import ( + CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem, +) +from .create_google_calendar_create_event_tool_dto_messages_item import ( + CreateGoogleCalendarCreateEventToolDtoMessagesItem, +) +from .create_google_sheets_row_append_tool_dto_messages_item import CreateGoogleSheetsRowAppendToolDtoMessagesItem +from .create_handoff_tool_dto_messages_item import CreateHandoffToolDtoMessagesItem +from .create_mcp_tool_dto_messages_item import CreateMcpToolDtoMessagesItem +from .create_query_tool_dto_messages_item import CreateQueryToolDtoMessagesItem +from .create_sip_request_tool_dto_body import CreateSipRequestToolDtoBody +from .create_sip_request_tool_dto_messages_item import CreateSipRequestToolDtoMessagesItem +from .create_sip_request_tool_dto_verb import CreateSipRequestToolDtoVerb +from .create_slack_send_message_tool_dto_messages_item import CreateSlackSendMessageToolDtoMessagesItem +from .create_sms_tool_dto_messages_item import CreateSmsToolDtoMessagesItem +from .create_text_editor_tool_dto_messages_item import CreateTextEditorToolDtoMessagesItem +from .create_text_editor_tool_dto_name import CreateTextEditorToolDtoName +from .create_text_editor_tool_dto_sub_type import CreateTextEditorToolDtoSubType +from .create_transfer_call_tool_dto_destinations_item import CreateTransferCallToolDtoDestinationsItem +from .create_transfer_call_tool_dto_messages_item import CreateTransferCallToolDtoMessagesItem +from .create_voicemail_tool_dto_messages_item import CreateVoicemailToolDtoMessagesItem +from .knowledge_base import KnowledgeBase +from .mcp_tool_messages import McpToolMessages +from .mcp_tool_metadata import McpToolMetadata +from .open_ai_function import OpenAiFunction +from .server import Server +from .tool_parameter import ToolParameter +from .tool_rejection_plan import ToolRejectionPlan +from .variable_extraction_plan import VariableExtractionPlan + + +class TemplateDetails_ApiRequest(UncheckedBaseModel): + type: typing.Literal["apiRequest"] = "apiRequest" + messages: typing.Optional[typing.List[CreateApiRequestToolDtoMessagesItem]] = None + method: CreateApiRequestToolDtoMethod + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + encrypted_paths: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="encryptedPaths"), pydantic.Field(alias="encryptedPaths") + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + name: typing.Optional[str] = None + description: typing.Optional[str] = None + url: str + body: typing.Optional["JsonSchema"] = None + headers: typing.Optional["JsonSchema"] = None + backoff_plan: typing_extensions.Annotated[ + typing.Optional[BackoffPlan], FieldMetadata(alias="backoffPlan"), pydantic.Field(alias="backoffPlan") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TemplateDetails_Bash(UncheckedBaseModel): + type: typing.Literal["bash"] = "bash" + messages: typing.Optional[typing.List[CreateBashToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateBashToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateBashToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TemplateDetails_Code(UncheckedBaseModel): + type: typing.Literal["code"] = "code" + messages: typing.Optional[typing.List[CreateCodeToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + code: str + environment_variables: typing_extensions.Annotated[ + typing.Optional[typing.List[CodeToolEnvironmentVariable]], + FieldMetadata(alias="environmentVariables"), + pydantic.Field(alias="environmentVariables"), + ] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TemplateDetails_Computer(UncheckedBaseModel): + type: typing.Literal["computer"] = "computer" + messages: typing.Optional[typing.List[CreateComputerToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateComputerToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateComputerToolDtoName + display_width_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayWidthPx"), pydantic.Field(alias="displayWidthPx") + ] + display_height_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayHeightPx"), pydantic.Field(alias="displayHeightPx") + ] + display_number: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="displayNumber"), pydantic.Field(alias="displayNumber") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TemplateDetails_Dtmf(UncheckedBaseModel): + type: typing.Literal["dtmf"] = "dtmf" + messages: typing.Optional[typing.List[CreateDtmfToolDtoMessagesItem]] = None + sip_info_dtmf_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="sipInfoDtmfEnabled"), pydantic.Field(alias="sipInfoDtmfEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TemplateDetails_EndCall(UncheckedBaseModel): + type: typing.Literal["endCall"] = "endCall" + messages: typing.Optional[typing.List[CreateEndCallToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TemplateDetails_Function(UncheckedBaseModel): + type: typing.Literal["function"] = "function" + messages: typing.Optional[typing.List[CreateFunctionToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TemplateDetails_GohighlevelCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.availability.check"] = "gohighlevel.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TemplateDetails_GohighlevelCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.event.create"] = "gohighlevel.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TemplateDetails_GohighlevelContactCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.create"] = "gohighlevel.contact.create" + messages: typing.Optional[typing.List[CreateGoHighLevelContactCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TemplateDetails_GohighlevelContactGet(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.get"] = "gohighlevel.contact.get" + messages: typing.Optional[typing.List[CreateGoHighLevelContactGetToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TemplateDetails_GoogleCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["google.calendar.availability.check"] = "google.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TemplateDetails_GoogleCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["google.calendar.event.create"] = "google.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoogleCalendarCreateEventToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TemplateDetails_GoogleSheetsRowAppend(UncheckedBaseModel): + type: typing.Literal["google.sheets.row.append"] = "google.sheets.row.append" + messages: typing.Optional[typing.List[CreateGoogleSheetsRowAppendToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TemplateDetails_Handoff(UncheckedBaseModel): + type: typing.Literal["handoff"] = "handoff" + messages: typing.Optional[typing.List[CreateHandoffToolDtoMessagesItem]] = None + default_result: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="defaultResult"), pydantic.Field(alias="defaultResult") + ] = None + destinations: typing.Optional[typing.List["CreateHandoffToolDtoDestinationsItem"]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TemplateDetails_Mcp(UncheckedBaseModel): + type: typing.Literal["mcp"] = "mcp" + messages: typing.Optional[typing.List[CreateMcpToolDtoMessagesItem]] = None + server: typing.Optional[Server] = None + tool_messages: typing_extensions.Annotated[ + typing.Optional[typing.List[McpToolMessages]], + FieldMetadata(alias="toolMessages"), + pydantic.Field(alias="toolMessages"), + ] = None + metadata: typing.Optional[McpToolMetadata] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TemplateDetails_Query(UncheckedBaseModel): + type: typing.Literal["query"] = "query" + messages: typing.Optional[typing.List[CreateQueryToolDtoMessagesItem]] = None + knowledge_bases: typing_extensions.Annotated[ + typing.Optional[typing.List[KnowledgeBase]], + FieldMetadata(alias="knowledgeBases"), + pydantic.Field(alias="knowledgeBases"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TemplateDetails_SlackMessageSend(UncheckedBaseModel): + type: typing.Literal["slack.message.send"] = "slack.message.send" + messages: typing.Optional[typing.List[CreateSlackSendMessageToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TemplateDetails_Sms(UncheckedBaseModel): + type: typing.Literal["sms"] = "sms" + messages: typing.Optional[typing.List[CreateSmsToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TemplateDetails_TextEditor(UncheckedBaseModel): + type: typing.Literal["textEditor"] = "textEditor" + messages: typing.Optional[typing.List[CreateTextEditorToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateTextEditorToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateTextEditorToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TemplateDetails_TransferCall(UncheckedBaseModel): + type: typing.Literal["transferCall"] = "transferCall" + messages: typing.Optional[typing.List[CreateTransferCallToolDtoMessagesItem]] = None + destinations: typing.Optional[typing.List[CreateTransferCallToolDtoDestinationsItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TemplateDetails_SipRequest(UncheckedBaseModel): + type: typing.Literal["sipRequest"] = "sipRequest" + messages: typing.Optional[typing.List[CreateSipRequestToolDtoMessagesItem]] = None + verb: CreateSipRequestToolDtoVerb + headers: typing.Optional["JsonSchema"] = None + body: typing.Optional[CreateSipRequestToolDtoBody] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TemplateDetails_Voicemail(UncheckedBaseModel): + type: typing.Literal["voicemail"] = "voicemail" + messages: typing.Optional[typing.List[CreateVoicemailToolDtoMessagesItem]] = None + beep_detection_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="beepDetectionEnabled"), pydantic.Field(alias="beepDetectionEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +TemplateDetails = typing_extensions.Annotated[ + typing.Union[ + TemplateDetails_ApiRequest, + TemplateDetails_Bash, + TemplateDetails_Code, + TemplateDetails_Computer, + TemplateDetails_Dtmf, + TemplateDetails_EndCall, + TemplateDetails_Function, + TemplateDetails_GohighlevelCalendarAvailabilityCheck, + TemplateDetails_GohighlevelCalendarEventCreate, + TemplateDetails_GohighlevelContactCreate, + TemplateDetails_GohighlevelContactGet, + TemplateDetails_GoogleCalendarAvailabilityCheck, + TemplateDetails_GoogleCalendarEventCreate, + TemplateDetails_GoogleSheetsRowAppend, + TemplateDetails_Handoff, + TemplateDetails_Mcp, + TemplateDetails_Query, + TemplateDetails_SlackMessageSend, + TemplateDetails_Sms, + TemplateDetails_TextEditor, + TemplateDetails_TransferCall, + TemplateDetails_SipRequest, + TemplateDetails_Voicemail, + ], + UnionMetadata(discriminant="type"), ] +from .json_schema import JsonSchema # noqa: E402, I001 +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs(TemplateDetails_ApiRequest, JsonSchema=JsonSchema) +update_forward_refs(TemplateDetails_Bash) +update_forward_refs(TemplateDetails_Code) +update_forward_refs(TemplateDetails_Computer) +update_forward_refs(TemplateDetails_Dtmf) +update_forward_refs(TemplateDetails_EndCall) +update_forward_refs(TemplateDetails_Function) +update_forward_refs(TemplateDetails_GohighlevelCalendarAvailabilityCheck) +update_forward_refs(TemplateDetails_GohighlevelCalendarEventCreate) +update_forward_refs(TemplateDetails_GohighlevelContactCreate) +update_forward_refs(TemplateDetails_GohighlevelContactGet) +update_forward_refs(TemplateDetails_GoogleCalendarAvailabilityCheck) +update_forward_refs(TemplateDetails_GoogleCalendarEventCreate) +update_forward_refs(TemplateDetails_GoogleSheetsRowAppend) +update_forward_refs( + TemplateDetails_Handoff, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs(TemplateDetails_Mcp) +update_forward_refs(TemplateDetails_Query) +update_forward_refs(TemplateDetails_SlackMessageSend) +update_forward_refs(TemplateDetails_Sms) +update_forward_refs(TemplateDetails_TextEditor) +update_forward_refs(TemplateDetails_TransferCall) +update_forward_refs(TemplateDetails_SipRequest, JsonSchema=JsonSchema) +update_forward_refs(TemplateDetails_Voicemail) diff --git a/src/vapi/types/template_provider_details.py b/src/vapi/types/template_provider_details.py index 03778166..ef5c8348 100644 --- a/src/vapi/types/template_provider_details.py +++ b/src/vapi/types/template_provider_details.py @@ -1,8 +1,244 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .make_tool_provider_details import MakeToolProviderDetails -from .ghl_tool_provider_details import GhlToolProviderDetails -from .function_tool_provider_details import FunctionToolProviderDetails -TemplateProviderDetails = typing.Union[MakeToolProviderDetails, GhlToolProviderDetails, FunctionToolProviderDetails] +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .tool_template_setup import ToolTemplateSetup + + +class TemplateProviderDetails_Make(UncheckedBaseModel): + type: typing.Literal["make"] = "make" + template_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="templateUrl"), pydantic.Field(alias="templateUrl") + ] = None + setup_instructions: typing_extensions.Annotated[ + typing.Optional[typing.List[ToolTemplateSetup]], + FieldMetadata(alias="setupInstructions"), + pydantic.Field(alias="setupInstructions"), + ] = None + scenario_id: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="scenarioId"), pydantic.Field(alias="scenarioId") + ] = None + scenario_name: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="scenarioName"), pydantic.Field(alias="scenarioName") + ] = None + trigger_hook_id: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="triggerHookId"), pydantic.Field(alias="triggerHookId") + ] = None + trigger_hook_name: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="triggerHookName"), pydantic.Field(alias="triggerHookName") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TemplateProviderDetails_Ghl(UncheckedBaseModel): + type: typing.Literal["ghl"] = "ghl" + template_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="templateUrl"), pydantic.Field(alias="templateUrl") + ] = None + setup_instructions: typing_extensions.Annotated[ + typing.Optional[typing.List[ToolTemplateSetup]], + FieldMetadata(alias="setupInstructions"), + pydantic.Field(alias="setupInstructions"), + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + workflow_name: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowName"), pydantic.Field(alias="workflowName") + ] = None + webhook_hook_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="webhookHookId"), pydantic.Field(alias="webhookHookId") + ] = None + webhook_hook_name: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="webhookHookName"), pydantic.Field(alias="webhookHookName") + ] = None + location_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="locationId"), pydantic.Field(alias="locationId") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TemplateProviderDetails_Function(UncheckedBaseModel): + type: typing.Literal["function"] = "function" + template_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="templateUrl"), pydantic.Field(alias="templateUrl") + ] = None + setup_instructions: typing_extensions.Annotated[ + typing.Optional[typing.List[ToolTemplateSetup]], + FieldMetadata(alias="setupInstructions"), + pydantic.Field(alias="setupInstructions"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TemplateProviderDetails_GoogleCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["google.calendar.event.create"] = "google.calendar.event.create" + template_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="templateUrl"), pydantic.Field(alias="templateUrl") + ] = None + setup_instructions: typing_extensions.Annotated[ + typing.Optional[typing.List[ToolTemplateSetup]], + FieldMetadata(alias="setupInstructions"), + pydantic.Field(alias="setupInstructions"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TemplateProviderDetails_GoogleSheetsRowAppend(UncheckedBaseModel): + type: typing.Literal["google.sheets.row.append"] = "google.sheets.row.append" + template_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="templateUrl"), pydantic.Field(alias="templateUrl") + ] = None + setup_instructions: typing_extensions.Annotated[ + typing.Optional[typing.List[ToolTemplateSetup]], + FieldMetadata(alias="setupInstructions"), + pydantic.Field(alias="setupInstructions"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TemplateProviderDetails_GohighlevelCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.availability.check"] = "gohighlevel.calendar.availability.check" + template_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="templateUrl"), pydantic.Field(alias="templateUrl") + ] = None + setup_instructions: typing_extensions.Annotated[ + typing.Optional[typing.List[ToolTemplateSetup]], + FieldMetadata(alias="setupInstructions"), + pydantic.Field(alias="setupInstructions"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TemplateProviderDetails_GohighlevelCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.event.create"] = "gohighlevel.calendar.event.create" + template_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="templateUrl"), pydantic.Field(alias="templateUrl") + ] = None + setup_instructions: typing_extensions.Annotated[ + typing.Optional[typing.List[ToolTemplateSetup]], + FieldMetadata(alias="setupInstructions"), + pydantic.Field(alias="setupInstructions"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TemplateProviderDetails_GohighlevelContactCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.create"] = "gohighlevel.contact.create" + template_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="templateUrl"), pydantic.Field(alias="templateUrl") + ] = None + setup_instructions: typing_extensions.Annotated[ + typing.Optional[typing.List[ToolTemplateSetup]], + FieldMetadata(alias="setupInstructions"), + pydantic.Field(alias="setupInstructions"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TemplateProviderDetails_GohighlevelContactGet(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.get"] = "gohighlevel.contact.get" + template_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="templateUrl"), pydantic.Field(alias="templateUrl") + ] = None + setup_instructions: typing_extensions.Annotated[ + typing.Optional[typing.List[ToolTemplateSetup]], + FieldMetadata(alias="setupInstructions"), + pydantic.Field(alias="setupInstructions"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +TemplateProviderDetails = typing_extensions.Annotated[ + typing.Union[ + TemplateProviderDetails_Make, + TemplateProviderDetails_Ghl, + TemplateProviderDetails_Function, + TemplateProviderDetails_GoogleCalendarEventCreate, + TemplateProviderDetails_GoogleSheetsRowAppend, + TemplateProviderDetails_GohighlevelCalendarAvailabilityCheck, + TemplateProviderDetails_GohighlevelCalendarEventCreate, + TemplateProviderDetails_GohighlevelContactCreate, + TemplateProviderDetails_GohighlevelContactGet, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/template_type.py b/src/vapi/types/template_type.py new file mode 100644 index 00000000..e31312f6 --- /dev/null +++ b/src/vapi/types/template_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TemplateType = typing.Union[typing.Literal["tool"], typing.Any] diff --git a/src/vapi/types/test_suite.py b/src/vapi/types/test_suite.py new file mode 100644 index 00000000..1aba7dfd --- /dev/null +++ b/src/vapi/types/test_suite.py @@ -0,0 +1,84 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .target_plan import TargetPlan +from .tester_plan import TesterPlan + + +class TestSuite(UncheckedBaseModel): + id: str = pydantic.Field() + """ + This is the unique identifier for the test suite. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this test suite belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the test suite was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the test suite was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the test suite. + """ + + phone_number_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="phoneNumberId"), + pydantic.Field( + alias="phoneNumberId", description="This is the phone number ID associated with this test suite." + ), + ] = None + tester_plan: typing_extensions.Annotated[ + typing.Optional[TesterPlan], + FieldMetadata(alias="testerPlan"), + pydantic.Field( + alias="testerPlan", + description="Override the default tester plan by providing custom assistant configuration for the test agent.\n\nWe recommend only using this if you are confident, as we have already set sensible defaults on the tester plan.", + ), + ] = None + target_plan: typing_extensions.Annotated[ + typing.Optional[TargetPlan], + FieldMetadata(alias="targetPlan"), + pydantic.Field( + alias="targetPlan", + description="These are the configuration for the assistant / phone number that is being tested.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(TestSuite) diff --git a/src/vapi/types/test_suite_phone_number.py b/src/vapi/types/test_suite_phone_number.py new file mode 100644 index 00000000..81aa5de1 --- /dev/null +++ b/src/vapi/types/test_suite_phone_number.py @@ -0,0 +1,29 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .test_suite_phone_number_provider import TestSuitePhoneNumberProvider + + +class TestSuitePhoneNumber(UncheckedBaseModel): + provider: TestSuitePhoneNumberProvider = pydantic.Field() + """ + This is the provider of the phone number. + """ + + number: str = pydantic.Field() + """ + This is the phone number that is being tested. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/test_suite_phone_number_provider.py b/src/vapi/types/test_suite_phone_number_provider.py new file mode 100644 index 00000000..0de6a0a8 --- /dev/null +++ b/src/vapi/types/test_suite_phone_number_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TestSuitePhoneNumberProvider = typing.Union[typing.Literal["test-suite"], typing.Any] diff --git a/src/vapi/types/test_suite_run.py b/src/vapi/types/test_suite_run.py new file mode 100644 index 00000000..8d3175d3 --- /dev/null +++ b/src/vapi/types/test_suite_run.py @@ -0,0 +1,73 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .test_suite_run_status import TestSuiteRunStatus +from .test_suite_run_test_result import TestSuiteRunTestResult + + +class TestSuiteRun(UncheckedBaseModel): + status: TestSuiteRunStatus = pydantic.Field() + """ + This is the current status of the test suite run. + """ + + id: str = pydantic.Field() + """ + This is the unique identifier for the test suite run. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the organization this run belongs to." + ), + ] + test_suite_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="testSuiteId"), + pydantic.Field( + alias="testSuiteId", description="This is the unique identifier for the test suite this run belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", + description="This is the ISO 8601 date-time string of when the test suite run was created.", + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the test suite run was last updated.", + ), + ] + test_results: typing_extensions.Annotated[ + typing.List[TestSuiteRunTestResult], + FieldMetadata(alias="testResults"), + pydantic.Field(alias="testResults", description="These are the results of the tests in this test suite run."), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the test suite run. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/test_suite_run_scorer_ai.py b/src/vapi/types/test_suite_run_scorer_ai.py new file mode 100644 index 00000000..f7c1927e --- /dev/null +++ b/src/vapi/types/test_suite_run_scorer_ai.py @@ -0,0 +1,40 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .test_suite_run_scorer_ai_result import TestSuiteRunScorerAiResult +from .test_suite_run_scorer_ai_type import TestSuiteRunScorerAiType + + +class TestSuiteRunScorerAi(UncheckedBaseModel): + type: TestSuiteRunScorerAiType = pydantic.Field() + """ + This is the type of the scorer, which must be AI. + """ + + result: TestSuiteRunScorerAiResult = pydantic.Field() + """ + This is the result of the test suite. + """ + + reasoning: str = pydantic.Field() + """ + This is the reasoning provided by the AI scorer. + """ + + rubric: str = pydantic.Field() + """ + This is the rubric used by the AI scorer. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/test_suite_run_scorer_ai_result.py b/src/vapi/types/test_suite_run_scorer_ai_result.py new file mode 100644 index 00000000..986a83b1 --- /dev/null +++ b/src/vapi/types/test_suite_run_scorer_ai_result.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TestSuiteRunScorerAiResult = typing.Union[typing.Literal["pass", "fail"], typing.Any] diff --git a/src/vapi/types/test_suite_run_scorer_ai_type.py b/src/vapi/types/test_suite_run_scorer_ai_type.py new file mode 100644 index 00000000..01d7615f --- /dev/null +++ b/src/vapi/types/test_suite_run_scorer_ai_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TestSuiteRunScorerAiType = typing.Union[typing.Literal["ai"], typing.Any] diff --git a/src/vapi/types/test_suite_run_status.py b/src/vapi/types/test_suite_run_status.py new file mode 100644 index 00000000..d4d27ff7 --- /dev/null +++ b/src/vapi/types/test_suite_run_status.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TestSuiteRunStatus = typing.Union[typing.Literal["queued", "in-progress", "completed", "failed"], typing.Any] diff --git a/src/vapi/types/test_suite_run_test_attempt.py b/src/vapi/types/test_suite_run_test_attempt.py new file mode 100644 index 00000000..f912ff97 --- /dev/null +++ b/src/vapi/types/test_suite_run_test_attempt.py @@ -0,0 +1,45 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .test_suite_run_scorer_ai import TestSuiteRunScorerAi +from .test_suite_run_test_attempt_call import TestSuiteRunTestAttemptCall +from .test_suite_run_test_attempt_metadata import TestSuiteRunTestAttemptMetadata + + +class TestSuiteRunTestAttempt(UncheckedBaseModel): + scorer_results: typing_extensions.Annotated[ + typing.List[TestSuiteRunScorerAi], + FieldMetadata(alias="scorerResults"), + pydantic.Field( + alias="scorerResults", description="These are the results of the scorers used to evaluate the test attempt." + ), + ] + call: typing.Optional[TestSuiteRunTestAttemptCall] = pydantic.Field(default=None) + """ + This is the call made during the test attempt. + """ + + call_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="callId"), + pydantic.Field(alias="callId", description="This is the call ID for the test attempt."), + ] = None + metadata: typing.Optional[TestSuiteRunTestAttemptMetadata] = pydantic.Field(default=None) + """ + This is the metadata for the test attempt. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/test_suite_run_test_attempt_call.py b/src/vapi/types/test_suite_run_test_attempt_call.py new file mode 100644 index 00000000..1879eab4 --- /dev/null +++ b/src/vapi/types/test_suite_run_test_attempt_call.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .artifact import Artifact + + +class TestSuiteRunTestAttemptCall(UncheckedBaseModel): + artifact: Artifact = pydantic.Field() + """ + This is the artifact of the call. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/test_suite_run_test_attempt_metadata.py b/src/vapi/types/test_suite_run_test_attempt_metadata.py new file mode 100644 index 00000000..fce18740 --- /dev/null +++ b/src/vapi/types/test_suite_run_test_attempt_metadata.py @@ -0,0 +1,26 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class TestSuiteRunTestAttemptMetadata(UncheckedBaseModel): + session_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="sessionId"), + pydantic.Field(alias="sessionId", description="This is the session ID for the test attempt."), + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/test_suite_run_test_result.py b/src/vapi/types/test_suite_run_test_result.py new file mode 100644 index 00000000..95665d1e --- /dev/null +++ b/src/vapi/types/test_suite_run_test_result.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .test_suite_run_test_attempt import TestSuiteRunTestAttempt +from .test_suite_test_voice import TestSuiteTestVoice + + +class TestSuiteRunTestResult(UncheckedBaseModel): + test: TestSuiteTestVoice = pydantic.Field() + """ + This is the test that was run. + """ + + attempts: typing.List[TestSuiteRunTestAttempt] = pydantic.Field() + """ + These are the attempts made for this test. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/test_suite_runs_paginated_response.py b/src/vapi/types/test_suite_runs_paginated_response.py new file mode 100644 index 00000000..7418f797 --- /dev/null +++ b/src/vapi/types/test_suite_runs_paginated_response.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .pagination_meta import PaginationMeta +from .test_suite_run import TestSuiteRun + + +class TestSuiteRunsPaginatedResponse(UncheckedBaseModel): + results: typing.List[TestSuiteRun] + metadata: PaginationMeta + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/test_suite_test_chat.py b/src/vapi/types/test_suite_test_chat.py new file mode 100644 index 00000000..35662228 --- /dev/null +++ b/src/vapi/types/test_suite_test_chat.py @@ -0,0 +1,76 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .test_suite_test_scorer_ai import TestSuiteTestScorerAi + + +class TestSuiteTestChat(UncheckedBaseModel): + scorers: typing.List[TestSuiteTestScorerAi] = pydantic.Field() + """ + These are the scorers used to evaluate the test. + """ + + id: str = pydantic.Field() + """ + This is the unique identifier for the test. + """ + + test_suite_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="testSuiteId"), + pydantic.Field( + alias="testSuiteId", description="This is the unique identifier for the test suite this test belongs to." + ), + ] + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the organization this test belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the test was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", description="This is the ISO 8601 date-time string of when the test was last updated." + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the test. + """ + + script: str = pydantic.Field() + """ + This is the script to be used for the chat test. + """ + + num_attempts: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="numAttempts"), + pydantic.Field(alias="numAttempts", description="This is the number of attempts allowed for the test."), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/test_suite_test_scorer_ai.py b/src/vapi/types/test_suite_test_scorer_ai.py new file mode 100644 index 00000000..b097e941 --- /dev/null +++ b/src/vapi/types/test_suite_test_scorer_ai.py @@ -0,0 +1,29 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .test_suite_test_scorer_ai_type import TestSuiteTestScorerAiType + + +class TestSuiteTestScorerAi(UncheckedBaseModel): + type: TestSuiteTestScorerAiType = pydantic.Field() + """ + This is the type of the scorer, which must be AI. + """ + + rubric: str = pydantic.Field() + """ + This is the rubric used by the AI scorer. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/test_suite_test_scorer_ai_type.py b/src/vapi/types/test_suite_test_scorer_ai_type.py new file mode 100644 index 00000000..4a2adf00 --- /dev/null +++ b/src/vapi/types/test_suite_test_scorer_ai_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TestSuiteTestScorerAiType = typing.Union[typing.Literal["ai"], typing.Any] diff --git a/src/vapi/types/test_suite_test_voice.py b/src/vapi/types/test_suite_test_voice.py new file mode 100644 index 00000000..b497a8ee --- /dev/null +++ b/src/vapi/types/test_suite_test_voice.py @@ -0,0 +1,82 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .test_suite_test_scorer_ai import TestSuiteTestScorerAi +from .test_suite_test_voice_type import TestSuiteTestVoiceType + + +class TestSuiteTestVoice(UncheckedBaseModel): + scorers: typing.List[TestSuiteTestScorerAi] = pydantic.Field() + """ + These are the scorers used to evaluate the test. + """ + + type: TestSuiteTestVoiceType = pydantic.Field() + """ + This is the type of the test, which must be voice. + """ + + id: str = pydantic.Field() + """ + This is the unique identifier for the test. + """ + + test_suite_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="testSuiteId"), + pydantic.Field( + alias="testSuiteId", description="This is the unique identifier for the test suite this test belongs to." + ), + ] + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the organization this test belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the test was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", description="This is the ISO 8601 date-time string of when the test was last updated." + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the test. + """ + + script: str = pydantic.Field() + """ + This is the script to be used for the voice test. + """ + + num_attempts: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="numAttempts"), + pydantic.Field(alias="numAttempts", description="This is the number of attempts allowed for the test."), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/test_suite_test_voice_type.py b/src/vapi/types/test_suite_test_voice_type.py new file mode 100644 index 00000000..f1377d2a --- /dev/null +++ b/src/vapi/types/test_suite_test_voice_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TestSuiteTestVoiceType = typing.Union[typing.Literal["voice"], typing.Any] diff --git a/src/vapi/types/test_suite_tests_paginated_response.py b/src/vapi/types/test_suite_tests_paginated_response.py new file mode 100644 index 00000000..2000104f --- /dev/null +++ b/src/vapi/types/test_suite_tests_paginated_response.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .pagination_meta import PaginationMeta +from .test_suite_tests_paginated_response_results_item import TestSuiteTestsPaginatedResponseResultsItem + + +class TestSuiteTestsPaginatedResponse(UncheckedBaseModel): + results: typing.List[TestSuiteTestsPaginatedResponseResultsItem] = pydantic.Field() + """ + A list of test suite tests. + """ + + metadata: PaginationMeta = pydantic.Field() + """ + Metadata about the pagination. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/test_suite_tests_paginated_response_results_item.py b/src/vapi/types/test_suite_tests_paginated_response_results_item.py new file mode 100644 index 00000000..63bcb1e0 --- /dev/null +++ b/src/vapi/types/test_suite_tests_paginated_response_results_item.py @@ -0,0 +1,79 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .test_suite_test_scorer_ai import TestSuiteTestScorerAi + + +class TestSuiteTestsPaginatedResponseResultsItem_Voice(UncheckedBaseModel): + type: typing.Literal["voice"] = "voice" + scorers: typing.List[TestSuiteTestScorerAi] + id: str + test_suite_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="testSuiteId"), pydantic.Field(alias="testSuiteId") + ] + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + name: typing.Optional[str] = None + script: str + num_attempts: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numAttempts"), pydantic.Field(alias="numAttempts") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TestSuiteTestsPaginatedResponseResultsItem_Chat(UncheckedBaseModel): + type: typing.Literal["chat"] = "chat" + scorers: typing.List[TestSuiteTestScorerAi] + id: str + test_suite_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="testSuiteId"), pydantic.Field(alias="testSuiteId") + ] + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + name: typing.Optional[str] = None + script: str + num_attempts: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="numAttempts"), pydantic.Field(alias="numAttempts") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +TestSuiteTestsPaginatedResponseResultsItem = typing_extensions.Annotated[ + typing.Union[TestSuiteTestsPaginatedResponseResultsItem_Voice, TestSuiteTestsPaginatedResponseResultsItem_Chat], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/test_suites_paginated_response.py b/src/vapi/types/test_suites_paginated_response.py new file mode 100644 index 00000000..b03ee464 --- /dev/null +++ b/src/vapi/types/test_suites_paginated_response.py @@ -0,0 +1,28 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .pagination_meta import PaginationMeta +from .test_suite import TestSuite + + +class TestSuitesPaginatedResponse(UncheckedBaseModel): + results: typing.List[TestSuite] + metadata: PaginationMeta + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(TestSuitesPaginatedResponse) diff --git a/src/vapi/types/tester_plan.py b/src/vapi/types/tester_plan.py new file mode 100644 index 00000000..d0607f99 --- /dev/null +++ b/src/vapi/types/tester_plan.py @@ -0,0 +1,166 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class TesterPlan(UncheckedBaseModel): + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) + """ + Pass a transient assistant to use for the test assistant. + + Make sure to write a detailed system prompt for a test assistant, and use the {{test.script}} variable to access the test script. + """ + + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assistantId"), + pydantic.Field( + alias="assistantId", + description="Pass an assistant id that can be access\n\nMake sure to write a detailed system prompt for the test assistant, and use the {{test.script}} variable to access the test script.", + ), + ] = None + assistant_overrides: typing_extensions.Annotated[ + typing.Optional["AssistantOverrides"], + FieldMetadata(alias="assistantOverrides"), + pydantic.Field( + alias="assistantOverrides", + description="Add any assistant overrides to the test assistant.\n\nOne use case is if you want to pass custom variables into the test using variableValues, that you can then access in the script\nand rubric using {{varName}}.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + TesterPlan, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/text_content.py b/src/vapi/types/text_content.py new file mode 100644 index 00000000..eedfd886 --- /dev/null +++ b/src/vapi/types/text_content.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .text_content_language import TextContentLanguage +from .text_content_type import TextContentType + + +class TextContent(UncheckedBaseModel): + type: TextContentType + text: str + language: TextContentLanguage + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/text_content_language.py b/src/vapi/types/text_content_language.py new file mode 100644 index 00000000..15978e6b --- /dev/null +++ b/src/vapi/types/text_content_language.py @@ -0,0 +1,194 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TextContentLanguage = typing.Union[ + typing.Literal[ + "aa", + "ab", + "ae", + "af", + "ak", + "am", + "an", + "ar", + "as", + "av", + "ay", + "az", + "ba", + "be", + "bg", + "bh", + "bi", + "bm", + "bn", + "bo", + "br", + "bs", + "ca", + "ce", + "ch", + "co", + "cr", + "cs", + "cu", + "cv", + "cy", + "da", + "de", + "dv", + "dz", + "ee", + "el", + "en", + "eo", + "es", + "et", + "eu", + "fa", + "ff", + "fi", + "fj", + "fo", + "fr", + "fy", + "ga", + "gd", + "gl", + "gn", + "gu", + "gv", + "ha", + "he", + "hi", + "ho", + "hr", + "ht", + "hu", + "hy", + "hz", + "ia", + "id", + "ie", + "ig", + "ii", + "ik", + "io", + "is", + "it", + "iu", + "ja", + "jv", + "ka", + "kg", + "ki", + "kj", + "kk", + "kl", + "km", + "kn", + "ko", + "kr", + "ks", + "ku", + "kv", + "kw", + "ky", + "la", + "lb", + "lg", + "li", + "ln", + "lo", + "lt", + "lu", + "lv", + "mg", + "mh", + "mi", + "mk", + "ml", + "mn", + "mr", + "ms", + "mt", + "my", + "na", + "nb", + "nd", + "ne", + "ng", + "nl", + "nn", + "no", + "nr", + "nv", + "ny", + "oc", + "oj", + "om", + "or", + "os", + "pa", + "pi", + "pl", + "ps", + "pt", + "qu", + "rm", + "rn", + "ro", + "ru", + "rw", + "sa", + "sc", + "sd", + "se", + "sg", + "si", + "sk", + "sl", + "sm", + "sn", + "so", + "sq", + "sr", + "ss", + "st", + "su", + "sv", + "sw", + "ta", + "te", + "tg", + "th", + "ti", + "tk", + "tl", + "tn", + "to", + "tr", + "ts", + "tt", + "tw", + "ty", + "ug", + "uk", + "ur", + "uz", + "ve", + "vi", + "vo", + "wa", + "wo", + "xh", + "yi", + "yue", + "yo", + "za", + "zh", + "zu", + ], + typing.Any, +] diff --git a/src/vapi/types/text_content_type.py b/src/vapi/types/text_content_type.py new file mode 100644 index 00000000..8fc38fae --- /dev/null +++ b/src/vapi/types/text_content_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TextContentType = typing.Union[typing.Literal["text"], typing.Any] diff --git a/src/vapi/types/text_editor_tool.py b/src/vapi/types/text_editor_tool.py new file mode 100644 index 00000000..bc7c61b5 --- /dev/null +++ b/src/vapi/types/text_editor_tool.py @@ -0,0 +1,95 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .server import Server +from .text_editor_tool_messages_item import TextEditorToolMessagesItem +from .text_editor_tool_name import TextEditorToolName +from .text_editor_tool_sub_type import TextEditorToolSubType +from .tool_rejection_plan import ToolRejectionPlan + + +class TextEditorTool(UncheckedBaseModel): + messages: typing.Optional[typing.List[TextEditorToolMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + sub_type: typing_extensions.Annotated[ + TextEditorToolSubType, + FieldMetadata(alias="subType"), + pydantic.Field(alias="subType", description="The sub type of tool."), + ] + server: typing.Optional[Server] = pydantic.Field(default=None) + """ + + This is the server where a `tool-calls` webhook will be sent. + + Notes: + - Webhook is sent to this server when a tool call is made. + - Webhook contains the call, assistant, and phone number objects. + - Webhook contains the variables set on the assistant. + - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}. + - Webhook expects a response with tool call result. + """ + + id: str = pydantic.Field() + """ + This is the unique identifier for the tool. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the organization that this tool belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the tool was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", description="This is the ISO 8601 date-time string of when the tool was last updated." + ), + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + name: TextEditorToolName = pydantic.Field() + """ + The name of the tool, fixed to 'str_replace_editor' + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(TextEditorTool) diff --git a/src/vapi/types/text_editor_tool_messages_item.py b/src/vapi/types/text_editor_tool_messages_item.py new file mode 100644 index 00000000..475ad013 --- /dev/null +++ b/src/vapi/types/text_editor_tool_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class TextEditorToolMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TextEditorToolMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TextEditorToolMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TextEditorToolMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +TextEditorToolMessagesItem = typing_extensions.Annotated[ + typing.Union[ + TextEditorToolMessagesItem_RequestStart, + TextEditorToolMessagesItem_RequestComplete, + TextEditorToolMessagesItem_RequestFailed, + TextEditorToolMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/text_editor_tool_name.py b/src/vapi/types/text_editor_tool_name.py new file mode 100644 index 00000000..e61bb9b1 --- /dev/null +++ b/src/vapi/types/text_editor_tool_name.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TextEditorToolName = typing.Union[typing.Literal["str_replace_editor"], typing.Any] diff --git a/src/vapi/types/text_editor_tool_sub_type.py b/src/vapi/types/text_editor_tool_sub_type.py new file mode 100644 index 00000000..7857d46f --- /dev/null +++ b/src/vapi/types/text_editor_tool_sub_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TextEditorToolSubType = typing.Union[typing.Literal["text_editor_20241022"], typing.Any] diff --git a/src/vapi/types/text_editor_tool_with_tool_call.py b/src/vapi/types/text_editor_tool_with_tool_call.py new file mode 100644 index 00000000..50a2572e --- /dev/null +++ b/src/vapi/types/text_editor_tool_with_tool_call.py @@ -0,0 +1,71 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .server import Server +from .text_editor_tool_with_tool_call_messages_item import TextEditorToolWithToolCallMessagesItem +from .text_editor_tool_with_tool_call_name import TextEditorToolWithToolCallName +from .text_editor_tool_with_tool_call_sub_type import TextEditorToolWithToolCallSubType +from .tool_call import ToolCall +from .tool_rejection_plan import ToolRejectionPlan + + +class TextEditorToolWithToolCall(UncheckedBaseModel): + messages: typing.Optional[typing.List[TextEditorToolWithToolCallMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + sub_type: typing_extensions.Annotated[ + TextEditorToolWithToolCallSubType, + FieldMetadata(alias="subType"), + pydantic.Field(alias="subType", description="The sub type of tool."), + ] + server: typing.Optional[Server] = pydantic.Field(default=None) + """ + + This is the server where a `tool-calls` webhook will be sent. + + Notes: + - Webhook is sent to this server when a tool call is made. + - Webhook contains the call, assistant, and phone number objects. + - Webhook contains the variables set on the assistant. + - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}. + - Webhook expects a response with tool call result. + """ + + tool_call: typing_extensions.Annotated[ToolCall, FieldMetadata(alias="toolCall"), pydantic.Field(alias="toolCall")] + name: TextEditorToolWithToolCallName = pydantic.Field() + """ + The name of the tool, fixed to 'str_replace_editor' + """ + + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(TextEditorToolWithToolCall) diff --git a/src/vapi/types/text_editor_tool_with_tool_call_messages_item.py b/src/vapi/types/text_editor_tool_with_tool_call_messages_item.py new file mode 100644 index 00000000..1eea2b2d --- /dev/null +++ b/src/vapi/types/text_editor_tool_with_tool_call_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class TextEditorToolWithToolCallMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TextEditorToolWithToolCallMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TextEditorToolWithToolCallMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TextEditorToolWithToolCallMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +TextEditorToolWithToolCallMessagesItem = typing_extensions.Annotated[ + typing.Union[ + TextEditorToolWithToolCallMessagesItem_RequestStart, + TextEditorToolWithToolCallMessagesItem_RequestComplete, + TextEditorToolWithToolCallMessagesItem_RequestFailed, + TextEditorToolWithToolCallMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/text_editor_tool_with_tool_call_name.py b/src/vapi/types/text_editor_tool_with_tool_call_name.py new file mode 100644 index 00000000..2712d7c9 --- /dev/null +++ b/src/vapi/types/text_editor_tool_with_tool_call_name.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TextEditorToolWithToolCallName = typing.Union[typing.Literal["str_replace_editor"], typing.Any] diff --git a/src/vapi/types/text_editor_tool_with_tool_call_sub_type.py b/src/vapi/types/text_editor_tool_with_tool_call_sub_type.py new file mode 100644 index 00000000..82187ac1 --- /dev/null +++ b/src/vapi/types/text_editor_tool_with_tool_call_sub_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TextEditorToolWithToolCallSubType = typing.Union[typing.Literal["text_editor_20241022"], typing.Any] diff --git a/src/vapi/types/text_insight.py b/src/vapi/types/text_insight.py new file mode 100644 index 00000000..a0d7d7a7 --- /dev/null +++ b/src/vapi/types/text_insight.py @@ -0,0 +1,83 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .insight_time_range import InsightTimeRange +from .text_insight_queries_item import TextInsightQueriesItem + + +class TextInsight(UncheckedBaseModel): + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the Insight. + """ + + formula: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) + """ + Formulas are mathematical expressions applied on the data returned by the queries to transform them before being used to create the insight. + The formulas needs to be a valid mathematical expression, supported by MathJS - https://mathjs.org/docs/expressions/syntax.html + A formula is created by using the query names as the variable. + The formulas must contain at least one query name in the LiquidJS format {{query_name}} or {{['query name']}} which will be substituted with the query result. + For example, if you have 2 queries, 'Was Booking Made' and 'Average Call Duration', you can create a formula like this: + ``` + {{['Query 1']}} / {{['Query 2']}} * 100 + ``` + + ``` + ({{[Query 1]}} * 10) + {{[Query 2]}} + ``` + This will take the + + You can also use the query names as the variable in the formula. + """ + + time_range: typing_extensions.Annotated[ + typing.Optional[InsightTimeRange], FieldMetadata(alias="timeRange"), pydantic.Field(alias="timeRange") + ] = None + queries: typing.List[TextInsightQueriesItem] = pydantic.Field() + """ + These are the queries to run to generate the insight. + For Text Insights, we only allow a single query, or require a formula if multiple queries are provided + """ + + id: str = pydantic.Field() + """ + This is the unique identifier for the Insight. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this Insight belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the Insight was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", description="This is the ISO 8601 date-time string of when the Insight was last updated." + ), + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/text_insight_from_call_table.py b/src/vapi/types/text_insight_from_call_table.py new file mode 100644 index 00000000..7dd1b229 --- /dev/null +++ b/src/vapi/types/text_insight_from_call_table.py @@ -0,0 +1,62 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .insight_time_range import InsightTimeRange +from .text_insight_from_call_table_queries_item import TextInsightFromCallTableQueriesItem +from .text_insight_from_call_table_type import TextInsightFromCallTableType + + +class TextInsightFromCallTable(UncheckedBaseModel): + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the Insight. + """ + + type: TextInsightFromCallTableType = pydantic.Field() + """ + This is the type of the Insight. + It is required to be `text` to create a text insight. + """ + + formula: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) + """ + Formulas are mathematical expressions applied on the data returned by the queries to transform them before being used to create the insight. + The formulas needs to be a valid mathematical expression, supported by MathJS - https://mathjs.org/docs/expressions/syntax.html + A formula is created by using the query names as the variable. + The formulas must contain at least one query name in the LiquidJS format {{query_name}} or {{['query name']}} which will be substituted with the query result. + For example, if you have 2 queries, 'Was Booking Made' and 'Average Call Duration', you can create a formula like this: + ``` + {{['Query 1']}} / {{['Query 2']}} * 100 + ``` + + ``` + ({{[Query 1]}} * 10) + {{[Query 2]}} + ``` + This will take the + + You can also use the query names as the variable in the formula. + """ + + time_range: typing_extensions.Annotated[ + typing.Optional[InsightTimeRange], FieldMetadata(alias="timeRange"), pydantic.Field(alias="timeRange") + ] = None + queries: typing.List[TextInsightFromCallTableQueriesItem] = pydantic.Field() + """ + These are the queries to run to generate the insight. + For Text Insights, we only allow a single query, or require a formula if multiple queries are provided + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/text_insight_from_call_table_queries_item.py b/src/vapi/types/text_insight_from_call_table_queries_item.py new file mode 100644 index 00000000..e1aabe82 --- /dev/null +++ b/src/vapi/types/text_insight_from_call_table_queries_item.py @@ -0,0 +1,13 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .json_query_on_call_table_with_number_type_column import JsonQueryOnCallTableWithNumberTypeColumn +from .json_query_on_call_table_with_string_type_column import JsonQueryOnCallTableWithStringTypeColumn +from .json_query_on_call_table_with_structured_output_column import JsonQueryOnCallTableWithStructuredOutputColumn + +TextInsightFromCallTableQueriesItem = typing.Union[ + JsonQueryOnCallTableWithStringTypeColumn, + JsonQueryOnCallTableWithNumberTypeColumn, + JsonQueryOnCallTableWithStructuredOutputColumn, +] diff --git a/src/vapi/types/text_insight_from_call_table_type.py b/src/vapi/types/text_insight_from_call_table_type.py new file mode 100644 index 00000000..e951c679 --- /dev/null +++ b/src/vapi/types/text_insight_from_call_table_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TextInsightFromCallTableType = typing.Union[typing.Literal["text"], typing.Any] diff --git a/src/vapi/types/text_insight_queries_item.py b/src/vapi/types/text_insight_queries_item.py new file mode 100644 index 00000000..9075bdf9 --- /dev/null +++ b/src/vapi/types/text_insight_queries_item.py @@ -0,0 +1,13 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .json_query_on_call_table_with_number_type_column import JsonQueryOnCallTableWithNumberTypeColumn +from .json_query_on_call_table_with_string_type_column import JsonQueryOnCallTableWithStringTypeColumn +from .json_query_on_call_table_with_structured_output_column import JsonQueryOnCallTableWithStructuredOutputColumn + +TextInsightQueriesItem = typing.Union[ + JsonQueryOnCallTableWithStringTypeColumn, + JsonQueryOnCallTableWithNumberTypeColumn, + JsonQueryOnCallTableWithStructuredOutputColumn, +] diff --git a/src/vapi/types/time_range.py b/src/vapi/types/time_range.py index 3b7026a6..9882ef50 100644 --- a/src/vapi/types/time_range.py +++ b/src/vapi/types/time_range.py @@ -1,14 +1,15 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +import datetime as dt import typing -from .time_range_step import TimeRangeStep + import pydantic -import datetime as dt from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .time_range_step import TimeRangeStep -class TimeRange(UniversalBaseModel): +class TimeRange(UncheckedBaseModel): step: typing.Optional[TimeRangeStep] = pydantic.Field(default=None) """ This is the time step for aggregations. diff --git a/src/vapi/types/time_range_step.py b/src/vapi/types/time_range_step.py index 822ed42c..56c910ee 100644 --- a/src/vapi/types/time_range_step.py +++ b/src/vapi/types/time_range_step.py @@ -3,6 +3,8 @@ import typing TimeRangeStep = typing.Union[ - typing.Literal["minute", "hour", "day", "week", "month", "quarter", "year", "decade", "century", "millennium"], + typing.Literal[ + "second", "minute", "hour", "day", "week", "month", "quarter", "year", "decade", "century", "millennium" + ], typing.Any, ] diff --git a/src/vapi/types/together_ai_credential.py b/src/vapi/types/together_ai_credential.py index eded1717..0290c912 100644 --- a/src/vapi/types/together_ai_credential.py +++ b/src/vapi/types/together_ai_credential.py @@ -1,39 +1,53 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +import datetime as dt import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic -import datetime as dt +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .together_ai_credential_provider import TogetherAiCredentialProvider -class TogetherAiCredential(UniversalBaseModel): - provider: typing.Literal["together-ai"] = "together-ai" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() - """ - This is not returned in the API. - """ - +class TogetherAiCredential(UncheckedBaseModel): + provider: TogetherAiCredentialProvider + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] id: str = pydantic.Field() """ This is the unique identifier for the credential. """ - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field() - """ - This is the unique identifier for the org that this credential belongs to. - """ - - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the credential was created. - """ - - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the assistant was last updated. + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/together_ai_credential_provider.py b/src/vapi/types/together_ai_credential_provider.py new file mode 100644 index 00000000..ef5d3931 --- /dev/null +++ b/src/vapi/types/together_ai_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TogetherAiCredentialProvider = typing.Union[typing.Literal["together-ai"], typing.Any] diff --git a/src/vapi/types/together_ai_model.py b/src/vapi/types/together_ai_model.py index 94d81263..b6a16bc2 100644 --- a/src/vapi/types/together_ai_model.py +++ b/src/vapi/types/together_ai_model.py @@ -1,39 +1,44 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +from __future__ import annotations + import typing -from .open_ai_message import OpenAiMessage + import pydantic -from .together_ai_model_tools_item import TogetherAiModelToolsItem import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.serialization import FieldMetadata -from .knowledge_base import KnowledgeBase -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_custom_knowledge_base_dto import CreateCustomKnowledgeBaseDto +from .open_ai_message import OpenAiMessage -class TogetherAiModel(UniversalBaseModel): +class TogetherAiModel(UncheckedBaseModel): messages: typing.Optional[typing.List[OpenAiMessage]] = pydantic.Field(default=None) """ This is the starting state for the conversation. """ - tools: typing.Optional[typing.List[TogetherAiModelToolsItem]] = pydantic.Field(default=None) + tools: typing.Optional[typing.List["TogetherAiModelToolsItem"]] = pydantic.Field(default=None) """ These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`. Both `tools` and `toolIds` can be used together. """ - tool_ids: typing_extensions.Annotated[typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds")] = ( - pydantic.Field(default=None) - ) - """ - These are the tools that the assistant can use during the call. To use transient tools, use `tools`. - - Both `tools` and `toolIds` can be used together. - """ - - provider: typing.Literal["together-ai"] = "together-ai" + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="toolIds"), + pydantic.Field( + alias="toolIds", + description="These are the tools that the assistant can use during the call. To use transient tools, use `tools`.\n\nBoth `tools` and `toolIds` can be used together.", + ), + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase", description="These are the options for the knowledge base."), + ] = None model: str = pydantic.Field() """ This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b @@ -44,41 +49,30 @@ class TogetherAiModel(UniversalBaseModel): This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency. """ - knowledge_base: typing_extensions.Annotated[ - typing.Optional[KnowledgeBase], FieldMetadata(alias="knowledgeBase") - ] = pydantic.Field(default=None) - """ - These are the options for the knowledge base. - """ - - max_tokens: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="maxTokens")] = pydantic.Field( - default=None - ) - """ - This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250. - """ - + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="maxTokens"), + pydantic.Field( + alias="maxTokens", + description="This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.", + ), + ] = None emotion_recognition_enabled: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="emotionRecognitionEnabled") - ] = pydantic.Field(default=None) - """ - This determines whether we detect user's emotion while they speak and send it as an additional info to model. - - Default `false` because the model is usually are good at understanding the user's emotion from text. - - @default false - """ - - num_fast_turns: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="numFastTurns")] = ( - pydantic.Field(default=None) - ) - """ - This sets how many turns at the start of the conversation to use a smaller, faster model from the same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai. - - Default is 0. - - @default 0 - """ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field( + alias="emotionRecognitionEnabled", + description="This determines whether we detect user's emotion while they speak and send it as an additional info to model.\n\nDefault `false` because the model is usually are good at understanding the user's emotion from text.\n\n@default false", + ), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="numFastTurns"), + pydantic.Field( + alias="numFastTurns", + description="This sets how many turns at the start of the conversation to use a smaller, faster model from the same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai.\n\nDefault is 0.\n\n@default 0", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -88,3 +82,121 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + TogetherAiModel, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/together_ai_model_tools_item.py b/src/vapi/types/together_ai_model_tools_item.py index 41785f8b..3cc2d334 100644 --- a/src/vapi/types/together_ai_model_tools_item.py +++ b/src/vapi/types/together_ai_model_tools_item.py @@ -1,20 +1,731 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .create_dtmf_tool_dto import CreateDtmfToolDto -from .create_end_call_tool_dto import CreateEndCallToolDto -from .create_voicemail_tool_dto import CreateVoicemailToolDto -from .create_function_tool_dto import CreateFunctionToolDto -from .create_ghl_tool_dto import CreateGhlToolDto -from .create_make_tool_dto import CreateMakeToolDto -from .create_transfer_call_tool_dto import CreateTransferCallToolDto - -TogetherAiModelToolsItem = typing.Union[ - CreateDtmfToolDto, - CreateEndCallToolDto, - CreateVoicemailToolDto, - CreateFunctionToolDto, - CreateGhlToolDto, - CreateMakeToolDto, - CreateTransferCallToolDto, + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .backoff_plan import BackoffPlan +from .code_tool_environment_variable import CodeToolEnvironmentVariable +from .create_api_request_tool_dto_messages_item import CreateApiRequestToolDtoMessagesItem +from .create_api_request_tool_dto_method import CreateApiRequestToolDtoMethod +from .create_bash_tool_dto_messages_item import CreateBashToolDtoMessagesItem +from .create_bash_tool_dto_name import CreateBashToolDtoName +from .create_bash_tool_dto_sub_type import CreateBashToolDtoSubType +from .create_code_tool_dto_messages_item import CreateCodeToolDtoMessagesItem +from .create_computer_tool_dto_messages_item import CreateComputerToolDtoMessagesItem +from .create_computer_tool_dto_name import CreateComputerToolDtoName +from .create_computer_tool_dto_sub_type import CreateComputerToolDtoSubType +from .create_dtmf_tool_dto_messages_item import CreateDtmfToolDtoMessagesItem +from .create_end_call_tool_dto_messages_item import CreateEndCallToolDtoMessagesItem +from .create_function_tool_dto_messages_item import CreateFunctionToolDtoMessagesItem +from .create_go_high_level_calendar_availability_tool_dto_messages_item import ( + CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem, +) +from .create_go_high_level_calendar_event_create_tool_dto_messages_item import ( + CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_create_tool_dto_messages_item import ( + CreateGoHighLevelContactCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_get_tool_dto_messages_item import CreateGoHighLevelContactGetToolDtoMessagesItem +from .create_google_calendar_check_availability_tool_dto_messages_item import ( + CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem, +) +from .create_google_calendar_create_event_tool_dto_messages_item import ( + CreateGoogleCalendarCreateEventToolDtoMessagesItem, +) +from .create_google_sheets_row_append_tool_dto_messages_item import CreateGoogleSheetsRowAppendToolDtoMessagesItem +from .create_handoff_tool_dto_messages_item import CreateHandoffToolDtoMessagesItem +from .create_mcp_tool_dto_messages_item import CreateMcpToolDtoMessagesItem +from .create_query_tool_dto_messages_item import CreateQueryToolDtoMessagesItem +from .create_sip_request_tool_dto_body import CreateSipRequestToolDtoBody +from .create_sip_request_tool_dto_messages_item import CreateSipRequestToolDtoMessagesItem +from .create_sip_request_tool_dto_verb import CreateSipRequestToolDtoVerb +from .create_slack_send_message_tool_dto_messages_item import CreateSlackSendMessageToolDtoMessagesItem +from .create_sms_tool_dto_messages_item import CreateSmsToolDtoMessagesItem +from .create_text_editor_tool_dto_messages_item import CreateTextEditorToolDtoMessagesItem +from .create_text_editor_tool_dto_name import CreateTextEditorToolDtoName +from .create_text_editor_tool_dto_sub_type import CreateTextEditorToolDtoSubType +from .create_transfer_call_tool_dto_destinations_item import CreateTransferCallToolDtoDestinationsItem +from .create_transfer_call_tool_dto_messages_item import CreateTransferCallToolDtoMessagesItem +from .create_voicemail_tool_dto_messages_item import CreateVoicemailToolDtoMessagesItem +from .knowledge_base import KnowledgeBase +from .mcp_tool_messages import McpToolMessages +from .mcp_tool_metadata import McpToolMetadata +from .open_ai_function import OpenAiFunction +from .server import Server +from .tool_parameter import ToolParameter +from .tool_rejection_plan import ToolRejectionPlan +from .variable_extraction_plan import VariableExtractionPlan + + +class TogetherAiModelToolsItem_ApiRequest(UncheckedBaseModel): + type: typing.Literal["apiRequest"] = "apiRequest" + messages: typing.Optional[typing.List[CreateApiRequestToolDtoMessagesItem]] = None + method: CreateApiRequestToolDtoMethod + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + encrypted_paths: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="encryptedPaths"), pydantic.Field(alias="encryptedPaths") + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + name: typing.Optional[str] = None + description: typing.Optional[str] = None + url: str + body: typing.Optional["JsonSchema"] = None + headers: typing.Optional["JsonSchema"] = None + backoff_plan: typing_extensions.Annotated[ + typing.Optional[BackoffPlan], FieldMetadata(alias="backoffPlan"), pydantic.Field(alias="backoffPlan") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TogetherAiModelToolsItem_Bash(UncheckedBaseModel): + type: typing.Literal["bash"] = "bash" + messages: typing.Optional[typing.List[CreateBashToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateBashToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateBashToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TogetherAiModelToolsItem_Code(UncheckedBaseModel): + type: typing.Literal["code"] = "code" + messages: typing.Optional[typing.List[CreateCodeToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + code: str + environment_variables: typing_extensions.Annotated[ + typing.Optional[typing.List[CodeToolEnvironmentVariable]], + FieldMetadata(alias="environmentVariables"), + pydantic.Field(alias="environmentVariables"), + ] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TogetherAiModelToolsItem_Computer(UncheckedBaseModel): + type: typing.Literal["computer"] = "computer" + messages: typing.Optional[typing.List[CreateComputerToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateComputerToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateComputerToolDtoName + display_width_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayWidthPx"), pydantic.Field(alias="displayWidthPx") + ] + display_height_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayHeightPx"), pydantic.Field(alias="displayHeightPx") + ] + display_number: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="displayNumber"), pydantic.Field(alias="displayNumber") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TogetherAiModelToolsItem_Dtmf(UncheckedBaseModel): + type: typing.Literal["dtmf"] = "dtmf" + messages: typing.Optional[typing.List[CreateDtmfToolDtoMessagesItem]] = None + sip_info_dtmf_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="sipInfoDtmfEnabled"), pydantic.Field(alias="sipInfoDtmfEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TogetherAiModelToolsItem_EndCall(UncheckedBaseModel): + type: typing.Literal["endCall"] = "endCall" + messages: typing.Optional[typing.List[CreateEndCallToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TogetherAiModelToolsItem_Function(UncheckedBaseModel): + type: typing.Literal["function"] = "function" + messages: typing.Optional[typing.List[CreateFunctionToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TogetherAiModelToolsItem_GohighlevelCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.availability.check"] = "gohighlevel.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TogetherAiModelToolsItem_GohighlevelCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.event.create"] = "gohighlevel.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TogetherAiModelToolsItem_GohighlevelContactCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.create"] = "gohighlevel.contact.create" + messages: typing.Optional[typing.List[CreateGoHighLevelContactCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TogetherAiModelToolsItem_GohighlevelContactGet(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.get"] = "gohighlevel.contact.get" + messages: typing.Optional[typing.List[CreateGoHighLevelContactGetToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TogetherAiModelToolsItem_GoogleCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["google.calendar.availability.check"] = "google.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TogetherAiModelToolsItem_GoogleCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["google.calendar.event.create"] = "google.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoogleCalendarCreateEventToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TogetherAiModelToolsItem_GoogleSheetsRowAppend(UncheckedBaseModel): + type: typing.Literal["google.sheets.row.append"] = "google.sheets.row.append" + messages: typing.Optional[typing.List[CreateGoogleSheetsRowAppendToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TogetherAiModelToolsItem_Handoff(UncheckedBaseModel): + type: typing.Literal["handoff"] = "handoff" + messages: typing.Optional[typing.List[CreateHandoffToolDtoMessagesItem]] = None + default_result: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="defaultResult"), pydantic.Field(alias="defaultResult") + ] = None + destinations: typing.Optional[typing.List["CreateHandoffToolDtoDestinationsItem"]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TogetherAiModelToolsItem_Mcp(UncheckedBaseModel): + type: typing.Literal["mcp"] = "mcp" + messages: typing.Optional[typing.List[CreateMcpToolDtoMessagesItem]] = None + server: typing.Optional[Server] = None + tool_messages: typing_extensions.Annotated[ + typing.Optional[typing.List[McpToolMessages]], + FieldMetadata(alias="toolMessages"), + pydantic.Field(alias="toolMessages"), + ] = None + metadata: typing.Optional[McpToolMetadata] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TogetherAiModelToolsItem_Query(UncheckedBaseModel): + type: typing.Literal["query"] = "query" + messages: typing.Optional[typing.List[CreateQueryToolDtoMessagesItem]] = None + knowledge_bases: typing_extensions.Annotated[ + typing.Optional[typing.List[KnowledgeBase]], + FieldMetadata(alias="knowledgeBases"), + pydantic.Field(alias="knowledgeBases"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TogetherAiModelToolsItem_SlackMessageSend(UncheckedBaseModel): + type: typing.Literal["slack.message.send"] = "slack.message.send" + messages: typing.Optional[typing.List[CreateSlackSendMessageToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TogetherAiModelToolsItem_Sms(UncheckedBaseModel): + type: typing.Literal["sms"] = "sms" + messages: typing.Optional[typing.List[CreateSmsToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TogetherAiModelToolsItem_TextEditor(UncheckedBaseModel): + type: typing.Literal["textEditor"] = "textEditor" + messages: typing.Optional[typing.List[CreateTextEditorToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateTextEditorToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateTextEditorToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TogetherAiModelToolsItem_TransferCall(UncheckedBaseModel): + type: typing.Literal["transferCall"] = "transferCall" + messages: typing.Optional[typing.List[CreateTransferCallToolDtoMessagesItem]] = None + destinations: typing.Optional[typing.List[CreateTransferCallToolDtoDestinationsItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TogetherAiModelToolsItem_SipRequest(UncheckedBaseModel): + type: typing.Literal["sipRequest"] = "sipRequest" + messages: typing.Optional[typing.List[CreateSipRequestToolDtoMessagesItem]] = None + verb: CreateSipRequestToolDtoVerb + headers: typing.Optional["JsonSchema"] = None + body: typing.Optional[CreateSipRequestToolDtoBody] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TogetherAiModelToolsItem_Voicemail(UncheckedBaseModel): + type: typing.Literal["voicemail"] = "voicemail" + messages: typing.Optional[typing.List[CreateVoicemailToolDtoMessagesItem]] = None + beep_detection_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="beepDetectionEnabled"), pydantic.Field(alias="beepDetectionEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +TogetherAiModelToolsItem = typing_extensions.Annotated[ + typing.Union[ + TogetherAiModelToolsItem_ApiRequest, + TogetherAiModelToolsItem_Bash, + TogetherAiModelToolsItem_Code, + TogetherAiModelToolsItem_Computer, + TogetherAiModelToolsItem_Dtmf, + TogetherAiModelToolsItem_EndCall, + TogetherAiModelToolsItem_Function, + TogetherAiModelToolsItem_GohighlevelCalendarAvailabilityCheck, + TogetherAiModelToolsItem_GohighlevelCalendarEventCreate, + TogetherAiModelToolsItem_GohighlevelContactCreate, + TogetherAiModelToolsItem_GohighlevelContactGet, + TogetherAiModelToolsItem_GoogleCalendarAvailabilityCheck, + TogetherAiModelToolsItem_GoogleCalendarEventCreate, + TogetherAiModelToolsItem_GoogleSheetsRowAppend, + TogetherAiModelToolsItem_Handoff, + TogetherAiModelToolsItem_Mcp, + TogetherAiModelToolsItem_Query, + TogetherAiModelToolsItem_SlackMessageSend, + TogetherAiModelToolsItem_Sms, + TogetherAiModelToolsItem_TextEditor, + TogetherAiModelToolsItem_TransferCall, + TogetherAiModelToolsItem_SipRequest, + TogetherAiModelToolsItem_Voicemail, + ], + UnionMetadata(discriminant="type"), ] +from .json_schema import JsonSchema # noqa: E402, I001 +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs(TogetherAiModelToolsItem_ApiRequest, JsonSchema=JsonSchema) +update_forward_refs(TogetherAiModelToolsItem_Bash) +update_forward_refs(TogetherAiModelToolsItem_Code) +update_forward_refs(TogetherAiModelToolsItem_Computer) +update_forward_refs(TogetherAiModelToolsItem_Dtmf) +update_forward_refs(TogetherAiModelToolsItem_EndCall) +update_forward_refs(TogetherAiModelToolsItem_Function) +update_forward_refs(TogetherAiModelToolsItem_GohighlevelCalendarAvailabilityCheck) +update_forward_refs(TogetherAiModelToolsItem_GohighlevelCalendarEventCreate) +update_forward_refs(TogetherAiModelToolsItem_GohighlevelContactCreate) +update_forward_refs(TogetherAiModelToolsItem_GohighlevelContactGet) +update_forward_refs(TogetherAiModelToolsItem_GoogleCalendarAvailabilityCheck) +update_forward_refs(TogetherAiModelToolsItem_GoogleCalendarEventCreate) +update_forward_refs(TogetherAiModelToolsItem_GoogleSheetsRowAppend) +update_forward_refs( + TogetherAiModelToolsItem_Handoff, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs(TogetherAiModelToolsItem_Mcp) +update_forward_refs(TogetherAiModelToolsItem_Query) +update_forward_refs(TogetherAiModelToolsItem_SlackMessageSend) +update_forward_refs(TogetherAiModelToolsItem_Sms) +update_forward_refs(TogetherAiModelToolsItem_TextEditor) +update_forward_refs(TogetherAiModelToolsItem_TransferCall) +update_forward_refs(TogetherAiModelToolsItem_SipRequest, JsonSchema=JsonSchema) +update_forward_refs(TogetherAiModelToolsItem_Voicemail) diff --git a/src/vapi/types/token.py b/src/vapi/types/token.py index 7125095c..cc90b431 100644 --- a/src/vapi/types/token.py +++ b/src/vapi/types/token.py @@ -1,17 +1,18 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +import datetime as dt import typing -from .token_tag import TokenTag + import pydantic import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.serialization import FieldMetadata -import datetime as dt +from ..core.unchecked_base_model import UncheckedBaseModel from .token_restrictions import TokenRestrictions -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from .token_tag import TokenTag -class Token(UniversalBaseModel): +class Token(UncheckedBaseModel): tag: typing.Optional[TokenTag] = pydantic.Field(default=None) """ This is the tag for the token. It represents its scope. @@ -22,22 +23,26 @@ class Token(UniversalBaseModel): This is the unique identifier for the token. """ - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field() - """ - This is unique identifier for the org that this token belongs to. - """ - - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the token was created. - """ - - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the token was last updated. - """ - - value: str = pydantic.Field() + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field(alias="orgId", description="This is unique identifier for the org that this token belongs to."), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the token was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", description="This is the ISO 8601 date-time string of when the token was last updated." + ), + ] + value: typing.Optional[str] = pydantic.Field(default=None) """ This is the token key. """ diff --git a/src/vapi/types/token_restrictions.py b/src/vapi/types/token_restrictions.py index 745130bf..84785f62 100644 --- a/src/vapi/types/token_restrictions.py +++ b/src/vapi/types/token_restrictions.py @@ -1,47 +1,44 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing + import pydantic import typing_extensions -from ..core.serialization import FieldMetadata from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class TokenRestrictions(UniversalBaseModel): +class TokenRestrictions(UncheckedBaseModel): enabled: typing.Optional[bool] = pydantic.Field(default=None) """ This determines whether the token is enabled or disabled. Default is true, it's enabled. """ allowed_origins: typing_extensions.Annotated[ - typing.Optional[typing.List[str]], FieldMetadata(alias="allowedOrigins") - ] = pydantic.Field(default=None) - """ - This determines the allowed origins for this token. Validates the `Origin` header. Default is any origin. - - Only relevant for `public` tokens. - """ - + typing.Optional[typing.List[str]], + FieldMetadata(alias="allowedOrigins"), + pydantic.Field( + alias="allowedOrigins", + description="This determines the allowed origins for this token. Validates the `Origin` header. Default is any origin.\n\nOnly relevant for `public` tokens.", + ), + ] = None allowed_assistant_ids: typing_extensions.Annotated[ - typing.Optional[typing.List[str]], FieldMetadata(alias="allowedAssistantIds") - ] = pydantic.Field(default=None) - """ - This determines which assistantIds can be used when creating a call. Default is any assistantId. - - Only relevant for `public` tokens. - """ - + typing.Optional[typing.List[str]], + FieldMetadata(alias="allowedAssistantIds"), + pydantic.Field( + alias="allowedAssistantIds", + description="This determines which assistantIds can be used when creating a call. Default is any assistantId.\n\nOnly relevant for `public` tokens.", + ), + ] = None allow_transient_assistant: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="allowTransientAssistant") - ] = pydantic.Field(default=None) - """ - This determines whether transient assistants can be used when creating a call. Default is true. - - If `allowedAssistantIds` is provided, this is automatically false. - - Only relevant for `public` tokens. - """ + typing.Optional[bool], + FieldMetadata(alias="allowTransientAssistant"), + pydantic.Field( + alias="allowTransientAssistant", + description="This determines whether transient assistants can be used when creating a call. Default is true.\n\nIf `allowedAssistantIds` is provided, this is automatically false.\n\nOnly relevant for `public` tokens.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/tool_call.py b/src/vapi/types/tool_call.py index 069fe425..20ba56c5 100644 --- a/src/vapi/types/tool_call.py +++ b/src/vapi/types/tool_call.py @@ -1,26 +1,27 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing + import pydantic -from .tool_call_function import ToolCallFunction from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .tool_call_function import ToolCallFunction -class ToolCall(UniversalBaseModel): - type: typing.Literal["function"] = pydantic.Field(default="function") +class ToolCall(UncheckedBaseModel): + id: str = pydantic.Field() """ - This is the type of tool the model called. + This is the ID of the tool call """ - function: ToolCallFunction = pydantic.Field() + type: str = pydantic.Field() """ - This is the function the model called. + This is the type of tool """ - id: str = pydantic.Field() + function: ToolCallFunction = pydantic.Field() """ - This is the unique identifier for the tool call. + This is the function that was called """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/tool_call_block.py b/src/vapi/types/tool_call_block.py deleted file mode 100644 index 33c905c8..00000000 --- a/src/vapi/types/tool_call_block.py +++ /dev/null @@ -1,96 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from ..core.pydantic_utilities import UniversalBaseModel -import typing -from .tool_call_block_messages_item import ToolCallBlockMessagesItem -import pydantic -import typing_extensions -from .json_schema import JsonSchema -from ..core.serialization import FieldMetadata -from .tool_call_block_tool import ToolCallBlockTool -import datetime as dt -from ..core.pydantic_utilities import IS_PYDANTIC_V2 - - -class ToolCallBlock(UniversalBaseModel): - messages: typing.Optional[typing.List[ToolCallBlockMessagesItem]] = pydantic.Field(default=None) - """ - These are the pre-configured messages that will be spoken to the user while the block is running. - """ - - input_schema: typing_extensions.Annotated[typing.Optional[JsonSchema], FieldMetadata(alias="inputSchema")] = ( - pydantic.Field(default=None) - ) - """ - This is the input schema for the block. This is the input the block needs to run. It's given to the block as `steps[0].input` - - These are accessible as variables: - - - ({{input.propertyName}}) in context of the block execution (step) - - ({{stepName.input.propertyName}}) in context of the workflow - """ - - output_schema: typing_extensions.Annotated[typing.Optional[JsonSchema], FieldMetadata(alias="outputSchema")] = ( - pydantic.Field(default=None) - ) - """ - This is the output schema for the block. This is the output the block will return to the workflow (`{{stepName.output}}`). - - These are accessible as variables: - - - ({{output.propertyName}}) in context of the block execution (step) - - ({{stepName.output.propertyName}}) in context of the workflow (read caveat #1) - - ({{blockName.output.propertyName}}) in context of the workflow (read caveat #2) - - Caveats: - - 1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.output.propertyName}} will reference the latest usage of the step. - 2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.output.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow with steps. - """ - - type: typing.Literal["tool-call"] = "tool-call" - tool: typing.Optional[ToolCallBlockTool] = pydantic.Field(default=None) - """ - This is the tool that the block will call. To use an existing tool, use `toolId`. - """ - - id: str = pydantic.Field() - """ - This is the unique identifier for the block. - """ - - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field() - """ - This is the unique identifier for the organization that this block belongs to. - """ - - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the block was created. - """ - - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the block was last updated. - """ - - name: typing.Optional[str] = pydantic.Field(default=None) - """ - This is the name of the block. This is just for your reference. - """ - - tool_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="toolId")] = pydantic.Field( - default=None - ) - """ - This is the id of the tool that the block will call. To use a transient tool, use `tool`. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/vapi/types/tool_call_block_messages_item.py b/src/vapi/types/tool_call_block_messages_item.py deleted file mode 100644 index 63f65583..00000000 --- a/src/vapi/types/tool_call_block_messages_item.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from .block_start_message import BlockStartMessage -from .block_complete_message import BlockCompleteMessage - -ToolCallBlockMessagesItem = typing.Union[BlockStartMessage, BlockCompleteMessage] diff --git a/src/vapi/types/tool_call_block_tool.py b/src/vapi/types/tool_call_block_tool.py deleted file mode 100644 index 6e18d1b4..00000000 --- a/src/vapi/types/tool_call_block_tool.py +++ /dev/null @@ -1,20 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from .create_dtmf_tool_dto import CreateDtmfToolDto -from .create_end_call_tool_dto import CreateEndCallToolDto -from .create_voicemail_tool_dto import CreateVoicemailToolDto -from .create_function_tool_dto import CreateFunctionToolDto -from .create_ghl_tool_dto import CreateGhlToolDto -from .create_make_tool_dto import CreateMakeToolDto -from .create_transfer_call_tool_dto import CreateTransferCallToolDto - -ToolCallBlockTool = typing.Union[ - CreateDtmfToolDto, - CreateEndCallToolDto, - CreateVoicemailToolDto, - CreateFunctionToolDto, - CreateGhlToolDto, - CreateMakeToolDto, - CreateTransferCallToolDto, -] diff --git a/src/vapi/types/tool_call_function.py b/src/vapi/types/tool_call_function.py index a9932ef7..6d61417a 100644 --- a/src/vapi/types/tool_call_function.py +++ b/src/vapi/types/tool_call_function.py @@ -1,20 +1,21 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import pydantic import typing + +import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel -class ToolCallFunction(UniversalBaseModel): - name: str = pydantic.Field() +class ToolCallFunction(UncheckedBaseModel): + arguments: str = pydantic.Field() """ - This is the name of the function the model called. + This is the arguments to call the function with """ - arguments: typing.Dict[str, typing.Optional[typing.Any]] = pydantic.Field() + name: str = pydantic.Field() """ - These are the arguments that the function was called with. + This is the name of the function to call """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/tool_call_hook_action.py b/src/vapi/types/tool_call_hook_action.py new file mode 100644 index 00000000..ea22f22f --- /dev/null +++ b/src/vapi/types/tool_call_hook_action.py @@ -0,0 +1,159 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .tool_call_hook_action_type import ToolCallHookActionType + + +class ToolCallHookAction(UncheckedBaseModel): + type: ToolCallHookActionType = pydantic.Field() + """ + This is the type of action - must be "tool" + """ + + tool: typing.Optional["ToolCallHookActionTool"] = pydantic.Field(default=None) + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + tool_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="toolId"), + pydantic.Field( + alias="toolId", description="This is the tool to call. To use a transient tool, send `tool` instead." + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + ToolCallHookAction, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/tool_call_hook_action_tool.py b/src/vapi/types/tool_call_hook_action_tool.py new file mode 100644 index 00000000..1ad23174 --- /dev/null +++ b/src/vapi/types/tool_call_hook_action_tool.py @@ -0,0 +1,823 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .backoff_plan import BackoffPlan +from .code_tool_environment_variable import CodeToolEnvironmentVariable +from .create_api_request_tool_dto_messages_item import CreateApiRequestToolDtoMessagesItem +from .create_api_request_tool_dto_method import CreateApiRequestToolDtoMethod +from .create_bash_tool_dto_messages_item import CreateBashToolDtoMessagesItem +from .create_bash_tool_dto_name import CreateBashToolDtoName +from .create_bash_tool_dto_sub_type import CreateBashToolDtoSubType +from .create_code_tool_dto_messages_item import CreateCodeToolDtoMessagesItem +from .create_computer_tool_dto_messages_item import CreateComputerToolDtoMessagesItem +from .create_computer_tool_dto_name import CreateComputerToolDtoName +from .create_computer_tool_dto_sub_type import CreateComputerToolDtoSubType +from .create_dtmf_tool_dto_messages_item import CreateDtmfToolDtoMessagesItem +from .create_end_call_tool_dto_messages_item import CreateEndCallToolDtoMessagesItem +from .create_function_tool_dto_messages_item import CreateFunctionToolDtoMessagesItem +from .create_go_high_level_calendar_availability_tool_dto_messages_item import ( + CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem, +) +from .create_go_high_level_calendar_event_create_tool_dto_messages_item import ( + CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_create_tool_dto_messages_item import ( + CreateGoHighLevelContactCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_get_tool_dto_messages_item import CreateGoHighLevelContactGetToolDtoMessagesItem +from .create_google_calendar_check_availability_tool_dto_messages_item import ( + CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem, +) +from .create_google_calendar_create_event_tool_dto_messages_item import ( + CreateGoogleCalendarCreateEventToolDtoMessagesItem, +) +from .create_google_sheets_row_append_tool_dto_messages_item import CreateGoogleSheetsRowAppendToolDtoMessagesItem +from .create_handoff_tool_dto_messages_item import CreateHandoffToolDtoMessagesItem +from .create_mcp_tool_dto_messages_item import CreateMcpToolDtoMessagesItem +from .create_query_tool_dto_messages_item import CreateQueryToolDtoMessagesItem +from .create_sip_request_tool_dto_body import CreateSipRequestToolDtoBody +from .create_sip_request_tool_dto_messages_item import CreateSipRequestToolDtoMessagesItem +from .create_sip_request_tool_dto_verb import CreateSipRequestToolDtoVerb +from .create_slack_send_message_tool_dto_messages_item import CreateSlackSendMessageToolDtoMessagesItem +from .create_sms_tool_dto_messages_item import CreateSmsToolDtoMessagesItem +from .create_text_editor_tool_dto_messages_item import CreateTextEditorToolDtoMessagesItem +from .create_text_editor_tool_dto_name import CreateTextEditorToolDtoName +from .create_text_editor_tool_dto_sub_type import CreateTextEditorToolDtoSubType +from .create_transfer_call_tool_dto_destinations_item import CreateTransferCallToolDtoDestinationsItem +from .create_transfer_call_tool_dto_messages_item import CreateTransferCallToolDtoMessagesItem +from .create_voicemail_tool_dto_messages_item import CreateVoicemailToolDtoMessagesItem +from .knowledge_base import KnowledgeBase +from .mcp_tool_messages import McpToolMessages +from .mcp_tool_metadata import McpToolMetadata +from .open_ai_function import OpenAiFunction +from .server import Server +from .tool_parameter import ToolParameter +from .tool_rejection_plan import ToolRejectionPlan +from .variable_extraction_plan import VariableExtractionPlan + + +class ToolCallHookActionTool_ApiRequest(UncheckedBaseModel): + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + type: typing.Literal["apiRequest"] = "apiRequest" + messages: typing.Optional[typing.List[CreateApiRequestToolDtoMessagesItem]] = None + method: CreateApiRequestToolDtoMethod + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + encrypted_paths: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="encryptedPaths"), pydantic.Field(alias="encryptedPaths") + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + name: typing.Optional[str] = None + description: typing.Optional[str] = None + url: str + body: typing.Optional["JsonSchema"] = None + headers: typing.Optional["JsonSchema"] = None + backoff_plan: typing_extensions.Annotated[ + typing.Optional[BackoffPlan], FieldMetadata(alias="backoffPlan"), pydantic.Field(alias="backoffPlan") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ToolCallHookActionTool_Bash(UncheckedBaseModel): + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + type: typing.Literal["bash"] = "bash" + messages: typing.Optional[typing.List[CreateBashToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateBashToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateBashToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ToolCallHookActionTool_Code(UncheckedBaseModel): + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + type: typing.Literal["code"] = "code" + messages: typing.Optional[typing.List[CreateCodeToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + code: str + environment_variables: typing_extensions.Annotated[ + typing.Optional[typing.List[CodeToolEnvironmentVariable]], + FieldMetadata(alias="environmentVariables"), + pydantic.Field(alias="environmentVariables"), + ] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ToolCallHookActionTool_Computer(UncheckedBaseModel): + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + type: typing.Literal["computer"] = "computer" + messages: typing.Optional[typing.List[CreateComputerToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateComputerToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateComputerToolDtoName + display_width_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayWidthPx"), pydantic.Field(alias="displayWidthPx") + ] + display_height_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayHeightPx"), pydantic.Field(alias="displayHeightPx") + ] + display_number: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="displayNumber"), pydantic.Field(alias="displayNumber") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ToolCallHookActionTool_Dtmf(UncheckedBaseModel): + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + type: typing.Literal["dtmf"] = "dtmf" + messages: typing.Optional[typing.List[CreateDtmfToolDtoMessagesItem]] = None + sip_info_dtmf_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="sipInfoDtmfEnabled"), pydantic.Field(alias="sipInfoDtmfEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ToolCallHookActionTool_EndCall(UncheckedBaseModel): + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + type: typing.Literal["endCall"] = "endCall" + messages: typing.Optional[typing.List[CreateEndCallToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ToolCallHookActionTool_Function(UncheckedBaseModel): + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + type: typing.Literal["function"] = "function" + messages: typing.Optional[typing.List[CreateFunctionToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ToolCallHookActionTool_GohighlevelCalendarAvailabilityCheck(UncheckedBaseModel): + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + type: typing.Literal["gohighlevel.calendar.availability.check"] = "gohighlevel.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ToolCallHookActionTool_GohighlevelCalendarEventCreate(UncheckedBaseModel): + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + type: typing.Literal["gohighlevel.calendar.event.create"] = "gohighlevel.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ToolCallHookActionTool_GohighlevelContactCreate(UncheckedBaseModel): + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + type: typing.Literal["gohighlevel.contact.create"] = "gohighlevel.contact.create" + messages: typing.Optional[typing.List[CreateGoHighLevelContactCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ToolCallHookActionTool_GohighlevelContactGet(UncheckedBaseModel): + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + type: typing.Literal["gohighlevel.contact.get"] = "gohighlevel.contact.get" + messages: typing.Optional[typing.List[CreateGoHighLevelContactGetToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ToolCallHookActionTool_GoogleCalendarAvailabilityCheck(UncheckedBaseModel): + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + type: typing.Literal["google.calendar.availability.check"] = "google.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ToolCallHookActionTool_GoogleCalendarEventCreate(UncheckedBaseModel): + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + type: typing.Literal["google.calendar.event.create"] = "google.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoogleCalendarCreateEventToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ToolCallHookActionTool_GoogleSheetsRowAppend(UncheckedBaseModel): + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + type: typing.Literal["google.sheets.row.append"] = "google.sheets.row.append" + messages: typing.Optional[typing.List[CreateGoogleSheetsRowAppendToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ToolCallHookActionTool_Handoff(UncheckedBaseModel): + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + type: typing.Literal["handoff"] = "handoff" + messages: typing.Optional[typing.List[CreateHandoffToolDtoMessagesItem]] = None + default_result: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="defaultResult"), pydantic.Field(alias="defaultResult") + ] = None + destinations: typing.Optional[typing.List["CreateHandoffToolDtoDestinationsItem"]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ToolCallHookActionTool_Mcp(UncheckedBaseModel): + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + type: typing.Literal["mcp"] = "mcp" + messages: typing.Optional[typing.List[CreateMcpToolDtoMessagesItem]] = None + server: typing.Optional[Server] = None + tool_messages: typing_extensions.Annotated[ + typing.Optional[typing.List[McpToolMessages]], + FieldMetadata(alias="toolMessages"), + pydantic.Field(alias="toolMessages"), + ] = None + metadata: typing.Optional[McpToolMetadata] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ToolCallHookActionTool_Query(UncheckedBaseModel): + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + type: typing.Literal["query"] = "query" + messages: typing.Optional[typing.List[CreateQueryToolDtoMessagesItem]] = None + knowledge_bases: typing_extensions.Annotated[ + typing.Optional[typing.List[KnowledgeBase]], + FieldMetadata(alias="knowledgeBases"), + pydantic.Field(alias="knowledgeBases"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ToolCallHookActionTool_SlackMessageSend(UncheckedBaseModel): + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + type: typing.Literal["slack.message.send"] = "slack.message.send" + messages: typing.Optional[typing.List[CreateSlackSendMessageToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ToolCallHookActionTool_Sms(UncheckedBaseModel): + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + type: typing.Literal["sms"] = "sms" + messages: typing.Optional[typing.List[CreateSmsToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ToolCallHookActionTool_TextEditor(UncheckedBaseModel): + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + type: typing.Literal["textEditor"] = "textEditor" + messages: typing.Optional[typing.List[CreateTextEditorToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateTextEditorToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateTextEditorToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ToolCallHookActionTool_TransferCall(UncheckedBaseModel): + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + type: typing.Literal["transferCall"] = "transferCall" + messages: typing.Optional[typing.List[CreateTransferCallToolDtoMessagesItem]] = None + destinations: typing.Optional[typing.List[CreateTransferCallToolDtoDestinationsItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ToolCallHookActionTool_SipRequest(UncheckedBaseModel): + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + type: typing.Literal["sipRequest"] = "sipRequest" + messages: typing.Optional[typing.List[CreateSipRequestToolDtoMessagesItem]] = None + verb: CreateSipRequestToolDtoVerb + headers: typing.Optional["JsonSchema"] = None + body: typing.Optional[CreateSipRequestToolDtoBody] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ToolCallHookActionTool_Voicemail(UncheckedBaseModel): + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + type: typing.Literal["voicemail"] = "voicemail" + messages: typing.Optional[typing.List[CreateVoicemailToolDtoMessagesItem]] = None + beep_detection_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="beepDetectionEnabled"), pydantic.Field(alias="beepDetectionEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ToolCallHookActionTool = typing_extensions.Annotated[ + typing.Union[ + ToolCallHookActionTool_ApiRequest, + ToolCallHookActionTool_Bash, + ToolCallHookActionTool_Code, + ToolCallHookActionTool_Computer, + ToolCallHookActionTool_Dtmf, + ToolCallHookActionTool_EndCall, + ToolCallHookActionTool_Function, + ToolCallHookActionTool_GohighlevelCalendarAvailabilityCheck, + ToolCallHookActionTool_GohighlevelCalendarEventCreate, + ToolCallHookActionTool_GohighlevelContactCreate, + ToolCallHookActionTool_GohighlevelContactGet, + ToolCallHookActionTool_GoogleCalendarAvailabilityCheck, + ToolCallHookActionTool_GoogleCalendarEventCreate, + ToolCallHookActionTool_GoogleSheetsRowAppend, + ToolCallHookActionTool_Handoff, + ToolCallHookActionTool_Mcp, + ToolCallHookActionTool_Query, + ToolCallHookActionTool_SlackMessageSend, + ToolCallHookActionTool_Sms, + ToolCallHookActionTool_TextEditor, + ToolCallHookActionTool_TransferCall, + ToolCallHookActionTool_SipRequest, + ToolCallHookActionTool_Voicemail, + ], + UnionMetadata(discriminant="type"), +] +from .json_schema import JsonSchema # noqa: E402, I001 +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs(ToolCallHookActionTool_ApiRequest, JsonSchema=JsonSchema) +update_forward_refs(ToolCallHookActionTool_Bash) +update_forward_refs(ToolCallHookActionTool_Code) +update_forward_refs(ToolCallHookActionTool_Computer) +update_forward_refs(ToolCallHookActionTool_Dtmf) +update_forward_refs(ToolCallHookActionTool_EndCall) +update_forward_refs(ToolCallHookActionTool_Function) +update_forward_refs(ToolCallHookActionTool_GohighlevelCalendarAvailabilityCheck) +update_forward_refs(ToolCallHookActionTool_GohighlevelCalendarEventCreate) +update_forward_refs(ToolCallHookActionTool_GohighlevelContactCreate) +update_forward_refs(ToolCallHookActionTool_GohighlevelContactGet) +update_forward_refs(ToolCallHookActionTool_GoogleCalendarAvailabilityCheck) +update_forward_refs(ToolCallHookActionTool_GoogleCalendarEventCreate) +update_forward_refs(ToolCallHookActionTool_GoogleSheetsRowAppend) +update_forward_refs( + ToolCallHookActionTool_Handoff, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs(ToolCallHookActionTool_Mcp) +update_forward_refs(ToolCallHookActionTool_Query) +update_forward_refs(ToolCallHookActionTool_SlackMessageSend) +update_forward_refs(ToolCallHookActionTool_Sms) +update_forward_refs(ToolCallHookActionTool_TextEditor) +update_forward_refs(ToolCallHookActionTool_TransferCall) +update_forward_refs(ToolCallHookActionTool_SipRequest, JsonSchema=JsonSchema) +update_forward_refs(ToolCallHookActionTool_Voicemail) diff --git a/src/vapi/types/tool_call_hook_action_type.py b/src/vapi/types/tool_call_hook_action_type.py new file mode 100644 index 00000000..53d5e574 --- /dev/null +++ b/src/vapi/types/tool_call_hook_action_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ToolCallHookActionType = typing.Union[typing.Literal["tool"], typing.Any] diff --git a/src/vapi/types/tool_call_message.py b/src/vapi/types/tool_call_message.py index bf5b2b07..0bd08e85 100644 --- a/src/vapi/types/tool_call_message.py +++ b/src/vapi/types/tool_call_message.py @@ -1,26 +1,25 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +import typing + import pydantic import typing_extensions -import typing -from ..core.serialization import FieldMetadata from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class ToolCallMessage(UniversalBaseModel): +class ToolCallMessage(UncheckedBaseModel): role: str = pydantic.Field() """ The role of the tool call in the conversation. """ tool_calls: typing_extensions.Annotated[ - typing.List[typing.Dict[str, typing.Optional[typing.Any]]], FieldMetadata(alias="toolCalls") - ] = pydantic.Field() - """ - The list of tool calls made during the conversation. - """ - + typing.List[typing.Dict[str, typing.Any]], + FieldMetadata(alias="toolCalls"), + pydantic.Field(alias="toolCalls", description="The list of tool calls made during the conversation."), + ] message: str = pydantic.Field() """ The message content for the tool call. @@ -31,10 +30,13 @@ class ToolCallMessage(UniversalBaseModel): The timestamp when the message was sent. """ - seconds_from_start: typing_extensions.Annotated[float, FieldMetadata(alias="secondsFromStart")] = pydantic.Field() - """ - The number of seconds from the start of the conversation. - """ + seconds_from_start: typing_extensions.Annotated[ + float, + FieldMetadata(alias="secondsFromStart"), + pydantic.Field( + alias="secondsFromStart", description="The number of seconds from the start of the conversation." + ), + ] if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/tool_call_result.py b/src/vapi/types/tool_call_result.py index ddabef79..65e5edfa 100644 --- a/src/vapi/types/tool_call_result.py +++ b/src/vapi/types/tool_call_result.py @@ -1,21 +1,21 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -from .tool_call_result_message_item import ToolCallResultMessageItem + import pydantic import typing_extensions -from ..core.serialization import FieldMetadata from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .tool_call_result_message import ToolCallResultMessage -class ToolCallResult(UniversalBaseModel): - message: typing.Optional[typing.List[ToolCallResultMessageItem]] = pydantic.Field(default=None) +class ToolCallResult(UncheckedBaseModel): + message: typing.Optional[ToolCallResultMessage] = pydantic.Field(default=None) """ This is the message that will be spoken to the user. If this is not returned, assistant will speak: - 1. a `request-complete` or `request-failed` message from `tool.messages`, if it exists 2. a response generated by the model, if not """ @@ -25,17 +25,16 @@ class ToolCallResult(UniversalBaseModel): This is the name of the function the model called. """ - tool_call_id: typing_extensions.Annotated[str, FieldMetadata(alias="toolCallId")] = pydantic.Field() - """ - This is the unique identifier for the tool call. - """ - + tool_call_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="toolCallId"), + pydantic.Field(alias="toolCallId", description="This is the unique identifier for the tool call."), + ] result: typing.Optional[str] = pydantic.Field(default=None) """ This is the result if the tool call was successful. This is added to the conversation history. Further, if this is returned, assistant will speak: - 1. the `message`, if it exists and is of type `request-complete` 2. a `request-complete` message from `tool.messages`, if it exists 3. a response generated by the model, if neither exist @@ -46,12 +45,16 @@ class ToolCallResult(UniversalBaseModel): This is the error if the tool call was not successful. This is added to the conversation history. Further, if this is returned, assistant will speak: - 1. the `message`, if it exists and is of type `request-failed` 2. a `request-failed` message from `tool.messages`, if it exists 3. a response generated by the model, if neither exist """ + metadata: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) + """ + This is optional metadata for the tool call result to be sent to the client. + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/vapi/types/tool_call_result_message.py b/src/vapi/types/tool_call_result_message.py index 3bda89c8..9d7fcea0 100644 --- a/src/vapi/types/tool_call_result_message.py +++ b/src/vapi/types/tool_call_result_message.py @@ -1,24 +1,25 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +import typing + import pydantic import typing_extensions -from ..core.serialization import FieldMetadata from ..core.pydantic_utilities import IS_PYDANTIC_V2 -import typing +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class ToolCallResultMessage(UniversalBaseModel): +class ToolCallResultMessage(UncheckedBaseModel): role: str = pydantic.Field() """ The role of the tool call result in the conversation. """ - tool_call_id: typing_extensions.Annotated[str, FieldMetadata(alias="toolCallId")] = pydantic.Field() - """ - The ID of the tool call. - """ - + tool_call_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="toolCallId"), + pydantic.Field(alias="toolCallId", description="The ID of the tool call."), + ] name: str = pydantic.Field() """ The name of the tool that returned the result. @@ -34,9 +35,16 @@ class ToolCallResultMessage(UniversalBaseModel): The timestamp when the message was sent. """ - seconds_from_start: typing_extensions.Annotated[float, FieldMetadata(alias="secondsFromStart")] = pydantic.Field() + seconds_from_start: typing_extensions.Annotated[ + float, + FieldMetadata(alias="secondsFromStart"), + pydantic.Field( + alias="secondsFromStart", description="The number of seconds from the start of the conversation." + ), + ] + metadata: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) """ - The number of seconds from the start of the conversation. + The metadata for the tool call result. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/tool_call_result_message_item.py b/src/vapi/types/tool_call_result_message_item.py deleted file mode 100644 index 42c30e65..00000000 --- a/src/vapi/types/tool_call_result_message_item.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from .tool_message_complete import ToolMessageComplete -from .tool_message_failed import ToolMessageFailed - -ToolCallResultMessageItem = typing.Union[ToolMessageComplete, ToolMessageFailed] diff --git a/src/vapi/types/tool_message.py b/src/vapi/types/tool_message.py new file mode 100644 index 00000000..918373d1 --- /dev/null +++ b/src/vapi/types/tool_message.py @@ -0,0 +1,44 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .tool_message_role import ToolMessageRole + + +class ToolMessage(UncheckedBaseModel): + role: ToolMessageRole = pydantic.Field() + """ + This is the role of the message author + """ + + content: str = pydantic.Field() + """ + This is the content of the tool message + """ + + tool_call_id: str = pydantic.Field() + """ + This is the ID of the tool call this message is responding to + """ + + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is an optional name for the participant + """ + + metadata: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) + """ + This is an optional metadata for the message + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/tool_message_complete.py b/src/vapi/types/tool_message_complete.py index 96ccf104..faefe736 100644 --- a/src/vapi/types/tool_message_complete.py +++ b/src/vapi/types/tool_message_complete.py @@ -1,25 +1,27 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing + import pydantic -from .tool_message_complete_role import ToolMessageCompleteRole import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel from .condition import Condition -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole -class ToolMessageComplete(UniversalBaseModel): - type: typing.Literal["request-complete"] = pydantic.Field(default="request-complete") +class ToolMessageComplete(UncheckedBaseModel): + contents: typing.Optional[typing.List[TextContent]] = pydantic.Field(default=None) """ - This message is triggered when the tool call is complete. - - This message is triggered immediately without waiting for your server to respond for async tool calls. + This is an alternative to the `content` property. It allows to specify variants of the same content, one per language. - If this message is not provided, the model will be requested to respond. + Usage: + - If your assistants are multilingual, you can provide content for each language. + - If you don't provide content for a language, the first item in the array will be automatically translated to the active language at that moment. - If this message is provided, only this message will be spoken and the model will not be requested to come up with a response. It's an exclusive OR. + This will override the `content` property. """ role: typing.Optional[ToolMessageCompleteRole] = pydantic.Field(default=None) @@ -29,32 +31,29 @@ class ToolMessageComplete(UniversalBaseModel): When role=assistant, `content` is said out loud. When role=system, `content` is passed to the model in a system message. Example: - system: default one - assistant: - user: - assistant: - user: - assistant: - user: - assistant: tool called - tool: your server response - <--- system prompt as hint - ---> model generates response which is spoken + system: default one + assistant: + user: + assistant: + user: + assistant: + user: + assistant: tool called + tool: your server response + <--- system prompt as hint + ---> model generates response which is spoken This is useful when you want to provide a hint to the model about what to say next. """ end_call_after_spoken_enabled: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="endCallAfterSpokenEnabled") - ] = pydantic.Field(default=None) - """ - This is an optional boolean that if true, the call will end after the message is spoken. Default is false. - - This is ignored if `role` is set to `system`. - - @default false - """ - - content: str = pydantic.Field() + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field( + alias="endCallAfterSpokenEnabled", + description="This is an optional boolean that if true, the call will end after the message is spoken. Default is false.\n\nThis is ignored if `role` is set to `system`.\n\n@default false", + ), + ] = None + content: typing.Optional[str] = pydantic.Field(default=None) """ This is the content that the assistant says when this message is triggered. """ diff --git a/src/vapi/types/tool_message_delayed.py b/src/vapi/types/tool_message_delayed.py index 1a8b9ad1..1feca2f6 100644 --- a/src/vapi/types/tool_message_delayed.py +++ b/src/vapi/types/tool_message_delayed.py @@ -1,35 +1,37 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing + import pydantic import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel from .condition import Condition -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from .text_content import TextContent -class ToolMessageDelayed(UniversalBaseModel): - type: typing.Literal["request-response-delayed"] = pydantic.Field(default="request-response-delayed") +class ToolMessageDelayed(UncheckedBaseModel): + contents: typing.Optional[typing.List[TextContent]] = pydantic.Field(default=None) """ - This message is triggered when the tool call is delayed. - - There are the two things that can trigger this message: + This is an alternative to the `content` property. It allows to specify variants of the same content, one per language. - 1. The user talks with the assistant while your server is processing the request. Default is "Sorry, a few more seconds." - 2. The server doesn't respond within `timingMilliseconds`. + Usage: + - If your assistants are multilingual, you can provide content for each language. + - If you don't provide content for a language, the first item in the array will be automatically translated to the active language at that moment. - This message is never triggered for async tool calls. + This will override the `content` property. """ timing_milliseconds: typing_extensions.Annotated[ - typing.Optional[float], FieldMetadata(alias="timingMilliseconds") - ] = pydantic.Field(default=None) - """ - The number of milliseconds to wait for the server response before saying this message. - """ - - content: str = pydantic.Field() + typing.Optional[float], + FieldMetadata(alias="timingMilliseconds"), + pydantic.Field( + alias="timingMilliseconds", + description="The number of milliseconds to wait for the server response before saying this message.", + ), + ] = None + content: typing.Optional[str] = pydantic.Field(default=None) """ This is the content that the assistant says when this message is triggered. """ diff --git a/src/vapi/types/tool_message_failed.py b/src/vapi/types/tool_message_failed.py index bea01394..ca13db04 100644 --- a/src/vapi/types/tool_message_failed.py +++ b/src/vapi/types/tool_message_failed.py @@ -1,36 +1,37 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing + import pydantic import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel from .condition import Condition -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from .text_content import TextContent -class ToolMessageFailed(UniversalBaseModel): - type: typing.Literal["request-failed"] = pydantic.Field(default="request-failed") +class ToolMessageFailed(UncheckedBaseModel): + contents: typing.Optional[typing.List[TextContent]] = pydantic.Field(default=None) """ - This message is triggered when the tool call fails. - - This message is never triggered for async tool calls. + This is an alternative to the `content` property. It allows to specify variants of the same content, one per language. - If this message is not provided, the model will be requested to respond. + Usage: + - If your assistants are multilingual, you can provide content for each language. + - If you don't provide content for a language, the first item in the array will be automatically translated to the active language at that moment. - If this message is provided, only this message will be spoken and the model will not be requested to come up with a response. It's an exclusive OR. + This will override the `content` property. """ end_call_after_spoken_enabled: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="endCallAfterSpokenEnabled") - ] = pydantic.Field(default=None) - """ - This is an optional boolean that if true, the call will end after the message is spoken. Default is false. - - @default false - """ - - content: str = pydantic.Field() + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field( + alias="endCallAfterSpokenEnabled", + description="This is an optional boolean that if true, the call will end after the message is spoken. Default is false.\n\n@default false", + ), + ] = None + content: typing.Optional[str] = pydantic.Field(default=None) """ This is the content that the assistant says when this message is triggered. """ diff --git a/src/vapi/types/tool_message_role.py b/src/vapi/types/tool_message_role.py new file mode 100644 index 00000000..37e6445e --- /dev/null +++ b/src/vapi/types/tool_message_role.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ToolMessageRole = typing.Union[typing.Literal["tool"], typing.Any] diff --git a/src/vapi/types/tool_message_start.py b/src/vapi/types/tool_message_start.py index 9b5971e6..fe94b908 100644 --- a/src/vapi/types/tool_message_start.py +++ b/src/vapi/types/tool_message_start.py @@ -1,23 +1,34 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing + import pydantic -from .condition import Condition from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .condition import Condition +from .text_content import TextContent -class ToolMessageStart(UniversalBaseModel): - type: typing.Literal["request-start"] = pydantic.Field(default="request-start") +class ToolMessageStart(UncheckedBaseModel): + contents: typing.Optional[typing.List[TextContent]] = pydantic.Field(default=None) """ - This message is triggered when the tool call starts. + This is an alternative to the `content` property. It allows to specify variants of the same content, one per language. + + Usage: + - If your assistants are multilingual, you can provide content for each language. + - If you don't provide content for a language, the first item in the array will be automatically translated to the active language at that moment. - This message is never triggered for async tools. + This will override the `content` property. + """ + + blocking: typing.Optional[bool] = pydantic.Field(default=None) + """ + This is an optional boolean that if true, the tool call will only trigger after the message is spoken. Default is false. - If this message is not provided, one of the default filler messages "Hold on a sec", "One moment", "Just a sec", "Give me a moment" or "This'll just take a sec" will be used. + @default false """ - content: str = pydantic.Field() + content: typing.Optional[str] = pydantic.Field(default=None) """ This is the content that the assistant says when this message is triggered. """ diff --git a/src/vapi/types/tool_node.py b/src/vapi/types/tool_node.py new file mode 100644 index 00000000..8867f039 --- /dev/null +++ b/src/vapi/types/tool_node.py @@ -0,0 +1,49 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .tool_node_tool import ToolNodeTool + + +class ToolNode(UncheckedBaseModel): + tool: typing.Optional[ToolNodeTool] = pydantic.Field(default=None) + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + tool_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="toolId"), + pydantic.Field( + alias="toolId", description="This is the tool to call. To use a transient tool, send `tool` instead." + ), + ] = None + name: str + is_start: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="isStart"), + pydantic.Field(alias="isStart", description="This is whether or not the node is the start of the workflow."), + ] = None + metadata: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) + """ + This is for metadata you want to store on the task. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(ToolNode) diff --git a/src/vapi/types/tool_node_tool.py b/src/vapi/types/tool_node_tool.py new file mode 100644 index 00000000..647453c1 --- /dev/null +++ b/src/vapi/types/tool_node_tool.py @@ -0,0 +1,824 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .backoff_plan import BackoffPlan +from .code_tool_environment_variable import CodeToolEnvironmentVariable +from .create_api_request_tool_dto_messages_item import CreateApiRequestToolDtoMessagesItem +from .create_api_request_tool_dto_method import CreateApiRequestToolDtoMethod +from .create_bash_tool_dto_messages_item import CreateBashToolDtoMessagesItem +from .create_bash_tool_dto_name import CreateBashToolDtoName +from .create_bash_tool_dto_sub_type import CreateBashToolDtoSubType +from .create_code_tool_dto_messages_item import CreateCodeToolDtoMessagesItem +from .create_computer_tool_dto_messages_item import CreateComputerToolDtoMessagesItem +from .create_computer_tool_dto_name import CreateComputerToolDtoName +from .create_computer_tool_dto_sub_type import CreateComputerToolDtoSubType +from .create_dtmf_tool_dto_messages_item import CreateDtmfToolDtoMessagesItem +from .create_end_call_tool_dto_messages_item import CreateEndCallToolDtoMessagesItem +from .create_function_tool_dto_messages_item import CreateFunctionToolDtoMessagesItem +from .create_go_high_level_calendar_availability_tool_dto_messages_item import ( + CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem, +) +from .create_go_high_level_calendar_event_create_tool_dto_messages_item import ( + CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_create_tool_dto_messages_item import ( + CreateGoHighLevelContactCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_get_tool_dto_messages_item import CreateGoHighLevelContactGetToolDtoMessagesItem +from .create_google_calendar_check_availability_tool_dto_messages_item import ( + CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem, +) +from .create_google_calendar_create_event_tool_dto_messages_item import ( + CreateGoogleCalendarCreateEventToolDtoMessagesItem, +) +from .create_google_sheets_row_append_tool_dto_messages_item import CreateGoogleSheetsRowAppendToolDtoMessagesItem +from .create_handoff_tool_dto_messages_item import CreateHandoffToolDtoMessagesItem +from .create_mcp_tool_dto_messages_item import CreateMcpToolDtoMessagesItem +from .create_query_tool_dto_messages_item import CreateQueryToolDtoMessagesItem +from .create_sip_request_tool_dto_body import CreateSipRequestToolDtoBody +from .create_sip_request_tool_dto_messages_item import CreateSipRequestToolDtoMessagesItem +from .create_sip_request_tool_dto_verb import CreateSipRequestToolDtoVerb +from .create_slack_send_message_tool_dto_messages_item import CreateSlackSendMessageToolDtoMessagesItem +from .create_sms_tool_dto_messages_item import CreateSmsToolDtoMessagesItem +from .create_text_editor_tool_dto_messages_item import CreateTextEditorToolDtoMessagesItem +from .create_text_editor_tool_dto_name import CreateTextEditorToolDtoName +from .create_text_editor_tool_dto_sub_type import CreateTextEditorToolDtoSubType +from .create_transfer_call_tool_dto_destinations_item import CreateTransferCallToolDtoDestinationsItem +from .create_transfer_call_tool_dto_messages_item import CreateTransferCallToolDtoMessagesItem +from .create_voicemail_tool_dto_messages_item import CreateVoicemailToolDtoMessagesItem +from .knowledge_base import KnowledgeBase +from .mcp_tool_messages import McpToolMessages +from .mcp_tool_metadata import McpToolMetadata +from .open_ai_function import OpenAiFunction +from .server import Server +from .tool_parameter import ToolParameter +from .tool_rejection_plan import ToolRejectionPlan +from .variable_extraction_plan import VariableExtractionPlan + + +class ToolNodeTool_ApiRequest(UncheckedBaseModel): + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + type: typing.Literal["apiRequest"] = "apiRequest" + messages: typing.Optional[typing.List[CreateApiRequestToolDtoMessagesItem]] = None + method: CreateApiRequestToolDtoMethod + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + encrypted_paths: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="encryptedPaths"), pydantic.Field(alias="encryptedPaths") + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + name: typing.Optional[str] = None + description: typing.Optional[str] = None + url: str + body: typing.Optional["JsonSchema"] = None + headers: typing.Optional["JsonSchema"] = None + backoff_plan: typing_extensions.Annotated[ + typing.Optional[BackoffPlan], FieldMetadata(alias="backoffPlan"), pydantic.Field(alias="backoffPlan") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ToolNodeTool_Bash(UncheckedBaseModel): + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + type: typing.Literal["bash"] = "bash" + messages: typing.Optional[typing.List[CreateBashToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateBashToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateBashToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ToolNodeTool_Code(UncheckedBaseModel): + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + type: typing.Literal["code"] = "code" + messages: typing.Optional[typing.List[CreateCodeToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + code: str + environment_variables: typing_extensions.Annotated[ + typing.Optional[typing.List[CodeToolEnvironmentVariable]], + FieldMetadata(alias="environmentVariables"), + pydantic.Field(alias="environmentVariables"), + ] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ToolNodeTool_Computer(UncheckedBaseModel): + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + type: typing.Literal["computer"] = "computer" + messages: typing.Optional[typing.List[CreateComputerToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateComputerToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateComputerToolDtoName + display_width_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayWidthPx"), pydantic.Field(alias="displayWidthPx") + ] + display_height_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayHeightPx"), pydantic.Field(alias="displayHeightPx") + ] + display_number: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="displayNumber"), pydantic.Field(alias="displayNumber") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ToolNodeTool_Dtmf(UncheckedBaseModel): + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + type: typing.Literal["dtmf"] = "dtmf" + messages: typing.Optional[typing.List[CreateDtmfToolDtoMessagesItem]] = None + sip_info_dtmf_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="sipInfoDtmfEnabled"), pydantic.Field(alias="sipInfoDtmfEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ToolNodeTool_EndCall(UncheckedBaseModel): + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + type: typing.Literal["endCall"] = "endCall" + messages: typing.Optional[typing.List[CreateEndCallToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ToolNodeTool_Function(UncheckedBaseModel): + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + type: typing.Literal["function"] = "function" + messages: typing.Optional[typing.List[CreateFunctionToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ToolNodeTool_GohighlevelCalendarAvailabilityCheck(UncheckedBaseModel): + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + type: typing.Literal["gohighlevel.calendar.availability.check"] = "gohighlevel.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ToolNodeTool_GohighlevelCalendarEventCreate(UncheckedBaseModel): + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + type: typing.Literal["gohighlevel.calendar.event.create"] = "gohighlevel.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ToolNodeTool_GohighlevelContactCreate(UncheckedBaseModel): + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + type: typing.Literal["gohighlevel.contact.create"] = "gohighlevel.contact.create" + messages: typing.Optional[typing.List[CreateGoHighLevelContactCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ToolNodeTool_GohighlevelContactGet(UncheckedBaseModel): + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + type: typing.Literal["gohighlevel.contact.get"] = "gohighlevel.contact.get" + messages: typing.Optional[typing.List[CreateGoHighLevelContactGetToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ToolNodeTool_GoogleCalendarAvailabilityCheck(UncheckedBaseModel): + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + type: typing.Literal["google.calendar.availability.check"] = "google.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ToolNodeTool_GoogleCalendarEventCreate(UncheckedBaseModel): + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + type: typing.Literal["google.calendar.event.create"] = "google.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoogleCalendarCreateEventToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ToolNodeTool_GoogleSheetsRowAppend(UncheckedBaseModel): + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + type: typing.Literal["google.sheets.row.append"] = "google.sheets.row.append" + messages: typing.Optional[typing.List[CreateGoogleSheetsRowAppendToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ToolNodeTool_Handoff(UncheckedBaseModel): + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + type: typing.Literal["handoff"] = "handoff" + messages: typing.Optional[typing.List[CreateHandoffToolDtoMessagesItem]] = None + default_result: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="defaultResult"), pydantic.Field(alias="defaultResult") + ] = None + destinations: typing.Optional[typing.List["CreateHandoffToolDtoDestinationsItem"]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ToolNodeTool_Mcp(UncheckedBaseModel): + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + type: typing.Literal["mcp"] = "mcp" + messages: typing.Optional[typing.List[CreateMcpToolDtoMessagesItem]] = None + server: typing.Optional[Server] = None + tool_messages: typing_extensions.Annotated[ + typing.Optional[typing.List[McpToolMessages]], + FieldMetadata(alias="toolMessages"), + pydantic.Field(alias="toolMessages"), + ] = None + metadata: typing.Optional[McpToolMetadata] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ToolNodeTool_Query(UncheckedBaseModel): + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + type: typing.Literal["query"] = "query" + messages: typing.Optional[typing.List[CreateQueryToolDtoMessagesItem]] = None + knowledge_bases: typing_extensions.Annotated[ + typing.Optional[typing.List[KnowledgeBase]], + FieldMetadata(alias="knowledgeBases"), + pydantic.Field(alias="knowledgeBases"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ToolNodeTool_SlackMessageSend(UncheckedBaseModel): + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + type: typing.Literal["slack.message.send"] = "slack.message.send" + messages: typing.Optional[typing.List[CreateSlackSendMessageToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ToolNodeTool_Sms(UncheckedBaseModel): + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + type: typing.Literal["sms"] = "sms" + messages: typing.Optional[typing.List[CreateSmsToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ToolNodeTool_TextEditor(UncheckedBaseModel): + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + type: typing.Literal["textEditor"] = "textEditor" + messages: typing.Optional[typing.List[CreateTextEditorToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateTextEditorToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateTextEditorToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ToolNodeTool_TransferCall(UncheckedBaseModel): + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + type: typing.Literal["transferCall"] = "transferCall" + messages: typing.Optional[typing.List[CreateTransferCallToolDtoMessagesItem]] = None + destinations: typing.Optional[typing.List[CreateTransferCallToolDtoDestinationsItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ToolNodeTool_SipRequest(UncheckedBaseModel): + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + type: typing.Literal["sipRequest"] = "sipRequest" + messages: typing.Optional[typing.List[CreateSipRequestToolDtoMessagesItem]] = None + verb: CreateSipRequestToolDtoVerb + headers: typing.Optional["JsonSchema"] = None + body: typing.Optional[CreateSipRequestToolDtoBody] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ToolNodeTool_Voicemail(UncheckedBaseModel): + """ + This is the tool to call. To use an existing tool, send `toolId` instead. + """ + + type: typing.Literal["voicemail"] = "voicemail" + messages: typing.Optional[typing.List[CreateVoicemailToolDtoMessagesItem]] = None + beep_detection_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="beepDetectionEnabled"), pydantic.Field(alias="beepDetectionEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ToolNodeTool = typing_extensions.Annotated[ + typing.Union[ + ToolNodeTool_ApiRequest, + ToolNodeTool_Bash, + ToolNodeTool_Code, + ToolNodeTool_Computer, + ToolNodeTool_Dtmf, + ToolNodeTool_EndCall, + ToolNodeTool_Function, + ToolNodeTool_GohighlevelCalendarAvailabilityCheck, + ToolNodeTool_GohighlevelCalendarEventCreate, + ToolNodeTool_GohighlevelContactCreate, + ToolNodeTool_GohighlevelContactGet, + ToolNodeTool_GoogleCalendarAvailabilityCheck, + ToolNodeTool_GoogleCalendarEventCreate, + ToolNodeTool_GoogleSheetsRowAppend, + ToolNodeTool_Handoff, + ToolNodeTool_Mcp, + ToolNodeTool_Query, + ToolNodeTool_SlackMessageSend, + ToolNodeTool_Sms, + ToolNodeTool_TextEditor, + ToolNodeTool_TransferCall, + ToolNodeTool_SipRequest, + ToolNodeTool_Voicemail, + ], + UnionMetadata(discriminant="type"), +] +from .json_schema import JsonSchema # noqa: E402, I001 +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs(ToolNodeTool_ApiRequest, JsonSchema=JsonSchema) +update_forward_refs(ToolNodeTool_Bash) +update_forward_refs(ToolNodeTool_Code) +update_forward_refs(ToolNodeTool_Computer) +update_forward_refs(ToolNodeTool_Dtmf) +update_forward_refs(ToolNodeTool_EndCall) +update_forward_refs(ToolNodeTool_Function) +update_forward_refs(ToolNodeTool_GohighlevelCalendarAvailabilityCheck) +update_forward_refs(ToolNodeTool_GohighlevelCalendarEventCreate) +update_forward_refs(ToolNodeTool_GohighlevelContactCreate) +update_forward_refs(ToolNodeTool_GohighlevelContactGet) +update_forward_refs(ToolNodeTool_GoogleCalendarAvailabilityCheck) +update_forward_refs(ToolNodeTool_GoogleCalendarEventCreate) +update_forward_refs(ToolNodeTool_GoogleSheetsRowAppend) +update_forward_refs( + ToolNodeTool_Handoff, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs(ToolNodeTool_Mcp) +update_forward_refs(ToolNodeTool_Query) +update_forward_refs(ToolNodeTool_SlackMessageSend) +update_forward_refs(ToolNodeTool_Sms) +update_forward_refs(ToolNodeTool_TextEditor) +update_forward_refs(ToolNodeTool_TransferCall) +update_forward_refs(ToolNodeTool_SipRequest, JsonSchema=JsonSchema) +update_forward_refs(ToolNodeTool_Voicemail) diff --git a/src/vapi/types/tool_parameter.py b/src/vapi/types/tool_parameter.py new file mode 100644 index 00000000..cc93581c --- /dev/null +++ b/src/vapi/types/tool_parameter.py @@ -0,0 +1,29 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .tool_parameter_value import ToolParameterValue + + +class ToolParameter(UncheckedBaseModel): + key: str = pydantic.Field() + """ + This is the key of the parameter. + """ + + value: ToolParameterValue = pydantic.Field() + """ + The value of the parameter. Any JSON type. String values support Liquid templates. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/tool_parameter_value.py b/src/vapi/types/tool_parameter_value.py new file mode 100644 index 00000000..7c19e424 --- /dev/null +++ b/src/vapi/types/tool_parameter_value.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ToolParameterValue = typing.Union[str, float, bool, typing.Dict[str, typing.Any], typing.List[typing.Any]] diff --git a/src/vapi/types/tool_rejection_plan.py b/src/vapi/types/tool_rejection_plan.py new file mode 100644 index 00000000..64877fc5 --- /dev/null +++ b/src/vapi/types/tool_rejection_plan.py @@ -0,0 +1,35 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .tool_rejection_plan_conditions_item import ToolRejectionPlanConditionsItem + + +class ToolRejectionPlan(UncheckedBaseModel): + conditions: typing.Optional[typing.List[ToolRejectionPlanConditionsItem]] = pydantic.Field(default=None) + """ + This is the list of conditions that must be evaluated. + + Usage: + - If all conditions match (AND logic), the tool call is rejected. + - For OR logic at the top level, use a single 'group' condition with operator: 'OR'. + + @default [] - Empty array means tool always executes + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(ToolRejectionPlan) diff --git a/src/vapi/types/tool_rejection_plan_conditions_item.py b/src/vapi/types/tool_rejection_plan_conditions_item.py new file mode 100644 index 00000000..209a55e1 --- /dev/null +++ b/src/vapi/types/tool_rejection_plan_conditions_item.py @@ -0,0 +1,70 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .group_condition_operator import GroupConditionOperator +from .message_target import MessageTarget + + +class ToolRejectionPlanConditionsItem_Regex(UncheckedBaseModel): + type: typing.Literal["regex"] = "regex" + regex: str + target: typing.Optional[MessageTarget] = None + negate: typing.Optional[bool] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ToolRejectionPlanConditionsItem_Liquid(UncheckedBaseModel): + type: typing.Literal["liquid"] = "liquid" + liquid: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ToolRejectionPlanConditionsItem_Group(UncheckedBaseModel): + type: typing.Literal["group"] = "group" + operator: GroupConditionOperator + conditions: typing.List["GroupConditionConditionsItem"] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +ToolRejectionPlanConditionsItem = typing_extensions.Annotated[ + typing.Union[ + ToolRejectionPlanConditionsItem_Regex, + ToolRejectionPlanConditionsItem_Liquid, + ToolRejectionPlanConditionsItem_Group, + ], + UnionMetadata(discriminant="type"), +] +from .group_condition_conditions_item import GroupConditionConditionsItem # noqa: E402, I001 + +update_forward_refs(ToolRejectionPlanConditionsItem_Group, GroupConditionConditionsItem=GroupConditionConditionsItem) diff --git a/src/vapi/types/tool_template_metadata.py b/src/vapi/types/tool_template_metadata.py index 5a8d314c..327c2046 100644 --- a/src/vapi/types/tool_template_metadata.py +++ b/src/vapi/types/tool_template_metadata.py @@ -1,17 +1,24 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions import typing -from ..core.serialization import FieldMetadata -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class ToolTemplateMetadata(UniversalBaseModel): - collection_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="collectionType")] = None - collection_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="collectionId")] = None - collection_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="collectionName")] = None +class ToolTemplateMetadata(UncheckedBaseModel): + collection_type: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="collectionType"), pydantic.Field(alias="collectionType") + ] = None + collection_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="collectionId"), pydantic.Field(alias="collectionId") + ] = None + collection_name: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="collectionName"), pydantic.Field(alias="collectionName") + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/tool_template_setup.py b/src/vapi/types/tool_template_setup.py index 2c538fcb..87863dfe 100644 --- a/src/vapi/types/tool_template_setup.py +++ b/src/vapi/types/tool_template_setup.py @@ -1,18 +1,23 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing + +import pydantic import typing_extensions -from ..core.serialization import FieldMetadata from ..core.pydantic_utilities import IS_PYDANTIC_V2 -import pydantic +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class ToolTemplateSetup(UniversalBaseModel): +class ToolTemplateSetup(UncheckedBaseModel): title: str description: typing.Optional[str] = None - video_url: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="videoUrl")] = None - docs_url: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="docsUrl")] = None + video_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="videoUrl"), pydantic.Field(alias="videoUrl") + ] = None + docs_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="docsUrl"), pydantic.Field(alias="docsUrl") + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/transcriber_cost.py b/src/vapi/types/transcriber_cost.py index acdffefd..cbd61e25 100644 --- a/src/vapi/types/transcriber_cost.py +++ b/src/vapi/types/transcriber_cost.py @@ -1,23 +1,18 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing + import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel -class TranscriberCost(UniversalBaseModel): - type: typing.Literal["transcriber"] = pydantic.Field(default="transcriber") - """ - This is the type of cost, always 'transcriber' for this class. - """ - - transcriber: typing.Dict[str, typing.Optional[typing.Any]] = pydantic.Field() +class TranscriberCost(UncheckedBaseModel): + transcriber: typing.Dict[str, typing.Any] = pydantic.Field() """ This is the transcriber that was used during the call. This matches one of the below: - - `call.assistant.transcriber`, - `call.assistantId->transcriber`, - `call.squad[n].assistant.transcriber`, diff --git a/src/vapi/types/transcript_plan.py b/src/vapi/types/transcript_plan.py index 09746cd3..59ecd0da 100644 --- a/src/vapi/types/transcript_plan.py +++ b/src/vapi/types/transcript_plan.py @@ -1,14 +1,15 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing + import pydantic import typing_extensions -from ..core.serialization import FieldMetadata from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class TranscriptPlan(UniversalBaseModel): +class TranscriptPlan(UncheckedBaseModel): enabled: typing.Optional[bool] = pydantic.Field(default=None) """ This determines whether the transcript is stored in `call.artifact.transcript`. Defaults to true. @@ -16,45 +17,22 @@ class TranscriptPlan(UniversalBaseModel): @default true """ - assistant_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="assistantName")] = ( - pydantic.Field(default=None) - ) - """ - This is the name of the assistant in the transcript. Defaults to 'AI'. - - Usage: - - - If you want to change the name of the assistant in the transcript, set this. Example, here is what the transcript would look like with `assistantName` set to 'Buyer': - - ``` - User: Hello, how are you? - Buyer: I'm fine. - User: Do you want to buy a car? - Buyer: No. - ``` - - @default 'AI' - """ - - user_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="userName")] = pydantic.Field( - default=None - ) - """ - This is the name of the user in the transcript. Defaults to 'User'. - - Usage: - - - If you want to change the name of the user in the transcript, set this. Example, here is what the transcript would look like with `userName` set to 'Seller': - - ``` - Seller: Hello, how are you? - AI: I'm fine. - Seller: Do you want to buy a car? - AI: No. - ``` - - @default 'User' - """ + assistant_name: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assistantName"), + pydantic.Field( + alias="assistantName", + description="This is the name of the assistant in the transcript. Defaults to 'AI'.\n\nUsage:\n- If you want to change the name of the assistant in the transcript, set this. Example, here is what the transcript would look like with `assistantName` set to 'Buyer':\n```\nUser: Hello, how are you?\nBuyer: I'm fine.\nUser: Do you want to buy a car?\nBuyer: No.\n```\n\n@default 'AI'", + ), + ] = None + user_name: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="userName"), + pydantic.Field( + alias="userName", + description="This is the name of the user in the transcript. Defaults to 'User'.\n\nUsage:\n- If you want to change the name of the user in the transcript, set this. Example, here is what the transcript would look like with `userName` set to 'Seller':\n```\nSeller: Hello, how are you?\nAI: I'm fine.\nSeller: Do you want to buy a car?\nAI: No.\n```\n\n@default 'User'", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/transcription_endpointing_plan.py b/src/vapi/types/transcription_endpointing_plan.py index d5fc148f..ea2956b3 100644 --- a/src/vapi/types/transcription_endpointing_plan.py +++ b/src/vapi/types/transcription_endpointing_plan.py @@ -1,46 +1,39 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions import typing -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class TranscriptionEndpointingPlan(UniversalBaseModel): +class TranscriptionEndpointingPlan(UncheckedBaseModel): on_punctuation_seconds: typing_extensions.Annotated[ - typing.Optional[float], FieldMetadata(alias="onPunctuationSeconds") - ] = pydantic.Field(default=None) - """ - The minimum number of seconds to wait after transcription ending with punctuation before sending a request to the model. Defaults to 0.1. - - This setting exists because the transcriber punctuates the transcription when it's more confident that customer has completed a thought. - - @default 0.1 - """ - + typing.Optional[float], + FieldMetadata(alias="onPunctuationSeconds"), + pydantic.Field( + alias="onPunctuationSeconds", + description="The minimum number of seconds to wait after transcription ending with punctuation before sending a request to the model. Defaults to 0.1.\n\nThis setting exists because the transcriber punctuates the transcription when it's more confident that customer has completed a thought.\n\n@default 0.1", + ), + ] = None on_no_punctuation_seconds: typing_extensions.Annotated[ - typing.Optional[float], FieldMetadata(alias="onNoPunctuationSeconds") - ] = pydantic.Field(default=None) - """ - The minimum number of seconds to wait after transcription ending without punctuation before sending a request to the model. Defaults to 1.5. - - This setting exists to catch the cases where the transcriber was not confident enough to punctuate the transcription, but the customer is done and has been silent for a long time. - - @default 1.5 - """ - - on_number_seconds: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="onNumberSeconds")] = ( - pydantic.Field(default=None) - ) - """ - The minimum number of seconds to wait after transcription ending with a number before sending a request to the model. Defaults to 0.4. - - This setting exists because the transcriber will sometimes punctuate the transcription ending with a number, even though the customer hasn't uttered the full number. This happens commonly for long numbers when the customer reads the number in chunks. - - @default 0.5 - """ + typing.Optional[float], + FieldMetadata(alias="onNoPunctuationSeconds"), + pydantic.Field( + alias="onNoPunctuationSeconds", + description="The minimum number of seconds to wait after transcription ending without punctuation before sending a request to the model. Defaults to 1.5.\n\nThis setting exists to catch the cases where the transcriber was not confident enough to punctuate the transcription, but the customer is done and has been silent for a long time.\n\n@default 1.5", + ), + ] = None + on_number_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="onNumberSeconds"), + pydantic.Field( + alias="onNumberSeconds", + description="The minimum number of seconds to wait after transcription ending with a number before sending a request to the model. Defaults to 0.4.\n\nThis setting exists because the transcriber will sometimes punctuate the transcription ending with a number, even though the customer hasn't uttered the full number. This happens commonly for long numbers when the customer reads the number in chunks.\n\n@default 0.5", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/transfer_assistant.py b/src/vapi/types/transfer_assistant.py new file mode 100644 index 00000000..cc3e4356 --- /dev/null +++ b/src/vapi/types/transfer_assistant.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .background_speech_denoising_plan import BackgroundSpeechDenoisingPlan +from .start_speaking_plan import StartSpeakingPlan +from .transfer_assistant_background_sound import TransferAssistantBackgroundSound +from .transfer_assistant_first_message_mode import TransferAssistantFirstMessageMode +from .transfer_assistant_model import TransferAssistantModel +from .transfer_assistant_transcriber import TransferAssistantTranscriber +from .transfer_assistant_voice import TransferAssistantVoice + + +class TransferAssistant(UncheckedBaseModel): + name: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional name for the transfer assistant + """ + + model: TransferAssistantModel = pydantic.Field() + """ + Model configuration for the transfer assistant + """ + + voice: typing.Optional[TransferAssistantVoice] = pydantic.Field(default=None) + """ + These are the options for the transfer assistant's voice. + """ + + transcriber: typing.Optional[TransferAssistantTranscriber] = pydantic.Field(default=None) + """ + These are the options for the transfer assistant's transcriber. + """ + + first_message: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="firstMessage"), + pydantic.Field( + alias="firstMessage", + description="This is the first message that the transfer assistant will say.\nThis can also be a URL to a custom audio file.\n\nIf unspecified, assistant will wait for user to speak and use the model to respond once they speak.", + ), + ] = None + background_sound: typing_extensions.Annotated[ + typing.Optional[TransferAssistantBackgroundSound], + FieldMetadata(alias="backgroundSound"), + pydantic.Field( + alias="backgroundSound", + description="This is the background sound in the transfer assistant call. Default for phone calls is 'office' and default for web calls is 'off'.\nYou can also provide a custom sound by providing a URL to an audio file.", + ), + ] = None + start_speaking_plan: typing_extensions.Annotated[ + typing.Optional[StartSpeakingPlan], + FieldMetadata(alias="startSpeakingPlan"), + pydantic.Field( + alias="startSpeakingPlan", + description="This is the plan for when the transfer assistant should start talking.\n\nYou should configure this if the transfer assistant needs different endpointing behavior than the base assistant.\n\nIf this is not set, the transfer assistant will inherit the start speaking plan from the base assistant.", + ), + ] = None + first_message_mode: typing_extensions.Annotated[ + typing.Optional[TransferAssistantFirstMessageMode], + FieldMetadata(alias="firstMessageMode"), + pydantic.Field( + alias="firstMessageMode", + description="This is the mode for the first message. Default is 'assistant-speaks-first'.\n\nUse:\n- 'assistant-speaks-first' to have the assistant speak first.\n- 'assistant-waits-for-user' to have the assistant wait for the user to speak first.\n- 'assistant-speaks-first-with-model-generated-message' to have the assistant speak first with a message generated by the model based on the conversation state.\n\n@default 'assistant-speaks-first'", + ), + ] = None + max_duration_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="maxDurationSeconds"), + pydantic.Field( + alias="maxDurationSeconds", + description="This is the maximum duration in seconds for the transfer assistant conversation.\nAfter this time, the transfer will be cancelled automatically.\n@default 120", + ), + ] = None + background_speech_denoising_plan: typing_extensions.Annotated[ + typing.Optional[BackgroundSpeechDenoisingPlan], + FieldMetadata(alias="backgroundSpeechDenoisingPlan"), + pydantic.Field( + alias="backgroundSpeechDenoisingPlan", + description="This enables filtering of noise and background speech while the user is talking.\n\nFeatures:\n- Smart denoising using Krisp\n- Fourier denoising\n\nSmart denoising can be combined with or used independently of Fourier denoising.\n\nOrder of precedence:\n- Smart denoising\n- Fourier denoising", + ), + ] = None + silence_timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="silenceTimeoutSeconds"), + pydantic.Field( + alias="silenceTimeoutSeconds", + description="This is the number of seconds of silence to wait before ending the call. Defaults to 30.\n\n@default 30", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/transfer_assistant_background_sound.py b/src/vapi/types/transfer_assistant_background_sound.py new file mode 100644 index 00000000..1966647c --- /dev/null +++ b/src/vapi/types/transfer_assistant_background_sound.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .transfer_assistant_background_sound_zero import TransferAssistantBackgroundSoundZero + +TransferAssistantBackgroundSound = typing.Union[TransferAssistantBackgroundSoundZero, str] diff --git a/src/vapi/types/transfer_assistant_background_sound_zero.py b/src/vapi/types/transfer_assistant_background_sound_zero.py new file mode 100644 index 00000000..cea4324c --- /dev/null +++ b/src/vapi/types/transfer_assistant_background_sound_zero.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TransferAssistantBackgroundSoundZero = typing.Union[typing.Literal["off", "office"], typing.Any] diff --git a/src/vapi/types/transfer_assistant_first_message_mode.py b/src/vapi/types/transfer_assistant_first_message_mode.py new file mode 100644 index 00000000..a3672921 --- /dev/null +++ b/src/vapi/types/transfer_assistant_first_message_mode.py @@ -0,0 +1,10 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TransferAssistantFirstMessageMode = typing.Union[ + typing.Literal[ + "assistant-speaks-first", "assistant-speaks-first-with-model-generated-message", "assistant-waits-for-user" + ], + typing.Any, +] diff --git a/src/vapi/types/transfer_assistant_hook_action.py b/src/vapi/types/transfer_assistant_hook_action.py new file mode 100644 index 00000000..8897e061 --- /dev/null +++ b/src/vapi/types/transfer_assistant_hook_action.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TransferAssistantHookAction = typing.Any diff --git a/src/vapi/types/transfer_assistant_model.py b/src/vapi/types/transfer_assistant_model.py new file mode 100644 index 00000000..4dc50005 --- /dev/null +++ b/src/vapi/types/transfer_assistant_model.py @@ -0,0 +1,63 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .transfer_assistant_model_provider import TransferAssistantModelProvider + + +class TransferAssistantModel(UncheckedBaseModel): + provider: TransferAssistantModelProvider = pydantic.Field() + """ + The model provider for the transfer assistant + """ + + model: str = pydantic.Field() + """ + The model name - must be compatible with the selected provider + """ + + messages: typing.Optional[typing.List[typing.Any]] = pydantic.Field(default=None) + """ + These are the messages used to configure the transfer assistant. + + @default: ``` + [ + { + role: 'system', + content: 'You are a transfer assistant designed to facilitate call transfers. Your core responsibility is to manage the transfer process efficiently.\\n\\n## Core Responsibility\\n- Facilitate the transfer process by using transferSuccessful or transferCancel tools appropriately\\n\\n## When to Respond\\n- Answer questions about the transfer process or provide summaries when specifically asked by the operator\\n- Respond to direct questions about the current transfer situation\\n\\n## What to Avoid\\n- Do not discuss topics unrelated to the transfer\\n- Do not engage in general conversation\\n- Keep all interactions focused on facilitating the transfer\\n\\n## Transfer Tools\\n- Use transferSuccessful when the transfer should proceed\\n- Use transferCancel when the transfer cannot be completed\\n\\nStay focused on your core responsibility of facilitating transfers.' + } + ]``` + + **Default Behavior:** If you don't provide any messages or don't include a system message as the first message, the default system message above will be automatically added. + + **Override Default:** To replace the default system message, provide your own system message as the first message in the array. + + **Add Context:** You can provide additional messages (user, assistant, etc.) to add context while keeping the default system message, or combine them with your custom system message. + """ + + tools: typing.Optional[typing.List[typing.Any]] = pydantic.Field(default=None) + """ + Tools available to the transfer assistant during warm-transfer-experimental. + + **Default Behavior:** The transfer assistant will ALWAYS have both `transferSuccessful` and `transferCancel` tools automatically added, regardless of what you provide here. + + **Default Tools:** + - `transferSuccessful`: "Call this function to confirm the transfer is successful and connect the customer. Use this when you detect a human has answered and is ready to take the call." + - `transferCancel`: "Call this function to cancel the transfer when no human answers or transfer should not proceed. Use this when you detect voicemail, busy signal, or no answer." + + **Customization:** You can override the default tools by providing `transferSuccessful` and/or `transferCancel` tools with custom `function` or `messages` configurations. + + **Additional Tools:** You can also provide other tools, but the two transfer tools will always be present and available to the assistant. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/transfer_assistant_model_provider.py b/src/vapi/types/transfer_assistant_model_provider.py new file mode 100644 index 00000000..c8260d13 --- /dev/null +++ b/src/vapi/types/transfer_assistant_model_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TransferAssistantModelProvider = typing.Union[typing.Literal["openai", "anthropic", "google", "custom-llm"], typing.Any] diff --git a/src/vapi/types/transfer_assistant_transcriber.py b/src/vapi/types/transfer_assistant_transcriber.py new file mode 100644 index 00000000..c92f4397 --- /dev/null +++ b/src/vapi/types/transfer_assistant_transcriber.py @@ -0,0 +1,538 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .assembly_ai_transcriber_language import AssemblyAiTranscriberLanguage +from .assembly_ai_transcriber_speech_model import AssemblyAiTranscriberSpeechModel +from .azure_speech_transcriber_language import AzureSpeechTranscriberLanguage +from .azure_speech_transcriber_segmentation_strategy import AzureSpeechTranscriberSegmentationStrategy +from .cartesia_transcriber_language import CartesiaTranscriberLanguage +from .cartesia_transcriber_model import CartesiaTranscriberModel +from .deepgram_transcriber_language import DeepgramTranscriberLanguage +from .deepgram_transcriber_model import DeepgramTranscriberModel +from .eleven_labs_transcriber_language import ElevenLabsTranscriberLanguage +from .eleven_labs_transcriber_model import ElevenLabsTranscriberModel +from .fallback_transcriber_plan import FallbackTranscriberPlan +from .gladia_custom_vocabulary_config_dto import GladiaCustomVocabularyConfigDto +from .gladia_transcriber_language import GladiaTranscriberLanguage +from .gladia_transcriber_language_behaviour import GladiaTranscriberLanguageBehaviour +from .gladia_transcriber_languages import GladiaTranscriberLanguages +from .gladia_transcriber_model import GladiaTranscriberModel +from .gladia_transcriber_region import GladiaTranscriberRegion +from .google_transcriber_language import GoogleTranscriberLanguage +from .google_transcriber_model import GoogleTranscriberModel +from .open_ai_transcriber_language import OpenAiTranscriberLanguage +from .open_ai_transcriber_model import OpenAiTranscriberModel +from .server import Server +from .soniox_transcriber_language import SonioxTranscriberLanguage +from .soniox_transcriber_model import SonioxTranscriberModel +from .speechmatics_custom_vocabulary_item import SpeechmaticsCustomVocabularyItem +from .speechmatics_transcriber_language import SpeechmaticsTranscriberLanguage +from .speechmatics_transcriber_model import SpeechmaticsTranscriberModel +from .speechmatics_transcriber_numeral_style import SpeechmaticsTranscriberNumeralStyle +from .speechmatics_transcriber_operating_point import SpeechmaticsTranscriberOperatingPoint +from .speechmatics_transcriber_region import SpeechmaticsTranscriberRegion +from .talkscriber_transcriber_language import TalkscriberTranscriberLanguage +from .talkscriber_transcriber_model import TalkscriberTranscriberModel + + +class TransferAssistantTranscriber_AssemblyAi(UncheckedBaseModel): + """ + These are the options for the transfer assistant's transcriber. + """ + + provider: typing.Literal["assembly-ai"] = "assembly-ai" + language: typing.Optional[AssemblyAiTranscriberLanguage] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="confidenceThreshold"), pydantic.Field(alias="confidenceThreshold") + ] = None + format_turns: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="formatTurns"), pydantic.Field(alias="formatTurns") + ] = None + end_of_turn_confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="endOfTurnConfidenceThreshold"), + pydantic.Field(alias="endOfTurnConfidenceThreshold"), + ] = None + min_end_of_turn_silence_when_confident: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minEndOfTurnSilenceWhenConfident"), + pydantic.Field(alias="minEndOfTurnSilenceWhenConfident"), + ] = None + word_finalization_max_wait_time: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="wordFinalizationMaxWaitTime"), + pydantic.Field(alias="wordFinalizationMaxWaitTime"), + ] = None + max_turn_silence: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTurnSilence"), pydantic.Field(alias="maxTurnSilence") + ] = None + vad_assisted_endpointing_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="vadAssistedEndpointingEnabled"), + pydantic.Field(alias="vadAssistedEndpointingEnabled"), + ] = None + speech_model: typing_extensions.Annotated[ + typing.Optional[AssemblyAiTranscriberSpeechModel], + FieldMetadata(alias="speechModel"), + pydantic.Field(alias="speechModel"), + ] = None + realtime_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="realtimeUrl"), pydantic.Field(alias="realtimeUrl") + ] = None + word_boost: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="wordBoost"), pydantic.Field(alias="wordBoost") + ] = None + keyterms_prompt: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="keytermsPrompt"), pydantic.Field(alias="keytermsPrompt") + ] = None + end_utterance_silence_threshold: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="endUtteranceSilenceThreshold"), + pydantic.Field(alias="endUtteranceSilenceThreshold"), + ] = None + disable_partial_transcripts: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="disablePartialTranscripts"), + pydantic.Field(alias="disablePartialTranscripts"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TransferAssistantTranscriber_Azure(UncheckedBaseModel): + """ + These are the options for the transfer assistant's transcriber. + """ + + provider: typing.Literal["azure"] = "azure" + language: typing.Optional[AzureSpeechTranscriberLanguage] = None + segmentation_strategy: typing_extensions.Annotated[ + typing.Optional[AzureSpeechTranscriberSegmentationStrategy], + FieldMetadata(alias="segmentationStrategy"), + pydantic.Field(alias="segmentationStrategy"), + ] = None + segmentation_silence_timeout_ms: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="segmentationSilenceTimeoutMs"), + pydantic.Field(alias="segmentationSilenceTimeoutMs"), + ] = None + segmentation_maximum_time_ms: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="segmentationMaximumTimeMs"), + pydantic.Field(alias="segmentationMaximumTimeMs"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TransferAssistantTranscriber_CustomTranscriber(UncheckedBaseModel): + """ + These are the options for the transfer assistant's transcriber. + """ + + provider: typing.Literal["custom-transcriber"] = "custom-transcriber" + server: Server + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TransferAssistantTranscriber_Deepgram(UncheckedBaseModel): + """ + These are the options for the transfer assistant's transcriber. + """ + + provider: typing.Literal["deepgram"] = "deepgram" + model: typing.Optional[DeepgramTranscriberModel] = None + language: typing.Optional[DeepgramTranscriberLanguage] = None + smart_format: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smartFormat"), pydantic.Field(alias="smartFormat") + ] = None + mip_opt_out: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="mipOptOut"), pydantic.Field(alias="mipOptOut") + ] = None + numerals: typing.Optional[bool] = None + profanity_filter: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="profanityFilter"), pydantic.Field(alias="profanityFilter") + ] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="confidenceThreshold"), pydantic.Field(alias="confidenceThreshold") + ] = None + eager_eot_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="eagerEotThreshold"), pydantic.Field(alias="eagerEotThreshold") + ] = None + eot_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="eotThreshold"), pydantic.Field(alias="eotThreshold") + ] = None + eot_timeout_ms: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="eotTimeoutMs"), pydantic.Field(alias="eotTimeoutMs") + ] = None + keywords: typing.Optional[typing.List[str]] = None + keyterm: typing.Optional[typing.List[str]] = None + endpointing: typing.Optional[float] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TransferAssistantTranscriber_11Labs(UncheckedBaseModel): + """ + These are the options for the transfer assistant's transcriber. + """ + + provider: typing.Literal["11labs"] = "11labs" + model: typing.Optional[ElevenLabsTranscriberModel] = None + language: typing.Optional[ElevenLabsTranscriberLanguage] = None + silence_threshold_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="silenceThresholdSeconds"), + pydantic.Field(alias="silenceThresholdSeconds"), + ] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="confidenceThreshold"), pydantic.Field(alias="confidenceThreshold") + ] = None + min_speech_duration_ms: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="minSpeechDurationMs"), pydantic.Field(alias="minSpeechDurationMs") + ] = None + min_silence_duration_ms: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minSilenceDurationMs"), + pydantic.Field(alias="minSilenceDurationMs"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TransferAssistantTranscriber_Gladia(UncheckedBaseModel): + """ + These are the options for the transfer assistant's transcriber. + """ + + provider: typing.Literal["gladia"] = "gladia" + model: typing.Optional[GladiaTranscriberModel] = None + language_behaviour: typing_extensions.Annotated[ + typing.Optional[GladiaTranscriberLanguageBehaviour], + FieldMetadata(alias="languageBehaviour"), + pydantic.Field(alias="languageBehaviour"), + ] = None + language: typing.Optional[GladiaTranscriberLanguage] = None + languages: typing.Optional[GladiaTranscriberLanguages] = None + transcription_hint: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="transcriptionHint"), pydantic.Field(alias="transcriptionHint") + ] = None + prosody: typing.Optional[bool] = None + audio_enhancer: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="audioEnhancer"), pydantic.Field(alias="audioEnhancer") + ] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="confidenceThreshold"), pydantic.Field(alias="confidenceThreshold") + ] = None + endpointing: typing.Optional[float] = None + speech_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="speechThreshold"), pydantic.Field(alias="speechThreshold") + ] = None + custom_vocabulary_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="customVocabularyEnabled"), + pydantic.Field(alias="customVocabularyEnabled"), + ] = None + custom_vocabulary_config: typing_extensions.Annotated[ + typing.Optional[GladiaCustomVocabularyConfigDto], + FieldMetadata(alias="customVocabularyConfig"), + pydantic.Field(alias="customVocabularyConfig"), + ] = None + region: typing.Optional[GladiaTranscriberRegion] = None + receive_partial_transcripts: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="receivePartialTranscripts"), + pydantic.Field(alias="receivePartialTranscripts"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TransferAssistantTranscriber_Google(UncheckedBaseModel): + """ + These are the options for the transfer assistant's transcriber. + """ + + provider: typing.Literal["google"] = "google" + model: typing.Optional[GoogleTranscriberModel] = None + language: typing.Optional[GoogleTranscriberLanguage] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TransferAssistantTranscriber_Speechmatics(UncheckedBaseModel): + """ + These are the options for the transfer assistant's transcriber. + """ + + provider: typing.Literal["speechmatics"] = "speechmatics" + model: typing.Optional[SpeechmaticsTranscriberModel] = None + language: typing.Optional[SpeechmaticsTranscriberLanguage] = None + operating_point: typing_extensions.Annotated[ + typing.Optional[SpeechmaticsTranscriberOperatingPoint], + FieldMetadata(alias="operatingPoint"), + pydantic.Field(alias="operatingPoint"), + ] = None + region: typing.Optional[SpeechmaticsTranscriberRegion] = None + enable_diarization: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="enableDiarization"), pydantic.Field(alias="enableDiarization") + ] = None + max_delay: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxDelay"), pydantic.Field(alias="maxDelay") + ] = None + custom_vocabulary: typing_extensions.Annotated[ + typing.List[SpeechmaticsCustomVocabularyItem], + FieldMetadata(alias="customVocabulary"), + pydantic.Field(alias="customVocabulary"), + ] + numeral_style: typing_extensions.Annotated[ + typing.Optional[SpeechmaticsTranscriberNumeralStyle], + FieldMetadata(alias="numeralStyle"), + pydantic.Field(alias="numeralStyle"), + ] = None + end_of_turn_sensitivity: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="endOfTurnSensitivity"), + pydantic.Field(alias="endOfTurnSensitivity"), + ] = None + remove_disfluencies: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="removeDisfluencies"), pydantic.Field(alias="removeDisfluencies") + ] = None + minimum_speech_duration: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minimumSpeechDuration"), + pydantic.Field(alias="minimumSpeechDuration"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TransferAssistantTranscriber_Talkscriber(UncheckedBaseModel): + """ + These are the options for the transfer assistant's transcriber. + """ + + provider: typing.Literal["talkscriber"] = "talkscriber" + model: typing.Optional[TalkscriberTranscriberModel] = None + language: typing.Optional[TalkscriberTranscriberLanguage] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TransferAssistantTranscriber_Openai(UncheckedBaseModel): + """ + These are the options for the transfer assistant's transcriber. + """ + + provider: typing.Literal["openai"] = "openai" + model: OpenAiTranscriberModel + language: typing.Optional[OpenAiTranscriberLanguage] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TransferAssistantTranscriber_Cartesia(UncheckedBaseModel): + """ + These are the options for the transfer assistant's transcriber. + """ + + provider: typing.Literal["cartesia"] = "cartesia" + model: typing.Optional[CartesiaTranscriberModel] = None + language: typing.Optional[CartesiaTranscriberLanguage] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TransferAssistantTranscriber_Soniox(UncheckedBaseModel): + """ + These are the options for the transfer assistant's transcriber. + """ + + provider: typing.Literal["soniox"] = "soniox" + model: typing.Optional[SonioxTranscriberModel] = None + language: typing.Optional[SonioxTranscriberLanguage] = None + language_hints_strict: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="languageHintsStrict"), pydantic.Field(alias="languageHintsStrict") + ] = None + max_endpoint_delay_ms: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxEndpointDelayMs"), pydantic.Field(alias="maxEndpointDelayMs") + ] = None + custom_vocabulary: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="customVocabulary"), + pydantic.Field(alias="customVocabulary"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +TransferAssistantTranscriber = typing_extensions.Annotated[ + typing.Union[ + TransferAssistantTranscriber_AssemblyAi, + TransferAssistantTranscriber_Azure, + TransferAssistantTranscriber_CustomTranscriber, + TransferAssistantTranscriber_Deepgram, + TransferAssistantTranscriber_11Labs, + TransferAssistantTranscriber_Gladia, + TransferAssistantTranscriber_Google, + TransferAssistantTranscriber_Speechmatics, + TransferAssistantTranscriber_Talkscriber, + TransferAssistantTranscriber_Openai, + TransferAssistantTranscriber_Cartesia, + TransferAssistantTranscriber_Soniox, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/transfer_assistant_voice.py b/src/vapi/types/transfer_assistant_voice.py new file mode 100644 index 00000000..8309d99b --- /dev/null +++ b/src/vapi/types/transfer_assistant_voice.py @@ -0,0 +1,740 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .azure_voice_id import AzureVoiceId +from .cartesia_experimental_controls import CartesiaExperimentalControls +from .cartesia_generation_config import CartesiaGenerationConfig +from .cartesia_voice_language import CartesiaVoiceLanguage +from .cartesia_voice_model import CartesiaVoiceModel +from .chunk_plan import ChunkPlan +from .deepgram_voice_id import DeepgramVoiceId +from .deepgram_voice_model import DeepgramVoiceModel +from .eleven_labs_pronunciation_dictionary_locator import ElevenLabsPronunciationDictionaryLocator +from .eleven_labs_voice_id import ElevenLabsVoiceId +from .eleven_labs_voice_model import ElevenLabsVoiceModel +from .fallback_plan import FallbackPlan +from .hume_voice_model import HumeVoiceModel +from .inworld_voice_language_code import InworldVoiceLanguageCode +from .inworld_voice_model import InworldVoiceModel +from .inworld_voice_voice_id import InworldVoiceVoiceId +from .lmnt_voice_id import LmntVoiceId +from .lmnt_voice_language import LmntVoiceLanguage +from .minimax_voice_language_boost import MinimaxVoiceLanguageBoost +from .minimax_voice_model import MinimaxVoiceModel +from .minimax_voice_region import MinimaxVoiceRegion +from .minimax_voice_subtitle_type import MinimaxVoiceSubtitleType +from .neuphonic_voice_model import NeuphonicVoiceModel +from .open_ai_voice_id import OpenAiVoiceId +from .open_ai_voice_model import OpenAiVoiceModel +from .play_ht_voice_emotion import PlayHtVoiceEmotion +from .play_ht_voice_id import PlayHtVoiceId +from .play_ht_voice_language import PlayHtVoiceLanguage +from .play_ht_voice_model import PlayHtVoiceModel +from .rime_ai_voice_id import RimeAiVoiceId +from .rime_ai_voice_language import RimeAiVoiceLanguage +from .rime_ai_voice_model import RimeAiVoiceModel +from .server import Server +from .sesame_voice_model import SesameVoiceModel +from .smallest_ai_voice_id import SmallestAiVoiceId +from .smallest_ai_voice_model import SmallestAiVoiceModel +from .tavus_conversation_properties import TavusConversationProperties +from .tavus_voice_voice_id import TavusVoiceVoiceId +from .vapi_pronunciation_dictionary_locator import VapiPronunciationDictionaryLocator +from .vapi_voice_voice_id import VapiVoiceVoiceId +from .well_said_voice_model import WellSaidVoiceModel + + +class TransferAssistantVoice_Azure(UncheckedBaseModel): + """ + These are the options for the transfer assistant's voice. + """ + + provider: typing.Literal["azure"] = "azure" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[AzureVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + speed: typing.Optional[float] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TransferAssistantVoice_Cartesia(UncheckedBaseModel): + """ + These are the options for the transfer assistant's voice. + """ + + provider: typing.Literal["cartesia"] = "cartesia" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[CartesiaVoiceModel] = None + language: typing.Optional[CartesiaVoiceLanguage] = None + experimental_controls: typing_extensions.Annotated[ + typing.Optional[CartesiaExperimentalControls], + FieldMetadata(alias="experimentalControls"), + pydantic.Field(alias="experimentalControls"), + ] = None + generation_config: typing_extensions.Annotated[ + typing.Optional[CartesiaGenerationConfig], + FieldMetadata(alias="generationConfig"), + pydantic.Field(alias="generationConfig"), + ] = None + pronunciation_dict_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="pronunciationDictId"), pydantic.Field(alias="pronunciationDictId") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TransferAssistantVoice_CustomVoice(UncheckedBaseModel): + """ + These are the options for the transfer assistant's voice. + """ + + provider: typing.Literal["custom-voice"] = "custom-voice" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + server: Server + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TransferAssistantVoice_Deepgram(UncheckedBaseModel): + """ + These are the options for the transfer assistant's voice. + """ + + provider: typing.Literal["deepgram"] = "deepgram" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + DeepgramVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[DeepgramVoiceModel] = None + mip_opt_out: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="mipOptOut"), pydantic.Field(alias="mipOptOut") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TransferAssistantVoice_11Labs(UncheckedBaseModel): + """ + These are the options for the transfer assistant's voice. + """ + + provider: typing.Literal["11labs"] = "11labs" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + ElevenLabsVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + stability: typing.Optional[float] = None + similarity_boost: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="similarityBoost"), pydantic.Field(alias="similarityBoost") + ] = None + style: typing.Optional[float] = None + use_speaker_boost: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="useSpeakerBoost"), pydantic.Field(alias="useSpeakerBoost") + ] = None + speed: typing.Optional[float] = None + optimize_streaming_latency: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="optimizeStreamingLatency"), + pydantic.Field(alias="optimizeStreamingLatency"), + ] = None + enable_ssml_parsing: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="enableSsmlParsing"), pydantic.Field(alias="enableSsmlParsing") + ] = None + auto_mode: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="autoMode"), pydantic.Field(alias="autoMode") + ] = None + model: typing.Optional[ElevenLabsVoiceModel] = None + language: typing.Optional[str] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + pronunciation_dictionary_locators: typing_extensions.Annotated[ + typing.Optional[typing.List[ElevenLabsPronunciationDictionaryLocator]], + FieldMetadata(alias="pronunciationDictionaryLocators"), + pydantic.Field(alias="pronunciationDictionaryLocators"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TransferAssistantVoice_Hume(UncheckedBaseModel): + """ + These are the options for the transfer assistant's voice. + """ + + provider: typing.Literal["hume"] = "hume" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + model: typing.Optional[HumeVoiceModel] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + is_custom_hume_voice: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="isCustomHumeVoice"), pydantic.Field(alias="isCustomHumeVoice") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + description: typing.Optional[str] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TransferAssistantVoice_Lmnt(UncheckedBaseModel): + """ + These are the options for the transfer assistant's voice. + """ + + provider: typing.Literal["lmnt"] = "lmnt" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[LmntVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + speed: typing.Optional[float] = None + language: typing.Optional[LmntVoiceLanguage] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TransferAssistantVoice_Neuphonic(UncheckedBaseModel): + """ + These are the options for the transfer assistant's voice. + """ + + provider: typing.Literal["neuphonic"] = "neuphonic" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[NeuphonicVoiceModel] = None + language: typing.Dict[str, typing.Any] + speed: typing.Optional[float] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TransferAssistantVoice_Openai(UncheckedBaseModel): + """ + These are the options for the transfer assistant's voice. + """ + + provider: typing.Literal["openai"] = "openai" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + OpenAiVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[OpenAiVoiceModel] = None + instructions: typing.Optional[str] = None + speed: typing.Optional[float] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TransferAssistantVoice_Playht(UncheckedBaseModel): + """ + These are the options for the transfer assistant's voice. + """ + + provider: typing.Literal["playht"] = "playht" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + PlayHtVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + speed: typing.Optional[float] = None + temperature: typing.Optional[float] = None + emotion: typing.Optional[PlayHtVoiceEmotion] = None + voice_guidance: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="voiceGuidance"), pydantic.Field(alias="voiceGuidance") + ] = None + style_guidance: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="styleGuidance"), pydantic.Field(alias="styleGuidance") + ] = None + text_guidance: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="textGuidance"), pydantic.Field(alias="textGuidance") + ] = None + model: typing.Optional[PlayHtVoiceModel] = None + language: typing.Optional[PlayHtVoiceLanguage] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TransferAssistantVoice_Wellsaid(UncheckedBaseModel): + """ + These are the options for the transfer assistant's voice. + """ + + provider: typing.Literal["wellsaid"] = "wellsaid" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[WellSaidVoiceModel] = None + enable_ssml: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="enableSsml"), pydantic.Field(alias="enableSsml") + ] = None + library_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="libraryIds"), pydantic.Field(alias="libraryIds") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TransferAssistantVoice_RimeAi(UncheckedBaseModel): + """ + These are the options for the transfer assistant's voice. + """ + + provider: typing.Literal["rime-ai"] = "rime-ai" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + RimeAiVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[RimeAiVoiceModel] = None + speed: typing.Optional[float] = None + pause_between_brackets: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="pauseBetweenBrackets"), pydantic.Field(alias="pauseBetweenBrackets") + ] = None + phonemize_between_brackets: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="phonemizeBetweenBrackets"), + pydantic.Field(alias="phonemizeBetweenBrackets"), + ] = None + reduce_latency: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="reduceLatency"), pydantic.Field(alias="reduceLatency") + ] = None + inline_speed_alpha: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="inlineSpeedAlpha"), pydantic.Field(alias="inlineSpeedAlpha") + ] = None + language: typing.Optional[RimeAiVoiceLanguage] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TransferAssistantVoice_SmallestAi(UncheckedBaseModel): + """ + These are the options for the transfer assistant's voice. + """ + + provider: typing.Literal["smallest-ai"] = "smallest-ai" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + SmallestAiVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[SmallestAiVoiceModel] = None + speed: typing.Optional[float] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TransferAssistantVoice_Tavus(UncheckedBaseModel): + """ + These are the options for the transfer assistant's voice. + """ + + provider: typing.Literal["tavus"] = "tavus" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + TavusVoiceVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + persona_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="personaId"), pydantic.Field(alias="personaId") + ] = None + callback_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callbackUrl"), pydantic.Field(alias="callbackUrl") + ] = None + conversation_name: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="conversationName"), pydantic.Field(alias="conversationName") + ] = None + conversational_context: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="conversationalContext"), + pydantic.Field(alias="conversationalContext"), + ] = None + custom_greeting: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="customGreeting"), pydantic.Field(alias="customGreeting") + ] = None + properties: typing.Optional[TavusConversationProperties] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TransferAssistantVoice_Vapi(UncheckedBaseModel): + """ + These are the options for the transfer assistant's voice. + """ + + provider: typing.Literal["vapi"] = "vapi" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + VapiVoiceVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + speed: typing.Optional[float] = None + pronunciation_dictionary: typing_extensions.Annotated[ + typing.Optional[typing.List[VapiPronunciationDictionaryLocator]], + FieldMetadata(alias="pronunciationDictionary"), + pydantic.Field(alias="pronunciationDictionary"), + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TransferAssistantVoice_Sesame(UncheckedBaseModel): + """ + These are the options for the transfer assistant's voice. + """ + + provider: typing.Literal["sesame"] = "sesame" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: SesameVoiceModel + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TransferAssistantVoice_Inworld(UncheckedBaseModel): + """ + These are the options for the transfer assistant's voice. + """ + + provider: typing.Literal["inworld"] = "inworld" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + InworldVoiceVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[InworldVoiceModel] = None + language_code: typing_extensions.Annotated[ + typing.Optional[InworldVoiceLanguageCode], + FieldMetadata(alias="languageCode"), + pydantic.Field(alias="languageCode"), + ] = None + temperature: typing.Optional[float] = None + speaking_rate: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="speakingRate"), pydantic.Field(alias="speakingRate") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TransferAssistantVoice_Minimax(UncheckedBaseModel): + """ + These are the options for the transfer assistant's voice. + """ + + provider: typing.Literal["minimax"] = "minimax" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[MinimaxVoiceModel] = None + emotion: typing.Optional[str] = None + subtitle_type: typing_extensions.Annotated[ + typing.Optional[MinimaxVoiceSubtitleType], + FieldMetadata(alias="subtitleType"), + pydantic.Field(alias="subtitleType"), + ] = None + pitch: typing.Optional[float] = None + speed: typing.Optional[float] = None + volume: typing.Optional[float] = None + region: typing.Optional[MinimaxVoiceRegion] = None + language_boost: typing_extensions.Annotated[ + typing.Optional[MinimaxVoiceLanguageBoost], + FieldMetadata(alias="languageBoost"), + pydantic.Field(alias="languageBoost"), + ] = None + text_normalization_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="textNormalizationEnabled"), + pydantic.Field(alias="textNormalizationEnabled"), + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +TransferAssistantVoice = typing_extensions.Annotated[ + typing.Union[ + TransferAssistantVoice_Azure, + TransferAssistantVoice_Cartesia, + TransferAssistantVoice_CustomVoice, + TransferAssistantVoice_Deepgram, + TransferAssistantVoice_11Labs, + TransferAssistantVoice_Hume, + TransferAssistantVoice_Lmnt, + TransferAssistantVoice_Neuphonic, + TransferAssistantVoice_Openai, + TransferAssistantVoice_Playht, + TransferAssistantVoice_Wellsaid, + TransferAssistantVoice_RimeAi, + TransferAssistantVoice_SmallestAi, + TransferAssistantVoice_Tavus, + TransferAssistantVoice_Vapi, + TransferAssistantVoice_Sesame, + TransferAssistantVoice_Inworld, + TransferAssistantVoice_Minimax, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/transfer_call_tool.py b/src/vapi/types/transfer_call_tool.py index 216b07b0..81530bee 100644 --- a/src/vapi/types/transfer_call_tool.py +++ b/src/vapi/types/transfer_call_tool.py @@ -1,32 +1,21 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions +from __future__ import annotations + +import datetime as dt import typing -from ..core.serialization import FieldMetadata + import pydantic -from .transfer_call_tool_messages_item import TransferCallToolMessagesItem +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .tool_rejection_plan import ToolRejectionPlan from .transfer_call_tool_destinations_item import TransferCallToolDestinationsItem -import datetime as dt -from .open_ai_function import OpenAiFunction -from .server import Server -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from .transfer_call_tool_messages_item import TransferCallToolMessagesItem -class TransferCallTool(UniversalBaseModel): - async_: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="async")] = pydantic.Field( - default=None - ) - """ - This determines if the tool is async. - - If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server. - - If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server. - - Defaults to synchronous (`false`). - """ - +class TransferCallTool(UncheckedBaseModel): messages: typing.Optional[typing.List[TransferCallToolMessagesItem]] = pydantic.Field(default=None) """ These are the messages that will be spoken to the user as the tool is running. @@ -34,7 +23,6 @@ class TransferCallTool(UniversalBaseModel): For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. """ - type: typing.Literal["transferCall"] = "transferCall" destinations: typing.Optional[typing.List[TransferCallToolDestinationsItem]] = pydantic.Field(default=None) """ These are the destinations that the call can be transferred to. If no destinations are provided, server.url will be used to get the transfer destination once the tool is called. @@ -45,38 +33,35 @@ class TransferCallTool(UniversalBaseModel): This is the unique identifier for the tool. """ - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field() - """ - This is the unique identifier for the organization that this tool belongs to. - """ - - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the tool was created. - """ - - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the tool was last updated. - """ - - function: typing.Optional[OpenAiFunction] = pydantic.Field(default=None) - """ - This is the function definition of the tool. - - For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on tool-specific fields like `tool.destinations`. But, even in those cases, you can provide a custom function definition for advanced use cases. - - An example of an advanced use case is if you want to customize the message that's spoken for `endCall` tool. You can specify a function where it returns an argument "reason". Then, in `messages` array, you can have many "request-complete" messages. One of these messages will be triggered if the `messages[].conditions` matches the "reason" argument. - """ - - server: typing.Optional[Server] = pydantic.Field(default=None) - """ - This is the server that will be hit when this tool is requested by the model. - - All requests will be sent with the call object among other things. You can find more details in the Server URL documentation. - - This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: highest tool.server.url, then assistant.serverUrl, then phoneNumber.serverUrl, then org.serverUrl. - """ + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the organization that this tool belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the tool was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", description="This is the ISO 8601 date-time string of when the tool was last updated." + ), + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -86,3 +71,6 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +update_forward_refs(TransferCallTool) diff --git a/src/vapi/types/transfer_call_tool_destinations_item.py b/src/vapi/types/transfer_call_tool_destinations_item.py index a2742a91..d1c1f771 100644 --- a/src/vapi/types/transfer_call_tool_destinations_item.py +++ b/src/vapi/types/transfer_call_tool_destinations_item.py @@ -1,11 +1,102 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .transfer_destination_assistant import TransferDestinationAssistant -from .transfer_destination_step import TransferDestinationStep -from .transfer_destination_number import TransferDestinationNumber -from .transfer_destination_sip import TransferDestinationSip -TransferCallToolDestinationsItem = typing.Union[ - TransferDestinationAssistant, TransferDestinationStep, TransferDestinationNumber, TransferDestinationSip +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .transfer_destination_assistant_message import TransferDestinationAssistantMessage +from .transfer_destination_number_message import TransferDestinationNumberMessage +from .transfer_destination_sip_message import TransferDestinationSipMessage +from .transfer_mode import TransferMode +from .transfer_plan import TransferPlan + + +class TransferCallToolDestinationsItem_Assistant(UncheckedBaseModel): + type: typing.Literal["assistant"] = "assistant" + message: typing.Optional[TransferDestinationAssistantMessage] = None + transfer_mode: typing_extensions.Annotated[ + typing.Optional[TransferMode], FieldMetadata(alias="transferMode"), pydantic.Field(alias="transferMode") + ] = None + assistant_name: typing_extensions.Annotated[ + str, FieldMetadata(alias="assistantName"), pydantic.Field(alias="assistantName") + ] + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TransferCallToolDestinationsItem_Number(UncheckedBaseModel): + type: typing.Literal["number"] = "number" + message: typing.Optional[TransferDestinationNumberMessage] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: str + extension: typing.Optional[str] = None + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TransferCallToolDestinationsItem_Sip(UncheckedBaseModel): + type: typing.Literal["sip"] = "sip" + message: typing.Optional[TransferDestinationSipMessage] = None + sip_uri: typing_extensions.Annotated[str, FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri")] + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + sip_headers: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="sipHeaders"), + pydantic.Field(alias="sipHeaders"), + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +TransferCallToolDestinationsItem = typing_extensions.Annotated[ + typing.Union[ + TransferCallToolDestinationsItem_Assistant, + TransferCallToolDestinationsItem_Number, + TransferCallToolDestinationsItem_Sip, + ], + UnionMetadata(discriminant="type"), ] diff --git a/src/vapi/types/transfer_call_tool_messages_item.py b/src/vapi/types/transfer_call_tool_messages_item.py index 608c747f..72f1e8ed 100644 --- a/src/vapi/types/transfer_call_tool_messages_item.py +++ b/src/vapi/types/transfer_call_tool_messages_item.py @@ -1,11 +1,104 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .tool_message_start import ToolMessageStart -from .tool_message_complete import ToolMessageComplete -from .tool_message_failed import ToolMessageFailed -from .tool_message_delayed import ToolMessageDelayed -TransferCallToolMessagesItem = typing.Union[ - ToolMessageStart, ToolMessageComplete, ToolMessageFailed, ToolMessageDelayed +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class TransferCallToolMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TransferCallToolMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TransferCallToolMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TransferCallToolMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +TransferCallToolMessagesItem = typing_extensions.Annotated[ + typing.Union[ + TransferCallToolMessagesItem_RequestStart, + TransferCallToolMessagesItem_RequestComplete, + TransferCallToolMessagesItem_RequestFailed, + TransferCallToolMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), ] diff --git a/src/vapi/types/transfer_cancel_tool_user_editable.py b/src/vapi/types/transfer_cancel_tool_user_editable.py new file mode 100644 index 00000000..68097f86 --- /dev/null +++ b/src/vapi/types/transfer_cancel_tool_user_editable.py @@ -0,0 +1,49 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .tool_rejection_plan import ToolRejectionPlan +from .transfer_cancel_tool_user_editable_messages_item import TransferCancelToolUserEditableMessagesItem +from .transfer_cancel_tool_user_editable_type import TransferCancelToolUserEditableType + + +class TransferCancelToolUserEditable(UncheckedBaseModel): + messages: typing.Optional[typing.List[TransferCancelToolUserEditableMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + type: TransferCancelToolUserEditableType = pydantic.Field() + """ + The type of tool. "transferCancel" for Transfer Cancel tool. This tool can only be used during warm-transfer-experimental by the transfer assistant to cancel an ongoing transfer and return the call back to the original assistant when the transfer cannot be completed. + """ + + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(TransferCancelToolUserEditable) diff --git a/src/vapi/types/transfer_cancel_tool_user_editable_messages_item.py b/src/vapi/types/transfer_cancel_tool_user_editable_messages_item.py new file mode 100644 index 00000000..441579af --- /dev/null +++ b/src/vapi/types/transfer_cancel_tool_user_editable_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class TransferCancelToolUserEditableMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TransferCancelToolUserEditableMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TransferCancelToolUserEditableMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TransferCancelToolUserEditableMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +TransferCancelToolUserEditableMessagesItem = typing_extensions.Annotated[ + typing.Union[ + TransferCancelToolUserEditableMessagesItem_RequestStart, + TransferCancelToolUserEditableMessagesItem_RequestComplete, + TransferCancelToolUserEditableMessagesItem_RequestFailed, + TransferCancelToolUserEditableMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/transfer_cancel_tool_user_editable_type.py b/src/vapi/types/transfer_cancel_tool_user_editable_type.py new file mode 100644 index 00000000..015086c3 --- /dev/null +++ b/src/vapi/types/transfer_cancel_tool_user_editable_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TransferCancelToolUserEditableType = typing.Union[typing.Literal["transferCancel"], typing.Any] diff --git a/src/vapi/types/transfer_destination_assistant.py b/src/vapi/types/transfer_destination_assistant.py index 30281f84..71d40eb1 100644 --- a/src/vapi/types/transfer_destination_assistant.py +++ b/src/vapi/types/transfer_destination_assistant.py @@ -1,80 +1,43 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -import typing_extensions -from .transfer_mode import TransferMode -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .transfer_destination_assistant_message import TransferDestinationAssistantMessage +from .transfer_destination_assistant_type import TransferDestinationAssistantType +from .transfer_mode import TransferMode -class TransferDestinationAssistant(UniversalBaseModel): - type: typing.Literal["assistant"] = "assistant" - transfer_mode: typing_extensions.Annotated[typing.Optional[TransferMode], FieldMetadata(alias="transferMode")] = ( - pydantic.Field(default=None) - ) - """ - This is the mode to use for the transfer. Default is `rolling-history`. - - - `rolling-history`: This is the default mode. It keeps the entire conversation history and appends the new assistant's system message on transfer. - - Example: - - Pre-transfer: - system: assistant1 system message - assistant: assistant1 first message - user: hey, good morning - assistant: how can i help? - user: i need help with my account - assistant: (destination.message) - - Post-transfer: - system: assistant1 system message - assistant: assistant1 first message - user: hey, good morning - assistant: how can i help? - user: i need help with my account - assistant: (destination.message) - system: assistant2 system message - assistant: assistant2 first message (or model generated if firstMessageMode is set to `assistant-speaks-first-with-model-generated-message`) - - - `swap-system-message-in-history`: This replaces the original system message with the new assistant's system message on transfer. - - Example: - - Pre-transfer: - system: assistant1 system message - assistant: assistant1 first message - user: hey, good morning - assistant: how can i help? - user: i need help with my account - assistant: (destination.message) - - Post-transfer: - system: assistant2 system message - assistant: assistant1 first message - user: hey, good morning - assistant: how can i help? - user: i need help with my account - assistant: (destination.message) - assistant: assistant2 first message (or model generated if firstMessageMode is set to `assistant-speaks-first-with-model-generated-message`) - """ - - assistant_name: typing_extensions.Annotated[str, FieldMetadata(alias="assistantName")] = pydantic.Field() - """ - This is the assistant to transfer the call to. - """ - - message: typing.Optional[str] = pydantic.Field(default=None) +class TransferDestinationAssistant(UncheckedBaseModel): + message: typing.Optional[TransferDestinationAssistantMessage] = pydantic.Field(default=None) """ - This is the message to say before transferring the call to the destination. + This is spoken to the customer before connecting them to the destination. - If this is not provided and transfer tool messages is not provided, default is "Transferring the call now". + Usage: + - If this is not provided and transfer tool messages is not provided, default is "Transferring the call now". + - If set to "", nothing is spoken. This is useful when you want to silently transfer. This is especially useful when transferring between assistants in a squad. In this scenario, you likely also want to set `assistant.firstMessageMode=assistant-speaks-first-with-model-generated-message` for the destination assistant. - If set to "", nothing is spoken. This is useful when you want to silently transfer. This is especially useful when transferring between assistants in a squad. In this scenario, you likely also want to set `assistant.firstMessageMode=assistant-speaks-first-with-model-generated-message` for the destination assistant. + This accepts a string or a ToolMessageStart class. Latter is useful if you want to specify multiple messages for different languages through the `contents` field. """ + type: TransferDestinationAssistantType + transfer_mode: typing_extensions.Annotated[ + typing.Optional[TransferMode], + FieldMetadata(alias="transferMode"), + pydantic.Field( + alias="transferMode", + description="This is the mode to use for the transfer. Defaults to `rolling-history`.\n\n- `rolling-history`: This is the default mode. It keeps the entire conversation history and appends the new assistant's system message on transfer.\n\n Example:\n\n Pre-transfer:\n system: assistant1 system message\n assistant: assistant1 first message\n user: hey, good morning\n assistant: how can i help?\n user: i need help with my account\n assistant: (destination.message)\n\n Post-transfer:\n system: assistant1 system message\n assistant: assistant1 first message\n user: hey, good morning\n assistant: how can i help?\n user: i need help with my account\n assistant: (destination.message)\n system: assistant2 system message\n assistant: assistant2 first message (or model generated if firstMessageMode is set to `assistant-speaks-first-with-model-generated-message`)\n\n- `swap-system-message-in-history`: This replaces the original system message with the new assistant's system message on transfer.\n\n Example:\n\n Pre-transfer:\n system: assistant1 system message\n assistant: assistant1 first message\n user: hey, good morning\n assistant: how can i help?\n user: i need help with my account\n assistant: (destination.message)\n\n Post-transfer:\n system: assistant2 system message\n assistant: assistant1 first message\n user: hey, good morning\n assistant: how can i help?\n user: i need help with my account\n assistant: (destination.message)\n assistant: assistant2 first message (or model generated if firstMessageMode is set to `assistant-speaks-first-with-model-generated-message`)\n\n- `delete-history`: This deletes the entire conversation history on transfer.\n\n Example:\n\n Pre-transfer:\n system: assistant1 system message\n assistant: assistant1 first message\n user: hey, good morning\n assistant: how can i help?\n user: i need help with my account\n assistant: (destination.message)\n\n Post-transfer:\n system: assistant2 system message\n assistant: assistant2 first message\n user: Yes, please\n assistant: how can i help?\n user: i need help with my account\n\n- `swap-system-message-in-history-and-remove-transfer-tool-messages`: This replaces the original system message with the new assistant's system message on transfer and removes transfer tool messages from conversation history sent to the LLM.\n\n Example:\n\n Pre-transfer:\n system: assistant1 system message\n assistant: assistant1 first message\n user: hey, good morning\n assistant: how can i help?\n user: i need help with my account\n transfer-tool\n transfer-tool-result\n assistant: (destination.message)\n\n Post-transfer:\n system: assistant2 system message\n assistant: assistant1 first message\n user: hey, good morning\n assistant: how can i help?\n user: i need help with my account\n assistant: (destination.message)\n assistant: assistant2 first message (or model generated if firstMessageMode is set to `assistant-speaks-first-with-model-generated-message`)\n\n@default 'rolling-history'", + ), + ] = None + assistant_name: typing_extensions.Annotated[ + str, + FieldMetadata(alias="assistantName"), + pydantic.Field(alias="assistantName", description="This is the assistant to transfer the call to."), + ] description: typing.Optional[str] = pydantic.Field(default=None) """ This is the description of the destination, used by the AI to choose when and how to transfer the call. diff --git a/src/vapi/types/transfer_destination_assistant_message.py b/src/vapi/types/transfer_destination_assistant_message.py new file mode 100644 index 00000000..337cb9c0 --- /dev/null +++ b/src/vapi/types/transfer_destination_assistant_message.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .custom_message import CustomMessage + +TransferDestinationAssistantMessage = typing.Union[str, CustomMessage] diff --git a/src/vapi/types/transfer_destination_assistant_type.py b/src/vapi/types/transfer_destination_assistant_type.py new file mode 100644 index 00000000..65ad0617 --- /dev/null +++ b/src/vapi/types/transfer_destination_assistant_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TransferDestinationAssistantType = typing.Union[typing.Literal["assistant"], typing.Any] diff --git a/src/vapi/types/transfer_destination_number.py b/src/vapi/types/transfer_destination_number.py index 82c6d6ac..a2eae071 100644 --- a/src/vapi/types/transfer_destination_number.py +++ b/src/vapi/types/transfer_destination_number.py @@ -1,31 +1,36 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .transfer_destination_number_message import TransferDestinationNumberMessage +from .transfer_plan import TransferPlan -class TransferDestinationNumber(UniversalBaseModel): - type: typing.Literal["number"] = "number" - number_e_164_check_enabled: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="numberE164CheckEnabled") - ] = pydantic.Field(default=None) +class TransferDestinationNumber(UncheckedBaseModel): + message: typing.Optional[TransferDestinationNumberMessage] = pydantic.Field(default=None) """ - This is the flag to toggle the E164 check for the `number` field. This is an advanced property which should be used if you know your use case requires it. + This is spoken to the customer before connecting them to the destination. - Use cases: - - - `false`: To allow non-E164 numbers like `+001234567890`, `1234`, or `abc`. This is useful for dialing out to non-E164 numbers on your SIP trunks. - - `true` (default): To allow only E164 numbers like `+14155551234`. This is standard for PSTN calls. - - If `false`, the `number` is still required to only contain alphanumeric characters (regex: `/^\+?[a-zA-Z0-9]+$/`). + Usage: + - If this is not provided and transfer tool messages is not provided, default is "Transferring the call now". + - If set to "", nothing is spoken. This is useful when you want to silently transfer. This is especially useful when transferring between assistants in a squad. In this scenario, you likely also want to set `assistant.firstMessageMode=assistant-speaks-first-with-model-generated-message` for the destination assistant. - @default true (E164 check is enabled) + This accepts a string or a ToolMessageStart class. Latter is useful if you want to specify multiple messages for different languages through the `contents` field. """ + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field( + alias="numberE164CheckEnabled", + description="This is the flag to toggle the E164 check for the `number` field. This is an advanced property which should be used if you know your use case requires it.\n\nUse cases:\n- `false`: To allow non-E164 numbers like `+001234567890`, `1234`, or `abc`. This is useful for dialing out to non-E164 numbers on your SIP trunks.\n- `true` (default): To allow only E164 numbers like `+14155551234`. This is standard for PSTN calls.\n\nIf `false`, the `number` is still required to only contain alphanumeric characters (regex: `/^\\+?[a-zA-Z0-9]+$/`).\n\n@default true (E164 check is enabled)", + ), + ] = None number: str = pydantic.Field() """ This is the phone number to transfer the call to. @@ -36,32 +41,22 @@ class TransferDestinationNumber(UniversalBaseModel): This is the extension to dial after transferring the call to the `number`. """ - caller_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="callerId")] = pydantic.Field( - default=None - ) - """ - This is the caller ID to use when transferring the call to the `number`. - - Usage: - - - If not provided, the caller ID will be the number the call is coming from. Example, +14151111111 calls in to and the assistant transfers out to +16470000000. +16470000000 will see +14151111111 as the caller. - - To change this behavior, provide a `callerId`. - - Set to '{{customer.number}}' to always use the customer's number as the caller ID. - - Set to '{{phoneNumber.number}}' to always use the phone number of the assistant as the caller ID. - - Set to any E164 number to always use that number as the caller ID. This needs to be a number that is owned or verified by your Transport provider like Twilio. - - For Twilio, you can read up more here: https://www.twilio.com/docs/voice/twiml/dial#callerid - """ - - message: typing.Optional[str] = pydantic.Field(default=None) - """ - This is the message to say before transferring the call to the destination. - - If this is not provided and transfer tool messages is not provided, default is "Transferring the call now". - - If set to "", nothing is spoken. This is useful when you want to silently transfer. This is especially useful when transferring between assistants in a squad. In this scenario, you likely also want to set `assistant.firstMessageMode=assistant-speaks-first-with-model-generated-message` for the destination assistant. - """ - + caller_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="callerId"), + pydantic.Field( + alias="callerId", + description="This is the caller ID to use when transferring the call to the `number`.\n\nUsage:\n- If not provided, the caller ID will be the number the call is coming **from**.\n Example: a customer with number +14151111111 calls in to and the assistant transfers out to +16470000000. +16470000000 will see +14151111111 as the caller.\n For inbound calls, the caller ID is the customer's number. For outbound calls, the caller ID is the phone number of the assistant.\n- To change this behavior, provide a `callerId`.\n- Set to '{{customer.number}}' to always use the customer's number as the caller ID.\n- Set to '{{phoneNumber.number}}' to always use the phone number of the assistant as the caller ID.\n- Set to any E164 number to always use that number as the caller ID. This needs to be a number that is owned or verified by your Transport provider like Twilio.\n\nFor Twilio, you can read up more here: https://www.twilio.com/docs/voice/twiml/dial#callerid", + ), + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], + FieldMetadata(alias="transferPlan"), + pydantic.Field( + alias="transferPlan", + description="This configures how transfer is executed and the experience of the destination party receiving the call. Defaults to `blind-transfer`.\n\n@default `transferPlan.mode='blind-transfer'`", + ), + ] = None description: typing.Optional[str] = pydantic.Field(default=None) """ This is the description of the destination, used by the AI to choose when and how to transfer the call. diff --git a/src/vapi/types/transfer_destination_number_message.py b/src/vapi/types/transfer_destination_number_message.py new file mode 100644 index 00000000..a831ebb1 --- /dev/null +++ b/src/vapi/types/transfer_destination_number_message.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .custom_message import CustomMessage + +TransferDestinationNumberMessage = typing.Union[str, CustomMessage] diff --git a/src/vapi/types/transfer_destination_sip.py b/src/vapi/types/transfer_destination_sip.py index 7fead77a..4f10e3e5 100644 --- a/src/vapi/types/transfer_destination_sip.py +++ b/src/vapi/types/transfer_destination_sip.py @@ -1,29 +1,56 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .transfer_destination_sip_message import TransferDestinationSipMessage +from .transfer_plan import TransferPlan -class TransferDestinationSip(UniversalBaseModel): - type: typing.Literal["sip"] = "sip" - sip_uri: typing_extensions.Annotated[str, FieldMetadata(alias="sipUri")] = pydantic.Field() - """ - This is the SIP URI to transfer the call to. - """ - - message: typing.Optional[str] = pydantic.Field(default=None) +class TransferDestinationSip(UncheckedBaseModel): + message: typing.Optional[TransferDestinationSipMessage] = pydantic.Field(default=None) """ - This is the message to say before transferring the call to the destination. + This is spoken to the customer before connecting them to the destination. - If this is not provided and transfer tool messages is not provided, default is "Transferring the call now". + Usage: + - If this is not provided and transfer tool messages is not provided, default is "Transferring the call now". + - If set to "", nothing is spoken. This is useful when you want to silently transfer. This is especially useful when transferring between assistants in a squad. In this scenario, you likely also want to set `assistant.firstMessageMode=assistant-speaks-first-with-model-generated-message` for the destination assistant. - If set to "", nothing is spoken. This is useful when you want to silently transfer. This is especially useful when transferring between assistants in a squad. In this scenario, you likely also want to set `assistant.firstMessageMode=assistant-speaks-first-with-model-generated-message` for the destination assistant. + This accepts a string or a ToolMessageStart class. Latter is useful if you want to specify multiple messages for different languages through the `contents` field. """ + sip_uri: typing_extensions.Annotated[ + str, + FieldMetadata(alias="sipUri"), + pydantic.Field(alias="sipUri", description="This is the SIP URI to transfer the call to."), + ] + caller_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="callerId"), + pydantic.Field( + alias="callerId", + description="This is the caller ID to use when transferring the call to the `sipUri`.\n\nUsage:\n- If not provided, the caller ID will be determined by the SIP infrastructure.\n- Set to '{{customer.number}}' to always use the customer's number as the caller ID.\n- Set to '{{phoneNumber.number}}' to always use the phone number of the assistant as the caller ID.\n- Set to any E164 number to always use that number as the caller ID.\n\nOnly applicable when `transferPlan.sipVerb='dial'`. Not applicable for SIP REFER.", + ), + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], + FieldMetadata(alias="transferPlan"), + pydantic.Field( + alias="transferPlan", + description="This configures how transfer is executed and the experience of the destination party receiving the call. Defaults to `blind-transfer`.\n\n@default `transferPlan.mode='blind-transfer'`", + ), + ] = None + sip_headers: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="sipHeaders"), + pydantic.Field( + alias="sipHeaders", description="These are custom headers to be added to SIP refer during transfer call." + ), + ] = None description: typing.Optional[str] = pydantic.Field(default=None) """ This is the description of the destination, used by the AI to choose when and how to transfer the call. diff --git a/src/vapi/types/transfer_destination_sip_message.py b/src/vapi/types/transfer_destination_sip_message.py new file mode 100644 index 00000000..75cf0c80 --- /dev/null +++ b/src/vapi/types/transfer_destination_sip_message.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .custom_message import CustomMessage + +TransferDestinationSipMessage = typing.Union[str, CustomMessage] diff --git a/src/vapi/types/transfer_destination_step.py b/src/vapi/types/transfer_destination_step.py deleted file mode 100644 index af9b5a92..00000000 --- a/src/vapi/types/transfer_destination_step.py +++ /dev/null @@ -1,39 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from ..core.pydantic_utilities import UniversalBaseModel -import typing -import typing_extensions -from ..core.serialization import FieldMetadata -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 - - -class TransferDestinationStep(UniversalBaseModel): - type: typing.Literal["step"] = "step" - step_name: typing_extensions.Annotated[str, FieldMetadata(alias="stepName")] = pydantic.Field() - """ - This is the step to transfer to. - """ - - message: typing.Optional[str] = pydantic.Field(default=None) - """ - This is the message to say before transferring the call to the destination. - - If this is not provided and transfer tool messages is not provided, default is "Transferring the call now". - - If set to "", nothing is spoken. This is useful when you want to silently transfer. This is especially useful when transferring between assistants in a squad. In this scenario, you likely also want to set `assistant.firstMessageMode=assistant-speaks-first-with-model-generated-message` for the destination assistant. - """ - - description: typing.Optional[str] = pydantic.Field(default=None) - """ - This is the description of the destination, used by the AI to choose when and how to transfer the call. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/vapi/types/transfer_fallback_plan.py b/src/vapi/types/transfer_fallback_plan.py new file mode 100644 index 00000000..6b14d6dd --- /dev/null +++ b/src/vapi/types/transfer_fallback_plan.py @@ -0,0 +1,35 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .transfer_fallback_plan_message import TransferFallbackPlanMessage + + +class TransferFallbackPlan(UncheckedBaseModel): + message: TransferFallbackPlanMessage = pydantic.Field() + """ + This is the message the assistant will deliver to the customer if the transfer fails. + """ + + end_call_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallEnabled"), + pydantic.Field( + alias="endCallEnabled", + description="This controls what happens after delivering the failure message to the customer.\n- true: End the call after delivering the failure message (default)\n- false: Keep the assistant on the call to continue handling the customer's request\n\n@default true", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/transfer_fallback_plan_message.py b/src/vapi/types/transfer_fallback_plan_message.py new file mode 100644 index 00000000..e0592e7e --- /dev/null +++ b/src/vapi/types/transfer_fallback_plan_message.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .custom_message import CustomMessage + +TransferFallbackPlanMessage = typing.Union[str, CustomMessage] diff --git a/src/vapi/types/transfer_hook_action.py b/src/vapi/types/transfer_hook_action.py new file mode 100644 index 00000000..2ff0806b --- /dev/null +++ b/src/vapi/types/transfer_hook_action.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .transfer_hook_action_destination import TransferHookActionDestination +from .transfer_hook_action_type import TransferHookActionType + + +class TransferHookAction(UncheckedBaseModel): + type: TransferHookActionType = pydantic.Field() + """ + This is the type of action - must be "transfer" + """ + + destination: typing.Optional[TransferHookActionDestination] = pydantic.Field(default=None) + """ + This is the destination details for the transfer - can be a phone number or SIP URI + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/transfer_hook_action_destination.py b/src/vapi/types/transfer_hook_action_destination.py new file mode 100644 index 00000000..165c9f88 --- /dev/null +++ b/src/vapi/types/transfer_hook_action_destination.py @@ -0,0 +1,83 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .transfer_destination_number_message import TransferDestinationNumberMessage +from .transfer_destination_sip_message import TransferDestinationSipMessage +from .transfer_plan import TransferPlan + + +class TransferHookActionDestination_Number(UncheckedBaseModel): + """ + This is the destination details for the transfer - can be a phone number or SIP URI + """ + + type: typing.Literal["number"] = "number" + message: typing.Optional[TransferDestinationNumberMessage] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: str + extension: typing.Optional[str] = None + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TransferHookActionDestination_Sip(UncheckedBaseModel): + """ + This is the destination details for the transfer - can be a phone number or SIP URI + """ + + type: typing.Literal["sip"] = "sip" + message: typing.Optional[TransferDestinationSipMessage] = None + sip_uri: typing_extensions.Annotated[str, FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri")] + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + sip_headers: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="sipHeaders"), + pydantic.Field(alias="sipHeaders"), + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +TransferHookActionDestination = typing_extensions.Annotated[ + typing.Union[TransferHookActionDestination_Number, TransferHookActionDestination_Sip], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/transfer_hook_action_type.py b/src/vapi/types/transfer_hook_action_type.py new file mode 100644 index 00000000..58ff50e3 --- /dev/null +++ b/src/vapi/types/transfer_hook_action_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TransferHookActionType = typing.Union[typing.Literal["transfer"], typing.Any] diff --git a/src/vapi/types/transfer_phone_number_hook_action.py b/src/vapi/types/transfer_phone_number_hook_action.py new file mode 100644 index 00000000..0e56a13c --- /dev/null +++ b/src/vapi/types/transfer_phone_number_hook_action.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .transfer_phone_number_hook_action_destination import TransferPhoneNumberHookActionDestination + + +class TransferPhoneNumberHookAction(UncheckedBaseModel): + destination: typing.Optional[TransferPhoneNumberHookActionDestination] = pydantic.Field(default=None) + """ + This is the destination details for the transfer - can be a phone number or SIP URI + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/transfer_phone_number_hook_action_destination.py b/src/vapi/types/transfer_phone_number_hook_action_destination.py new file mode 100644 index 00000000..2dd6461c --- /dev/null +++ b/src/vapi/types/transfer_phone_number_hook_action_destination.py @@ -0,0 +1,83 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .transfer_destination_number_message import TransferDestinationNumberMessage +from .transfer_destination_sip_message import TransferDestinationSipMessage +from .transfer_plan import TransferPlan + + +class TransferPhoneNumberHookActionDestination_Number(UncheckedBaseModel): + """ + This is the destination details for the transfer - can be a phone number or SIP URI + """ + + type: typing.Literal["number"] = "number" + message: typing.Optional[TransferDestinationNumberMessage] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: str + extension: typing.Optional[str] = None + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TransferPhoneNumberHookActionDestination_Sip(UncheckedBaseModel): + """ + This is the destination details for the transfer - can be a phone number or SIP URI + """ + + type: typing.Literal["sip"] = "sip" + message: typing.Optional[TransferDestinationSipMessage] = None + sip_uri: typing_extensions.Annotated[str, FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri")] + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + sip_headers: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="sipHeaders"), + pydantic.Field(alias="sipHeaders"), + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +TransferPhoneNumberHookActionDestination = typing_extensions.Annotated[ + typing.Union[TransferPhoneNumberHookActionDestination_Number, TransferPhoneNumberHookActionDestination_Sip], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/transfer_plan.py b/src/vapi/types/transfer_plan.py new file mode 100644 index 00000000..f9a02e49 --- /dev/null +++ b/src/vapi/types/transfer_plan.py @@ -0,0 +1,139 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .summary_plan import SummaryPlan +from .transfer_fallback_plan import TransferFallbackPlan +from .transfer_plan_context_engineering_plan import TransferPlanContextEngineeringPlan +from .transfer_plan_message import TransferPlanMessage +from .transfer_plan_mode import TransferPlanMode + + +class TransferPlan(UncheckedBaseModel): + mode: TransferPlanMode = pydantic.Field() + """ + This configures how transfer is executed and the experience of the destination party receiving the call. + + Usage: + - `blind-transfer`: The assistant forwards the call to the destination without any message or summary. + - `blind-transfer-add-summary-to-sip-header`: The assistant forwards the call to the destination and adds a SIP header X-Transfer-Summary to the call to include the summary. + - `warm-transfer-say-message`: The assistant dials the destination, delivers the `message` to the destination party, connects the customer, and leaves the call. + - `warm-transfer-say-summary`: The assistant dials the destination, provides a summary of the call to the destination party, connects the customer, and leaves the call. + - `warm-transfer-wait-for-operator-to-speak-first-and-then-say-message`: The assistant dials the destination, waits for the operator to speak, delivers the `message` to the destination party, and then connects the customer. + - `warm-transfer-wait-for-operator-to-speak-first-and-then-say-summary`: The assistant dials the destination, waits for the operator to speak, provides a summary of the call to the destination party, and then connects the customer. + - `warm-transfer-twiml`: The assistant dials the destination, executes the twiml instructions on the destination call leg, connects the customer, and leaves the call. + - `warm-transfer-experimental`: The assistant puts the customer on hold, dials the destination, and if the destination answers (and is human), delivers a message or summary before connecting the customer. If the destination is unreachable or not human (e.g., with voicemail detection), the assistant delivers the `fallbackMessage` to the customer and optionally ends the call. + + @default 'blind-transfer' + """ + + message: typing.Optional[TransferPlanMessage] = pydantic.Field(default=None) + """ + This is the message the assistant will deliver to the destination party before connecting the customer. + + Usage: + - Used only when `mode` is `blind-transfer-add-summary-to-sip-header`, `warm-transfer-say-message`, `warm-transfer-wait-for-operator-to-speak-first-and-then-say-message`, or `warm-transfer-experimental`. + """ + + timeout: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the timeout in seconds for the warm-transfer-wait-for-operator-to-speak-first-and-then-say-message/summary + + @default 60 + """ + + sip_verb: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="sipVerb"), + pydantic.Field( + alias="sipVerb", + description="This specifies the SIP verb to use while transferring the call.\n- 'refer': Uses SIP REFER to transfer the call (default)\n- 'bye': Ends current call with SIP BYE\n- 'dial': Uses SIP DIAL to transfer the call", + ), + ] = None + dial_timeout: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="dialTimeout"), + pydantic.Field( + alias="dialTimeout", + description="This sets the timeout for the dial operation in seconds. This is the duration the call will ring before timing out.\n\nOnly applicable when `sipVerb='dial'`. Not applicable for SIP REFER or BYE.\n\n@default 60", + ), + ] = None + hold_audio_url: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="holdAudioUrl"), + pydantic.Field( + alias="holdAudioUrl", + description="This is the URL to an audio file played while the customer is on hold during transfer.\n\nUsage:\n- Used only when `mode` is `warm-transfer-experimental`.\n- Used when transferring calls to play hold audio for the customer.\n- Must be a publicly accessible URL to an audio file.\n- Supported formats: MP3 and WAV.\n- If not provided, the default hold audio will be used.", + ), + ] = None + transfer_complete_audio_url: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="transferCompleteAudioUrl"), + pydantic.Field( + alias="transferCompleteAudioUrl", + description="This is the URL to an audio file played after the warm transfer message or summary is delivered to the destination party.\nIt can be used to play a custom sound like 'beep' to notify that the transfer is complete.\n\nUsage:\n- Used only when `mode` is `warm-transfer-experimental`.\n- Used when transferring calls to play hold audio for the destination party.\n- Must be a publicly accessible URL to an audio file.\n- Supported formats: MP3 and WAV.", + ), + ] = None + context_engineering_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlanContextEngineeringPlan], + FieldMetadata(alias="contextEngineeringPlan"), + pydantic.Field( + alias="contextEngineeringPlan", + description="This is the plan for manipulating the message context before initiating the warm transfer.\nUsage:\n- Used only when `mode` is `warm-transfer-experimental`.\n- These messages will automatically be added to the transferAssistant's system message.\n- If 'none', we will not add any transcript to the transferAssistant's system message.\n- If you want to provide your own messages, use transferAssistant.model.messages instead.\n\n@default { type: 'all' }", + ), + ] = None + twiml: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the TwiML instructions to execute on the destination call leg before connecting the customer. + + Usage: + - Used only when `mode` is `warm-transfer-twiml`. + - Supports only `Play`, `Say`, `Gather`, `Hangup` and `Pause` verbs. + - Maximum length is 4096 characters. + + Example: + ``` + Hello, transferring a customer to you. + + They called about billing questions. + ``` + """ + + summary_plan: typing_extensions.Annotated[ + typing.Optional[SummaryPlan], + FieldMetadata(alias="summaryPlan"), + pydantic.Field( + alias="summaryPlan", + description="This is the plan for generating a summary of the call to present to the destination party.\n\nUsage:\n- Used only when `mode` is `blind-transfer-add-summary-to-sip-header` or `warm-transfer-say-summary` or `warm-transfer-wait-for-operator-to-speak-first-and-then-say-summary` or `warm-transfer-experimental`.", + ), + ] = None + sip_headers_in_refer_to_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="sipHeadersInReferToEnabled"), + pydantic.Field( + alias="sipHeadersInReferToEnabled", + description="This flag includes the sipHeaders from above in the refer to sip uri as url encoded query params.\n\n@default false", + ), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[TransferFallbackPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field( + alias="fallbackPlan", + description="This configures the fallback plan when the transfer fails (destination unreachable, busy, or not human).\n\nUsage:\n- Used only when `mode` is `warm-transfer-experimental`.\n- If not provided when using `warm-transfer-experimental`, a default message will be used.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/transfer_plan_context_engineering_plan.py b/src/vapi/types/transfer_plan_context_engineering_plan.py new file mode 100644 index 00000000..11b1f2f8 --- /dev/null +++ b/src/vapi/types/transfer_plan_context_engineering_plan.py @@ -0,0 +1,96 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class TransferPlanContextEngineeringPlan_LastNMessages(UncheckedBaseModel): + """ + This is the plan for manipulating the message context before initiating the warm transfer. + Usage: + - Used only when `mode` is `warm-transfer-experimental`. + - These messages will automatically be added to the transferAssistant's system message. + - If 'none', we will not add any transcript to the transferAssistant's system message. + - If you want to provide your own messages, use transferAssistant.model.messages instead. + + @default { type: 'all' } + """ + + type: typing.Literal["lastNMessages"] = "lastNMessages" + max_messages: typing_extensions.Annotated[ + float, FieldMetadata(alias="maxMessages"), pydantic.Field(alias="maxMessages") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TransferPlanContextEngineeringPlan_None(UncheckedBaseModel): + """ + This is the plan for manipulating the message context before initiating the warm transfer. + Usage: + - Used only when `mode` is `warm-transfer-experimental`. + - These messages will automatically be added to the transferAssistant's system message. + - If 'none', we will not add any transcript to the transferAssistant's system message. + - If you want to provide your own messages, use transferAssistant.model.messages instead. + + @default { type: 'all' } + """ + + type: typing.Literal["none"] = "none" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TransferPlanContextEngineeringPlan_All(UncheckedBaseModel): + """ + This is the plan for manipulating the message context before initiating the warm transfer. + Usage: + - Used only when `mode` is `warm-transfer-experimental`. + - These messages will automatically be added to the transferAssistant's system message. + - If 'none', we will not add any transcript to the transferAssistant's system message. + - If you want to provide your own messages, use transferAssistant.model.messages instead. + + @default { type: 'all' } + """ + + type: typing.Literal["all"] = "all" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +TransferPlanContextEngineeringPlan = typing_extensions.Annotated[ + typing.Union[ + TransferPlanContextEngineeringPlan_LastNMessages, + TransferPlanContextEngineeringPlan_None, + TransferPlanContextEngineeringPlan_All, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/transfer_plan_message.py b/src/vapi/types/transfer_plan_message.py new file mode 100644 index 00000000..c06c4479 --- /dev/null +++ b/src/vapi/types/transfer_plan_message.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .custom_message import CustomMessage + +TransferPlanMessage = typing.Union[str, CustomMessage] diff --git a/src/vapi/types/transfer_plan_mode.py b/src/vapi/types/transfer_plan_mode.py new file mode 100644 index 00000000..80f42765 --- /dev/null +++ b/src/vapi/types/transfer_plan_mode.py @@ -0,0 +1,17 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TransferPlanMode = typing.Union[ + typing.Literal[ + "blind-transfer", + "blind-transfer-add-summary-to-sip-header", + "warm-transfer-say-message", + "warm-transfer-say-summary", + "warm-transfer-twiml", + "warm-transfer-wait-for-operator-to-speak-first-and-then-say-message", + "warm-transfer-wait-for-operator-to-speak-first-and-then-say-summary", + "warm-transfer-experimental", + ], + typing.Any, +] diff --git a/src/vapi/types/transfer_successful_tool_user_editable.py b/src/vapi/types/transfer_successful_tool_user_editable.py new file mode 100644 index 00000000..96c7660e --- /dev/null +++ b/src/vapi/types/transfer_successful_tool_user_editable.py @@ -0,0 +1,51 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .tool_rejection_plan import ToolRejectionPlan +from .transfer_successful_tool_user_editable_messages_item import TransferSuccessfulToolUserEditableMessagesItem +from .transfer_successful_tool_user_editable_type import TransferSuccessfulToolUserEditableType + + +class TransferSuccessfulToolUserEditable(UncheckedBaseModel): + messages: typing.Optional[typing.List[TransferSuccessfulToolUserEditableMessagesItem]] = pydantic.Field( + default=None + ) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + type: TransferSuccessfulToolUserEditableType = pydantic.Field() + """ + The type of tool. "transferSuccessful" for Transfer Successful tool. This tool can only be used during warm-transfer-experimental by the transfer assistant to confirm that the transfer should proceed and finalize the handoff to the destination. + """ + + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(TransferSuccessfulToolUserEditable) diff --git a/src/vapi/types/transfer_successful_tool_user_editable_messages_item.py b/src/vapi/types/transfer_successful_tool_user_editable_messages_item.py new file mode 100644 index 00000000..67e4ad9f --- /dev/null +++ b/src/vapi/types/transfer_successful_tool_user_editable_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class TransferSuccessfulToolUserEditableMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TransferSuccessfulToolUserEditableMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TransferSuccessfulToolUserEditableMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TransferSuccessfulToolUserEditableMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +TransferSuccessfulToolUserEditableMessagesItem = typing_extensions.Annotated[ + typing.Union[ + TransferSuccessfulToolUserEditableMessagesItem_RequestStart, + TransferSuccessfulToolUserEditableMessagesItem_RequestComplete, + TransferSuccessfulToolUserEditableMessagesItem_RequestFailed, + TransferSuccessfulToolUserEditableMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/transfer_successful_tool_user_editable_type.py b/src/vapi/types/transfer_successful_tool_user_editable_type.py new file mode 100644 index 00000000..cabe51e0 --- /dev/null +++ b/src/vapi/types/transfer_successful_tool_user_editable_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TransferSuccessfulToolUserEditableType = typing.Union[typing.Literal["transferSuccessful"], typing.Any] diff --git a/src/vapi/types/transport_configuration_twilio.py b/src/vapi/types/transport_configuration_twilio.py index 552a81c1..06976f92 100644 --- a/src/vapi/types/transport_configuration_twilio.py +++ b/src/vapi/types/transport_configuration_twilio.py @@ -1,16 +1,18 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing + import pydantic import typing_extensions -from .transport_configuration_twilio_recording_channels import TransportConfigurationTwilioRecordingChannels -from ..core.serialization import FieldMetadata from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .transport_configuration_twilio_provider import TransportConfigurationTwilioProvider +from .transport_configuration_twilio_recording_channels import TransportConfigurationTwilioRecordingChannels -class TransportConfigurationTwilio(UniversalBaseModel): - provider: typing.Literal["twilio"] = "twilio" +class TransportConfigurationTwilio(UncheckedBaseModel): + provider: TransportConfigurationTwilioProvider timeout: typing.Optional[float] = pydantic.Field(default=None) """ The integer number of seconds that we should allow the phone to ring before assuming there is no answer. @@ -32,18 +34,13 @@ class TransportConfigurationTwilio(UniversalBaseModel): """ recording_channels: typing_extensions.Annotated[ - typing.Optional[TransportConfigurationTwilioRecordingChannels], FieldMetadata(alias="recordingChannels") - ] = pydantic.Field(default=None) - """ - The number of channels in the final recording. - Can be: `mono` or `dual`. - The default is `mono`. - `mono` records both legs of the call in a single channel of the recording file. - `dual` records each leg to a separate channel of the recording file. - The first channel of a dual-channel recording contains the parent call and the second channel contains the child call. - - @default 'mono' - """ + typing.Optional[TransportConfigurationTwilioRecordingChannels], + FieldMetadata(alias="recordingChannels"), + pydantic.Field( + alias="recordingChannels", + description="The number of channels in the final recording.\nCan be: `mono` or `dual`.\nThe default is `mono`.\n`mono` records both legs of the call in a single channel of the recording file.\n`dual` records each leg to a separate channel of the recording file.\nThe first channel of a dual-channel recording contains the parent call and the second channel contains the child call.\n\n@default 'mono'", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/transport_configuration_twilio_provider.py b/src/vapi/types/transport_configuration_twilio_provider.py new file mode 100644 index 00000000..03051be3 --- /dev/null +++ b/src/vapi/types/transport_configuration_twilio_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TransportConfigurationTwilioProvider = typing.Union[typing.Literal["twilio"], typing.Any] diff --git a/src/vapi/types/transport_cost.py b/src/vapi/types/transport_cost.py index 59643de9..a8dad049 100644 --- a/src/vapi/types/transport_cost.py +++ b/src/vapi/types/transport_cost.py @@ -1,17 +1,15 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing + import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .transport_cost_provider import TransportCostProvider -class TransportCost(UniversalBaseModel): - type: typing.Literal["transport"] = pydantic.Field(default="transport") - """ - This is the type of cost, always 'transport' for this class. - """ - +class TransportCost(UncheckedBaseModel): + provider: typing.Optional[TransportCostProvider] = None minutes: float = pydantic.Field() """ This is the minutes of `transport` usage. This should match `call.endedAt` - `call.startedAt`. diff --git a/src/vapi/types/transport_cost_provider.py b/src/vapi/types/transport_cost_provider.py new file mode 100644 index 00000000..092f8bb5 --- /dev/null +++ b/src/vapi/types/transport_cost_provider.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TransportCostProvider = typing.Union[ + typing.Literal["daily", "vapi.websocket", "twilio", "vonage", "telnyx", "vapi.sip"], typing.Any +] diff --git a/src/vapi/types/trieve_credential.py b/src/vapi/types/trieve_credential.py new file mode 100644 index 00000000..bfa01444 --- /dev/null +++ b/src/vapi/types/trieve_credential.py @@ -0,0 +1,60 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .trieve_credential_provider import TrieveCredentialProvider + + +class TrieveCredential(UncheckedBaseModel): + provider: TrieveCredentialProvider + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + id: str = pydantic.Field() + """ + This is the unique identifier for the credential. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/trieve_credential_provider.py b/src/vapi/types/trieve_credential_provider.py new file mode 100644 index 00000000..7f50b3b2 --- /dev/null +++ b/src/vapi/types/trieve_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TrieveCredentialProvider = typing.Union[typing.Literal["trieve"], typing.Any] diff --git a/src/vapi/types/trieve_knowledge_base.py b/src/vapi/types/trieve_knowledge_base.py new file mode 100644 index 00000000..b0079db5 --- /dev/null +++ b/src/vapi/types/trieve_knowledge_base.py @@ -0,0 +1,62 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .trieve_knowledge_base_import import TrieveKnowledgeBaseImport +from .trieve_knowledge_base_provider import TrieveKnowledgeBaseProvider +from .trieve_knowledge_base_search_plan import TrieveKnowledgeBaseSearchPlan + + +class TrieveKnowledgeBase(UncheckedBaseModel): + provider: TrieveKnowledgeBaseProvider = pydantic.Field() + """ + This knowledge base is provided by Trieve. + + To learn more about Trieve, visit https://trieve.ai. + """ + + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the knowledge base. + """ + + search_plan: typing_extensions.Annotated[ + typing.Optional[TrieveKnowledgeBaseSearchPlan], + FieldMetadata(alias="searchPlan"), + pydantic.Field( + alias="searchPlan", + description="This is the searching plan used when searching for relevant chunks from the vector store.\n\nYou should configure this if you're running into these issues:\n- Too much unnecessary context is being fed as knowledge base context.\n- Not enough relevant context is being fed as knowledge base context.", + ), + ] = None + create_plan: typing_extensions.Annotated[ + typing.Optional[TrieveKnowledgeBaseImport], + FieldMetadata(alias="createPlan"), + pydantic.Field( + alias="createPlan", + description="This is the plan if you want us to create/import a new vector store using Trieve.", + ), + ] = None + id: str = pydantic.Field() + """ + This is the id of the knowledge base. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field(alias="orgId", description="This is the org id of the knowledge base."), + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/trieve_knowledge_base_chunk_plan.py b/src/vapi/types/trieve_knowledge_base_chunk_plan.py new file mode 100644 index 00000000..d957f2dd --- /dev/null +++ b/src/vapi/types/trieve_knowledge_base_chunk_plan.py @@ -0,0 +1,58 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class TrieveKnowledgeBaseChunkPlan(UncheckedBaseModel): + file_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="fileIds"), + pydantic.Field( + alias="fileIds", + description="These are the file ids that will be used to create the vector store. To upload files, use the `POST /files` endpoint.", + ), + ] = None + websites: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + These are the websites that will be used to create the vector store. + """ + + target_splits_per_chunk: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="targetSplitsPerChunk"), + pydantic.Field( + alias="targetSplitsPerChunk", + description="This is an optional field which allows you to specify the number of splits you want per chunk. If not specified, the default 20 is used. However, you may want to use a different number.", + ), + ] = None + split_delimiters: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="splitDelimiters"), + pydantic.Field( + alias="splitDelimiters", + description="This is an optional field which allows you to specify the delimiters to use when splitting the file before chunking the text. If not specified, the default [.!?\\n] are used to split into sentences. However, you may want to use spaces or other delimiters.", + ), + ] = None + rebalance_chunks: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="rebalanceChunks"), + pydantic.Field( + alias="rebalanceChunks", + description="This is an optional field which allows you to specify whether or not to rebalance the chunks created from the file. If not specified, the default true is used. If true, Trieve will evenly distribute remainder splits across chunks such that 66 splits with a target_splits_per_chunk of 20 will result in 3 chunks with 22 splits each.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/trieve_knowledge_base_create.py b/src/vapi/types/trieve_knowledge_base_create.py new file mode 100644 index 00000000..6998e94f --- /dev/null +++ b/src/vapi/types/trieve_knowledge_base_create.py @@ -0,0 +1,33 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .trieve_knowledge_base_chunk_plan import TrieveKnowledgeBaseChunkPlan +from .trieve_knowledge_base_create_type import TrieveKnowledgeBaseCreateType + + +class TrieveKnowledgeBaseCreate(UncheckedBaseModel): + type: TrieveKnowledgeBaseCreateType = pydantic.Field() + """ + This is to create a new dataset on Trieve. + """ + + chunk_plans: typing_extensions.Annotated[ + typing.List[TrieveKnowledgeBaseChunkPlan], + FieldMetadata(alias="chunkPlans"), + pydantic.Field(alias="chunkPlans", description="These are the chunk plans used to create the dataset."), + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/trieve_knowledge_base_create_type.py b/src/vapi/types/trieve_knowledge_base_create_type.py new file mode 100644 index 00000000..e4b9d5dc --- /dev/null +++ b/src/vapi/types/trieve_knowledge_base_create_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TrieveKnowledgeBaseCreateType = typing.Union[typing.Literal["create"], typing.Any] diff --git a/src/vapi/types/trieve_knowledge_base_import.py b/src/vapi/types/trieve_knowledge_base_import.py new file mode 100644 index 00000000..bb976ab9 --- /dev/null +++ b/src/vapi/types/trieve_knowledge_base_import.py @@ -0,0 +1,34 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .trieve_knowledge_base_import_type import TrieveKnowledgeBaseImportType + + +class TrieveKnowledgeBaseImport(UncheckedBaseModel): + type: TrieveKnowledgeBaseImportType = pydantic.Field() + """ + This is to import an existing dataset from Trieve. + """ + + provider_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="providerId"), + pydantic.Field( + alias="providerId", description="This is the `datasetId` of the dataset on your Trieve account." + ), + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/trieve_knowledge_base_import_type.py b/src/vapi/types/trieve_knowledge_base_import_type.py new file mode 100644 index 00000000..0ee3ebac --- /dev/null +++ b/src/vapi/types/trieve_knowledge_base_import_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TrieveKnowledgeBaseImportType = typing.Union[typing.Literal["import"], typing.Any] diff --git a/src/vapi/types/trieve_knowledge_base_provider.py b/src/vapi/types/trieve_knowledge_base_provider.py new file mode 100644 index 00000000..ca81676e --- /dev/null +++ b/src/vapi/types/trieve_knowledge_base_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TrieveKnowledgeBaseProvider = typing.Union[typing.Literal["trieve"], typing.Any] diff --git a/src/vapi/types/trieve_knowledge_base_search_plan.py b/src/vapi/types/trieve_knowledge_base_search_plan.py new file mode 100644 index 00000000..be029720 --- /dev/null +++ b/src/vapi/types/trieve_knowledge_base_search_plan.py @@ -0,0 +1,54 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .trieve_knowledge_base_search_plan_search_type import TrieveKnowledgeBaseSearchPlanSearchType + + +class TrieveKnowledgeBaseSearchPlan(UncheckedBaseModel): + top_k: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="topK"), + pydantic.Field( + alias="topK", + description="Specifies the number of top chunks to return. This corresponds to the `page_size` parameter in Trieve.", + ), + ] = None + remove_stop_words: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="removeStopWords"), + pydantic.Field( + alias="removeStopWords", + description="If true, stop words (specified in server/src/stop-words.txt in the git repo) will be removed. This will preserve queries that are entirely stop words.", + ), + ] = None + score_threshold: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="scoreThreshold"), + pydantic.Field( + alias="scoreThreshold", + description="This is the score threshold to filter out chunks with a score below the threshold for cosine distance metric. For Manhattan Distance, Euclidean Distance, and Dot Product, it will filter out scores above the threshold distance. This threshold applies before weight and bias modifications. If not specified, this defaults to no threshold. A threshold of 0 will default to no threshold.", + ), + ] = None + search_type: typing_extensions.Annotated[ + TrieveKnowledgeBaseSearchPlanSearchType, + FieldMetadata(alias="searchType"), + pydantic.Field( + alias="searchType", + description="This is the search method used when searching for relevant chunks from the vector store.", + ), + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/trieve_knowledge_base_search_plan_search_type.py b/src/vapi/types/trieve_knowledge_base_search_plan_search_type.py new file mode 100644 index 00000000..da5c68ec --- /dev/null +++ b/src/vapi/types/trieve_knowledge_base_search_plan_search_type.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TrieveKnowledgeBaseSearchPlanSearchType = typing.Union[ + typing.Literal["fulltext", "semantic", "hybrid", "bm25"], typing.Any +] diff --git a/src/vapi/types/turn_latency.py b/src/vapi/types/turn_latency.py new file mode 100644 index 00000000..9bfc02a2 --- /dev/null +++ b/src/vapi/types/turn_latency.py @@ -0,0 +1,46 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class TurnLatency(UncheckedBaseModel): + model_latency: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="modelLatency"), + pydantic.Field(alias="modelLatency", description="This is the model latency for the first token."), + ] = None + voice_latency: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="voiceLatency"), + pydantic.Field(alias="voiceLatency", description="This is the voice latency from the model output."), + ] = None + transcriber_latency: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="transcriberLatency"), + pydantic.Field(alias="transcriberLatency", description="This is the transcriber latency from the user speech."), + ] = None + endpointing_latency: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="endpointingLatency"), + pydantic.Field(alias="endpointingLatency", description="This is the endpointing latency."), + ] = None + turn_latency: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="turnLatency"), + pydantic.Field(alias="turnLatency", description="This is the latency for the whole turn."), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/twilio_credential.py b/src/vapi/types/twilio_credential.py index 30ea1ccd..8ff88e91 100644 --- a/src/vapi/types/twilio_credential.py +++ b/src/vapi/types/twilio_credential.py @@ -1,42 +1,66 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +import datetime as dt import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic -import datetime as dt +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .twilio_credential_provider import TwilioCredentialProvider -class TwilioCredential(UniversalBaseModel): - provider: typing.Literal["twilio"] = "twilio" - auth_token: typing_extensions.Annotated[str, FieldMetadata(alias="authToken")] = pydantic.Field() - """ - This is not returned in the API. - """ - +class TwilioCredential(UncheckedBaseModel): + provider: TwilioCredentialProvider + auth_token: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="authToken"), + pydantic.Field(alias="authToken", description="This is not returned in the API."), + ] = None + api_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] = None + api_secret: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiSecret"), + pydantic.Field(alias="apiSecret", description="This is not returned in the API."), + ] = None id: str = pydantic.Field() """ This is the unique identifier for the credential. """ - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field() - """ - This is the unique identifier for the org that this credential belongs to. - """ - - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the credential was created. - """ - - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is the ISO 8601 date-time string of when the assistant was last updated. + This is the name of credential. This is just for your reference. """ - account_sid: typing_extensions.Annotated[str, FieldMetadata(alias="accountSid")] + account_sid: typing_extensions.Annotated[str, FieldMetadata(alias="accountSid"), pydantic.Field(alias="accountSid")] if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/twilio_credential_provider.py b/src/vapi/types/twilio_credential_provider.py new file mode 100644 index 00000000..1e421b5b --- /dev/null +++ b/src/vapi/types/twilio_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TwilioCredentialProvider = typing.Union[typing.Literal["twilio"], typing.Any] diff --git a/src/vapi/types/twilio_phone_number.py b/src/vapi/types/twilio_phone_number.py index ddd93fea..da207c1f 100644 --- a/src/vapi/types/twilio_phone_number.py +++ b/src/vapi/types/twilio_phone_number.py @@ -1,91 +1,126 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions +import datetime as dt import typing -from .twilio_phone_number_fallback_destination import TwilioPhoneNumberFallbackDestination -from ..core.serialization import FieldMetadata + import pydantic -import datetime as dt +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .server import Server +from .twilio_phone_number_fallback_destination import TwilioPhoneNumberFallbackDestination +from .twilio_phone_number_hooks_item import TwilioPhoneNumberHooksItem +from .twilio_phone_number_status import TwilioPhoneNumberStatus -class TwilioPhoneNumber(UniversalBaseModel): +class TwilioPhoneNumber(UncheckedBaseModel): fallback_destination: typing_extensions.Annotated[ - typing.Optional[TwilioPhoneNumberFallbackDestination], FieldMetadata(alias="fallbackDestination") - ] = pydantic.Field(default=None) - """ - This is the fallback destination an inbound call will be transferred to if: - - 1. `assistantId` is not set - 2. `squadId` is not set - 3. and, `assistant-request` message to the `serverUrl` fails - - If this is not set and above conditions are met, the inbound call is hung up with an error message. - """ - - provider: typing.Literal["twilio"] = "twilio" + typing.Optional[TwilioPhoneNumberFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field( + alias="fallbackDestination", + description="This is the fallback destination an inbound call will be transferred to if:\n1. `assistantId` is not set\n2. `squadId` is not set\n3. and, `assistant-request` message to the `serverUrl` fails\n\nIf this is not set and above conditions are met, the inbound call is hung up with an error message.", + ), + ] = None + hooks: typing.Optional[typing.List[TwilioPhoneNumberHooksItem]] = pydantic.Field(default=None) + """ + This is the hooks that will be used for incoming calls to this phone number. + """ + + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="smsEnabled"), + pydantic.Field( + alias="smsEnabled", + description="Controls whether Vapi sets the messaging webhook URL on the Twilio number during import.\n\nIf set to `false`, Vapi will not update the Twilio messaging URL, leaving it as is.\nIf `true` or omitted (default), Vapi will configure both the voice and messaging URLs.\n\n@default true", + ), + ] = None id: str = pydantic.Field() """ This is the unique identifier for the phone number. """ - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field() - """ - This is the unique identifier for the org that this phone number belongs to. - """ - - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the phone number was created. - """ - - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the phone number was last updated. - """ - + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this phone number belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the phone number was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the phone number was last updated.", + ), + ] + status: typing.Optional[TwilioPhoneNumberStatus] = pydantic.Field(default=None) + """ + This is the status of the phone number. + """ + + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="twilioAuthToken"), + pydantic.Field(alias="twilioAuthToken", description="This is the Twilio Auth Token for the phone number."), + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="twilioApiKey"), + pydantic.Field(alias="twilioApiKey", description="This is the Twilio API Key for the phone number."), + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="twilioApiSecret"), + pydantic.Field(alias="twilioApiSecret", description="This is the Twilio API Secret for the phone number."), + ] = None name: typing.Optional[str] = pydantic.Field(default=None) """ This is the name of the phone number. This is just for your own reference. """ - assistant_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="assistantId")] = ( - pydantic.Field(default=None) - ) - """ - This is the assistant that will be used for incoming calls to this phone number. - - If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected. - """ - - squad_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="squadId")] = pydantic.Field( - default=None - ) - """ - This is the squad that will be used for incoming calls to this phone number. - - If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected. - """ - - server_url: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="serverUrl")] = pydantic.Field( - default=None - ) - """ - This is the server URL where messages will be sent for calls on this number. This includes the `assistant-request` message. - - You can see the shape of the messages sent in `ServerMessage`. + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assistantId"), + pydantic.Field( + alias="assistantId", + description="This is the assistant that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="workflowId"), + pydantic.Field( + alias="workflowId", + description="This is the workflow that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="squadId"), + pydantic.Field( + alias="squadId", + description="This is the squad that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + server: typing.Optional[Server] = pydantic.Field(default=None) + """ + This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema. - This overrides the `org.serverUrl`. Order of precedence: tool.server.url > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl. - """ - - server_url_secret: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="serverUrlSecret")] = ( - pydantic.Field(default=None) - ) - """ - This is the secret Vapi will send with every message to your server. It's sent as a header called x-vapi-secret. + The order of precedence is: - Same precedence logic as serverUrl. + 1. assistant.server + 2. phoneNumber.server + 3. org.server """ number: str = pydantic.Field() @@ -93,15 +128,11 @@ class TwilioPhoneNumber(UniversalBaseModel): These are the digits of the phone number you own on your Twilio. """ - twilio_account_sid: typing_extensions.Annotated[str, FieldMetadata(alias="twilioAccountSid")] = pydantic.Field() - """ - This is the Twilio Account SID for the phone number. - """ - - twilio_auth_token: typing_extensions.Annotated[str, FieldMetadata(alias="twilioAuthToken")] = pydantic.Field() - """ - This is the Twilio Auth Token for the phone number. - """ + twilio_account_sid: typing_extensions.Annotated[ + str, + FieldMetadata(alias="twilioAccountSid"), + pydantic.Field(alias="twilioAccountSid", description="This is the Twilio Account SID for the phone number."), + ] if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/twilio_phone_number_fallback_destination.py b/src/vapi/types/twilio_phone_number_fallback_destination.py index 0acd928f..8145a255 100644 --- a/src/vapi/types/twilio_phone_number_fallback_destination.py +++ b/src/vapi/types/twilio_phone_number_fallback_destination.py @@ -1,7 +1,93 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .transfer_destination_number import TransferDestinationNumber -from .transfer_destination_sip import TransferDestinationSip -TwilioPhoneNumberFallbackDestination = typing.Union[TransferDestinationNumber, TransferDestinationSip] +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .transfer_destination_number_message import TransferDestinationNumberMessage +from .transfer_destination_sip_message import TransferDestinationSipMessage +from .transfer_plan import TransferPlan + + +class TwilioPhoneNumberFallbackDestination_Number(UncheckedBaseModel): + """ + This is the fallback destination an inbound call will be transferred to if: + 1. `assistantId` is not set + 2. `squadId` is not set + 3. and, `assistant-request` message to the `serverUrl` fails + + If this is not set and above conditions are met, the inbound call is hung up with an error message. + """ + + type: typing.Literal["number"] = "number" + message: typing.Optional[TransferDestinationNumberMessage] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: str + extension: typing.Optional[str] = None + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TwilioPhoneNumberFallbackDestination_Sip(UncheckedBaseModel): + """ + This is the fallback destination an inbound call will be transferred to if: + 1. `assistantId` is not set + 2. `squadId` is not set + 3. and, `assistant-request` message to the `serverUrl` fails + + If this is not set and above conditions are met, the inbound call is hung up with an error message. + """ + + type: typing.Literal["sip"] = "sip" + message: typing.Optional[TransferDestinationSipMessage] = None + sip_uri: typing_extensions.Annotated[str, FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri")] + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + sip_headers: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="sipHeaders"), + pydantic.Field(alias="sipHeaders"), + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +TwilioPhoneNumberFallbackDestination = typing_extensions.Annotated[ + typing.Union[TwilioPhoneNumberFallbackDestination_Number, TwilioPhoneNumberFallbackDestination_Sip], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/twilio_phone_number_hooks_item.py b/src/vapi/types/twilio_phone_number_hooks_item.py new file mode 100644 index 00000000..9d6ad165 --- /dev/null +++ b/src/vapi/types/twilio_phone_number_hooks_item.py @@ -0,0 +1,50 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .phone_number_call_ending_hook_filter import PhoneNumberCallEndingHookFilter +from .phone_number_call_ringing_hook_filter import PhoneNumberCallRingingHookFilter +from .phone_number_hook_call_ending_do import PhoneNumberHookCallEndingDo +from .phone_number_hook_call_ringing_do_item import PhoneNumberHookCallRingingDoItem + + +class TwilioPhoneNumberHooksItem_CallRinging(UncheckedBaseModel): + on: typing.Literal["call.ringing"] = "call.ringing" + filters: typing.Optional[typing.List[PhoneNumberCallRingingHookFilter]] = None + do: typing.List[PhoneNumberHookCallRingingDoItem] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class TwilioPhoneNumberHooksItem_CallEnding(UncheckedBaseModel): + on: typing.Literal["call.ending"] = "call.ending" + filters: typing.Optional[typing.List[PhoneNumberCallEndingHookFilter]] = None + do: typing.Optional[PhoneNumberHookCallEndingDo] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +TwilioPhoneNumberHooksItem = typing_extensions.Annotated[ + typing.Union[TwilioPhoneNumberHooksItem_CallRinging, TwilioPhoneNumberHooksItem_CallEnding], + UnionMetadata(discriminant="on"), +] diff --git a/src/vapi/types/twilio_phone_number_status.py b/src/vapi/types/twilio_phone_number_status.py new file mode 100644 index 00000000..f8ec74db --- /dev/null +++ b/src/vapi/types/twilio_phone_number_status.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TwilioPhoneNumberStatus = typing.Union[typing.Literal["active", "activating", "blocked"], typing.Any] diff --git a/src/vapi/types/twilio_sms_chat_transport.py b/src/vapi/types/twilio_sms_chat_transport.py new file mode 100644 index 00000000..e0473b0e --- /dev/null +++ b/src/vapi/types/twilio_sms_chat_transport.py @@ -0,0 +1,70 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_customer_dto import CreateCustomerDto +from .twilio_sms_chat_transport_conversation_type import TwilioSmsChatTransportConversationType +from .twilio_sms_chat_transport_type import TwilioSmsChatTransportType + + +class TwilioSmsChatTransport(UncheckedBaseModel): + conversation_type: typing_extensions.Annotated[ + typing.Optional[TwilioSmsChatTransportConversationType], + FieldMetadata(alias="conversationType"), + pydantic.Field( + alias="conversationType", description="This is the conversation type of the call (ie, voice or chat)." + ), + ] = None + phone_number_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="phoneNumberId"), + pydantic.Field( + alias="phoneNumberId", + description="This is the phone number that will be used to send the SMS.\nIf provided, will create a new session. If not provided, uses existing session's phoneNumberId.\nThe phone number must have SMS enabled and belong to your organization.", + ), + ] = None + customer: typing.Optional[CreateCustomerDto] = pydantic.Field(default=None) + """ + This is the customer who will receive the SMS. + If provided, will create a new session. If not provided, uses existing session's customer. + """ + + customer_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="customerId"), + pydantic.Field( + alias="customerId", description="This is the customerId of the customer who will receive the SMS." + ), + ] = None + use_llm_generated_message_for_outbound: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="useLLMGeneratedMessageForOutbound"), + pydantic.Field( + alias="useLLMGeneratedMessageForOutbound", + description="Whether to use LLM-generated messages for outbound SMS.\nWhen true (default), input is processed by the assistant for a response.\nWhen false, the input text is forwarded directly as the SMS message without LLM processing.\nUseful for sending pre-defined messages or notifications.", + ), + ] = None + type: TwilioSmsChatTransportType = pydantic.Field() + """ + The type of transport to use for sending the chat response. + Currently supports 'twilio.sms' for SMS delivery via Twilio. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(TwilioSmsChatTransport) diff --git a/src/vapi/types/twilio_sms_chat_transport_conversation_type.py b/src/vapi/types/twilio_sms_chat_transport_conversation_type.py new file mode 100644 index 00000000..665904e7 --- /dev/null +++ b/src/vapi/types/twilio_sms_chat_transport_conversation_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TwilioSmsChatTransportConversationType = typing.Union[typing.Literal["chat"], typing.Any] diff --git a/src/vapi/types/twilio_sms_chat_transport_type.py b/src/vapi/types/twilio_sms_chat_transport_type.py new file mode 100644 index 00000000..95692150 --- /dev/null +++ b/src/vapi/types/twilio_sms_chat_transport_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TwilioSmsChatTransportType = typing.Union[typing.Literal["twilio.sms"], typing.Any] diff --git a/src/vapi/types/twilio_transport_message.py b/src/vapi/types/twilio_transport_message.py new file mode 100644 index 00000000..f8fd9047 --- /dev/null +++ b/src/vapi/types/twilio_transport_message.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class TwilioTransportMessage(UncheckedBaseModel): + twiml: str = pydantic.Field() + """ + This is the TwiML to send to the Twilio call. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/twilio_voicemail_detection.py b/src/vapi/types/twilio_voicemail_detection.py deleted file mode 100644 index 9d8b2401..00000000 --- a/src/vapi/types/twilio_voicemail_detection.py +++ /dev/null @@ -1,107 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from ..core.pydantic_utilities import UniversalBaseModel -import typing -import pydantic -import typing_extensions -from .twilio_voicemail_detection_voicemail_detection_types_item import ( - TwilioVoicemailDetectionVoicemailDetectionTypesItem, -) -from ..core.serialization import FieldMetadata -from ..core.pydantic_utilities import IS_PYDANTIC_V2 - - -class TwilioVoicemailDetection(UniversalBaseModel): - provider: typing.Literal["twilio"] = pydantic.Field(default="twilio") - """ - This is the provider to use for voicemail detection. - """ - - voicemail_detection_types: typing_extensions.Annotated[ - typing.Optional[typing.List[TwilioVoicemailDetectionVoicemailDetectionTypesItem]], - FieldMetadata(alias="voicemailDetectionTypes"), - ] = pydantic.Field(default=None) - """ - These are the AMD messages from Twilio that are considered as voicemail. Default is ['machine_end_beep', 'machine_end_silence']. - - @default {Array} ['machine_end_beep', 'machine_end_silence'] - """ - - enabled: typing.Optional[bool] = pydantic.Field(default=None) - """ - This sets whether the assistant should detect voicemail. Defaults to true. - - @default true - """ - - machine_detection_timeout: typing_extensions.Annotated[ - typing.Optional[float], FieldMetadata(alias="machineDetectionTimeout") - ] = pydantic.Field(default=None) - """ - The number of seconds that Twilio should attempt to perform answering machine detection before timing out and returning AnsweredBy as unknown. Default is 30 seconds. - - Increasing this value will provide the engine more time to make a determination. This can be useful when DetectMessageEnd is provided in the MachineDetection parameter and there is an expectation of long answering machine greetings that can exceed 30 seconds. - - Decreasing this value will reduce the amount of time the engine has to make a determination. This can be particularly useful when the Enable option is provided in the MachineDetection parameter and you want to limit the time for initial detection. - - Check the [Twilio docs](https://www.twilio.com/docs/voice/answering-machine-detection#optional-api-tuning-parameters) for more info. - - @default 30 - """ - - machine_detection_speech_threshold: typing_extensions.Annotated[ - typing.Optional[float], FieldMetadata(alias="machineDetectionSpeechThreshold") - ] = pydantic.Field(default=None) - """ - The number of milliseconds that is used as the measuring stick for the length of the speech activity. Durations lower than this value will be interpreted as a human, longer as a machine. Default is 2400 milliseconds. - - Increasing this value will reduce the chance of a False Machine (detected machine, actually human) for a long human greeting (e.g., a business greeting) but increase the time it takes to detect a machine. - - Decreasing this value will reduce the chances of a False Human (detected human, actually machine) for short voicemail greetings. The value of this parameter may need to be reduced by more than 1000ms to detect very short voicemail greetings. A reduction of that significance can result in increased False Machine detections. Adjusting the MachineDetectionSpeechEndThreshold is likely the better approach for short voicemails. Decreasing MachineDetectionSpeechThreshold will also reduce the time it takes to detect a machine. - - Check the [Twilio docs](https://www.twilio.com/docs/voice/answering-machine-detection#optional-api-tuning-parameters) for more info. - - @default 2400 - """ - - machine_detection_speech_end_threshold: typing_extensions.Annotated[ - typing.Optional[float], FieldMetadata(alias="machineDetectionSpeechEndThreshold") - ] = pydantic.Field(default=None) - """ - The number of milliseconds of silence after speech activity at which point the speech activity is considered complete. Default is 1200 milliseconds. - - Increasing this value will typically be used to better address the short voicemail greeting scenarios. For short voicemails, there is typically 1000-2000ms of audio followed by 1200-2400ms of silence and then additional audio before the beep. Increasing the MachineDetectionSpeechEndThreshold to ~2500ms will treat the 1200-2400ms of silence as a gap in the greeting but not the end of the greeting and will result in a machine detection. The downsides of such a change include: - - - Increasing the delay for human detection by the amount you increase this parameter, e.g., a change of 1200ms to 2500ms increases human detection delay by 1300ms. - - Cases where a human has two utterances separated by a period of silence (e.g. a "Hello", then 2000ms of silence, and another "Hello") may be interpreted as a machine. - - Decreasing this value will result in faster human detection. The consequence is that it can lead to increased False Human (detected human, actually machine) detections because a silence gap in a voicemail greeting (not necessarily just in short voicemail scenarios) can be incorrectly interpreted as the end of speech. - - Check the [Twilio docs](https://www.twilio.com/docs/voice/answering-machine-detection#optional-api-tuning-parameters) for more info. - - @default 1200 - """ - - machine_detection_silence_timeout: typing_extensions.Annotated[ - typing.Optional[float], FieldMetadata(alias="machineDetectionSilenceTimeout") - ] = pydantic.Field(default=None) - """ - The number of milliseconds of initial silence after which an unknown AnsweredBy result will be returned. Default is 5000 milliseconds. - - Increasing this value will result in waiting for a longer period of initial silence before returning an 'unknown' AMD result. - - Decreasing this value will result in waiting for a shorter period of initial silence before returning an 'unknown' AMD result. - - Check the [Twilio docs](https://www.twilio.com/docs/voice/answering-machine-detection#optional-api-tuning-parameters) for more info. - - @default 5000 - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/vapi/types/twilio_voicemail_detection_plan.py b/src/vapi/types/twilio_voicemail_detection_plan.py new file mode 100644 index 00000000..4b66a1d1 --- /dev/null +++ b/src/vapi/types/twilio_voicemail_detection_plan.py @@ -0,0 +1,77 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .twilio_voicemail_detection_plan_provider import TwilioVoicemailDetectionPlanProvider +from .twilio_voicemail_detection_plan_voicemail_detection_types_item import ( + TwilioVoicemailDetectionPlanVoicemailDetectionTypesItem, +) + + +class TwilioVoicemailDetectionPlan(UncheckedBaseModel): + provider: TwilioVoicemailDetectionPlanProvider = pydantic.Field() + """ + This is the provider to use for voicemail detection. + """ + + voicemail_detection_types: typing_extensions.Annotated[ + typing.Optional[typing.List[TwilioVoicemailDetectionPlanVoicemailDetectionTypesItem]], + FieldMetadata(alias="voicemailDetectionTypes"), + pydantic.Field( + alias="voicemailDetectionTypes", + description="These are the AMD messages from Twilio that are considered as voicemail. Default is ['machine_end_beep', 'machine_end_silence'].\n\n@default {Array} ['machine_end_beep', 'machine_end_silence']", + ), + ] = None + enabled: typing.Optional[bool] = pydantic.Field(default=None) + """ + This sets whether the assistant should detect voicemail. Defaults to true. + + @default true + """ + + machine_detection_timeout: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="machineDetectionTimeout"), + pydantic.Field( + alias="machineDetectionTimeout", + description="The number of seconds that Twilio should attempt to perform answering machine detection before timing out and returning AnsweredBy as unknown. Default is 30 seconds.\n\nIncreasing this value will provide the engine more time to make a determination. This can be useful when DetectMessageEnd is provided in the MachineDetection parameter and there is an expectation of long answering machine greetings that can exceed 30 seconds.\n\nDecreasing this value will reduce the amount of time the engine has to make a determination. This can be particularly useful when the Enable option is provided in the MachineDetection parameter and you want to limit the time for initial detection.\n\nCheck the [Twilio docs](https://www.twilio.com/docs/voice/answering-machine-detection#optional-api-tuning-parameters) for more info.\n\n@default 30", + ), + ] = None + machine_detection_speech_threshold: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="machineDetectionSpeechThreshold"), + pydantic.Field( + alias="machineDetectionSpeechThreshold", + description="The number of milliseconds that is used as the measuring stick for the length of the speech activity. Durations lower than this value will be interpreted as a human, longer as a machine. Default is 2400 milliseconds.\n\nIncreasing this value will reduce the chance of a False Machine (detected machine, actually human) for a long human greeting (e.g., a business greeting) but increase the time it takes to detect a machine.\n\nDecreasing this value will reduce the chances of a False Human (detected human, actually machine) for short voicemail greetings. The value of this parameter may need to be reduced by more than 1000ms to detect very short voicemail greetings. A reduction of that significance can result in increased False Machine detections. Adjusting the MachineDetectionSpeechEndThreshold is likely the better approach for short voicemails. Decreasing MachineDetectionSpeechThreshold will also reduce the time it takes to detect a machine.\n\nCheck the [Twilio docs](https://www.twilio.com/docs/voice/answering-machine-detection#optional-api-tuning-parameters) for more info.\n\n@default 2400", + ), + ] = None + machine_detection_speech_end_threshold: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="machineDetectionSpeechEndThreshold"), + pydantic.Field( + alias="machineDetectionSpeechEndThreshold", + description='The number of milliseconds of silence after speech activity at which point the speech activity is considered complete. Default is 1200 milliseconds.\n\nIncreasing this value will typically be used to better address the short voicemail greeting scenarios. For short voicemails, there is typically 1000-2000ms of audio followed by 1200-2400ms of silence and then additional audio before the beep. Increasing the MachineDetectionSpeechEndThreshold to ~2500ms will treat the 1200-2400ms of silence as a gap in the greeting but not the end of the greeting and will result in a machine detection. The downsides of such a change include:\n- Increasing the delay for human detection by the amount you increase this parameter, e.g., a change of 1200ms to 2500ms increases human detection delay by 1300ms.\n- Cases where a human has two utterances separated by a period of silence (e.g. a "Hello", then 2000ms of silence, and another "Hello") may be interpreted as a machine.\n\nDecreasing this value will result in faster human detection. The consequence is that it can lead to increased False Human (detected human, actually machine) detections because a silence gap in a voicemail greeting (not necessarily just in short voicemail scenarios) can be incorrectly interpreted as the end of speech.\n\nCheck the [Twilio docs](https://www.twilio.com/docs/voice/answering-machine-detection#optional-api-tuning-parameters) for more info.\n\n@default 1200', + ), + ] = None + machine_detection_silence_timeout: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="machineDetectionSilenceTimeout"), + pydantic.Field( + alias="machineDetectionSilenceTimeout", + description="The number of milliseconds of initial silence after which an unknown AnsweredBy result will be returned. Default is 5000 milliseconds.\n\nIncreasing this value will result in waiting for a longer period of initial silence before returning an 'unknown' AMD result.\n\nDecreasing this value will result in waiting for a shorter period of initial silence before returning an 'unknown' AMD result.\n\nCheck the [Twilio docs](https://www.twilio.com/docs/voice/answering-machine-detection#optional-api-tuning-parameters) for more info.\n\n@default 5000", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/twilio_voicemail_detection_plan_provider.py b/src/vapi/types/twilio_voicemail_detection_plan_provider.py new file mode 100644 index 00000000..d326cf2f --- /dev/null +++ b/src/vapi/types/twilio_voicemail_detection_plan_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TwilioVoicemailDetectionPlanProvider = typing.Union[typing.Literal["twilio"], typing.Any] diff --git a/src/vapi/types/twilio_voicemail_detection_voicemail_detection_types_item.py b/src/vapi/types/twilio_voicemail_detection_plan_voicemail_detection_types_item.py similarity index 76% rename from src/vapi/types/twilio_voicemail_detection_voicemail_detection_types_item.py rename to src/vapi/types/twilio_voicemail_detection_plan_voicemail_detection_types_item.py index e8cf7b9d..92014775 100644 --- a/src/vapi/types/twilio_voicemail_detection_voicemail_detection_types_item.py +++ b/src/vapi/types/twilio_voicemail_detection_plan_voicemail_detection_types_item.py @@ -2,7 +2,7 @@ import typing -TwilioVoicemailDetectionVoicemailDetectionTypesItem = typing.Union[ +TwilioVoicemailDetectionPlanVoicemailDetectionTypesItem = typing.Union[ typing.Literal[ "machine_start", "human", "fax", "unknown", "machine_end_beep", "machine_end_silence", "machine_end_other" ], diff --git a/src/vapi/types/update_anthropic_bedrock_credential_dto.py b/src/vapi/types/update_anthropic_bedrock_credential_dto.py new file mode 100644 index 00000000..992d80f4 --- /dev/null +++ b/src/vapi/types/update_anthropic_bedrock_credential_dto.py @@ -0,0 +1,42 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .update_anthropic_bedrock_credential_dto_authentication_plan import ( + UpdateAnthropicBedrockCredentialDtoAuthenticationPlan, +) +from .update_anthropic_bedrock_credential_dto_region import UpdateAnthropicBedrockCredentialDtoRegion + + +class UpdateAnthropicBedrockCredentialDto(UncheckedBaseModel): + region: typing.Optional[UpdateAnthropicBedrockCredentialDtoRegion] = pydantic.Field(default=None) + """ + AWS region where Bedrock is configured. + """ + + authentication_plan: typing_extensions.Annotated[ + typing.Optional[UpdateAnthropicBedrockCredentialDtoAuthenticationPlan], + FieldMetadata(alias="authenticationPlan"), + pydantic.Field( + alias="authenticationPlan", + description="Authentication method - either direct IAM credentials or cross-account role assumption.", + ), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/update_anthropic_bedrock_credential_dto_authentication_plan.py b/src/vapi/types/update_anthropic_bedrock_credential_dto_authentication_plan.py new file mode 100644 index 00000000..c1dca786 --- /dev/null +++ b/src/vapi/types/update_anthropic_bedrock_credential_dto_authentication_plan.py @@ -0,0 +1,64 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata + + +class UpdateAnthropicBedrockCredentialDtoAuthenticationPlan_AwsIam(UncheckedBaseModel): + """ + Authentication method - either direct IAM credentials or cross-account role assumption. + """ + + type: typing.Literal["aws-iam"] = "aws-iam" + aws_access_key_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="awsAccessKeyId"), pydantic.Field(alias="awsAccessKeyId") + ] + aws_secret_access_key: typing_extensions.Annotated[ + str, FieldMetadata(alias="awsSecretAccessKey"), pydantic.Field(alias="awsSecretAccessKey") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateAnthropicBedrockCredentialDtoAuthenticationPlan_AwsSts(UncheckedBaseModel): + """ + Authentication method - either direct IAM credentials or cross-account role assumption. + """ + + type: typing.Literal["aws-sts"] = "aws-sts" + role_arn: typing_extensions.Annotated[str, FieldMetadata(alias="roleArn"), pydantic.Field(alias="roleArn")] + external_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="externalId"), pydantic.Field(alias="externalId") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateAnthropicBedrockCredentialDtoAuthenticationPlan = typing_extensions.Annotated[ + typing.Union[ + UpdateAnthropicBedrockCredentialDtoAuthenticationPlan_AwsIam, + UpdateAnthropicBedrockCredentialDtoAuthenticationPlan_AwsSts, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/update_anthropic_bedrock_credential_dto_region.py b/src/vapi/types/update_anthropic_bedrock_credential_dto_region.py new file mode 100644 index 00000000..b2a32472 --- /dev/null +++ b/src/vapi/types/update_anthropic_bedrock_credential_dto_region.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +UpdateAnthropicBedrockCredentialDtoRegion = typing.Union[ + typing.Literal["us-east-1", "us-west-2", "eu-west-1", "eu-west-3", "ap-northeast-1", "ap-southeast-2"], typing.Any +] diff --git a/src/vapi/types/update_anthropic_credential_dto.py b/src/vapi/types/update_anthropic_credential_dto.py index 74a4b61d..bea147f8 100644 --- a/src/vapi/types/update_anthropic_credential_dto.py +++ b/src/vapi/types/update_anthropic_credential_dto.py @@ -1,18 +1,23 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class UpdateAnthropicCredentialDto(UniversalBaseModel): - provider: typing.Literal["anthropic"] = "anthropic" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() +class UpdateAnthropicCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is not returned in the API. + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/update_anyscale_credential_dto.py b/src/vapi/types/update_anyscale_credential_dto.py index 0f334365..d8d6e75b 100644 --- a/src/vapi/types/update_anyscale_credential_dto.py +++ b/src/vapi/types/update_anyscale_credential_dto.py @@ -1,18 +1,23 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class UpdateAnyscaleCredentialDto(UniversalBaseModel): - provider: typing.Literal["anyscale"] = "anyscale" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() +class UpdateAnyscaleCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is not returned in the API. + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/update_api_request_tool_dto.py b/src/vapi/types/update_api_request_tool_dto.py new file mode 100644 index 00000000..3fc43a8c --- /dev/null +++ b/src/vapi/types/update_api_request_tool_dto.py @@ -0,0 +1,119 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .backoff_plan import BackoffPlan +from .tool_parameter import ToolParameter +from .tool_rejection_plan import ToolRejectionPlan +from .update_api_request_tool_dto_messages_item import UpdateApiRequestToolDtoMessagesItem +from .update_api_request_tool_dto_method import UpdateApiRequestToolDtoMethod +from .variable_extraction_plan import VariableExtractionPlan + + +class UpdateApiRequestToolDto(UncheckedBaseModel): + messages: typing.Optional[typing.List[UpdateApiRequestToolDtoMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + method: typing.Optional[UpdateApiRequestToolDtoMethod] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="timeoutSeconds"), + pydantic.Field( + alias="timeoutSeconds", + description="This is the timeout in seconds for the request. Defaults to 20 seconds.\n\n@default 20", + ), + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="credentialId"), + pydantic.Field(alias="credentialId", description="The credential ID for API request authentication"), + ] = None + encrypted_paths: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="encryptedPaths"), + pydantic.Field( + alias="encryptedPaths", + description="This is the paths to encrypt in the request body if credentialId and encryptionPlan are defined.", + ), + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = pydantic.Field(default=None) + """ + Static key-value pairs merged into the request body. Values support Liquid templates. + """ + + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the tool. This will be passed to the model. + + Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 40. + """ + + description: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the description of the tool. This will be passed to the model. + """ + + url: typing.Optional[str] = pydantic.Field(default=None) + """ + This is where the request will be sent. + """ + + body: typing.Optional["JsonSchema"] = pydantic.Field(default=None) + """ + This is the body of the request. + """ + + headers: typing.Optional["JsonSchema"] = pydantic.Field(default=None) + """ + These are the headers to send with the request. + """ + + backoff_plan: typing_extensions.Annotated[ + typing.Optional[BackoffPlan], + FieldMetadata(alias="backoffPlan"), + pydantic.Field( + alias="backoffPlan", + description="This is the backoff plan if the request fails. Defaults to undefined (the request will not be retried).\n\n@default undefined (the request will not be retried)", + ), + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field( + alias="variableExtractionPlan", + description='This is the plan to extract variables from the tool\'s response. These will be accessible during the call and stored in `call.artifact.variableValues` after the call.\n\nUsage:\n1. Use `aliases` to extract variables from the tool\'s response body. (Most common case)\n\n```json\n{\n "aliases": [\n {\n "key": "customerName",\n "value": "{{customer.name}}"\n },\n {\n "key": "customerAge",\n "value": "{{customer.age}}"\n }\n ]\n}\n```\n\nThe tool response body is made available to the liquid template.\n\n2. Use `aliases` to extract variables from the tool\'s response body if the response is an array.\n\n```json\n{\n "aliases": [\n {\n "key": "customerName",\n "value": "{{$[0].name}}"\n },\n {\n "key": "customerAge",\n "value": "{{$[0].age}}"\n }\n ]\n}\n```\n\n$ is a shorthand for the tool\'s response body. `$[0]` is the first item in the array. `$[n]` is the nth item in the array. Note, $ is available regardless of the response body type (both object and array).\n\n3. Use `aliases` to extract variables from the tool\'s response headers.\n\n```json\n{\n "aliases": [\n {\n "key": "customerName",\n "value": "{{tool.response.headers.customer-name}}"\n },\n {\n "key": "customerAge",\n "value": "{{tool.response.headers.customer-age}}"\n }\n ]\n}\n```\n\n`tool.response` is made available to the liquid template. Particularly, both `tool.response.headers` and `tool.response.body` are available. Note, `tool.response` is available regardless of the response body type (both object and array).\n\n4. Use `schema` to extract a large portion of the tool\'s response body.\n\n4.1. If you hit example.com and it returns `{"name": "John", "age": 30}`, then you can specify the schema as:\n\n```json\n{\n "schema": {\n "type": "object",\n "properties": {\n "name": {\n "type": "string"\n },\n "age": {\n "type": "number"\n }\n }\n }\n}\n```\nThese will be extracted as `{{ name }}` and `{{ age }}` respectively. To emphasize, object properties are extracted as direct global variables.\n\n4.2. If you hit example.com and it returns `{"name": {"first": "John", "last": "Doe"}}`, then you can specify the schema as:\n\n```json\n{\n "schema": {\n "type": "object",\n "properties": {\n "name": {\n "type": "object",\n "properties": {\n "first": {\n "type": "string"\n },\n "last": {\n "type": "string"\n }\n }\n }\n }\n }\n}\n```\n\nThese will be extracted as `{{ name }}`. And, `{{ name.first }}` and `{{ name.last }}` will be accessible.\n\n4.3. If you hit example.com and it returns `["94123", "94124"]`, then you can specify the schema as:\n\n```json\n{\n "schema": {\n "type": "array",\n "title": "zipCodes",\n "items": {\n "type": "string"\n }\n }\n}\n```\n\nThis will be extracted as `{{ zipCodes }}`. To access the array items, you can use `{{ zipCodes[0] }}` and `{{ zipCodes[1] }}`.\n\n4.4. If you hit example.com and it returns `[{"name": "John", "age": 30, "zipCodes": ["94123", "94124"]}, {"name": "Jane", "age": 25, "zipCodes": ["94125", "94126"]}]`, then you can specify the schema as:\n\n```json\n{\n "schema": {\n "type": "array",\n "title": "people",\n "items": {\n "type": "object",\n "properties": {\n "name": {\n "type": "string"\n },\n "age": {\n "type": "number"\n },\n "zipCodes": {\n "type": "array",\n "items": {\n "type": "string"\n }\n }\n }\n }\n }\n}\n```\n\nThis will be extracted as `{{ people }}`. To access the array items, you can use `{{ people[n].name }}`, `{{ people[n].age }}`, `{{ people[n].zipCodes }}`, `{{ people[n].zipCodes[0] }}` and `{{ people[n].zipCodes[1] }}`.\n\nNote: Both `aliases` and `schema` can be used together.', + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .json_schema import JsonSchema # noqa: E402, I001 + +update_forward_refs(UpdateApiRequestToolDto, JsonSchema=JsonSchema) diff --git a/src/vapi/types/update_api_request_tool_dto_messages_item.py b/src/vapi/types/update_api_request_tool_dto_messages_item.py new file mode 100644 index 00000000..563ed2f9 --- /dev/null +++ b/src/vapi/types/update_api_request_tool_dto_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class UpdateApiRequestToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateApiRequestToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateApiRequestToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateApiRequestToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateApiRequestToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + UpdateApiRequestToolDtoMessagesItem_RequestStart, + UpdateApiRequestToolDtoMessagesItem_RequestComplete, + UpdateApiRequestToolDtoMessagesItem_RequestFailed, + UpdateApiRequestToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/update_api_request_tool_dto_method.py b/src/vapi/types/update_api_request_tool_dto_method.py new file mode 100644 index 00000000..200a8589 --- /dev/null +++ b/src/vapi/types/update_api_request_tool_dto_method.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +UpdateApiRequestToolDtoMethod = typing.Union[typing.Literal["POST", "GET", "PUT", "PATCH", "DELETE"], typing.Any] diff --git a/src/vapi/types/update_assembly_ai_credential_dto.py b/src/vapi/types/update_assembly_ai_credential_dto.py new file mode 100644 index 00000000..7de18d92 --- /dev/null +++ b/src/vapi/types/update_assembly_ai_credential_dto.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class UpdateAssemblyAiCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/update_azure_credential_dto.py b/src/vapi/types/update_azure_credential_dto.py new file mode 100644 index 00000000..31df3d10 --- /dev/null +++ b/src/vapi/types/update_azure_credential_dto.py @@ -0,0 +1,60 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .azure_blob_storage_bucket_plan import AzureBlobStorageBucketPlan +from .update_azure_credential_dto_region import UpdateAzureCredentialDtoRegion +from .update_azure_credential_dto_service import UpdateAzureCredentialDtoService + + +class UpdateAzureCredentialDto(UncheckedBaseModel): + service: typing.Optional[UpdateAzureCredentialDtoService] = pydantic.Field(default=None) + """ + This is the service being used in Azure. + """ + + region: typing.Optional[UpdateAzureCredentialDtoRegion] = pydantic.Field(default=None) + """ + This is the region of the Azure resource. + """ + + api_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] = None + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="fallbackIndex"), + pydantic.Field( + alias="fallbackIndex", + description="This is the order in which this storage provider is tried during upload retries. Lower numbers are tried first in increasing order.", + ), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + bucket_plan: typing_extensions.Annotated[ + typing.Optional[AzureBlobStorageBucketPlan], + FieldMetadata(alias="bucketPlan"), + pydantic.Field( + alias="bucketPlan", + description="This is the bucket plan that can be provided to store call artifacts in Azure Blob Storage.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/update_azure_credential_dto_region.py b/src/vapi/types/update_azure_credential_dto_region.py new file mode 100644 index 00000000..0db826b2 --- /dev/null +++ b/src/vapi/types/update_azure_credential_dto_region.py @@ -0,0 +1,32 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +UpdateAzureCredentialDtoRegion = typing.Union[ + typing.Literal[ + "australiaeast", + "canadaeast", + "canadacentral", + "centralus", + "eastus2", + "eastus", + "france", + "germanywestcentral", + "india", + "japaneast", + "japanwest", + "northcentralus", + "norway", + "polandcentral", + "southcentralus", + "spaincentral", + "swedencentral", + "switzerland", + "uaenorth", + "uk", + "westeurope", + "westus", + "westus3", + ], + typing.Any, +] diff --git a/src/vapi/types/update_azure_credential_dto_service.py b/src/vapi/types/update_azure_credential_dto_service.py new file mode 100644 index 00000000..1c9f6b3f --- /dev/null +++ b/src/vapi/types/update_azure_credential_dto_service.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +UpdateAzureCredentialDtoService = typing.Union[typing.Literal["speech", "blob_storage"], typing.Any] diff --git a/src/vapi/types/update_azure_open_ai_credential_dto.py b/src/vapi/types/update_azure_open_ai_credential_dto.py index f71bf529..dfafa8de 100644 --- a/src/vapi/types/update_azure_open_ai_credential_dto.py +++ b/src/vapi/types/update_azure_open_ai_credential_dto.py @@ -1,25 +1,37 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -from .update_azure_open_ai_credential_dto_region import UpdateAzureOpenAiCredentialDtoRegion -from .update_azure_open_ai_credential_dto_models_item import UpdateAzureOpenAiCredentialDtoModelsItem -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .update_azure_open_ai_credential_dto_models_item import UpdateAzureOpenAiCredentialDtoModelsItem +from .update_azure_open_ai_credential_dto_region import UpdateAzureOpenAiCredentialDtoRegion -class UpdateAzureOpenAiCredentialDto(UniversalBaseModel): - provider: typing.Literal["azure-openai"] = "azure-openai" - region: UpdateAzureOpenAiCredentialDtoRegion - models: typing.List[UpdateAzureOpenAiCredentialDtoModelsItem] - open_ai_key: typing_extensions.Annotated[str, FieldMetadata(alias="openAIKey")] = pydantic.Field() +class UpdateAzureOpenAiCredentialDto(UncheckedBaseModel): + region: typing.Optional[UpdateAzureOpenAiCredentialDtoRegion] = None + models: typing.Optional[typing.List[UpdateAzureOpenAiCredentialDtoModelsItem]] = None + open_ai_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="openAIKey"), + pydantic.Field(alias="openAIKey", description="This is not returned in the API."), + ] = None + ocp_apim_subscription_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="ocpApimSubscriptionKey"), + pydantic.Field(alias="ocpApimSubscriptionKey", description="This is not returned in the API."), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is not returned in the API. + This is the name of credential. This is just for your reference. """ - open_ai_endpoint: typing_extensions.Annotated[str, FieldMetadata(alias="openAIEndpoint")] + open_ai_endpoint: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="openAIEndpoint"), pydantic.Field(alias="openAIEndpoint") + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/update_azure_open_ai_credential_dto_models_item.py b/src/vapi/types/update_azure_open_ai_credential_dto_models_item.py index 529eb2a6..67d6b5fe 100644 --- a/src/vapi/types/update_azure_open_ai_credential_dto_models_item.py +++ b/src/vapi/types/update_azure_open_ai_credential_dto_models_item.py @@ -4,8 +4,23 @@ UpdateAzureOpenAiCredentialDtoModelsItem = typing.Union[ typing.Literal[ - "gpt-4o-mini-2024-07-18", + "gpt-5.4", + "gpt-5.4-mini", + "gpt-5.4-nano", + "gpt-5.2", + "gpt-5.2-chat", + "gpt-5.1", + "gpt-5.1-chat", + "gpt-5", + "gpt-5-mini", + "gpt-5-nano", + "gpt-4.1-2025-04-14", + "gpt-4.1-mini-2025-04-14", + "gpt-4.1-nano-2025-04-14", + "gpt-4o-2024-11-20", + "gpt-4o-2024-08-06", "gpt-4o-2024-05-13", + "gpt-4o-mini-2024-07-18", "gpt-4-turbo-2024-04-09", "gpt-4-0125-preview", "gpt-4-1106-preview", diff --git a/src/vapi/types/update_azure_open_ai_credential_dto_region.py b/src/vapi/types/update_azure_open_ai_credential_dto_region.py index 874a5bb0..0f44556a 100644 --- a/src/vapi/types/update_azure_open_ai_credential_dto_region.py +++ b/src/vapi/types/update_azure_open_ai_credential_dto_region.py @@ -4,19 +4,27 @@ UpdateAzureOpenAiCredentialDtoRegion = typing.Union[ typing.Literal[ - "australia", - "canada", + "australiaeast", + "canadaeast", + "canadacentral", + "centralus", "eastus2", "eastus", "france", + "germanywestcentral", "india", - "japan", + "japaneast", + "japanwest", "northcentralus", "norway", + "polandcentral", "southcentralus", - "sweden", + "spaincentral", + "swedencentral", "switzerland", + "uaenorth", "uk", + "westeurope", "westus", "westus3", ], diff --git a/src/vapi/types/update_bar_insight_from_call_table_dto.py b/src/vapi/types/update_bar_insight_from_call_table_dto.py new file mode 100644 index 00000000..e525a7f9 --- /dev/null +++ b/src/vapi/types/update_bar_insight_from_call_table_dto.py @@ -0,0 +1,70 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .bar_insight_metadata import BarInsightMetadata +from .insight_formula import InsightFormula +from .insight_time_range_with_step import InsightTimeRangeWithStep +from .update_bar_insight_from_call_table_dto_group_by import UpdateBarInsightFromCallTableDtoGroupBy +from .update_bar_insight_from_call_table_dto_queries_item import UpdateBarInsightFromCallTableDtoQueriesItem + + +class UpdateBarInsightFromCallTableDto(UncheckedBaseModel): + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the Insight. + """ + + formulas: typing.Optional[typing.List[InsightFormula]] = pydantic.Field(default=None) + """ + Formulas are mathematical expressions applied on the data returned by the queries to transform them before being used to create the insight. + The formulas needs to be a valid mathematical expression, supported by MathJS - https://mathjs.org/docs/expressions/syntax.html + A formula is created by using the query names as the variable. + The formulas must contain at least one query name in the LiquidJS format {{query_name}} or {{['query name']}} which will be substituted with the query result. + For example, if you have 2 queries, 'Was Booking Made' and 'Average Call Duration', you can create a formula like this: + ``` + {{['Query 1']}} / {{['Query 2']}} * 100 + ``` + + ``` + ({{[Query 1]}} * 10) + {{[Query 2]}} + ``` + This will take the + + You can also use the query names as the variable in the formula. + """ + + metadata: typing.Optional[BarInsightMetadata] = pydantic.Field(default=None) + """ + This is the metadata for the insight. + """ + + time_range: typing_extensions.Annotated[ + typing.Optional[InsightTimeRangeWithStep], FieldMetadata(alias="timeRange"), pydantic.Field(alias="timeRange") + ] = None + group_by: typing_extensions.Annotated[ + typing.Optional[UpdateBarInsightFromCallTableDtoGroupBy], + FieldMetadata(alias="groupBy"), + pydantic.Field( + alias="groupBy", + description="This is the group by column for the insight when table is `call`.\nThese are the columns to group the results by.\nAll results are grouped by the time range step by default.", + ), + ] = None + queries: typing.Optional[typing.List[UpdateBarInsightFromCallTableDtoQueriesItem]] = pydantic.Field(default=None) + """ + These are the queries to run to generate the insight. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/update_bar_insight_from_call_table_dto_group_by.py b/src/vapi/types/update_bar_insight_from_call_table_dto_group_by.py new file mode 100644 index 00000000..18bb7c72 --- /dev/null +++ b/src/vapi/types/update_bar_insight_from_call_table_dto_group_by.py @@ -0,0 +1,18 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +UpdateBarInsightFromCallTableDtoGroupBy = typing.Union[ + typing.Literal[ + "assistantId", + "workflowId", + "squadId", + "phoneNumberId", + "type", + "endedReason", + "customerNumber", + "campaignId", + "artifact.structuredOutputs[OutputID]", + ], + typing.Any, +] diff --git a/src/vapi/types/update_bar_insight_from_call_table_dto_queries_item.py b/src/vapi/types/update_bar_insight_from_call_table_dto_queries_item.py new file mode 100644 index 00000000..eacd4b43 --- /dev/null +++ b/src/vapi/types/update_bar_insight_from_call_table_dto_queries_item.py @@ -0,0 +1,15 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .json_query_on_call_table_with_number_type_column import JsonQueryOnCallTableWithNumberTypeColumn +from .json_query_on_call_table_with_string_type_column import JsonQueryOnCallTableWithStringTypeColumn +from .json_query_on_call_table_with_structured_output_column import JsonQueryOnCallTableWithStructuredOutputColumn +from .json_query_on_events_table import JsonQueryOnEventsTable + +UpdateBarInsightFromCallTableDtoQueriesItem = typing.Union[ + JsonQueryOnCallTableWithStringTypeColumn, + JsonQueryOnCallTableWithNumberTypeColumn, + JsonQueryOnCallTableWithStructuredOutputColumn, + JsonQueryOnEventsTable, +] diff --git a/src/vapi/types/update_bash_tool_dto.py b/src/vapi/types/update_bash_tool_dto.py new file mode 100644 index 00000000..344544f6 --- /dev/null +++ b/src/vapi/types/update_bash_tool_dto.py @@ -0,0 +1,68 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .server import Server +from .tool_rejection_plan import ToolRejectionPlan +from .update_bash_tool_dto_messages_item import UpdateBashToolDtoMessagesItem +from .update_bash_tool_dto_name import UpdateBashToolDtoName +from .update_bash_tool_dto_sub_type import UpdateBashToolDtoSubType + + +class UpdateBashToolDto(UncheckedBaseModel): + messages: typing.Optional[typing.List[UpdateBashToolDtoMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + sub_type: typing_extensions.Annotated[ + typing.Optional[UpdateBashToolDtoSubType], + FieldMetadata(alias="subType"), + pydantic.Field(alias="subType", description="The sub type of tool."), + ] = None + server: typing.Optional[Server] = pydantic.Field(default=None) + """ + + This is the server where a `tool-calls` webhook will be sent. + + Notes: + - Webhook is sent to this server when a tool call is made. + - Webhook contains the call, assistant, and phone number objects. + - Webhook contains the variables set on the assistant. + - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}. + - Webhook expects a response with tool call result. + """ + + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + name: typing.Optional[UpdateBashToolDtoName] = pydantic.Field(default=None) + """ + The name of the tool, fixed to 'bash' + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(UpdateBashToolDto) diff --git a/src/vapi/types/update_bash_tool_dto_messages_item.py b/src/vapi/types/update_bash_tool_dto_messages_item.py new file mode 100644 index 00000000..c473dd2e --- /dev/null +++ b/src/vapi/types/update_bash_tool_dto_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class UpdateBashToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateBashToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateBashToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateBashToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateBashToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + UpdateBashToolDtoMessagesItem_RequestStart, + UpdateBashToolDtoMessagesItem_RequestComplete, + UpdateBashToolDtoMessagesItem_RequestFailed, + UpdateBashToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/update_bash_tool_dto_name.py b/src/vapi/types/update_bash_tool_dto_name.py new file mode 100644 index 00000000..de367a50 --- /dev/null +++ b/src/vapi/types/update_bash_tool_dto_name.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +UpdateBashToolDtoName = typing.Union[typing.Literal["bash"], typing.Any] diff --git a/src/vapi/types/update_bash_tool_dto_sub_type.py b/src/vapi/types/update_bash_tool_dto_sub_type.py new file mode 100644 index 00000000..90ca60c6 --- /dev/null +++ b/src/vapi/types/update_bash_tool_dto_sub_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +UpdateBashToolDtoSubType = typing.Union[typing.Literal["bash_20241022"], typing.Any] diff --git a/src/vapi/types/update_byo_phone_number_dto.py b/src/vapi/types/update_byo_phone_number_dto.py new file mode 100644 index 00000000..97261162 --- /dev/null +++ b/src/vapi/types/update_byo_phone_number_dto.py @@ -0,0 +1,98 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .server import Server +from .update_byo_phone_number_dto_fallback_destination import UpdateByoPhoneNumberDtoFallbackDestination +from .update_byo_phone_number_dto_hooks_item import UpdateByoPhoneNumberDtoHooksItem + + +class UpdateByoPhoneNumberDto(UncheckedBaseModel): + fallback_destination: typing_extensions.Annotated[ + typing.Optional[UpdateByoPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field( + alias="fallbackDestination", + description="This is the fallback destination an inbound call will be transferred to if:\n1. `assistantId` is not set\n2. `squadId` is not set\n3. and, `assistant-request` message to the `serverUrl` fails\n\nIf this is not set and above conditions are met, the inbound call is hung up with an error message.", + ), + ] = None + hooks: typing.Optional[typing.List[UpdateByoPhoneNumberDtoHooksItem]] = pydantic.Field(default=None) + """ + This is the hooks that will be used for incoming calls to this phone number. + """ + + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field( + alias="numberE164CheckEnabled", + description="This is the flag to toggle the E164 check for the `number` field. This is an advanced property which should be used if you know your use case requires it.\n\nUse cases:\n- `false`: To allow non-E164 numbers like `+001234567890`, `1234`, or `abc`. This is useful for dialing out to non-E164 numbers on your SIP trunks.\n- `true` (default): To allow only E164 numbers like `+14155551234`. This is standard for PSTN calls.\n\nIf `false`, the `number` is still required to only contain alphanumeric characters (regex: `/^\\+?[a-zA-Z0-9]+$/`).\n\n@default true (E164 check is enabled)", + ), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the phone number. This is just for your own reference. + """ + + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assistantId"), + pydantic.Field( + alias="assistantId", + description="This is the assistant that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="workflowId"), + pydantic.Field( + alias="workflowId", + description="This is the workflow that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="squadId"), + pydantic.Field( + alias="squadId", + description="This is the squad that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + server: typing.Optional[Server] = pydantic.Field(default=None) + """ + This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema. + + The order of precedence is: + + 1. assistant.server + 2. phoneNumber.server + 3. org.server + """ + + number: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the number of the customer. + """ + + credential_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="credentialId"), + pydantic.Field( + alias="credentialId", + description="This is the credential of your own SIP trunk or Carrier (type `byo-sip-trunk`) which can be used to make calls to this phone number.\n\nYou can add the SIP trunk or Carrier credential in the Provider Credentials page on the Dashboard to get the credentialId.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/update_byo_phone_number_dto_fallback_destination.py b/src/vapi/types/update_byo_phone_number_dto_fallback_destination.py new file mode 100644 index 00000000..f7e4c1d2 --- /dev/null +++ b/src/vapi/types/update_byo_phone_number_dto_fallback_destination.py @@ -0,0 +1,93 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .transfer_destination_number_message import TransferDestinationNumberMessage +from .transfer_destination_sip_message import TransferDestinationSipMessage +from .transfer_plan import TransferPlan + + +class UpdateByoPhoneNumberDtoFallbackDestination_Number(UncheckedBaseModel): + """ + This is the fallback destination an inbound call will be transferred to if: + 1. `assistantId` is not set + 2. `squadId` is not set + 3. and, `assistant-request` message to the `serverUrl` fails + + If this is not set and above conditions are met, the inbound call is hung up with an error message. + """ + + type: typing.Literal["number"] = "number" + message: typing.Optional[TransferDestinationNumberMessage] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: str + extension: typing.Optional[str] = None + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateByoPhoneNumberDtoFallbackDestination_Sip(UncheckedBaseModel): + """ + This is the fallback destination an inbound call will be transferred to if: + 1. `assistantId` is not set + 2. `squadId` is not set + 3. and, `assistant-request` message to the `serverUrl` fails + + If this is not set and above conditions are met, the inbound call is hung up with an error message. + """ + + type: typing.Literal["sip"] = "sip" + message: typing.Optional[TransferDestinationSipMessage] = None + sip_uri: typing_extensions.Annotated[str, FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri")] + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + sip_headers: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="sipHeaders"), + pydantic.Field(alias="sipHeaders"), + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateByoPhoneNumberDtoFallbackDestination = typing_extensions.Annotated[ + typing.Union[UpdateByoPhoneNumberDtoFallbackDestination_Number, UpdateByoPhoneNumberDtoFallbackDestination_Sip], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/update_byo_phone_number_dto_hooks_item.py b/src/vapi/types/update_byo_phone_number_dto_hooks_item.py new file mode 100644 index 00000000..6a20ddb7 --- /dev/null +++ b/src/vapi/types/update_byo_phone_number_dto_hooks_item.py @@ -0,0 +1,50 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .phone_number_call_ending_hook_filter import PhoneNumberCallEndingHookFilter +from .phone_number_call_ringing_hook_filter import PhoneNumberCallRingingHookFilter +from .phone_number_hook_call_ending_do import PhoneNumberHookCallEndingDo +from .phone_number_hook_call_ringing_do_item import PhoneNumberHookCallRingingDoItem + + +class UpdateByoPhoneNumberDtoHooksItem_CallRinging(UncheckedBaseModel): + on: typing.Literal["call.ringing"] = "call.ringing" + filters: typing.Optional[typing.List[PhoneNumberCallRingingHookFilter]] = None + do: typing.List[PhoneNumberHookCallRingingDoItem] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateByoPhoneNumberDtoHooksItem_CallEnding(UncheckedBaseModel): + on: typing.Literal["call.ending"] = "call.ending" + filters: typing.Optional[typing.List[PhoneNumberCallEndingHookFilter]] = None + do: typing.Optional[PhoneNumberHookCallEndingDo] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateByoPhoneNumberDtoHooksItem = typing_extensions.Annotated[ + typing.Union[UpdateByoPhoneNumberDtoHooksItem_CallRinging, UpdateByoPhoneNumberDtoHooksItem_CallEnding], + UnionMetadata(discriminant="on"), +] diff --git a/src/vapi/types/update_byo_sip_trunk_credential_dto.py b/src/vapi/types/update_byo_sip_trunk_credential_dto.py index 3bec860e..68460472 100644 --- a/src/vapi/types/update_byo_sip_trunk_credential_dto.py +++ b/src/vapi/types/update_byo_sip_trunk_credential_dto.py @@ -1,58 +1,68 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing + import pydantic -from .sip_trunk_gateway import SipTrunkGateway import typing_extensions -from .sip_trunk_outbound_authentication_plan import SipTrunkOutboundAuthenticationPlan +from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel from .sbc_configuration import SbcConfiguration -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from .sip_trunk_gateway import SipTrunkGateway +from .sip_trunk_outbound_authentication_plan import SipTrunkOutboundAuthenticationPlan -class UpdateByoSipTrunkCredentialDto(UniversalBaseModel): - provider: typing.Optional[typing.Literal["byo-sip-trunk"]] = pydantic.Field(default=None) +class UpdateByoSipTrunkCredentialDto(UncheckedBaseModel): + name: typing.Optional[str] = pydantic.Field(default=None) """ - This can be used to bring your own SIP trunks or to connect to a Carrier. + This is the name of credential. This is just for your reference. """ - gateways: typing.List[SipTrunkGateway] = pydantic.Field() + gateways: typing.Optional[typing.List[SipTrunkGateway]] = pydantic.Field(default=None) """ This is the list of SIP trunk's gateways. """ - name: typing.Optional[str] = pydantic.Field(default=None) - """ - This is the name of the SIP trunk. This is just for your reference. - """ - outbound_authentication_plan: typing_extensions.Annotated[ - typing.Optional[SipTrunkOutboundAuthenticationPlan], FieldMetadata(alias="outboundAuthenticationPlan") - ] = pydantic.Field(default=None) - """ - This can be used to configure the outbound authentication if required by the SIP trunk. - """ - + typing.Optional[SipTrunkOutboundAuthenticationPlan], + FieldMetadata(alias="outboundAuthenticationPlan"), + pydantic.Field( + alias="outboundAuthenticationPlan", + description="This can be used to configure the outbound authentication if required by the SIP trunk.", + ), + ] = None outbound_leading_plus_enabled: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="outboundLeadingPlusEnabled") - ] = pydantic.Field(default=None) - """ - This ensures the outbound origination attempts have a leading plus. Defaults to false to match conventional telecom behavior. - - Usage: - - - Vonage/Twilio requires leading plus for all outbound calls. Set this to true. - - @default false - """ - + typing.Optional[bool], + FieldMetadata(alias="outboundLeadingPlusEnabled"), + pydantic.Field( + alias="outboundLeadingPlusEnabled", + description="This ensures the outbound origination attempts have a leading plus. Defaults to false to match conventional telecom behavior.\n\nUsage:\n- Vonage/Twilio requires leading plus for all outbound calls. Set this to true.\n\n@default false", + ), + ] = None + tech_prefix: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="techPrefix"), + pydantic.Field( + alias="techPrefix", + description="This can be used to configure the tech prefix on outbound calls. This is an advanced property.", + ), + ] = None + sip_diversion_header: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="sipDiversionHeader"), + pydantic.Field( + alias="sipDiversionHeader", + description="This can be used to enable the SIP diversion header for authenticating the calling number if the SIP trunk supports it. This is an advanced property.", + ), + ] = None sbc_configuration: typing_extensions.Annotated[ - typing.Optional[SbcConfiguration], FieldMetadata(alias="sbcConfiguration") - ] = pydantic.Field(default=None) - """ - This is an advanced configuration for enterprise deployments. This uses the onprem SBC to trunk into the SIP trunk's `gateways`, rather than the managed SBC provided by Vapi. - """ + typing.Optional[SbcConfiguration], + FieldMetadata(alias="sbcConfiguration"), + pydantic.Field( + alias="sbcConfiguration", + description="This is an advanced configuration for enterprise deployments. This uses the onprem SBC to trunk into the SIP trunk's `gateways`, rather than the managed SBC provided by Vapi.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/update_cartesia_credential_dto.py b/src/vapi/types/update_cartesia_credential_dto.py index d3adc830..1794cf69 100644 --- a/src/vapi/types/update_cartesia_credential_dto.py +++ b/src/vapi/types/update_cartesia_credential_dto.py @@ -1,18 +1,23 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class UpdateCartesiaCredentialDto(UniversalBaseModel): - provider: typing.Literal["cartesia"] = "cartesia" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() +class UpdateCartesiaCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is not returned in the API. + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/update_cerebras_credential_dto.py b/src/vapi/types/update_cerebras_credential_dto.py new file mode 100644 index 00000000..9f4d9afc --- /dev/null +++ b/src/vapi/types/update_cerebras_credential_dto.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class UpdateCerebrasCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/update_cloudflare_credential_dto.py b/src/vapi/types/update_cloudflare_credential_dto.py new file mode 100644 index 00000000..107abb0d --- /dev/null +++ b/src/vapi/types/update_cloudflare_credential_dto.py @@ -0,0 +1,57 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .cloudflare_r_2_bucket_plan import CloudflareR2BucketPlan + + +class UpdateCloudflareCredentialDto(UncheckedBaseModel): + account_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="accountId"), + pydantic.Field(alias="accountId", description="Cloudflare Account Id."), + ] = None + api_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="Cloudflare API Key / Token."), + ] = None + account_email: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="accountEmail"), + pydantic.Field(alias="accountEmail", description="Cloudflare Account Email."), + ] = None + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="fallbackIndex"), + pydantic.Field( + alias="fallbackIndex", + description="This is the order in which this storage provider is tried during upload retries. Lower numbers are tried first in increasing order.", + ), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + bucket_plan: typing_extensions.Annotated[ + typing.Optional[CloudflareR2BucketPlan], + FieldMetadata(alias="bucketPlan"), + pydantic.Field( + alias="bucketPlan", description="This is the bucket plan that can be provided to store call artifacts in R2" + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/update_code_tool_dto.py b/src/vapi/types/update_code_tool_dto.py new file mode 100644 index 00000000..d02f9f5d --- /dev/null +++ b/src/vapi/types/update_code_tool_dto.py @@ -0,0 +1,105 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .code_tool_environment_variable import CodeToolEnvironmentVariable +from .open_ai_function import OpenAiFunction +from .server import Server +from .tool_rejection_plan import ToolRejectionPlan +from .update_code_tool_dto_messages_item import UpdateCodeToolDtoMessagesItem +from .variable_extraction_plan import VariableExtractionPlan + + +class UpdateCodeToolDto(UncheckedBaseModel): + messages: typing.Optional[typing.List[UpdateCodeToolDtoMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + async_: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="async"), + pydantic.Field( + alias="async", + description="This determines if the tool is async.\n\n If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.\n\n If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.\n\n Defaults to synchronous (`false`).", + ), + ] = None + server: typing.Optional[Server] = pydantic.Field(default=None) + """ + + This is the server where a `tool-calls` webhook will be sent. + + Notes: + - Webhook is sent to this server when a tool call is made. + - Webhook contains the call, assistant, and phone number objects. + - Webhook contains the variables set on the assistant. + - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}. + - Webhook expects a response with tool call result. + """ + + code: typing.Optional[str] = pydantic.Field(default=None) + """ + TypeScript code to execute when the tool is called + """ + + environment_variables: typing_extensions.Annotated[ + typing.Optional[typing.List[CodeToolEnvironmentVariable]], + FieldMetadata(alias="environmentVariables"), + pydantic.Field( + alias="environmentVariables", description="Environment variables available in code via `env` object" + ), + ] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="timeoutSeconds"), + pydantic.Field( + alias="timeoutSeconds", + description="This is the timeout in seconds for the code execution. Defaults to 10 seconds.\nMaximum is 30 seconds to prevent abuse.\n\n@default 10", + ), + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="credentialId"), + pydantic.Field(alias="credentialId", description="Credential ID containing the Val Town API key"), + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan", description="Plan to extract variables from the tool response"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + function: typing.Optional[OpenAiFunction] = pydantic.Field(default=None) + """ + This is the function definition of the tool. + + For the Code tool, this defines the name, description, and parameters that the model + will use to understand when and how to call this tool. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(UpdateCodeToolDto) diff --git a/src/vapi/types/update_code_tool_dto_messages_item.py b/src/vapi/types/update_code_tool_dto_messages_item.py new file mode 100644 index 00000000..12d15491 --- /dev/null +++ b/src/vapi/types/update_code_tool_dto_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class UpdateCodeToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateCodeToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateCodeToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateCodeToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateCodeToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + UpdateCodeToolDtoMessagesItem_RequestStart, + UpdateCodeToolDtoMessagesItem_RequestComplete, + UpdateCodeToolDtoMessagesItem_RequestFailed, + UpdateCodeToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/update_computer_tool_dto.py b/src/vapi/types/update_computer_tool_dto.py new file mode 100644 index 00000000..ff52740f --- /dev/null +++ b/src/vapi/types/update_computer_tool_dto.py @@ -0,0 +1,84 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .server import Server +from .tool_rejection_plan import ToolRejectionPlan +from .update_computer_tool_dto_messages_item import UpdateComputerToolDtoMessagesItem +from .update_computer_tool_dto_name import UpdateComputerToolDtoName +from .update_computer_tool_dto_sub_type import UpdateComputerToolDtoSubType + + +class UpdateComputerToolDto(UncheckedBaseModel): + messages: typing.Optional[typing.List[UpdateComputerToolDtoMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + sub_type: typing_extensions.Annotated[ + typing.Optional[UpdateComputerToolDtoSubType], + FieldMetadata(alias="subType"), + pydantic.Field(alias="subType", description="The sub type of tool."), + ] = None + server: typing.Optional[Server] = pydantic.Field(default=None) + """ + + This is the server where a `tool-calls` webhook will be sent. + + Notes: + - Webhook is sent to this server when a tool call is made. + - Webhook contains the call, assistant, and phone number objects. + - Webhook contains the variables set on the assistant. + - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}. + - Webhook expects a response with tool call result. + """ + + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + name: typing.Optional[UpdateComputerToolDtoName] = pydantic.Field(default=None) + """ + The name of the tool, fixed to 'computer' + """ + + display_width_px: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="displayWidthPx"), + pydantic.Field(alias="displayWidthPx", description="The display width in pixels"), + ] = None + display_height_px: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="displayHeightPx"), + pydantic.Field(alias="displayHeightPx", description="The display height in pixels"), + ] = None + display_number: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="displayNumber"), + pydantic.Field(alias="displayNumber", description="Optional display number"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(UpdateComputerToolDto) diff --git a/src/vapi/types/update_computer_tool_dto_messages_item.py b/src/vapi/types/update_computer_tool_dto_messages_item.py new file mode 100644 index 00000000..b35bba3d --- /dev/null +++ b/src/vapi/types/update_computer_tool_dto_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class UpdateComputerToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateComputerToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateComputerToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateComputerToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateComputerToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + UpdateComputerToolDtoMessagesItem_RequestStart, + UpdateComputerToolDtoMessagesItem_RequestComplete, + UpdateComputerToolDtoMessagesItem_RequestFailed, + UpdateComputerToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/update_computer_tool_dto_name.py b/src/vapi/types/update_computer_tool_dto_name.py new file mode 100644 index 00000000..bd6f111b --- /dev/null +++ b/src/vapi/types/update_computer_tool_dto_name.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +UpdateComputerToolDtoName = typing.Union[typing.Literal["computer"], typing.Any] diff --git a/src/vapi/types/update_computer_tool_dto_sub_type.py b/src/vapi/types/update_computer_tool_dto_sub_type.py new file mode 100644 index 00000000..93aa6695 --- /dev/null +++ b/src/vapi/types/update_computer_tool_dto_sub_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +UpdateComputerToolDtoSubType = typing.Union[typing.Literal["computer_20241022"], typing.Any] diff --git a/src/vapi/types/update_custom_credential_dto.py b/src/vapi/types/update_custom_credential_dto.py new file mode 100644 index 00000000..8ea62b95 --- /dev/null +++ b/src/vapi/types/update_custom_credential_dto.py @@ -0,0 +1,43 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .update_custom_credential_dto_authentication_plan import UpdateCustomCredentialDtoAuthenticationPlan +from .update_custom_credential_dto_encryption_plan import UpdateCustomCredentialDtoEncryptionPlan + + +class UpdateCustomCredentialDto(UncheckedBaseModel): + authentication_plan: typing_extensions.Annotated[ + typing.Optional[UpdateCustomCredentialDtoAuthenticationPlan], + FieldMetadata(alias="authenticationPlan"), + pydantic.Field( + alias="authenticationPlan", + description="This is the authentication plan. Supports OAuth2 RFC 6749, HMAC signing, and Bearer authentication.", + ), + ] = None + encryption_plan: typing_extensions.Annotated[ + typing.Optional[UpdateCustomCredentialDtoEncryptionPlan], + FieldMetadata(alias="encryptionPlan"), + pydantic.Field( + alias="encryptionPlan", + description="This is the encryption plan for encrypting sensitive data. Currently supports public-key encryption.", + ), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/update_custom_credential_dto_authentication_plan.py b/src/vapi/types/update_custom_credential_dto_authentication_plan.py new file mode 100644 index 00000000..989924a1 --- /dev/null +++ b/src/vapi/types/update_custom_credential_dto_authentication_plan.py @@ -0,0 +1,115 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .hmac_authentication_plan_algorithm import HmacAuthenticationPlanAlgorithm +from .hmac_authentication_plan_signature_encoding import HmacAuthenticationPlanSignatureEncoding + + +class UpdateCustomCredentialDtoAuthenticationPlan_Oauth2(UncheckedBaseModel): + """ + This is the authentication plan. Supports OAuth2 RFC 6749, HMAC signing, and Bearer authentication. + """ + + type: typing.Literal["oauth2"] = "oauth2" + url: str + client_id: typing_extensions.Annotated[str, FieldMetadata(alias="clientId"), pydantic.Field(alias="clientId")] + client_secret: typing_extensions.Annotated[ + str, FieldMetadata(alias="clientSecret"), pydantic.Field(alias="clientSecret") + ] + scope: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateCustomCredentialDtoAuthenticationPlan_Hmac(UncheckedBaseModel): + """ + This is the authentication plan. Supports OAuth2 RFC 6749, HMAC signing, and Bearer authentication. + """ + + type: typing.Literal["hmac"] = "hmac" + secret_key: typing_extensions.Annotated[str, FieldMetadata(alias="secretKey"), pydantic.Field(alias="secretKey")] + algorithm: HmacAuthenticationPlanAlgorithm + signature_header: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="signatureHeader"), pydantic.Field(alias="signatureHeader") + ] = None + timestamp_header: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="timestampHeader"), pydantic.Field(alias="timestampHeader") + ] = None + signature_prefix: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="signaturePrefix"), pydantic.Field(alias="signaturePrefix") + ] = None + include_timestamp: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="includeTimestamp"), pydantic.Field(alias="includeTimestamp") + ] = None + payload_format: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="payloadFormat"), pydantic.Field(alias="payloadFormat") + ] = None + message_id_header: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="messageIdHeader"), pydantic.Field(alias="messageIdHeader") + ] = None + signature_encoding: typing_extensions.Annotated[ + typing.Optional[HmacAuthenticationPlanSignatureEncoding], + FieldMetadata(alias="signatureEncoding"), + pydantic.Field(alias="signatureEncoding"), + ] = None + secret_is_base_64: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="secretIsBase64"), pydantic.Field(alias="secretIsBase64") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateCustomCredentialDtoAuthenticationPlan_Bearer(UncheckedBaseModel): + """ + This is the authentication plan. Supports OAuth2 RFC 6749, HMAC signing, and Bearer authentication. + """ + + type: typing.Literal["bearer"] = "bearer" + token: str + header_name: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="headerName"), pydantic.Field(alias="headerName") + ] = None + bearer_prefix_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="bearerPrefixEnabled"), pydantic.Field(alias="bearerPrefixEnabled") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateCustomCredentialDtoAuthenticationPlan = typing_extensions.Annotated[ + typing.Union[ + UpdateCustomCredentialDtoAuthenticationPlan_Oauth2, + UpdateCustomCredentialDtoAuthenticationPlan_Hmac, + UpdateCustomCredentialDtoAuthenticationPlan_Bearer, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/update_custom_credential_dto_encryption_plan.py b/src/vapi/types/update_custom_credential_dto_encryption_plan.py new file mode 100644 index 00000000..eaf59343 --- /dev/null +++ b/src/vapi/types/update_custom_credential_dto_encryption_plan.py @@ -0,0 +1,37 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .public_key_encryption_plan_algorithm import PublicKeyEncryptionPlanAlgorithm +from .public_key_encryption_plan_public_key import PublicKeyEncryptionPlanPublicKey + + +class UpdateCustomCredentialDtoEncryptionPlan_PublicKey(UncheckedBaseModel): + """ + This is the encryption plan for encrypting sensitive data. Currently supports public-key encryption. + """ + + type: typing.Literal["public-key"] = "public-key" + algorithm: PublicKeyEncryptionPlanAlgorithm + public_key: typing_extensions.Annotated[ + PublicKeyEncryptionPlanPublicKey, FieldMetadata(alias="publicKey"), pydantic.Field(alias="publicKey") + ] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateCustomCredentialDtoEncryptionPlan = UpdateCustomCredentialDtoEncryptionPlan_PublicKey diff --git a/src/vapi/types/update_custom_knowledge_base_dto.py b/src/vapi/types/update_custom_knowledge_base_dto.py new file mode 100644 index 00000000..0856c2c3 --- /dev/null +++ b/src/vapi/types/update_custom_knowledge_base_dto.py @@ -0,0 +1,62 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .server import Server + + +class UpdateCustomKnowledgeBaseDto(UncheckedBaseModel): + server: typing.Optional[Server] = pydantic.Field(default=None) + """ + This is where the knowledge base request will be sent. + + Request Example: + + POST https://{server.url} + Content-Type: application/json + + { + "messsage": { + "type": "knowledge-base-request", + "messages": [ + { + "role": "user", + "content": "Why is ocean blue?" + } + ], + ...other metadata about the call... + } + } + + Response Expected: + ``` + { + "message": { + "role": "assistant", + "content": "The ocean is blue because water absorbs everything but blue.", + }, // YOU CAN RETURN THE EXACT RESPONSE TO SPEAK + "documents": [ + { + "content": "The ocean is blue primarily because water absorbs colors in the red part of the light spectrum and scatters the blue light, making it more visible to our eyes.", + "similarity": 1 + }, + { + "content": "Blue light is scattered more by the water molecules than other colors, enhancing the blue appearance of the ocean.", + "similarity": .5 + } + ] // OR, YOU CAN RETURN AN ARRAY OF DOCUMENTS THAT WILL BE SENT TO THE MODEL + } + ``` + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/update_custom_llm_credential_dto.py b/src/vapi/types/update_custom_llm_credential_dto.py index 68e1daa7..4496c149 100644 --- a/src/vapi/types/update_custom_llm_credential_dto.py +++ b/src/vapi/types/update_custom_llm_credential_dto.py @@ -1,18 +1,32 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .o_auth_2_authentication_plan import OAuth2AuthenticationPlan -class UpdateCustomLlmCredentialDto(UniversalBaseModel): - provider: typing.Literal["custom-llm"] = "custom-llm" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() +class UpdateCustomLlmCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] = None + authentication_plan: typing_extensions.Annotated[ + typing.Optional[OAuth2AuthenticationPlan], + FieldMetadata(alias="authenticationPlan"), + pydantic.Field( + alias="authenticationPlan", + description="This is the authentication plan. Currently supports OAuth2 RFC 6749. To use Bearer authentication, use apiKey", + ), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is not returned in the API. + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/update_deep_infra_credential_dto.py b/src/vapi/types/update_deep_infra_credential_dto.py index 59d154ea..e3258bf8 100644 --- a/src/vapi/types/update_deep_infra_credential_dto.py +++ b/src/vapi/types/update_deep_infra_credential_dto.py @@ -1,18 +1,23 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class UpdateDeepInfraCredentialDto(UniversalBaseModel): - provider: typing.Literal["deepinfra"] = "deepinfra" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() +class UpdateDeepInfraCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is not returned in the API. + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/update_deep_seek_credential_dto.py b/src/vapi/types/update_deep_seek_credential_dto.py new file mode 100644 index 00000000..b85d1cb7 --- /dev/null +++ b/src/vapi/types/update_deep_seek_credential_dto.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class UpdateDeepSeekCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/update_deepgram_credential_dto.py b/src/vapi/types/update_deepgram_credential_dto.py index 522ee9f1..d3bb5178 100644 --- a/src/vapi/types/update_deepgram_credential_dto.py +++ b/src/vapi/types/update_deepgram_credential_dto.py @@ -1,26 +1,33 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class UpdateDeepgramCredentialDto(UniversalBaseModel): - provider: typing.Literal["deepgram"] = "deepgram" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() +class UpdateDeepgramCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is not returned in the API. + This is the name of credential. This is just for your reference. """ - api_url: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="apiUrl")] = pydantic.Field( - default=None - ) - """ - This can be used to point to an onprem Deepgram instance. Defaults to api.deepgram.com. - """ + api_url: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiUrl"), + pydantic.Field( + alias="apiUrl", + description="This can be used to point to an onprem Deepgram instance. Defaults to api.deepgram.com.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/update_dtmf_tool_dto.py b/src/vapi/types/update_dtmf_tool_dto.py new file mode 100644 index 00000000..fb9931dd --- /dev/null +++ b/src/vapi/types/update_dtmf_tool_dto.py @@ -0,0 +1,51 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .tool_rejection_plan import ToolRejectionPlan +from .update_dtmf_tool_dto_messages_item import UpdateDtmfToolDtoMessagesItem + + +class UpdateDtmfToolDto(UncheckedBaseModel): + messages: typing.Optional[typing.List[UpdateDtmfToolDtoMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + sip_info_dtmf_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="sipInfoDtmfEnabled"), + pydantic.Field( + alias="sipInfoDtmfEnabled", + description="This enables sending DTMF tones via SIP INFO messages instead of RFC 2833 (RTP events). When enabled, DTMF digits will be sent using the SIP INFO method, which can be more reliable in some network configurations. Only relevant when using the `vapi.sip` transport.", + ), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(UpdateDtmfToolDto) diff --git a/src/vapi/types/update_dtmf_tool_dto_messages_item.py b/src/vapi/types/update_dtmf_tool_dto_messages_item.py new file mode 100644 index 00000000..57d72622 --- /dev/null +++ b/src/vapi/types/update_dtmf_tool_dto_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class UpdateDtmfToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateDtmfToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateDtmfToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateDtmfToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateDtmfToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + UpdateDtmfToolDtoMessagesItem_RequestStart, + UpdateDtmfToolDtoMessagesItem_RequestComplete, + UpdateDtmfToolDtoMessagesItem_RequestFailed, + UpdateDtmfToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/update_eleven_labs_credential_dto.py b/src/vapi/types/update_eleven_labs_credential_dto.py index 7cf97352..fca02290 100644 --- a/src/vapi/types/update_eleven_labs_credential_dto.py +++ b/src/vapi/types/update_eleven_labs_credential_dto.py @@ -1,20 +1,27 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class UpdateElevenLabsCredentialDto(UniversalBaseModel): - provider: typing.Literal["11labs"] = "11labs" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() +class UpdateElevenLabsCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is not returned in the API. + This is the name of credential. This is just for your reference. """ + provider: typing.Optional[typing.Literal["11labs"]] = None + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/vapi/types/update_email_credential_dto.py b/src/vapi/types/update_email_credential_dto.py new file mode 100644 index 00000000..f1300beb --- /dev/null +++ b/src/vapi/types/update_email_credential_dto.py @@ -0,0 +1,28 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class UpdateEmailCredentialDto(UncheckedBaseModel): + email: typing.Optional[str] = pydantic.Field(default=None) + """ + The recipient email address for alerts + """ + + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/update_end_call_tool_dto.py b/src/vapi/types/update_end_call_tool_dto.py new file mode 100644 index 00000000..725809b9 --- /dev/null +++ b/src/vapi/types/update_end_call_tool_dto.py @@ -0,0 +1,43 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .tool_rejection_plan import ToolRejectionPlan +from .update_end_call_tool_dto_messages_item import UpdateEndCallToolDtoMessagesItem + + +class UpdateEndCallToolDto(UncheckedBaseModel): + messages: typing.Optional[typing.List[UpdateEndCallToolDtoMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(UpdateEndCallToolDto) diff --git a/src/vapi/types/update_end_call_tool_dto_messages_item.py b/src/vapi/types/update_end_call_tool_dto_messages_item.py new file mode 100644 index 00000000..716e3287 --- /dev/null +++ b/src/vapi/types/update_end_call_tool_dto_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class UpdateEndCallToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateEndCallToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateEndCallToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateEndCallToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateEndCallToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + UpdateEndCallToolDtoMessagesItem_RequestStart, + UpdateEndCallToolDtoMessagesItem_RequestComplete, + UpdateEndCallToolDtoMessagesItem_RequestFailed, + UpdateEndCallToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/update_function_tool_dto.py b/src/vapi/types/update_function_tool_dto.py new file mode 100644 index 00000000..af013a1e --- /dev/null +++ b/src/vapi/types/update_function_tool_dto.py @@ -0,0 +1,82 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .open_ai_function import OpenAiFunction +from .server import Server +from .tool_parameter import ToolParameter +from .tool_rejection_plan import ToolRejectionPlan +from .update_function_tool_dto_messages_item import UpdateFunctionToolDtoMessagesItem +from .variable_extraction_plan import VariableExtractionPlan + + +class UpdateFunctionToolDto(UncheckedBaseModel): + messages: typing.Optional[typing.List[UpdateFunctionToolDtoMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + async_: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="async"), + pydantic.Field( + alias="async", + description="This determines if the tool is async.\n\n If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.\n\n If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.\n\n Defaults to synchronous (`false`).", + ), + ] = None + server: typing.Optional[Server] = pydantic.Field(default=None) + """ + + This is the server where a `tool-calls` webhook will be sent. + + Notes: + - Webhook is sent to this server when a tool call is made. + - Webhook contains the call, assistant, and phone number objects. + - Webhook contains the variables set on the assistant. + - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}. + - Webhook expects a response with tool call result. + """ + + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan", description="Plan to extract variables from the tool response"), + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = pydantic.Field(default=None) + """ + Static key-value pairs merged into the request body. Values support Liquid templates. + """ + + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + function: typing.Optional[OpenAiFunction] = pydantic.Field(default=None) + """ + This is the function definition of the tool. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(UpdateFunctionToolDto) diff --git a/src/vapi/types/update_function_tool_dto_messages_item.py b/src/vapi/types/update_function_tool_dto_messages_item.py new file mode 100644 index 00000000..f82225c3 --- /dev/null +++ b/src/vapi/types/update_function_tool_dto_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class UpdateFunctionToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateFunctionToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateFunctionToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateFunctionToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateFunctionToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + UpdateFunctionToolDtoMessagesItem_RequestStart, + UpdateFunctionToolDtoMessagesItem_RequestComplete, + UpdateFunctionToolDtoMessagesItem_RequestFailed, + UpdateFunctionToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/update_gcp_credential_dto.py b/src/vapi/types/update_gcp_credential_dto.py index 81bfba56..2d0c0cab 100644 --- a/src/vapi/types/update_gcp_credential_dto.py +++ b/src/vapi/types/update_gcp_credential_dto.py @@ -1,35 +1,46 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing + import pydantic import typing_extensions -from .gcp_key import GcpKey +from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel from .bucket_plan import BucketPlan -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from .gcp_key import GcpKey -class UpdateGcpCredentialDto(UniversalBaseModel): - provider: typing.Literal["gcp"] = "gcp" +class UpdateGcpCredentialDto(UncheckedBaseModel): + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="fallbackIndex"), + pydantic.Field( + alias="fallbackIndex", + description="This is the order in which this storage provider is tried during upload retries. Lower numbers are tried first in increasing order.", + ), + ] = None name: typing.Optional[str] = pydantic.Field(default=None) """ - This is the name of the GCP credential. This is just for your reference. + This is the name of credential. This is just for your reference. """ - gcp_key: typing_extensions.Annotated[GcpKey, FieldMetadata(alias="gcpKey")] = pydantic.Field() + gcp_key: typing_extensions.Annotated[ + typing.Optional[GcpKey], + FieldMetadata(alias="gcpKey"), + pydantic.Field( + alias="gcpKey", + description="This is the GCP key. This is the JSON that can be generated in the Google Cloud Console at https://console.cloud.google.com/iam-admin/serviceaccounts/details//keys.\n\nThe schema is identical to the JSON that GCP outputs.", + ), + ] = None + region: typing.Optional[str] = pydantic.Field(default=None) """ - This is the GCP key. This is the JSON that can be generated in the Google Cloud Console at https://console.cloud.google.com/iam-admin/serviceaccounts/details//keys. - - The schema is identical to the JSON that GCP outputs. + This is the region of the GCP resource. """ - bucket_plan: typing_extensions.Annotated[typing.Optional[BucketPlan], FieldMetadata(alias="bucketPlan")] = ( - pydantic.Field(default=None) - ) - """ - This is the bucket plan that can be provided to store call artifacts in GCP. - """ + bucket_plan: typing_extensions.Annotated[ + typing.Optional[BucketPlan], FieldMetadata(alias="bucketPlan"), pydantic.Field(alias="bucketPlan") + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/update_ghl_tool_dto.py b/src/vapi/types/update_ghl_tool_dto.py new file mode 100644 index 00000000..1af68e92 --- /dev/null +++ b/src/vapi/types/update_ghl_tool_dto.py @@ -0,0 +1,45 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .ghl_tool_metadata import GhlToolMetadata +from .tool_rejection_plan import ToolRejectionPlan +from .update_ghl_tool_dto_messages_item import UpdateGhlToolDtoMessagesItem + + +class UpdateGhlToolDto(UncheckedBaseModel): + messages: typing.Optional[typing.List[UpdateGhlToolDtoMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + metadata: typing.Optional[GhlToolMetadata] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(UpdateGhlToolDto) diff --git a/src/vapi/types/update_ghl_tool_dto_messages_item.py b/src/vapi/types/update_ghl_tool_dto_messages_item.py new file mode 100644 index 00000000..77e2a77f --- /dev/null +++ b/src/vapi/types/update_ghl_tool_dto_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class UpdateGhlToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateGhlToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateGhlToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateGhlToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateGhlToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + UpdateGhlToolDtoMessagesItem_RequestStart, + UpdateGhlToolDtoMessagesItem_RequestComplete, + UpdateGhlToolDtoMessagesItem_RequestFailed, + UpdateGhlToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/update_gladia_credential_dto.py b/src/vapi/types/update_gladia_credential_dto.py index ceb3faa8..6cb0c861 100644 --- a/src/vapi/types/update_gladia_credential_dto.py +++ b/src/vapi/types/update_gladia_credential_dto.py @@ -1,18 +1,23 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class UpdateGladiaCredentialDto(UniversalBaseModel): - provider: typing.Literal["gladia"] = "gladia" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() +class UpdateGladiaCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is not returned in the API. + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/update_go_high_level_calendar_availability_tool_dto.py b/src/vapi/types/update_go_high_level_calendar_availability_tool_dto.py new file mode 100644 index 00000000..b0e604a1 --- /dev/null +++ b/src/vapi/types/update_go_high_level_calendar_availability_tool_dto.py @@ -0,0 +1,47 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .tool_rejection_plan import ToolRejectionPlan +from .update_go_high_level_calendar_availability_tool_dto_messages_item import ( + UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem, +) + + +class UpdateGoHighLevelCalendarAvailabilityToolDto(UncheckedBaseModel): + messages: typing.Optional[typing.List[UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem]] = pydantic.Field( + default=None + ) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(UpdateGoHighLevelCalendarAvailabilityToolDto) diff --git a/src/vapi/types/update_go_high_level_calendar_availability_tool_dto_messages_item.py b/src/vapi/types/update_go_high_level_calendar_availability_tool_dto_messages_item.py new file mode 100644 index 00000000..93bf23cf --- /dev/null +++ b/src/vapi/types/update_go_high_level_calendar_availability_tool_dto_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestStart, + UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestComplete, + UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestFailed, + UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/update_go_high_level_calendar_event_create_tool_dto.py b/src/vapi/types/update_go_high_level_calendar_event_create_tool_dto.py new file mode 100644 index 00000000..7e025efa --- /dev/null +++ b/src/vapi/types/update_go_high_level_calendar_event_create_tool_dto.py @@ -0,0 +1,47 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .tool_rejection_plan import ToolRejectionPlan +from .update_go_high_level_calendar_event_create_tool_dto_messages_item import ( + UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem, +) + + +class UpdateGoHighLevelCalendarEventCreateToolDto(UncheckedBaseModel): + messages: typing.Optional[typing.List[UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem]] = pydantic.Field( + default=None + ) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(UpdateGoHighLevelCalendarEventCreateToolDto) diff --git a/src/vapi/types/update_go_high_level_calendar_event_create_tool_dto_messages_item.py b/src/vapi/types/update_go_high_level_calendar_event_create_tool_dto_messages_item.py new file mode 100644 index 00000000..8f674aae --- /dev/null +++ b/src/vapi/types/update_go_high_level_calendar_event_create_tool_dto_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestStart, + UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestComplete, + UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestFailed, + UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/update_go_high_level_contact_create_tool_dto.py b/src/vapi/types/update_go_high_level_contact_create_tool_dto.py new file mode 100644 index 00000000..7821eed3 --- /dev/null +++ b/src/vapi/types/update_go_high_level_contact_create_tool_dto.py @@ -0,0 +1,47 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .tool_rejection_plan import ToolRejectionPlan +from .update_go_high_level_contact_create_tool_dto_messages_item import ( + UpdateGoHighLevelContactCreateToolDtoMessagesItem, +) + + +class UpdateGoHighLevelContactCreateToolDto(UncheckedBaseModel): + messages: typing.Optional[typing.List[UpdateGoHighLevelContactCreateToolDtoMessagesItem]] = pydantic.Field( + default=None + ) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(UpdateGoHighLevelContactCreateToolDto) diff --git a/src/vapi/types/update_go_high_level_contact_create_tool_dto_messages_item.py b/src/vapi/types/update_go_high_level_contact_create_tool_dto_messages_item.py new file mode 100644 index 00000000..6a637af4 --- /dev/null +++ b/src/vapi/types/update_go_high_level_contact_create_tool_dto_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class UpdateGoHighLevelContactCreateToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateGoHighLevelContactCreateToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateGoHighLevelContactCreateToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateGoHighLevelContactCreateToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateGoHighLevelContactCreateToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + UpdateGoHighLevelContactCreateToolDtoMessagesItem_RequestStart, + UpdateGoHighLevelContactCreateToolDtoMessagesItem_RequestComplete, + UpdateGoHighLevelContactCreateToolDtoMessagesItem_RequestFailed, + UpdateGoHighLevelContactCreateToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/update_go_high_level_contact_get_tool_dto.py b/src/vapi/types/update_go_high_level_contact_get_tool_dto.py new file mode 100644 index 00000000..fab72190 --- /dev/null +++ b/src/vapi/types/update_go_high_level_contact_get_tool_dto.py @@ -0,0 +1,45 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .tool_rejection_plan import ToolRejectionPlan +from .update_go_high_level_contact_get_tool_dto_messages_item import UpdateGoHighLevelContactGetToolDtoMessagesItem + + +class UpdateGoHighLevelContactGetToolDto(UncheckedBaseModel): + messages: typing.Optional[typing.List[UpdateGoHighLevelContactGetToolDtoMessagesItem]] = pydantic.Field( + default=None + ) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(UpdateGoHighLevelContactGetToolDto) diff --git a/src/vapi/types/update_go_high_level_contact_get_tool_dto_messages_item.py b/src/vapi/types/update_go_high_level_contact_get_tool_dto_messages_item.py new file mode 100644 index 00000000..18b100fb --- /dev/null +++ b/src/vapi/types/update_go_high_level_contact_get_tool_dto_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class UpdateGoHighLevelContactGetToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateGoHighLevelContactGetToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateGoHighLevelContactGetToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateGoHighLevelContactGetToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateGoHighLevelContactGetToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + UpdateGoHighLevelContactGetToolDtoMessagesItem_RequestStart, + UpdateGoHighLevelContactGetToolDtoMessagesItem_RequestComplete, + UpdateGoHighLevelContactGetToolDtoMessagesItem_RequestFailed, + UpdateGoHighLevelContactGetToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/update_go_high_level_credential_dto.py b/src/vapi/types/update_go_high_level_credential_dto.py index 60718a15..88f49aaf 100644 --- a/src/vapi/types/update_go_high_level_credential_dto.py +++ b/src/vapi/types/update_go_high_level_credential_dto.py @@ -1,18 +1,23 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class UpdateGoHighLevelCredentialDto(UniversalBaseModel): - provider: typing.Literal["gohighlevel"] = "gohighlevel" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() +class UpdateGoHighLevelCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is not returned in the API. + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/update_go_high_level_mcp_credential_dto.py b/src/vapi/types/update_go_high_level_mcp_credential_dto.py new file mode 100644 index 00000000..bf55c3e8 --- /dev/null +++ b/src/vapi/types/update_go_high_level_mcp_credential_dto.py @@ -0,0 +1,33 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .oauth_2_authentication_session import Oauth2AuthenticationSession + + +class UpdateGoHighLevelMcpCredentialDto(UncheckedBaseModel): + authentication_session: typing_extensions.Annotated[ + typing.Optional[Oauth2AuthenticationSession], + FieldMetadata(alias="authenticationSession"), + pydantic.Field( + alias="authenticationSession", description="This is the authentication session for the credential." + ), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/update_google_calendar_check_availability_tool_dto.py b/src/vapi/types/update_google_calendar_check_availability_tool_dto.py new file mode 100644 index 00000000..b06a4835 --- /dev/null +++ b/src/vapi/types/update_google_calendar_check_availability_tool_dto.py @@ -0,0 +1,47 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .tool_rejection_plan import ToolRejectionPlan +from .update_google_calendar_check_availability_tool_dto_messages_item import ( + UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem, +) + + +class UpdateGoogleCalendarCheckAvailabilityToolDto(UncheckedBaseModel): + messages: typing.Optional[typing.List[UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem]] = pydantic.Field( + default=None + ) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(UpdateGoogleCalendarCheckAvailabilityToolDto) diff --git a/src/vapi/types/update_google_calendar_check_availability_tool_dto_messages_item.py b/src/vapi/types/update_google_calendar_check_availability_tool_dto_messages_item.py new file mode 100644 index 00000000..251d445a --- /dev/null +++ b/src/vapi/types/update_google_calendar_check_availability_tool_dto_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestStart, + UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestComplete, + UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestFailed, + UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/update_google_calendar_create_event_tool_dto.py b/src/vapi/types/update_google_calendar_create_event_tool_dto.py new file mode 100644 index 00000000..ece96fdf --- /dev/null +++ b/src/vapi/types/update_google_calendar_create_event_tool_dto.py @@ -0,0 +1,47 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .tool_rejection_plan import ToolRejectionPlan +from .update_google_calendar_create_event_tool_dto_messages_item import ( + UpdateGoogleCalendarCreateEventToolDtoMessagesItem, +) + + +class UpdateGoogleCalendarCreateEventToolDto(UncheckedBaseModel): + messages: typing.Optional[typing.List[UpdateGoogleCalendarCreateEventToolDtoMessagesItem]] = pydantic.Field( + default=None + ) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(UpdateGoogleCalendarCreateEventToolDto) diff --git a/src/vapi/types/update_google_calendar_create_event_tool_dto_messages_item.py b/src/vapi/types/update_google_calendar_create_event_tool_dto_messages_item.py new file mode 100644 index 00000000..c18f529d --- /dev/null +++ b/src/vapi/types/update_google_calendar_create_event_tool_dto_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class UpdateGoogleCalendarCreateEventToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateGoogleCalendarCreateEventToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateGoogleCalendarCreateEventToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateGoogleCalendarCreateEventToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateGoogleCalendarCreateEventToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + UpdateGoogleCalendarCreateEventToolDtoMessagesItem_RequestStart, + UpdateGoogleCalendarCreateEventToolDtoMessagesItem_RequestComplete, + UpdateGoogleCalendarCreateEventToolDtoMessagesItem_RequestFailed, + UpdateGoogleCalendarCreateEventToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/update_google_calendar_o_auth_2_authorization_credential_dto.py b/src/vapi/types/update_google_calendar_o_auth_2_authorization_credential_dto.py new file mode 100644 index 00000000..60eb0b48 --- /dev/null +++ b/src/vapi/types/update_google_calendar_o_auth_2_authorization_credential_dto.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class UpdateGoogleCalendarOAuth2AuthorizationCredentialDto(UncheckedBaseModel): + authorization_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="authorizationId"), + pydantic.Field(alias="authorizationId", description="The authorization ID for the OAuth2 authorization"), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/update_google_calendar_o_auth_2_client_credential_dto.py b/src/vapi/types/update_google_calendar_o_auth_2_client_credential_dto.py new file mode 100644 index 00000000..324ca3f5 --- /dev/null +++ b/src/vapi/types/update_google_calendar_o_auth_2_client_credential_dto.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class UpdateGoogleCalendarOAuth2ClientCredentialDto(UncheckedBaseModel): + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/update_google_credential_dto.py b/src/vapi/types/update_google_credential_dto.py new file mode 100644 index 00000000..3a99b075 --- /dev/null +++ b/src/vapi/types/update_google_credential_dto.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class UpdateGoogleCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/update_google_sheets_o_auth_2_authorization_credential_dto.py b/src/vapi/types/update_google_sheets_o_auth_2_authorization_credential_dto.py new file mode 100644 index 00000000..06bc2b8a --- /dev/null +++ b/src/vapi/types/update_google_sheets_o_auth_2_authorization_credential_dto.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class UpdateGoogleSheetsOAuth2AuthorizationCredentialDto(UncheckedBaseModel): + authorization_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="authorizationId"), + pydantic.Field(alias="authorizationId", description="The authorization ID for the OAuth2 authorization"), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/update_google_sheets_row_append_tool_dto.py b/src/vapi/types/update_google_sheets_row_append_tool_dto.py new file mode 100644 index 00000000..f9eedf8a --- /dev/null +++ b/src/vapi/types/update_google_sheets_row_append_tool_dto.py @@ -0,0 +1,45 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .tool_rejection_plan import ToolRejectionPlan +from .update_google_sheets_row_append_tool_dto_messages_item import UpdateGoogleSheetsRowAppendToolDtoMessagesItem + + +class UpdateGoogleSheetsRowAppendToolDto(UncheckedBaseModel): + messages: typing.Optional[typing.List[UpdateGoogleSheetsRowAppendToolDtoMessagesItem]] = pydantic.Field( + default=None + ) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(UpdateGoogleSheetsRowAppendToolDto) diff --git a/src/vapi/types/update_google_sheets_row_append_tool_dto_messages_item.py b/src/vapi/types/update_google_sheets_row_append_tool_dto_messages_item.py new file mode 100644 index 00000000..5e889fa4 --- /dev/null +++ b/src/vapi/types/update_google_sheets_row_append_tool_dto_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class UpdateGoogleSheetsRowAppendToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateGoogleSheetsRowAppendToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateGoogleSheetsRowAppendToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateGoogleSheetsRowAppendToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateGoogleSheetsRowAppendToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + UpdateGoogleSheetsRowAppendToolDtoMessagesItem_RequestStart, + UpdateGoogleSheetsRowAppendToolDtoMessagesItem_RequestComplete, + UpdateGoogleSheetsRowAppendToolDtoMessagesItem_RequestFailed, + UpdateGoogleSheetsRowAppendToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/update_groq_credential_dto.py b/src/vapi/types/update_groq_credential_dto.py index 1fc04414..7d1f5930 100644 --- a/src/vapi/types/update_groq_credential_dto.py +++ b/src/vapi/types/update_groq_credential_dto.py @@ -1,18 +1,23 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class UpdateGroqCredentialDto(UniversalBaseModel): - provider: typing.Literal["groq"] = "groq" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() +class UpdateGroqCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is not returned in the API. + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/update_handoff_tool_dto.py b/src/vapi/types/update_handoff_tool_dto.py new file mode 100644 index 00000000..f09193e1 --- /dev/null +++ b/src/vapi/types/update_handoff_tool_dto.py @@ -0,0 +1,326 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .open_ai_function import OpenAiFunction +from .tool_rejection_plan import ToolRejectionPlan +from .update_handoff_tool_dto_destinations_item import UpdateHandoffToolDtoDestinationsItem +from .update_handoff_tool_dto_messages_item import UpdateHandoffToolDtoMessagesItem + + +class UpdateHandoffToolDto(UncheckedBaseModel): + messages: typing.Optional[typing.List[UpdateHandoffToolDtoMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + default_result: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="defaultResult"), + pydantic.Field( + alias="defaultResult", + description="This is the default local tool result message used when no runtime handoff result override is returned.", + ), + ] = None + destinations: typing.Optional[typing.List[UpdateHandoffToolDtoDestinationsItem]] = pydantic.Field(default=None) + """ + These are the destinations that the call can be handed off to. + + Usage: + 1. Single destination + + Use `assistantId` to handoff the call to a saved assistant, or `assistantName` to handoff the call to an assistant in the same squad. + + ```json + { + "tools": [ + { + "type": "handoff", + "destinations": [ + { + "type": "assistant", + "assistantId": "assistant-123", // or "assistantName": "Assistant123" + "description": "customer wants to be handed off to assistant-123", + "contextEngineeringPlan": { + "type": "all" + } + } + ], + } + ] + } + ``` + + 2. Multiple destinations + + 2.1. Multiple Tools, Each With One Destination (OpenAI recommended) + + ```json + { + "tools": [ + { + "type": "handoff", + "destinations": [ + { + "type": "assistant", + "assistantId": "assistant-123", + "description": "customer wants to be handed off to assistant-123", + "contextEngineeringPlan": { + "type": "all" + } + }, + ], + }, + { + "type": "handoff", + "destinations": [ + { + "type": "assistant", + "assistantId": "assistant-456", + "description": "customer wants to be handed off to assistant-456", + "contextEngineeringPlan": { + "type": "all" + } + } + ], + } + ] + } + ``` + + 2.2. One Tool, Multiple Destinations (Anthropic recommended) + + ```json + { + "tools": [ + { + "type": "handoff", + "destinations": [ + { + "type": "assistant", + "assistantId": "assistant-123", + "description": "customer wants to be handed off to assistant-123", + "contextEngineeringPlan": { + "type": "all" + } + }, + { + "type": "assistant", + "assistantId": "assistant-456", + "description": "customer wants to be handed off to assistant-456", + "contextEngineeringPlan": { + "type": "all" + } + } + ], + } + ] + } + ``` + + 3. Dynamic destination + + 3.1 To determine the destination dynamically, supply a `dynamic` handoff destination type and a `server` object. + VAPI will send a handoff-destination-request webhook to the `server.url`. + The response from the server will be used as the destination (if valid). + + ```json + { + "tools": [ + { + "type": "handoff", + "destinations": [ + { + "type": "dynamic", + "server": { + "url": "https://example.com" + } + } + ], + } + ] + } + ``` + + 3.2. To pass custom parameters to the server, you can use the `function` object. + + ```json + { + "tools": [ + { + "type": "handoff", + "destinations": [ + { + "type": "dynamic", + "server": { + "url": "https://example.com" + }, + } + ], + "function": { + "name": "handoff", + "description": "Call this function when the customer is ready to be handed off to the next assistant", + "parameters": { + "type": "object", + "properties": { + "destination": { + "type": "string", + "description": "Use dynamic when customer is ready to be handed off to the next assistant", + "enum": ["dynamic"] + }, + "customerAreaCode": { + "type": "number", + "description": "Area code of the customer" + }, + "customerIntent": { + "type": "string", + "enum": ["new-customer", "existing-customer"], + "description": "Use new-customer when customer is a new customer, existing-customer when customer is an existing customer" + }, + "customerSentiment": { + "type": "string", + "enum": ["positive", "negative", "neutral"], + "description": "Use positive when customer is happy, negative when customer is unhappy, neutral when customer is neutral" + } + } + } + } + } + ] + } + ``` + + The properties `customerAreaCode`, `customerIntent`, and `customerSentiment` will be passed to the server in the webhook request body. + """ + + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + function: typing.Optional[OpenAiFunction] = pydantic.Field(default=None) + """ + This is the optional function definition that will be passed to the LLM. + If this is not defined, we will construct this based on the other properties. + + For example, given the following tools definition: + ```json + { + "tools": [ + { + "type": "handoff", + "destinations": [ + { + "type": "assistant", + "assistantId": "assistant-123", + "description": "customer wants to be handed off to assistant-123", + "contextEngineeringPlan": { + "type": "all" + } + }, + { + "type": "assistant", + "assistantId": "assistant-456", + "description": "customer wants to be handed off to assistant-456", + "contextEngineeringPlan": { + "type": "all" + } + } + ], + } + ] + } + ``` + + We will construct the following function definition: + ```json + { + "function": { + "name": "handoff_to_assistant-123", + "description": " + Use this function to handoff the call to the next assistant. + Only use it when instructions explicitly ask you to use the handoff_to_assistant function. + DO NOT call this function unless you are instructed to do so. + Here are the destinations you can handoff the call to: + 1. assistant-123. When: customer wants to be handed off to assistant-123 + 2. assistant-456. When: customer wants to be handed off to assistant-456 + ", + "parameters": { + "type": "object", + "properties": { + "destination": { + "type": "string", + "description": "Options: assistant-123 (customer wants to be handed off to assistant-123), assistant-456 (customer wants to be handed off to assistant-456)", + "enum": ["assistant-123", "assistant-456"] + }, + }, + "required": ["destination"] + } + } + } + ``` + + To override this function, please provide an OpenAI function definition and refer to it in the system prompt. + You may override parts of the function definition (i.e. you may only want to change the function name for your prompt). + If you choose to override the function parameters, it must include `destination` as a required parameter, and it must evaluate to either an assistantId, assistantName, or a the string literal `dynamic`. + + To pass custom parameters to the server in a dynamic handoff, you can use the function parameters, with `dynamic` as the destination. + ```json + { + "function": { + "name": "dynamic_handoff", + "description": " + Call this function when the customer is ready to be handed off to the next assistant + ", + "parameters": { + "type": "object", + "properties": { + "destination": { + "type": "string", + "enum": ["dynamic"] + }, + "customerAreaCode": { + "type": "number", + "description": "Area code of the customer" + }, + "customerIntent": { + "type": "string", + "enum": ["new-customer", "existing-customer"], + "description": "Use new-customer when customer is a new customer, existing-customer when customer is an existing customer" + }, + "customerSentiment": { + "type": "string", + "enum": ["positive", "negative", "neutral"], + "description": "Use positive when customer is happy, negative when customer is unhappy, neutral when customer is neutral" + } + }, + "required": ["destination", "customerAreaCode", "customerIntent", "customerSentiment"] + } + } + } + ``` + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(UpdateHandoffToolDto) diff --git a/src/vapi/types/update_handoff_tool_dto_destinations_item.py b/src/vapi/types/update_handoff_tool_dto_destinations_item.py new file mode 100644 index 00000000..3c7746c2 --- /dev/null +++ b/src/vapi/types/update_handoff_tool_dto_destinations_item.py @@ -0,0 +1,288 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .handoff_destination_assistant_context_engineering_plan import HandoffDestinationAssistantContextEngineeringPlan +from .handoff_destination_squad_context_engineering_plan import HandoffDestinationSquadContextEngineeringPlan +from .server import Server +from .variable_extraction_plan import VariableExtractionPlan + + +class UpdateHandoffToolDtoDestinationsItem_Assistant(UncheckedBaseModel): + type: typing.Literal["assistant"] = "assistant" + context_engineering_plan: typing_extensions.Annotated[ + typing.Optional[HandoffDestinationAssistantContextEngineeringPlan], + FieldMetadata(alias="contextEngineeringPlan"), + pydantic.Field(alias="contextEngineeringPlan"), + ] = None + assistant_name: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantName"), pydantic.Field(alias="assistantName") + ] = None + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="assistantId"), pydantic.Field(alias="assistantId") + ] = None + assistant: typing.Optional["CreateAssistantDto"] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + assistant_overrides: typing_extensions.Annotated[ + typing.Optional["AssistantOverrides"], + FieldMetadata(alias="assistantOverrides"), + pydantic.Field(alias="assistantOverrides"), + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateHandoffToolDtoDestinationsItem_Dynamic(UncheckedBaseModel): + type: typing.Literal["dynamic"] = "dynamic" + server: typing.Optional[Server] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateHandoffToolDtoDestinationsItem_Squad(UncheckedBaseModel): + type: typing.Literal["squad"] = "squad" + context_engineering_plan: typing_extensions.Annotated[ + typing.Optional[HandoffDestinationSquadContextEngineeringPlan], + FieldMetadata(alias="contextEngineeringPlan"), + pydantic.Field(alias="contextEngineeringPlan"), + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="squadId"), pydantic.Field(alias="squadId") + ] = None + squad: typing.Optional["CreateSquadDto"] = None + entry_assistant_name: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="entryAssistantName"), pydantic.Field(alias="entryAssistantName") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + squad_overrides: typing_extensions.Annotated[ + typing.Optional["AssistantOverrides"], + FieldMetadata(alias="squadOverrides"), + pydantic.Field(alias="squadOverrides"), + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateHandoffToolDtoDestinationsItem = typing_extensions.Annotated[ + typing.Union[ + UpdateHandoffToolDtoDestinationsItem_Assistant, + UpdateHandoffToolDtoDestinationsItem_Dynamic, + UpdateHandoffToolDtoDestinationsItem_Squad, + ], + UnionMetadata(discriminant="type"), +] +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 + +update_forward_refs( + UpdateHandoffToolDtoDestinationsItem_Assistant, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs( + UpdateHandoffToolDtoDestinationsItem_Squad, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/update_handoff_tool_dto_messages_item.py b/src/vapi/types/update_handoff_tool_dto_messages_item.py new file mode 100644 index 00000000..f30bc643 --- /dev/null +++ b/src/vapi/types/update_handoff_tool_dto_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class UpdateHandoffToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateHandoffToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateHandoffToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateHandoffToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateHandoffToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + UpdateHandoffToolDtoMessagesItem_RequestStart, + UpdateHandoffToolDtoMessagesItem_RequestComplete, + UpdateHandoffToolDtoMessagesItem_RequestFailed, + UpdateHandoffToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/update_hume_credential_dto.py b/src/vapi/types/update_hume_credential_dto.py new file mode 100644 index 00000000..e28df284 --- /dev/null +++ b/src/vapi/types/update_hume_credential_dto.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class UpdateHumeCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/update_inflection_ai_credential_dto.py b/src/vapi/types/update_inflection_ai_credential_dto.py new file mode 100644 index 00000000..57d5534c --- /dev/null +++ b/src/vapi/types/update_inflection_ai_credential_dto.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class UpdateInflectionAiCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/update_inworld_credential_dto.py b/src/vapi/types/update_inworld_credential_dto.py new file mode 100644 index 00000000..51d06c93 --- /dev/null +++ b/src/vapi/types/update_inworld_credential_dto.py @@ -0,0 +1,33 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class UpdateInworldCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiKey"), + pydantic.Field( + alias="apiKey", + description="This is the Inworld Basic (Base64) authentication token. This is not returned in the API.", + ), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/update_langfuse_credential_dto.py b/src/vapi/types/update_langfuse_credential_dto.py new file mode 100644 index 00000000..f2583e59 --- /dev/null +++ b/src/vapi/types/update_langfuse_credential_dto.py @@ -0,0 +1,43 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class UpdateLangfuseCredentialDto(UncheckedBaseModel): + public_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="publicKey"), + pydantic.Field(alias="publicKey", description="The public key for Langfuse project. Eg: pk-lf-..."), + ] = None + api_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiKey"), + pydantic.Field( + alias="apiKey", + description="The secret key for Langfuse project. Eg: sk-lf-... .This is not returned in the API.", + ), + ] = None + api_url: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiUrl"), + pydantic.Field(alias="apiUrl", description="The host URL for Langfuse project. Eg: https://cloud.langfuse.com"), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/update_line_insight_from_call_table_dto.py b/src/vapi/types/update_line_insight_from_call_table_dto.py new file mode 100644 index 00000000..6100fcbc --- /dev/null +++ b/src/vapi/types/update_line_insight_from_call_table_dto.py @@ -0,0 +1,70 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .insight_formula import InsightFormula +from .insight_time_range_with_step import InsightTimeRangeWithStep +from .line_insight_metadata import LineInsightMetadata +from .update_line_insight_from_call_table_dto_group_by import UpdateLineInsightFromCallTableDtoGroupBy +from .update_line_insight_from_call_table_dto_queries_item import UpdateLineInsightFromCallTableDtoQueriesItem + + +class UpdateLineInsightFromCallTableDto(UncheckedBaseModel): + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the Insight. + """ + + formulas: typing.Optional[typing.List[InsightFormula]] = pydantic.Field(default=None) + """ + Formulas are mathematical expressions applied on the data returned by the queries to transform them before being used to create the insight. + The formulas needs to be a valid mathematical expression, supported by MathJS - https://mathjs.org/docs/expressions/syntax.html + A formula is created by using the query names as the variable. + The formulas must contain at least one query name in the LiquidJS format {{query_name}} or {{['query name']}} which will be substituted with the query result. + For example, if you have 2 queries, 'Was Booking Made' and 'Average Call Duration', you can create a formula like this: + ``` + {{['Query 1']}} / {{['Query 2']}} * 100 + ``` + + ``` + ({{[Query 1]}} * 10) + {{[Query 2]}} + ``` + This will take the + + You can also use the query names as the variable in the formula. + """ + + metadata: typing.Optional[LineInsightMetadata] = pydantic.Field(default=None) + """ + This is the metadata for the insight. + """ + + time_range: typing_extensions.Annotated[ + typing.Optional[InsightTimeRangeWithStep], FieldMetadata(alias="timeRange"), pydantic.Field(alias="timeRange") + ] = None + group_by: typing_extensions.Annotated[ + typing.Optional[UpdateLineInsightFromCallTableDtoGroupBy], + FieldMetadata(alias="groupBy"), + pydantic.Field( + alias="groupBy", + description="This is the group by column for the insight when table is `call`.\nThese are the columns to group the results by.\nAll results are grouped by the time range step by default.", + ), + ] = None + queries: typing.Optional[typing.List[UpdateLineInsightFromCallTableDtoQueriesItem]] = pydantic.Field(default=None) + """ + These are the queries to run to generate the insight. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/update_line_insight_from_call_table_dto_group_by.py b/src/vapi/types/update_line_insight_from_call_table_dto_group_by.py new file mode 100644 index 00000000..a2a29fb1 --- /dev/null +++ b/src/vapi/types/update_line_insight_from_call_table_dto_group_by.py @@ -0,0 +1,18 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +UpdateLineInsightFromCallTableDtoGroupBy = typing.Union[ + typing.Literal[ + "assistantId", + "workflowId", + "squadId", + "phoneNumberId", + "type", + "endedReason", + "customerNumber", + "campaignId", + "artifact.structuredOutputs[OutputID]", + ], + typing.Any, +] diff --git a/src/vapi/types/update_line_insight_from_call_table_dto_queries_item.py b/src/vapi/types/update_line_insight_from_call_table_dto_queries_item.py new file mode 100644 index 00000000..d34c9ff5 --- /dev/null +++ b/src/vapi/types/update_line_insight_from_call_table_dto_queries_item.py @@ -0,0 +1,13 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .json_query_on_call_table_with_number_type_column import JsonQueryOnCallTableWithNumberTypeColumn +from .json_query_on_call_table_with_string_type_column import JsonQueryOnCallTableWithStringTypeColumn +from .json_query_on_call_table_with_structured_output_column import JsonQueryOnCallTableWithStructuredOutputColumn + +UpdateLineInsightFromCallTableDtoQueriesItem = typing.Union[ + JsonQueryOnCallTableWithStringTypeColumn, + JsonQueryOnCallTableWithNumberTypeColumn, + JsonQueryOnCallTableWithStructuredOutputColumn, +] diff --git a/src/vapi/types/update_lmnt_credential_dto.py b/src/vapi/types/update_lmnt_credential_dto.py index e56727a9..fdcc2810 100644 --- a/src/vapi/types/update_lmnt_credential_dto.py +++ b/src/vapi/types/update_lmnt_credential_dto.py @@ -1,18 +1,23 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class UpdateLmntCredentialDto(UniversalBaseModel): - provider: typing.Literal["lmnt"] = "lmnt" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() +class UpdateLmntCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is not returned in the API. + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/update_make_credential_dto.py b/src/vapi/types/update_make_credential_dto.py index e7671114..8452cebe 100644 --- a/src/vapi/types/update_make_credential_dto.py +++ b/src/vapi/types/update_make_credential_dto.py @@ -1,28 +1,31 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class UpdateMakeCredentialDto(UniversalBaseModel): - provider: typing.Literal["make"] = "make" - team_id: typing_extensions.Annotated[str, FieldMetadata(alias="teamId")] = pydantic.Field() - """ - Team ID - """ - - region: str = pydantic.Field() +class UpdateMakeCredentialDto(UncheckedBaseModel): + team_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="teamId"), pydantic.Field(alias="teamId", description="Team ID") + ] = None + region: typing.Optional[str] = pydantic.Field(default=None) """ Region of your application. For example: eu1, eu2, us1, us2 """ - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() + api_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is not returned in the API. + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/update_make_tool_dto.py b/src/vapi/types/update_make_tool_dto.py new file mode 100644 index 00000000..7d443d55 --- /dev/null +++ b/src/vapi/types/update_make_tool_dto.py @@ -0,0 +1,45 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .make_tool_metadata import MakeToolMetadata +from .tool_rejection_plan import ToolRejectionPlan +from .update_make_tool_dto_messages_item import UpdateMakeToolDtoMessagesItem + + +class UpdateMakeToolDto(UncheckedBaseModel): + messages: typing.Optional[typing.List[UpdateMakeToolDtoMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + metadata: typing.Optional[MakeToolMetadata] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(UpdateMakeToolDto) diff --git a/src/vapi/types/update_make_tool_dto_messages_item.py b/src/vapi/types/update_make_tool_dto_messages_item.py new file mode 100644 index 00000000..d4da2ded --- /dev/null +++ b/src/vapi/types/update_make_tool_dto_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class UpdateMakeToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateMakeToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateMakeToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateMakeToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateMakeToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + UpdateMakeToolDtoMessagesItem_RequestStart, + UpdateMakeToolDtoMessagesItem_RequestComplete, + UpdateMakeToolDtoMessagesItem_RequestFailed, + UpdateMakeToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/update_mcp_tool_dto.py b/src/vapi/types/update_mcp_tool_dto.py new file mode 100644 index 00000000..4daf5205 --- /dev/null +++ b/src/vapi/types/update_mcp_tool_dto.py @@ -0,0 +1,68 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .mcp_tool_messages import McpToolMessages +from .mcp_tool_metadata import McpToolMetadata +from .server import Server +from .tool_rejection_plan import ToolRejectionPlan +from .update_mcp_tool_dto_messages_item import UpdateMcpToolDtoMessagesItem + + +class UpdateMcpToolDto(UncheckedBaseModel): + messages: typing.Optional[typing.List[UpdateMcpToolDtoMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + server: typing.Optional[Server] = pydantic.Field(default=None) + """ + + This is the server where a `tool-calls` webhook will be sent. + + Notes: + - Webhook is sent to this server when a tool call is made. + - Webhook contains the call, assistant, and phone number objects. + - Webhook contains the variables set on the assistant. + - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}. + - Webhook expects a response with tool call result. + """ + + tool_messages: typing_extensions.Annotated[ + typing.Optional[typing.List[McpToolMessages]], + FieldMetadata(alias="toolMessages"), + pydantic.Field( + alias="toolMessages", + description="Per-tool message overrides for individual tools loaded from the MCP server. Set messages to an empty array to suppress messages for a specific tool. Tools not listed here will use the default messages from the parent tool.", + ), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + metadata: typing.Optional[McpToolMetadata] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(UpdateMcpToolDto) diff --git a/src/vapi/types/update_mcp_tool_dto_messages_item.py b/src/vapi/types/update_mcp_tool_dto_messages_item.py new file mode 100644 index 00000000..29095393 --- /dev/null +++ b/src/vapi/types/update_mcp_tool_dto_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class UpdateMcpToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateMcpToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateMcpToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateMcpToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateMcpToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + UpdateMcpToolDtoMessagesItem_RequestStart, + UpdateMcpToolDtoMessagesItem_RequestComplete, + UpdateMcpToolDtoMessagesItem_RequestFailed, + UpdateMcpToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/update_mistral_credential_dto.py b/src/vapi/types/update_mistral_credential_dto.py new file mode 100644 index 00000000..32a307df --- /dev/null +++ b/src/vapi/types/update_mistral_credential_dto.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class UpdateMistralCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/update_neuphonic_credential_dto.py b/src/vapi/types/update_neuphonic_credential_dto.py new file mode 100644 index 00000000..ccfcba3c --- /dev/null +++ b/src/vapi/types/update_neuphonic_credential_dto.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class UpdateNeuphonicCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/update_open_ai_credential_dto.py b/src/vapi/types/update_open_ai_credential_dto.py index 023cdc86..a1d2acb1 100644 --- a/src/vapi/types/update_open_ai_credential_dto.py +++ b/src/vapi/types/update_open_ai_credential_dto.py @@ -1,18 +1,23 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class UpdateOpenAiCredentialDto(UniversalBaseModel): - provider: typing.Literal["openai"] = "openai" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() +class UpdateOpenAiCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is not returned in the API. + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/update_open_router_credential_dto.py b/src/vapi/types/update_open_router_credential_dto.py index c6f5ec8e..2de1f850 100644 --- a/src/vapi/types/update_open_router_credential_dto.py +++ b/src/vapi/types/update_open_router_credential_dto.py @@ -1,18 +1,23 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class UpdateOpenRouterCredentialDto(UniversalBaseModel): - provider: typing.Literal["openrouter"] = "openrouter" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() +class UpdateOpenRouterCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is not returned in the API. + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/update_org_dto.py b/src/vapi/types/update_org_dto.py index ec2d05a9..aabdaa9a 100644 --- a/src/vapi/types/update_org_dto.py +++ b/src/vapi/types/update_org_dto.py @@ -1,57 +1,76 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions import typing -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .compliance_plan import CompliancePlan +from .server import Server +from .update_org_dto_channel import UpdateOrgDtoChannel -class UpdateOrgDto(UniversalBaseModel): - hipaa_enabled: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="hipaaEnabled")] = ( - pydantic.Field(default=None) - ) - """ - When this is enabled, no logs, recordings, or transcriptions will be stored. At the end of the call, you will still receive an end-of-call-report message to store on your server. Defaults to false. - When HIPAA is enabled, only OpenAI/Custom LLM or Azure Providers will be available for LLM and Voice respectively. - This is due to the compliance requirements of HIPAA. Other providers may not meet these requirements. - """ - +class UpdateOrgDto(UncheckedBaseModel): + hipaa_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="hipaaEnabled"), + pydantic.Field( + alias="hipaaEnabled", + description="When this is enabled, logs, recordings, and transcriptions will be stored in HIPAA-compliant storage. Defaults to false.\nWhen HIPAA is enabled, only HIPAA-compliant providers will be available for LLM, Voice, and Transcriber respectively.\nThis is due to the compliance requirements of HIPAA. Other providers may not meet these requirements.", + ), + ] = None + subscription_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="subscriptionId"), + pydantic.Field(alias="subscriptionId", description="This is the ID of the subscription the org belongs to."), + ] = None name: typing.Optional[str] = pydantic.Field(default=None) """ This is the name of the org. This is just for your own reference. """ - billing_limit: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="billingLimit")] = ( - pydantic.Field(default=None) - ) + channel: typing.Optional[UpdateOrgDtoChannel] = pydantic.Field(default=None) """ - This is the monthly billing limit for the org. To go beyond $1000/mo, please contact us at support@vapi.ai. + This is the channel of the org. There is the cluster the API traffic for the org will be directed. """ - server_url: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="serverUrl")] = pydantic.Field( - default=None - ) + billing_limit: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="billingLimit"), + pydantic.Field( + alias="billingLimit", + description="This is the monthly billing limit for the org. To go beyond $1000/mo, please contact us at support@vapi.ai.", + ), + ] = None + server: typing.Optional[Server] = pydantic.Field(default=None) """ - This is the URL Vapi will communicate with via HTTP GET and POST Requests. This is used for retrieving context, function calling, and end-of-call reports. + This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema. - All requests will be sent with the call object among other things relevant to that message. You can find more details in the Server URL documentation. - """ - - server_url_secret: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="serverUrlSecret")] = ( - pydantic.Field(default=None) - ) - """ - This is the secret you can set that Vapi will send with every request to your server. Will be sent as a header called x-vapi-secret. + The order of precedence is: + + 1. assistant.server + 2. phoneNumber.server + 3. org.server """ - concurrency_limit: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="concurrencyLimit")] = ( - pydantic.Field(default=None) - ) - """ - This is the concurrency limit for the org. This is the maximum number of calls that can be active at any given time. To go beyond 10, please contact us at support@vapi.ai. - """ + concurrency_limit: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="concurrencyLimit"), + pydantic.Field( + alias="concurrencyLimit", + description="This is the concurrency limit for the org. This is the maximum number of calls that can be active at any given time. To go beyond 10, please contact us at support@vapi.ai.", + ), + ] = None + compliance_plan: typing_extensions.Annotated[ + typing.Optional[CompliancePlan], + FieldMetadata(alias="compliancePlan"), + pydantic.Field( + alias="compliancePlan", + description="Stores the information about the compliance plan enforced at the organization level. Currently pciEnabled is supported through this field.\nWhen this is enabled, any logs, recordings, or transcriptions will be shipped to the customer endpoints if provided else lost.\nAt the end of the call, you will receive an end-of-call-report message to store on your server, if webhook is provided.\nDefaults to false.\nWhen PCI is enabled, only PCI-compliant Providers will be available for LLM, Voice and transcribers.\nThis is due to the compliance requirements of PCI. Other providers may not meet these requirements.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/update_org_dto_channel.py b/src/vapi/types/update_org_dto_channel.py new file mode 100644 index 00000000..7c6c9dec --- /dev/null +++ b/src/vapi/types/update_org_dto_channel.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +UpdateOrgDtoChannel = typing.Union[typing.Literal["daily", "default", "weekly", "intuit", "hcs"], typing.Any] diff --git a/src/vapi/types/update_output_tool_dto.py b/src/vapi/types/update_output_tool_dto.py new file mode 100644 index 00000000..c5eb7246 --- /dev/null +++ b/src/vapi/types/update_output_tool_dto.py @@ -0,0 +1,43 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .tool_rejection_plan import ToolRejectionPlan +from .update_output_tool_dto_messages_item import UpdateOutputToolDtoMessagesItem + + +class UpdateOutputToolDto(UncheckedBaseModel): + messages: typing.Optional[typing.List[UpdateOutputToolDtoMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(UpdateOutputToolDto) diff --git a/src/vapi/types/update_output_tool_dto_messages_item.py b/src/vapi/types/update_output_tool_dto_messages_item.py new file mode 100644 index 00000000..3dab1cd2 --- /dev/null +++ b/src/vapi/types/update_output_tool_dto_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class UpdateOutputToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateOutputToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateOutputToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateOutputToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateOutputToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + UpdateOutputToolDtoMessagesItem_RequestStart, + UpdateOutputToolDtoMessagesItem_RequestComplete, + UpdateOutputToolDtoMessagesItem_RequestFailed, + UpdateOutputToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/update_perplexity_ai_credential_dto.py b/src/vapi/types/update_perplexity_ai_credential_dto.py index 62c91f82..2da84226 100644 --- a/src/vapi/types/update_perplexity_ai_credential_dto.py +++ b/src/vapi/types/update_perplexity_ai_credential_dto.py @@ -1,18 +1,23 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class UpdatePerplexityAiCredentialDto(UniversalBaseModel): - provider: typing.Literal["perplexity-ai"] = "perplexity-ai" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() +class UpdatePerplexityAiCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is not returned in the API. + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/update_personality_dto.py b/src/vapi/types/update_personality_dto.py new file mode 100644 index 00000000..c27c84fa --- /dev/null +++ b/src/vapi/types/update_personality_dto.py @@ -0,0 +1,157 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel + + +class UpdatePersonalityDto(UncheckedBaseModel): + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the personality. + """ + + assistant: typing.Optional["CreateAssistantDto"] = pydantic.Field(default=None) + """ + This is the full assistant configuration for this personality. + """ + + path: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional folder path for organizing personalities. + Supports up to 3 levels (e.g., "dept/feature/variant"). + Set to null to remove from folder. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + UpdatePersonalityDto, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/update_pie_insight_from_call_table_dto.py b/src/vapi/types/update_pie_insight_from_call_table_dto.py new file mode 100644 index 00000000..8221e35d --- /dev/null +++ b/src/vapi/types/update_pie_insight_from_call_table_dto.py @@ -0,0 +1,64 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .insight_formula import InsightFormula +from .insight_time_range import InsightTimeRange +from .update_pie_insight_from_call_table_dto_group_by import UpdatePieInsightFromCallTableDtoGroupBy +from .update_pie_insight_from_call_table_dto_queries_item import UpdatePieInsightFromCallTableDtoQueriesItem + + +class UpdatePieInsightFromCallTableDto(UncheckedBaseModel): + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the Insight. + """ + + formulas: typing.Optional[typing.List[InsightFormula]] = pydantic.Field(default=None) + """ + Formulas are mathematical expressions applied on the data returned by the queries to transform them before being used to create the insight. + The formulas needs to be a valid mathematical expression, supported by MathJS - https://mathjs.org/docs/expressions/syntax.html + A formula is created by using the query names as the variable. + The formulas must contain at least one query name in the LiquidJS format {{query_name}} or {{['query name']}} which will be substituted with the query result. + For example, if you have 2 queries, 'Was Booking Made' and 'Average Call Duration', you can create a formula like this: + ``` + {{['Query 1']}} / {{['Query 2']}} * 100 + ``` + + ``` + ({{[Query 1]}} * 10) + {{[Query 2]}} + ``` + This will take the + + You can also use the query names as the variable in the formula. + """ + + time_range: typing_extensions.Annotated[ + typing.Optional[InsightTimeRange], FieldMetadata(alias="timeRange"), pydantic.Field(alias="timeRange") + ] = None + group_by: typing_extensions.Annotated[ + typing.Optional[UpdatePieInsightFromCallTableDtoGroupBy], + FieldMetadata(alias="groupBy"), + pydantic.Field( + alias="groupBy", + description="This is the group by column for the insight when table is `call`.\nThese are the columns to group the results by.\nAll results are grouped by the time range step by default.", + ), + ] = None + queries: typing.Optional[typing.List[UpdatePieInsightFromCallTableDtoQueriesItem]] = pydantic.Field(default=None) + """ + These are the queries to run to generate the insight. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/update_pie_insight_from_call_table_dto_group_by.py b/src/vapi/types/update_pie_insight_from_call_table_dto_group_by.py new file mode 100644 index 00000000..3cf3c360 --- /dev/null +++ b/src/vapi/types/update_pie_insight_from_call_table_dto_group_by.py @@ -0,0 +1,18 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +UpdatePieInsightFromCallTableDtoGroupBy = typing.Union[ + typing.Literal[ + "assistantId", + "workflowId", + "squadId", + "phoneNumberId", + "type", + "endedReason", + "customerNumber", + "campaignId", + "artifact.structuredOutputs[OutputID]", + ], + typing.Any, +] diff --git a/src/vapi/types/update_pie_insight_from_call_table_dto_queries_item.py b/src/vapi/types/update_pie_insight_from_call_table_dto_queries_item.py new file mode 100644 index 00000000..4520ac31 --- /dev/null +++ b/src/vapi/types/update_pie_insight_from_call_table_dto_queries_item.py @@ -0,0 +1,13 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .json_query_on_call_table_with_number_type_column import JsonQueryOnCallTableWithNumberTypeColumn +from .json_query_on_call_table_with_string_type_column import JsonQueryOnCallTableWithStringTypeColumn +from .json_query_on_call_table_with_structured_output_column import JsonQueryOnCallTableWithStructuredOutputColumn + +UpdatePieInsightFromCallTableDtoQueriesItem = typing.Union[ + JsonQueryOnCallTableWithStringTypeColumn, + JsonQueryOnCallTableWithNumberTypeColumn, + JsonQueryOnCallTableWithStructuredOutputColumn, +] diff --git a/src/vapi/types/update_play_ht_credential_dto.py b/src/vapi/types/update_play_ht_credential_dto.py index eb7c3e42..44ef655b 100644 --- a/src/vapi/types/update_play_ht_credential_dto.py +++ b/src/vapi/types/update_play_ht_credential_dto.py @@ -1,21 +1,28 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class UpdatePlayHtCredentialDto(UniversalBaseModel): - provider: typing.Literal["playht"] = "playht" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() +class UpdatePlayHtCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is not returned in the API. + This is the name of credential. This is just for your reference. """ - user_id: typing_extensions.Annotated[str, FieldMetadata(alias="userId")] + user_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="userId"), pydantic.Field(alias="userId") + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/update_query_tool_dto.py b/src/vapi/types/update_query_tool_dto.py new file mode 100644 index 00000000..3c464c2b --- /dev/null +++ b/src/vapi/types/update_query_tool_dto.py @@ -0,0 +1,49 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .knowledge_base import KnowledgeBase +from .tool_rejection_plan import ToolRejectionPlan +from .update_query_tool_dto_messages_item import UpdateQueryToolDtoMessagesItem + + +class UpdateQueryToolDto(UncheckedBaseModel): + messages: typing.Optional[typing.List[UpdateQueryToolDtoMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + knowledge_bases: typing_extensions.Annotated[ + typing.Optional[typing.List[KnowledgeBase]], + FieldMetadata(alias="knowledgeBases"), + pydantic.Field(alias="knowledgeBases", description="The knowledge bases to query"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(UpdateQueryToolDto) diff --git a/src/vapi/types/update_query_tool_dto_messages_item.py b/src/vapi/types/update_query_tool_dto_messages_item.py new file mode 100644 index 00000000..862208c2 --- /dev/null +++ b/src/vapi/types/update_query_tool_dto_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class UpdateQueryToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateQueryToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateQueryToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateQueryToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateQueryToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + UpdateQueryToolDtoMessagesItem_RequestStart, + UpdateQueryToolDtoMessagesItem_RequestComplete, + UpdateQueryToolDtoMessagesItem_RequestFailed, + UpdateQueryToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/update_rime_ai_credential_dto.py b/src/vapi/types/update_rime_ai_credential_dto.py index 250ffab9..05e8bcd5 100644 --- a/src/vapi/types/update_rime_ai_credential_dto.py +++ b/src/vapi/types/update_rime_ai_credential_dto.py @@ -1,18 +1,23 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class UpdateRimeAiCredentialDto(UniversalBaseModel): - provider: typing.Literal["rime-ai"] = "rime-ai" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() +class UpdateRimeAiCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is not returned in the API. + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/update_runpod_credential_dto.py b/src/vapi/types/update_runpod_credential_dto.py index b060c809..2855a7ad 100644 --- a/src/vapi/types/update_runpod_credential_dto.py +++ b/src/vapi/types/update_runpod_credential_dto.py @@ -1,18 +1,23 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class UpdateRunpodCredentialDto(UniversalBaseModel): - provider: typing.Literal["runpod"] = "runpod" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() +class UpdateRunpodCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is not returned in the API. + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/update_s_3_credential_dto.py b/src/vapi/types/update_s_3_credential_dto.py index 196595b9..cb462d9f 100644 --- a/src/vapi/types/update_s_3_credential_dto.py +++ b/src/vapi/types/update_s_3_credential_dto.py @@ -1,44 +1,55 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing + import pydantic import typing_extensions -from ..core.serialization import FieldMetadata from ..core.pydantic_utilities import IS_PYDANTIC_V2 - - -class UpdateS3CredentialDto(UniversalBaseModel): - provider: typing.Literal["s3"] = pydantic.Field(default="s3") - """ - Credential provider. Only allowed value is s3 - """ - - aws_access_key_id: typing_extensions.Annotated[str, FieldMetadata(alias="awsAccessKeyId")] = pydantic.Field() - """ - AWS access key ID. - """ - - aws_secret_access_key: typing_extensions.Annotated[str, FieldMetadata(alias="awsSecretAccessKey")] = ( - pydantic.Field() - ) - """ - AWS access key secret. This is not returned in the API. - """ - - region: str = pydantic.Field() +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class UpdateS3CredentialDto(UncheckedBaseModel): + aws_access_key_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="awsAccessKeyId"), + pydantic.Field(alias="awsAccessKeyId", description="AWS access key ID."), + ] = None + aws_secret_access_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="awsSecretAccessKey"), + pydantic.Field( + alias="awsSecretAccessKey", description="AWS access key secret. This is not returned in the API." + ), + ] = None + region: typing.Optional[str] = pydantic.Field(default=None) """ AWS region in which the S3 bucket is located. """ - s_3_bucket_name: typing_extensions.Annotated[str, FieldMetadata(alias="s3BucketName")] = pydantic.Field() - """ - AWS S3 bucket name. - """ - - s_3_path_prefix: typing_extensions.Annotated[str, FieldMetadata(alias="s3PathPrefix")] = pydantic.Field() - """ - The path prefix for the uploaded recording. Ex. "recordings/" + s_3_bucket_name: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="s3BucketName"), + pydantic.Field(alias="s3BucketName", description="AWS S3 bucket name."), + ] = None + s_3_path_prefix: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="s3PathPrefix"), + pydantic.Field( + alias="s3PathPrefix", description='The path prefix for the uploaded recording. Ex. "recordings/"' + ), + ] = None + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="fallbackIndex"), + pydantic.Field( + alias="fallbackIndex", + description="This is the order in which this storage provider is tried during upload retries. Lower numbers are tried first in increasing order.", + ), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/update_scenario_dto.py b/src/vapi/types/update_scenario_dto.py new file mode 100644 index 00000000..2239df6d --- /dev/null +++ b/src/vapi/types/update_scenario_dto.py @@ -0,0 +1,185 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .evaluation_plan_item import EvaluationPlanItem +from .scenario_tool_mock import ScenarioToolMock +from .update_scenario_dto_hooks_item import UpdateScenarioDtoHooksItem + + +class UpdateScenarioDto(UncheckedBaseModel): + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the scenario. + """ + + instructions: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the script/instructions for the tester to follow during the simulation. + """ + + evaluations: typing.Optional[typing.List[EvaluationPlanItem]] = pydantic.Field(default=None) + """ + This is the structured output-based evaluation plan for the simulation. + Each item defines a structured output to extract and evaluate against an expected value. + """ + + hooks: typing.Optional[typing.List[UpdateScenarioDtoHooksItem]] = pydantic.Field(default=None) + """ + Hooks to run on simulation lifecycle events + """ + + target_overrides: typing_extensions.Annotated[ + typing.Optional["AssistantOverrides"], + FieldMetadata(alias="targetOverrides"), + pydantic.Field( + alias="targetOverrides", description="Overrides to inject into the simulated target assistant or squad" + ), + ] = None + tool_mocks: typing_extensions.Annotated[ + typing.Optional[typing.List[ScenarioToolMock]], + FieldMetadata(alias="toolMocks"), + pydantic.Field(alias="toolMocks"), + ] = None + path: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional folder path for organizing scenarios. + Supports up to 3 levels (e.g., "dept/feature/variant"). + Set to null to remove from folder. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + UpdateScenarioDto, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/update_scenario_dto_hooks_item.py b/src/vapi/types/update_scenario_dto_hooks_item.py new file mode 100644 index 00000000..6843d662 --- /dev/null +++ b/src/vapi/types/update_scenario_dto_hooks_item.py @@ -0,0 +1,45 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .simulation_hook_webhook_action import SimulationHookWebhookAction + + +class UpdateScenarioDtoHooksItem_SimulationRunStarted(UncheckedBaseModel): + on: typing.Literal["simulation.run.started"] = "simulation.run.started" + do: typing.List[SimulationHookWebhookAction] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateScenarioDtoHooksItem_SimulationRunEnded(UncheckedBaseModel): + on: typing.Literal["simulation.run.ended"] = "simulation.run.ended" + do: typing.List[SimulationHookWebhookAction] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateScenarioDtoHooksItem = typing_extensions.Annotated[ + typing.Union[UpdateScenarioDtoHooksItem_SimulationRunStarted, UpdateScenarioDtoHooksItem_SimulationRunEnded], + UnionMetadata(discriminant="on"), +] diff --git a/src/vapi/types/update_simulation_dto.py b/src/vapi/types/update_simulation_dto.py new file mode 100644 index 00000000..c375b41b --- /dev/null +++ b/src/vapi/types/update_simulation_dto.py @@ -0,0 +1,44 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class UpdateSimulationDto(UncheckedBaseModel): + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is an optional friendly name for the simulation. + """ + + scenario_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="scenarioId"), + pydantic.Field(alias="scenarioId", description="This is the ID of the scenario to use for this simulation."), + ] = None + personality_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="personalityId"), + pydantic.Field( + alias="personalityId", description="This is the ID of the personality to use for this simulation." + ), + ] = None + path: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional folder path for organizing simulations. + Supports up to 3 levels (e.g., "dept/feature/variant"). + Set to null to remove from folder. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/update_simulation_suite_dto.py b/src/vapi/types/update_simulation_suite_dto.py new file mode 100644 index 00000000..9ef7fa8e --- /dev/null +++ b/src/vapi/types/update_simulation_suite_dto.py @@ -0,0 +1,45 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class UpdateSimulationSuiteDto(UncheckedBaseModel): + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the simulation suite. + """ + + slack_webhook_url: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="slackWebhookUrl"), + pydantic.Field(alias="slackWebhookUrl", description="This is the Slack webhook URL for notifications."), + ] = None + simulation_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="simulationIds"), + pydantic.Field( + alias="simulationIds", + description="This is the list of simulation IDs to include in the suite (replaces existing).", + ), + ] = None + path: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional folder path for organizing simulation suites. + Supports up to 3 levels (e.g., "dept/feature/variant"). + Set to null to remove from folder. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/update_sip_request_tool_dto.py b/src/vapi/types/update_sip_request_tool_dto.py new file mode 100644 index 00000000..1b3ab8c0 --- /dev/null +++ b/src/vapi/types/update_sip_request_tool_dto.py @@ -0,0 +1,62 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .tool_rejection_plan import ToolRejectionPlan +from .update_sip_request_tool_dto_body import UpdateSipRequestToolDtoBody +from .update_sip_request_tool_dto_messages_item import UpdateSipRequestToolDtoMessagesItem +from .update_sip_request_tool_dto_verb import UpdateSipRequestToolDtoVerb + + +class UpdateSipRequestToolDto(UncheckedBaseModel): + messages: typing.Optional[typing.List[UpdateSipRequestToolDtoMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + verb: typing.Optional[UpdateSipRequestToolDtoVerb] = pydantic.Field(default=None) + """ + The SIP method to send. + """ + + headers: typing.Optional["JsonSchema"] = pydantic.Field(default=None) + """ + JSON schema for headers the model should populate when sending the SIP request. + """ + + body: typing.Optional[UpdateSipRequestToolDtoBody] = pydantic.Field(default=None) + """ + Body to include in the SIP request. Either a literal string body, or a JSON schema describing a structured body that the model should populate. + """ + + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .json_schema import JsonSchema # noqa: E402, I001 + +update_forward_refs(UpdateSipRequestToolDto, JsonSchema=JsonSchema) diff --git a/src/vapi/types/update_sip_request_tool_dto_body.py b/src/vapi/types/update_sip_request_tool_dto_body.py new file mode 100644 index 00000000..33f5ee18 --- /dev/null +++ b/src/vapi/types/update_sip_request_tool_dto_body.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .json_schema import JsonSchema + +UpdateSipRequestToolDtoBody = typing.Union[str, JsonSchema] diff --git a/src/vapi/types/update_sip_request_tool_dto_messages_item.py b/src/vapi/types/update_sip_request_tool_dto_messages_item.py new file mode 100644 index 00000000..1c8df59e --- /dev/null +++ b/src/vapi/types/update_sip_request_tool_dto_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class UpdateSipRequestToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateSipRequestToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateSipRequestToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateSipRequestToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateSipRequestToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + UpdateSipRequestToolDtoMessagesItem_RequestStart, + UpdateSipRequestToolDtoMessagesItem_RequestComplete, + UpdateSipRequestToolDtoMessagesItem_RequestFailed, + UpdateSipRequestToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/update_sip_request_tool_dto_verb.py b/src/vapi/types/update_sip_request_tool_dto_verb.py new file mode 100644 index 00000000..f349fca7 --- /dev/null +++ b/src/vapi/types/update_sip_request_tool_dto_verb.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +UpdateSipRequestToolDtoVerb = typing.Union[typing.Literal["INFO", "MESSAGE", "NOTIFY"], typing.Any] diff --git a/src/vapi/types/update_slack_o_auth_2_authorization_credential_dto.py b/src/vapi/types/update_slack_o_auth_2_authorization_credential_dto.py new file mode 100644 index 00000000..07aa71f4 --- /dev/null +++ b/src/vapi/types/update_slack_o_auth_2_authorization_credential_dto.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class UpdateSlackOAuth2AuthorizationCredentialDto(UncheckedBaseModel): + authorization_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="authorizationId"), + pydantic.Field(alias="authorizationId", description="The authorization ID for the OAuth2 authorization"), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/update_slack_send_message_tool_dto.py b/src/vapi/types/update_slack_send_message_tool_dto.py new file mode 100644 index 00000000..b55e40f4 --- /dev/null +++ b/src/vapi/types/update_slack_send_message_tool_dto.py @@ -0,0 +1,43 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .tool_rejection_plan import ToolRejectionPlan +from .update_slack_send_message_tool_dto_messages_item import UpdateSlackSendMessageToolDtoMessagesItem + + +class UpdateSlackSendMessageToolDto(UncheckedBaseModel): + messages: typing.Optional[typing.List[UpdateSlackSendMessageToolDtoMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(UpdateSlackSendMessageToolDto) diff --git a/src/vapi/types/update_slack_send_message_tool_dto_messages_item.py b/src/vapi/types/update_slack_send_message_tool_dto_messages_item.py new file mode 100644 index 00000000..a4ced658 --- /dev/null +++ b/src/vapi/types/update_slack_send_message_tool_dto_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class UpdateSlackSendMessageToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateSlackSendMessageToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateSlackSendMessageToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateSlackSendMessageToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateSlackSendMessageToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + UpdateSlackSendMessageToolDtoMessagesItem_RequestStart, + UpdateSlackSendMessageToolDtoMessagesItem_RequestComplete, + UpdateSlackSendMessageToolDtoMessagesItem_RequestFailed, + UpdateSlackSendMessageToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/update_slack_webhook_credential_dto.py b/src/vapi/types/update_slack_webhook_credential_dto.py new file mode 100644 index 00000000..1b423bfd --- /dev/null +++ b/src/vapi/types/update_slack_webhook_credential_dto.py @@ -0,0 +1,33 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class UpdateSlackWebhookCredentialDto(UncheckedBaseModel): + webhook_url: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="webhookUrl"), + pydantic.Field( + alias="webhookUrl", + description="Slack incoming webhook URL. See https://api.slack.com/messaging/webhooks for setup instructions. This is not returned in the API.", + ), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/update_sms_tool_dto.py b/src/vapi/types/update_sms_tool_dto.py new file mode 100644 index 00000000..d7a32a7e --- /dev/null +++ b/src/vapi/types/update_sms_tool_dto.py @@ -0,0 +1,43 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .tool_rejection_plan import ToolRejectionPlan +from .update_sms_tool_dto_messages_item import UpdateSmsToolDtoMessagesItem + + +class UpdateSmsToolDto(UncheckedBaseModel): + messages: typing.Optional[typing.List[UpdateSmsToolDtoMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(UpdateSmsToolDto) diff --git a/src/vapi/types/update_sms_tool_dto_messages_item.py b/src/vapi/types/update_sms_tool_dto_messages_item.py new file mode 100644 index 00000000..fabf5c8f --- /dev/null +++ b/src/vapi/types/update_sms_tool_dto_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class UpdateSmsToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateSmsToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateSmsToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateSmsToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateSmsToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + UpdateSmsToolDtoMessagesItem_RequestStart, + UpdateSmsToolDtoMessagesItem_RequestComplete, + UpdateSmsToolDtoMessagesItem_RequestFailed, + UpdateSmsToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/update_soniox_credential_dto.py b/src/vapi/types/update_soniox_credential_dto.py new file mode 100644 index 00000000..f0553d34 --- /dev/null +++ b/src/vapi/types/update_soniox_credential_dto.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class UpdateSonioxCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/update_telnyx_phone_number_dto.py b/src/vapi/types/update_telnyx_phone_number_dto.py new file mode 100644 index 00000000..ecba1493 --- /dev/null +++ b/src/vapi/types/update_telnyx_phone_number_dto.py @@ -0,0 +1,90 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .server import Server +from .update_telnyx_phone_number_dto_fallback_destination import UpdateTelnyxPhoneNumberDtoFallbackDestination +from .update_telnyx_phone_number_dto_hooks_item import UpdateTelnyxPhoneNumberDtoHooksItem + + +class UpdateTelnyxPhoneNumberDto(UncheckedBaseModel): + fallback_destination: typing_extensions.Annotated[ + typing.Optional[UpdateTelnyxPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field( + alias="fallbackDestination", + description="This is the fallback destination an inbound call will be transferred to if:\n1. `assistantId` is not set\n2. `squadId` is not set\n3. and, `assistant-request` message to the `serverUrl` fails\n\nIf this is not set and above conditions are met, the inbound call is hung up with an error message.", + ), + ] = None + hooks: typing.Optional[typing.List[UpdateTelnyxPhoneNumberDtoHooksItem]] = pydantic.Field(default=None) + """ + This is the hooks that will be used for incoming calls to this phone number. + """ + + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the phone number. This is just for your own reference. + """ + + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assistantId"), + pydantic.Field( + alias="assistantId", + description="This is the assistant that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="workflowId"), + pydantic.Field( + alias="workflowId", + description="This is the workflow that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="squadId"), + pydantic.Field( + alias="squadId", + description="This is the squad that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + server: typing.Optional[Server] = pydantic.Field(default=None) + """ + This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema. + + The order of precedence is: + + 1. assistant.server + 2. phoneNumber.server + 3. org.server + """ + + number: typing.Optional[str] = pydantic.Field(default=None) + """ + These are the digits of the phone number you own on your Telnyx. + """ + + credential_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="credentialId"), + pydantic.Field( + alias="credentialId", + description="This is the credential you added in dashboard.vapi.ai/keys. This is used to configure the number to send inbound calls to Vapi, make outbound calls and do live call updates like transfers and hangups.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/update_telnyx_phone_number_dto_fallback_destination.py b/src/vapi/types/update_telnyx_phone_number_dto_fallback_destination.py new file mode 100644 index 00000000..40086cac --- /dev/null +++ b/src/vapi/types/update_telnyx_phone_number_dto_fallback_destination.py @@ -0,0 +1,95 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .transfer_destination_number_message import TransferDestinationNumberMessage +from .transfer_destination_sip_message import TransferDestinationSipMessage +from .transfer_plan import TransferPlan + + +class UpdateTelnyxPhoneNumberDtoFallbackDestination_Number(UncheckedBaseModel): + """ + This is the fallback destination an inbound call will be transferred to if: + 1. `assistantId` is not set + 2. `squadId` is not set + 3. and, `assistant-request` message to the `serverUrl` fails + + If this is not set and above conditions are met, the inbound call is hung up with an error message. + """ + + type: typing.Literal["number"] = "number" + message: typing.Optional[TransferDestinationNumberMessage] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: str + extension: typing.Optional[str] = None + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateTelnyxPhoneNumberDtoFallbackDestination_Sip(UncheckedBaseModel): + """ + This is the fallback destination an inbound call will be transferred to if: + 1. `assistantId` is not set + 2. `squadId` is not set + 3. and, `assistant-request` message to the `serverUrl` fails + + If this is not set and above conditions are met, the inbound call is hung up with an error message. + """ + + type: typing.Literal["sip"] = "sip" + message: typing.Optional[TransferDestinationSipMessage] = None + sip_uri: typing_extensions.Annotated[str, FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri")] + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + sip_headers: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="sipHeaders"), + pydantic.Field(alias="sipHeaders"), + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateTelnyxPhoneNumberDtoFallbackDestination = typing_extensions.Annotated[ + typing.Union[ + UpdateTelnyxPhoneNumberDtoFallbackDestination_Number, UpdateTelnyxPhoneNumberDtoFallbackDestination_Sip + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/update_telnyx_phone_number_dto_hooks_item.py b/src/vapi/types/update_telnyx_phone_number_dto_hooks_item.py new file mode 100644 index 00000000..128d8fac --- /dev/null +++ b/src/vapi/types/update_telnyx_phone_number_dto_hooks_item.py @@ -0,0 +1,50 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .phone_number_call_ending_hook_filter import PhoneNumberCallEndingHookFilter +from .phone_number_call_ringing_hook_filter import PhoneNumberCallRingingHookFilter +from .phone_number_hook_call_ending_do import PhoneNumberHookCallEndingDo +from .phone_number_hook_call_ringing_do_item import PhoneNumberHookCallRingingDoItem + + +class UpdateTelnyxPhoneNumberDtoHooksItem_CallRinging(UncheckedBaseModel): + on: typing.Literal["call.ringing"] = "call.ringing" + filters: typing.Optional[typing.List[PhoneNumberCallRingingHookFilter]] = None + do: typing.List[PhoneNumberHookCallRingingDoItem] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateTelnyxPhoneNumberDtoHooksItem_CallEnding(UncheckedBaseModel): + on: typing.Literal["call.ending"] = "call.ending" + filters: typing.Optional[typing.List[PhoneNumberCallEndingHookFilter]] = None + do: typing.Optional[PhoneNumberHookCallEndingDo] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateTelnyxPhoneNumberDtoHooksItem = typing_extensions.Annotated[ + typing.Union[UpdateTelnyxPhoneNumberDtoHooksItem_CallRinging, UpdateTelnyxPhoneNumberDtoHooksItem_CallEnding], + UnionMetadata(discriminant="on"), +] diff --git a/src/vapi/types/update_test_suite_dto.py b/src/vapi/types/update_test_suite_dto.py new file mode 100644 index 00000000..675c1af6 --- /dev/null +++ b/src/vapi/types/update_test_suite_dto.py @@ -0,0 +1,56 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .target_plan import TargetPlan +from .tester_plan import TesterPlan + + +class UpdateTestSuiteDto(UncheckedBaseModel): + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the test suite. + """ + + phone_number_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="phoneNumberId"), + pydantic.Field( + alias="phoneNumberId", description="This is the phone number ID associated with this test suite." + ), + ] = None + tester_plan: typing_extensions.Annotated[ + typing.Optional[TesterPlan], + FieldMetadata(alias="testerPlan"), + pydantic.Field( + alias="testerPlan", + description="Override the default tester plan by providing custom assistant configuration for the test agent.\n\nWe recommend only using this if you are confident, as we have already set sensible defaults on the tester plan.", + ), + ] = None + target_plan: typing_extensions.Annotated[ + typing.Optional[TargetPlan], + FieldMetadata(alias="targetPlan"), + pydantic.Field( + alias="targetPlan", + description="These are the configuration for the assistant / phone number that is being tested.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(UpdateTestSuiteDto) diff --git a/src/vapi/types/update_test_suite_run_dto.py b/src/vapi/types/update_test_suite_run_dto.py new file mode 100644 index 00000000..d8e26dff --- /dev/null +++ b/src/vapi/types/update_test_suite_run_dto.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class UpdateTestSuiteRunDto(UncheckedBaseModel): + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the test suite run. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/update_test_suite_test_chat_dto.py b/src/vapi/types/update_test_suite_test_chat_dto.py new file mode 100644 index 00000000..08402023 --- /dev/null +++ b/src/vapi/types/update_test_suite_test_chat_dto.py @@ -0,0 +1,48 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .test_suite_test_scorer_ai import TestSuiteTestScorerAi +from .update_test_suite_test_chat_dto_type import UpdateTestSuiteTestChatDtoType + + +class UpdateTestSuiteTestChatDto(UncheckedBaseModel): + scorers: typing.Optional[typing.List[TestSuiteTestScorerAi]] = pydantic.Field(default=None) + """ + These are the scorers used to evaluate the test. + """ + + type: typing.Optional[UpdateTestSuiteTestChatDtoType] = pydantic.Field(default=None) + """ + This is the type of the test, which must be chat. + """ + + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the test. + """ + + script: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the script to be used for the chat test. + """ + + num_attempts: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="numAttempts"), + pydantic.Field(alias="numAttempts", description="This is the number of attempts allowed for the test."), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/update_test_suite_test_chat_dto_type.py b/src/vapi/types/update_test_suite_test_chat_dto_type.py new file mode 100644 index 00000000..680cf9e4 --- /dev/null +++ b/src/vapi/types/update_test_suite_test_chat_dto_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +UpdateTestSuiteTestChatDtoType = typing.Union[typing.Literal["chat"], typing.Any] diff --git a/src/vapi/types/update_test_suite_test_voice_dto.py b/src/vapi/types/update_test_suite_test_voice_dto.py new file mode 100644 index 00000000..d455bd91 --- /dev/null +++ b/src/vapi/types/update_test_suite_test_voice_dto.py @@ -0,0 +1,48 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .test_suite_test_scorer_ai import TestSuiteTestScorerAi +from .update_test_suite_test_voice_dto_type import UpdateTestSuiteTestVoiceDtoType + + +class UpdateTestSuiteTestVoiceDto(UncheckedBaseModel): + scorers: typing.Optional[typing.List[TestSuiteTestScorerAi]] = pydantic.Field(default=None) + """ + These are the scorers used to evaluate the test. + """ + + type: typing.Optional[UpdateTestSuiteTestVoiceDtoType] = pydantic.Field(default=None) + """ + This is the type of the test, which must be voice. + """ + + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the test. + """ + + script: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the script to be used for the voice test. + """ + + num_attempts: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="numAttempts"), + pydantic.Field(alias="numAttempts", description="This is the number of attempts allowed for the test."), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/update_test_suite_test_voice_dto_type.py b/src/vapi/types/update_test_suite_test_voice_dto_type.py new file mode 100644 index 00000000..485121c1 --- /dev/null +++ b/src/vapi/types/update_test_suite_test_voice_dto_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +UpdateTestSuiteTestVoiceDtoType = typing.Union[typing.Literal["voice"], typing.Any] diff --git a/src/vapi/types/update_text_editor_tool_dto.py b/src/vapi/types/update_text_editor_tool_dto.py new file mode 100644 index 00000000..80ee713b --- /dev/null +++ b/src/vapi/types/update_text_editor_tool_dto.py @@ -0,0 +1,68 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .server import Server +from .tool_rejection_plan import ToolRejectionPlan +from .update_text_editor_tool_dto_messages_item import UpdateTextEditorToolDtoMessagesItem +from .update_text_editor_tool_dto_name import UpdateTextEditorToolDtoName +from .update_text_editor_tool_dto_sub_type import UpdateTextEditorToolDtoSubType + + +class UpdateTextEditorToolDto(UncheckedBaseModel): + messages: typing.Optional[typing.List[UpdateTextEditorToolDtoMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + sub_type: typing_extensions.Annotated[ + typing.Optional[UpdateTextEditorToolDtoSubType], + FieldMetadata(alias="subType"), + pydantic.Field(alias="subType", description="The sub type of tool."), + ] = None + server: typing.Optional[Server] = pydantic.Field(default=None) + """ + + This is the server where a `tool-calls` webhook will be sent. + + Notes: + - Webhook is sent to this server when a tool call is made. + - Webhook contains the call, assistant, and phone number objects. + - Webhook contains the variables set on the assistant. + - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}. + - Webhook expects a response with tool call result. + """ + + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + name: typing.Optional[UpdateTextEditorToolDtoName] = pydantic.Field(default=None) + """ + The name of the tool, fixed to 'str_replace_editor' + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(UpdateTextEditorToolDto) diff --git a/src/vapi/types/update_text_editor_tool_dto_messages_item.py b/src/vapi/types/update_text_editor_tool_dto_messages_item.py new file mode 100644 index 00000000..dd75426e --- /dev/null +++ b/src/vapi/types/update_text_editor_tool_dto_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class UpdateTextEditorToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateTextEditorToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateTextEditorToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateTextEditorToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateTextEditorToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + UpdateTextEditorToolDtoMessagesItem_RequestStart, + UpdateTextEditorToolDtoMessagesItem_RequestComplete, + UpdateTextEditorToolDtoMessagesItem_RequestFailed, + UpdateTextEditorToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/update_text_editor_tool_dto_name.py b/src/vapi/types/update_text_editor_tool_dto_name.py new file mode 100644 index 00000000..b385852f --- /dev/null +++ b/src/vapi/types/update_text_editor_tool_dto_name.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +UpdateTextEditorToolDtoName = typing.Union[typing.Literal["str_replace_editor"], typing.Any] diff --git a/src/vapi/types/update_text_editor_tool_dto_sub_type.py b/src/vapi/types/update_text_editor_tool_dto_sub_type.py new file mode 100644 index 00000000..8f4732f5 --- /dev/null +++ b/src/vapi/types/update_text_editor_tool_dto_sub_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +UpdateTextEditorToolDtoSubType = typing.Union[typing.Literal["text_editor_20241022"], typing.Any] diff --git a/src/vapi/types/update_text_insight_from_call_table_dto.py b/src/vapi/types/update_text_insight_from_call_table_dto.py new file mode 100644 index 00000000..e2621fc4 --- /dev/null +++ b/src/vapi/types/update_text_insight_from_call_table_dto.py @@ -0,0 +1,55 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .insight_time_range import InsightTimeRange +from .update_text_insight_from_call_table_dto_queries_item import UpdateTextInsightFromCallTableDtoQueriesItem + + +class UpdateTextInsightFromCallTableDto(UncheckedBaseModel): + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the Insight. + """ + + formula: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) + """ + Formulas are mathematical expressions applied on the data returned by the queries to transform them before being used to create the insight. + The formulas needs to be a valid mathematical expression, supported by MathJS - https://mathjs.org/docs/expressions/syntax.html + A formula is created by using the query names as the variable. + The formulas must contain at least one query name in the LiquidJS format {{query_name}} or {{['query name']}} which will be substituted with the query result. + For example, if you have 2 queries, 'Was Booking Made' and 'Average Call Duration', you can create a formula like this: + ``` + {{['Query 1']}} / {{['Query 2']}} * 100 + ``` + + ``` + ({{[Query 1]}} * 10) + {{[Query 2]}} + ``` + This will take the + + You can also use the query names as the variable in the formula. + """ + + time_range: typing_extensions.Annotated[ + typing.Optional[InsightTimeRange], FieldMetadata(alias="timeRange"), pydantic.Field(alias="timeRange") + ] = None + queries: typing.Optional[typing.List[UpdateTextInsightFromCallTableDtoQueriesItem]] = pydantic.Field(default=None) + """ + These are the queries to run to generate the insight. + For Text Insights, we only allow a single query, or require a formula if multiple queries are provided + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/update_text_insight_from_call_table_dto_queries_item.py b/src/vapi/types/update_text_insight_from_call_table_dto_queries_item.py new file mode 100644 index 00000000..47acc7ad --- /dev/null +++ b/src/vapi/types/update_text_insight_from_call_table_dto_queries_item.py @@ -0,0 +1,13 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .json_query_on_call_table_with_number_type_column import JsonQueryOnCallTableWithNumberTypeColumn +from .json_query_on_call_table_with_string_type_column import JsonQueryOnCallTableWithStringTypeColumn +from .json_query_on_call_table_with_structured_output_column import JsonQueryOnCallTableWithStructuredOutputColumn + +UpdateTextInsightFromCallTableDtoQueriesItem = typing.Union[ + JsonQueryOnCallTableWithStringTypeColumn, + JsonQueryOnCallTableWithNumberTypeColumn, + JsonQueryOnCallTableWithStructuredOutputColumn, +] diff --git a/src/vapi/types/update_together_ai_credential_dto.py b/src/vapi/types/update_together_ai_credential_dto.py index bd55816f..31ca3750 100644 --- a/src/vapi/types/update_together_ai_credential_dto.py +++ b/src/vapi/types/update_together_ai_credential_dto.py @@ -1,18 +1,23 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class UpdateTogetherAiCredentialDto(UniversalBaseModel): - provider: typing.Literal["together-ai"] = "together-ai" - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] = pydantic.Field() +class UpdateTogetherAiCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is not returned in the API. + This is the name of credential. This is just for your reference. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/update_token_dto.py b/src/vapi/types/update_token_dto.py new file mode 100644 index 00000000..850d356a --- /dev/null +++ b/src/vapi/types/update_token_dto.py @@ -0,0 +1,35 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .token_restrictions import TokenRestrictions +from .update_token_dto_tag import UpdateTokenDtoTag + + +class UpdateTokenDto(UncheckedBaseModel): + tag: typing.Optional[UpdateTokenDtoTag] = pydantic.Field(default=None) + """ + This is the tag for the token. It represents its scope. + """ + + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the token. This is just for your own reference. + """ + + restrictions: typing.Optional[TokenRestrictions] = pydantic.Field(default=None) + """ + This are the restrictions for the token. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/update_token_dto_tag.py b/src/vapi/types/update_token_dto_tag.py new file mode 100644 index 00000000..afea3734 --- /dev/null +++ b/src/vapi/types/update_token_dto_tag.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +UpdateTokenDtoTag = typing.Union[typing.Literal["private", "public"], typing.Any] diff --git a/src/vapi/types/update_tool_template_dto.py b/src/vapi/types/update_tool_template_dto.py index bb3c835b..c036475a 100644 --- a/src/vapi/types/update_tool_template_dto.py +++ b/src/vapi/types/update_tool_template_dto.py @@ -1,26 +1,32 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +from __future__ import annotations + import typing -from .update_tool_template_dto_details import UpdateToolTemplateDtoDetails + +import pydantic import typing_extensions -from .update_tool_template_dto_provider_details import UpdateToolTemplateDtoProviderDetails +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel from .tool_template_metadata import ToolTemplateMetadata -from .update_tool_template_dto_visibility import UpdateToolTemplateDtoVisibility -import pydantic +from .update_tool_template_dto_details import UpdateToolTemplateDtoDetails from .update_tool_template_dto_provider import UpdateToolTemplateDtoProvider -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from .update_tool_template_dto_provider_details import UpdateToolTemplateDtoProviderDetails +from .update_tool_template_dto_type import UpdateToolTemplateDtoType +from .update_tool_template_dto_visibility import UpdateToolTemplateDtoVisibility -class UpdateToolTemplateDto(UniversalBaseModel): +class UpdateToolTemplateDto(UncheckedBaseModel): details: typing.Optional[UpdateToolTemplateDtoDetails] = None provider_details: typing_extensions.Annotated[ - typing.Optional[UpdateToolTemplateDtoProviderDetails], FieldMetadata(alias="providerDetails") + typing.Optional[UpdateToolTemplateDtoProviderDetails], + FieldMetadata(alias="providerDetails"), + pydantic.Field(alias="providerDetails"), ] = None metadata: typing.Optional[ToolTemplateMetadata] = None visibility: typing.Optional[UpdateToolTemplateDtoVisibility] = None - type: typing.Literal["tool"] = "tool" + type: UpdateToolTemplateDtoType name: typing.Optional[str] = pydantic.Field(default=None) """ The name of the template. This is just for your own reference. @@ -36,3 +42,6 @@ class Config: frozen = True smart_union = True extra = pydantic.Extra.allow + + +update_forward_refs(UpdateToolTemplateDto) diff --git a/src/vapi/types/update_tool_template_dto_details.py b/src/vapi/types/update_tool_template_dto_details.py index 74315077..a4f7ba48 100644 --- a/src/vapi/types/update_tool_template_dto_details.py +++ b/src/vapi/types/update_tool_template_dto_details.py @@ -1,20 +1,732 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .create_dtmf_tool_dto import CreateDtmfToolDto -from .create_end_call_tool_dto import CreateEndCallToolDto -from .create_voicemail_tool_dto import CreateVoicemailToolDto -from .create_function_tool_dto import CreateFunctionToolDto -from .create_ghl_tool_dto import CreateGhlToolDto -from .create_make_tool_dto import CreateMakeToolDto -from .create_transfer_call_tool_dto import CreateTransferCallToolDto - -UpdateToolTemplateDtoDetails = typing.Union[ - CreateDtmfToolDto, - CreateEndCallToolDto, - CreateVoicemailToolDto, - CreateFunctionToolDto, - CreateGhlToolDto, - CreateMakeToolDto, - CreateTransferCallToolDto, + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .backoff_plan import BackoffPlan +from .code_tool_environment_variable import CodeToolEnvironmentVariable +from .create_api_request_tool_dto_messages_item import CreateApiRequestToolDtoMessagesItem +from .create_api_request_tool_dto_method import CreateApiRequestToolDtoMethod +from .create_bash_tool_dto_messages_item import CreateBashToolDtoMessagesItem +from .create_bash_tool_dto_name import CreateBashToolDtoName +from .create_bash_tool_dto_sub_type import CreateBashToolDtoSubType +from .create_code_tool_dto_messages_item import CreateCodeToolDtoMessagesItem +from .create_computer_tool_dto_messages_item import CreateComputerToolDtoMessagesItem +from .create_computer_tool_dto_name import CreateComputerToolDtoName +from .create_computer_tool_dto_sub_type import CreateComputerToolDtoSubType +from .create_dtmf_tool_dto_messages_item import CreateDtmfToolDtoMessagesItem +from .create_end_call_tool_dto_messages_item import CreateEndCallToolDtoMessagesItem +from .create_function_tool_dto_messages_item import CreateFunctionToolDtoMessagesItem +from .create_go_high_level_calendar_availability_tool_dto_messages_item import ( + CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem, +) +from .create_go_high_level_calendar_event_create_tool_dto_messages_item import ( + CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_create_tool_dto_messages_item import ( + CreateGoHighLevelContactCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_get_tool_dto_messages_item import CreateGoHighLevelContactGetToolDtoMessagesItem +from .create_google_calendar_check_availability_tool_dto_messages_item import ( + CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem, +) +from .create_google_calendar_create_event_tool_dto_messages_item import ( + CreateGoogleCalendarCreateEventToolDtoMessagesItem, +) +from .create_google_sheets_row_append_tool_dto_messages_item import CreateGoogleSheetsRowAppendToolDtoMessagesItem +from .create_handoff_tool_dto_messages_item import CreateHandoffToolDtoMessagesItem +from .create_mcp_tool_dto_messages_item import CreateMcpToolDtoMessagesItem +from .create_query_tool_dto_messages_item import CreateQueryToolDtoMessagesItem +from .create_sip_request_tool_dto_body import CreateSipRequestToolDtoBody +from .create_sip_request_tool_dto_messages_item import CreateSipRequestToolDtoMessagesItem +from .create_sip_request_tool_dto_verb import CreateSipRequestToolDtoVerb +from .create_slack_send_message_tool_dto_messages_item import CreateSlackSendMessageToolDtoMessagesItem +from .create_sms_tool_dto_messages_item import CreateSmsToolDtoMessagesItem +from .create_text_editor_tool_dto_messages_item import CreateTextEditorToolDtoMessagesItem +from .create_text_editor_tool_dto_name import CreateTextEditorToolDtoName +from .create_text_editor_tool_dto_sub_type import CreateTextEditorToolDtoSubType +from .create_transfer_call_tool_dto_destinations_item import CreateTransferCallToolDtoDestinationsItem +from .create_transfer_call_tool_dto_messages_item import CreateTransferCallToolDtoMessagesItem +from .create_voicemail_tool_dto_messages_item import CreateVoicemailToolDtoMessagesItem +from .knowledge_base import KnowledgeBase +from .mcp_tool_messages import McpToolMessages +from .mcp_tool_metadata import McpToolMetadata +from .open_ai_function import OpenAiFunction +from .server import Server +from .tool_parameter import ToolParameter +from .tool_rejection_plan import ToolRejectionPlan +from .variable_extraction_plan import VariableExtractionPlan + + +class UpdateToolTemplateDtoDetails_ApiRequest(UncheckedBaseModel): + type: typing.Literal["apiRequest"] = "apiRequest" + messages: typing.Optional[typing.List[CreateApiRequestToolDtoMessagesItem]] = None + method: CreateApiRequestToolDtoMethod + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + encrypted_paths: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="encryptedPaths"), pydantic.Field(alias="encryptedPaths") + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + name: typing.Optional[str] = None + description: typing.Optional[str] = None + url: str + body: typing.Optional["JsonSchema"] = None + headers: typing.Optional["JsonSchema"] = None + backoff_plan: typing_extensions.Annotated[ + typing.Optional[BackoffPlan], FieldMetadata(alias="backoffPlan"), pydantic.Field(alias="backoffPlan") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolTemplateDtoDetails_Bash(UncheckedBaseModel): + type: typing.Literal["bash"] = "bash" + messages: typing.Optional[typing.List[CreateBashToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateBashToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateBashToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolTemplateDtoDetails_Code(UncheckedBaseModel): + type: typing.Literal["code"] = "code" + messages: typing.Optional[typing.List[CreateCodeToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + code: str + environment_variables: typing_extensions.Annotated[ + typing.Optional[typing.List[CodeToolEnvironmentVariable]], + FieldMetadata(alias="environmentVariables"), + pydantic.Field(alias="environmentVariables"), + ] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolTemplateDtoDetails_Computer(UncheckedBaseModel): + type: typing.Literal["computer"] = "computer" + messages: typing.Optional[typing.List[CreateComputerToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateComputerToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateComputerToolDtoName + display_width_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayWidthPx"), pydantic.Field(alias="displayWidthPx") + ] + display_height_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayHeightPx"), pydantic.Field(alias="displayHeightPx") + ] + display_number: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="displayNumber"), pydantic.Field(alias="displayNumber") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolTemplateDtoDetails_Dtmf(UncheckedBaseModel): + type: typing.Literal["dtmf"] = "dtmf" + messages: typing.Optional[typing.List[CreateDtmfToolDtoMessagesItem]] = None + sip_info_dtmf_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="sipInfoDtmfEnabled"), pydantic.Field(alias="sipInfoDtmfEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolTemplateDtoDetails_EndCall(UncheckedBaseModel): + type: typing.Literal["endCall"] = "endCall" + messages: typing.Optional[typing.List[CreateEndCallToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolTemplateDtoDetails_Function(UncheckedBaseModel): + type: typing.Literal["function"] = "function" + messages: typing.Optional[typing.List[CreateFunctionToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolTemplateDtoDetails_GohighlevelCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.availability.check"] = "gohighlevel.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolTemplateDtoDetails_GohighlevelCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.event.create"] = "gohighlevel.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolTemplateDtoDetails_GohighlevelContactCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.create"] = "gohighlevel.contact.create" + messages: typing.Optional[typing.List[CreateGoHighLevelContactCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolTemplateDtoDetails_GohighlevelContactGet(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.get"] = "gohighlevel.contact.get" + messages: typing.Optional[typing.List[CreateGoHighLevelContactGetToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolTemplateDtoDetails_GoogleCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["google.calendar.availability.check"] = "google.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolTemplateDtoDetails_GoogleCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["google.calendar.event.create"] = "google.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoogleCalendarCreateEventToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolTemplateDtoDetails_GoogleSheetsRowAppend(UncheckedBaseModel): + type: typing.Literal["google.sheets.row.append"] = "google.sheets.row.append" + messages: typing.Optional[typing.List[CreateGoogleSheetsRowAppendToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolTemplateDtoDetails_Handoff(UncheckedBaseModel): + type: typing.Literal["handoff"] = "handoff" + messages: typing.Optional[typing.List[CreateHandoffToolDtoMessagesItem]] = None + default_result: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="defaultResult"), pydantic.Field(alias="defaultResult") + ] = None + destinations: typing.Optional[typing.List["CreateHandoffToolDtoDestinationsItem"]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolTemplateDtoDetails_Mcp(UncheckedBaseModel): + type: typing.Literal["mcp"] = "mcp" + messages: typing.Optional[typing.List[CreateMcpToolDtoMessagesItem]] = None + server: typing.Optional[Server] = None + tool_messages: typing_extensions.Annotated[ + typing.Optional[typing.List[McpToolMessages]], + FieldMetadata(alias="toolMessages"), + pydantic.Field(alias="toolMessages"), + ] = None + metadata: typing.Optional[McpToolMetadata] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolTemplateDtoDetails_Query(UncheckedBaseModel): + type: typing.Literal["query"] = "query" + messages: typing.Optional[typing.List[CreateQueryToolDtoMessagesItem]] = None + knowledge_bases: typing_extensions.Annotated[ + typing.Optional[typing.List[KnowledgeBase]], + FieldMetadata(alias="knowledgeBases"), + pydantic.Field(alias="knowledgeBases"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolTemplateDtoDetails_SlackMessageSend(UncheckedBaseModel): + type: typing.Literal["slack.message.send"] = "slack.message.send" + messages: typing.Optional[typing.List[CreateSlackSendMessageToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolTemplateDtoDetails_Sms(UncheckedBaseModel): + type: typing.Literal["sms"] = "sms" + messages: typing.Optional[typing.List[CreateSmsToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolTemplateDtoDetails_TextEditor(UncheckedBaseModel): + type: typing.Literal["textEditor"] = "textEditor" + messages: typing.Optional[typing.List[CreateTextEditorToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateTextEditorToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateTextEditorToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolTemplateDtoDetails_TransferCall(UncheckedBaseModel): + type: typing.Literal["transferCall"] = "transferCall" + messages: typing.Optional[typing.List[CreateTransferCallToolDtoMessagesItem]] = None + destinations: typing.Optional[typing.List[CreateTransferCallToolDtoDestinationsItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolTemplateDtoDetails_SipRequest(UncheckedBaseModel): + type: typing.Literal["sipRequest"] = "sipRequest" + messages: typing.Optional[typing.List[CreateSipRequestToolDtoMessagesItem]] = None + verb: CreateSipRequestToolDtoVerb + headers: typing.Optional["JsonSchema"] = None + body: typing.Optional[CreateSipRequestToolDtoBody] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolTemplateDtoDetails_Voicemail(UncheckedBaseModel): + type: typing.Literal["voicemail"] = "voicemail" + messages: typing.Optional[typing.List[CreateVoicemailToolDtoMessagesItem]] = None + beep_detection_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="beepDetectionEnabled"), pydantic.Field(alias="beepDetectionEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateToolTemplateDtoDetails = typing_extensions.Annotated[ + typing.Union[ + UpdateToolTemplateDtoDetails_ApiRequest, + UpdateToolTemplateDtoDetails_Bash, + UpdateToolTemplateDtoDetails_Code, + UpdateToolTemplateDtoDetails_Computer, + UpdateToolTemplateDtoDetails_Dtmf, + UpdateToolTemplateDtoDetails_EndCall, + UpdateToolTemplateDtoDetails_Function, + UpdateToolTemplateDtoDetails_GohighlevelCalendarAvailabilityCheck, + UpdateToolTemplateDtoDetails_GohighlevelCalendarEventCreate, + UpdateToolTemplateDtoDetails_GohighlevelContactCreate, + UpdateToolTemplateDtoDetails_GohighlevelContactGet, + UpdateToolTemplateDtoDetails_GoogleCalendarAvailabilityCheck, + UpdateToolTemplateDtoDetails_GoogleCalendarEventCreate, + UpdateToolTemplateDtoDetails_GoogleSheetsRowAppend, + UpdateToolTemplateDtoDetails_Handoff, + UpdateToolTemplateDtoDetails_Mcp, + UpdateToolTemplateDtoDetails_Query, + UpdateToolTemplateDtoDetails_SlackMessageSend, + UpdateToolTemplateDtoDetails_Sms, + UpdateToolTemplateDtoDetails_TextEditor, + UpdateToolTemplateDtoDetails_TransferCall, + UpdateToolTemplateDtoDetails_SipRequest, + UpdateToolTemplateDtoDetails_Voicemail, + ], + UnionMetadata(discriminant="type"), ] +from .json_schema import JsonSchema # noqa: E402, I001 +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs(UpdateToolTemplateDtoDetails_ApiRequest, JsonSchema=JsonSchema) +update_forward_refs(UpdateToolTemplateDtoDetails_Bash) +update_forward_refs(UpdateToolTemplateDtoDetails_Code) +update_forward_refs(UpdateToolTemplateDtoDetails_Computer) +update_forward_refs(UpdateToolTemplateDtoDetails_Dtmf) +update_forward_refs(UpdateToolTemplateDtoDetails_EndCall) +update_forward_refs(UpdateToolTemplateDtoDetails_Function) +update_forward_refs(UpdateToolTemplateDtoDetails_GohighlevelCalendarAvailabilityCheck) +update_forward_refs(UpdateToolTemplateDtoDetails_GohighlevelCalendarEventCreate) +update_forward_refs(UpdateToolTemplateDtoDetails_GohighlevelContactCreate) +update_forward_refs(UpdateToolTemplateDtoDetails_GohighlevelContactGet) +update_forward_refs(UpdateToolTemplateDtoDetails_GoogleCalendarAvailabilityCheck) +update_forward_refs(UpdateToolTemplateDtoDetails_GoogleCalendarEventCreate) +update_forward_refs(UpdateToolTemplateDtoDetails_GoogleSheetsRowAppend) +update_forward_refs( + UpdateToolTemplateDtoDetails_Handoff, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs(UpdateToolTemplateDtoDetails_Mcp) +update_forward_refs(UpdateToolTemplateDtoDetails_Query) +update_forward_refs(UpdateToolTemplateDtoDetails_SlackMessageSend) +update_forward_refs(UpdateToolTemplateDtoDetails_Sms) +update_forward_refs(UpdateToolTemplateDtoDetails_TextEditor) +update_forward_refs(UpdateToolTemplateDtoDetails_TransferCall) +update_forward_refs(UpdateToolTemplateDtoDetails_SipRequest, JsonSchema=JsonSchema) +update_forward_refs(UpdateToolTemplateDtoDetails_Voicemail) diff --git a/src/vapi/types/update_tool_template_dto_provider_details.py b/src/vapi/types/update_tool_template_dto_provider_details.py index dd8d2cac..e3093212 100644 --- a/src/vapi/types/update_tool_template_dto_provider_details.py +++ b/src/vapi/types/update_tool_template_dto_provider_details.py @@ -1,10 +1,244 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .make_tool_provider_details import MakeToolProviderDetails -from .ghl_tool_provider_details import GhlToolProviderDetails -from .function_tool_provider_details import FunctionToolProviderDetails -UpdateToolTemplateDtoProviderDetails = typing.Union[ - MakeToolProviderDetails, GhlToolProviderDetails, FunctionToolProviderDetails +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .tool_template_setup import ToolTemplateSetup + + +class UpdateToolTemplateDtoProviderDetails_Make(UncheckedBaseModel): + type: typing.Literal["make"] = "make" + template_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="templateUrl"), pydantic.Field(alias="templateUrl") + ] = None + setup_instructions: typing_extensions.Annotated[ + typing.Optional[typing.List[ToolTemplateSetup]], + FieldMetadata(alias="setupInstructions"), + pydantic.Field(alias="setupInstructions"), + ] = None + scenario_id: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="scenarioId"), pydantic.Field(alias="scenarioId") + ] = None + scenario_name: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="scenarioName"), pydantic.Field(alias="scenarioName") + ] = None + trigger_hook_id: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="triggerHookId"), pydantic.Field(alias="triggerHookId") + ] = None + trigger_hook_name: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="triggerHookName"), pydantic.Field(alias="triggerHookName") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolTemplateDtoProviderDetails_Ghl(UncheckedBaseModel): + type: typing.Literal["ghl"] = "ghl" + template_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="templateUrl"), pydantic.Field(alias="templateUrl") + ] = None + setup_instructions: typing_extensions.Annotated[ + typing.Optional[typing.List[ToolTemplateSetup]], + FieldMetadata(alias="setupInstructions"), + pydantic.Field(alias="setupInstructions"), + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowId"), pydantic.Field(alias="workflowId") + ] = None + workflow_name: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="workflowName"), pydantic.Field(alias="workflowName") + ] = None + webhook_hook_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="webhookHookId"), pydantic.Field(alias="webhookHookId") + ] = None + webhook_hook_name: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="webhookHookName"), pydantic.Field(alias="webhookHookName") + ] = None + location_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="locationId"), pydantic.Field(alias="locationId") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolTemplateDtoProviderDetails_Function(UncheckedBaseModel): + type: typing.Literal["function"] = "function" + template_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="templateUrl"), pydantic.Field(alias="templateUrl") + ] = None + setup_instructions: typing_extensions.Annotated[ + typing.Optional[typing.List[ToolTemplateSetup]], + FieldMetadata(alias="setupInstructions"), + pydantic.Field(alias="setupInstructions"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolTemplateDtoProviderDetails_GoogleCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["google.calendar.event.create"] = "google.calendar.event.create" + template_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="templateUrl"), pydantic.Field(alias="templateUrl") + ] = None + setup_instructions: typing_extensions.Annotated[ + typing.Optional[typing.List[ToolTemplateSetup]], + FieldMetadata(alias="setupInstructions"), + pydantic.Field(alias="setupInstructions"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolTemplateDtoProviderDetails_GoogleSheetsRowAppend(UncheckedBaseModel): + type: typing.Literal["google.sheets.row.append"] = "google.sheets.row.append" + template_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="templateUrl"), pydantic.Field(alias="templateUrl") + ] = None + setup_instructions: typing_extensions.Annotated[ + typing.Optional[typing.List[ToolTemplateSetup]], + FieldMetadata(alias="setupInstructions"), + pydantic.Field(alias="setupInstructions"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolTemplateDtoProviderDetails_GohighlevelCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.availability.check"] = "gohighlevel.calendar.availability.check" + template_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="templateUrl"), pydantic.Field(alias="templateUrl") + ] = None + setup_instructions: typing_extensions.Annotated[ + typing.Optional[typing.List[ToolTemplateSetup]], + FieldMetadata(alias="setupInstructions"), + pydantic.Field(alias="setupInstructions"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolTemplateDtoProviderDetails_GohighlevelCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.event.create"] = "gohighlevel.calendar.event.create" + template_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="templateUrl"), pydantic.Field(alias="templateUrl") + ] = None + setup_instructions: typing_extensions.Annotated[ + typing.Optional[typing.List[ToolTemplateSetup]], + FieldMetadata(alias="setupInstructions"), + pydantic.Field(alias="setupInstructions"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolTemplateDtoProviderDetails_GohighlevelContactCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.create"] = "gohighlevel.contact.create" + template_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="templateUrl"), pydantic.Field(alias="templateUrl") + ] = None + setup_instructions: typing_extensions.Annotated[ + typing.Optional[typing.List[ToolTemplateSetup]], + FieldMetadata(alias="setupInstructions"), + pydantic.Field(alias="setupInstructions"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateToolTemplateDtoProviderDetails_GohighlevelContactGet(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.get"] = "gohighlevel.contact.get" + template_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="templateUrl"), pydantic.Field(alias="templateUrl") + ] = None + setup_instructions: typing_extensions.Annotated[ + typing.Optional[typing.List[ToolTemplateSetup]], + FieldMetadata(alias="setupInstructions"), + pydantic.Field(alias="setupInstructions"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateToolTemplateDtoProviderDetails = typing_extensions.Annotated[ + typing.Union[ + UpdateToolTemplateDtoProviderDetails_Make, + UpdateToolTemplateDtoProviderDetails_Ghl, + UpdateToolTemplateDtoProviderDetails_Function, + UpdateToolTemplateDtoProviderDetails_GoogleCalendarEventCreate, + UpdateToolTemplateDtoProviderDetails_GoogleSheetsRowAppend, + UpdateToolTemplateDtoProviderDetails_GohighlevelCalendarAvailabilityCheck, + UpdateToolTemplateDtoProviderDetails_GohighlevelCalendarEventCreate, + UpdateToolTemplateDtoProviderDetails_GohighlevelContactCreate, + UpdateToolTemplateDtoProviderDetails_GohighlevelContactGet, + ], + UnionMetadata(discriminant="type"), ] diff --git a/src/vapi/types/update_tool_template_dto_type.py b/src/vapi/types/update_tool_template_dto_type.py new file mode 100644 index 00000000..802adfb3 --- /dev/null +++ b/src/vapi/types/update_tool_template_dto_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +UpdateToolTemplateDtoType = typing.Union[typing.Literal["tool"], typing.Any] diff --git a/src/vapi/types/update_transfer_call_tool_dto.py b/src/vapi/types/update_transfer_call_tool_dto.py new file mode 100644 index 00000000..62fb42d8 --- /dev/null +++ b/src/vapi/types/update_transfer_call_tool_dto.py @@ -0,0 +1,49 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .tool_rejection_plan import ToolRejectionPlan +from .update_transfer_call_tool_dto_destinations_item import UpdateTransferCallToolDtoDestinationsItem +from .update_transfer_call_tool_dto_messages_item import UpdateTransferCallToolDtoMessagesItem + + +class UpdateTransferCallToolDto(UncheckedBaseModel): + messages: typing.Optional[typing.List[UpdateTransferCallToolDtoMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + destinations: typing.Optional[typing.List[UpdateTransferCallToolDtoDestinationsItem]] = pydantic.Field(default=None) + """ + These are the destinations that the call can be transferred to. If no destinations are provided, server.url will be used to get the transfer destination once the tool is called. + """ + + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(UpdateTransferCallToolDto) diff --git a/src/vapi/types/update_transfer_call_tool_dto_destinations_item.py b/src/vapi/types/update_transfer_call_tool_dto_destinations_item.py new file mode 100644 index 00000000..d52d26fe --- /dev/null +++ b/src/vapi/types/update_transfer_call_tool_dto_destinations_item.py @@ -0,0 +1,102 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .transfer_destination_assistant_message import TransferDestinationAssistantMessage +from .transfer_destination_number_message import TransferDestinationNumberMessage +from .transfer_destination_sip_message import TransferDestinationSipMessage +from .transfer_mode import TransferMode +from .transfer_plan import TransferPlan + + +class UpdateTransferCallToolDtoDestinationsItem_Assistant(UncheckedBaseModel): + type: typing.Literal["assistant"] = "assistant" + message: typing.Optional[TransferDestinationAssistantMessage] = None + transfer_mode: typing_extensions.Annotated[ + typing.Optional[TransferMode], FieldMetadata(alias="transferMode"), pydantic.Field(alias="transferMode") + ] = None + assistant_name: typing_extensions.Annotated[ + str, FieldMetadata(alias="assistantName"), pydantic.Field(alias="assistantName") + ] + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateTransferCallToolDtoDestinationsItem_Number(UncheckedBaseModel): + type: typing.Literal["number"] = "number" + message: typing.Optional[TransferDestinationNumberMessage] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: str + extension: typing.Optional[str] = None + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateTransferCallToolDtoDestinationsItem_Sip(UncheckedBaseModel): + type: typing.Literal["sip"] = "sip" + message: typing.Optional[TransferDestinationSipMessage] = None + sip_uri: typing_extensions.Annotated[str, FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri")] + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + sip_headers: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="sipHeaders"), + pydantic.Field(alias="sipHeaders"), + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateTransferCallToolDtoDestinationsItem = typing_extensions.Annotated[ + typing.Union[ + UpdateTransferCallToolDtoDestinationsItem_Assistant, + UpdateTransferCallToolDtoDestinationsItem_Number, + UpdateTransferCallToolDtoDestinationsItem_Sip, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/update_transfer_call_tool_dto_messages_item.py b/src/vapi/types/update_transfer_call_tool_dto_messages_item.py new file mode 100644 index 00000000..2d2aae02 --- /dev/null +++ b/src/vapi/types/update_transfer_call_tool_dto_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class UpdateTransferCallToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateTransferCallToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateTransferCallToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateTransferCallToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateTransferCallToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + UpdateTransferCallToolDtoMessagesItem_RequestStart, + UpdateTransferCallToolDtoMessagesItem_RequestComplete, + UpdateTransferCallToolDtoMessagesItem_RequestFailed, + UpdateTransferCallToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/update_trieve_credential_dto.py b/src/vapi/types/update_trieve_credential_dto.py new file mode 100644 index 00000000..945f81bd --- /dev/null +++ b/src/vapi/types/update_trieve_credential_dto.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class UpdateTrieveCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/update_trieve_knowledge_base_dto.py b/src/vapi/types/update_trieve_knowledge_base_dto.py new file mode 100644 index 00000000..8c646aef --- /dev/null +++ b/src/vapi/types/update_trieve_knowledge_base_dto.py @@ -0,0 +1,44 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .trieve_knowledge_base_import import TrieveKnowledgeBaseImport +from .trieve_knowledge_base_search_plan import TrieveKnowledgeBaseSearchPlan + + +class UpdateTrieveKnowledgeBaseDto(UncheckedBaseModel): + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the knowledge base. + """ + + search_plan: typing_extensions.Annotated[ + typing.Optional[TrieveKnowledgeBaseSearchPlan], + FieldMetadata(alias="searchPlan"), + pydantic.Field( + alias="searchPlan", + description="This is the searching plan used when searching for relevant chunks from the vector store.\n\nYou should configure this if you're running into these issues:\n- Too much unnecessary context is being fed as knowledge base context.\n- Not enough relevant context is being fed as knowledge base context.", + ), + ] = None + create_plan: typing_extensions.Annotated[ + typing.Optional[TrieveKnowledgeBaseImport], + FieldMetadata(alias="createPlan"), + pydantic.Field( + alias="createPlan", + description="This is the plan if you want us to create/import a new vector store using Trieve.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/update_twilio_credential_dto.py b/src/vapi/types/update_twilio_credential_dto.py index 33095af9..996c98d0 100644 --- a/src/vapi/types/update_twilio_credential_dto.py +++ b/src/vapi/types/update_twilio_credential_dto.py @@ -1,21 +1,38 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class UpdateTwilioCredentialDto(UniversalBaseModel): - provider: typing.Literal["twilio"] = "twilio" - auth_token: typing_extensions.Annotated[str, FieldMetadata(alias="authToken")] = pydantic.Field() +class UpdateTwilioCredentialDto(UncheckedBaseModel): + auth_token: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="authToken"), + pydantic.Field(alias="authToken", description="This is not returned in the API."), + ] = None + api_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] = None + api_secret: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiSecret"), + pydantic.Field(alias="apiSecret", description="This is not returned in the API."), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is not returned in the API. + This is the name of credential. This is just for your reference. """ - account_sid: typing_extensions.Annotated[str, FieldMetadata(alias="accountSid")] + account_sid: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="accountSid"), pydantic.Field(alias="accountSid") + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/update_twilio_phone_number_dto.py b/src/vapi/types/update_twilio_phone_number_dto.py new file mode 100644 index 00000000..6f83a9dd --- /dev/null +++ b/src/vapi/types/update_twilio_phone_number_dto.py @@ -0,0 +1,110 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .server import Server +from .update_twilio_phone_number_dto_fallback_destination import UpdateTwilioPhoneNumberDtoFallbackDestination +from .update_twilio_phone_number_dto_hooks_item import UpdateTwilioPhoneNumberDtoHooksItem + + +class UpdateTwilioPhoneNumberDto(UncheckedBaseModel): + fallback_destination: typing_extensions.Annotated[ + typing.Optional[UpdateTwilioPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field( + alias="fallbackDestination", + description="This is the fallback destination an inbound call will be transferred to if:\n1. `assistantId` is not set\n2. `squadId` is not set\n3. and, `assistant-request` message to the `serverUrl` fails\n\nIf this is not set and above conditions are met, the inbound call is hung up with an error message.", + ), + ] = None + hooks: typing.Optional[typing.List[UpdateTwilioPhoneNumberDtoHooksItem]] = pydantic.Field(default=None) + """ + This is the hooks that will be used for incoming calls to this phone number. + """ + + sms_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="smsEnabled"), + pydantic.Field( + alias="smsEnabled", + description="Controls whether Vapi sets the messaging webhook URL on the Twilio number during import.\n\nIf set to `false`, Vapi will not update the Twilio messaging URL, leaving it as is.\nIf `true` or omitted (default), Vapi will configure both the voice and messaging URLs.\n\n@default true", + ), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the phone number. This is just for your own reference. + """ + + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assistantId"), + pydantic.Field( + alias="assistantId", + description="This is the assistant that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="workflowId"), + pydantic.Field( + alias="workflowId", + description="This is the workflow that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="squadId"), + pydantic.Field( + alias="squadId", + description="This is the squad that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + server: typing.Optional[Server] = pydantic.Field(default=None) + """ + This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema. + + The order of precedence is: + + 1. assistant.server + 2. phoneNumber.server + 3. org.server + """ + + number: typing.Optional[str] = pydantic.Field(default=None) + """ + These are the digits of the phone number you own on your Twilio. + """ + + twilio_account_sid: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="twilioAccountSid"), + pydantic.Field(alias="twilioAccountSid", description="This is the Twilio Account SID for the phone number."), + ] = None + twilio_auth_token: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="twilioAuthToken"), + pydantic.Field(alias="twilioAuthToken", description="This is the Twilio Auth Token for the phone number."), + ] = None + twilio_api_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="twilioApiKey"), + pydantic.Field(alias="twilioApiKey", description="This is the Twilio API Key for the phone number."), + ] = None + twilio_api_secret: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="twilioApiSecret"), + pydantic.Field(alias="twilioApiSecret", description="This is the Twilio API Secret for the phone number."), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/update_twilio_phone_number_dto_fallback_destination.py b/src/vapi/types/update_twilio_phone_number_dto_fallback_destination.py new file mode 100644 index 00000000..02d71d99 --- /dev/null +++ b/src/vapi/types/update_twilio_phone_number_dto_fallback_destination.py @@ -0,0 +1,95 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .transfer_destination_number_message import TransferDestinationNumberMessage +from .transfer_destination_sip_message import TransferDestinationSipMessage +from .transfer_plan import TransferPlan + + +class UpdateTwilioPhoneNumberDtoFallbackDestination_Number(UncheckedBaseModel): + """ + This is the fallback destination an inbound call will be transferred to if: + 1. `assistantId` is not set + 2. `squadId` is not set + 3. and, `assistant-request` message to the `serverUrl` fails + + If this is not set and above conditions are met, the inbound call is hung up with an error message. + """ + + type: typing.Literal["number"] = "number" + message: typing.Optional[TransferDestinationNumberMessage] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: str + extension: typing.Optional[str] = None + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateTwilioPhoneNumberDtoFallbackDestination_Sip(UncheckedBaseModel): + """ + This is the fallback destination an inbound call will be transferred to if: + 1. `assistantId` is not set + 2. `squadId` is not set + 3. and, `assistant-request` message to the `serverUrl` fails + + If this is not set and above conditions are met, the inbound call is hung up with an error message. + """ + + type: typing.Literal["sip"] = "sip" + message: typing.Optional[TransferDestinationSipMessage] = None + sip_uri: typing_extensions.Annotated[str, FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri")] + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + sip_headers: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="sipHeaders"), + pydantic.Field(alias="sipHeaders"), + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateTwilioPhoneNumberDtoFallbackDestination = typing_extensions.Annotated[ + typing.Union[ + UpdateTwilioPhoneNumberDtoFallbackDestination_Number, UpdateTwilioPhoneNumberDtoFallbackDestination_Sip + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/update_twilio_phone_number_dto_hooks_item.py b/src/vapi/types/update_twilio_phone_number_dto_hooks_item.py new file mode 100644 index 00000000..2804afce --- /dev/null +++ b/src/vapi/types/update_twilio_phone_number_dto_hooks_item.py @@ -0,0 +1,50 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .phone_number_call_ending_hook_filter import PhoneNumberCallEndingHookFilter +from .phone_number_call_ringing_hook_filter import PhoneNumberCallRingingHookFilter +from .phone_number_hook_call_ending_do import PhoneNumberHookCallEndingDo +from .phone_number_hook_call_ringing_do_item import PhoneNumberHookCallRingingDoItem + + +class UpdateTwilioPhoneNumberDtoHooksItem_CallRinging(UncheckedBaseModel): + on: typing.Literal["call.ringing"] = "call.ringing" + filters: typing.Optional[typing.List[PhoneNumberCallRingingHookFilter]] = None + do: typing.List[PhoneNumberHookCallRingingDoItem] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateTwilioPhoneNumberDtoHooksItem_CallEnding(UncheckedBaseModel): + on: typing.Literal["call.ending"] = "call.ending" + filters: typing.Optional[typing.List[PhoneNumberCallEndingHookFilter]] = None + do: typing.Optional[PhoneNumberHookCallEndingDo] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateTwilioPhoneNumberDtoHooksItem = typing_extensions.Annotated[ + typing.Union[UpdateTwilioPhoneNumberDtoHooksItem_CallRinging, UpdateTwilioPhoneNumberDtoHooksItem_CallEnding], + UnionMetadata(discriminant="on"), +] diff --git a/src/vapi/types/update_user_role_dto.py b/src/vapi/types/update_user_role_dto.py index 9d10f70c..73088ffe 100644 --- a/src/vapi/types/update_user_role_dto.py +++ b/src/vapi/types/update_user_role_dto.py @@ -1,16 +1,17 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +import typing + +import pydantic import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel from .update_user_role_dto_role import UpdateUserRoleDtoRole -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -import typing -import pydantic -class UpdateUserRoleDto(UniversalBaseModel): - user_id: typing_extensions.Annotated[str, FieldMetadata(alias="userId")] +class UpdateUserRoleDto(UncheckedBaseModel): + user_id: typing_extensions.Annotated[str, FieldMetadata(alias="userId"), pydantic.Field(alias="userId")] role: UpdateUserRoleDtoRole if IS_PYDANTIC_V2: diff --git a/src/vapi/types/update_vapi_phone_number_dto.py b/src/vapi/types/update_vapi_phone_number_dto.py new file mode 100644 index 00000000..dc4fcf82 --- /dev/null +++ b/src/vapi/types/update_vapi_phone_number_dto.py @@ -0,0 +1,92 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .server import Server +from .sip_authentication import SipAuthentication +from .update_vapi_phone_number_dto_fallback_destination import UpdateVapiPhoneNumberDtoFallbackDestination +from .update_vapi_phone_number_dto_hooks_item import UpdateVapiPhoneNumberDtoHooksItem + + +class UpdateVapiPhoneNumberDto(UncheckedBaseModel): + fallback_destination: typing_extensions.Annotated[ + typing.Optional[UpdateVapiPhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field( + alias="fallbackDestination", + description="This is the fallback destination an inbound call will be transferred to if:\n1. `assistantId` is not set\n2. `squadId` is not set\n3. and, `assistant-request` message to the `serverUrl` fails\n\nIf this is not set and above conditions are met, the inbound call is hung up with an error message.", + ), + ] = None + hooks: typing.Optional[typing.List[UpdateVapiPhoneNumberDtoHooksItem]] = pydantic.Field(default=None) + """ + This is the hooks that will be used for incoming calls to this phone number. + """ + + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the phone number. This is just for your own reference. + """ + + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assistantId"), + pydantic.Field( + alias="assistantId", + description="This is the assistant that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="workflowId"), + pydantic.Field( + alias="workflowId", + description="This is the workflow that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="squadId"), + pydantic.Field( + alias="squadId", + description="This is the squad that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + server: typing.Optional[Server] = pydantic.Field(default=None) + """ + This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema. + + The order of precedence is: + + 1. assistant.server + 2. phoneNumber.server + 3. org.server + """ + + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="sipUri"), + pydantic.Field( + alias="sipUri", + description="This is the SIP URI of the phone number. You can SIP INVITE this. The assistant attached to this number will answer.\n\nThis is case-insensitive.", + ), + ] = None + authentication: typing.Optional[SipAuthentication] = pydantic.Field(default=None) + """ + This enables authentication for incoming SIP INVITE requests to the `sipUri`. + + If not set, any username/password to the 401 challenge of the SIP INVITE will be accepted. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/update_vapi_phone_number_dto_fallback_destination.py b/src/vapi/types/update_vapi_phone_number_dto_fallback_destination.py new file mode 100644 index 00000000..6535c66d --- /dev/null +++ b/src/vapi/types/update_vapi_phone_number_dto_fallback_destination.py @@ -0,0 +1,93 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .transfer_destination_number_message import TransferDestinationNumberMessage +from .transfer_destination_sip_message import TransferDestinationSipMessage +from .transfer_plan import TransferPlan + + +class UpdateVapiPhoneNumberDtoFallbackDestination_Number(UncheckedBaseModel): + """ + This is the fallback destination an inbound call will be transferred to if: + 1. `assistantId` is not set + 2. `squadId` is not set + 3. and, `assistant-request` message to the `serverUrl` fails + + If this is not set and above conditions are met, the inbound call is hung up with an error message. + """ + + type: typing.Literal["number"] = "number" + message: typing.Optional[TransferDestinationNumberMessage] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: str + extension: typing.Optional[str] = None + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateVapiPhoneNumberDtoFallbackDestination_Sip(UncheckedBaseModel): + """ + This is the fallback destination an inbound call will be transferred to if: + 1. `assistantId` is not set + 2. `squadId` is not set + 3. and, `assistant-request` message to the `serverUrl` fails + + If this is not set and above conditions are met, the inbound call is hung up with an error message. + """ + + type: typing.Literal["sip"] = "sip" + message: typing.Optional[TransferDestinationSipMessage] = None + sip_uri: typing_extensions.Annotated[str, FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri")] + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + sip_headers: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="sipHeaders"), + pydantic.Field(alias="sipHeaders"), + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateVapiPhoneNumberDtoFallbackDestination = typing_extensions.Annotated[ + typing.Union[UpdateVapiPhoneNumberDtoFallbackDestination_Number, UpdateVapiPhoneNumberDtoFallbackDestination_Sip], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/update_vapi_phone_number_dto_hooks_item.py b/src/vapi/types/update_vapi_phone_number_dto_hooks_item.py new file mode 100644 index 00000000..bb4e1950 --- /dev/null +++ b/src/vapi/types/update_vapi_phone_number_dto_hooks_item.py @@ -0,0 +1,50 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .phone_number_call_ending_hook_filter import PhoneNumberCallEndingHookFilter +from .phone_number_call_ringing_hook_filter import PhoneNumberCallRingingHookFilter +from .phone_number_hook_call_ending_do import PhoneNumberHookCallEndingDo +from .phone_number_hook_call_ringing_do_item import PhoneNumberHookCallRingingDoItem + + +class UpdateVapiPhoneNumberDtoHooksItem_CallRinging(UncheckedBaseModel): + on: typing.Literal["call.ringing"] = "call.ringing" + filters: typing.Optional[typing.List[PhoneNumberCallRingingHookFilter]] = None + do: typing.List[PhoneNumberHookCallRingingDoItem] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateVapiPhoneNumberDtoHooksItem_CallEnding(UncheckedBaseModel): + on: typing.Literal["call.ending"] = "call.ending" + filters: typing.Optional[typing.List[PhoneNumberCallEndingHookFilter]] = None + do: typing.Optional[PhoneNumberHookCallEndingDo] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateVapiPhoneNumberDtoHooksItem = typing_extensions.Annotated[ + typing.Union[UpdateVapiPhoneNumberDtoHooksItem_CallRinging, UpdateVapiPhoneNumberDtoHooksItem_CallEnding], + UnionMetadata(discriminant="on"), +] diff --git a/src/vapi/types/update_voicemail_tool_dto.py b/src/vapi/types/update_voicemail_tool_dto.py new file mode 100644 index 00000000..7f0e5709 --- /dev/null +++ b/src/vapi/types/update_voicemail_tool_dto.py @@ -0,0 +1,51 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .tool_rejection_plan import ToolRejectionPlan +from .update_voicemail_tool_dto_messages_item import UpdateVoicemailToolDtoMessagesItem + + +class UpdateVoicemailToolDto(UncheckedBaseModel): + messages: typing.Optional[typing.List[UpdateVoicemailToolDtoMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + beep_detection_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="beepDetectionEnabled"), + pydantic.Field( + alias="beepDetectionEnabled", + description="This is the flag that enables beep detection for voicemail detection and applies only for twilio based calls.\n\n@default false", + ), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(UpdateVoicemailToolDto) diff --git a/src/vapi/types/update_voicemail_tool_dto_messages_item.py b/src/vapi/types/update_voicemail_tool_dto_messages_item.py new file mode 100644 index 00000000..5124f6e4 --- /dev/null +++ b/src/vapi/types/update_voicemail_tool_dto_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class UpdateVoicemailToolDtoMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateVoicemailToolDtoMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateVoicemailToolDtoMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateVoicemailToolDtoMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateVoicemailToolDtoMessagesItem = typing_extensions.Annotated[ + typing.Union[ + UpdateVoicemailToolDtoMessagesItem_RequestStart, + UpdateVoicemailToolDtoMessagesItem_RequestComplete, + UpdateVoicemailToolDtoMessagesItem_RequestFailed, + UpdateVoicemailToolDtoMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/update_vonage_credential_dto.py b/src/vapi/types/update_vonage_credential_dto.py index 5d349d2c..e1293899 100644 --- a/src/vapi/types/update_vonage_credential_dto.py +++ b/src/vapi/types/update_vonage_credential_dto.py @@ -1,21 +1,28 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -import typing_extensions -from ..core.serialization import FieldMetadata + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class UpdateVonageCredentialDto(UniversalBaseModel): - provider: typing.Literal["vonage"] = "vonage" - api_secret: typing_extensions.Annotated[str, FieldMetadata(alias="apiSecret")] = pydantic.Field() +class UpdateVonageCredentialDto(UncheckedBaseModel): + api_secret: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiSecret"), + pydantic.Field(alias="apiSecret", description="This is not returned in the API."), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is not returned in the API. + This is the name of credential. This is just for your reference. """ - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] + api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey") + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/update_vonage_phone_number_dto.py b/src/vapi/types/update_vonage_phone_number_dto.py new file mode 100644 index 00000000..2d30691d --- /dev/null +++ b/src/vapi/types/update_vonage_phone_number_dto.py @@ -0,0 +1,90 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .server import Server +from .update_vonage_phone_number_dto_fallback_destination import UpdateVonagePhoneNumberDtoFallbackDestination +from .update_vonage_phone_number_dto_hooks_item import UpdateVonagePhoneNumberDtoHooksItem + + +class UpdateVonagePhoneNumberDto(UncheckedBaseModel): + fallback_destination: typing_extensions.Annotated[ + typing.Optional[UpdateVonagePhoneNumberDtoFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field( + alias="fallbackDestination", + description="This is the fallback destination an inbound call will be transferred to if:\n1. `assistantId` is not set\n2. `squadId` is not set\n3. and, `assistant-request` message to the `serverUrl` fails\n\nIf this is not set and above conditions are met, the inbound call is hung up with an error message.", + ), + ] = None + hooks: typing.Optional[typing.List[UpdateVonagePhoneNumberDtoHooksItem]] = pydantic.Field(default=None) + """ + This is the hooks that will be used for incoming calls to this phone number. + """ + + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of the phone number. This is just for your own reference. + """ + + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assistantId"), + pydantic.Field( + alias="assistantId", + description="This is the assistant that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="workflowId"), + pydantic.Field( + alias="workflowId", + description="This is the workflow that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="squadId"), + pydantic.Field( + alias="squadId", + description="This is the squad that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + server: typing.Optional[Server] = pydantic.Field(default=None) + """ + This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema. + + The order of precedence is: + + 1. assistant.server + 2. phoneNumber.server + 3. org.server + """ + + number: typing.Optional[str] = pydantic.Field(default=None) + """ + These are the digits of the phone number you own on your Vonage. + """ + + credential_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="credentialId"), + pydantic.Field( + alias="credentialId", + description="This is the credential you added in dashboard.vapi.ai/keys. This is used to configure the number to send inbound calls to Vapi, make outbound calls and do live call updates like transfers and hangups.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/update_vonage_phone_number_dto_fallback_destination.py b/src/vapi/types/update_vonage_phone_number_dto_fallback_destination.py new file mode 100644 index 00000000..9f9febac --- /dev/null +++ b/src/vapi/types/update_vonage_phone_number_dto_fallback_destination.py @@ -0,0 +1,95 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .transfer_destination_number_message import TransferDestinationNumberMessage +from .transfer_destination_sip_message import TransferDestinationSipMessage +from .transfer_plan import TransferPlan + + +class UpdateVonagePhoneNumberDtoFallbackDestination_Number(UncheckedBaseModel): + """ + This is the fallback destination an inbound call will be transferred to if: + 1. `assistantId` is not set + 2. `squadId` is not set + 3. and, `assistant-request` message to the `serverUrl` fails + + If this is not set and above conditions are met, the inbound call is hung up with an error message. + """ + + type: typing.Literal["number"] = "number" + message: typing.Optional[TransferDestinationNumberMessage] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: str + extension: typing.Optional[str] = None + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateVonagePhoneNumberDtoFallbackDestination_Sip(UncheckedBaseModel): + """ + This is the fallback destination an inbound call will be transferred to if: + 1. `assistantId` is not set + 2. `squadId` is not set + 3. and, `assistant-request` message to the `serverUrl` fails + + If this is not set and above conditions are met, the inbound call is hung up with an error message. + """ + + type: typing.Literal["sip"] = "sip" + message: typing.Optional[TransferDestinationSipMessage] = None + sip_uri: typing_extensions.Annotated[str, FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri")] + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + sip_headers: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="sipHeaders"), + pydantic.Field(alias="sipHeaders"), + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateVonagePhoneNumberDtoFallbackDestination = typing_extensions.Annotated[ + typing.Union[ + UpdateVonagePhoneNumberDtoFallbackDestination_Number, UpdateVonagePhoneNumberDtoFallbackDestination_Sip + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/update_vonage_phone_number_dto_hooks_item.py b/src/vapi/types/update_vonage_phone_number_dto_hooks_item.py new file mode 100644 index 00000000..d7ed50e6 --- /dev/null +++ b/src/vapi/types/update_vonage_phone_number_dto_hooks_item.py @@ -0,0 +1,50 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .phone_number_call_ending_hook_filter import PhoneNumberCallEndingHookFilter +from .phone_number_call_ringing_hook_filter import PhoneNumberCallRingingHookFilter +from .phone_number_hook_call_ending_do import PhoneNumberHookCallEndingDo +from .phone_number_hook_call_ringing_do_item import PhoneNumberHookCallRingingDoItem + + +class UpdateVonagePhoneNumberDtoHooksItem_CallRinging(UncheckedBaseModel): + on: typing.Literal["call.ringing"] = "call.ringing" + filters: typing.Optional[typing.List[PhoneNumberCallRingingHookFilter]] = None + do: typing.List[PhoneNumberHookCallRingingDoItem] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateVonagePhoneNumberDtoHooksItem_CallEnding(UncheckedBaseModel): + on: typing.Literal["call.ending"] = "call.ending" + filters: typing.Optional[typing.List[PhoneNumberCallEndingHookFilter]] = None + do: typing.Optional[PhoneNumberHookCallEndingDo] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateVonagePhoneNumberDtoHooksItem = typing_extensions.Annotated[ + typing.Union[UpdateVonagePhoneNumberDtoHooksItem_CallRinging, UpdateVonagePhoneNumberDtoHooksItem_CallEnding], + UnionMetadata(discriminant="on"), +] diff --git a/src/vapi/types/update_webhook_credential_dto.py b/src/vapi/types/update_webhook_credential_dto.py new file mode 100644 index 00000000..6f8d3252 --- /dev/null +++ b/src/vapi/types/update_webhook_credential_dto.py @@ -0,0 +1,34 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .update_webhook_credential_dto_authentication_plan import UpdateWebhookCredentialDtoAuthenticationPlan + + +class UpdateWebhookCredentialDto(UncheckedBaseModel): + authentication_plan: typing_extensions.Annotated[ + typing.Optional[UpdateWebhookCredentialDtoAuthenticationPlan], + FieldMetadata(alias="authenticationPlan"), + pydantic.Field( + alias="authenticationPlan", + description="This is the authentication plan. Supports OAuth2 RFC 6749, HMAC signing, and Bearer authentication.", + ), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/update_webhook_credential_dto_authentication_plan.py b/src/vapi/types/update_webhook_credential_dto_authentication_plan.py new file mode 100644 index 00000000..71469f5f --- /dev/null +++ b/src/vapi/types/update_webhook_credential_dto_authentication_plan.py @@ -0,0 +1,115 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .hmac_authentication_plan_algorithm import HmacAuthenticationPlanAlgorithm +from .hmac_authentication_plan_signature_encoding import HmacAuthenticationPlanSignatureEncoding + + +class UpdateWebhookCredentialDtoAuthenticationPlan_Oauth2(UncheckedBaseModel): + """ + This is the authentication plan. Supports OAuth2 RFC 6749, HMAC signing, and Bearer authentication. + """ + + type: typing.Literal["oauth2"] = "oauth2" + url: str + client_id: typing_extensions.Annotated[str, FieldMetadata(alias="clientId"), pydantic.Field(alias="clientId")] + client_secret: typing_extensions.Annotated[ + str, FieldMetadata(alias="clientSecret"), pydantic.Field(alias="clientSecret") + ] + scope: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWebhookCredentialDtoAuthenticationPlan_Hmac(UncheckedBaseModel): + """ + This is the authentication plan. Supports OAuth2 RFC 6749, HMAC signing, and Bearer authentication. + """ + + type: typing.Literal["hmac"] = "hmac" + secret_key: typing_extensions.Annotated[str, FieldMetadata(alias="secretKey"), pydantic.Field(alias="secretKey")] + algorithm: HmacAuthenticationPlanAlgorithm + signature_header: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="signatureHeader"), pydantic.Field(alias="signatureHeader") + ] = None + timestamp_header: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="timestampHeader"), pydantic.Field(alias="timestampHeader") + ] = None + signature_prefix: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="signaturePrefix"), pydantic.Field(alias="signaturePrefix") + ] = None + include_timestamp: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="includeTimestamp"), pydantic.Field(alias="includeTimestamp") + ] = None + payload_format: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="payloadFormat"), pydantic.Field(alias="payloadFormat") + ] = None + message_id_header: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="messageIdHeader"), pydantic.Field(alias="messageIdHeader") + ] = None + signature_encoding: typing_extensions.Annotated[ + typing.Optional[HmacAuthenticationPlanSignatureEncoding], + FieldMetadata(alias="signatureEncoding"), + pydantic.Field(alias="signatureEncoding"), + ] = None + secret_is_base_64: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="secretIsBase64"), pydantic.Field(alias="secretIsBase64") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWebhookCredentialDtoAuthenticationPlan_Bearer(UncheckedBaseModel): + """ + This is the authentication plan. Supports OAuth2 RFC 6749, HMAC signing, and Bearer authentication. + """ + + type: typing.Literal["bearer"] = "bearer" + token: str + header_name: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="headerName"), pydantic.Field(alias="headerName") + ] = None + bearer_prefix_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="bearerPrefixEnabled"), pydantic.Field(alias="bearerPrefixEnabled") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateWebhookCredentialDtoAuthenticationPlan = typing_extensions.Annotated[ + typing.Union[ + UpdateWebhookCredentialDtoAuthenticationPlan_Oauth2, + UpdateWebhookCredentialDtoAuthenticationPlan_Hmac, + UpdateWebhookCredentialDtoAuthenticationPlan_Bearer, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/update_well_said_credential_dto.py b/src/vapi/types/update_well_said_credential_dto.py new file mode 100644 index 00000000..9381909d --- /dev/null +++ b/src/vapi/types/update_well_said_credential_dto.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class UpdateWellSaidCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/update_workflow_dto.py b/src/vapi/types/update_workflow_dto.py new file mode 100644 index 00000000..5b7322bf --- /dev/null +++ b/src/vapi/types/update_workflow_dto.py @@ -0,0 +1,204 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .analysis_plan import AnalysisPlan +from .artifact_plan import ArtifactPlan +from .background_speech_denoising_plan import BackgroundSpeechDenoisingPlan +from .compliance_plan import CompliancePlan +from .edge import Edge +from .keypad_input_plan import KeypadInputPlan +from .langfuse_observability_plan import LangfuseObservabilityPlan +from .monitor_plan import MonitorPlan +from .server import Server +from .start_speaking_plan import StartSpeakingPlan +from .stop_speaking_plan import StopSpeakingPlan +from .update_workflow_dto_background_sound import UpdateWorkflowDtoBackgroundSound +from .update_workflow_dto_credentials_item import UpdateWorkflowDtoCredentialsItem +from .update_workflow_dto_hooks_item import UpdateWorkflowDtoHooksItem +from .update_workflow_dto_model import UpdateWorkflowDtoModel +from .update_workflow_dto_nodes_item import UpdateWorkflowDtoNodesItem +from .update_workflow_dto_transcriber import UpdateWorkflowDtoTranscriber +from .update_workflow_dto_voice import UpdateWorkflowDtoVoice +from .update_workflow_dto_voicemail_detection import UpdateWorkflowDtoVoicemailDetection + + +class UpdateWorkflowDto(UncheckedBaseModel): + nodes: typing.Optional[typing.List[UpdateWorkflowDtoNodesItem]] = None + model: typing.Optional[UpdateWorkflowDtoModel] = pydantic.Field(default=None) + """ + This is the model for the workflow. + + This can be overridden at node level using `nodes[n].model`. + """ + + transcriber: typing.Optional[UpdateWorkflowDtoTranscriber] = pydantic.Field(default=None) + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + voice: typing.Optional[UpdateWorkflowDtoVoice] = pydantic.Field(default=None) + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + observability_plan: typing_extensions.Annotated[ + typing.Optional[LangfuseObservabilityPlan], + FieldMetadata(alias="observabilityPlan"), + pydantic.Field( + alias="observabilityPlan", + description="This is the plan for observability of workflow's calls.\n\nCurrently, only Langfuse is supported.", + ), + ] = None + background_sound: typing_extensions.Annotated[ + typing.Optional[UpdateWorkflowDtoBackgroundSound], + FieldMetadata(alias="backgroundSound"), + pydantic.Field( + alias="backgroundSound", + description="This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'.\nYou can also provide a custom sound by providing a URL to an audio file.", + ), + ] = None + hooks: typing.Optional[typing.List[UpdateWorkflowDtoHooksItem]] = pydantic.Field(default=None) + """ + This is a set of actions that will be performed on certain events. + """ + + credentials: typing.Optional[typing.List[UpdateWorkflowDtoCredentialsItem]] = pydantic.Field(default=None) + """ + These are dynamic credentials that will be used for the workflow calls. By default, all the credentials are available for use in the call but you can supplement an additional credentials using this. Dynamic credentials override existing credentials. + """ + + voicemail_detection: typing_extensions.Annotated[ + typing.Optional[UpdateWorkflowDtoVoicemailDetection], + FieldMetadata(alias="voicemailDetection"), + pydantic.Field( + alias="voicemailDetection", description="This is the voicemail detection plan for the workflow." + ), + ] = None + max_duration_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="maxDurationSeconds"), + pydantic.Field( + alias="maxDurationSeconds", + description="This is the maximum duration of the call in seconds.\n\nAfter this duration, the call will automatically end.\n\nDefault is 1800 (30 minutes), max is 43200 (12 hours), and min is 10 seconds.", + ), + ] = None + name: typing.Optional[str] = None + edges: typing.Optional[typing.List[Edge]] = None + global_prompt: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="globalPrompt"), pydantic.Field(alias="globalPrompt") + ] = None + server: typing.Optional[Server] = pydantic.Field(default=None) + """ + This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema. + + The order of precedence is: + + 1. tool.server + 2. workflow.server / assistant.server + 3. phoneNumber.server + 4. org.server + """ + + compliance_plan: typing_extensions.Annotated[ + typing.Optional[CompliancePlan], + FieldMetadata(alias="compliancePlan"), + pydantic.Field( + alias="compliancePlan", + description="This is the compliance plan for the workflow. It allows you to configure HIPAA and other compliance settings.", + ), + ] = None + analysis_plan: typing_extensions.Annotated[ + typing.Optional[AnalysisPlan], + FieldMetadata(alias="analysisPlan"), + pydantic.Field( + alias="analysisPlan", + description="This is the plan for analysis of workflow's calls. Stored in `call.analysis`.", + ), + ] = None + artifact_plan: typing_extensions.Annotated[ + typing.Optional[ArtifactPlan], + FieldMetadata(alias="artifactPlan"), + pydantic.Field( + alias="artifactPlan", + description="This is the plan for artifacts generated during workflow's calls. Stored in `call.artifact`.", + ), + ] = None + start_speaking_plan: typing_extensions.Annotated[ + typing.Optional[StartSpeakingPlan], + FieldMetadata(alias="startSpeakingPlan"), + pydantic.Field( + alias="startSpeakingPlan", + description="This is the plan for when the workflow nodes should start talking.\n\nYou should configure this if you're running into these issues:\n- The assistant is too slow to start talking after the customer is done speaking.\n- The assistant is too fast to start talking after the customer is done speaking.\n- The assistant is so fast that it's actually interrupting the customer.", + ), + ] = None + stop_speaking_plan: typing_extensions.Annotated[ + typing.Optional[StopSpeakingPlan], + FieldMetadata(alias="stopSpeakingPlan"), + pydantic.Field( + alias="stopSpeakingPlan", + description="This is the plan for when workflow nodes should stop talking on customer interruption.\n\nYou should configure this if you're running into these issues:\n- The assistant is too slow to recognize customer's interruption.\n- The assistant is too fast to recognize customer's interruption.\n- The assistant is getting interrupted by phrases that are just acknowledgments.\n- The assistant is getting interrupted by background noises.\n- The assistant is not properly stopping -- it starts talking right after getting interrupted.", + ), + ] = None + monitor_plan: typing_extensions.Annotated[ + typing.Optional[MonitorPlan], + FieldMetadata(alias="monitorPlan"), + pydantic.Field( + alias="monitorPlan", + description="This is the plan for real-time monitoring of the workflow's calls.\n\nUsage:\n- To enable live listening of the workflow's calls, set `monitorPlan.listenEnabled` to `true`.\n- To enable live control of the workflow's calls, set `monitorPlan.controlEnabled` to `true`.", + ), + ] = None + background_speech_denoising_plan: typing_extensions.Annotated[ + typing.Optional[BackgroundSpeechDenoisingPlan], + FieldMetadata(alias="backgroundSpeechDenoisingPlan"), + pydantic.Field( + alias="backgroundSpeechDenoisingPlan", + description="This enables filtering of noise and background speech while the user is talking.\n\nFeatures:\n- Smart denoising using Krisp\n- Fourier denoising\n\nBoth can be used together. Order of precedence:\n- Smart denoising\n- Fourier denoising", + ), + ] = None + credential_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="credentialIds"), + pydantic.Field( + alias="credentialIds", + description="These are the credentials that will be used for the workflow calls. By default, all the credentials are available for use in the call but you can provide a subset using this.", + ), + ] = None + keypad_input_plan: typing_extensions.Annotated[ + typing.Optional[KeypadInputPlan], + FieldMetadata(alias="keypadInputPlan"), + pydantic.Field( + alias="keypadInputPlan", description="This is the plan for keypad input handling during workflow calls." + ), + ] = None + voicemail_message: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="voicemailMessage"), + pydantic.Field( + alias="voicemailMessage", + description="This is the message that the assistant will say if the call is forwarded to voicemail.\n\nIf unspecified, it will hang up.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(UpdateWorkflowDto) diff --git a/src/vapi/types/update_workflow_dto_background_sound.py b/src/vapi/types/update_workflow_dto_background_sound.py new file mode 100644 index 00000000..3cd2b106 --- /dev/null +++ b/src/vapi/types/update_workflow_dto_background_sound.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .update_workflow_dto_background_sound_zero import UpdateWorkflowDtoBackgroundSoundZero + +UpdateWorkflowDtoBackgroundSound = typing.Union[UpdateWorkflowDtoBackgroundSoundZero, str] diff --git a/src/vapi/types/update_workflow_dto_background_sound_zero.py b/src/vapi/types/update_workflow_dto_background_sound_zero.py new file mode 100644 index 00000000..ff4bc623 --- /dev/null +++ b/src/vapi/types/update_workflow_dto_background_sound_zero.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +UpdateWorkflowDtoBackgroundSoundZero = typing.Union[typing.Literal["off", "office"], typing.Any] diff --git a/src/vapi/types/update_workflow_dto_credentials_item.py b/src/vapi/types/update_workflow_dto_credentials_item.py new file mode 100644 index 00000000..702d0bf1 --- /dev/null +++ b/src/vapi/types/update_workflow_dto_credentials_item.py @@ -0,0 +1,1070 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .azure_blob_storage_bucket_plan import AzureBlobStorageBucketPlan +from .bucket_plan import BucketPlan +from .cloudflare_r_2_bucket_plan import CloudflareR2BucketPlan +from .create_anthropic_bedrock_credential_dto_authentication_plan import ( + CreateAnthropicBedrockCredentialDtoAuthenticationPlan, +) +from .create_anthropic_bedrock_credential_dto_region import CreateAnthropicBedrockCredentialDtoRegion +from .create_azure_credential_dto_region import CreateAzureCredentialDtoRegion +from .create_azure_credential_dto_service import CreateAzureCredentialDtoService +from .create_azure_open_ai_credential_dto_models_item import CreateAzureOpenAiCredentialDtoModelsItem +from .create_azure_open_ai_credential_dto_region import CreateAzureOpenAiCredentialDtoRegion +from .create_custom_credential_dto_authentication_plan import CreateCustomCredentialDtoAuthenticationPlan +from .create_custom_credential_dto_encryption_plan import CreateCustomCredentialDtoEncryptionPlan +from .create_webhook_credential_dto_authentication_plan import CreateWebhookCredentialDtoAuthenticationPlan +from .gcp_key import GcpKey +from .o_auth_2_authentication_plan import OAuth2AuthenticationPlan +from .oauth_2_authentication_session import Oauth2AuthenticationSession +from .sbc_configuration import SbcConfiguration +from .sip_trunk_gateway import SipTrunkGateway +from .sip_trunk_outbound_authentication_plan import SipTrunkOutboundAuthenticationPlan +from .supabase_bucket_plan import SupabaseBucketPlan + + +class UpdateWorkflowDtoCredentialsItem_11Labs(UncheckedBaseModel): + provider: typing.Literal["11labs"] = "11labs" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_Anthropic(UncheckedBaseModel): + provider: typing.Literal["anthropic"] = "anthropic" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_AnthropicBedrock(UncheckedBaseModel): + provider: typing.Literal["anthropic-bedrock"] = "anthropic-bedrock" + region: CreateAnthropicBedrockCredentialDtoRegion + authentication_plan: typing_extensions.Annotated[ + CreateAnthropicBedrockCredentialDtoAuthenticationPlan, + FieldMetadata(alias="authenticationPlan"), + pydantic.Field(alias="authenticationPlan"), + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_Anyscale(UncheckedBaseModel): + provider: typing.Literal["anyscale"] = "anyscale" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_AssemblyAi(UncheckedBaseModel): + provider: typing.Literal["assembly-ai"] = "assembly-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_AzureOpenai(UncheckedBaseModel): + provider: typing.Literal["azure-openai"] = "azure-openai" + region: CreateAzureOpenAiCredentialDtoRegion + models: typing.List[CreateAzureOpenAiCredentialDtoModelsItem] + open_ai_key: typing_extensions.Annotated[str, FieldMetadata(alias="openAIKey"), pydantic.Field(alias="openAIKey")] + ocp_apim_subscription_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="ocpApimSubscriptionKey"), + pydantic.Field(alias="ocpApimSubscriptionKey"), + ] = None + open_ai_endpoint: typing_extensions.Annotated[ + str, FieldMetadata(alias="openAIEndpoint"), pydantic.Field(alias="openAIEndpoint") + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_Azure(UncheckedBaseModel): + provider: typing.Literal["azure"] = "azure" + service: CreateAzureCredentialDtoService + region: typing.Optional[CreateAzureCredentialDtoRegion] = None + api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey") + ] = None + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="fallbackIndex"), pydantic.Field(alias="fallbackIndex") + ] = None + bucket_plan: typing_extensions.Annotated[ + typing.Optional[AzureBlobStorageBucketPlan], + FieldMetadata(alias="bucketPlan"), + pydantic.Field(alias="bucketPlan"), + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_ByoSipTrunk(UncheckedBaseModel): + provider: typing.Literal["byo-sip-trunk"] = "byo-sip-trunk" + gateways: typing.List[SipTrunkGateway] + outbound_authentication_plan: typing_extensions.Annotated[ + typing.Optional[SipTrunkOutboundAuthenticationPlan], + FieldMetadata(alias="outboundAuthenticationPlan"), + pydantic.Field(alias="outboundAuthenticationPlan"), + ] = None + outbound_leading_plus_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="outboundLeadingPlusEnabled"), + pydantic.Field(alias="outboundLeadingPlusEnabled"), + ] = None + tech_prefix: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="techPrefix"), pydantic.Field(alias="techPrefix") + ] = None + sip_diversion_header: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipDiversionHeader"), pydantic.Field(alias="sipDiversionHeader") + ] = None + sbc_configuration: typing_extensions.Annotated[ + typing.Optional[SbcConfiguration], + FieldMetadata(alias="sbcConfiguration"), + pydantic.Field(alias="sbcConfiguration"), + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_Cartesia(UncheckedBaseModel): + provider: typing.Literal["cartesia"] = "cartesia" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_Cerebras(UncheckedBaseModel): + provider: typing.Literal["cerebras"] = "cerebras" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_Cloudflare(UncheckedBaseModel): + provider: typing.Literal["cloudflare"] = "cloudflare" + account_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="accountId"), pydantic.Field(alias="accountId") + ] = None + api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey") + ] = None + account_email: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="accountEmail"), pydantic.Field(alias="accountEmail") + ] = None + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="fallbackIndex"), pydantic.Field(alias="fallbackIndex") + ] = None + bucket_plan: typing_extensions.Annotated[ + typing.Optional[CloudflareR2BucketPlan], FieldMetadata(alias="bucketPlan"), pydantic.Field(alias="bucketPlan") + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_CustomLlm(UncheckedBaseModel): + provider: typing.Literal["custom-llm"] = "custom-llm" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + authentication_plan: typing_extensions.Annotated[ + typing.Optional[OAuth2AuthenticationPlan], + FieldMetadata(alias="authenticationPlan"), + pydantic.Field(alias="authenticationPlan"), + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_Deepgram(UncheckedBaseModel): + provider: typing.Literal["deepgram"] = "deepgram" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + api_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="apiUrl"), pydantic.Field(alias="apiUrl") + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_Deepinfra(UncheckedBaseModel): + provider: typing.Literal["deepinfra"] = "deepinfra" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_DeepSeek(UncheckedBaseModel): + provider: typing.Literal["deep-seek"] = "deep-seek" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_Gcp(UncheckedBaseModel): + provider: typing.Literal["gcp"] = "gcp" + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="fallbackIndex"), pydantic.Field(alias="fallbackIndex") + ] = None + gcp_key: typing_extensions.Annotated[GcpKey, FieldMetadata(alias="gcpKey"), pydantic.Field(alias="gcpKey")] + region: typing.Optional[str] = None + bucket_plan: typing_extensions.Annotated[ + typing.Optional[BucketPlan], FieldMetadata(alias="bucketPlan"), pydantic.Field(alias="bucketPlan") + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_Gladia(UncheckedBaseModel): + provider: typing.Literal["gladia"] = "gladia" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_Gohighlevel(UncheckedBaseModel): + provider: typing.Literal["gohighlevel"] = "gohighlevel" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_Google(UncheckedBaseModel): + provider: typing.Literal["google"] = "google" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_Groq(UncheckedBaseModel): + provider: typing.Literal["groq"] = "groq" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_InflectionAi(UncheckedBaseModel): + provider: typing.Literal["inflection-ai"] = "inflection-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_Langfuse(UncheckedBaseModel): + provider: typing.Literal["langfuse"] = "langfuse" + public_key: typing_extensions.Annotated[str, FieldMetadata(alias="publicKey"), pydantic.Field(alias="publicKey")] + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + api_url: typing_extensions.Annotated[str, FieldMetadata(alias="apiUrl"), pydantic.Field(alias="apiUrl")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_Lmnt(UncheckedBaseModel): + provider: typing.Literal["lmnt"] = "lmnt" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_Make(UncheckedBaseModel): + provider: typing.Literal["make"] = "make" + team_id: typing_extensions.Annotated[str, FieldMetadata(alias="teamId"), pydantic.Field(alias="teamId")] + region: str + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_Openai(UncheckedBaseModel): + provider: typing.Literal["openai"] = "openai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_Openrouter(UncheckedBaseModel): + provider: typing.Literal["openrouter"] = "openrouter" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_PerplexityAi(UncheckedBaseModel): + provider: typing.Literal["perplexity-ai"] = "perplexity-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_Playht(UncheckedBaseModel): + provider: typing.Literal["playht"] = "playht" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + user_id: typing_extensions.Annotated[str, FieldMetadata(alias="userId"), pydantic.Field(alias="userId")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_RimeAi(UncheckedBaseModel): + provider: typing.Literal["rime-ai"] = "rime-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_Runpod(UncheckedBaseModel): + provider: typing.Literal["runpod"] = "runpod" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_S3(UncheckedBaseModel): + provider: typing.Literal["s3"] = "s3" + aws_access_key_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="awsAccessKeyId"), pydantic.Field(alias="awsAccessKeyId") + ] + aws_secret_access_key: typing_extensions.Annotated[ + str, FieldMetadata(alias="awsSecretAccessKey"), pydantic.Field(alias="awsSecretAccessKey") + ] + region: str + s_3_bucket_name: typing_extensions.Annotated[ + str, FieldMetadata(alias="s3BucketName"), pydantic.Field(alias="s3BucketName") + ] + s_3_path_prefix: typing_extensions.Annotated[ + str, FieldMetadata(alias="s3PathPrefix"), pydantic.Field(alias="s3PathPrefix") + ] + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="fallbackIndex"), pydantic.Field(alias="fallbackIndex") + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_Supabase(UncheckedBaseModel): + provider: typing.Literal["supabase"] = "supabase" + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="fallbackIndex"), pydantic.Field(alias="fallbackIndex") + ] = None + bucket_plan: typing_extensions.Annotated[ + typing.Optional[SupabaseBucketPlan], FieldMetadata(alias="bucketPlan"), pydantic.Field(alias="bucketPlan") + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_SmallestAi(UncheckedBaseModel): + provider: typing.Literal["smallest-ai"] = "smallest-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_Tavus(UncheckedBaseModel): + provider: typing.Literal["tavus"] = "tavus" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_TogetherAi(UncheckedBaseModel): + provider: typing.Literal["together-ai"] = "together-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_Twilio(UncheckedBaseModel): + provider: typing.Literal["twilio"] = "twilio" + auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="authToken"), pydantic.Field(alias="authToken") + ] = None + api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey") + ] = None + api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="apiSecret"), pydantic.Field(alias="apiSecret") + ] = None + account_sid: typing_extensions.Annotated[str, FieldMetadata(alias="accountSid"), pydantic.Field(alias="accountSid")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_Vonage(UncheckedBaseModel): + provider: typing.Literal["vonage"] = "vonage" + api_secret: typing_extensions.Annotated[str, FieldMetadata(alias="apiSecret"), pydantic.Field(alias="apiSecret")] + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_Webhook(UncheckedBaseModel): + provider: typing.Literal["webhook"] = "webhook" + authentication_plan: typing_extensions.Annotated[ + CreateWebhookCredentialDtoAuthenticationPlan, + FieldMetadata(alias="authenticationPlan"), + pydantic.Field(alias="authenticationPlan"), + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_CustomCredential(UncheckedBaseModel): + provider: typing.Literal["custom-credential"] = "custom-credential" + authentication_plan: typing_extensions.Annotated[ + CreateCustomCredentialDtoAuthenticationPlan, + FieldMetadata(alias="authenticationPlan"), + pydantic.Field(alias="authenticationPlan"), + ] + encryption_plan: typing_extensions.Annotated[ + typing.Optional[CreateCustomCredentialDtoEncryptionPlan], + FieldMetadata(alias="encryptionPlan"), + pydantic.Field(alias="encryptionPlan"), + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_Xai(UncheckedBaseModel): + provider: typing.Literal["xai"] = "xai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_Neuphonic(UncheckedBaseModel): + provider: typing.Literal["neuphonic"] = "neuphonic" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_Hume(UncheckedBaseModel): + provider: typing.Literal["hume"] = "hume" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_Mistral(UncheckedBaseModel): + provider: typing.Literal["mistral"] = "mistral" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_Speechmatics(UncheckedBaseModel): + provider: typing.Literal["speechmatics"] = "speechmatics" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_Soniox(UncheckedBaseModel): + provider: typing.Literal["soniox"] = "soniox" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_Trieve(UncheckedBaseModel): + provider: typing.Literal["trieve"] = "trieve" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_GoogleCalendarOauth2Client(UncheckedBaseModel): + provider: typing.Literal["google.calendar.oauth2-client"] = "google.calendar.oauth2-client" + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_GoogleCalendarOauth2Authorization(UncheckedBaseModel): + provider: typing.Literal["google.calendar.oauth2-authorization"] = "google.calendar.oauth2-authorization" + authorization_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="authorizationId"), pydantic.Field(alias="authorizationId") + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_GoogleSheetsOauth2Authorization(UncheckedBaseModel): + provider: typing.Literal["google.sheets.oauth2-authorization"] = "google.sheets.oauth2-authorization" + authorization_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="authorizationId"), pydantic.Field(alias="authorizationId") + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_SlackOauth2Authorization(UncheckedBaseModel): + provider: typing.Literal["slack.oauth2-authorization"] = "slack.oauth2-authorization" + authorization_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="authorizationId"), pydantic.Field(alias="authorizationId") + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_GhlOauth2Authorization(UncheckedBaseModel): + provider: typing.Literal["ghl.oauth2-authorization"] = "ghl.oauth2-authorization" + authentication_session: typing_extensions.Annotated[ + Oauth2AuthenticationSession, + FieldMetadata(alias="authenticationSession"), + pydantic.Field(alias="authenticationSession"), + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_Inworld(UncheckedBaseModel): + provider: typing.Literal["inworld"] = "inworld" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_Minimax(UncheckedBaseModel): + provider: typing.Literal["minimax"] = "minimax" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + group_id: typing_extensions.Annotated[str, FieldMetadata(alias="groupId"), pydantic.Field(alias="groupId")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_Wellsaid(UncheckedBaseModel): + provider: typing.Literal["wellsaid"] = "wellsaid" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_Email(UncheckedBaseModel): + provider: typing.Literal["email"] = "email" + email: str + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoCredentialsItem_SlackWebhook(UncheckedBaseModel): + provider: typing.Literal["slack-webhook"] = "slack-webhook" + webhook_url: typing_extensions.Annotated[str, FieldMetadata(alias="webhookUrl"), pydantic.Field(alias="webhookUrl")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateWorkflowDtoCredentialsItem = typing_extensions.Annotated[ + typing.Union[ + UpdateWorkflowDtoCredentialsItem_11Labs, + UpdateWorkflowDtoCredentialsItem_Anthropic, + UpdateWorkflowDtoCredentialsItem_AnthropicBedrock, + UpdateWorkflowDtoCredentialsItem_Anyscale, + UpdateWorkflowDtoCredentialsItem_AssemblyAi, + UpdateWorkflowDtoCredentialsItem_AzureOpenai, + UpdateWorkflowDtoCredentialsItem_Azure, + UpdateWorkflowDtoCredentialsItem_ByoSipTrunk, + UpdateWorkflowDtoCredentialsItem_Cartesia, + UpdateWorkflowDtoCredentialsItem_Cerebras, + UpdateWorkflowDtoCredentialsItem_Cloudflare, + UpdateWorkflowDtoCredentialsItem_CustomLlm, + UpdateWorkflowDtoCredentialsItem_Deepgram, + UpdateWorkflowDtoCredentialsItem_Deepinfra, + UpdateWorkflowDtoCredentialsItem_DeepSeek, + UpdateWorkflowDtoCredentialsItem_Gcp, + UpdateWorkflowDtoCredentialsItem_Gladia, + UpdateWorkflowDtoCredentialsItem_Gohighlevel, + UpdateWorkflowDtoCredentialsItem_Google, + UpdateWorkflowDtoCredentialsItem_Groq, + UpdateWorkflowDtoCredentialsItem_InflectionAi, + UpdateWorkflowDtoCredentialsItem_Langfuse, + UpdateWorkflowDtoCredentialsItem_Lmnt, + UpdateWorkflowDtoCredentialsItem_Make, + UpdateWorkflowDtoCredentialsItem_Openai, + UpdateWorkflowDtoCredentialsItem_Openrouter, + UpdateWorkflowDtoCredentialsItem_PerplexityAi, + UpdateWorkflowDtoCredentialsItem_Playht, + UpdateWorkflowDtoCredentialsItem_RimeAi, + UpdateWorkflowDtoCredentialsItem_Runpod, + UpdateWorkflowDtoCredentialsItem_S3, + UpdateWorkflowDtoCredentialsItem_Supabase, + UpdateWorkflowDtoCredentialsItem_SmallestAi, + UpdateWorkflowDtoCredentialsItem_Tavus, + UpdateWorkflowDtoCredentialsItem_TogetherAi, + UpdateWorkflowDtoCredentialsItem_Twilio, + UpdateWorkflowDtoCredentialsItem_Vonage, + UpdateWorkflowDtoCredentialsItem_Webhook, + UpdateWorkflowDtoCredentialsItem_CustomCredential, + UpdateWorkflowDtoCredentialsItem_Xai, + UpdateWorkflowDtoCredentialsItem_Neuphonic, + UpdateWorkflowDtoCredentialsItem_Hume, + UpdateWorkflowDtoCredentialsItem_Mistral, + UpdateWorkflowDtoCredentialsItem_Speechmatics, + UpdateWorkflowDtoCredentialsItem_Soniox, + UpdateWorkflowDtoCredentialsItem_Trieve, + UpdateWorkflowDtoCredentialsItem_GoogleCalendarOauth2Client, + UpdateWorkflowDtoCredentialsItem_GoogleCalendarOauth2Authorization, + UpdateWorkflowDtoCredentialsItem_GoogleSheetsOauth2Authorization, + UpdateWorkflowDtoCredentialsItem_SlackOauth2Authorization, + UpdateWorkflowDtoCredentialsItem_GhlOauth2Authorization, + UpdateWorkflowDtoCredentialsItem_Inworld, + UpdateWorkflowDtoCredentialsItem_Minimax, + UpdateWorkflowDtoCredentialsItem_Wellsaid, + UpdateWorkflowDtoCredentialsItem_Email, + UpdateWorkflowDtoCredentialsItem_SlackWebhook, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/update_workflow_dto_hooks_item.py b/src/vapi/types/update_workflow_dto_hooks_item.py new file mode 100644 index 00000000..003957f0 --- /dev/null +++ b/src/vapi/types/update_workflow_dto_hooks_item.py @@ -0,0 +1,17 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted +from .call_hook_call_ending import CallHookCallEnding +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout +from .call_hook_model_response_timeout import CallHookModelResponseTimeout + +UpdateWorkflowDtoHooksItem = typing.Union[ + CallHookCallEnding, + CallHookAssistantSpeechInterrupted, + CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechTimeout, + CallHookModelResponseTimeout, +] diff --git a/src/vapi/types/update_workflow_dto_model.py b/src/vapi/types/update_workflow_dto_model.py new file mode 100644 index 00000000..3e1dba12 --- /dev/null +++ b/src/vapi/types/update_workflow_dto_model.py @@ -0,0 +1,161 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .anthropic_thinking_config import AnthropicThinkingConfig +from .workflow_anthropic_bedrock_model_model import WorkflowAnthropicBedrockModelModel +from .workflow_anthropic_model_model import WorkflowAnthropicModelModel +from .workflow_custom_model_metadata_send_mode import WorkflowCustomModelMetadataSendMode +from .workflow_google_model_model import WorkflowGoogleModelModel +from .workflow_open_ai_model_model import WorkflowOpenAiModelModel + + +class UpdateWorkflowDtoModel_Openai(UncheckedBaseModel): + """ + This is the model for the workflow. + + This can be overridden at node level using `nodes[n].model`. + """ + + provider: typing.Literal["openai"] = "openai" + model: WorkflowOpenAiModelModel + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoModel_Anthropic(UncheckedBaseModel): + """ + This is the model for the workflow. + + This can be overridden at node level using `nodes[n].model`. + """ + + provider: typing.Literal["anthropic"] = "anthropic" + model: WorkflowAnthropicModelModel + thinking: typing.Optional[AnthropicThinkingConfig] = None + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoModel_AnthropicBedrock(UncheckedBaseModel): + """ + This is the model for the workflow. + + This can be overridden at node level using `nodes[n].model`. + """ + + provider: typing.Literal["anthropic-bedrock"] = "anthropic-bedrock" + model: WorkflowAnthropicBedrockModelModel + thinking: typing.Optional[AnthropicThinkingConfig] = None + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoModel_Google(UncheckedBaseModel): + """ + This is the model for the workflow. + + This can be overridden at node level using `nodes[n].model`. + """ + + provider: typing.Literal["google"] = "google" + model: WorkflowGoogleModelModel + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoModel_CustomLlm(UncheckedBaseModel): + """ + This is the model for the workflow. + + This can be overridden at node level using `nodes[n].model`. + """ + + provider: typing.Literal["custom-llm"] = "custom-llm" + metadata_send_mode: typing_extensions.Annotated[ + typing.Optional[WorkflowCustomModelMetadataSendMode], + FieldMetadata(alias="metadataSendMode"), + pydantic.Field(alias="metadataSendMode"), + ] = None + url: str + headers: typing.Optional[typing.Dict[str, typing.Any]] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + model: str + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateWorkflowDtoModel = typing_extensions.Annotated[ + typing.Union[ + UpdateWorkflowDtoModel_Openai, + UpdateWorkflowDtoModel_Anthropic, + UpdateWorkflowDtoModel_AnthropicBedrock, + UpdateWorkflowDtoModel_Google, + UpdateWorkflowDtoModel_CustomLlm, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/update_workflow_dto_nodes_item.py b/src/vapi/types/update_workflow_dto_nodes_item.py new file mode 100644 index 00000000..7f55b26b --- /dev/null +++ b/src/vapi/types/update_workflow_dto_nodes_item.py @@ -0,0 +1,82 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .conversation_node_model import ConversationNodeModel +from .conversation_node_tools_item import ConversationNodeToolsItem +from .conversation_node_transcriber import ConversationNodeTranscriber +from .conversation_node_voice import ConversationNodeVoice +from .global_node_plan import GlobalNodePlan +from .tool_node_tool import ToolNodeTool +from .variable_extraction_plan import VariableExtractionPlan + + +class UpdateWorkflowDtoNodesItem_Conversation(UncheckedBaseModel): + type: typing.Literal["conversation"] = "conversation" + model: typing.Optional[ConversationNodeModel] = None + transcriber: typing.Optional[ConversationNodeTranscriber] = None + voice: typing.Optional[ConversationNodeVoice] = None + tools: typing.Optional[typing.List[ConversationNodeToolsItem]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + prompt: typing.Optional[str] = None + global_node_plan: typing_extensions.Annotated[ + typing.Optional[GlobalNodePlan], FieldMetadata(alias="globalNodePlan"), pydantic.Field(alias="globalNodePlan") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + name: str + is_start: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="isStart"), pydantic.Field(alias="isStart") + ] = None + metadata: typing.Optional[typing.Dict[str, typing.Any]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoNodesItem_Tool(UncheckedBaseModel): + type: typing.Literal["tool"] = "tool" + tool: typing.Optional[ToolNodeTool] = None + tool_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="toolId"), pydantic.Field(alias="toolId") + ] = None + name: str + is_start: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="isStart"), pydantic.Field(alias="isStart") + ] = None + metadata: typing.Optional[typing.Dict[str, typing.Any]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateWorkflowDtoNodesItem = typing_extensions.Annotated[ + typing.Union[UpdateWorkflowDtoNodesItem_Conversation, UpdateWorkflowDtoNodesItem_Tool], + UnionMetadata(discriminant="type"), +] +update_forward_refs(UpdateWorkflowDtoNodesItem_Conversation) +update_forward_refs(UpdateWorkflowDtoNodesItem_Tool) diff --git a/src/vapi/types/update_workflow_dto_transcriber.py b/src/vapi/types/update_workflow_dto_transcriber.py new file mode 100644 index 00000000..e8a25970 --- /dev/null +++ b/src/vapi/types/update_workflow_dto_transcriber.py @@ -0,0 +1,562 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .assembly_ai_transcriber_language import AssemblyAiTranscriberLanguage +from .assembly_ai_transcriber_speech_model import AssemblyAiTranscriberSpeechModel +from .azure_speech_transcriber_language import AzureSpeechTranscriberLanguage +from .azure_speech_transcriber_segmentation_strategy import AzureSpeechTranscriberSegmentationStrategy +from .cartesia_transcriber_language import CartesiaTranscriberLanguage +from .cartesia_transcriber_model import CartesiaTranscriberModel +from .deepgram_transcriber_language import DeepgramTranscriberLanguage +from .deepgram_transcriber_model import DeepgramTranscriberModel +from .eleven_labs_transcriber_language import ElevenLabsTranscriberLanguage +from .eleven_labs_transcriber_model import ElevenLabsTranscriberModel +from .fallback_transcriber_plan import FallbackTranscriberPlan +from .gladia_custom_vocabulary_config_dto import GladiaCustomVocabularyConfigDto +from .gladia_transcriber_language import GladiaTranscriberLanguage +from .gladia_transcriber_language_behaviour import GladiaTranscriberLanguageBehaviour +from .gladia_transcriber_languages import GladiaTranscriberLanguages +from .gladia_transcriber_model import GladiaTranscriberModel +from .gladia_transcriber_region import GladiaTranscriberRegion +from .google_transcriber_language import GoogleTranscriberLanguage +from .google_transcriber_model import GoogleTranscriberModel +from .open_ai_transcriber_language import OpenAiTranscriberLanguage +from .open_ai_transcriber_model import OpenAiTranscriberModel +from .server import Server +from .soniox_transcriber_language import SonioxTranscriberLanguage +from .soniox_transcriber_model import SonioxTranscriberModel +from .speechmatics_custom_vocabulary_item import SpeechmaticsCustomVocabularyItem +from .speechmatics_transcriber_language import SpeechmaticsTranscriberLanguage +from .speechmatics_transcriber_model import SpeechmaticsTranscriberModel +from .speechmatics_transcriber_numeral_style import SpeechmaticsTranscriberNumeralStyle +from .speechmatics_transcriber_operating_point import SpeechmaticsTranscriberOperatingPoint +from .speechmatics_transcriber_region import SpeechmaticsTranscriberRegion +from .talkscriber_transcriber_language import TalkscriberTranscriberLanguage +from .talkscriber_transcriber_model import TalkscriberTranscriberModel + + +class UpdateWorkflowDtoTranscriber_AssemblyAi(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["assembly-ai"] = "assembly-ai" + language: typing.Optional[AssemblyAiTranscriberLanguage] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="confidenceThreshold"), pydantic.Field(alias="confidenceThreshold") + ] = None + format_turns: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="formatTurns"), pydantic.Field(alias="formatTurns") + ] = None + end_of_turn_confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="endOfTurnConfidenceThreshold"), + pydantic.Field(alias="endOfTurnConfidenceThreshold"), + ] = None + min_end_of_turn_silence_when_confident: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minEndOfTurnSilenceWhenConfident"), + pydantic.Field(alias="minEndOfTurnSilenceWhenConfident"), + ] = None + word_finalization_max_wait_time: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="wordFinalizationMaxWaitTime"), + pydantic.Field(alias="wordFinalizationMaxWaitTime"), + ] = None + max_turn_silence: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTurnSilence"), pydantic.Field(alias="maxTurnSilence") + ] = None + vad_assisted_endpointing_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="vadAssistedEndpointingEnabled"), + pydantic.Field(alias="vadAssistedEndpointingEnabled"), + ] = None + speech_model: typing_extensions.Annotated[ + typing.Optional[AssemblyAiTranscriberSpeechModel], + FieldMetadata(alias="speechModel"), + pydantic.Field(alias="speechModel"), + ] = None + realtime_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="realtimeUrl"), pydantic.Field(alias="realtimeUrl") + ] = None + word_boost: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="wordBoost"), pydantic.Field(alias="wordBoost") + ] = None + keyterms_prompt: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="keytermsPrompt"), pydantic.Field(alias="keytermsPrompt") + ] = None + end_utterance_silence_threshold: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="endUtteranceSilenceThreshold"), + pydantic.Field(alias="endUtteranceSilenceThreshold"), + ] = None + disable_partial_transcripts: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="disablePartialTranscripts"), + pydantic.Field(alias="disablePartialTranscripts"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoTranscriber_Azure(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["azure"] = "azure" + language: typing.Optional[AzureSpeechTranscriberLanguage] = None + segmentation_strategy: typing_extensions.Annotated[ + typing.Optional[AzureSpeechTranscriberSegmentationStrategy], + FieldMetadata(alias="segmentationStrategy"), + pydantic.Field(alias="segmentationStrategy"), + ] = None + segmentation_silence_timeout_ms: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="segmentationSilenceTimeoutMs"), + pydantic.Field(alias="segmentationSilenceTimeoutMs"), + ] = None + segmentation_maximum_time_ms: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="segmentationMaximumTimeMs"), + pydantic.Field(alias="segmentationMaximumTimeMs"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoTranscriber_CustomTranscriber(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["custom-transcriber"] = "custom-transcriber" + server: Server + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoTranscriber_Deepgram(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["deepgram"] = "deepgram" + model: typing.Optional[DeepgramTranscriberModel] = None + language: typing.Optional[DeepgramTranscriberLanguage] = None + smart_format: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smartFormat"), pydantic.Field(alias="smartFormat") + ] = None + mip_opt_out: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="mipOptOut"), pydantic.Field(alias="mipOptOut") + ] = None + numerals: typing.Optional[bool] = None + profanity_filter: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="profanityFilter"), pydantic.Field(alias="profanityFilter") + ] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="confidenceThreshold"), pydantic.Field(alias="confidenceThreshold") + ] = None + eager_eot_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="eagerEotThreshold"), pydantic.Field(alias="eagerEotThreshold") + ] = None + eot_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="eotThreshold"), pydantic.Field(alias="eotThreshold") + ] = None + eot_timeout_ms: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="eotTimeoutMs"), pydantic.Field(alias="eotTimeoutMs") + ] = None + keywords: typing.Optional[typing.List[str]] = None + keyterm: typing.Optional[typing.List[str]] = None + endpointing: typing.Optional[float] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoTranscriber_11Labs(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["11labs"] = "11labs" + model: typing.Optional[ElevenLabsTranscriberModel] = None + language: typing.Optional[ElevenLabsTranscriberLanguage] = None + silence_threshold_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="silenceThresholdSeconds"), + pydantic.Field(alias="silenceThresholdSeconds"), + ] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="confidenceThreshold"), pydantic.Field(alias="confidenceThreshold") + ] = None + min_speech_duration_ms: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="minSpeechDurationMs"), pydantic.Field(alias="minSpeechDurationMs") + ] = None + min_silence_duration_ms: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minSilenceDurationMs"), + pydantic.Field(alias="minSilenceDurationMs"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoTranscriber_Gladia(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["gladia"] = "gladia" + model: typing.Optional[GladiaTranscriberModel] = None + language_behaviour: typing_extensions.Annotated[ + typing.Optional[GladiaTranscriberLanguageBehaviour], + FieldMetadata(alias="languageBehaviour"), + pydantic.Field(alias="languageBehaviour"), + ] = None + language: typing.Optional[GladiaTranscriberLanguage] = None + languages: typing.Optional[GladiaTranscriberLanguages] = None + transcription_hint: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="transcriptionHint"), pydantic.Field(alias="transcriptionHint") + ] = None + prosody: typing.Optional[bool] = None + audio_enhancer: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="audioEnhancer"), pydantic.Field(alias="audioEnhancer") + ] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="confidenceThreshold"), pydantic.Field(alias="confidenceThreshold") + ] = None + endpointing: typing.Optional[float] = None + speech_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="speechThreshold"), pydantic.Field(alias="speechThreshold") + ] = None + custom_vocabulary_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="customVocabularyEnabled"), + pydantic.Field(alias="customVocabularyEnabled"), + ] = None + custom_vocabulary_config: typing_extensions.Annotated[ + typing.Optional[GladiaCustomVocabularyConfigDto], + FieldMetadata(alias="customVocabularyConfig"), + pydantic.Field(alias="customVocabularyConfig"), + ] = None + region: typing.Optional[GladiaTranscriberRegion] = None + receive_partial_transcripts: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="receivePartialTranscripts"), + pydantic.Field(alias="receivePartialTranscripts"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoTranscriber_Google(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["google"] = "google" + model: typing.Optional[GoogleTranscriberModel] = None + language: typing.Optional[GoogleTranscriberLanguage] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoTranscriber_Speechmatics(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["speechmatics"] = "speechmatics" + model: typing.Optional[SpeechmaticsTranscriberModel] = None + language: typing.Optional[SpeechmaticsTranscriberLanguage] = None + operating_point: typing_extensions.Annotated[ + typing.Optional[SpeechmaticsTranscriberOperatingPoint], + FieldMetadata(alias="operatingPoint"), + pydantic.Field(alias="operatingPoint"), + ] = None + region: typing.Optional[SpeechmaticsTranscriberRegion] = None + enable_diarization: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="enableDiarization"), pydantic.Field(alias="enableDiarization") + ] = None + max_delay: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxDelay"), pydantic.Field(alias="maxDelay") + ] = None + custom_vocabulary: typing_extensions.Annotated[ + typing.List[SpeechmaticsCustomVocabularyItem], + FieldMetadata(alias="customVocabulary"), + pydantic.Field(alias="customVocabulary"), + ] + numeral_style: typing_extensions.Annotated[ + typing.Optional[SpeechmaticsTranscriberNumeralStyle], + FieldMetadata(alias="numeralStyle"), + pydantic.Field(alias="numeralStyle"), + ] = None + end_of_turn_sensitivity: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="endOfTurnSensitivity"), + pydantic.Field(alias="endOfTurnSensitivity"), + ] = None + remove_disfluencies: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="removeDisfluencies"), pydantic.Field(alias="removeDisfluencies") + ] = None + minimum_speech_duration: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minimumSpeechDuration"), + pydantic.Field(alias="minimumSpeechDuration"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoTranscriber_Talkscriber(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["talkscriber"] = "talkscriber" + model: typing.Optional[TalkscriberTranscriberModel] = None + language: typing.Optional[TalkscriberTranscriberLanguage] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoTranscriber_Openai(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["openai"] = "openai" + model: OpenAiTranscriberModel + language: typing.Optional[OpenAiTranscriberLanguage] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoTranscriber_Cartesia(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["cartesia"] = "cartesia" + model: typing.Optional[CartesiaTranscriberModel] = None + language: typing.Optional[CartesiaTranscriberLanguage] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoTranscriber_Soniox(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["soniox"] = "soniox" + model: typing.Optional[SonioxTranscriberModel] = None + language: typing.Optional[SonioxTranscriberLanguage] = None + language_hints_strict: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="languageHintsStrict"), pydantic.Field(alias="languageHintsStrict") + ] = None + max_endpoint_delay_ms: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxEndpointDelayMs"), pydantic.Field(alias="maxEndpointDelayMs") + ] = None + custom_vocabulary: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="customVocabulary"), + pydantic.Field(alias="customVocabulary"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateWorkflowDtoTranscriber = typing_extensions.Annotated[ + typing.Union[ + UpdateWorkflowDtoTranscriber_AssemblyAi, + UpdateWorkflowDtoTranscriber_Azure, + UpdateWorkflowDtoTranscriber_CustomTranscriber, + UpdateWorkflowDtoTranscriber_Deepgram, + UpdateWorkflowDtoTranscriber_11Labs, + UpdateWorkflowDtoTranscriber_Gladia, + UpdateWorkflowDtoTranscriber_Google, + UpdateWorkflowDtoTranscriber_Speechmatics, + UpdateWorkflowDtoTranscriber_Talkscriber, + UpdateWorkflowDtoTranscriber_Openai, + UpdateWorkflowDtoTranscriber_Cartesia, + UpdateWorkflowDtoTranscriber_Soniox, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/update_workflow_dto_voice.py b/src/vapi/types/update_workflow_dto_voice.py new file mode 100644 index 00000000..5e17af6a --- /dev/null +++ b/src/vapi/types/update_workflow_dto_voice.py @@ -0,0 +1,776 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .azure_voice_id import AzureVoiceId +from .cartesia_experimental_controls import CartesiaExperimentalControls +from .cartesia_generation_config import CartesiaGenerationConfig +from .cartesia_voice_language import CartesiaVoiceLanguage +from .cartesia_voice_model import CartesiaVoiceModel +from .chunk_plan import ChunkPlan +from .deepgram_voice_id import DeepgramVoiceId +from .deepgram_voice_model import DeepgramVoiceModel +from .eleven_labs_pronunciation_dictionary_locator import ElevenLabsPronunciationDictionaryLocator +from .eleven_labs_voice_id import ElevenLabsVoiceId +from .eleven_labs_voice_model import ElevenLabsVoiceModel +from .fallback_plan import FallbackPlan +from .hume_voice_model import HumeVoiceModel +from .inworld_voice_language_code import InworldVoiceLanguageCode +from .inworld_voice_model import InworldVoiceModel +from .inworld_voice_voice_id import InworldVoiceVoiceId +from .lmnt_voice_id import LmntVoiceId +from .lmnt_voice_language import LmntVoiceLanguage +from .minimax_voice_language_boost import MinimaxVoiceLanguageBoost +from .minimax_voice_model import MinimaxVoiceModel +from .minimax_voice_region import MinimaxVoiceRegion +from .minimax_voice_subtitle_type import MinimaxVoiceSubtitleType +from .neuphonic_voice_model import NeuphonicVoiceModel +from .open_ai_voice_id import OpenAiVoiceId +from .open_ai_voice_model import OpenAiVoiceModel +from .play_ht_voice_emotion import PlayHtVoiceEmotion +from .play_ht_voice_id import PlayHtVoiceId +from .play_ht_voice_language import PlayHtVoiceLanguage +from .play_ht_voice_model import PlayHtVoiceModel +from .rime_ai_voice_id import RimeAiVoiceId +from .rime_ai_voice_language import RimeAiVoiceLanguage +from .rime_ai_voice_model import RimeAiVoiceModel +from .server import Server +from .sesame_voice_model import SesameVoiceModel +from .smallest_ai_voice_id import SmallestAiVoiceId +from .smallest_ai_voice_model import SmallestAiVoiceModel +from .tavus_conversation_properties import TavusConversationProperties +from .tavus_voice_voice_id import TavusVoiceVoiceId +from .vapi_pronunciation_dictionary_locator import VapiPronunciationDictionaryLocator +from .vapi_voice_voice_id import VapiVoiceVoiceId +from .well_said_voice_model import WellSaidVoiceModel + + +class UpdateWorkflowDtoVoice_Azure(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["azure"] = "azure" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[AzureVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + speed: typing.Optional[float] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoVoice_Cartesia(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["cartesia"] = "cartesia" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[CartesiaVoiceModel] = None + language: typing.Optional[CartesiaVoiceLanguage] = None + experimental_controls: typing_extensions.Annotated[ + typing.Optional[CartesiaExperimentalControls], + FieldMetadata(alias="experimentalControls"), + pydantic.Field(alias="experimentalControls"), + ] = None + generation_config: typing_extensions.Annotated[ + typing.Optional[CartesiaGenerationConfig], + FieldMetadata(alias="generationConfig"), + pydantic.Field(alias="generationConfig"), + ] = None + pronunciation_dict_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="pronunciationDictId"), pydantic.Field(alias="pronunciationDictId") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoVoice_CustomVoice(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["custom-voice"] = "custom-voice" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + server: Server + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoVoice_Deepgram(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["deepgram"] = "deepgram" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + DeepgramVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[DeepgramVoiceModel] = None + mip_opt_out: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="mipOptOut"), pydantic.Field(alias="mipOptOut") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoVoice_11Labs(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["11labs"] = "11labs" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + ElevenLabsVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + stability: typing.Optional[float] = None + similarity_boost: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="similarityBoost"), pydantic.Field(alias="similarityBoost") + ] = None + style: typing.Optional[float] = None + use_speaker_boost: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="useSpeakerBoost"), pydantic.Field(alias="useSpeakerBoost") + ] = None + speed: typing.Optional[float] = None + optimize_streaming_latency: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="optimizeStreamingLatency"), + pydantic.Field(alias="optimizeStreamingLatency"), + ] = None + enable_ssml_parsing: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="enableSsmlParsing"), pydantic.Field(alias="enableSsmlParsing") + ] = None + auto_mode: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="autoMode"), pydantic.Field(alias="autoMode") + ] = None + model: typing.Optional[ElevenLabsVoiceModel] = None + language: typing.Optional[str] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + pronunciation_dictionary_locators: typing_extensions.Annotated[ + typing.Optional[typing.List[ElevenLabsPronunciationDictionaryLocator]], + FieldMetadata(alias="pronunciationDictionaryLocators"), + pydantic.Field(alias="pronunciationDictionaryLocators"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoVoice_Hume(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["hume"] = "hume" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + model: typing.Optional[HumeVoiceModel] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + is_custom_hume_voice: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="isCustomHumeVoice"), pydantic.Field(alias="isCustomHumeVoice") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + description: typing.Optional[str] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoVoice_Lmnt(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["lmnt"] = "lmnt" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[LmntVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + speed: typing.Optional[float] = None + language: typing.Optional[LmntVoiceLanguage] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoVoice_Neuphonic(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["neuphonic"] = "neuphonic" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[NeuphonicVoiceModel] = None + language: typing.Dict[str, typing.Any] + speed: typing.Optional[float] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoVoice_Openai(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["openai"] = "openai" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + OpenAiVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[OpenAiVoiceModel] = None + instructions: typing.Optional[str] = None + speed: typing.Optional[float] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoVoice_Playht(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["playht"] = "playht" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + PlayHtVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + speed: typing.Optional[float] = None + temperature: typing.Optional[float] = None + emotion: typing.Optional[PlayHtVoiceEmotion] = None + voice_guidance: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="voiceGuidance"), pydantic.Field(alias="voiceGuidance") + ] = None + style_guidance: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="styleGuidance"), pydantic.Field(alias="styleGuidance") + ] = None + text_guidance: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="textGuidance"), pydantic.Field(alias="textGuidance") + ] = None + model: typing.Optional[PlayHtVoiceModel] = None + language: typing.Optional[PlayHtVoiceLanguage] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoVoice_Wellsaid(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["wellsaid"] = "wellsaid" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[WellSaidVoiceModel] = None + enable_ssml: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="enableSsml"), pydantic.Field(alias="enableSsml") + ] = None + library_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="libraryIds"), pydantic.Field(alias="libraryIds") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoVoice_RimeAi(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["rime-ai"] = "rime-ai" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + RimeAiVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[RimeAiVoiceModel] = None + speed: typing.Optional[float] = None + pause_between_brackets: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="pauseBetweenBrackets"), pydantic.Field(alias="pauseBetweenBrackets") + ] = None + phonemize_between_brackets: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="phonemizeBetweenBrackets"), + pydantic.Field(alias="phonemizeBetweenBrackets"), + ] = None + reduce_latency: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="reduceLatency"), pydantic.Field(alias="reduceLatency") + ] = None + inline_speed_alpha: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="inlineSpeedAlpha"), pydantic.Field(alias="inlineSpeedAlpha") + ] = None + language: typing.Optional[RimeAiVoiceLanguage] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoVoice_SmallestAi(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["smallest-ai"] = "smallest-ai" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + SmallestAiVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[SmallestAiVoiceModel] = None + speed: typing.Optional[float] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoVoice_Tavus(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["tavus"] = "tavus" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + TavusVoiceVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + persona_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="personaId"), pydantic.Field(alias="personaId") + ] = None + callback_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callbackUrl"), pydantic.Field(alias="callbackUrl") + ] = None + conversation_name: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="conversationName"), pydantic.Field(alias="conversationName") + ] = None + conversational_context: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="conversationalContext"), + pydantic.Field(alias="conversationalContext"), + ] = None + custom_greeting: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="customGreeting"), pydantic.Field(alias="customGreeting") + ] = None + properties: typing.Optional[TavusConversationProperties] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoVoice_Vapi(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["vapi"] = "vapi" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + VapiVoiceVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + speed: typing.Optional[float] = None + pronunciation_dictionary: typing_extensions.Annotated[ + typing.Optional[typing.List[VapiPronunciationDictionaryLocator]], + FieldMetadata(alias="pronunciationDictionary"), + pydantic.Field(alias="pronunciationDictionary"), + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoVoice_Sesame(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["sesame"] = "sesame" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: SesameVoiceModel + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoVoice_Inworld(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["inworld"] = "inworld" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + InworldVoiceVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[InworldVoiceModel] = None + language_code: typing_extensions.Annotated[ + typing.Optional[InworldVoiceLanguageCode], + FieldMetadata(alias="languageCode"), + pydantic.Field(alias="languageCode"), + ] = None + temperature: typing.Optional[float] = None + speaking_rate: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="speakingRate"), pydantic.Field(alias="speakingRate") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class UpdateWorkflowDtoVoice_Minimax(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["minimax"] = "minimax" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[MinimaxVoiceModel] = None + emotion: typing.Optional[str] = None + subtitle_type: typing_extensions.Annotated[ + typing.Optional[MinimaxVoiceSubtitleType], + FieldMetadata(alias="subtitleType"), + pydantic.Field(alias="subtitleType"), + ] = None + pitch: typing.Optional[float] = None + speed: typing.Optional[float] = None + volume: typing.Optional[float] = None + region: typing.Optional[MinimaxVoiceRegion] = None + language_boost: typing_extensions.Annotated[ + typing.Optional[MinimaxVoiceLanguageBoost], + FieldMetadata(alias="languageBoost"), + pydantic.Field(alias="languageBoost"), + ] = None + text_normalization_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="textNormalizationEnabled"), + pydantic.Field(alias="textNormalizationEnabled"), + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +UpdateWorkflowDtoVoice = typing_extensions.Annotated[ + typing.Union[ + UpdateWorkflowDtoVoice_Azure, + UpdateWorkflowDtoVoice_Cartesia, + UpdateWorkflowDtoVoice_CustomVoice, + UpdateWorkflowDtoVoice_Deepgram, + UpdateWorkflowDtoVoice_11Labs, + UpdateWorkflowDtoVoice_Hume, + UpdateWorkflowDtoVoice_Lmnt, + UpdateWorkflowDtoVoice_Neuphonic, + UpdateWorkflowDtoVoice_Openai, + UpdateWorkflowDtoVoice_Playht, + UpdateWorkflowDtoVoice_Wellsaid, + UpdateWorkflowDtoVoice_RimeAi, + UpdateWorkflowDtoVoice_SmallestAi, + UpdateWorkflowDtoVoice_Tavus, + UpdateWorkflowDtoVoice_Vapi, + UpdateWorkflowDtoVoice_Sesame, + UpdateWorkflowDtoVoice_Inworld, + UpdateWorkflowDtoVoice_Minimax, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/update_workflow_dto_voicemail_detection.py b/src/vapi/types/update_workflow_dto_voicemail_detection.py new file mode 100644 index 00000000..f1cc22f0 --- /dev/null +++ b/src/vapi/types/update_workflow_dto_voicemail_detection.py @@ -0,0 +1,17 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .google_voicemail_detection_plan import GoogleVoicemailDetectionPlan +from .open_ai_voicemail_detection_plan import OpenAiVoicemailDetectionPlan +from .twilio_voicemail_detection_plan import TwilioVoicemailDetectionPlan +from .update_workflow_dto_voicemail_detection_zero import UpdateWorkflowDtoVoicemailDetectionZero +from .vapi_voicemail_detection_plan import VapiVoicemailDetectionPlan + +UpdateWorkflowDtoVoicemailDetection = typing.Union[ + UpdateWorkflowDtoVoicemailDetectionZero, + GoogleVoicemailDetectionPlan, + OpenAiVoicemailDetectionPlan, + TwilioVoicemailDetectionPlan, + VapiVoicemailDetectionPlan, +] diff --git a/src/vapi/types/update_workflow_dto_voicemail_detection_zero.py b/src/vapi/types/update_workflow_dto_voicemail_detection_zero.py new file mode 100644 index 00000000..06a76c22 --- /dev/null +++ b/src/vapi/types/update_workflow_dto_voicemail_detection_zero.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +UpdateWorkflowDtoVoicemailDetectionZero = typing.Union[typing.Literal["off"], typing.Any] diff --git a/src/vapi/types/update_x_ai_credential_dto.py b/src/vapi/types/update_x_ai_credential_dto.py new file mode 100644 index 00000000..2f021f40 --- /dev/null +++ b/src/vapi/types/update_x_ai_credential_dto.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class UpdateXAiCredentialDto(UncheckedBaseModel): + api_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] = None + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/user.py b/src/vapi/types/user.py index 10126110..26d8f8c4 100644 --- a/src/vapi/types/user.py +++ b/src/vapi/types/user.py @@ -1,41 +1,47 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import pydantic -import typing_extensions import datetime as dt -from ..core.serialization import FieldMetadata import typing + +import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class User(UniversalBaseModel): +class User(UncheckedBaseModel): id: str = pydantic.Field() """ This is the unique identifier for the profile or user. """ - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the profile was created. - """ - - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the profile was last updated. - """ - + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the profile was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", description="This is the ISO 8601 date-time string of when the profile was last updated." + ), + ] email: str = pydantic.Field() """ This is the email of the user that is associated with the profile. """ - full_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="fullName")] = pydantic.Field( - default=None - ) - """ - This is the full name of the user that is associated with the profile. - """ + full_name: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="fullName"), + pydantic.Field( + alias="fullName", description="This is the full name of the user that is associated with the profile." + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/user_message.py b/src/vapi/types/user_message.py index 9e9630a0..de99da4f 100644 --- a/src/vapi/types/user_message.py +++ b/src/vapi/types/user_message.py @@ -1,14 +1,15 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +import typing + import pydantic import typing_extensions -from ..core.serialization import FieldMetadata -import typing from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class UserMessage(UniversalBaseModel): +class UserMessage(UncheckedBaseModel): role: str = pydantic.Field() """ The role of the user in the conversation. @@ -24,20 +25,55 @@ class UserMessage(UniversalBaseModel): The timestamp when the message was sent. """ - end_time: typing_extensions.Annotated[float, FieldMetadata(alias="endTime")] = pydantic.Field() + end_time: typing_extensions.Annotated[ + float, + FieldMetadata(alias="endTime"), + pydantic.Field(alias="endTime", description="The timestamp when the message ended."), + ] + seconds_from_start: typing_extensions.Annotated[ + float, + FieldMetadata(alias="secondsFromStart"), + pydantic.Field( + alias="secondsFromStart", description="The number of seconds from the start of the conversation." + ), + ] + duration: typing.Optional[float] = pydantic.Field(default=None) """ - The timestamp when the message ended. + The duration of the message in seconds. """ - seconds_from_start: typing_extensions.Annotated[float, FieldMetadata(alias="secondsFromStart")] = pydantic.Field() + is_filtered: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="isFiltered"), + pydantic.Field(alias="isFiltered", description="Indicates if the message was filtered for security reasons."), + ] = None + detected_threats: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="detectedThreats"), + pydantic.Field( + alias="detectedThreats", description="List of detected security threats if the message was filtered." + ), + ] = None + original_message: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="originalMessage"), + pydantic.Field( + alias="originalMessage", + description="The original message before filtering (only included if content was filtered).", + ), + ] = None + metadata: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) """ - The number of seconds from the start of the conversation. + The metadata associated with the message. Currently used to store the transcriber's word level confidence. """ - duration: typing.Optional[float] = pydantic.Field(default=None) - """ - The duration of the message in seconds. - """ + speaker_label: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="speakerLabel"), + pydantic.Field( + alias="speakerLabel", description='Stable speaker label for diarized user speakers (e.g., "Speaker 1").' + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/vapi_cost.py b/src/vapi/types/vapi_cost.py index 9cebe4fe..78bc57aa 100644 --- a/src/vapi/types/vapi_cost.py +++ b/src/vapi/types/vapi_cost.py @@ -1,17 +1,21 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing + import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .vapi_cost_sub_type import VapiCostSubType -class VapiCost(UniversalBaseModel): - type: typing.Literal["vapi"] = pydantic.Field(default="vapi") - """ - This is the type of cost, always 'vapi' for this class. - """ - +class VapiCost(UncheckedBaseModel): + sub_type: typing_extensions.Annotated[ + VapiCostSubType, + FieldMetadata(alias="subType"), + pydantic.Field(alias="subType", description="This is the sub type of the cost."), + ] minutes: float = pydantic.Field() """ This is the minutes of Vapi usage. This should match `call.endedAt` - `call.startedAt`. diff --git a/src/vapi/types/vapi_cost_sub_type.py b/src/vapi/types/vapi_cost_sub_type.py new file mode 100644 index 00000000..43603c66 --- /dev/null +++ b/src/vapi/types/vapi_cost_sub_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +VapiCostSubType = typing.Union[typing.Literal["normal", "overage"], typing.Any] diff --git a/src/vapi/types/vapi_model.py b/src/vapi/types/vapi_model.py index 6f995fdd..7b924f6e 100644 --- a/src/vapi/types/vapi_model.py +++ b/src/vapi/types/vapi_model.py @@ -1,23 +1,22 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -from .callback_step import CallbackStep -from .create_workflow_block_dto import CreateWorkflowBlockDto -from .handoff_step import HandoffStep + import typing -from .open_ai_message import OpenAiMessage + import pydantic -from .vapi_model_tools_item import VapiModelToolsItem import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.serialization import FieldMetadata -from .vapi_model_steps_item import VapiModelStepsItem -from .knowledge_base import KnowledgeBase -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.pydantic_utilities import update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_custom_knowledge_base_dto import CreateCustomKnowledgeBaseDto +from .open_ai_message import OpenAiMessage +from .vapi_model_provider import VapiModelProvider +from .vapi_model_tools_item import VapiModelToolsItem +from .workflow_user_editable import WorkflowUserEditable -class VapiModel(UniversalBaseModel): +class VapiModel(UncheckedBaseModel): messages: typing.Optional[typing.List[OpenAiMessage]] = pydantic.Field(default=None) """ This is the starting state for the conversation. @@ -30,17 +29,33 @@ class VapiModel(UniversalBaseModel): Both `tools` and `toolIds` can be used together. """ - tool_ids: typing_extensions.Annotated[typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds")] = ( - pydantic.Field(default=None) - ) - """ - These are the tools that the assistant can use during the call. To use transient tools, use `tools`. - - Both `tools` and `toolIds` can be used together. + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="toolIds"), + pydantic.Field( + alias="toolIds", + description="These are the tools that the assistant can use during the call. To use transient tools, use `tools`.\n\nBoth `tools` and `toolIds` can be used together.", + ), + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase", description="These are the options for the knowledge base."), + ] = None + provider: VapiModelProvider + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="workflowId"), + pydantic.Field( + alias="workflowId", + description="This is the workflow that will be used for the call. To use a transient workflow, use `workflow` instead.", + ), + ] = None + workflow: typing.Optional[WorkflowUserEditable] = pydantic.Field(default=None) + """ + This is the workflow that will be used for the call. To use an existing workflow, use `workflowId` instead. """ - steps: typing.Optional[typing.List[VapiModelStepsItem]] = None - provider: typing.Literal["vapi"] = "vapi" model: str = pydantic.Field() """ This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b @@ -51,41 +66,30 @@ class VapiModel(UniversalBaseModel): This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency. """ - knowledge_base: typing_extensions.Annotated[ - typing.Optional[KnowledgeBase], FieldMetadata(alias="knowledgeBase") - ] = pydantic.Field(default=None) - """ - These are the options for the knowledge base. - """ - - max_tokens: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="maxTokens")] = pydantic.Field( - default=None - ) - """ - This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250. - """ - + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="maxTokens"), + pydantic.Field( + alias="maxTokens", + description="This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.", + ), + ] = None emotion_recognition_enabled: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="emotionRecognitionEnabled") - ] = pydantic.Field(default=None) - """ - This determines whether we detect user's emotion while they speak and send it as an additional info to model. - - Default `false` because the model is usually are good at understanding the user's emotion from text. - - @default false - """ - - num_fast_turns: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="numFastTurns")] = ( - pydantic.Field(default=None) - ) - """ - This sets how many turns at the start of the conversation to use a smaller, faster model from the same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai. - - Default is 0. - - @default 0 - """ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field( + alias="emotionRecognitionEnabled", + description="This determines whether we detect user's emotion while they speak and send it as an additional info to model.\n\nDefault `false` because the model is usually are good at understanding the user's emotion from text.\n\n@default false", + ), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="numFastTurns"), + pydantic.Field( + alias="numFastTurns", + description="This sets how many turns at the start of the conversation to use a smaller, faster model from the same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai.\n\nDefault is 0.\n\n@default 0", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -97,6 +101,4 @@ class Config: extra = pydantic.Extra.allow -update_forward_refs(CallbackStep, VapiModel=VapiModel) -update_forward_refs(CreateWorkflowBlockDto, VapiModel=VapiModel) -update_forward_refs(HandoffStep, VapiModel=VapiModel) +update_forward_refs(VapiModel) diff --git a/src/vapi/types/vapi_model_provider.py b/src/vapi/types/vapi_model_provider.py new file mode 100644 index 00000000..84a02f81 --- /dev/null +++ b/src/vapi/types/vapi_model_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +VapiModelProvider = typing.Union[typing.Literal["vapi"], typing.Any] diff --git a/src/vapi/types/vapi_model_steps_item.py b/src/vapi/types/vapi_model_steps_item.py deleted file mode 100644 index 2fee48bd..00000000 --- a/src/vapi/types/vapi_model_steps_item.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from .handoff_step import HandoffStep -from .callback_step import CallbackStep - -VapiModelStepsItem = typing.Union[HandoffStep, CallbackStep] diff --git a/src/vapi/types/vapi_model_tools_item.py b/src/vapi/types/vapi_model_tools_item.py index 1639425c..e816b22a 100644 --- a/src/vapi/types/vapi_model_tools_item.py +++ b/src/vapi/types/vapi_model_tools_item.py @@ -1,20 +1,732 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .create_dtmf_tool_dto import CreateDtmfToolDto -from .create_end_call_tool_dto import CreateEndCallToolDto -from .create_voicemail_tool_dto import CreateVoicemailToolDto -from .create_function_tool_dto import CreateFunctionToolDto -from .create_ghl_tool_dto import CreateGhlToolDto -from .create_make_tool_dto import CreateMakeToolDto -from .create_transfer_call_tool_dto import CreateTransferCallToolDto - -VapiModelToolsItem = typing.Union[ - CreateDtmfToolDto, - CreateEndCallToolDto, - CreateVoicemailToolDto, - CreateFunctionToolDto, - CreateGhlToolDto, - CreateMakeToolDto, - CreateTransferCallToolDto, + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .backoff_plan import BackoffPlan +from .code_tool_environment_variable import CodeToolEnvironmentVariable +from .create_api_request_tool_dto_messages_item import CreateApiRequestToolDtoMessagesItem +from .create_api_request_tool_dto_method import CreateApiRequestToolDtoMethod +from .create_bash_tool_dto_messages_item import CreateBashToolDtoMessagesItem +from .create_bash_tool_dto_name import CreateBashToolDtoName +from .create_bash_tool_dto_sub_type import CreateBashToolDtoSubType +from .create_code_tool_dto_messages_item import CreateCodeToolDtoMessagesItem +from .create_computer_tool_dto_messages_item import CreateComputerToolDtoMessagesItem +from .create_computer_tool_dto_name import CreateComputerToolDtoName +from .create_computer_tool_dto_sub_type import CreateComputerToolDtoSubType +from .create_dtmf_tool_dto_messages_item import CreateDtmfToolDtoMessagesItem +from .create_end_call_tool_dto_messages_item import CreateEndCallToolDtoMessagesItem +from .create_function_tool_dto_messages_item import CreateFunctionToolDtoMessagesItem +from .create_go_high_level_calendar_availability_tool_dto_messages_item import ( + CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem, +) +from .create_go_high_level_calendar_event_create_tool_dto_messages_item import ( + CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_create_tool_dto_messages_item import ( + CreateGoHighLevelContactCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_get_tool_dto_messages_item import CreateGoHighLevelContactGetToolDtoMessagesItem +from .create_google_calendar_check_availability_tool_dto_messages_item import ( + CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem, +) +from .create_google_calendar_create_event_tool_dto_messages_item import ( + CreateGoogleCalendarCreateEventToolDtoMessagesItem, +) +from .create_google_sheets_row_append_tool_dto_messages_item import CreateGoogleSheetsRowAppendToolDtoMessagesItem +from .create_handoff_tool_dto_messages_item import CreateHandoffToolDtoMessagesItem +from .create_mcp_tool_dto_messages_item import CreateMcpToolDtoMessagesItem +from .create_query_tool_dto_messages_item import CreateQueryToolDtoMessagesItem +from .create_sip_request_tool_dto_body import CreateSipRequestToolDtoBody +from .create_sip_request_tool_dto_messages_item import CreateSipRequestToolDtoMessagesItem +from .create_sip_request_tool_dto_verb import CreateSipRequestToolDtoVerb +from .create_slack_send_message_tool_dto_messages_item import CreateSlackSendMessageToolDtoMessagesItem +from .create_sms_tool_dto_messages_item import CreateSmsToolDtoMessagesItem +from .create_text_editor_tool_dto_messages_item import CreateTextEditorToolDtoMessagesItem +from .create_text_editor_tool_dto_name import CreateTextEditorToolDtoName +from .create_text_editor_tool_dto_sub_type import CreateTextEditorToolDtoSubType +from .create_transfer_call_tool_dto_destinations_item import CreateTransferCallToolDtoDestinationsItem +from .create_transfer_call_tool_dto_messages_item import CreateTransferCallToolDtoMessagesItem +from .create_voicemail_tool_dto_messages_item import CreateVoicemailToolDtoMessagesItem +from .knowledge_base import KnowledgeBase +from .mcp_tool_messages import McpToolMessages +from .mcp_tool_metadata import McpToolMetadata +from .open_ai_function import OpenAiFunction +from .server import Server +from .tool_parameter import ToolParameter +from .tool_rejection_plan import ToolRejectionPlan +from .variable_extraction_plan import VariableExtractionPlan + + +class VapiModelToolsItem_ApiRequest(UncheckedBaseModel): + type: typing.Literal["apiRequest"] = "apiRequest" + messages: typing.Optional[typing.List[CreateApiRequestToolDtoMessagesItem]] = None + method: CreateApiRequestToolDtoMethod + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + encrypted_paths: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="encryptedPaths"), pydantic.Field(alias="encryptedPaths") + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + name: typing.Optional[str] = None + description: typing.Optional[str] = None + url: str + body: typing.Optional["JsonSchema"] = None + headers: typing.Optional["JsonSchema"] = None + backoff_plan: typing_extensions.Annotated[ + typing.Optional[BackoffPlan], FieldMetadata(alias="backoffPlan"), pydantic.Field(alias="backoffPlan") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class VapiModelToolsItem_Bash(UncheckedBaseModel): + type: typing.Literal["bash"] = "bash" + messages: typing.Optional[typing.List[CreateBashToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateBashToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateBashToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class VapiModelToolsItem_Code(UncheckedBaseModel): + type: typing.Literal["code"] = "code" + messages: typing.Optional[typing.List[CreateCodeToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + code: str + environment_variables: typing_extensions.Annotated[ + typing.Optional[typing.List[CodeToolEnvironmentVariable]], + FieldMetadata(alias="environmentVariables"), + pydantic.Field(alias="environmentVariables"), + ] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class VapiModelToolsItem_Computer(UncheckedBaseModel): + type: typing.Literal["computer"] = "computer" + messages: typing.Optional[typing.List[CreateComputerToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateComputerToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateComputerToolDtoName + display_width_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayWidthPx"), pydantic.Field(alias="displayWidthPx") + ] + display_height_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayHeightPx"), pydantic.Field(alias="displayHeightPx") + ] + display_number: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="displayNumber"), pydantic.Field(alias="displayNumber") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class VapiModelToolsItem_Dtmf(UncheckedBaseModel): + type: typing.Literal["dtmf"] = "dtmf" + messages: typing.Optional[typing.List[CreateDtmfToolDtoMessagesItem]] = None + sip_info_dtmf_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="sipInfoDtmfEnabled"), pydantic.Field(alias="sipInfoDtmfEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class VapiModelToolsItem_EndCall(UncheckedBaseModel): + type: typing.Literal["endCall"] = "endCall" + messages: typing.Optional[typing.List[CreateEndCallToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class VapiModelToolsItem_Function(UncheckedBaseModel): + type: typing.Literal["function"] = "function" + messages: typing.Optional[typing.List[CreateFunctionToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class VapiModelToolsItem_GohighlevelCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.availability.check"] = "gohighlevel.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class VapiModelToolsItem_GohighlevelCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.event.create"] = "gohighlevel.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class VapiModelToolsItem_GohighlevelContactCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.create"] = "gohighlevel.contact.create" + messages: typing.Optional[typing.List[CreateGoHighLevelContactCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class VapiModelToolsItem_GohighlevelContactGet(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.get"] = "gohighlevel.contact.get" + messages: typing.Optional[typing.List[CreateGoHighLevelContactGetToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class VapiModelToolsItem_GoogleCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["google.calendar.availability.check"] = "google.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class VapiModelToolsItem_GoogleCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["google.calendar.event.create"] = "google.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoogleCalendarCreateEventToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class VapiModelToolsItem_GoogleSheetsRowAppend(UncheckedBaseModel): + type: typing.Literal["google.sheets.row.append"] = "google.sheets.row.append" + messages: typing.Optional[typing.List[CreateGoogleSheetsRowAppendToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class VapiModelToolsItem_Handoff(UncheckedBaseModel): + type: typing.Literal["handoff"] = "handoff" + messages: typing.Optional[typing.List[CreateHandoffToolDtoMessagesItem]] = None + default_result: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="defaultResult"), pydantic.Field(alias="defaultResult") + ] = None + destinations: typing.Optional[typing.List["CreateHandoffToolDtoDestinationsItem"]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class VapiModelToolsItem_Mcp(UncheckedBaseModel): + type: typing.Literal["mcp"] = "mcp" + messages: typing.Optional[typing.List[CreateMcpToolDtoMessagesItem]] = None + server: typing.Optional[Server] = None + tool_messages: typing_extensions.Annotated[ + typing.Optional[typing.List[McpToolMessages]], + FieldMetadata(alias="toolMessages"), + pydantic.Field(alias="toolMessages"), + ] = None + metadata: typing.Optional[McpToolMetadata] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class VapiModelToolsItem_Query(UncheckedBaseModel): + type: typing.Literal["query"] = "query" + messages: typing.Optional[typing.List[CreateQueryToolDtoMessagesItem]] = None + knowledge_bases: typing_extensions.Annotated[ + typing.Optional[typing.List[KnowledgeBase]], + FieldMetadata(alias="knowledgeBases"), + pydantic.Field(alias="knowledgeBases"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class VapiModelToolsItem_SlackMessageSend(UncheckedBaseModel): + type: typing.Literal["slack.message.send"] = "slack.message.send" + messages: typing.Optional[typing.List[CreateSlackSendMessageToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class VapiModelToolsItem_Sms(UncheckedBaseModel): + type: typing.Literal["sms"] = "sms" + messages: typing.Optional[typing.List[CreateSmsToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class VapiModelToolsItem_TextEditor(UncheckedBaseModel): + type: typing.Literal["textEditor"] = "textEditor" + messages: typing.Optional[typing.List[CreateTextEditorToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateTextEditorToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateTextEditorToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class VapiModelToolsItem_TransferCall(UncheckedBaseModel): + type: typing.Literal["transferCall"] = "transferCall" + messages: typing.Optional[typing.List[CreateTransferCallToolDtoMessagesItem]] = None + destinations: typing.Optional[typing.List[CreateTransferCallToolDtoDestinationsItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class VapiModelToolsItem_SipRequest(UncheckedBaseModel): + type: typing.Literal["sipRequest"] = "sipRequest" + messages: typing.Optional[typing.List[CreateSipRequestToolDtoMessagesItem]] = None + verb: CreateSipRequestToolDtoVerb + headers: typing.Optional["JsonSchema"] = None + body: typing.Optional[CreateSipRequestToolDtoBody] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class VapiModelToolsItem_Voicemail(UncheckedBaseModel): + type: typing.Literal["voicemail"] = "voicemail" + messages: typing.Optional[typing.List[CreateVoicemailToolDtoMessagesItem]] = None + beep_detection_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="beepDetectionEnabled"), pydantic.Field(alias="beepDetectionEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +VapiModelToolsItem = typing_extensions.Annotated[ + typing.Union[ + VapiModelToolsItem_ApiRequest, + VapiModelToolsItem_Bash, + VapiModelToolsItem_Code, + VapiModelToolsItem_Computer, + VapiModelToolsItem_Dtmf, + VapiModelToolsItem_EndCall, + VapiModelToolsItem_Function, + VapiModelToolsItem_GohighlevelCalendarAvailabilityCheck, + VapiModelToolsItem_GohighlevelCalendarEventCreate, + VapiModelToolsItem_GohighlevelContactCreate, + VapiModelToolsItem_GohighlevelContactGet, + VapiModelToolsItem_GoogleCalendarAvailabilityCheck, + VapiModelToolsItem_GoogleCalendarEventCreate, + VapiModelToolsItem_GoogleSheetsRowAppend, + VapiModelToolsItem_Handoff, + VapiModelToolsItem_Mcp, + VapiModelToolsItem_Query, + VapiModelToolsItem_SlackMessageSend, + VapiModelToolsItem_Sms, + VapiModelToolsItem_TextEditor, + VapiModelToolsItem_TransferCall, + VapiModelToolsItem_SipRequest, + VapiModelToolsItem_Voicemail, + ], + UnionMetadata(discriminant="type"), ] +from .json_schema import JsonSchema # noqa: E402, I001 +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs(VapiModelToolsItem_ApiRequest, JsonSchema=JsonSchema) +update_forward_refs(VapiModelToolsItem_Bash) +update_forward_refs(VapiModelToolsItem_Code) +update_forward_refs(VapiModelToolsItem_Computer) +update_forward_refs(VapiModelToolsItem_Dtmf) +update_forward_refs(VapiModelToolsItem_EndCall) +update_forward_refs(VapiModelToolsItem_Function) +update_forward_refs(VapiModelToolsItem_GohighlevelCalendarAvailabilityCheck) +update_forward_refs(VapiModelToolsItem_GohighlevelCalendarEventCreate) +update_forward_refs(VapiModelToolsItem_GohighlevelContactCreate) +update_forward_refs(VapiModelToolsItem_GohighlevelContactGet) +update_forward_refs(VapiModelToolsItem_GoogleCalendarAvailabilityCheck) +update_forward_refs(VapiModelToolsItem_GoogleCalendarEventCreate) +update_forward_refs(VapiModelToolsItem_GoogleSheetsRowAppend) +update_forward_refs( + VapiModelToolsItem_Handoff, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs(VapiModelToolsItem_Mcp) +update_forward_refs(VapiModelToolsItem_Query) +update_forward_refs(VapiModelToolsItem_SlackMessageSend) +update_forward_refs(VapiModelToolsItem_Sms) +update_forward_refs(VapiModelToolsItem_TextEditor) +update_forward_refs(VapiModelToolsItem_TransferCall) +update_forward_refs(VapiModelToolsItem_SipRequest, JsonSchema=JsonSchema) +update_forward_refs(VapiModelToolsItem_Voicemail) diff --git a/src/vapi/types/vapi_phone_number.py b/src/vapi/types/vapi_phone_number.py index 3850fc80..5b2c2ce5 100644 --- a/src/vapi/types/vapi_phone_number.py +++ b/src/vapi/types/vapi_phone_number.py @@ -1,48 +1,69 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions +import datetime as dt import typing -from .vapi_phone_number_fallback_destination import VapiPhoneNumberFallbackDestination -from ..core.serialization import FieldMetadata + import pydantic -import datetime as dt +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .server import Server +from .sip_authentication import SipAuthentication +from .vapi_phone_number_fallback_destination import VapiPhoneNumberFallbackDestination +from .vapi_phone_number_hooks_item import VapiPhoneNumberHooksItem +from .vapi_phone_number_status import VapiPhoneNumberStatus -class VapiPhoneNumber(UniversalBaseModel): +class VapiPhoneNumber(UncheckedBaseModel): fallback_destination: typing_extensions.Annotated[ - typing.Optional[VapiPhoneNumberFallbackDestination], FieldMetadata(alias="fallbackDestination") - ] = pydantic.Field(default=None) + typing.Optional[VapiPhoneNumberFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field( + alias="fallbackDestination", + description="This is the fallback destination an inbound call will be transferred to if:\n1. `assistantId` is not set\n2. `squadId` is not set\n3. and, `assistant-request` message to the `serverUrl` fails\n\nIf this is not set and above conditions are met, the inbound call is hung up with an error message.", + ), + ] = None + hooks: typing.Optional[typing.List[VapiPhoneNumberHooksItem]] = pydantic.Field(default=None) """ - This is the fallback destination an inbound call will be transferred to if: - - 1. `assistantId` is not set - 2. `squadId` is not set - 3. and, `assistant-request` message to the `serverUrl` fails - - If this is not set and above conditions are met, the inbound call is hung up with an error message. + This is the hooks that will be used for incoming calls to this phone number. """ - provider: typing.Literal["vapi"] = "vapi" id: str = pydantic.Field() """ This is the unique identifier for the phone number. """ - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field() - """ - This is the unique identifier for the org that this phone number belongs to. - """ - - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the phone number was created. + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this phone number belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the phone number was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the phone number was last updated.", + ), + ] + status: typing.Optional[VapiPhoneNumberStatus] = pydantic.Field(default=None) + """ + This is the status of the phone number. """ - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() + number: typing.Optional[str] = pydantic.Field(default=None) """ - This is the ISO 8601 date-time string of when the phone number was last updated. + These are the digits of the phone number you purchased from Vapi. """ name: typing.Optional[str] = pydantic.Field(default=None) @@ -50,49 +71,61 @@ class VapiPhoneNumber(UniversalBaseModel): This is the name of the phone number. This is just for your own reference. """ - assistant_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="assistantId")] = ( - pydantic.Field(default=None) - ) - """ - This is the assistant that will be used for incoming calls to this phone number. - - If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected. - """ - - squad_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="squadId")] = pydantic.Field( - default=None - ) - """ - This is the squad that will be used for incoming calls to this phone number. - - If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected. - """ - - server_url: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="serverUrl")] = pydantic.Field( - default=None - ) - """ - This is the server URL where messages will be sent for calls on this number. This includes the `assistant-request` message. + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assistantId"), + pydantic.Field( + alias="assistantId", + description="This is the assistant that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="workflowId"), + pydantic.Field( + alias="workflowId", + description="This is the workflow that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="squadId"), + pydantic.Field( + alias="squadId", + description="This is the squad that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + server: typing.Optional[Server] = pydantic.Field(default=None) + """ + This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema. - You can see the shape of the messages sent in `ServerMessage`. + The order of precedence is: - This overrides the `org.serverUrl`. Order of precedence: tool.server.url > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl. + 1. assistant.server + 2. phoneNumber.server + 3. org.server """ - server_url_secret: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="serverUrlSecret")] = ( - pydantic.Field(default=None) - ) - """ - This is the secret Vapi will send with every message to your server. It's sent as a header called x-vapi-secret. - - Same precedence logic as serverUrl. - """ - - sip_uri: typing_extensions.Annotated[str, FieldMetadata(alias="sipUri")] = pydantic.Field() - """ - This is the SIP URI of the phone number. You can SIP INVITE this. The assistant attached to this number will answer. + number_desired_area_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="numberDesiredAreaCode"), + pydantic.Field( + alias="numberDesiredAreaCode", description="This is the area code of the phone number to purchase." + ), + ] = None + sip_uri: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="sipUri"), + pydantic.Field( + alias="sipUri", + description="This is the SIP URI of the phone number. You can SIP INVITE this. The assistant attached to this number will answer.\n\nThis is case-insensitive.", + ), + ] = None + authentication: typing.Optional[SipAuthentication] = pydantic.Field(default=None) + """ + This enables authentication for incoming SIP INVITE requests to the `sipUri`. - This is case-insensitive. + If not set, any username/password to the 401 challenge of the SIP INVITE will be accepted. """ if IS_PYDANTIC_V2: diff --git a/src/vapi/types/vapi_phone_number_fallback_destination.py b/src/vapi/types/vapi_phone_number_fallback_destination.py index 55376231..8fcbc928 100644 --- a/src/vapi/types/vapi_phone_number_fallback_destination.py +++ b/src/vapi/types/vapi_phone_number_fallback_destination.py @@ -1,7 +1,93 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .transfer_destination_number import TransferDestinationNumber -from .transfer_destination_sip import TransferDestinationSip -VapiPhoneNumberFallbackDestination = typing.Union[TransferDestinationNumber, TransferDestinationSip] +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .transfer_destination_number_message import TransferDestinationNumberMessage +from .transfer_destination_sip_message import TransferDestinationSipMessage +from .transfer_plan import TransferPlan + + +class VapiPhoneNumberFallbackDestination_Number(UncheckedBaseModel): + """ + This is the fallback destination an inbound call will be transferred to if: + 1. `assistantId` is not set + 2. `squadId` is not set + 3. and, `assistant-request` message to the `serverUrl` fails + + If this is not set and above conditions are met, the inbound call is hung up with an error message. + """ + + type: typing.Literal["number"] = "number" + message: typing.Optional[TransferDestinationNumberMessage] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: str + extension: typing.Optional[str] = None + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class VapiPhoneNumberFallbackDestination_Sip(UncheckedBaseModel): + """ + This is the fallback destination an inbound call will be transferred to if: + 1. `assistantId` is not set + 2. `squadId` is not set + 3. and, `assistant-request` message to the `serverUrl` fails + + If this is not set and above conditions are met, the inbound call is hung up with an error message. + """ + + type: typing.Literal["sip"] = "sip" + message: typing.Optional[TransferDestinationSipMessage] = None + sip_uri: typing_extensions.Annotated[str, FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri")] + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + sip_headers: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="sipHeaders"), + pydantic.Field(alias="sipHeaders"), + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +VapiPhoneNumberFallbackDestination = typing_extensions.Annotated[ + typing.Union[VapiPhoneNumberFallbackDestination_Number, VapiPhoneNumberFallbackDestination_Sip], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/vapi_phone_number_hooks_item.py b/src/vapi/types/vapi_phone_number_hooks_item.py new file mode 100644 index 00000000..2cf053af --- /dev/null +++ b/src/vapi/types/vapi_phone_number_hooks_item.py @@ -0,0 +1,50 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .phone_number_call_ending_hook_filter import PhoneNumberCallEndingHookFilter +from .phone_number_call_ringing_hook_filter import PhoneNumberCallRingingHookFilter +from .phone_number_hook_call_ending_do import PhoneNumberHookCallEndingDo +from .phone_number_hook_call_ringing_do_item import PhoneNumberHookCallRingingDoItem + + +class VapiPhoneNumberHooksItem_CallRinging(UncheckedBaseModel): + on: typing.Literal["call.ringing"] = "call.ringing" + filters: typing.Optional[typing.List[PhoneNumberCallRingingHookFilter]] = None + do: typing.List[PhoneNumberHookCallRingingDoItem] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class VapiPhoneNumberHooksItem_CallEnding(UncheckedBaseModel): + on: typing.Literal["call.ending"] = "call.ending" + filters: typing.Optional[typing.List[PhoneNumberCallEndingHookFilter]] = None + do: typing.Optional[PhoneNumberHookCallEndingDo] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +VapiPhoneNumberHooksItem = typing_extensions.Annotated[ + typing.Union[VapiPhoneNumberHooksItem_CallRinging, VapiPhoneNumberHooksItem_CallEnding], + UnionMetadata(discriminant="on"), +] diff --git a/src/vapi/types/vapi_phone_number_status.py b/src/vapi/types/vapi_phone_number_status.py new file mode 100644 index 00000000..7aa40c91 --- /dev/null +++ b/src/vapi/types/vapi_phone_number_status.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +VapiPhoneNumberStatus = typing.Union[typing.Literal["active", "activating", "blocked"], typing.Any] diff --git a/src/vapi/types/vapi_pronunciation_dictionary_locator.py b/src/vapi/types/vapi_pronunciation_dictionary_locator.py new file mode 100644 index 00000000..f9a2506e --- /dev/null +++ b/src/vapi/types/vapi_pronunciation_dictionary_locator.py @@ -0,0 +1,33 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class VapiPronunciationDictionaryLocator(UncheckedBaseModel): + pronunciation_dict_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="pronunciationDictId"), + pydantic.Field(alias="pronunciationDictId", description="The pronunciation dictionary ID"), + ] + version_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="versionId"), + pydantic.Field( + alias="versionId", description="Version ID (only required for ElevenLabs, ignored for Cartesia)" + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/vapi_sip_transport_message.py b/src/vapi/types/vapi_sip_transport_message.py new file mode 100644 index 00000000..25e4196c --- /dev/null +++ b/src/vapi/types/vapi_sip_transport_message.py @@ -0,0 +1,38 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .vapi_sip_transport_message_sip_verb import VapiSipTransportMessageSipVerb + + +class VapiSipTransportMessage(UncheckedBaseModel): + sip_verb: typing_extensions.Annotated[ + VapiSipTransportMessageSipVerb, + FieldMetadata(alias="sipVerb"), + pydantic.Field( + alias="sipVerb", description="This is the SIP verb to use. Must be one of INFO, MESSAGE, or NOTIFY." + ), + ] + headers: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) + """ + These are the headers to include with the SIP request. + """ + + body: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the body of the SIP request, if any. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/vapi_sip_transport_message_sip_verb.py b/src/vapi/types/vapi_sip_transport_message_sip_verb.py new file mode 100644 index 00000000..87c5eb5a --- /dev/null +++ b/src/vapi/types/vapi_sip_transport_message_sip_verb.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +VapiSipTransportMessageSipVerb = typing.Union[typing.Literal["INFO", "MESSAGE", "NOTIFY"], typing.Any] diff --git a/src/vapi/types/vapi_smart_endpointing_plan.py b/src/vapi/types/vapi_smart_endpointing_plan.py new file mode 100644 index 00000000..305ba154 --- /dev/null +++ b/src/vapi/types/vapi_smart_endpointing_plan.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .vapi_smart_endpointing_plan_provider import VapiSmartEndpointingPlanProvider + + +class VapiSmartEndpointingPlan(UncheckedBaseModel): + provider: VapiSmartEndpointingPlanProvider = pydantic.Field() + """ + This is the provider for the smart endpointing plan. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/vapi_smart_endpointing_plan_provider.py b/src/vapi/types/vapi_smart_endpointing_plan_provider.py new file mode 100644 index 00000000..0fc85e4b --- /dev/null +++ b/src/vapi/types/vapi_smart_endpointing_plan_provider.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +VapiSmartEndpointingPlanProvider = typing.Union[ + typing.Literal["vapi", "livekit", "custom-endpointing-model"], typing.Any +] diff --git a/src/vapi/types/vapi_voice.py b/src/vapi/types/vapi_voice.py new file mode 100644 index 00000000..b41584f5 --- /dev/null +++ b/src/vapi/types/vapi_voice.py @@ -0,0 +1,68 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .chunk_plan import ChunkPlan +from .fallback_plan import FallbackPlan +from .vapi_pronunciation_dictionary_locator import VapiPronunciationDictionaryLocator +from .vapi_voice_voice_id import VapiVoiceVoiceId + + +class VapiVoice(UncheckedBaseModel): + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="cachingEnabled"), + pydantic.Field( + alias="cachingEnabled", description="This is the flag to toggle voice caching for the assistant." + ), + ] = None + voice_id: typing_extensions.Annotated[ + VapiVoiceVoiceId, + FieldMetadata(alias="voiceId"), + pydantic.Field(alias="voiceId", description="The voices provided by Vapi"), + ] + speed: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the speed multiplier that will be used. + + @default 1 + """ + + pronunciation_dictionary: typing_extensions.Annotated[ + typing.Optional[typing.List[VapiPronunciationDictionaryLocator]], + FieldMetadata(alias="pronunciationDictionary"), + pydantic.Field( + alias="pronunciationDictionary", + description="List of pronunciation dictionary locators for custom word pronunciations.", + ), + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], + FieldMetadata(alias="chunkPlan"), + pydantic.Field( + alias="chunkPlan", + description="This is the plan for chunking the model output before it is sent to the voice provider.", + ), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field( + alias="fallbackPlan", + description="This is the plan for voice provider fallbacks in the event that the primary voice provider fails.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/vapi_voice_voice_id.py b/src/vapi/types/vapi_voice_voice_id.py new file mode 100644 index 00000000..af2383ba --- /dev/null +++ b/src/vapi/types/vapi_voice_voice_id.py @@ -0,0 +1,39 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +VapiVoiceVoiceId = typing.Union[ + typing.Literal[ + "Clara", + "Godfrey", + "Layla", + "Sid", + "Gustavo", + "Elliot", + "Kylie", + "Rohan", + "Lily", + "Savannah", + "Hana", + "Neha", + "Cole", + "Harry", + "Paige", + "Spencer", + "Nico", + "Kai", + "Emma", + "Sagar", + "Neil", + "Naina", + "Leah", + "Tara", + "Jess", + "Leo", + "Dan", + "Mia", + "Zac", + "Zoe", + ], + typing.Any, +] diff --git a/src/vapi/types/vapi_voicemail_detection_plan.py b/src/vapi/types/vapi_voicemail_detection_plan.py new file mode 100644 index 00000000..56dbe8fb --- /dev/null +++ b/src/vapi/types/vapi_voicemail_detection_plan.py @@ -0,0 +1,49 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .vapi_voicemail_detection_plan_provider import VapiVoicemailDetectionPlanProvider +from .vapi_voicemail_detection_plan_type import VapiVoicemailDetectionPlanType +from .voicemail_detection_backoff_plan import VoicemailDetectionBackoffPlan + + +class VapiVoicemailDetectionPlan(UncheckedBaseModel): + beep_max_await_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="beepMaxAwaitSeconds"), + pydantic.Field( + alias="beepMaxAwaitSeconds", + description="This is the maximum duration from the start of the call that we will wait for a voicemail beep, before speaking our message\n\n- If we detect a voicemail beep before this, we will speak the message at that point.\n\n- Setting too low a value means that the bot will start speaking its voicemail message too early. If it does so before the actual beep, it will get cut off. You should definitely tune this to your use case.\n\n@default 30\n@min 0\n@max 60", + ), + ] = None + provider: VapiVoicemailDetectionPlanProvider = pydantic.Field() + """ + This is the provider to use for voicemail detection. + """ + + backoff_plan: typing_extensions.Annotated[ + typing.Optional[VoicemailDetectionBackoffPlan], + FieldMetadata(alias="backoffPlan"), + pydantic.Field(alias="backoffPlan", description="This is the backoff plan for the voicemail detection."), + ] = None + type: typing.Optional[VapiVoicemailDetectionPlanType] = pydantic.Field(default=None) + """ + This is the detection type to use for voicemail detection. + - 'audio': Uses native audio models (default) + - 'transcript': Uses ASR/transcript-based detection + @default 'audio' (audio detection) + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/vapi_voicemail_detection_plan_provider.py b/src/vapi/types/vapi_voicemail_detection_plan_provider.py new file mode 100644 index 00000000..520f8504 --- /dev/null +++ b/src/vapi/types/vapi_voicemail_detection_plan_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +VapiVoicemailDetectionPlanProvider = typing.Union[typing.Literal["vapi"], typing.Any] diff --git a/src/vapi/types/vapi_voicemail_detection_plan_type.py b/src/vapi/types/vapi_voicemail_detection_plan_type.py new file mode 100644 index 00000000..29d35125 --- /dev/null +++ b/src/vapi/types/vapi_voicemail_detection_plan_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +VapiVoicemailDetectionPlanType = typing.Union[typing.Literal["audio", "transcript"], typing.Any] diff --git a/src/vapi/types/variable_extraction_alias.py b/src/vapi/types/variable_extraction_alias.py new file mode 100644 index 00000000..1faa57f3 --- /dev/null +++ b/src/vapi/types/variable_extraction_alias.py @@ -0,0 +1,39 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class VariableExtractionAlias(UncheckedBaseModel): + key: str = pydantic.Field() + """ + This is the key of the variable. + + This variable will be accessible during the call as `{{key}}` and stored in `call.artifact.variableValues` after the call. + + Rules: + - Must start with a letter (a-z, A-Z). + - Subsequent characters can be letters, numbers, or underscores. + - Minimum length of 1 and maximum length of 40. + """ + + value: str = pydantic.Field() + """ + This is the value of the variable. + + This can reference existing variables, use filters, and perform transformations. + + Examples: "{{name}}", "{{customer.email}}", "Hello {{name | upcase}}" + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/variable_extraction_plan.py b/src/vapi/types/variable_extraction_plan.py new file mode 100644 index 00000000..7c4e75f5 --- /dev/null +++ b/src/vapi/types/variable_extraction_plan.py @@ -0,0 +1,73 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .variable_extraction_alias import VariableExtractionAlias + + +class VariableExtractionPlan(UncheckedBaseModel): + schema_: typing_extensions.Annotated[ + typing.Optional["JsonSchema"], + FieldMetadata(alias="schema"), + pydantic.Field( + alias="schema", + description='This is the schema to extract.\n\nExamples:\n1. To extract object properties, you can use the following schema:\n```json\n{\n "type": "object",\n "properties": {\n "name": {\n "type": "string"\n },\n "age": {\n "type": "number"\n }\n }\n}\n```\n\nThese will be extracted as `{{ name }}` and `{{ age }}` respectively. To emphasize, object properties are extracted as direct global variables.\n\n2. To extract nested properties, you can use the following schema:\n```json\n{\n "type": "object",\n "properties": {\n "name": {\n "type": "object",\n "properties": {\n "first": {\n "type": "string"\n },\n "last": {\n "type": "string"\n }\n }\n }\n }\n}\n```\n\nThese will be extracted as `{{ name }}`. And, `{{ name.first }}` and `{{ name.last }}` will be accessible.\n\n3. To extract array items, you can use the following schema:\n```json\n{\n "type": "array",\n "title": "zipCodes",\n "items": {\n "type": "string"\n }\n}\n```\n\nThis will be extracted as `{{ zipCodes }}`. To access the array items, you can use `{{ zipCodes[0] }}` and `{{ zipCodes[1] }}`.\n\n4. To extract array of objects, you can use the following schema:\n\n```json\n{\n "type": "array",\n "name": "people",\n "items": {\n "type": "object",\n "properties": {\n "name": {\n "type": "string"\n },\n "age": {\n "type": "number"\n },\n "zipCodes": {\n "type": "array",\n "items": {\n "type": "string"\n }\n }\n }\n }\n}\n```\n\nThis will be extracted as `{{ people }}`. To access the array items, you can use `{{ people[n].name }}`, `{{ people[n].age }}`, `{{ people[n].zipCodes }}`, `{{ people[n].zipCodes[0] }}` and `{{ people[n].zipCodes[1] }}`.', + ), + ] = None + aliases: typing.Optional[typing.List[VariableExtractionAlias]] = pydantic.Field(default=None) + """ + These are additional variables to create. + + These will be accessible during the call as `{{key}}` and stored in `call.artifact.variableValues` after the call. + + Example: + ```json + { + "aliases": [ + { + "key": "customerName", + "value": "{{name}}" + }, + { + "key": "fullName", + "value": "{{firstName}} {{lastName}}" + }, + { + "key": "greeting", + "value": "Hello {{name}}, welcome to {{company}}!" + }, + { + "key": "customerCity", + "value": "{{addresses[0].city}}" + }, + { + "key": "something", + "value": "{{any liquid}}" + } + ] + } + ``` + + This will create variables `customerName`, `fullName`, `greeting`, `customerCity`, and `something`. To access these variables, you can reference them as `{{customerName}}`, `{{fullName}}`, `{{greeting}}`, `{{customerCity}}`, and `{{something}}`. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .json_schema import JsonSchema # noqa: E402, I001 + +update_forward_refs(VariableExtractionPlan, JsonSchema=JsonSchema) diff --git a/src/vapi/types/variable_value_group_by.py b/src/vapi/types/variable_value_group_by.py new file mode 100644 index 00000000..b85502ef --- /dev/null +++ b/src/vapi/types/variable_value_group_by.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class VariableValueGroupBy(UncheckedBaseModel): + key: str = pydantic.Field() + """ + This is the key of the variable value to group by. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/voice_cost.py b/src/vapi/types/voice_cost.py index 4e3c91f5..30d3ef54 100644 --- a/src/vapi/types/voice_cost.py +++ b/src/vapi/types/voice_cost.py @@ -1,23 +1,18 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing + import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel -class VoiceCost(UniversalBaseModel): - type: typing.Literal["voice"] = pydantic.Field(default="voice") - """ - This is the type of cost, always 'voice' for this class. - """ - - voice: typing.Dict[str, typing.Optional[typing.Any]] = pydantic.Field() +class VoiceCost(UncheckedBaseModel): + voice: typing.Dict[str, typing.Any] = pydantic.Field() """ This is the voice that was used during the call. This matches one of the following: - - `call.assistant.voice`, - `call.assistantId->voice`, - `call.squad[n].assistant.voice`, diff --git a/src/vapi/types/voice_library.py b/src/vapi/types/voice_library.py index f033796f..80d3624b 100644 --- a/src/vapi/types/voice_library.py +++ b/src/vapi/types/voice_library.py @@ -1,28 +1,27 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +import datetime as dt import typing + import pydantic import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel from .voice_library_gender import VoiceLibraryGender -import datetime as dt -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -class VoiceLibrary(UniversalBaseModel): - provider: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None) +class VoiceLibrary(UncheckedBaseModel): + provider: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) """ This is the voice provider that will be used. """ - provider_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="providerId")] = pydantic.Field( - default=None - ) - """ - The ID of the voice provided by the provider. - """ - + provider_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="providerId"), + pydantic.Field(alias="providerId", description="The ID of the voice provided by the provider."), + ] = None slug: typing.Optional[str] = pydantic.Field(default=None) """ The unique slug of the voice. @@ -38,25 +37,21 @@ class VoiceLibrary(UniversalBaseModel): The language of the voice. """ - language_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="languageCode")] = ( - pydantic.Field(default=None) - ) - """ - The language code of the voice. - """ - + language_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="languageCode"), + pydantic.Field(alias="languageCode", description="The language code of the voice."), + ] = None model: typing.Optional[str] = pydantic.Field(default=None) """ The model of the voice. """ - supported_models: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="supportedModels")] = ( - pydantic.Field(default=None) - ) - """ - The supported models of the voice. - """ - + supported_models: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="supportedModels"), + pydantic.Field(alias="supportedModels", description="The supported models of the voice."), + ] = None gender: typing.Optional[VoiceLibraryGender] = pydantic.Field(default=None) """ The gender of the voice. @@ -67,54 +62,65 @@ class VoiceLibrary(UniversalBaseModel): The accent of the voice. """ - preview_url: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="previewUrl")] = pydantic.Field( - default=None - ) - """ - The preview URL of the voice. - """ - + preview_url: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="previewUrl"), + pydantic.Field(alias="previewUrl", description="The preview URL of the voice."), + ] = None + sort_order: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="sortOrder"), + pydantic.Field( + alias="sortOrder", + description="The sort order of the voice for display purposes. Lower values appear first.", + ), + ] = None description: typing.Optional[str] = pydantic.Field(default=None) """ The description of the voice. """ - credential_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="credentialId")] = ( - pydantic.Field(default=None) - ) - """ - The credential ID of the voice. - """ - + credential_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="credentialId"), + pydantic.Field(alias="credentialId", description="The credential ID of the voice."), + ] = None id: str = pydantic.Field() """ The unique identifier for the voice library. """ - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field() - """ - The unique identifier for the organization that this voice library belongs to. - """ - - is_public: typing_extensions.Annotated[bool, FieldMetadata(alias="isPublic")] = pydantic.Field() - """ - The Public voice is shared accross all the organizations. - """ - - is_deleted: typing_extensions.Annotated[bool, FieldMetadata(alias="isDeleted")] = pydantic.Field() - """ - The deletion status of the voice. - """ - - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() - """ - The ISO 8601 date-time string of when the voice library was created. - """ - - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() - """ - The ISO 8601 date-time string of when the voice library was last updated. - """ + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="The unique identifier for the organization that this voice library belongs to." + ), + ] + is_public: typing_extensions.Annotated[ + bool, + FieldMetadata(alias="isPublic"), + pydantic.Field(alias="isPublic", description="The Public voice is shared accross all the organizations."), + ] + is_deleted: typing_extensions.Annotated[ + bool, + FieldMetadata(alias="isDeleted"), + pydantic.Field(alias="isDeleted", description="The deletion status of the voice."), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="The ISO 8601 date-time string of when the voice library was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", description="The ISO 8601 date-time string of when the voice library was last updated." + ), + ] if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/voice_library_voice_response.py b/src/vapi/types/voice_library_voice_response.py index 4271b260..9f914cf9 100644 --- a/src/vapi/types/voice_library_voice_response.py +++ b/src/vapi/types/voice_library_voice_response.py @@ -1,20 +1,23 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions -from ..core.serialization import FieldMetadata import typing -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel -class VoiceLibraryVoiceResponse(UniversalBaseModel): - voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId")] +class VoiceLibraryVoiceResponse(UncheckedBaseModel): + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] name: str - public_owner_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="publicOwnerId")] = None + public_owner_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="publicOwnerId"), pydantic.Field(alias="publicOwnerId") + ] = None description: typing.Optional[str] = None gender: typing.Optional[str] = None - age: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None + age: typing.Optional[typing.Dict[str, typing.Any]] = None accent: typing.Optional[str] = None if IS_PYDANTIC_V2: diff --git a/src/vapi/types/voicemail_detection_backoff_plan.py b/src/vapi/types/voicemail_detection_backoff_plan.py new file mode 100644 index 00000000..54e70dd0 --- /dev/null +++ b/src/vapi/types/voicemail_detection_backoff_plan.py @@ -0,0 +1,41 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class VoicemailDetectionBackoffPlan(UncheckedBaseModel): + start_at_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="startAtSeconds"), + pydantic.Field( + alias="startAtSeconds", + description="This is the number of seconds to wait before starting the first retry attempt.", + ), + ] = None + frequency_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="frequencySeconds"), + pydantic.Field(alias="frequencySeconds", description="This is the interval in seconds between retry attempts."), + ] = None + max_retries: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="maxRetries"), + pydantic.Field( + alias="maxRetries", description="This is the maximum number of retry attempts before giving up." + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/voicemail_detection_cost.py b/src/vapi/types/voicemail_detection_cost.py new file mode 100644 index 00000000..926ee994 --- /dev/null +++ b/src/vapi/types/voicemail_detection_cost.py @@ -0,0 +1,68 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .voicemail_detection_cost_provider import VoicemailDetectionCostProvider + + +class VoicemailDetectionCost(UncheckedBaseModel): + model: typing.Dict[str, typing.Any] = pydantic.Field() + """ + This is the model that was used to perform the analysis. + """ + + provider: VoicemailDetectionCostProvider = pydantic.Field() + """ + This is the provider that was used to detect the voicemail. + """ + + prompt_text_tokens: typing_extensions.Annotated[ + float, + FieldMetadata(alias="promptTextTokens"), + pydantic.Field( + alias="promptTextTokens", + description="This is the number of prompt text tokens used in the voicemail detection.", + ), + ] + prompt_audio_tokens: typing_extensions.Annotated[ + float, + FieldMetadata(alias="promptAudioTokens"), + pydantic.Field( + alias="promptAudioTokens", + description="This is the number of prompt audio tokens used in the voicemail detection.", + ), + ] + completion_text_tokens: typing_extensions.Annotated[ + float, + FieldMetadata(alias="completionTextTokens"), + pydantic.Field( + alias="completionTextTokens", + description="This is the number of completion text tokens used in the voicemail detection.", + ), + ] + completion_audio_tokens: typing_extensions.Annotated[ + float, + FieldMetadata(alias="completionAudioTokens"), + pydantic.Field( + alias="completionAudioTokens", + description="This is the number of completion audio tokens used in the voicemail detection.", + ), + ] + cost: float = pydantic.Field() + """ + This is the cost of the component in USD. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/voicemail_detection_cost_provider.py b/src/vapi/types/voicemail_detection_cost_provider.py new file mode 100644 index 00000000..305e00fb --- /dev/null +++ b/src/vapi/types/voicemail_detection_cost_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +VoicemailDetectionCostProvider = typing.Union[typing.Literal["twilio", "google", "openai", "vapi"], typing.Any] diff --git a/src/vapi/types/voicemail_tool.py b/src/vapi/types/voicemail_tool.py new file mode 100644 index 00000000..8788d2fd --- /dev/null +++ b/src/vapi/types/voicemail_tool.py @@ -0,0 +1,78 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .tool_rejection_plan import ToolRejectionPlan +from .voicemail_tool_messages_item import VoicemailToolMessagesItem + + +class VoicemailTool(UncheckedBaseModel): + messages: typing.Optional[typing.List[VoicemailToolMessagesItem]] = pydantic.Field(default=None) + """ + These are the messages that will be spoken to the user as the tool is running. + + For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. + """ + + beep_detection_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="beepDetectionEnabled"), + pydantic.Field( + alias="beepDetectionEnabled", + description="This is the flag that enables beep detection for voicemail detection and applies only for twilio based calls.\n\n@default false", + ), + ] = None + id: str = pydantic.Field() + """ + This is the unique identifier for the tool. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the organization that this tool belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the tool was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", description="This is the ISO 8601 date-time string of when the tool was last updated." + ), + ] + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], + FieldMetadata(alias="rejectionPlan"), + pydantic.Field( + alias="rejectionPlan", + description="This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(VoicemailTool) diff --git a/src/vapi/types/voicemail_tool_messages_item.py b/src/vapi/types/voicemail_tool_messages_item.py new file mode 100644 index 00000000..d065dafe --- /dev/null +++ b/src/vapi/types/voicemail_tool_messages_item.py @@ -0,0 +1,104 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .condition import Condition +from .text_content import TextContent +from .tool_message_complete_role import ToolMessageCompleteRole + + +class VoicemailToolMessagesItem_RequestStart(UncheckedBaseModel): + type: typing.Literal["request-start"] = "request-start" + contents: typing.Optional[typing.List[TextContent]] = None + blocking: typing.Optional[bool] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class VoicemailToolMessagesItem_RequestComplete(UncheckedBaseModel): + type: typing.Literal["request-complete"] = "request-complete" + contents: typing.Optional[typing.List[TextContent]] = None + role: typing.Optional[ToolMessageCompleteRole] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class VoicemailToolMessagesItem_RequestFailed(UncheckedBaseModel): + type: typing.Literal["request-failed"] = "request-failed" + contents: typing.Optional[typing.List[TextContent]] = None + end_call_after_spoken_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="endCallAfterSpokenEnabled"), + pydantic.Field(alias="endCallAfterSpokenEnabled"), + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class VoicemailToolMessagesItem_RequestResponseDelayed(UncheckedBaseModel): + type: typing.Literal["request-response-delayed"] = "request-response-delayed" + contents: typing.Optional[typing.List[TextContent]] = None + timing_milliseconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timingMilliseconds"), pydantic.Field(alias="timingMilliseconds") + ] = None + content: typing.Optional[str] = None + conditions: typing.Optional[typing.List[Condition]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +VoicemailToolMessagesItem = typing_extensions.Annotated[ + typing.Union[ + VoicemailToolMessagesItem_RequestStart, + VoicemailToolMessagesItem_RequestComplete, + VoicemailToolMessagesItem_RequestFailed, + VoicemailToolMessagesItem_RequestResponseDelayed, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/vonage_credential.py b/src/vapi/types/vonage_credential.py index efb8d55e..a5b207ef 100644 --- a/src/vapi/types/vonage_credential.py +++ b/src/vapi/types/vonage_credential.py @@ -1,58 +1,69 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions -from ..core.serialization import FieldMetadata -import pydantic -import typing import datetime as dt +import typing + +import pydantic +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .vonage_credential_provider import VonageCredentialProvider -class VonageCredential(UniversalBaseModel): +class VonageCredential(UncheckedBaseModel): vonage_application_private_key: typing_extensions.Annotated[ - str, FieldMetadata(alias="vonageApplicationPrivateKey") - ] = pydantic.Field() - """ - This is not returned in the API. - """ - - provider: typing.Literal["vonage"] = "vonage" - api_secret: typing_extensions.Annotated[str, FieldMetadata(alias="apiSecret")] = pydantic.Field() - """ - This is not returned in the API. - """ - + str, + FieldMetadata(alias="vonageApplicationPrivateKey"), + pydantic.Field(alias="vonageApplicationPrivateKey", description="This is not returned in the API."), + ] + provider: VonageCredentialProvider + api_secret: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiSecret"), + pydantic.Field(alias="apiSecret", description="This is not returned in the API."), + ] id: str = pydantic.Field() """ This is the unique identifier for the credential. """ - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field() - """ - This is the unique identifier for the org that this credential belongs to. - """ - - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the credential was created. - """ - - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the assistant was last updated. - """ - - vonage_application_id: typing_extensions.Annotated[str, FieldMetadata(alias="vonageApplicationId")] = ( - pydantic.Field() - ) + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + vonage_application_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="vonageApplicationId"), + pydantic.Field( + alias="vonageApplicationId", + description="This is the Vonage Application ID for the credential.\n\nOnly relevant for Vonage credentials.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) """ - This is the Vonage Application ID for the credential. - - Only relevant for Vonage credentials. + This is the name of credential. This is just for your reference. """ - api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey")] + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/vonage_credential_provider.py b/src/vapi/types/vonage_credential_provider.py new file mode 100644 index 00000000..d768a9f7 --- /dev/null +++ b/src/vapi/types/vonage_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +VonageCredentialProvider = typing.Union[typing.Literal["vonage"], typing.Any] diff --git a/src/vapi/types/vonage_phone_number.py b/src/vapi/types/vonage_phone_number.py index 4c746ae3..940e8d6e 100644 --- a/src/vapi/types/vonage_phone_number.py +++ b/src/vapi/types/vonage_phone_number.py @@ -1,48 +1,63 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions +import datetime as dt import typing -from .vonage_phone_number_fallback_destination import VonagePhoneNumberFallbackDestination -from ..core.serialization import FieldMetadata + import pydantic -import datetime as dt +import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .server import Server +from .vonage_phone_number_fallback_destination import VonagePhoneNumberFallbackDestination +from .vonage_phone_number_hooks_item import VonagePhoneNumberHooksItem +from .vonage_phone_number_status import VonagePhoneNumberStatus -class VonagePhoneNumber(UniversalBaseModel): +class VonagePhoneNumber(UncheckedBaseModel): fallback_destination: typing_extensions.Annotated[ - typing.Optional[VonagePhoneNumberFallbackDestination], FieldMetadata(alias="fallbackDestination") - ] = pydantic.Field(default=None) + typing.Optional[VonagePhoneNumberFallbackDestination], + FieldMetadata(alias="fallbackDestination"), + pydantic.Field( + alias="fallbackDestination", + description="This is the fallback destination an inbound call will be transferred to if:\n1. `assistantId` is not set\n2. `squadId` is not set\n3. and, `assistant-request` message to the `serverUrl` fails\n\nIf this is not set and above conditions are met, the inbound call is hung up with an error message.", + ), + ] = None + hooks: typing.Optional[typing.List[VonagePhoneNumberHooksItem]] = pydantic.Field(default=None) """ - This is the fallback destination an inbound call will be transferred to if: - - 1. `assistantId` is not set - 2. `squadId` is not set - 3. and, `assistant-request` message to the `serverUrl` fails - - If this is not set and above conditions are met, the inbound call is hung up with an error message. + This is the hooks that will be used for incoming calls to this phone number. """ - provider: typing.Literal["vonage"] = "vonage" id: str = pydantic.Field() """ This is the unique identifier for the phone number. """ - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field() - """ - This is the unique identifier for the org that this phone number belongs to. - """ - - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the phone number was created. - """ - - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the phone number was last updated. + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this phone number belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the phone number was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the phone number was last updated.", + ), + ] + status: typing.Optional[VonagePhoneNumberStatus] = pydantic.Field(default=None) + """ + This is the status of the phone number. """ name: typing.Optional[str] = pydantic.Field(default=None) @@ -50,42 +65,39 @@ class VonagePhoneNumber(UniversalBaseModel): This is the name of the phone number. This is just for your own reference. """ - assistant_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="assistantId")] = ( - pydantic.Field(default=None) - ) - """ - This is the assistant that will be used for incoming calls to this phone number. - - If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected. - """ - - squad_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="squadId")] = pydantic.Field( - default=None - ) - """ - This is the squad that will be used for incoming calls to this phone number. - - If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected. - """ - - server_url: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="serverUrl")] = pydantic.Field( - default=None - ) - """ - This is the server URL where messages will be sent for calls on this number. This includes the `assistant-request` message. + assistant_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assistantId"), + pydantic.Field( + alias="assistantId", + description="This is the assistant that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + workflow_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="workflowId"), + pydantic.Field( + alias="workflowId", + description="This is the workflow that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + squad_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="squadId"), + pydantic.Field( + alias="squadId", + description="This is the squad that will be used for incoming calls to this phone number.\n\nIf neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.", + ), + ] = None + server: typing.Optional[Server] = pydantic.Field(default=None) + """ + This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema. - You can see the shape of the messages sent in `ServerMessage`. - - This overrides the `org.serverUrl`. Order of precedence: tool.server.url > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl. - """ - - server_url_secret: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="serverUrlSecret")] = ( - pydantic.Field(default=None) - ) - """ - This is the secret Vapi will send with every message to your server. It's sent as a header called x-vapi-secret. + The order of precedence is: - Same precedence logic as serverUrl. + 1. assistant.server + 2. phoneNumber.server + 3. org.server """ number: str = pydantic.Field() @@ -93,10 +105,14 @@ class VonagePhoneNumber(UniversalBaseModel): These are the digits of the phone number you own on your Vonage. """ - credential_id: typing_extensions.Annotated[str, FieldMetadata(alias="credentialId")] = pydantic.Field() - """ - This is the credential that is used to make outgoing calls, and do operations like call transfer and hang up. - """ + credential_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="credentialId"), + pydantic.Field( + alias="credentialId", + description="This is the credential you added in dashboard.vapi.ai/keys. This is used to configure the number to send inbound calls to Vapi, make outbound calls and do live call updates like transfers and hangups.", + ), + ] if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/vapi/types/vonage_phone_number_fallback_destination.py b/src/vapi/types/vonage_phone_number_fallback_destination.py index 8b557ec1..c8641c7f 100644 --- a/src/vapi/types/vonage_phone_number_fallback_destination.py +++ b/src/vapi/types/vonage_phone_number_fallback_destination.py @@ -1,7 +1,93 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing -from .transfer_destination_number import TransferDestinationNumber -from .transfer_destination_sip import TransferDestinationSip -VonagePhoneNumberFallbackDestination = typing.Union[TransferDestinationNumber, TransferDestinationSip] +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .transfer_destination_number_message import TransferDestinationNumberMessage +from .transfer_destination_sip_message import TransferDestinationSipMessage +from .transfer_plan import TransferPlan + + +class VonagePhoneNumberFallbackDestination_Number(UncheckedBaseModel): + """ + This is the fallback destination an inbound call will be transferred to if: + 1. `assistantId` is not set + 2. `squadId` is not set + 3. and, `assistant-request` message to the `serverUrl` fails + + If this is not set and above conditions are met, the inbound call is hung up with an error message. + """ + + type: typing.Literal["number"] = "number" + message: typing.Optional[TransferDestinationNumberMessage] = None + number_e_164_check_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="numberE164CheckEnabled"), + pydantic.Field(alias="numberE164CheckEnabled"), + ] = None + number: str + extension: typing.Optional[str] = None + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class VonagePhoneNumberFallbackDestination_Sip(UncheckedBaseModel): + """ + This is the fallback destination an inbound call will be transferred to if: + 1. `assistantId` is not set + 2. `squadId` is not set + 3. and, `assistant-request` message to the `serverUrl` fails + + If this is not set and above conditions are met, the inbound call is hung up with an error message. + """ + + type: typing.Literal["sip"] = "sip" + message: typing.Optional[TransferDestinationSipMessage] = None + sip_uri: typing_extensions.Annotated[str, FieldMetadata(alias="sipUri"), pydantic.Field(alias="sipUri")] + caller_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callerId"), pydantic.Field(alias="callerId") + ] = None + transfer_plan: typing_extensions.Annotated[ + typing.Optional[TransferPlan], FieldMetadata(alias="transferPlan"), pydantic.Field(alias="transferPlan") + ] = None + sip_headers: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="sipHeaders"), + pydantic.Field(alias="sipHeaders"), + ] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +VonagePhoneNumberFallbackDestination = typing_extensions.Annotated[ + typing.Union[VonagePhoneNumberFallbackDestination_Number, VonagePhoneNumberFallbackDestination_Sip], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/vonage_phone_number_hooks_item.py b/src/vapi/types/vonage_phone_number_hooks_item.py new file mode 100644 index 00000000..51c48cf1 --- /dev/null +++ b/src/vapi/types/vonage_phone_number_hooks_item.py @@ -0,0 +1,50 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .phone_number_call_ending_hook_filter import PhoneNumberCallEndingHookFilter +from .phone_number_call_ringing_hook_filter import PhoneNumberCallRingingHookFilter +from .phone_number_hook_call_ending_do import PhoneNumberHookCallEndingDo +from .phone_number_hook_call_ringing_do_item import PhoneNumberHookCallRingingDoItem + + +class VonagePhoneNumberHooksItem_CallRinging(UncheckedBaseModel): + on: typing.Literal["call.ringing"] = "call.ringing" + filters: typing.Optional[typing.List[PhoneNumberCallRingingHookFilter]] = None + do: typing.List[PhoneNumberHookCallRingingDoItem] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class VonagePhoneNumberHooksItem_CallEnding(UncheckedBaseModel): + on: typing.Literal["call.ending"] = "call.ending" + filters: typing.Optional[typing.List[PhoneNumberCallEndingHookFilter]] = None + do: typing.Optional[PhoneNumberHookCallEndingDo] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +VonagePhoneNumberHooksItem = typing_extensions.Annotated[ + typing.Union[VonagePhoneNumberHooksItem_CallRinging, VonagePhoneNumberHooksItem_CallEnding], + UnionMetadata(discriminant="on"), +] diff --git a/src/vapi/types/vonage_phone_number_status.py b/src/vapi/types/vonage_phone_number_status.py new file mode 100644 index 00000000..95078b41 --- /dev/null +++ b/src/vapi/types/vonage_phone_number_status.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +VonagePhoneNumberStatus = typing.Union[typing.Literal["active", "activating", "blocked"], typing.Any] diff --git a/src/vapi/types/web_chat.py b/src/vapi/types/web_chat.py new file mode 100644 index 00000000..c08b15cd --- /dev/null +++ b/src/vapi/types/web_chat.py @@ -0,0 +1,39 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .web_chat_output_item import WebChatOutputItem + + +class WebChat(UncheckedBaseModel): + id: str = pydantic.Field() + """ + This is the unique identifier for the chat. + """ + + session_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="sessionId"), + pydantic.Field( + alias="sessionId", + description="This is the ID of the session for the chat. Send it in the next chat request to continue the conversation.", + ), + ] = None + output: typing.List[WebChatOutputItem] = pydantic.Field() + """ + This is the output messages generated by the system in response to the input. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/web_chat_output_item.py b/src/vapi/types/web_chat_output_item.py new file mode 100644 index 00000000..5e4da7d1 --- /dev/null +++ b/src/vapi/types/web_chat_output_item.py @@ -0,0 +1,11 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .assistant_message import AssistantMessage +from .developer_message import DeveloperMessage +from .system_message import SystemMessage +from .tool_message import ToolMessage +from .user_message import UserMessage + +WebChatOutputItem = typing.Union[SystemMessage, UserMessage, AssistantMessage, ToolMessage, DeveloperMessage] diff --git a/src/vapi/types/webhook_credential.py b/src/vapi/types/webhook_credential.py new file mode 100644 index 00000000..8387c18b --- /dev/null +++ b/src/vapi/types/webhook_credential.py @@ -0,0 +1,73 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .oauth_2_authentication_session import Oauth2AuthenticationSession +from .webhook_credential_authentication_plan import WebhookCredentialAuthenticationPlan +from .webhook_credential_provider import WebhookCredentialProvider + + +class WebhookCredential(UncheckedBaseModel): + provider: WebhookCredentialProvider + authentication_plan: typing_extensions.Annotated[ + WebhookCredentialAuthenticationPlan, + FieldMetadata(alias="authenticationPlan"), + pydantic.Field( + alias="authenticationPlan", + description="This is the authentication plan. Supports OAuth2 RFC 6749, HMAC signing, and Bearer authentication.", + ), + ] + id: str = pydantic.Field() + """ + This is the unique identifier for the credential. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + authentication_session: typing_extensions.Annotated[ + Oauth2AuthenticationSession, + FieldMetadata(alias="authenticationSession"), + pydantic.Field( + alias="authenticationSession", + description="This is the authentication session for the credential. Available for credentials that have an authentication plan.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/webhook_credential_authentication_plan.py b/src/vapi/types/webhook_credential_authentication_plan.py new file mode 100644 index 00000000..9834e385 --- /dev/null +++ b/src/vapi/types/webhook_credential_authentication_plan.py @@ -0,0 +1,115 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .hmac_authentication_plan_algorithm import HmacAuthenticationPlanAlgorithm +from .hmac_authentication_plan_signature_encoding import HmacAuthenticationPlanSignatureEncoding + + +class WebhookCredentialAuthenticationPlan_Oauth2(UncheckedBaseModel): + """ + This is the authentication plan. Supports OAuth2 RFC 6749, HMAC signing, and Bearer authentication. + """ + + type: typing.Literal["oauth2"] = "oauth2" + url: str + client_id: typing_extensions.Annotated[str, FieldMetadata(alias="clientId"), pydantic.Field(alias="clientId")] + client_secret: typing_extensions.Annotated[ + str, FieldMetadata(alias="clientSecret"), pydantic.Field(alias="clientSecret") + ] + scope: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WebhookCredentialAuthenticationPlan_Hmac(UncheckedBaseModel): + """ + This is the authentication plan. Supports OAuth2 RFC 6749, HMAC signing, and Bearer authentication. + """ + + type: typing.Literal["hmac"] = "hmac" + secret_key: typing_extensions.Annotated[str, FieldMetadata(alias="secretKey"), pydantic.Field(alias="secretKey")] + algorithm: HmacAuthenticationPlanAlgorithm + signature_header: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="signatureHeader"), pydantic.Field(alias="signatureHeader") + ] = None + timestamp_header: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="timestampHeader"), pydantic.Field(alias="timestampHeader") + ] = None + signature_prefix: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="signaturePrefix"), pydantic.Field(alias="signaturePrefix") + ] = None + include_timestamp: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="includeTimestamp"), pydantic.Field(alias="includeTimestamp") + ] = None + payload_format: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="payloadFormat"), pydantic.Field(alias="payloadFormat") + ] = None + message_id_header: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="messageIdHeader"), pydantic.Field(alias="messageIdHeader") + ] = None + signature_encoding: typing_extensions.Annotated[ + typing.Optional[HmacAuthenticationPlanSignatureEncoding], + FieldMetadata(alias="signatureEncoding"), + pydantic.Field(alias="signatureEncoding"), + ] = None + secret_is_base_64: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="secretIsBase64"), pydantic.Field(alias="secretIsBase64") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WebhookCredentialAuthenticationPlan_Bearer(UncheckedBaseModel): + """ + This is the authentication plan. Supports OAuth2 RFC 6749, HMAC signing, and Bearer authentication. + """ + + type: typing.Literal["bearer"] = "bearer" + token: str + header_name: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="headerName"), pydantic.Field(alias="headerName") + ] = None + bearer_prefix_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="bearerPrefixEnabled"), pydantic.Field(alias="bearerPrefixEnabled") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +WebhookCredentialAuthenticationPlan = typing_extensions.Annotated[ + typing.Union[ + WebhookCredentialAuthenticationPlan_Oauth2, + WebhookCredentialAuthenticationPlan_Hmac, + WebhookCredentialAuthenticationPlan_Bearer, + ], + UnionMetadata(discriminant="type"), +] diff --git a/src/vapi/types/webhook_credential_provider.py b/src/vapi/types/webhook_credential_provider.py new file mode 100644 index 00000000..030f5cfe --- /dev/null +++ b/src/vapi/types/webhook_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +WebhookCredentialProvider = typing.Union[typing.Literal["webhook"], typing.Any] diff --git a/src/vapi/types/well_said_credential.py b/src/vapi/types/well_said_credential.py new file mode 100644 index 00000000..2e3e2568 --- /dev/null +++ b/src/vapi/types/well_said_credential.py @@ -0,0 +1,60 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .well_said_credential_provider import WellSaidCredentialProvider + + +class WellSaidCredential(UncheckedBaseModel): + provider: WellSaidCredentialProvider + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + id: str = pydantic.Field() + """ + This is the unique identifier for the credential. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/well_said_credential_provider.py b/src/vapi/types/well_said_credential_provider.py new file mode 100644 index 00000000..41deccbe --- /dev/null +++ b/src/vapi/types/well_said_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +WellSaidCredentialProvider = typing.Union[typing.Literal["wellsaid"], typing.Any] diff --git a/src/vapi/types/well_said_voice.py b/src/vapi/types/well_said_voice.py new file mode 100644 index 00000000..d9dacf36 --- /dev/null +++ b/src/vapi/types/well_said_voice.py @@ -0,0 +1,67 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .chunk_plan import ChunkPlan +from .fallback_plan import FallbackPlan +from .well_said_voice_model import WellSaidVoiceModel + + +class WellSaidVoice(UncheckedBaseModel): + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="cachingEnabled"), + pydantic.Field( + alias="cachingEnabled", description="This is the flag to toggle voice caching for the assistant." + ), + ] = None + voice_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="voiceId"), + pydantic.Field(alias="voiceId", description="The WellSaid speaker ID to synthesize."), + ] + model: typing.Optional[WellSaidVoiceModel] = pydantic.Field(default=None) + """ + This is the model that will be used. + """ + + enable_ssml: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="enableSsml"), + pydantic.Field(alias="enableSsml", description="Enables limited SSML translation for input text."), + ] = None + library_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="libraryIds"), + pydantic.Field(alias="libraryIds", description="Array of library IDs to use for voice synthesis."), + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], + FieldMetadata(alias="chunkPlan"), + pydantic.Field( + alias="chunkPlan", + description="This is the plan for chunking the model output before it is sent to the voice provider.", + ), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field( + alias="fallbackPlan", + description="This is the plan for voice provider fallbacks in the event that the primary voice provider fails.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/well_said_voice_model.py b/src/vapi/types/well_said_voice_model.py new file mode 100644 index 00000000..fc09d4ee --- /dev/null +++ b/src/vapi/types/well_said_voice_model.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +WellSaidVoiceModel = typing.Union[typing.Literal["caruso", "legacy"], typing.Any] diff --git a/src/vapi/types/workflow.py b/src/vapi/types/workflow.py new file mode 100644 index 00000000..fff5b0a0 --- /dev/null +++ b/src/vapi/types/workflow.py @@ -0,0 +1,213 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .analysis_plan import AnalysisPlan +from .artifact_plan import ArtifactPlan +from .background_speech_denoising_plan import BackgroundSpeechDenoisingPlan +from .compliance_plan import CompliancePlan +from .edge import Edge +from .keypad_input_plan import KeypadInputPlan +from .langfuse_observability_plan import LangfuseObservabilityPlan +from .monitor_plan import MonitorPlan +from .server import Server +from .start_speaking_plan import StartSpeakingPlan +from .stop_speaking_plan import StopSpeakingPlan +from .workflow_background_sound import WorkflowBackgroundSound +from .workflow_credentials_item import WorkflowCredentialsItem +from .workflow_hooks_item import WorkflowHooksItem +from .workflow_model import WorkflowModel +from .workflow_nodes_item import WorkflowNodesItem +from .workflow_transcriber import WorkflowTranscriber +from .workflow_voice import WorkflowVoice +from .workflow_voicemail_detection import WorkflowVoicemailDetection + + +class Workflow(UncheckedBaseModel): + nodes: typing.List[WorkflowNodesItem] + model: typing.Optional[WorkflowModel] = pydantic.Field(default=None) + """ + This is the model for the workflow. + + This can be overridden at node level using `nodes[n].model`. + """ + + transcriber: typing.Optional[WorkflowTranscriber] = pydantic.Field(default=None) + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + voice: typing.Optional[WorkflowVoice] = pydantic.Field(default=None) + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + observability_plan: typing_extensions.Annotated[ + typing.Optional[LangfuseObservabilityPlan], + FieldMetadata(alias="observabilityPlan"), + pydantic.Field( + alias="observabilityPlan", + description="This is the plan for observability of workflow's calls.\n\nCurrently, only Langfuse is supported.", + ), + ] = None + background_sound: typing_extensions.Annotated[ + typing.Optional[WorkflowBackgroundSound], + FieldMetadata(alias="backgroundSound"), + pydantic.Field( + alias="backgroundSound", + description="This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'.\nYou can also provide a custom sound by providing a URL to an audio file.", + ), + ] = None + hooks: typing.Optional[typing.List[WorkflowHooksItem]] = pydantic.Field(default=None) + """ + This is a set of actions that will be performed on certain events. + """ + + credentials: typing.Optional[typing.List[WorkflowCredentialsItem]] = pydantic.Field(default=None) + """ + These are dynamic credentials that will be used for the workflow calls. By default, all the credentials are available for use in the call but you can supplement an additional credentials using this. Dynamic credentials override existing credentials. + """ + + voicemail_detection: typing_extensions.Annotated[ + typing.Optional[WorkflowVoicemailDetection], + FieldMetadata(alias="voicemailDetection"), + pydantic.Field( + alias="voicemailDetection", description="This is the voicemail detection plan for the workflow." + ), + ] = None + max_duration_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="maxDurationSeconds"), + pydantic.Field( + alias="maxDurationSeconds", + description="This is the maximum duration of the call in seconds.\n\nAfter this duration, the call will automatically end.\n\nDefault is 1800 (30 minutes), max is 43200 (12 hours), and min is 10 seconds.", + ), + ] = None + id: str + org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId"), pydantic.Field(alias="orgId")] + created_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt") + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt") + ] + name: str + edges: typing.List[Edge] + global_prompt: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="globalPrompt"), pydantic.Field(alias="globalPrompt") + ] = None + server: typing.Optional[Server] = pydantic.Field(default=None) + """ + This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema. + + The order of precedence is: + + 1. tool.server + 2. workflow.server / assistant.server + 3. phoneNumber.server + 4. org.server + """ + + compliance_plan: typing_extensions.Annotated[ + typing.Optional[CompliancePlan], + FieldMetadata(alias="compliancePlan"), + pydantic.Field( + alias="compliancePlan", + description="This is the compliance plan for the workflow. It allows you to configure HIPAA and other compliance settings.", + ), + ] = None + analysis_plan: typing_extensions.Annotated[ + typing.Optional[AnalysisPlan], + FieldMetadata(alias="analysisPlan"), + pydantic.Field( + alias="analysisPlan", + description="This is the plan for analysis of workflow's calls. Stored in `call.analysis`.", + ), + ] = None + artifact_plan: typing_extensions.Annotated[ + typing.Optional[ArtifactPlan], + FieldMetadata(alias="artifactPlan"), + pydantic.Field( + alias="artifactPlan", + description="This is the plan for artifacts generated during workflow's calls. Stored in `call.artifact`.", + ), + ] = None + start_speaking_plan: typing_extensions.Annotated[ + typing.Optional[StartSpeakingPlan], + FieldMetadata(alias="startSpeakingPlan"), + pydantic.Field( + alias="startSpeakingPlan", + description="This is the plan for when the workflow nodes should start talking.\n\nYou should configure this if you're running into these issues:\n- The assistant is too slow to start talking after the customer is done speaking.\n- The assistant is too fast to start talking after the customer is done speaking.\n- The assistant is so fast that it's actually interrupting the customer.", + ), + ] = None + stop_speaking_plan: typing_extensions.Annotated[ + typing.Optional[StopSpeakingPlan], + FieldMetadata(alias="stopSpeakingPlan"), + pydantic.Field( + alias="stopSpeakingPlan", + description="This is the plan for when workflow nodes should stop talking on customer interruption.\n\nYou should configure this if you're running into these issues:\n- The assistant is too slow to recognize customer's interruption.\n- The assistant is too fast to recognize customer's interruption.\n- The assistant is getting interrupted by phrases that are just acknowledgments.\n- The assistant is getting interrupted by background noises.\n- The assistant is not properly stopping -- it starts talking right after getting interrupted.", + ), + ] = None + monitor_plan: typing_extensions.Annotated[ + typing.Optional[MonitorPlan], + FieldMetadata(alias="monitorPlan"), + pydantic.Field( + alias="monitorPlan", + description="This is the plan for real-time monitoring of the workflow's calls.\n\nUsage:\n- To enable live listening of the workflow's calls, set `monitorPlan.listenEnabled` to `true`.\n- To enable live control of the workflow's calls, set `monitorPlan.controlEnabled` to `true`.", + ), + ] = None + background_speech_denoising_plan: typing_extensions.Annotated[ + typing.Optional[BackgroundSpeechDenoisingPlan], + FieldMetadata(alias="backgroundSpeechDenoisingPlan"), + pydantic.Field( + alias="backgroundSpeechDenoisingPlan", + description="This enables filtering of noise and background speech while the user is talking.\n\nFeatures:\n- Smart denoising using Krisp\n- Fourier denoising\n\nBoth can be used together. Order of precedence:\n- Smart denoising\n- Fourier denoising", + ), + ] = None + credential_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="credentialIds"), + pydantic.Field( + alias="credentialIds", + description="These are the credentials that will be used for the workflow calls. By default, all the credentials are available for use in the call but you can provide a subset using this.", + ), + ] = None + keypad_input_plan: typing_extensions.Annotated[ + typing.Optional[KeypadInputPlan], + FieldMetadata(alias="keypadInputPlan"), + pydantic.Field( + alias="keypadInputPlan", description="This is the plan for keypad input handling during workflow calls." + ), + ] = None + voicemail_message: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="voicemailMessage"), + pydantic.Field( + alias="voicemailMessage", + description="This is the message that the assistant will say if the call is forwarded to voicemail.\n\nIf unspecified, it will hang up.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(Workflow) diff --git a/src/vapi/types/workflow_anthropic_bedrock_model.py b/src/vapi/types/workflow_anthropic_bedrock_model.py new file mode 100644 index 00000000..00245be6 --- /dev/null +++ b/src/vapi/types/workflow_anthropic_bedrock_model.py @@ -0,0 +1,45 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .anthropic_thinking_config import AnthropicThinkingConfig +from .workflow_anthropic_bedrock_model_model import WorkflowAnthropicBedrockModelModel + + +class WorkflowAnthropicBedrockModel(UncheckedBaseModel): + model: WorkflowAnthropicBedrockModelModel = pydantic.Field() + """ + This is the specific model that will be used. + """ + + thinking: typing.Optional[AnthropicThinkingConfig] = pydantic.Field(default=None) + """ + This is the optional configuration for Anthropic's thinking feature. + + - If provided, `maxTokens` must be greater than `thinking.budgetTokens`. + """ + + temperature: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the temperature of the model. + """ + + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="maxTokens"), + pydantic.Field(alias="maxTokens", description="This is the max tokens of the model."), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/workflow_anthropic_bedrock_model_model.py b/src/vapi/types/workflow_anthropic_bedrock_model_model.py new file mode 100644 index 00000000..6eed238b --- /dev/null +++ b/src/vapi/types/workflow_anthropic_bedrock_model_model.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +WorkflowAnthropicBedrockModelModel = typing.Union[ + typing.Literal[ + "claude-3-opus-20240229", + "claude-3-sonnet-20240229", + "claude-3-haiku-20240307", + "claude-3-5-sonnet-20240620", + "claude-3-5-sonnet-20241022", + "claude-3-5-haiku-20241022", + "claude-3-7-sonnet-20250219", + "claude-opus-4-20250514", + "claude-opus-4-5-20251101", + "claude-opus-4-6", + "claude-sonnet-4-20250514", + "claude-sonnet-4-5-20250929", + "claude-sonnet-4-6", + "claude-haiku-4-5-20251001", + ], + typing.Any, +] diff --git a/src/vapi/types/workflow_anthropic_model.py b/src/vapi/types/workflow_anthropic_model.py new file mode 100644 index 00000000..d69497e2 --- /dev/null +++ b/src/vapi/types/workflow_anthropic_model.py @@ -0,0 +1,45 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .anthropic_thinking_config import AnthropicThinkingConfig +from .workflow_anthropic_model_model import WorkflowAnthropicModelModel + + +class WorkflowAnthropicModel(UncheckedBaseModel): + model: WorkflowAnthropicModelModel = pydantic.Field() + """ + This is the specific model that will be used. + """ + + thinking: typing.Optional[AnthropicThinkingConfig] = pydantic.Field(default=None) + """ + This is the optional configuration for Anthropic's thinking feature. + + - If provided, `maxTokens` must be greater than `thinking.budgetTokens`. + """ + + temperature: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the temperature of the model. + """ + + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="maxTokens"), + pydantic.Field(alias="maxTokens", description="This is the max tokens of the model."), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/workflow_anthropic_model_model.py b/src/vapi/types/workflow_anthropic_model_model.py new file mode 100644 index 00000000..86e8e098 --- /dev/null +++ b/src/vapi/types/workflow_anthropic_model_model.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +WorkflowAnthropicModelModel = typing.Union[ + typing.Literal[ + "claude-3-opus-20240229", + "claude-3-sonnet-20240229", + "claude-3-haiku-20240307", + "claude-3-5-sonnet-20240620", + "claude-3-5-sonnet-20241022", + "claude-3-5-haiku-20241022", + "claude-3-7-sonnet-20250219", + "claude-opus-4-20250514", + "claude-opus-4-5-20251101", + "claude-opus-4-6", + "claude-sonnet-4-20250514", + "claude-sonnet-4-5-20250929", + "claude-sonnet-4-6", + "claude-haiku-4-5-20251001", + ], + typing.Any, +] diff --git a/src/vapi/types/workflow_background_sound.py b/src/vapi/types/workflow_background_sound.py new file mode 100644 index 00000000..3da6103c --- /dev/null +++ b/src/vapi/types/workflow_background_sound.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .workflow_background_sound_zero import WorkflowBackgroundSoundZero + +WorkflowBackgroundSound = typing.Union[WorkflowBackgroundSoundZero, str] diff --git a/src/vapi/types/workflow_background_sound_zero.py b/src/vapi/types/workflow_background_sound_zero.py new file mode 100644 index 00000000..0ea08630 --- /dev/null +++ b/src/vapi/types/workflow_background_sound_zero.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +WorkflowBackgroundSoundZero = typing.Union[typing.Literal["off", "office"], typing.Any] diff --git a/src/vapi/types/workflow_block.py b/src/vapi/types/workflow_block.py deleted file mode 100644 index 88d24b1b..00000000 --- a/src/vapi/types/workflow_block.py +++ /dev/null @@ -1,99 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -from .callback_step import CallbackStep -from .create_workflow_block_dto import CreateWorkflowBlockDto -from .handoff_step import HandoffStep -import typing -from .workflow_block_messages_item import WorkflowBlockMessagesItem -import pydantic -import typing_extensions -from .json_schema import JsonSchema -from ..core.serialization import FieldMetadata -from .workflow_block_steps_item import WorkflowBlockStepsItem -import datetime as dt -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.pydantic_utilities import update_forward_refs - - -class WorkflowBlock(UniversalBaseModel): - messages: typing.Optional[typing.List[WorkflowBlockMessagesItem]] = pydantic.Field(default=None) - """ - These are the pre-configured messages that will be spoken to the user while the block is running. - """ - - input_schema: typing_extensions.Annotated[typing.Optional[JsonSchema], FieldMetadata(alias="inputSchema")] = ( - pydantic.Field(default=None) - ) - """ - This is the input schema for the block. This is the input the block needs to run. It's given to the block as `steps[0].input` - - These are accessible as variables: - - - ({{input.propertyName}}) in context of the block execution (step) - - ({{stepName.input.propertyName}}) in context of the workflow - """ - - output_schema: typing_extensions.Annotated[typing.Optional[JsonSchema], FieldMetadata(alias="outputSchema")] = ( - pydantic.Field(default=None) - ) - """ - This is the output schema for the block. This is the output the block will return to the workflow (`{{stepName.output}}`). - - These are accessible as variables: - - - ({{output.propertyName}}) in context of the block execution (step) - - ({{stepName.output.propertyName}}) in context of the workflow (read caveat #1) - - ({{blockName.output.propertyName}}) in context of the workflow (read caveat #2) - - Caveats: - - 1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.output.propertyName}} will reference the latest usage of the step. - 2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.output.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow with steps. - """ - - type: typing.Literal["workflow"] = "workflow" - steps: typing.Optional[typing.List[WorkflowBlockStepsItem]] = pydantic.Field(default=None) - """ - These are the steps in the workflow. - """ - - id: str = pydantic.Field() - """ - This is the unique identifier for the block. - """ - - org_id: typing_extensions.Annotated[str, FieldMetadata(alias="orgId")] = pydantic.Field() - """ - This is the unique identifier for the organization that this block belongs to. - """ - - created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the block was created. - """ - - updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field() - """ - This is the ISO 8601 date-time string of when the block was last updated. - """ - - name: typing.Optional[str] = pydantic.Field(default=None) - """ - This is the name of the block. This is just for your reference. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -update_forward_refs(CallbackStep, WorkflowBlock=WorkflowBlock) -update_forward_refs(CreateWorkflowBlockDto, WorkflowBlock=WorkflowBlock) -update_forward_refs(HandoffStep, WorkflowBlock=WorkflowBlock) diff --git a/src/vapi/types/workflow_block_messages_item.py b/src/vapi/types/workflow_block_messages_item.py deleted file mode 100644 index 6cb577b0..00000000 --- a/src/vapi/types/workflow_block_messages_item.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from .block_start_message import BlockStartMessage -from .block_complete_message import BlockCompleteMessage - -WorkflowBlockMessagesItem = typing.Union[BlockStartMessage, BlockCompleteMessage] diff --git a/src/vapi/types/workflow_block_steps_item.py b/src/vapi/types/workflow_block_steps_item.py deleted file mode 100644 index 9e762c8a..00000000 --- a/src/vapi/types/workflow_block_steps_item.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from .handoff_step import HandoffStep -from .callback_step import CallbackStep - -WorkflowBlockStepsItem = typing.Union[HandoffStep, CallbackStep] diff --git a/src/vapi/types/workflow_credentials_item.py b/src/vapi/types/workflow_credentials_item.py new file mode 100644 index 00000000..9d4dca7b --- /dev/null +++ b/src/vapi/types/workflow_credentials_item.py @@ -0,0 +1,1070 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .azure_blob_storage_bucket_plan import AzureBlobStorageBucketPlan +from .bucket_plan import BucketPlan +from .cloudflare_r_2_bucket_plan import CloudflareR2BucketPlan +from .create_anthropic_bedrock_credential_dto_authentication_plan import ( + CreateAnthropicBedrockCredentialDtoAuthenticationPlan, +) +from .create_anthropic_bedrock_credential_dto_region import CreateAnthropicBedrockCredentialDtoRegion +from .create_azure_credential_dto_region import CreateAzureCredentialDtoRegion +from .create_azure_credential_dto_service import CreateAzureCredentialDtoService +from .create_azure_open_ai_credential_dto_models_item import CreateAzureOpenAiCredentialDtoModelsItem +from .create_azure_open_ai_credential_dto_region import CreateAzureOpenAiCredentialDtoRegion +from .create_custom_credential_dto_authentication_plan import CreateCustomCredentialDtoAuthenticationPlan +from .create_custom_credential_dto_encryption_plan import CreateCustomCredentialDtoEncryptionPlan +from .create_webhook_credential_dto_authentication_plan import CreateWebhookCredentialDtoAuthenticationPlan +from .gcp_key import GcpKey +from .o_auth_2_authentication_plan import OAuth2AuthenticationPlan +from .oauth_2_authentication_session import Oauth2AuthenticationSession +from .sbc_configuration import SbcConfiguration +from .sip_trunk_gateway import SipTrunkGateway +from .sip_trunk_outbound_authentication_plan import SipTrunkOutboundAuthenticationPlan +from .supabase_bucket_plan import SupabaseBucketPlan + + +class WorkflowCredentialsItem_11Labs(UncheckedBaseModel): + provider: typing.Literal["11labs"] = "11labs" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_Anthropic(UncheckedBaseModel): + provider: typing.Literal["anthropic"] = "anthropic" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_AnthropicBedrock(UncheckedBaseModel): + provider: typing.Literal["anthropic-bedrock"] = "anthropic-bedrock" + region: CreateAnthropicBedrockCredentialDtoRegion + authentication_plan: typing_extensions.Annotated[ + CreateAnthropicBedrockCredentialDtoAuthenticationPlan, + FieldMetadata(alias="authenticationPlan"), + pydantic.Field(alias="authenticationPlan"), + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_Anyscale(UncheckedBaseModel): + provider: typing.Literal["anyscale"] = "anyscale" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_AssemblyAi(UncheckedBaseModel): + provider: typing.Literal["assembly-ai"] = "assembly-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_AzureOpenai(UncheckedBaseModel): + provider: typing.Literal["azure-openai"] = "azure-openai" + region: CreateAzureOpenAiCredentialDtoRegion + models: typing.List[CreateAzureOpenAiCredentialDtoModelsItem] + open_ai_key: typing_extensions.Annotated[str, FieldMetadata(alias="openAIKey"), pydantic.Field(alias="openAIKey")] + ocp_apim_subscription_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="ocpApimSubscriptionKey"), + pydantic.Field(alias="ocpApimSubscriptionKey"), + ] = None + open_ai_endpoint: typing_extensions.Annotated[ + str, FieldMetadata(alias="openAIEndpoint"), pydantic.Field(alias="openAIEndpoint") + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_Azure(UncheckedBaseModel): + provider: typing.Literal["azure"] = "azure" + service: CreateAzureCredentialDtoService + region: typing.Optional[CreateAzureCredentialDtoRegion] = None + api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey") + ] = None + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="fallbackIndex"), pydantic.Field(alias="fallbackIndex") + ] = None + bucket_plan: typing_extensions.Annotated[ + typing.Optional[AzureBlobStorageBucketPlan], + FieldMetadata(alias="bucketPlan"), + pydantic.Field(alias="bucketPlan"), + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_ByoSipTrunk(UncheckedBaseModel): + provider: typing.Literal["byo-sip-trunk"] = "byo-sip-trunk" + gateways: typing.List[SipTrunkGateway] + outbound_authentication_plan: typing_extensions.Annotated[ + typing.Optional[SipTrunkOutboundAuthenticationPlan], + FieldMetadata(alias="outboundAuthenticationPlan"), + pydantic.Field(alias="outboundAuthenticationPlan"), + ] = None + outbound_leading_plus_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="outboundLeadingPlusEnabled"), + pydantic.Field(alias="outboundLeadingPlusEnabled"), + ] = None + tech_prefix: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="techPrefix"), pydantic.Field(alias="techPrefix") + ] = None + sip_diversion_header: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipDiversionHeader"), pydantic.Field(alias="sipDiversionHeader") + ] = None + sbc_configuration: typing_extensions.Annotated[ + typing.Optional[SbcConfiguration], + FieldMetadata(alias="sbcConfiguration"), + pydantic.Field(alias="sbcConfiguration"), + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_Cartesia(UncheckedBaseModel): + provider: typing.Literal["cartesia"] = "cartesia" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_Cerebras(UncheckedBaseModel): + provider: typing.Literal["cerebras"] = "cerebras" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_Cloudflare(UncheckedBaseModel): + provider: typing.Literal["cloudflare"] = "cloudflare" + account_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="accountId"), pydantic.Field(alias="accountId") + ] = None + api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey") + ] = None + account_email: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="accountEmail"), pydantic.Field(alias="accountEmail") + ] = None + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="fallbackIndex"), pydantic.Field(alias="fallbackIndex") + ] = None + bucket_plan: typing_extensions.Annotated[ + typing.Optional[CloudflareR2BucketPlan], FieldMetadata(alias="bucketPlan"), pydantic.Field(alias="bucketPlan") + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_CustomLlm(UncheckedBaseModel): + provider: typing.Literal["custom-llm"] = "custom-llm" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + authentication_plan: typing_extensions.Annotated[ + typing.Optional[OAuth2AuthenticationPlan], + FieldMetadata(alias="authenticationPlan"), + pydantic.Field(alias="authenticationPlan"), + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_Deepgram(UncheckedBaseModel): + provider: typing.Literal["deepgram"] = "deepgram" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + api_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="apiUrl"), pydantic.Field(alias="apiUrl") + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_Deepinfra(UncheckedBaseModel): + provider: typing.Literal["deepinfra"] = "deepinfra" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_DeepSeek(UncheckedBaseModel): + provider: typing.Literal["deep-seek"] = "deep-seek" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_Gcp(UncheckedBaseModel): + provider: typing.Literal["gcp"] = "gcp" + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="fallbackIndex"), pydantic.Field(alias="fallbackIndex") + ] = None + gcp_key: typing_extensions.Annotated[GcpKey, FieldMetadata(alias="gcpKey"), pydantic.Field(alias="gcpKey")] + region: typing.Optional[str] = None + bucket_plan: typing_extensions.Annotated[ + typing.Optional[BucketPlan], FieldMetadata(alias="bucketPlan"), pydantic.Field(alias="bucketPlan") + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_Gladia(UncheckedBaseModel): + provider: typing.Literal["gladia"] = "gladia" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_Gohighlevel(UncheckedBaseModel): + provider: typing.Literal["gohighlevel"] = "gohighlevel" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_Google(UncheckedBaseModel): + provider: typing.Literal["google"] = "google" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_Groq(UncheckedBaseModel): + provider: typing.Literal["groq"] = "groq" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_InflectionAi(UncheckedBaseModel): + provider: typing.Literal["inflection-ai"] = "inflection-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_Langfuse(UncheckedBaseModel): + provider: typing.Literal["langfuse"] = "langfuse" + public_key: typing_extensions.Annotated[str, FieldMetadata(alias="publicKey"), pydantic.Field(alias="publicKey")] + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + api_url: typing_extensions.Annotated[str, FieldMetadata(alias="apiUrl"), pydantic.Field(alias="apiUrl")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_Lmnt(UncheckedBaseModel): + provider: typing.Literal["lmnt"] = "lmnt" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_Make(UncheckedBaseModel): + provider: typing.Literal["make"] = "make" + team_id: typing_extensions.Annotated[str, FieldMetadata(alias="teamId"), pydantic.Field(alias="teamId")] + region: str + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_Openai(UncheckedBaseModel): + provider: typing.Literal["openai"] = "openai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_Openrouter(UncheckedBaseModel): + provider: typing.Literal["openrouter"] = "openrouter" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_PerplexityAi(UncheckedBaseModel): + provider: typing.Literal["perplexity-ai"] = "perplexity-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_Playht(UncheckedBaseModel): + provider: typing.Literal["playht"] = "playht" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + user_id: typing_extensions.Annotated[str, FieldMetadata(alias="userId"), pydantic.Field(alias="userId")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_RimeAi(UncheckedBaseModel): + provider: typing.Literal["rime-ai"] = "rime-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_Runpod(UncheckedBaseModel): + provider: typing.Literal["runpod"] = "runpod" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_S3(UncheckedBaseModel): + provider: typing.Literal["s3"] = "s3" + aws_access_key_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="awsAccessKeyId"), pydantic.Field(alias="awsAccessKeyId") + ] + aws_secret_access_key: typing_extensions.Annotated[ + str, FieldMetadata(alias="awsSecretAccessKey"), pydantic.Field(alias="awsSecretAccessKey") + ] + region: str + s_3_bucket_name: typing_extensions.Annotated[ + str, FieldMetadata(alias="s3BucketName"), pydantic.Field(alias="s3BucketName") + ] + s_3_path_prefix: typing_extensions.Annotated[ + str, FieldMetadata(alias="s3PathPrefix"), pydantic.Field(alias="s3PathPrefix") + ] + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="fallbackIndex"), pydantic.Field(alias="fallbackIndex") + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_Supabase(UncheckedBaseModel): + provider: typing.Literal["supabase"] = "supabase" + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="fallbackIndex"), pydantic.Field(alias="fallbackIndex") + ] = None + bucket_plan: typing_extensions.Annotated[ + typing.Optional[SupabaseBucketPlan], FieldMetadata(alias="bucketPlan"), pydantic.Field(alias="bucketPlan") + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_SmallestAi(UncheckedBaseModel): + provider: typing.Literal["smallest-ai"] = "smallest-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_Tavus(UncheckedBaseModel): + provider: typing.Literal["tavus"] = "tavus" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_TogetherAi(UncheckedBaseModel): + provider: typing.Literal["together-ai"] = "together-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_Twilio(UncheckedBaseModel): + provider: typing.Literal["twilio"] = "twilio" + auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="authToken"), pydantic.Field(alias="authToken") + ] = None + api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey") + ] = None + api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="apiSecret"), pydantic.Field(alias="apiSecret") + ] = None + account_sid: typing_extensions.Annotated[str, FieldMetadata(alias="accountSid"), pydantic.Field(alias="accountSid")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_Vonage(UncheckedBaseModel): + provider: typing.Literal["vonage"] = "vonage" + api_secret: typing_extensions.Annotated[str, FieldMetadata(alias="apiSecret"), pydantic.Field(alias="apiSecret")] + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_Webhook(UncheckedBaseModel): + provider: typing.Literal["webhook"] = "webhook" + authentication_plan: typing_extensions.Annotated[ + CreateWebhookCredentialDtoAuthenticationPlan, + FieldMetadata(alias="authenticationPlan"), + pydantic.Field(alias="authenticationPlan"), + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_CustomCredential(UncheckedBaseModel): + provider: typing.Literal["custom-credential"] = "custom-credential" + authentication_plan: typing_extensions.Annotated[ + CreateCustomCredentialDtoAuthenticationPlan, + FieldMetadata(alias="authenticationPlan"), + pydantic.Field(alias="authenticationPlan"), + ] + encryption_plan: typing_extensions.Annotated[ + typing.Optional[CreateCustomCredentialDtoEncryptionPlan], + FieldMetadata(alias="encryptionPlan"), + pydantic.Field(alias="encryptionPlan"), + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_Xai(UncheckedBaseModel): + provider: typing.Literal["xai"] = "xai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_Neuphonic(UncheckedBaseModel): + provider: typing.Literal["neuphonic"] = "neuphonic" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_Hume(UncheckedBaseModel): + provider: typing.Literal["hume"] = "hume" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_Mistral(UncheckedBaseModel): + provider: typing.Literal["mistral"] = "mistral" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_Speechmatics(UncheckedBaseModel): + provider: typing.Literal["speechmatics"] = "speechmatics" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_Soniox(UncheckedBaseModel): + provider: typing.Literal["soniox"] = "soniox" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_Trieve(UncheckedBaseModel): + provider: typing.Literal["trieve"] = "trieve" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_GoogleCalendarOauth2Client(UncheckedBaseModel): + provider: typing.Literal["google.calendar.oauth2-client"] = "google.calendar.oauth2-client" + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_GoogleCalendarOauth2Authorization(UncheckedBaseModel): + provider: typing.Literal["google.calendar.oauth2-authorization"] = "google.calendar.oauth2-authorization" + authorization_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="authorizationId"), pydantic.Field(alias="authorizationId") + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_GoogleSheetsOauth2Authorization(UncheckedBaseModel): + provider: typing.Literal["google.sheets.oauth2-authorization"] = "google.sheets.oauth2-authorization" + authorization_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="authorizationId"), pydantic.Field(alias="authorizationId") + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_SlackOauth2Authorization(UncheckedBaseModel): + provider: typing.Literal["slack.oauth2-authorization"] = "slack.oauth2-authorization" + authorization_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="authorizationId"), pydantic.Field(alias="authorizationId") + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_GhlOauth2Authorization(UncheckedBaseModel): + provider: typing.Literal["ghl.oauth2-authorization"] = "ghl.oauth2-authorization" + authentication_session: typing_extensions.Annotated[ + Oauth2AuthenticationSession, + FieldMetadata(alias="authenticationSession"), + pydantic.Field(alias="authenticationSession"), + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_Inworld(UncheckedBaseModel): + provider: typing.Literal["inworld"] = "inworld" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_Minimax(UncheckedBaseModel): + provider: typing.Literal["minimax"] = "minimax" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + group_id: typing_extensions.Annotated[str, FieldMetadata(alias="groupId"), pydantic.Field(alias="groupId")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_Wellsaid(UncheckedBaseModel): + provider: typing.Literal["wellsaid"] = "wellsaid" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_Email(UncheckedBaseModel): + provider: typing.Literal["email"] = "email" + email: str + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowCredentialsItem_SlackWebhook(UncheckedBaseModel): + provider: typing.Literal["slack-webhook"] = "slack-webhook" + webhook_url: typing_extensions.Annotated[str, FieldMetadata(alias="webhookUrl"), pydantic.Field(alias="webhookUrl")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +WorkflowCredentialsItem = typing_extensions.Annotated[ + typing.Union[ + WorkflowCredentialsItem_11Labs, + WorkflowCredentialsItem_Anthropic, + WorkflowCredentialsItem_AnthropicBedrock, + WorkflowCredentialsItem_Anyscale, + WorkflowCredentialsItem_AssemblyAi, + WorkflowCredentialsItem_AzureOpenai, + WorkflowCredentialsItem_Azure, + WorkflowCredentialsItem_ByoSipTrunk, + WorkflowCredentialsItem_Cartesia, + WorkflowCredentialsItem_Cerebras, + WorkflowCredentialsItem_Cloudflare, + WorkflowCredentialsItem_CustomLlm, + WorkflowCredentialsItem_Deepgram, + WorkflowCredentialsItem_Deepinfra, + WorkflowCredentialsItem_DeepSeek, + WorkflowCredentialsItem_Gcp, + WorkflowCredentialsItem_Gladia, + WorkflowCredentialsItem_Gohighlevel, + WorkflowCredentialsItem_Google, + WorkflowCredentialsItem_Groq, + WorkflowCredentialsItem_InflectionAi, + WorkflowCredentialsItem_Langfuse, + WorkflowCredentialsItem_Lmnt, + WorkflowCredentialsItem_Make, + WorkflowCredentialsItem_Openai, + WorkflowCredentialsItem_Openrouter, + WorkflowCredentialsItem_PerplexityAi, + WorkflowCredentialsItem_Playht, + WorkflowCredentialsItem_RimeAi, + WorkflowCredentialsItem_Runpod, + WorkflowCredentialsItem_S3, + WorkflowCredentialsItem_Supabase, + WorkflowCredentialsItem_SmallestAi, + WorkflowCredentialsItem_Tavus, + WorkflowCredentialsItem_TogetherAi, + WorkflowCredentialsItem_Twilio, + WorkflowCredentialsItem_Vonage, + WorkflowCredentialsItem_Webhook, + WorkflowCredentialsItem_CustomCredential, + WorkflowCredentialsItem_Xai, + WorkflowCredentialsItem_Neuphonic, + WorkflowCredentialsItem_Hume, + WorkflowCredentialsItem_Mistral, + WorkflowCredentialsItem_Speechmatics, + WorkflowCredentialsItem_Soniox, + WorkflowCredentialsItem_Trieve, + WorkflowCredentialsItem_GoogleCalendarOauth2Client, + WorkflowCredentialsItem_GoogleCalendarOauth2Authorization, + WorkflowCredentialsItem_GoogleSheetsOauth2Authorization, + WorkflowCredentialsItem_SlackOauth2Authorization, + WorkflowCredentialsItem_GhlOauth2Authorization, + WorkflowCredentialsItem_Inworld, + WorkflowCredentialsItem_Minimax, + WorkflowCredentialsItem_Wellsaid, + WorkflowCredentialsItem_Email, + WorkflowCredentialsItem_SlackWebhook, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/workflow_custom_model.py b/src/vapi/types/workflow_custom_model.py new file mode 100644 index 00000000..19d8f975 --- /dev/null +++ b/src/vapi/types/workflow_custom_model.py @@ -0,0 +1,63 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .workflow_custom_model_metadata_send_mode import WorkflowCustomModelMetadataSendMode + + +class WorkflowCustomModel(UncheckedBaseModel): + metadata_send_mode: typing_extensions.Annotated[ + typing.Optional[WorkflowCustomModelMetadataSendMode], + FieldMetadata(alias="metadataSendMode"), + pydantic.Field( + alias="metadataSendMode", + description="This determines whether metadata is sent in requests to the custom provider.\n\n- `off` will not send any metadata. payload will look like `{ messages }`\n- `variable` will send `assistant.metadata` as a variable on the payload. payload will look like `{ messages, metadata }`\n- `destructured` will send `assistant.metadata` fields directly on the payload. payload will look like `{ messages, ...metadata }`\n\nFurther, `variable` and `destructured` will send `call`, `phoneNumber`, and `customer` objects in the payload.\n\nDefault is `variable`.", + ), + ] = None + url: str = pydantic.Field() + """ + These is the URL we'll use for the OpenAI client's `baseURL`. Ex. https://openrouter.ai/api/v1 + """ + + headers: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) + """ + These are the headers we'll use for the OpenAI client's `headers`. + """ + + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="timeoutSeconds"), + pydantic.Field( + alias="timeoutSeconds", + description="This sets the timeout for the connection to the custom provider without needing to stream any tokens back. Default is 20 seconds.", + ), + ] = None + model: str = pydantic.Field() + """ + This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b + """ + + temperature: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the temperature of the model. + """ + + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="maxTokens"), + pydantic.Field(alias="maxTokens", description="This is the max tokens of the model."), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/workflow_custom_model_metadata_send_mode.py b/src/vapi/types/workflow_custom_model_metadata_send_mode.py new file mode 100644 index 00000000..39f332a2 --- /dev/null +++ b/src/vapi/types/workflow_custom_model_metadata_send_mode.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +WorkflowCustomModelMetadataSendMode = typing.Union[typing.Literal["off", "variable", "destructured"], typing.Any] diff --git a/src/vapi/types/workflow_google_model.py b/src/vapi/types/workflow_google_model.py new file mode 100644 index 00000000..3d3f8bd1 --- /dev/null +++ b/src/vapi/types/workflow_google_model.py @@ -0,0 +1,37 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .workflow_google_model_model import WorkflowGoogleModelModel + + +class WorkflowGoogleModel(UncheckedBaseModel): + model: WorkflowGoogleModelModel = pydantic.Field() + """ + This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b + """ + + temperature: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the temperature of the model. + """ + + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="maxTokens"), + pydantic.Field(alias="maxTokens", description="This is the max tokens of the model."), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/workflow_google_model_model.py b/src/vapi/types/workflow_google_model_model.py new file mode 100644 index 00000000..acdcaf33 --- /dev/null +++ b/src/vapi/types/workflow_google_model_model.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +WorkflowGoogleModelModel = typing.Union[ + typing.Literal[ + "gemini-3-flash-preview", + "gemini-2.5-pro", + "gemini-2.5-flash", + "gemini-2.5-flash-lite", + "gemini-2.0-flash-thinking-exp", + "gemini-2.0-pro-exp-02-05", + "gemini-2.0-flash", + "gemini-2.0-flash-lite", + "gemini-2.0-flash-exp", + "gemini-2.0-flash-realtime-exp", + "gemini-1.5-flash", + "gemini-1.5-flash-002", + "gemini-1.5-pro", + "gemini-1.5-pro-002", + "gemini-1.0-pro", + ], + typing.Any, +] diff --git a/src/vapi/types/workflow_hooks_item.py b/src/vapi/types/workflow_hooks_item.py new file mode 100644 index 00000000..4bb9e973 --- /dev/null +++ b/src/vapi/types/workflow_hooks_item.py @@ -0,0 +1,17 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted +from .call_hook_call_ending import CallHookCallEnding +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout +from .call_hook_model_response_timeout import CallHookModelResponseTimeout + +WorkflowHooksItem = typing.Union[ + CallHookCallEnding, + CallHookAssistantSpeechInterrupted, + CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechTimeout, + CallHookModelResponseTimeout, +] diff --git a/src/vapi/types/workflow_model.py b/src/vapi/types/workflow_model.py new file mode 100644 index 00000000..a1c5e861 --- /dev/null +++ b/src/vapi/types/workflow_model.py @@ -0,0 +1,161 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .anthropic_thinking_config import AnthropicThinkingConfig +from .workflow_anthropic_bedrock_model_model import WorkflowAnthropicBedrockModelModel +from .workflow_anthropic_model_model import WorkflowAnthropicModelModel +from .workflow_custom_model_metadata_send_mode import WorkflowCustomModelMetadataSendMode +from .workflow_google_model_model import WorkflowGoogleModelModel +from .workflow_open_ai_model_model import WorkflowOpenAiModelModel + + +class WorkflowModel_Openai(UncheckedBaseModel): + """ + This is the model for the workflow. + + This can be overridden at node level using `nodes[n].model`. + """ + + provider: typing.Literal["openai"] = "openai" + model: WorkflowOpenAiModelModel + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowModel_Anthropic(UncheckedBaseModel): + """ + This is the model for the workflow. + + This can be overridden at node level using `nodes[n].model`. + """ + + provider: typing.Literal["anthropic"] = "anthropic" + model: WorkflowAnthropicModelModel + thinking: typing.Optional[AnthropicThinkingConfig] = None + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowModel_AnthropicBedrock(UncheckedBaseModel): + """ + This is the model for the workflow. + + This can be overridden at node level using `nodes[n].model`. + """ + + provider: typing.Literal["anthropic-bedrock"] = "anthropic-bedrock" + model: WorkflowAnthropicBedrockModelModel + thinking: typing.Optional[AnthropicThinkingConfig] = None + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowModel_Google(UncheckedBaseModel): + """ + This is the model for the workflow. + + This can be overridden at node level using `nodes[n].model`. + """ + + provider: typing.Literal["google"] = "google" + model: WorkflowGoogleModelModel + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowModel_CustomLlm(UncheckedBaseModel): + """ + This is the model for the workflow. + + This can be overridden at node level using `nodes[n].model`. + """ + + provider: typing.Literal["custom-llm"] = "custom-llm" + metadata_send_mode: typing_extensions.Annotated[ + typing.Optional[WorkflowCustomModelMetadataSendMode], + FieldMetadata(alias="metadataSendMode"), + pydantic.Field(alias="metadataSendMode"), + ] = None + url: str + headers: typing.Optional[typing.Dict[str, typing.Any]] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + model: str + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +WorkflowModel = typing_extensions.Annotated[ + typing.Union[ + WorkflowModel_Openai, + WorkflowModel_Anthropic, + WorkflowModel_AnthropicBedrock, + WorkflowModel_Google, + WorkflowModel_CustomLlm, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/workflow_nodes_item.py b/src/vapi/types/workflow_nodes_item.py new file mode 100644 index 00000000..888e390e --- /dev/null +++ b/src/vapi/types/workflow_nodes_item.py @@ -0,0 +1,81 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .conversation_node_model import ConversationNodeModel +from .conversation_node_tools_item import ConversationNodeToolsItem +from .conversation_node_transcriber import ConversationNodeTranscriber +from .conversation_node_voice import ConversationNodeVoice +from .global_node_plan import GlobalNodePlan +from .tool_node_tool import ToolNodeTool +from .variable_extraction_plan import VariableExtractionPlan + + +class WorkflowNodesItem_Conversation(UncheckedBaseModel): + type: typing.Literal["conversation"] = "conversation" + model: typing.Optional[ConversationNodeModel] = None + transcriber: typing.Optional[ConversationNodeTranscriber] = None + voice: typing.Optional[ConversationNodeVoice] = None + tools: typing.Optional[typing.List[ConversationNodeToolsItem]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + prompt: typing.Optional[str] = None + global_node_plan: typing_extensions.Annotated[ + typing.Optional[GlobalNodePlan], FieldMetadata(alias="globalNodePlan"), pydantic.Field(alias="globalNodePlan") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + name: str + is_start: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="isStart"), pydantic.Field(alias="isStart") + ] = None + metadata: typing.Optional[typing.Dict[str, typing.Any]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowNodesItem_Tool(UncheckedBaseModel): + type: typing.Literal["tool"] = "tool" + tool: typing.Optional[ToolNodeTool] = None + tool_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="toolId"), pydantic.Field(alias="toolId") + ] = None + name: str + is_start: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="isStart"), pydantic.Field(alias="isStart") + ] = None + metadata: typing.Optional[typing.Dict[str, typing.Any]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +WorkflowNodesItem = typing_extensions.Annotated[ + typing.Union[WorkflowNodesItem_Conversation, WorkflowNodesItem_Tool], UnionMetadata(discriminant="type") +] +update_forward_refs(WorkflowNodesItem_Conversation) +update_forward_refs(WorkflowNodesItem_Tool) diff --git a/src/vapi/types/workflow_open_ai_model.py b/src/vapi/types/workflow_open_ai_model.py new file mode 100644 index 00000000..0493901a --- /dev/null +++ b/src/vapi/types/workflow_open_ai_model.py @@ -0,0 +1,40 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .workflow_open_ai_model_model import WorkflowOpenAiModelModel + + +class WorkflowOpenAiModel(UncheckedBaseModel): + model: WorkflowOpenAiModelModel = pydantic.Field() + """ + This is the OpenAI model that will be used. + + When using Vapi OpenAI or your own Azure Credentials, you have the option to specify the region for the selected model. This shouldn't be specified unless you have a specific reason to do so. Vapi will automatically find the fastest region that make sense. + This is helpful when you are required to comply with Data Residency rules. Learn more about Azure regions here https://azure.microsoft.com/en-us/explore/global-infrastructure/data-residency/. + """ + + temperature: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the temperature of the model. + """ + + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="maxTokens"), + pydantic.Field(alias="maxTokens", description="This is the max tokens of the model."), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/workflow_open_ai_model_model.py b/src/vapi/types/workflow_open_ai_model_model.py new file mode 100644 index 00000000..d1adbdeb --- /dev/null +++ b/src/vapi/types/workflow_open_ai_model_model.py @@ -0,0 +1,122 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +WorkflowOpenAiModelModel = typing.Union[ + typing.Literal[ + "gpt-5.4", + "gpt-5.4-mini", + "gpt-5.4-nano", + "gpt-5.2", + "gpt-5.2-chat-latest", + "gpt-5.1", + "gpt-5.1-chat-latest", + "gpt-5", + "gpt-5-chat-latest", + "gpt-5-mini", + "gpt-5-nano", + "gpt-4.1-2025-04-14", + "gpt-4.1-mini-2025-04-14", + "gpt-4.1-nano-2025-04-14", + "gpt-4.1", + "gpt-4.1-mini", + "gpt-4.1-nano", + "chatgpt-4o-latest", + "o3", + "o3-mini", + "o4-mini", + "o1-mini", + "o1-mini-2024-09-12", + "gpt-4o-mini-2024-07-18", + "gpt-4o-mini", + "gpt-4o", + "gpt-4o-2024-05-13", + "gpt-4o-2024-08-06", + "gpt-4o-2024-11-20", + "gpt-4-turbo", + "gpt-4-turbo-2024-04-09", + "gpt-4-turbo-preview", + "gpt-4-0125-preview", + "gpt-4-1106-preview", + "gpt-4", + "gpt-4-0613", + "gpt-3.5-turbo", + "gpt-3.5-turbo-0125", + "gpt-3.5-turbo-1106", + "gpt-3.5-turbo-16k", + "gpt-3.5-turbo-0613", + "gpt-4.1-2025-04-14:westus", + "gpt-4.1-2025-04-14:eastus2", + "gpt-4.1-2025-04-14:eastus", + "gpt-4.1-2025-04-14:westus3", + "gpt-4.1-2025-04-14:northcentralus", + "gpt-4.1-2025-04-14:southcentralus", + "gpt-4.1-2025-04-14:westeurope", + "gpt-4.1-2025-04-14:germanywestcentral", + "gpt-4.1-2025-04-14:polandcentral", + "gpt-4.1-2025-04-14:spaincentral", + "gpt-4.1-mini-2025-04-14:westus", + "gpt-4.1-mini-2025-04-14:eastus2", + "gpt-4.1-mini-2025-04-14:eastus", + "gpt-4.1-mini-2025-04-14:westus3", + "gpt-4.1-mini-2025-04-14:northcentralus", + "gpt-4.1-mini-2025-04-14:southcentralus", + "gpt-4.1-mini-2025-04-14:westeurope", + "gpt-4.1-mini-2025-04-14:germanywestcentral", + "gpt-4.1-mini-2025-04-14:polandcentral", + "gpt-4.1-mini-2025-04-14:spaincentral", + "gpt-4.1-nano-2025-04-14:westus", + "gpt-4.1-nano-2025-04-14:eastus2", + "gpt-4.1-nano-2025-04-14:westus3", + "gpt-4.1-nano-2025-04-14:northcentralus", + "gpt-4.1-nano-2025-04-14:southcentralus", + "gpt-4o-2024-11-20:swedencentral", + "gpt-4o-2024-11-20:westus", + "gpt-4o-2024-11-20:eastus2", + "gpt-4o-2024-11-20:eastus", + "gpt-4o-2024-11-20:westus3", + "gpt-4o-2024-11-20:southcentralus", + "gpt-4o-2024-11-20:westeurope", + "gpt-4o-2024-11-20:germanywestcentral", + "gpt-4o-2024-11-20:polandcentral", + "gpt-4o-2024-11-20:spaincentral", + "gpt-4o-2024-08-06:westus", + "gpt-4o-2024-08-06:westus3", + "gpt-4o-2024-08-06:eastus", + "gpt-4o-2024-08-06:eastus2", + "gpt-4o-2024-08-06:northcentralus", + "gpt-4o-2024-08-06:southcentralus", + "gpt-4o-mini-2024-07-18:westus", + "gpt-4o-mini-2024-07-18:westus3", + "gpt-4o-mini-2024-07-18:eastus", + "gpt-4o-mini-2024-07-18:eastus2", + "gpt-4o-mini-2024-07-18:northcentralus", + "gpt-4o-mini-2024-07-18:southcentralus", + "gpt-4o-2024-05-13:eastus2", + "gpt-4o-2024-05-13:eastus", + "gpt-4o-2024-05-13:northcentralus", + "gpt-4o-2024-05-13:southcentralus", + "gpt-4o-2024-05-13:westus3", + "gpt-4o-2024-05-13:westus", + "gpt-4-turbo-2024-04-09:eastus2", + "gpt-4-0125-preview:eastus", + "gpt-4-0125-preview:northcentralus", + "gpt-4-0125-preview:southcentralus", + "gpt-4-1106-preview:australiaeast", + "gpt-4-1106-preview:canadaeast", + "gpt-4-1106-preview:france", + "gpt-4-1106-preview:india", + "gpt-4-1106-preview:norway", + "gpt-4-1106-preview:swedencentral", + "gpt-4-1106-preview:uk", + "gpt-4-1106-preview:westus", + "gpt-4-1106-preview:westus3", + "gpt-4-0613:canadaeast", + "gpt-3.5-turbo-0125:canadaeast", + "gpt-3.5-turbo-0125:northcentralus", + "gpt-3.5-turbo-0125:southcentralus", + "gpt-3.5-turbo-1106:canadaeast", + "gpt-3.5-turbo-1106:westus", + ], + typing.Any, +] diff --git a/src/vapi/types/workflow_overrides.py b/src/vapi/types/workflow_overrides.py new file mode 100644 index 00000000..e73980f2 --- /dev/null +++ b/src/vapi/types/workflow_overrides.py @@ -0,0 +1,29 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class WorkflowOverrides(UncheckedBaseModel): + variable_values: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="variableValues"), + pydantic.Field( + alias="variableValues", + description='These are values that will be used to replace the template variables in the workflow messages and other text-based fields.\nThis uses LiquidJS syntax. https://liquidjs.com/tutorials/intro-to-liquid.html\n\nSo for example, `{{ name }}` will be replaced with the value of `name` in `variableValues`.\n`{{"now" | date: "%b %d, %Y, %I:%M %p", "America/New_York"}}` will be replaced with the current date and time in New York.\n Some VAPI reserved defaults:\n - *customer* - the customer object', + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/workflow_transcriber.py b/src/vapi/types/workflow_transcriber.py new file mode 100644 index 00000000..fe79cee9 --- /dev/null +++ b/src/vapi/types/workflow_transcriber.py @@ -0,0 +1,562 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .assembly_ai_transcriber_language import AssemblyAiTranscriberLanguage +from .assembly_ai_transcriber_speech_model import AssemblyAiTranscriberSpeechModel +from .azure_speech_transcriber_language import AzureSpeechTranscriberLanguage +from .azure_speech_transcriber_segmentation_strategy import AzureSpeechTranscriberSegmentationStrategy +from .cartesia_transcriber_language import CartesiaTranscriberLanguage +from .cartesia_transcriber_model import CartesiaTranscriberModel +from .deepgram_transcriber_language import DeepgramTranscriberLanguage +from .deepgram_transcriber_model import DeepgramTranscriberModel +from .eleven_labs_transcriber_language import ElevenLabsTranscriberLanguage +from .eleven_labs_transcriber_model import ElevenLabsTranscriberModel +from .fallback_transcriber_plan import FallbackTranscriberPlan +from .gladia_custom_vocabulary_config_dto import GladiaCustomVocabularyConfigDto +from .gladia_transcriber_language import GladiaTranscriberLanguage +from .gladia_transcriber_language_behaviour import GladiaTranscriberLanguageBehaviour +from .gladia_transcriber_languages import GladiaTranscriberLanguages +from .gladia_transcriber_model import GladiaTranscriberModel +from .gladia_transcriber_region import GladiaTranscriberRegion +from .google_transcriber_language import GoogleTranscriberLanguage +from .google_transcriber_model import GoogleTranscriberModel +from .open_ai_transcriber_language import OpenAiTranscriberLanguage +from .open_ai_transcriber_model import OpenAiTranscriberModel +from .server import Server +from .soniox_transcriber_language import SonioxTranscriberLanguage +from .soniox_transcriber_model import SonioxTranscriberModel +from .speechmatics_custom_vocabulary_item import SpeechmaticsCustomVocabularyItem +from .speechmatics_transcriber_language import SpeechmaticsTranscriberLanguage +from .speechmatics_transcriber_model import SpeechmaticsTranscriberModel +from .speechmatics_transcriber_numeral_style import SpeechmaticsTranscriberNumeralStyle +from .speechmatics_transcriber_operating_point import SpeechmaticsTranscriberOperatingPoint +from .speechmatics_transcriber_region import SpeechmaticsTranscriberRegion +from .talkscriber_transcriber_language import TalkscriberTranscriberLanguage +from .talkscriber_transcriber_model import TalkscriberTranscriberModel + + +class WorkflowTranscriber_AssemblyAi(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["assembly-ai"] = "assembly-ai" + language: typing.Optional[AssemblyAiTranscriberLanguage] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="confidenceThreshold"), pydantic.Field(alias="confidenceThreshold") + ] = None + format_turns: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="formatTurns"), pydantic.Field(alias="formatTurns") + ] = None + end_of_turn_confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="endOfTurnConfidenceThreshold"), + pydantic.Field(alias="endOfTurnConfidenceThreshold"), + ] = None + min_end_of_turn_silence_when_confident: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minEndOfTurnSilenceWhenConfident"), + pydantic.Field(alias="minEndOfTurnSilenceWhenConfident"), + ] = None + word_finalization_max_wait_time: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="wordFinalizationMaxWaitTime"), + pydantic.Field(alias="wordFinalizationMaxWaitTime"), + ] = None + max_turn_silence: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTurnSilence"), pydantic.Field(alias="maxTurnSilence") + ] = None + vad_assisted_endpointing_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="vadAssistedEndpointingEnabled"), + pydantic.Field(alias="vadAssistedEndpointingEnabled"), + ] = None + speech_model: typing_extensions.Annotated[ + typing.Optional[AssemblyAiTranscriberSpeechModel], + FieldMetadata(alias="speechModel"), + pydantic.Field(alias="speechModel"), + ] = None + realtime_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="realtimeUrl"), pydantic.Field(alias="realtimeUrl") + ] = None + word_boost: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="wordBoost"), pydantic.Field(alias="wordBoost") + ] = None + keyterms_prompt: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="keytermsPrompt"), pydantic.Field(alias="keytermsPrompt") + ] = None + end_utterance_silence_threshold: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="endUtteranceSilenceThreshold"), + pydantic.Field(alias="endUtteranceSilenceThreshold"), + ] = None + disable_partial_transcripts: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="disablePartialTranscripts"), + pydantic.Field(alias="disablePartialTranscripts"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowTranscriber_Azure(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["azure"] = "azure" + language: typing.Optional[AzureSpeechTranscriberLanguage] = None + segmentation_strategy: typing_extensions.Annotated[ + typing.Optional[AzureSpeechTranscriberSegmentationStrategy], + FieldMetadata(alias="segmentationStrategy"), + pydantic.Field(alias="segmentationStrategy"), + ] = None + segmentation_silence_timeout_ms: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="segmentationSilenceTimeoutMs"), + pydantic.Field(alias="segmentationSilenceTimeoutMs"), + ] = None + segmentation_maximum_time_ms: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="segmentationMaximumTimeMs"), + pydantic.Field(alias="segmentationMaximumTimeMs"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowTranscriber_CustomTranscriber(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["custom-transcriber"] = "custom-transcriber" + server: Server + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowTranscriber_Deepgram(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["deepgram"] = "deepgram" + model: typing.Optional[DeepgramTranscriberModel] = None + language: typing.Optional[DeepgramTranscriberLanguage] = None + smart_format: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smartFormat"), pydantic.Field(alias="smartFormat") + ] = None + mip_opt_out: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="mipOptOut"), pydantic.Field(alias="mipOptOut") + ] = None + numerals: typing.Optional[bool] = None + profanity_filter: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="profanityFilter"), pydantic.Field(alias="profanityFilter") + ] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="confidenceThreshold"), pydantic.Field(alias="confidenceThreshold") + ] = None + eager_eot_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="eagerEotThreshold"), pydantic.Field(alias="eagerEotThreshold") + ] = None + eot_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="eotThreshold"), pydantic.Field(alias="eotThreshold") + ] = None + eot_timeout_ms: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="eotTimeoutMs"), pydantic.Field(alias="eotTimeoutMs") + ] = None + keywords: typing.Optional[typing.List[str]] = None + keyterm: typing.Optional[typing.List[str]] = None + endpointing: typing.Optional[float] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowTranscriber_11Labs(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["11labs"] = "11labs" + model: typing.Optional[ElevenLabsTranscriberModel] = None + language: typing.Optional[ElevenLabsTranscriberLanguage] = None + silence_threshold_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="silenceThresholdSeconds"), + pydantic.Field(alias="silenceThresholdSeconds"), + ] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="confidenceThreshold"), pydantic.Field(alias="confidenceThreshold") + ] = None + min_speech_duration_ms: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="minSpeechDurationMs"), pydantic.Field(alias="minSpeechDurationMs") + ] = None + min_silence_duration_ms: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minSilenceDurationMs"), + pydantic.Field(alias="minSilenceDurationMs"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowTranscriber_Gladia(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["gladia"] = "gladia" + model: typing.Optional[GladiaTranscriberModel] = None + language_behaviour: typing_extensions.Annotated[ + typing.Optional[GladiaTranscriberLanguageBehaviour], + FieldMetadata(alias="languageBehaviour"), + pydantic.Field(alias="languageBehaviour"), + ] = None + language: typing.Optional[GladiaTranscriberLanguage] = None + languages: typing.Optional[GladiaTranscriberLanguages] = None + transcription_hint: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="transcriptionHint"), pydantic.Field(alias="transcriptionHint") + ] = None + prosody: typing.Optional[bool] = None + audio_enhancer: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="audioEnhancer"), pydantic.Field(alias="audioEnhancer") + ] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="confidenceThreshold"), pydantic.Field(alias="confidenceThreshold") + ] = None + endpointing: typing.Optional[float] = None + speech_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="speechThreshold"), pydantic.Field(alias="speechThreshold") + ] = None + custom_vocabulary_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="customVocabularyEnabled"), + pydantic.Field(alias="customVocabularyEnabled"), + ] = None + custom_vocabulary_config: typing_extensions.Annotated[ + typing.Optional[GladiaCustomVocabularyConfigDto], + FieldMetadata(alias="customVocabularyConfig"), + pydantic.Field(alias="customVocabularyConfig"), + ] = None + region: typing.Optional[GladiaTranscriberRegion] = None + receive_partial_transcripts: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="receivePartialTranscripts"), + pydantic.Field(alias="receivePartialTranscripts"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowTranscriber_Google(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["google"] = "google" + model: typing.Optional[GoogleTranscriberModel] = None + language: typing.Optional[GoogleTranscriberLanguage] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowTranscriber_Speechmatics(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["speechmatics"] = "speechmatics" + model: typing.Optional[SpeechmaticsTranscriberModel] = None + language: typing.Optional[SpeechmaticsTranscriberLanguage] = None + operating_point: typing_extensions.Annotated[ + typing.Optional[SpeechmaticsTranscriberOperatingPoint], + FieldMetadata(alias="operatingPoint"), + pydantic.Field(alias="operatingPoint"), + ] = None + region: typing.Optional[SpeechmaticsTranscriberRegion] = None + enable_diarization: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="enableDiarization"), pydantic.Field(alias="enableDiarization") + ] = None + max_delay: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxDelay"), pydantic.Field(alias="maxDelay") + ] = None + custom_vocabulary: typing_extensions.Annotated[ + typing.List[SpeechmaticsCustomVocabularyItem], + FieldMetadata(alias="customVocabulary"), + pydantic.Field(alias="customVocabulary"), + ] + numeral_style: typing_extensions.Annotated[ + typing.Optional[SpeechmaticsTranscriberNumeralStyle], + FieldMetadata(alias="numeralStyle"), + pydantic.Field(alias="numeralStyle"), + ] = None + end_of_turn_sensitivity: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="endOfTurnSensitivity"), + pydantic.Field(alias="endOfTurnSensitivity"), + ] = None + remove_disfluencies: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="removeDisfluencies"), pydantic.Field(alias="removeDisfluencies") + ] = None + minimum_speech_duration: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minimumSpeechDuration"), + pydantic.Field(alias="minimumSpeechDuration"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowTranscriber_Talkscriber(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["talkscriber"] = "talkscriber" + model: typing.Optional[TalkscriberTranscriberModel] = None + language: typing.Optional[TalkscriberTranscriberLanguage] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowTranscriber_Openai(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["openai"] = "openai" + model: OpenAiTranscriberModel + language: typing.Optional[OpenAiTranscriberLanguage] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowTranscriber_Cartesia(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["cartesia"] = "cartesia" + model: typing.Optional[CartesiaTranscriberModel] = None + language: typing.Optional[CartesiaTranscriberLanguage] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowTranscriber_Soniox(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["soniox"] = "soniox" + model: typing.Optional[SonioxTranscriberModel] = None + language: typing.Optional[SonioxTranscriberLanguage] = None + language_hints_strict: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="languageHintsStrict"), pydantic.Field(alias="languageHintsStrict") + ] = None + max_endpoint_delay_ms: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxEndpointDelayMs"), pydantic.Field(alias="maxEndpointDelayMs") + ] = None + custom_vocabulary: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="customVocabulary"), + pydantic.Field(alias="customVocabulary"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +WorkflowTranscriber = typing_extensions.Annotated[ + typing.Union[ + WorkflowTranscriber_AssemblyAi, + WorkflowTranscriber_Azure, + WorkflowTranscriber_CustomTranscriber, + WorkflowTranscriber_Deepgram, + WorkflowTranscriber_11Labs, + WorkflowTranscriber_Gladia, + WorkflowTranscriber_Google, + WorkflowTranscriber_Speechmatics, + WorkflowTranscriber_Talkscriber, + WorkflowTranscriber_Openai, + WorkflowTranscriber_Cartesia, + WorkflowTranscriber_Soniox, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/workflow_user_editable.py b/src/vapi/types/workflow_user_editable.py new file mode 100644 index 00000000..69d29527 --- /dev/null +++ b/src/vapi/types/workflow_user_editable.py @@ -0,0 +1,204 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .analysis_plan import AnalysisPlan +from .artifact_plan import ArtifactPlan +from .background_speech_denoising_plan import BackgroundSpeechDenoisingPlan +from .compliance_plan import CompliancePlan +from .edge import Edge +from .keypad_input_plan import KeypadInputPlan +from .langfuse_observability_plan import LangfuseObservabilityPlan +from .monitor_plan import MonitorPlan +from .server import Server +from .start_speaking_plan import StartSpeakingPlan +from .stop_speaking_plan import StopSpeakingPlan +from .workflow_user_editable_background_sound import WorkflowUserEditableBackgroundSound +from .workflow_user_editable_credentials_item import WorkflowUserEditableCredentialsItem +from .workflow_user_editable_hooks_item import WorkflowUserEditableHooksItem +from .workflow_user_editable_model import WorkflowUserEditableModel +from .workflow_user_editable_nodes_item import WorkflowUserEditableNodesItem +from .workflow_user_editable_transcriber import WorkflowUserEditableTranscriber +from .workflow_user_editable_voice import WorkflowUserEditableVoice +from .workflow_user_editable_voicemail_detection import WorkflowUserEditableVoicemailDetection + + +class WorkflowUserEditable(UncheckedBaseModel): + nodes: typing.List[WorkflowUserEditableNodesItem] + model: typing.Optional[WorkflowUserEditableModel] = pydantic.Field(default=None) + """ + This is the model for the workflow. + + This can be overridden at node level using `nodes[n].model`. + """ + + transcriber: typing.Optional[WorkflowUserEditableTranscriber] = pydantic.Field(default=None) + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + voice: typing.Optional[WorkflowUserEditableVoice] = pydantic.Field(default=None) + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + observability_plan: typing_extensions.Annotated[ + typing.Optional[LangfuseObservabilityPlan], + FieldMetadata(alias="observabilityPlan"), + pydantic.Field( + alias="observabilityPlan", + description="This is the plan for observability of workflow's calls.\n\nCurrently, only Langfuse is supported.", + ), + ] = None + background_sound: typing_extensions.Annotated[ + typing.Optional[WorkflowUserEditableBackgroundSound], + FieldMetadata(alias="backgroundSound"), + pydantic.Field( + alias="backgroundSound", + description="This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'.\nYou can also provide a custom sound by providing a URL to an audio file.", + ), + ] = None + hooks: typing.Optional[typing.List[WorkflowUserEditableHooksItem]] = pydantic.Field(default=None) + """ + This is a set of actions that will be performed on certain events. + """ + + credentials: typing.Optional[typing.List[WorkflowUserEditableCredentialsItem]] = pydantic.Field(default=None) + """ + These are dynamic credentials that will be used for the workflow calls. By default, all the credentials are available for use in the call but you can supplement an additional credentials using this. Dynamic credentials override existing credentials. + """ + + voicemail_detection: typing_extensions.Annotated[ + typing.Optional[WorkflowUserEditableVoicemailDetection], + FieldMetadata(alias="voicemailDetection"), + pydantic.Field( + alias="voicemailDetection", description="This is the voicemail detection plan for the workflow." + ), + ] = None + max_duration_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="maxDurationSeconds"), + pydantic.Field( + alias="maxDurationSeconds", + description="This is the maximum duration of the call in seconds.\n\nAfter this duration, the call will automatically end.\n\nDefault is 1800 (30 minutes), max is 43200 (12 hours), and min is 10 seconds.", + ), + ] = None + name: str + edges: typing.List[Edge] + global_prompt: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="globalPrompt"), pydantic.Field(alias="globalPrompt") + ] = None + server: typing.Optional[Server] = pydantic.Field(default=None) + """ + This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema. + + The order of precedence is: + + 1. tool.server + 2. workflow.server / assistant.server + 3. phoneNumber.server + 4. org.server + """ + + compliance_plan: typing_extensions.Annotated[ + typing.Optional[CompliancePlan], + FieldMetadata(alias="compliancePlan"), + pydantic.Field( + alias="compliancePlan", + description="This is the compliance plan for the workflow. It allows you to configure HIPAA and other compliance settings.", + ), + ] = None + analysis_plan: typing_extensions.Annotated[ + typing.Optional[AnalysisPlan], + FieldMetadata(alias="analysisPlan"), + pydantic.Field( + alias="analysisPlan", + description="This is the plan for analysis of workflow's calls. Stored in `call.analysis`.", + ), + ] = None + artifact_plan: typing_extensions.Annotated[ + typing.Optional[ArtifactPlan], + FieldMetadata(alias="artifactPlan"), + pydantic.Field( + alias="artifactPlan", + description="This is the plan for artifacts generated during workflow's calls. Stored in `call.artifact`.", + ), + ] = None + start_speaking_plan: typing_extensions.Annotated[ + typing.Optional[StartSpeakingPlan], + FieldMetadata(alias="startSpeakingPlan"), + pydantic.Field( + alias="startSpeakingPlan", + description="This is the plan for when the workflow nodes should start talking.\n\nYou should configure this if you're running into these issues:\n- The assistant is too slow to start talking after the customer is done speaking.\n- The assistant is too fast to start talking after the customer is done speaking.\n- The assistant is so fast that it's actually interrupting the customer.", + ), + ] = None + stop_speaking_plan: typing_extensions.Annotated[ + typing.Optional[StopSpeakingPlan], + FieldMetadata(alias="stopSpeakingPlan"), + pydantic.Field( + alias="stopSpeakingPlan", + description="This is the plan for when workflow nodes should stop talking on customer interruption.\n\nYou should configure this if you're running into these issues:\n- The assistant is too slow to recognize customer's interruption.\n- The assistant is too fast to recognize customer's interruption.\n- The assistant is getting interrupted by phrases that are just acknowledgments.\n- The assistant is getting interrupted by background noises.\n- The assistant is not properly stopping -- it starts talking right after getting interrupted.", + ), + ] = None + monitor_plan: typing_extensions.Annotated[ + typing.Optional[MonitorPlan], + FieldMetadata(alias="monitorPlan"), + pydantic.Field( + alias="monitorPlan", + description="This is the plan for real-time monitoring of the workflow's calls.\n\nUsage:\n- To enable live listening of the workflow's calls, set `monitorPlan.listenEnabled` to `true`.\n- To enable live control of the workflow's calls, set `monitorPlan.controlEnabled` to `true`.", + ), + ] = None + background_speech_denoising_plan: typing_extensions.Annotated[ + typing.Optional[BackgroundSpeechDenoisingPlan], + FieldMetadata(alias="backgroundSpeechDenoisingPlan"), + pydantic.Field( + alias="backgroundSpeechDenoisingPlan", + description="This enables filtering of noise and background speech while the user is talking.\n\nFeatures:\n- Smart denoising using Krisp\n- Fourier denoising\n\nBoth can be used together. Order of precedence:\n- Smart denoising\n- Fourier denoising", + ), + ] = None + credential_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="credentialIds"), + pydantic.Field( + alias="credentialIds", + description="These are the credentials that will be used for the workflow calls. By default, all the credentials are available for use in the call but you can provide a subset using this.", + ), + ] = None + keypad_input_plan: typing_extensions.Annotated[ + typing.Optional[KeypadInputPlan], + FieldMetadata(alias="keypadInputPlan"), + pydantic.Field( + alias="keypadInputPlan", description="This is the plan for keypad input handling during workflow calls." + ), + ] = None + voicemail_message: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="voicemailMessage"), + pydantic.Field( + alias="voicemailMessage", + description="This is the message that the assistant will say if the call is forwarded to voicemail.\n\nIf unspecified, it will hang up.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +update_forward_refs(WorkflowUserEditable) diff --git a/src/vapi/types/workflow_user_editable_background_sound.py b/src/vapi/types/workflow_user_editable_background_sound.py new file mode 100644 index 00000000..b6d7e651 --- /dev/null +++ b/src/vapi/types/workflow_user_editable_background_sound.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .workflow_user_editable_background_sound_zero import WorkflowUserEditableBackgroundSoundZero + +WorkflowUserEditableBackgroundSound = typing.Union[WorkflowUserEditableBackgroundSoundZero, str] diff --git a/src/vapi/types/workflow_user_editable_background_sound_zero.py b/src/vapi/types/workflow_user_editable_background_sound_zero.py new file mode 100644 index 00000000..f95f7758 --- /dev/null +++ b/src/vapi/types/workflow_user_editable_background_sound_zero.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +WorkflowUserEditableBackgroundSoundZero = typing.Union[typing.Literal["off", "office"], typing.Any] diff --git a/src/vapi/types/workflow_user_editable_credentials_item.py b/src/vapi/types/workflow_user_editable_credentials_item.py new file mode 100644 index 00000000..d9222db9 --- /dev/null +++ b/src/vapi/types/workflow_user_editable_credentials_item.py @@ -0,0 +1,1070 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .azure_blob_storage_bucket_plan import AzureBlobStorageBucketPlan +from .bucket_plan import BucketPlan +from .cloudflare_r_2_bucket_plan import CloudflareR2BucketPlan +from .create_anthropic_bedrock_credential_dto_authentication_plan import ( + CreateAnthropicBedrockCredentialDtoAuthenticationPlan, +) +from .create_anthropic_bedrock_credential_dto_region import CreateAnthropicBedrockCredentialDtoRegion +from .create_azure_credential_dto_region import CreateAzureCredentialDtoRegion +from .create_azure_credential_dto_service import CreateAzureCredentialDtoService +from .create_azure_open_ai_credential_dto_models_item import CreateAzureOpenAiCredentialDtoModelsItem +from .create_azure_open_ai_credential_dto_region import CreateAzureOpenAiCredentialDtoRegion +from .create_custom_credential_dto_authentication_plan import CreateCustomCredentialDtoAuthenticationPlan +from .create_custom_credential_dto_encryption_plan import CreateCustomCredentialDtoEncryptionPlan +from .create_webhook_credential_dto_authentication_plan import CreateWebhookCredentialDtoAuthenticationPlan +from .gcp_key import GcpKey +from .o_auth_2_authentication_plan import OAuth2AuthenticationPlan +from .oauth_2_authentication_session import Oauth2AuthenticationSession +from .sbc_configuration import SbcConfiguration +from .sip_trunk_gateway import SipTrunkGateway +from .sip_trunk_outbound_authentication_plan import SipTrunkOutboundAuthenticationPlan +from .supabase_bucket_plan import SupabaseBucketPlan + + +class WorkflowUserEditableCredentialsItem_11Labs(UncheckedBaseModel): + provider: typing.Literal["11labs"] = "11labs" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_Anthropic(UncheckedBaseModel): + provider: typing.Literal["anthropic"] = "anthropic" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_AnthropicBedrock(UncheckedBaseModel): + provider: typing.Literal["anthropic-bedrock"] = "anthropic-bedrock" + region: CreateAnthropicBedrockCredentialDtoRegion + authentication_plan: typing_extensions.Annotated[ + CreateAnthropicBedrockCredentialDtoAuthenticationPlan, + FieldMetadata(alias="authenticationPlan"), + pydantic.Field(alias="authenticationPlan"), + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_Anyscale(UncheckedBaseModel): + provider: typing.Literal["anyscale"] = "anyscale" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_AssemblyAi(UncheckedBaseModel): + provider: typing.Literal["assembly-ai"] = "assembly-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_AzureOpenai(UncheckedBaseModel): + provider: typing.Literal["azure-openai"] = "azure-openai" + region: CreateAzureOpenAiCredentialDtoRegion + models: typing.List[CreateAzureOpenAiCredentialDtoModelsItem] + open_ai_key: typing_extensions.Annotated[str, FieldMetadata(alias="openAIKey"), pydantic.Field(alias="openAIKey")] + ocp_apim_subscription_key: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="ocpApimSubscriptionKey"), + pydantic.Field(alias="ocpApimSubscriptionKey"), + ] = None + open_ai_endpoint: typing_extensions.Annotated[ + str, FieldMetadata(alias="openAIEndpoint"), pydantic.Field(alias="openAIEndpoint") + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_Azure(UncheckedBaseModel): + provider: typing.Literal["azure"] = "azure" + service: CreateAzureCredentialDtoService + region: typing.Optional[CreateAzureCredentialDtoRegion] = None + api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey") + ] = None + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="fallbackIndex"), pydantic.Field(alias="fallbackIndex") + ] = None + bucket_plan: typing_extensions.Annotated[ + typing.Optional[AzureBlobStorageBucketPlan], + FieldMetadata(alias="bucketPlan"), + pydantic.Field(alias="bucketPlan"), + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_ByoSipTrunk(UncheckedBaseModel): + provider: typing.Literal["byo-sip-trunk"] = "byo-sip-trunk" + gateways: typing.List[SipTrunkGateway] + outbound_authentication_plan: typing_extensions.Annotated[ + typing.Optional[SipTrunkOutboundAuthenticationPlan], + FieldMetadata(alias="outboundAuthenticationPlan"), + pydantic.Field(alias="outboundAuthenticationPlan"), + ] = None + outbound_leading_plus_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="outboundLeadingPlusEnabled"), + pydantic.Field(alias="outboundLeadingPlusEnabled"), + ] = None + tech_prefix: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="techPrefix"), pydantic.Field(alias="techPrefix") + ] = None + sip_diversion_header: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="sipDiversionHeader"), pydantic.Field(alias="sipDiversionHeader") + ] = None + sbc_configuration: typing_extensions.Annotated[ + typing.Optional[SbcConfiguration], + FieldMetadata(alias="sbcConfiguration"), + pydantic.Field(alias="sbcConfiguration"), + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_Cartesia(UncheckedBaseModel): + provider: typing.Literal["cartesia"] = "cartesia" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_Cerebras(UncheckedBaseModel): + provider: typing.Literal["cerebras"] = "cerebras" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_Cloudflare(UncheckedBaseModel): + provider: typing.Literal["cloudflare"] = "cloudflare" + account_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="accountId"), pydantic.Field(alias="accountId") + ] = None + api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey") + ] = None + account_email: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="accountEmail"), pydantic.Field(alias="accountEmail") + ] = None + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="fallbackIndex"), pydantic.Field(alias="fallbackIndex") + ] = None + bucket_plan: typing_extensions.Annotated[ + typing.Optional[CloudflareR2BucketPlan], FieldMetadata(alias="bucketPlan"), pydantic.Field(alias="bucketPlan") + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_CustomLlm(UncheckedBaseModel): + provider: typing.Literal["custom-llm"] = "custom-llm" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + authentication_plan: typing_extensions.Annotated[ + typing.Optional[OAuth2AuthenticationPlan], + FieldMetadata(alias="authenticationPlan"), + pydantic.Field(alias="authenticationPlan"), + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_Deepgram(UncheckedBaseModel): + provider: typing.Literal["deepgram"] = "deepgram" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + api_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="apiUrl"), pydantic.Field(alias="apiUrl") + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_Deepinfra(UncheckedBaseModel): + provider: typing.Literal["deepinfra"] = "deepinfra" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_DeepSeek(UncheckedBaseModel): + provider: typing.Literal["deep-seek"] = "deep-seek" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_Gcp(UncheckedBaseModel): + provider: typing.Literal["gcp"] = "gcp" + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="fallbackIndex"), pydantic.Field(alias="fallbackIndex") + ] = None + gcp_key: typing_extensions.Annotated[GcpKey, FieldMetadata(alias="gcpKey"), pydantic.Field(alias="gcpKey")] + region: typing.Optional[str] = None + bucket_plan: typing_extensions.Annotated[ + typing.Optional[BucketPlan], FieldMetadata(alias="bucketPlan"), pydantic.Field(alias="bucketPlan") + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_Gladia(UncheckedBaseModel): + provider: typing.Literal["gladia"] = "gladia" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_Gohighlevel(UncheckedBaseModel): + provider: typing.Literal["gohighlevel"] = "gohighlevel" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_Google(UncheckedBaseModel): + provider: typing.Literal["google"] = "google" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_Groq(UncheckedBaseModel): + provider: typing.Literal["groq"] = "groq" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_InflectionAi(UncheckedBaseModel): + provider: typing.Literal["inflection-ai"] = "inflection-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_Langfuse(UncheckedBaseModel): + provider: typing.Literal["langfuse"] = "langfuse" + public_key: typing_extensions.Annotated[str, FieldMetadata(alias="publicKey"), pydantic.Field(alias="publicKey")] + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + api_url: typing_extensions.Annotated[str, FieldMetadata(alias="apiUrl"), pydantic.Field(alias="apiUrl")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_Lmnt(UncheckedBaseModel): + provider: typing.Literal["lmnt"] = "lmnt" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_Make(UncheckedBaseModel): + provider: typing.Literal["make"] = "make" + team_id: typing_extensions.Annotated[str, FieldMetadata(alias="teamId"), pydantic.Field(alias="teamId")] + region: str + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_Openai(UncheckedBaseModel): + provider: typing.Literal["openai"] = "openai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_Openrouter(UncheckedBaseModel): + provider: typing.Literal["openrouter"] = "openrouter" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_PerplexityAi(UncheckedBaseModel): + provider: typing.Literal["perplexity-ai"] = "perplexity-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_Playht(UncheckedBaseModel): + provider: typing.Literal["playht"] = "playht" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + user_id: typing_extensions.Annotated[str, FieldMetadata(alias="userId"), pydantic.Field(alias="userId")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_RimeAi(UncheckedBaseModel): + provider: typing.Literal["rime-ai"] = "rime-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_Runpod(UncheckedBaseModel): + provider: typing.Literal["runpod"] = "runpod" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_S3(UncheckedBaseModel): + provider: typing.Literal["s3"] = "s3" + aws_access_key_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="awsAccessKeyId"), pydantic.Field(alias="awsAccessKeyId") + ] + aws_secret_access_key: typing_extensions.Annotated[ + str, FieldMetadata(alias="awsSecretAccessKey"), pydantic.Field(alias="awsSecretAccessKey") + ] + region: str + s_3_bucket_name: typing_extensions.Annotated[ + str, FieldMetadata(alias="s3BucketName"), pydantic.Field(alias="s3BucketName") + ] + s_3_path_prefix: typing_extensions.Annotated[ + str, FieldMetadata(alias="s3PathPrefix"), pydantic.Field(alias="s3PathPrefix") + ] + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="fallbackIndex"), pydantic.Field(alias="fallbackIndex") + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_Supabase(UncheckedBaseModel): + provider: typing.Literal["supabase"] = "supabase" + fallback_index: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="fallbackIndex"), pydantic.Field(alias="fallbackIndex") + ] = None + bucket_plan: typing_extensions.Annotated[ + typing.Optional[SupabaseBucketPlan], FieldMetadata(alias="bucketPlan"), pydantic.Field(alias="bucketPlan") + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_SmallestAi(UncheckedBaseModel): + provider: typing.Literal["smallest-ai"] = "smallest-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_Tavus(UncheckedBaseModel): + provider: typing.Literal["tavus"] = "tavus" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_TogetherAi(UncheckedBaseModel): + provider: typing.Literal["together-ai"] = "together-ai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_Twilio(UncheckedBaseModel): + provider: typing.Literal["twilio"] = "twilio" + auth_token: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="authToken"), pydantic.Field(alias="authToken") + ] = None + api_key: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey") + ] = None + api_secret: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="apiSecret"), pydantic.Field(alias="apiSecret") + ] = None + account_sid: typing_extensions.Annotated[str, FieldMetadata(alias="accountSid"), pydantic.Field(alias="accountSid")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_Vonage(UncheckedBaseModel): + provider: typing.Literal["vonage"] = "vonage" + api_secret: typing_extensions.Annotated[str, FieldMetadata(alias="apiSecret"), pydantic.Field(alias="apiSecret")] + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_Webhook(UncheckedBaseModel): + provider: typing.Literal["webhook"] = "webhook" + authentication_plan: typing_extensions.Annotated[ + CreateWebhookCredentialDtoAuthenticationPlan, + FieldMetadata(alias="authenticationPlan"), + pydantic.Field(alias="authenticationPlan"), + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_CustomCredential(UncheckedBaseModel): + provider: typing.Literal["custom-credential"] = "custom-credential" + authentication_plan: typing_extensions.Annotated[ + CreateCustomCredentialDtoAuthenticationPlan, + FieldMetadata(alias="authenticationPlan"), + pydantic.Field(alias="authenticationPlan"), + ] + encryption_plan: typing_extensions.Annotated[ + typing.Optional[CreateCustomCredentialDtoEncryptionPlan], + FieldMetadata(alias="encryptionPlan"), + pydantic.Field(alias="encryptionPlan"), + ] = None + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_Xai(UncheckedBaseModel): + provider: typing.Literal["xai"] = "xai" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_Neuphonic(UncheckedBaseModel): + provider: typing.Literal["neuphonic"] = "neuphonic" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_Hume(UncheckedBaseModel): + provider: typing.Literal["hume"] = "hume" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_Mistral(UncheckedBaseModel): + provider: typing.Literal["mistral"] = "mistral" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_Speechmatics(UncheckedBaseModel): + provider: typing.Literal["speechmatics"] = "speechmatics" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_Soniox(UncheckedBaseModel): + provider: typing.Literal["soniox"] = "soniox" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_Trieve(UncheckedBaseModel): + provider: typing.Literal["trieve"] = "trieve" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_GoogleCalendarOauth2Client(UncheckedBaseModel): + provider: typing.Literal["google.calendar.oauth2-client"] = "google.calendar.oauth2-client" + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_GoogleCalendarOauth2Authorization(UncheckedBaseModel): + provider: typing.Literal["google.calendar.oauth2-authorization"] = "google.calendar.oauth2-authorization" + authorization_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="authorizationId"), pydantic.Field(alias="authorizationId") + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_GoogleSheetsOauth2Authorization(UncheckedBaseModel): + provider: typing.Literal["google.sheets.oauth2-authorization"] = "google.sheets.oauth2-authorization" + authorization_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="authorizationId"), pydantic.Field(alias="authorizationId") + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_SlackOauth2Authorization(UncheckedBaseModel): + provider: typing.Literal["slack.oauth2-authorization"] = "slack.oauth2-authorization" + authorization_id: typing_extensions.Annotated[ + str, FieldMetadata(alias="authorizationId"), pydantic.Field(alias="authorizationId") + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_GhlOauth2Authorization(UncheckedBaseModel): + provider: typing.Literal["ghl.oauth2-authorization"] = "ghl.oauth2-authorization" + authentication_session: typing_extensions.Annotated[ + Oauth2AuthenticationSession, + FieldMetadata(alias="authenticationSession"), + pydantic.Field(alias="authenticationSession"), + ] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_Inworld(UncheckedBaseModel): + provider: typing.Literal["inworld"] = "inworld" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_Minimax(UncheckedBaseModel): + provider: typing.Literal["minimax"] = "minimax" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + group_id: typing_extensions.Annotated[str, FieldMetadata(alias="groupId"), pydantic.Field(alias="groupId")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_Wellsaid(UncheckedBaseModel): + provider: typing.Literal["wellsaid"] = "wellsaid" + api_key: typing_extensions.Annotated[str, FieldMetadata(alias="apiKey"), pydantic.Field(alias="apiKey")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_Email(UncheckedBaseModel): + provider: typing.Literal["email"] = "email" + email: str + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableCredentialsItem_SlackWebhook(UncheckedBaseModel): + provider: typing.Literal["slack-webhook"] = "slack-webhook" + webhook_url: typing_extensions.Annotated[str, FieldMetadata(alias="webhookUrl"), pydantic.Field(alias="webhookUrl")] + name: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +WorkflowUserEditableCredentialsItem = typing_extensions.Annotated[ + typing.Union[ + WorkflowUserEditableCredentialsItem_11Labs, + WorkflowUserEditableCredentialsItem_Anthropic, + WorkflowUserEditableCredentialsItem_AnthropicBedrock, + WorkflowUserEditableCredentialsItem_Anyscale, + WorkflowUserEditableCredentialsItem_AssemblyAi, + WorkflowUserEditableCredentialsItem_AzureOpenai, + WorkflowUserEditableCredentialsItem_Azure, + WorkflowUserEditableCredentialsItem_ByoSipTrunk, + WorkflowUserEditableCredentialsItem_Cartesia, + WorkflowUserEditableCredentialsItem_Cerebras, + WorkflowUserEditableCredentialsItem_Cloudflare, + WorkflowUserEditableCredentialsItem_CustomLlm, + WorkflowUserEditableCredentialsItem_Deepgram, + WorkflowUserEditableCredentialsItem_Deepinfra, + WorkflowUserEditableCredentialsItem_DeepSeek, + WorkflowUserEditableCredentialsItem_Gcp, + WorkflowUserEditableCredentialsItem_Gladia, + WorkflowUserEditableCredentialsItem_Gohighlevel, + WorkflowUserEditableCredentialsItem_Google, + WorkflowUserEditableCredentialsItem_Groq, + WorkflowUserEditableCredentialsItem_InflectionAi, + WorkflowUserEditableCredentialsItem_Langfuse, + WorkflowUserEditableCredentialsItem_Lmnt, + WorkflowUserEditableCredentialsItem_Make, + WorkflowUserEditableCredentialsItem_Openai, + WorkflowUserEditableCredentialsItem_Openrouter, + WorkflowUserEditableCredentialsItem_PerplexityAi, + WorkflowUserEditableCredentialsItem_Playht, + WorkflowUserEditableCredentialsItem_RimeAi, + WorkflowUserEditableCredentialsItem_Runpod, + WorkflowUserEditableCredentialsItem_S3, + WorkflowUserEditableCredentialsItem_Supabase, + WorkflowUserEditableCredentialsItem_SmallestAi, + WorkflowUserEditableCredentialsItem_Tavus, + WorkflowUserEditableCredentialsItem_TogetherAi, + WorkflowUserEditableCredentialsItem_Twilio, + WorkflowUserEditableCredentialsItem_Vonage, + WorkflowUserEditableCredentialsItem_Webhook, + WorkflowUserEditableCredentialsItem_CustomCredential, + WorkflowUserEditableCredentialsItem_Xai, + WorkflowUserEditableCredentialsItem_Neuphonic, + WorkflowUserEditableCredentialsItem_Hume, + WorkflowUserEditableCredentialsItem_Mistral, + WorkflowUserEditableCredentialsItem_Speechmatics, + WorkflowUserEditableCredentialsItem_Soniox, + WorkflowUserEditableCredentialsItem_Trieve, + WorkflowUserEditableCredentialsItem_GoogleCalendarOauth2Client, + WorkflowUserEditableCredentialsItem_GoogleCalendarOauth2Authorization, + WorkflowUserEditableCredentialsItem_GoogleSheetsOauth2Authorization, + WorkflowUserEditableCredentialsItem_SlackOauth2Authorization, + WorkflowUserEditableCredentialsItem_GhlOauth2Authorization, + WorkflowUserEditableCredentialsItem_Inworld, + WorkflowUserEditableCredentialsItem_Minimax, + WorkflowUserEditableCredentialsItem_Wellsaid, + WorkflowUserEditableCredentialsItem_Email, + WorkflowUserEditableCredentialsItem_SlackWebhook, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/workflow_user_editable_hooks_item.py b/src/vapi/types/workflow_user_editable_hooks_item.py new file mode 100644 index 00000000..51ed8cff --- /dev/null +++ b/src/vapi/types/workflow_user_editable_hooks_item.py @@ -0,0 +1,17 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted +from .call_hook_call_ending import CallHookCallEnding +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout +from .call_hook_model_response_timeout import CallHookModelResponseTimeout + +WorkflowUserEditableHooksItem = typing.Union[ + CallHookCallEnding, + CallHookAssistantSpeechInterrupted, + CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechTimeout, + CallHookModelResponseTimeout, +] diff --git a/src/vapi/types/workflow_user_editable_model.py b/src/vapi/types/workflow_user_editable_model.py new file mode 100644 index 00000000..04795eed --- /dev/null +++ b/src/vapi/types/workflow_user_editable_model.py @@ -0,0 +1,161 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .anthropic_thinking_config import AnthropicThinkingConfig +from .workflow_anthropic_bedrock_model_model import WorkflowAnthropicBedrockModelModel +from .workflow_anthropic_model_model import WorkflowAnthropicModelModel +from .workflow_custom_model_metadata_send_mode import WorkflowCustomModelMetadataSendMode +from .workflow_google_model_model import WorkflowGoogleModelModel +from .workflow_open_ai_model_model import WorkflowOpenAiModelModel + + +class WorkflowUserEditableModel_Openai(UncheckedBaseModel): + """ + This is the model for the workflow. + + This can be overridden at node level using `nodes[n].model`. + """ + + provider: typing.Literal["openai"] = "openai" + model: WorkflowOpenAiModelModel + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableModel_Anthropic(UncheckedBaseModel): + """ + This is the model for the workflow. + + This can be overridden at node level using `nodes[n].model`. + """ + + provider: typing.Literal["anthropic"] = "anthropic" + model: WorkflowAnthropicModelModel + thinking: typing.Optional[AnthropicThinkingConfig] = None + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableModel_AnthropicBedrock(UncheckedBaseModel): + """ + This is the model for the workflow. + + This can be overridden at node level using `nodes[n].model`. + """ + + provider: typing.Literal["anthropic-bedrock"] = "anthropic-bedrock" + model: WorkflowAnthropicBedrockModelModel + thinking: typing.Optional[AnthropicThinkingConfig] = None + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableModel_Google(UncheckedBaseModel): + """ + This is the model for the workflow. + + This can be overridden at node level using `nodes[n].model`. + """ + + provider: typing.Literal["google"] = "google" + model: WorkflowGoogleModelModel + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableModel_CustomLlm(UncheckedBaseModel): + """ + This is the model for the workflow. + + This can be overridden at node level using `nodes[n].model`. + """ + + provider: typing.Literal["custom-llm"] = "custom-llm" + metadata_send_mode: typing_extensions.Annotated[ + typing.Optional[WorkflowCustomModelMetadataSendMode], + FieldMetadata(alias="metadataSendMode"), + pydantic.Field(alias="metadataSendMode"), + ] = None + url: str + headers: typing.Optional[typing.Dict[str, typing.Any]] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + model: str + temperature: typing.Optional[float] = None + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTokens"), pydantic.Field(alias="maxTokens") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +WorkflowUserEditableModel = typing_extensions.Annotated[ + typing.Union[ + WorkflowUserEditableModel_Openai, + WorkflowUserEditableModel_Anthropic, + WorkflowUserEditableModel_AnthropicBedrock, + WorkflowUserEditableModel_Google, + WorkflowUserEditableModel_CustomLlm, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/workflow_user_editable_nodes_item.py b/src/vapi/types/workflow_user_editable_nodes_item.py new file mode 100644 index 00000000..0e9b2ad5 --- /dev/null +++ b/src/vapi/types/workflow_user_editable_nodes_item.py @@ -0,0 +1,82 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .conversation_node_model import ConversationNodeModel +from .conversation_node_tools_item import ConversationNodeToolsItem +from .conversation_node_transcriber import ConversationNodeTranscriber +from .conversation_node_voice import ConversationNodeVoice +from .global_node_plan import GlobalNodePlan +from .tool_node_tool import ToolNodeTool +from .variable_extraction_plan import VariableExtractionPlan + + +class WorkflowUserEditableNodesItem_Conversation(UncheckedBaseModel): + type: typing.Literal["conversation"] = "conversation" + model: typing.Optional[ConversationNodeModel] = None + transcriber: typing.Optional[ConversationNodeTranscriber] = None + voice: typing.Optional[ConversationNodeVoice] = None + tools: typing.Optional[typing.List[ConversationNodeToolsItem]] = None + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds"), pydantic.Field(alias="toolIds") + ] = None + prompt: typing.Optional[str] = None + global_node_plan: typing_extensions.Annotated[ + typing.Optional[GlobalNodePlan], FieldMetadata(alias="globalNodePlan"), pydantic.Field(alias="globalNodePlan") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + name: str + is_start: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="isStart"), pydantic.Field(alias="isStart") + ] = None + metadata: typing.Optional[typing.Dict[str, typing.Any]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableNodesItem_Tool(UncheckedBaseModel): + type: typing.Literal["tool"] = "tool" + tool: typing.Optional[ToolNodeTool] = None + tool_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="toolId"), pydantic.Field(alias="toolId") + ] = None + name: str + is_start: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="isStart"), pydantic.Field(alias="isStart") + ] = None + metadata: typing.Optional[typing.Dict[str, typing.Any]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +WorkflowUserEditableNodesItem = typing_extensions.Annotated[ + typing.Union[WorkflowUserEditableNodesItem_Conversation, WorkflowUserEditableNodesItem_Tool], + UnionMetadata(discriminant="type"), +] +update_forward_refs(WorkflowUserEditableNodesItem_Conversation) +update_forward_refs(WorkflowUserEditableNodesItem_Tool) diff --git a/src/vapi/types/workflow_user_editable_transcriber.py b/src/vapi/types/workflow_user_editable_transcriber.py new file mode 100644 index 00000000..65c37840 --- /dev/null +++ b/src/vapi/types/workflow_user_editable_transcriber.py @@ -0,0 +1,562 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .assembly_ai_transcriber_language import AssemblyAiTranscriberLanguage +from .assembly_ai_transcriber_speech_model import AssemblyAiTranscriberSpeechModel +from .azure_speech_transcriber_language import AzureSpeechTranscriberLanguage +from .azure_speech_transcriber_segmentation_strategy import AzureSpeechTranscriberSegmentationStrategy +from .cartesia_transcriber_language import CartesiaTranscriberLanguage +from .cartesia_transcriber_model import CartesiaTranscriberModel +from .deepgram_transcriber_language import DeepgramTranscriberLanguage +from .deepgram_transcriber_model import DeepgramTranscriberModel +from .eleven_labs_transcriber_language import ElevenLabsTranscriberLanguage +from .eleven_labs_transcriber_model import ElevenLabsTranscriberModel +from .fallback_transcriber_plan import FallbackTranscriberPlan +from .gladia_custom_vocabulary_config_dto import GladiaCustomVocabularyConfigDto +from .gladia_transcriber_language import GladiaTranscriberLanguage +from .gladia_transcriber_language_behaviour import GladiaTranscriberLanguageBehaviour +from .gladia_transcriber_languages import GladiaTranscriberLanguages +from .gladia_transcriber_model import GladiaTranscriberModel +from .gladia_transcriber_region import GladiaTranscriberRegion +from .google_transcriber_language import GoogleTranscriberLanguage +from .google_transcriber_model import GoogleTranscriberModel +from .open_ai_transcriber_language import OpenAiTranscriberLanguage +from .open_ai_transcriber_model import OpenAiTranscriberModel +from .server import Server +from .soniox_transcriber_language import SonioxTranscriberLanguage +from .soniox_transcriber_model import SonioxTranscriberModel +from .speechmatics_custom_vocabulary_item import SpeechmaticsCustomVocabularyItem +from .speechmatics_transcriber_language import SpeechmaticsTranscriberLanguage +from .speechmatics_transcriber_model import SpeechmaticsTranscriberModel +from .speechmatics_transcriber_numeral_style import SpeechmaticsTranscriberNumeralStyle +from .speechmatics_transcriber_operating_point import SpeechmaticsTranscriberOperatingPoint +from .speechmatics_transcriber_region import SpeechmaticsTranscriberRegion +from .talkscriber_transcriber_language import TalkscriberTranscriberLanguage +from .talkscriber_transcriber_model import TalkscriberTranscriberModel + + +class WorkflowUserEditableTranscriber_AssemblyAi(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["assembly-ai"] = "assembly-ai" + language: typing.Optional[AssemblyAiTranscriberLanguage] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="confidenceThreshold"), pydantic.Field(alias="confidenceThreshold") + ] = None + format_turns: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="formatTurns"), pydantic.Field(alias="formatTurns") + ] = None + end_of_turn_confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="endOfTurnConfidenceThreshold"), + pydantic.Field(alias="endOfTurnConfidenceThreshold"), + ] = None + min_end_of_turn_silence_when_confident: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minEndOfTurnSilenceWhenConfident"), + pydantic.Field(alias="minEndOfTurnSilenceWhenConfident"), + ] = None + word_finalization_max_wait_time: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="wordFinalizationMaxWaitTime"), + pydantic.Field(alias="wordFinalizationMaxWaitTime"), + ] = None + max_turn_silence: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxTurnSilence"), pydantic.Field(alias="maxTurnSilence") + ] = None + vad_assisted_endpointing_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="vadAssistedEndpointingEnabled"), + pydantic.Field(alias="vadAssistedEndpointingEnabled"), + ] = None + speech_model: typing_extensions.Annotated[ + typing.Optional[AssemblyAiTranscriberSpeechModel], + FieldMetadata(alias="speechModel"), + pydantic.Field(alias="speechModel"), + ] = None + realtime_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="realtimeUrl"), pydantic.Field(alias="realtimeUrl") + ] = None + word_boost: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="wordBoost"), pydantic.Field(alias="wordBoost") + ] = None + keyterms_prompt: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="keytermsPrompt"), pydantic.Field(alias="keytermsPrompt") + ] = None + end_utterance_silence_threshold: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="endUtteranceSilenceThreshold"), + pydantic.Field(alias="endUtteranceSilenceThreshold"), + ] = None + disable_partial_transcripts: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="disablePartialTranscripts"), + pydantic.Field(alias="disablePartialTranscripts"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableTranscriber_Azure(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["azure"] = "azure" + language: typing.Optional[AzureSpeechTranscriberLanguage] = None + segmentation_strategy: typing_extensions.Annotated[ + typing.Optional[AzureSpeechTranscriberSegmentationStrategy], + FieldMetadata(alias="segmentationStrategy"), + pydantic.Field(alias="segmentationStrategy"), + ] = None + segmentation_silence_timeout_ms: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="segmentationSilenceTimeoutMs"), + pydantic.Field(alias="segmentationSilenceTimeoutMs"), + ] = None + segmentation_maximum_time_ms: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="segmentationMaximumTimeMs"), + pydantic.Field(alias="segmentationMaximumTimeMs"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableTranscriber_CustomTranscriber(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["custom-transcriber"] = "custom-transcriber" + server: Server + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableTranscriber_Deepgram(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["deepgram"] = "deepgram" + model: typing.Optional[DeepgramTranscriberModel] = None + language: typing.Optional[DeepgramTranscriberLanguage] = None + smart_format: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="smartFormat"), pydantic.Field(alias="smartFormat") + ] = None + mip_opt_out: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="mipOptOut"), pydantic.Field(alias="mipOptOut") + ] = None + numerals: typing.Optional[bool] = None + profanity_filter: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="profanityFilter"), pydantic.Field(alias="profanityFilter") + ] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="confidenceThreshold"), pydantic.Field(alias="confidenceThreshold") + ] = None + eager_eot_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="eagerEotThreshold"), pydantic.Field(alias="eagerEotThreshold") + ] = None + eot_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="eotThreshold"), pydantic.Field(alias="eotThreshold") + ] = None + eot_timeout_ms: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="eotTimeoutMs"), pydantic.Field(alias="eotTimeoutMs") + ] = None + keywords: typing.Optional[typing.List[str]] = None + keyterm: typing.Optional[typing.List[str]] = None + endpointing: typing.Optional[float] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableTranscriber_11Labs(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["11labs"] = "11labs" + model: typing.Optional[ElevenLabsTranscriberModel] = None + language: typing.Optional[ElevenLabsTranscriberLanguage] = None + silence_threshold_seconds: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="silenceThresholdSeconds"), + pydantic.Field(alias="silenceThresholdSeconds"), + ] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="confidenceThreshold"), pydantic.Field(alias="confidenceThreshold") + ] = None + min_speech_duration_ms: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="minSpeechDurationMs"), pydantic.Field(alias="minSpeechDurationMs") + ] = None + min_silence_duration_ms: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minSilenceDurationMs"), + pydantic.Field(alias="minSilenceDurationMs"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableTranscriber_Gladia(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["gladia"] = "gladia" + model: typing.Optional[GladiaTranscriberModel] = None + language_behaviour: typing_extensions.Annotated[ + typing.Optional[GladiaTranscriberLanguageBehaviour], + FieldMetadata(alias="languageBehaviour"), + pydantic.Field(alias="languageBehaviour"), + ] = None + language: typing.Optional[GladiaTranscriberLanguage] = None + languages: typing.Optional[GladiaTranscriberLanguages] = None + transcription_hint: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="transcriptionHint"), pydantic.Field(alias="transcriptionHint") + ] = None + prosody: typing.Optional[bool] = None + audio_enhancer: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="audioEnhancer"), pydantic.Field(alias="audioEnhancer") + ] = None + confidence_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="confidenceThreshold"), pydantic.Field(alias="confidenceThreshold") + ] = None + endpointing: typing.Optional[float] = None + speech_threshold: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="speechThreshold"), pydantic.Field(alias="speechThreshold") + ] = None + custom_vocabulary_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="customVocabularyEnabled"), + pydantic.Field(alias="customVocabularyEnabled"), + ] = None + custom_vocabulary_config: typing_extensions.Annotated[ + typing.Optional[GladiaCustomVocabularyConfigDto], + FieldMetadata(alias="customVocabularyConfig"), + pydantic.Field(alias="customVocabularyConfig"), + ] = None + region: typing.Optional[GladiaTranscriberRegion] = None + receive_partial_transcripts: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="receivePartialTranscripts"), + pydantic.Field(alias="receivePartialTranscripts"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableTranscriber_Google(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["google"] = "google" + model: typing.Optional[GoogleTranscriberModel] = None + language: typing.Optional[GoogleTranscriberLanguage] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableTranscriber_Speechmatics(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["speechmatics"] = "speechmatics" + model: typing.Optional[SpeechmaticsTranscriberModel] = None + language: typing.Optional[SpeechmaticsTranscriberLanguage] = None + operating_point: typing_extensions.Annotated[ + typing.Optional[SpeechmaticsTranscriberOperatingPoint], + FieldMetadata(alias="operatingPoint"), + pydantic.Field(alias="operatingPoint"), + ] = None + region: typing.Optional[SpeechmaticsTranscriberRegion] = None + enable_diarization: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="enableDiarization"), pydantic.Field(alias="enableDiarization") + ] = None + max_delay: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxDelay"), pydantic.Field(alias="maxDelay") + ] = None + custom_vocabulary: typing_extensions.Annotated[ + typing.List[SpeechmaticsCustomVocabularyItem], + FieldMetadata(alias="customVocabulary"), + pydantic.Field(alias="customVocabulary"), + ] + numeral_style: typing_extensions.Annotated[ + typing.Optional[SpeechmaticsTranscriberNumeralStyle], + FieldMetadata(alias="numeralStyle"), + pydantic.Field(alias="numeralStyle"), + ] = None + end_of_turn_sensitivity: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="endOfTurnSensitivity"), + pydantic.Field(alias="endOfTurnSensitivity"), + ] = None + remove_disfluencies: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="removeDisfluencies"), pydantic.Field(alias="removeDisfluencies") + ] = None + minimum_speech_duration: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minimumSpeechDuration"), + pydantic.Field(alias="minimumSpeechDuration"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableTranscriber_Talkscriber(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["talkscriber"] = "talkscriber" + model: typing.Optional[TalkscriberTranscriberModel] = None + language: typing.Optional[TalkscriberTranscriberLanguage] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableTranscriber_Openai(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["openai"] = "openai" + model: OpenAiTranscriberModel + language: typing.Optional[OpenAiTranscriberLanguage] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableTranscriber_Cartesia(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["cartesia"] = "cartesia" + model: typing.Optional[CartesiaTranscriberModel] = None + language: typing.Optional[CartesiaTranscriberLanguage] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableTranscriber_Soniox(UncheckedBaseModel): + """ + This is the transcriber for the workflow. + + This can be overridden at node level using `nodes[n].transcriber`. + """ + + provider: typing.Literal["soniox"] = "soniox" + model: typing.Optional[SonioxTranscriberModel] = None + language: typing.Optional[SonioxTranscriberLanguage] = None + language_hints_strict: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="languageHintsStrict"), pydantic.Field(alias="languageHintsStrict") + ] = None + max_endpoint_delay_ms: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="maxEndpointDelayMs"), pydantic.Field(alias="maxEndpointDelayMs") + ] = None + custom_vocabulary: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="customVocabulary"), + pydantic.Field(alias="customVocabulary"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackTranscriberPlan], + FieldMetadata(alias="fallbackPlan"), + pydantic.Field(alias="fallbackPlan"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +WorkflowUserEditableTranscriber = typing_extensions.Annotated[ + typing.Union[ + WorkflowUserEditableTranscriber_AssemblyAi, + WorkflowUserEditableTranscriber_Azure, + WorkflowUserEditableTranscriber_CustomTranscriber, + WorkflowUserEditableTranscriber_Deepgram, + WorkflowUserEditableTranscriber_11Labs, + WorkflowUserEditableTranscriber_Gladia, + WorkflowUserEditableTranscriber_Google, + WorkflowUserEditableTranscriber_Speechmatics, + WorkflowUserEditableTranscriber_Talkscriber, + WorkflowUserEditableTranscriber_Openai, + WorkflowUserEditableTranscriber_Cartesia, + WorkflowUserEditableTranscriber_Soniox, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/workflow_user_editable_voice.py b/src/vapi/types/workflow_user_editable_voice.py new file mode 100644 index 00000000..74ac552c --- /dev/null +++ b/src/vapi/types/workflow_user_editable_voice.py @@ -0,0 +1,776 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .azure_voice_id import AzureVoiceId +from .cartesia_experimental_controls import CartesiaExperimentalControls +from .cartesia_generation_config import CartesiaGenerationConfig +from .cartesia_voice_language import CartesiaVoiceLanguage +from .cartesia_voice_model import CartesiaVoiceModel +from .chunk_plan import ChunkPlan +from .deepgram_voice_id import DeepgramVoiceId +from .deepgram_voice_model import DeepgramVoiceModel +from .eleven_labs_pronunciation_dictionary_locator import ElevenLabsPronunciationDictionaryLocator +from .eleven_labs_voice_id import ElevenLabsVoiceId +from .eleven_labs_voice_model import ElevenLabsVoiceModel +from .fallback_plan import FallbackPlan +from .hume_voice_model import HumeVoiceModel +from .inworld_voice_language_code import InworldVoiceLanguageCode +from .inworld_voice_model import InworldVoiceModel +from .inworld_voice_voice_id import InworldVoiceVoiceId +from .lmnt_voice_id import LmntVoiceId +from .lmnt_voice_language import LmntVoiceLanguage +from .minimax_voice_language_boost import MinimaxVoiceLanguageBoost +from .minimax_voice_model import MinimaxVoiceModel +from .minimax_voice_region import MinimaxVoiceRegion +from .minimax_voice_subtitle_type import MinimaxVoiceSubtitleType +from .neuphonic_voice_model import NeuphonicVoiceModel +from .open_ai_voice_id import OpenAiVoiceId +from .open_ai_voice_model import OpenAiVoiceModel +from .play_ht_voice_emotion import PlayHtVoiceEmotion +from .play_ht_voice_id import PlayHtVoiceId +from .play_ht_voice_language import PlayHtVoiceLanguage +from .play_ht_voice_model import PlayHtVoiceModel +from .rime_ai_voice_id import RimeAiVoiceId +from .rime_ai_voice_language import RimeAiVoiceLanguage +from .rime_ai_voice_model import RimeAiVoiceModel +from .server import Server +from .sesame_voice_model import SesameVoiceModel +from .smallest_ai_voice_id import SmallestAiVoiceId +from .smallest_ai_voice_model import SmallestAiVoiceModel +from .tavus_conversation_properties import TavusConversationProperties +from .tavus_voice_voice_id import TavusVoiceVoiceId +from .vapi_pronunciation_dictionary_locator import VapiPronunciationDictionaryLocator +from .vapi_voice_voice_id import VapiVoiceVoiceId +from .well_said_voice_model import WellSaidVoiceModel + + +class WorkflowUserEditableVoice_Azure(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["azure"] = "azure" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[AzureVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + speed: typing.Optional[float] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableVoice_Cartesia(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["cartesia"] = "cartesia" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[CartesiaVoiceModel] = None + language: typing.Optional[CartesiaVoiceLanguage] = None + experimental_controls: typing_extensions.Annotated[ + typing.Optional[CartesiaExperimentalControls], + FieldMetadata(alias="experimentalControls"), + pydantic.Field(alias="experimentalControls"), + ] = None + generation_config: typing_extensions.Annotated[ + typing.Optional[CartesiaGenerationConfig], + FieldMetadata(alias="generationConfig"), + pydantic.Field(alias="generationConfig"), + ] = None + pronunciation_dict_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="pronunciationDictId"), pydantic.Field(alias="pronunciationDictId") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableVoice_CustomVoice(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["custom-voice"] = "custom-voice" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + server: Server + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableVoice_Deepgram(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["deepgram"] = "deepgram" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + DeepgramVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[DeepgramVoiceModel] = None + mip_opt_out: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="mipOptOut"), pydantic.Field(alias="mipOptOut") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableVoice_11Labs(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["11labs"] = "11labs" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + ElevenLabsVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + stability: typing.Optional[float] = None + similarity_boost: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="similarityBoost"), pydantic.Field(alias="similarityBoost") + ] = None + style: typing.Optional[float] = None + use_speaker_boost: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="useSpeakerBoost"), pydantic.Field(alias="useSpeakerBoost") + ] = None + speed: typing.Optional[float] = None + optimize_streaming_latency: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="optimizeStreamingLatency"), + pydantic.Field(alias="optimizeStreamingLatency"), + ] = None + enable_ssml_parsing: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="enableSsmlParsing"), pydantic.Field(alias="enableSsmlParsing") + ] = None + auto_mode: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="autoMode"), pydantic.Field(alias="autoMode") + ] = None + model: typing.Optional[ElevenLabsVoiceModel] = None + language: typing.Optional[str] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + pronunciation_dictionary_locators: typing_extensions.Annotated[ + typing.Optional[typing.List[ElevenLabsPronunciationDictionaryLocator]], + FieldMetadata(alias="pronunciationDictionaryLocators"), + pydantic.Field(alias="pronunciationDictionaryLocators"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableVoice_Hume(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["hume"] = "hume" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + model: typing.Optional[HumeVoiceModel] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + is_custom_hume_voice: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="isCustomHumeVoice"), pydantic.Field(alias="isCustomHumeVoice") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + description: typing.Optional[str] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableVoice_Lmnt(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["lmnt"] = "lmnt" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[LmntVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + speed: typing.Optional[float] = None + language: typing.Optional[LmntVoiceLanguage] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableVoice_Neuphonic(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["neuphonic"] = "neuphonic" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[NeuphonicVoiceModel] = None + language: typing.Dict[str, typing.Any] + speed: typing.Optional[float] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableVoice_Openai(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["openai"] = "openai" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + OpenAiVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[OpenAiVoiceModel] = None + instructions: typing.Optional[str] = None + speed: typing.Optional[float] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableVoice_Playht(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["playht"] = "playht" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + PlayHtVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + speed: typing.Optional[float] = None + temperature: typing.Optional[float] = None + emotion: typing.Optional[PlayHtVoiceEmotion] = None + voice_guidance: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="voiceGuidance"), pydantic.Field(alias="voiceGuidance") + ] = None + style_guidance: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="styleGuidance"), pydantic.Field(alias="styleGuidance") + ] = None + text_guidance: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="textGuidance"), pydantic.Field(alias="textGuidance") + ] = None + model: typing.Optional[PlayHtVoiceModel] = None + language: typing.Optional[PlayHtVoiceLanguage] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableVoice_Wellsaid(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["wellsaid"] = "wellsaid" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[WellSaidVoiceModel] = None + enable_ssml: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="enableSsml"), pydantic.Field(alias="enableSsml") + ] = None + library_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="libraryIds"), pydantic.Field(alias="libraryIds") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableVoice_RimeAi(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["rime-ai"] = "rime-ai" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + RimeAiVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[RimeAiVoiceModel] = None + speed: typing.Optional[float] = None + pause_between_brackets: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="pauseBetweenBrackets"), pydantic.Field(alias="pauseBetweenBrackets") + ] = None + phonemize_between_brackets: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="phonemizeBetweenBrackets"), + pydantic.Field(alias="phonemizeBetweenBrackets"), + ] = None + reduce_latency: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="reduceLatency"), pydantic.Field(alias="reduceLatency") + ] = None + inline_speed_alpha: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="inlineSpeedAlpha"), pydantic.Field(alias="inlineSpeedAlpha") + ] = None + language: typing.Optional[RimeAiVoiceLanguage] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableVoice_SmallestAi(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["smallest-ai"] = "smallest-ai" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + SmallestAiVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[SmallestAiVoiceModel] = None + speed: typing.Optional[float] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableVoice_Tavus(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["tavus"] = "tavus" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + TavusVoiceVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + persona_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="personaId"), pydantic.Field(alias="personaId") + ] = None + callback_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callbackUrl"), pydantic.Field(alias="callbackUrl") + ] = None + conversation_name: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="conversationName"), pydantic.Field(alias="conversationName") + ] = None + conversational_context: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="conversationalContext"), + pydantic.Field(alias="conversationalContext"), + ] = None + custom_greeting: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="customGreeting"), pydantic.Field(alias="customGreeting") + ] = None + properties: typing.Optional[TavusConversationProperties] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableVoice_Vapi(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["vapi"] = "vapi" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + VapiVoiceVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + speed: typing.Optional[float] = None + pronunciation_dictionary: typing_extensions.Annotated[ + typing.Optional[typing.List[VapiPronunciationDictionaryLocator]], + FieldMetadata(alias="pronunciationDictionary"), + pydantic.Field(alias="pronunciationDictionary"), + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableVoice_Sesame(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["sesame"] = "sesame" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: SesameVoiceModel + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableVoice_Inworld(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["inworld"] = "inworld" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + InworldVoiceVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[InworldVoiceModel] = None + language_code: typing_extensions.Annotated[ + typing.Optional[InworldVoiceLanguageCode], + FieldMetadata(alias="languageCode"), + pydantic.Field(alias="languageCode"), + ] = None + temperature: typing.Optional[float] = None + speaking_rate: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="speakingRate"), pydantic.Field(alias="speakingRate") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowUserEditableVoice_Minimax(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["minimax"] = "minimax" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[MinimaxVoiceModel] = None + emotion: typing.Optional[str] = None + subtitle_type: typing_extensions.Annotated[ + typing.Optional[MinimaxVoiceSubtitleType], + FieldMetadata(alias="subtitleType"), + pydantic.Field(alias="subtitleType"), + ] = None + pitch: typing.Optional[float] = None + speed: typing.Optional[float] = None + volume: typing.Optional[float] = None + region: typing.Optional[MinimaxVoiceRegion] = None + language_boost: typing_extensions.Annotated[ + typing.Optional[MinimaxVoiceLanguageBoost], + FieldMetadata(alias="languageBoost"), + pydantic.Field(alias="languageBoost"), + ] = None + text_normalization_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="textNormalizationEnabled"), + pydantic.Field(alias="textNormalizationEnabled"), + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +WorkflowUserEditableVoice = typing_extensions.Annotated[ + typing.Union[ + WorkflowUserEditableVoice_Azure, + WorkflowUserEditableVoice_Cartesia, + WorkflowUserEditableVoice_CustomVoice, + WorkflowUserEditableVoice_Deepgram, + WorkflowUserEditableVoice_11Labs, + WorkflowUserEditableVoice_Hume, + WorkflowUserEditableVoice_Lmnt, + WorkflowUserEditableVoice_Neuphonic, + WorkflowUserEditableVoice_Openai, + WorkflowUserEditableVoice_Playht, + WorkflowUserEditableVoice_Wellsaid, + WorkflowUserEditableVoice_RimeAi, + WorkflowUserEditableVoice_SmallestAi, + WorkflowUserEditableVoice_Tavus, + WorkflowUserEditableVoice_Vapi, + WorkflowUserEditableVoice_Sesame, + WorkflowUserEditableVoice_Inworld, + WorkflowUserEditableVoice_Minimax, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/workflow_user_editable_voicemail_detection.py b/src/vapi/types/workflow_user_editable_voicemail_detection.py new file mode 100644 index 00000000..495f5b21 --- /dev/null +++ b/src/vapi/types/workflow_user_editable_voicemail_detection.py @@ -0,0 +1,17 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .google_voicemail_detection_plan import GoogleVoicemailDetectionPlan +from .open_ai_voicemail_detection_plan import OpenAiVoicemailDetectionPlan +from .twilio_voicemail_detection_plan import TwilioVoicemailDetectionPlan +from .vapi_voicemail_detection_plan import VapiVoicemailDetectionPlan +from .workflow_user_editable_voicemail_detection_zero import WorkflowUserEditableVoicemailDetectionZero + +WorkflowUserEditableVoicemailDetection = typing.Union[ + WorkflowUserEditableVoicemailDetectionZero, + GoogleVoicemailDetectionPlan, + OpenAiVoicemailDetectionPlan, + TwilioVoicemailDetectionPlan, + VapiVoicemailDetectionPlan, +] diff --git a/src/vapi/types/workflow_user_editable_voicemail_detection_zero.py b/src/vapi/types/workflow_user_editable_voicemail_detection_zero.py new file mode 100644 index 00000000..77b24cf6 --- /dev/null +++ b/src/vapi/types/workflow_user_editable_voicemail_detection_zero.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +WorkflowUserEditableVoicemailDetectionZero = typing.Union[typing.Literal["off"], typing.Any] diff --git a/src/vapi/types/workflow_voice.py b/src/vapi/types/workflow_voice.py new file mode 100644 index 00000000..67144800 --- /dev/null +++ b/src/vapi/types/workflow_voice.py @@ -0,0 +1,776 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .azure_voice_id import AzureVoiceId +from .cartesia_experimental_controls import CartesiaExperimentalControls +from .cartesia_generation_config import CartesiaGenerationConfig +from .cartesia_voice_language import CartesiaVoiceLanguage +from .cartesia_voice_model import CartesiaVoiceModel +from .chunk_plan import ChunkPlan +from .deepgram_voice_id import DeepgramVoiceId +from .deepgram_voice_model import DeepgramVoiceModel +from .eleven_labs_pronunciation_dictionary_locator import ElevenLabsPronunciationDictionaryLocator +from .eleven_labs_voice_id import ElevenLabsVoiceId +from .eleven_labs_voice_model import ElevenLabsVoiceModel +from .fallback_plan import FallbackPlan +from .hume_voice_model import HumeVoiceModel +from .inworld_voice_language_code import InworldVoiceLanguageCode +from .inworld_voice_model import InworldVoiceModel +from .inworld_voice_voice_id import InworldVoiceVoiceId +from .lmnt_voice_id import LmntVoiceId +from .lmnt_voice_language import LmntVoiceLanguage +from .minimax_voice_language_boost import MinimaxVoiceLanguageBoost +from .minimax_voice_model import MinimaxVoiceModel +from .minimax_voice_region import MinimaxVoiceRegion +from .minimax_voice_subtitle_type import MinimaxVoiceSubtitleType +from .neuphonic_voice_model import NeuphonicVoiceModel +from .open_ai_voice_id import OpenAiVoiceId +from .open_ai_voice_model import OpenAiVoiceModel +from .play_ht_voice_emotion import PlayHtVoiceEmotion +from .play_ht_voice_id import PlayHtVoiceId +from .play_ht_voice_language import PlayHtVoiceLanguage +from .play_ht_voice_model import PlayHtVoiceModel +from .rime_ai_voice_id import RimeAiVoiceId +from .rime_ai_voice_language import RimeAiVoiceLanguage +from .rime_ai_voice_model import RimeAiVoiceModel +from .server import Server +from .sesame_voice_model import SesameVoiceModel +from .smallest_ai_voice_id import SmallestAiVoiceId +from .smallest_ai_voice_model import SmallestAiVoiceModel +from .tavus_conversation_properties import TavusConversationProperties +from .tavus_voice_voice_id import TavusVoiceVoiceId +from .vapi_pronunciation_dictionary_locator import VapiPronunciationDictionaryLocator +from .vapi_voice_voice_id import VapiVoiceVoiceId +from .well_said_voice_model import WellSaidVoiceModel + + +class WorkflowVoice_Azure(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["azure"] = "azure" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[AzureVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + speed: typing.Optional[float] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowVoice_Cartesia(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["cartesia"] = "cartesia" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[CartesiaVoiceModel] = None + language: typing.Optional[CartesiaVoiceLanguage] = None + experimental_controls: typing_extensions.Annotated[ + typing.Optional[CartesiaExperimentalControls], + FieldMetadata(alias="experimentalControls"), + pydantic.Field(alias="experimentalControls"), + ] = None + generation_config: typing_extensions.Annotated[ + typing.Optional[CartesiaGenerationConfig], + FieldMetadata(alias="generationConfig"), + pydantic.Field(alias="generationConfig"), + ] = None + pronunciation_dict_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="pronunciationDictId"), pydantic.Field(alias="pronunciationDictId") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowVoice_CustomVoice(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["custom-voice"] = "custom-voice" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + server: Server + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowVoice_Deepgram(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["deepgram"] = "deepgram" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + DeepgramVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[DeepgramVoiceModel] = None + mip_opt_out: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="mipOptOut"), pydantic.Field(alias="mipOptOut") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowVoice_11Labs(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["11labs"] = "11labs" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + ElevenLabsVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + stability: typing.Optional[float] = None + similarity_boost: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="similarityBoost"), pydantic.Field(alias="similarityBoost") + ] = None + style: typing.Optional[float] = None + use_speaker_boost: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="useSpeakerBoost"), pydantic.Field(alias="useSpeakerBoost") + ] = None + speed: typing.Optional[float] = None + optimize_streaming_latency: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="optimizeStreamingLatency"), + pydantic.Field(alias="optimizeStreamingLatency"), + ] = None + enable_ssml_parsing: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="enableSsmlParsing"), pydantic.Field(alias="enableSsmlParsing") + ] = None + auto_mode: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="autoMode"), pydantic.Field(alias="autoMode") + ] = None + model: typing.Optional[ElevenLabsVoiceModel] = None + language: typing.Optional[str] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + pronunciation_dictionary_locators: typing_extensions.Annotated[ + typing.Optional[typing.List[ElevenLabsPronunciationDictionaryLocator]], + FieldMetadata(alias="pronunciationDictionaryLocators"), + pydantic.Field(alias="pronunciationDictionaryLocators"), + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowVoice_Hume(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["hume"] = "hume" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + model: typing.Optional[HumeVoiceModel] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + is_custom_hume_voice: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="isCustomHumeVoice"), pydantic.Field(alias="isCustomHumeVoice") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + description: typing.Optional[str] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowVoice_Lmnt(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["lmnt"] = "lmnt" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[LmntVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + speed: typing.Optional[float] = None + language: typing.Optional[LmntVoiceLanguage] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowVoice_Neuphonic(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["neuphonic"] = "neuphonic" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[NeuphonicVoiceModel] = None + language: typing.Dict[str, typing.Any] + speed: typing.Optional[float] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowVoice_Openai(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["openai"] = "openai" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + OpenAiVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[OpenAiVoiceModel] = None + instructions: typing.Optional[str] = None + speed: typing.Optional[float] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowVoice_Playht(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["playht"] = "playht" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + PlayHtVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + speed: typing.Optional[float] = None + temperature: typing.Optional[float] = None + emotion: typing.Optional[PlayHtVoiceEmotion] = None + voice_guidance: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="voiceGuidance"), pydantic.Field(alias="voiceGuidance") + ] = None + style_guidance: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="styleGuidance"), pydantic.Field(alias="styleGuidance") + ] = None + text_guidance: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="textGuidance"), pydantic.Field(alias="textGuidance") + ] = None + model: typing.Optional[PlayHtVoiceModel] = None + language: typing.Optional[PlayHtVoiceLanguage] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowVoice_Wellsaid(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["wellsaid"] = "wellsaid" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[WellSaidVoiceModel] = None + enable_ssml: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="enableSsml"), pydantic.Field(alias="enableSsml") + ] = None + library_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="libraryIds"), pydantic.Field(alias="libraryIds") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowVoice_RimeAi(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["rime-ai"] = "rime-ai" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + RimeAiVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[RimeAiVoiceModel] = None + speed: typing.Optional[float] = None + pause_between_brackets: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="pauseBetweenBrackets"), pydantic.Field(alias="pauseBetweenBrackets") + ] = None + phonemize_between_brackets: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="phonemizeBetweenBrackets"), + pydantic.Field(alias="phonemizeBetweenBrackets"), + ] = None + reduce_latency: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="reduceLatency"), pydantic.Field(alias="reduceLatency") + ] = None + inline_speed_alpha: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="inlineSpeedAlpha"), pydantic.Field(alias="inlineSpeedAlpha") + ] = None + language: typing.Optional[RimeAiVoiceLanguage] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowVoice_SmallestAi(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["smallest-ai"] = "smallest-ai" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + SmallestAiVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[SmallestAiVoiceModel] = None + speed: typing.Optional[float] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowVoice_Tavus(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["tavus"] = "tavus" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + TavusVoiceVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + persona_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="personaId"), pydantic.Field(alias="personaId") + ] = None + callback_url: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="callbackUrl"), pydantic.Field(alias="callbackUrl") + ] = None + conversation_name: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="conversationName"), pydantic.Field(alias="conversationName") + ] = None + conversational_context: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="conversationalContext"), + pydantic.Field(alias="conversationalContext"), + ] = None + custom_greeting: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="customGreeting"), pydantic.Field(alias="customGreeting") + ] = None + properties: typing.Optional[TavusConversationProperties] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowVoice_Vapi(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["vapi"] = "vapi" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + VapiVoiceVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + speed: typing.Optional[float] = None + pronunciation_dictionary: typing_extensions.Annotated[ + typing.Optional[typing.List[VapiPronunciationDictionaryLocator]], + FieldMetadata(alias="pronunciationDictionary"), + pydantic.Field(alias="pronunciationDictionary"), + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowVoice_Sesame(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["sesame"] = "sesame" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: SesameVoiceModel + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowVoice_Inworld(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["inworld"] = "inworld" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[ + InworldVoiceVoiceId, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId") + ] + model: typing.Optional[InworldVoiceModel] = None + language_code: typing_extensions.Annotated[ + typing.Optional[InworldVoiceLanguageCode], + FieldMetadata(alias="languageCode"), + pydantic.Field(alias="languageCode"), + ] = None + temperature: typing.Optional[float] = None + speaking_rate: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="speakingRate"), pydantic.Field(alias="speakingRate") + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowVoice_Minimax(UncheckedBaseModel): + """ + This is the voice for the workflow. + + This can be overridden at node level using `nodes[n].voice`. + """ + + provider: typing.Literal["minimax"] = "minimax" + caching_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="cachingEnabled"), pydantic.Field(alias="cachingEnabled") + ] = None + voice_id: typing_extensions.Annotated[str, FieldMetadata(alias="voiceId"), pydantic.Field(alias="voiceId")] + model: typing.Optional[MinimaxVoiceModel] = None + emotion: typing.Optional[str] = None + subtitle_type: typing_extensions.Annotated[ + typing.Optional[MinimaxVoiceSubtitleType], + FieldMetadata(alias="subtitleType"), + pydantic.Field(alias="subtitleType"), + ] = None + pitch: typing.Optional[float] = None + speed: typing.Optional[float] = None + volume: typing.Optional[float] = None + region: typing.Optional[MinimaxVoiceRegion] = None + language_boost: typing_extensions.Annotated[ + typing.Optional[MinimaxVoiceLanguageBoost], + FieldMetadata(alias="languageBoost"), + pydantic.Field(alias="languageBoost"), + ] = None + text_normalization_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="textNormalizationEnabled"), + pydantic.Field(alias="textNormalizationEnabled"), + ] = None + chunk_plan: typing_extensions.Annotated[ + typing.Optional[ChunkPlan], FieldMetadata(alias="chunkPlan"), pydantic.Field(alias="chunkPlan") + ] = None + fallback_plan: typing_extensions.Annotated[ + typing.Optional[FallbackPlan], FieldMetadata(alias="fallbackPlan"), pydantic.Field(alias="fallbackPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +WorkflowVoice = typing_extensions.Annotated[ + typing.Union[ + WorkflowVoice_Azure, + WorkflowVoice_Cartesia, + WorkflowVoice_CustomVoice, + WorkflowVoice_Deepgram, + WorkflowVoice_11Labs, + WorkflowVoice_Hume, + WorkflowVoice_Lmnt, + WorkflowVoice_Neuphonic, + WorkflowVoice_Openai, + WorkflowVoice_Playht, + WorkflowVoice_Wellsaid, + WorkflowVoice_RimeAi, + WorkflowVoice_SmallestAi, + WorkflowVoice_Tavus, + WorkflowVoice_Vapi, + WorkflowVoice_Sesame, + WorkflowVoice_Inworld, + WorkflowVoice_Minimax, + ], + UnionMetadata(discriminant="provider"), +] diff --git a/src/vapi/types/workflow_voicemail_detection.py b/src/vapi/types/workflow_voicemail_detection.py new file mode 100644 index 00000000..d193a648 --- /dev/null +++ b/src/vapi/types/workflow_voicemail_detection.py @@ -0,0 +1,17 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .google_voicemail_detection_plan import GoogleVoicemailDetectionPlan +from .open_ai_voicemail_detection_plan import OpenAiVoicemailDetectionPlan +from .twilio_voicemail_detection_plan import TwilioVoicemailDetectionPlan +from .vapi_voicemail_detection_plan import VapiVoicemailDetectionPlan +from .workflow_voicemail_detection_zero import WorkflowVoicemailDetectionZero + +WorkflowVoicemailDetection = typing.Union[ + WorkflowVoicemailDetectionZero, + GoogleVoicemailDetectionPlan, + OpenAiVoicemailDetectionPlan, + TwilioVoicemailDetectionPlan, + VapiVoicemailDetectionPlan, +] diff --git a/src/vapi/types/workflow_voicemail_detection_zero.py b/src/vapi/types/workflow_voicemail_detection_zero.py new file mode 100644 index 00000000..c63782ed --- /dev/null +++ b/src/vapi/types/workflow_voicemail_detection_zero.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +WorkflowVoicemailDetectionZero = typing.Union[typing.Literal["off"], typing.Any] diff --git a/src/vapi/types/x_ai_credential.py b/src/vapi/types/x_ai_credential.py new file mode 100644 index 00000000..a9fba9c7 --- /dev/null +++ b/src/vapi/types/x_ai_credential.py @@ -0,0 +1,64 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .x_ai_credential_provider import XAiCredentialProvider + + +class XAiCredential(UncheckedBaseModel): + provider: XAiCredentialProvider = pydantic.Field() + """ + This is the api key for Grok in XAi's console. Get it from here: https://console.x.ai + """ + + api_key: typing_extensions.Annotated[ + str, + FieldMetadata(alias="apiKey"), + pydantic.Field(alias="apiKey", description="This is not returned in the API."), + ] + id: str = pydantic.Field() + """ + This is the unique identifier for the credential. + """ + + org_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="orgId"), + pydantic.Field( + alias="orgId", description="This is the unique identifier for the org that this credential belongs to." + ), + ] + created_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="createdAt"), + pydantic.Field( + alias="createdAt", description="This is the ISO 8601 date-time string of when the credential was created." + ), + ] + updated_at: typing_extensions.Annotated[ + dt.datetime, + FieldMetadata(alias="updatedAt"), + pydantic.Field( + alias="updatedAt", + description="This is the ISO 8601 date-time string of when the assistant was last updated.", + ), + ] + name: typing.Optional[str] = pydantic.Field(default=None) + """ + This is the name of credential. This is just for your reference. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/x_ai_credential_provider.py b/src/vapi/types/x_ai_credential_provider.py new file mode 100644 index 00000000..551498c1 --- /dev/null +++ b/src/vapi/types/x_ai_credential_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +XAiCredentialProvider = typing.Union[typing.Literal["xai"], typing.Any] diff --git a/src/vapi/types/xai_model.py b/src/vapi/types/xai_model.py new file mode 100644 index 00000000..ce4cfeee --- /dev/null +++ b/src/vapi/types/xai_model.py @@ -0,0 +1,203 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .create_custom_knowledge_base_dto import CreateCustomKnowledgeBaseDto +from .open_ai_message import OpenAiMessage +from .xai_model_model import XaiModelModel + + +class XaiModel(UncheckedBaseModel): + messages: typing.Optional[typing.List[OpenAiMessage]] = pydantic.Field(default=None) + """ + This is the starting state for the conversation. + """ + + tools: typing.Optional[typing.List["XaiModelToolsItem"]] = pydantic.Field(default=None) + """ + These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`. + + Both `tools` and `toolIds` can be used together. + """ + + tool_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="toolIds"), + pydantic.Field( + alias="toolIds", + description="These are the tools that the assistant can use during the call. To use transient tools, use `tools`.\n\nBoth `tools` and `toolIds` can be used together.", + ), + ] = None + knowledge_base: typing_extensions.Annotated[ + typing.Optional[CreateCustomKnowledgeBaseDto], + FieldMetadata(alias="knowledgeBase"), + pydantic.Field(alias="knowledgeBase", description="These are the options for the knowledge base."), + ] = None + model: XaiModelModel = pydantic.Field() + """ + This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b + """ + + temperature: typing.Optional[float] = pydantic.Field(default=None) + """ + This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency. + """ + + max_tokens: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="maxTokens"), + pydantic.Field( + alias="maxTokens", + description="This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.", + ), + ] = None + emotion_recognition_enabled: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="emotionRecognitionEnabled"), + pydantic.Field( + alias="emotionRecognitionEnabled", + description="This determines whether we detect user's emotion while they speak and send it as an additional info to model.\n\nDefault `false` because the model is usually are good at understanding the user's emotion from text.\n\n@default false", + ), + ] = None + num_fast_turns: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="numFastTurns"), + pydantic.Field( + alias="numFastTurns", + description="This sets how many turns at the start of the conversation to use a smaller, faster model from the same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai.\n\nDefault is 0.\n\n@default 0", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto import CreateHandoffToolDto # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model_tools_item import XaiModelToolsItem # noqa: E402, I001 + +update_forward_refs( + XaiModel, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDto=CreateHandoffToolDto, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModelToolsItem=XaiModelToolsItem, +) diff --git a/src/vapi/types/xai_model_model.py b/src/vapi/types/xai_model_model.py new file mode 100644 index 00000000..cfb78c6f --- /dev/null +++ b/src/vapi/types/xai_model_model.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +XaiModelModel = typing.Union[ + typing.Literal["grok-beta", "grok-2", "grok-3", "grok-4-fast-reasoning", "grok-4-fast-non-reasoning"], typing.Any +] diff --git a/src/vapi/types/xai_model_tools_item.py b/src/vapi/types/xai_model_tools_item.py new file mode 100644 index 00000000..370fa5dc --- /dev/null +++ b/src/vapi/types/xai_model_tools_item.py @@ -0,0 +1,731 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata +from .backoff_plan import BackoffPlan +from .code_tool_environment_variable import CodeToolEnvironmentVariable +from .create_api_request_tool_dto_messages_item import CreateApiRequestToolDtoMessagesItem +from .create_api_request_tool_dto_method import CreateApiRequestToolDtoMethod +from .create_bash_tool_dto_messages_item import CreateBashToolDtoMessagesItem +from .create_bash_tool_dto_name import CreateBashToolDtoName +from .create_bash_tool_dto_sub_type import CreateBashToolDtoSubType +from .create_code_tool_dto_messages_item import CreateCodeToolDtoMessagesItem +from .create_computer_tool_dto_messages_item import CreateComputerToolDtoMessagesItem +from .create_computer_tool_dto_name import CreateComputerToolDtoName +from .create_computer_tool_dto_sub_type import CreateComputerToolDtoSubType +from .create_dtmf_tool_dto_messages_item import CreateDtmfToolDtoMessagesItem +from .create_end_call_tool_dto_messages_item import CreateEndCallToolDtoMessagesItem +from .create_function_tool_dto_messages_item import CreateFunctionToolDtoMessagesItem +from .create_go_high_level_calendar_availability_tool_dto_messages_item import ( + CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem, +) +from .create_go_high_level_calendar_event_create_tool_dto_messages_item import ( + CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_create_tool_dto_messages_item import ( + CreateGoHighLevelContactCreateToolDtoMessagesItem, +) +from .create_go_high_level_contact_get_tool_dto_messages_item import CreateGoHighLevelContactGetToolDtoMessagesItem +from .create_google_calendar_check_availability_tool_dto_messages_item import ( + CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem, +) +from .create_google_calendar_create_event_tool_dto_messages_item import ( + CreateGoogleCalendarCreateEventToolDtoMessagesItem, +) +from .create_google_sheets_row_append_tool_dto_messages_item import CreateGoogleSheetsRowAppendToolDtoMessagesItem +from .create_handoff_tool_dto_messages_item import CreateHandoffToolDtoMessagesItem +from .create_mcp_tool_dto_messages_item import CreateMcpToolDtoMessagesItem +from .create_query_tool_dto_messages_item import CreateQueryToolDtoMessagesItem +from .create_sip_request_tool_dto_body import CreateSipRequestToolDtoBody +from .create_sip_request_tool_dto_messages_item import CreateSipRequestToolDtoMessagesItem +from .create_sip_request_tool_dto_verb import CreateSipRequestToolDtoVerb +from .create_slack_send_message_tool_dto_messages_item import CreateSlackSendMessageToolDtoMessagesItem +from .create_sms_tool_dto_messages_item import CreateSmsToolDtoMessagesItem +from .create_text_editor_tool_dto_messages_item import CreateTextEditorToolDtoMessagesItem +from .create_text_editor_tool_dto_name import CreateTextEditorToolDtoName +from .create_text_editor_tool_dto_sub_type import CreateTextEditorToolDtoSubType +from .create_transfer_call_tool_dto_destinations_item import CreateTransferCallToolDtoDestinationsItem +from .create_transfer_call_tool_dto_messages_item import CreateTransferCallToolDtoMessagesItem +from .create_voicemail_tool_dto_messages_item import CreateVoicemailToolDtoMessagesItem +from .knowledge_base import KnowledgeBase +from .mcp_tool_messages import McpToolMessages +from .mcp_tool_metadata import McpToolMetadata +from .open_ai_function import OpenAiFunction +from .server import Server +from .tool_parameter import ToolParameter +from .tool_rejection_plan import ToolRejectionPlan +from .variable_extraction_plan import VariableExtractionPlan + + +class XaiModelToolsItem_ApiRequest(UncheckedBaseModel): + type: typing.Literal["apiRequest"] = "apiRequest" + messages: typing.Optional[typing.List[CreateApiRequestToolDtoMessagesItem]] = None + method: CreateApiRequestToolDtoMethod + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + encrypted_paths: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="encryptedPaths"), pydantic.Field(alias="encryptedPaths") + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + name: typing.Optional[str] = None + description: typing.Optional[str] = None + url: str + body: typing.Optional["JsonSchema"] = None + headers: typing.Optional["JsonSchema"] = None + backoff_plan: typing_extensions.Annotated[ + typing.Optional[BackoffPlan], FieldMetadata(alias="backoffPlan"), pydantic.Field(alias="backoffPlan") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class XaiModelToolsItem_Bash(UncheckedBaseModel): + type: typing.Literal["bash"] = "bash" + messages: typing.Optional[typing.List[CreateBashToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateBashToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateBashToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class XaiModelToolsItem_Code(UncheckedBaseModel): + type: typing.Literal["code"] = "code" + messages: typing.Optional[typing.List[CreateCodeToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + code: str + environment_variables: typing_extensions.Annotated[ + typing.Optional[typing.List[CodeToolEnvironmentVariable]], + FieldMetadata(alias="environmentVariables"), + pydantic.Field(alias="environmentVariables"), + ] = None + timeout_seconds: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="timeoutSeconds"), pydantic.Field(alias="timeoutSeconds") + ] = None + credential_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="credentialId"), pydantic.Field(alias="credentialId") + ] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class XaiModelToolsItem_Computer(UncheckedBaseModel): + type: typing.Literal["computer"] = "computer" + messages: typing.Optional[typing.List[CreateComputerToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateComputerToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateComputerToolDtoName + display_width_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayWidthPx"), pydantic.Field(alias="displayWidthPx") + ] + display_height_px: typing_extensions.Annotated[ + float, FieldMetadata(alias="displayHeightPx"), pydantic.Field(alias="displayHeightPx") + ] + display_number: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="displayNumber"), pydantic.Field(alias="displayNumber") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class XaiModelToolsItem_Dtmf(UncheckedBaseModel): + type: typing.Literal["dtmf"] = "dtmf" + messages: typing.Optional[typing.List[CreateDtmfToolDtoMessagesItem]] = None + sip_info_dtmf_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="sipInfoDtmfEnabled"), pydantic.Field(alias="sipInfoDtmfEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class XaiModelToolsItem_EndCall(UncheckedBaseModel): + type: typing.Literal["endCall"] = "endCall" + messages: typing.Optional[typing.List[CreateEndCallToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class XaiModelToolsItem_Function(UncheckedBaseModel): + type: typing.Literal["function"] = "function" + messages: typing.Optional[typing.List[CreateFunctionToolDtoMessagesItem]] = None + async_: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="async"), pydantic.Field(alias="async") + ] = None + server: typing.Optional[Server] = None + variable_extraction_plan: typing_extensions.Annotated[ + typing.Optional[VariableExtractionPlan], + FieldMetadata(alias="variableExtractionPlan"), + pydantic.Field(alias="variableExtractionPlan"), + ] = None + parameters: typing.Optional[typing.List[ToolParameter]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class XaiModelToolsItem_GohighlevelCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.availability.check"] = "gohighlevel.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class XaiModelToolsItem_GohighlevelCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.calendar.event.create"] = "gohighlevel.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class XaiModelToolsItem_GohighlevelContactCreate(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.create"] = "gohighlevel.contact.create" + messages: typing.Optional[typing.List[CreateGoHighLevelContactCreateToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class XaiModelToolsItem_GohighlevelContactGet(UncheckedBaseModel): + type: typing.Literal["gohighlevel.contact.get"] = "gohighlevel.contact.get" + messages: typing.Optional[typing.List[CreateGoHighLevelContactGetToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class XaiModelToolsItem_GoogleCalendarAvailabilityCheck(UncheckedBaseModel): + type: typing.Literal["google.calendar.availability.check"] = "google.calendar.availability.check" + messages: typing.Optional[typing.List[CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class XaiModelToolsItem_GoogleCalendarEventCreate(UncheckedBaseModel): + type: typing.Literal["google.calendar.event.create"] = "google.calendar.event.create" + messages: typing.Optional[typing.List[CreateGoogleCalendarCreateEventToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class XaiModelToolsItem_GoogleSheetsRowAppend(UncheckedBaseModel): + type: typing.Literal["google.sheets.row.append"] = "google.sheets.row.append" + messages: typing.Optional[typing.List[CreateGoogleSheetsRowAppendToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class XaiModelToolsItem_Handoff(UncheckedBaseModel): + type: typing.Literal["handoff"] = "handoff" + messages: typing.Optional[typing.List[CreateHandoffToolDtoMessagesItem]] = None + default_result: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="defaultResult"), pydantic.Field(alias="defaultResult") + ] = None + destinations: typing.Optional[typing.List["CreateHandoffToolDtoDestinationsItem"]] = None + function: typing.Optional[OpenAiFunction] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class XaiModelToolsItem_Mcp(UncheckedBaseModel): + type: typing.Literal["mcp"] = "mcp" + messages: typing.Optional[typing.List[CreateMcpToolDtoMessagesItem]] = None + server: typing.Optional[Server] = None + tool_messages: typing_extensions.Annotated[ + typing.Optional[typing.List[McpToolMessages]], + FieldMetadata(alias="toolMessages"), + pydantic.Field(alias="toolMessages"), + ] = None + metadata: typing.Optional[McpToolMetadata] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class XaiModelToolsItem_Query(UncheckedBaseModel): + type: typing.Literal["query"] = "query" + messages: typing.Optional[typing.List[CreateQueryToolDtoMessagesItem]] = None + knowledge_bases: typing_extensions.Annotated[ + typing.Optional[typing.List[KnowledgeBase]], + FieldMetadata(alias="knowledgeBases"), + pydantic.Field(alias="knowledgeBases"), + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class XaiModelToolsItem_SlackMessageSend(UncheckedBaseModel): + type: typing.Literal["slack.message.send"] = "slack.message.send" + messages: typing.Optional[typing.List[CreateSlackSendMessageToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class XaiModelToolsItem_Sms(UncheckedBaseModel): + type: typing.Literal["sms"] = "sms" + messages: typing.Optional[typing.List[CreateSmsToolDtoMessagesItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class XaiModelToolsItem_TextEditor(UncheckedBaseModel): + type: typing.Literal["textEditor"] = "textEditor" + messages: typing.Optional[typing.List[CreateTextEditorToolDtoMessagesItem]] = None + sub_type: typing_extensions.Annotated[ + CreateTextEditorToolDtoSubType, FieldMetadata(alias="subType"), pydantic.Field(alias="subType") + ] + server: typing.Optional[Server] = None + name: CreateTextEditorToolDtoName + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class XaiModelToolsItem_TransferCall(UncheckedBaseModel): + type: typing.Literal["transferCall"] = "transferCall" + messages: typing.Optional[typing.List[CreateTransferCallToolDtoMessagesItem]] = None + destinations: typing.Optional[typing.List[CreateTransferCallToolDtoDestinationsItem]] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class XaiModelToolsItem_SipRequest(UncheckedBaseModel): + type: typing.Literal["sipRequest"] = "sipRequest" + messages: typing.Optional[typing.List[CreateSipRequestToolDtoMessagesItem]] = None + verb: CreateSipRequestToolDtoVerb + headers: typing.Optional["JsonSchema"] = None + body: typing.Optional[CreateSipRequestToolDtoBody] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class XaiModelToolsItem_Voicemail(UncheckedBaseModel): + type: typing.Literal["voicemail"] = "voicemail" + messages: typing.Optional[typing.List[CreateVoicemailToolDtoMessagesItem]] = None + beep_detection_enabled: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="beepDetectionEnabled"), pydantic.Field(alias="beepDetectionEnabled") + ] = None + rejection_plan: typing_extensions.Annotated[ + typing.Optional[ToolRejectionPlan], FieldMetadata(alias="rejectionPlan"), pydantic.Field(alias="rejectionPlan") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +XaiModelToolsItem = typing_extensions.Annotated[ + typing.Union[ + XaiModelToolsItem_ApiRequest, + XaiModelToolsItem_Bash, + XaiModelToolsItem_Code, + XaiModelToolsItem_Computer, + XaiModelToolsItem_Dtmf, + XaiModelToolsItem_EndCall, + XaiModelToolsItem_Function, + XaiModelToolsItem_GohighlevelCalendarAvailabilityCheck, + XaiModelToolsItem_GohighlevelCalendarEventCreate, + XaiModelToolsItem_GohighlevelContactCreate, + XaiModelToolsItem_GohighlevelContactGet, + XaiModelToolsItem_GoogleCalendarAvailabilityCheck, + XaiModelToolsItem_GoogleCalendarEventCreate, + XaiModelToolsItem_GoogleSheetsRowAppend, + XaiModelToolsItem_Handoff, + XaiModelToolsItem_Mcp, + XaiModelToolsItem_Query, + XaiModelToolsItem_SlackMessageSend, + XaiModelToolsItem_Sms, + XaiModelToolsItem_TextEditor, + XaiModelToolsItem_TransferCall, + XaiModelToolsItem_SipRequest, + XaiModelToolsItem_Voicemail, + ], + UnionMetadata(discriminant="type"), +] +from .json_schema import JsonSchema # noqa: E402, I001 +from .anthropic_bedrock_model import AnthropicBedrockModel # noqa: E402, I001 +from .anthropic_bedrock_model_tools_item import AnthropicBedrockModelToolsItem # noqa: E402, I001 +from .anthropic_model import AnthropicModel # noqa: E402, I001 +from .anthropic_model_tools_item import AnthropicModelToolsItem # noqa: E402, I001 +from .anyscale_model import AnyscaleModel # noqa: E402, I001 +from .anyscale_model_tools_item import AnyscaleModelToolsItem # noqa: E402, I001 +from .assistant_overrides import AssistantOverrides # noqa: E402, I001 +from .assistant_overrides_hooks_item import AssistantOverridesHooksItem # noqa: E402, I001 +from .assistant_overrides_model import AssistantOverridesModel # noqa: E402, I001 +from .assistant_overrides_tools_append_item import AssistantOverridesToolsAppendItem # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted import CallHookAssistantSpeechInterrupted # noqa: E402, I001 +from .call_hook_assistant_speech_interrupted_do_item import CallHookAssistantSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_call_ending import CallHookCallEnding # noqa: E402, I001 +from .call_hook_call_ending_do_item import CallHookCallEndingDoItem # noqa: E402, I001 +from .call_hook_customer_speech_interrupted import CallHookCustomerSpeechInterrupted # noqa: E402, I001 +from .call_hook_customer_speech_interrupted_do_item import CallHookCustomerSpeechInterruptedDoItem # noqa: E402, I001 +from .call_hook_customer_speech_timeout import CallHookCustomerSpeechTimeout # noqa: E402, I001 +from .call_hook_customer_speech_timeout_do_item import CallHookCustomerSpeechTimeoutDoItem # noqa: E402, I001 +from .cerebras_model import CerebrasModel # noqa: E402, I001 +from .cerebras_model_tools_item import CerebrasModelToolsItem # noqa: E402, I001 +from .create_assistant_dto import CreateAssistantDto # noqa: E402, I001 +from .create_assistant_dto_hooks_item import CreateAssistantDtoHooksItem # noqa: E402, I001 +from .create_assistant_dto_model import CreateAssistantDtoModel # noqa: E402, I001 +from .create_handoff_tool_dto_destinations_item import CreateHandoffToolDtoDestinationsItem # noqa: E402, I001 +from .create_squad_dto import CreateSquadDto # noqa: E402, I001 +from .custom_llm_model import CustomLlmModel # noqa: E402, I001 +from .custom_llm_model_tools_item import CustomLlmModelToolsItem # noqa: E402, I001 +from .deep_infra_model import DeepInfraModel # noqa: E402, I001 +from .deep_infra_model_tools_item import DeepInfraModelToolsItem # noqa: E402, I001 +from .deep_seek_model import DeepSeekModel # noqa: E402, I001 +from .deep_seek_model_tools_item import DeepSeekModelToolsItem # noqa: E402, I001 +from .google_model import GoogleModel # noqa: E402, I001 +from .google_model_tools_item import GoogleModelToolsItem # noqa: E402, I001 +from .groq_model import GroqModel # noqa: E402, I001 +from .groq_model_tools_item import GroqModelToolsItem # noqa: E402, I001 +from .handoff_destination_assistant import HandoffDestinationAssistant # noqa: E402, I001 +from .handoff_destination_squad import HandoffDestinationSquad # noqa: E402, I001 +from .inflection_ai_model import InflectionAiModel # noqa: E402, I001 +from .inflection_ai_model_tools_item import InflectionAiModelToolsItem # noqa: E402, I001 +from .minimax_llm_model import MinimaxLlmModel # noqa: E402, I001 +from .minimax_llm_model_tools_item import MinimaxLlmModelToolsItem # noqa: E402, I001 +from .open_ai_model import OpenAiModel # noqa: E402, I001 +from .open_ai_model_tools_item import OpenAiModelToolsItem # noqa: E402, I001 +from .open_router_model import OpenRouterModel # noqa: E402, I001 +from .open_router_model_tools_item import OpenRouterModelToolsItem # noqa: E402, I001 +from .perplexity_ai_model import PerplexityAiModel # noqa: E402, I001 +from .perplexity_ai_model_tools_item import PerplexityAiModelToolsItem # noqa: E402, I001 +from .session_created_hook import SessionCreatedHook # noqa: E402, I001 +from .squad_member_dto import SquadMemberDto # noqa: E402, I001 +from .squad_member_dto_assistant_destinations_item import SquadMemberDtoAssistantDestinationsItem # noqa: E402, I001 +from .together_ai_model import TogetherAiModel # noqa: E402, I001 +from .together_ai_model_tools_item import TogetherAiModelToolsItem # noqa: E402, I001 +from .tool_call_hook_action import ToolCallHookAction # noqa: E402, I001 +from .tool_call_hook_action_tool import ToolCallHookActionTool # noqa: E402, I001 +from .xai_model import XaiModel # noqa: E402, I001 + +update_forward_refs(XaiModelToolsItem_ApiRequest, JsonSchema=JsonSchema) +update_forward_refs(XaiModelToolsItem_Bash) +update_forward_refs(XaiModelToolsItem_Code) +update_forward_refs(XaiModelToolsItem_Computer) +update_forward_refs(XaiModelToolsItem_Dtmf) +update_forward_refs(XaiModelToolsItem_EndCall) +update_forward_refs(XaiModelToolsItem_Function) +update_forward_refs(XaiModelToolsItem_GohighlevelCalendarAvailabilityCheck) +update_forward_refs(XaiModelToolsItem_GohighlevelCalendarEventCreate) +update_forward_refs(XaiModelToolsItem_GohighlevelContactCreate) +update_forward_refs(XaiModelToolsItem_GohighlevelContactGet) +update_forward_refs(XaiModelToolsItem_GoogleCalendarAvailabilityCheck) +update_forward_refs(XaiModelToolsItem_GoogleCalendarEventCreate) +update_forward_refs(XaiModelToolsItem_GoogleSheetsRowAppend) +update_forward_refs( + XaiModelToolsItem_Handoff, + AnthropicBedrockModel=AnthropicBedrockModel, + AnthropicBedrockModelToolsItem=AnthropicBedrockModelToolsItem, + AnthropicModel=AnthropicModel, + AnthropicModelToolsItem=AnthropicModelToolsItem, + AnyscaleModel=AnyscaleModel, + AnyscaleModelToolsItem=AnyscaleModelToolsItem, + AssistantOverrides=AssistantOverrides, + AssistantOverridesHooksItem=AssistantOverridesHooksItem, + AssistantOverridesModel=AssistantOverridesModel, + AssistantOverridesToolsAppendItem=AssistantOverridesToolsAppendItem, + CallHookAssistantSpeechInterrupted=CallHookAssistantSpeechInterrupted, + CallHookAssistantSpeechInterruptedDoItem=CallHookAssistantSpeechInterruptedDoItem, + CallHookCallEnding=CallHookCallEnding, + CallHookCallEndingDoItem=CallHookCallEndingDoItem, + CallHookCustomerSpeechInterrupted=CallHookCustomerSpeechInterrupted, + CallHookCustomerSpeechInterruptedDoItem=CallHookCustomerSpeechInterruptedDoItem, + CallHookCustomerSpeechTimeout=CallHookCustomerSpeechTimeout, + CallHookCustomerSpeechTimeoutDoItem=CallHookCustomerSpeechTimeoutDoItem, + CerebrasModel=CerebrasModel, + CerebrasModelToolsItem=CerebrasModelToolsItem, + CreateAssistantDto=CreateAssistantDto, + CreateAssistantDtoHooksItem=CreateAssistantDtoHooksItem, + CreateAssistantDtoModel=CreateAssistantDtoModel, + CreateHandoffToolDtoDestinationsItem=CreateHandoffToolDtoDestinationsItem, + CreateSquadDto=CreateSquadDto, + CustomLlmModel=CustomLlmModel, + CustomLlmModelToolsItem=CustomLlmModelToolsItem, + DeepInfraModel=DeepInfraModel, + DeepInfraModelToolsItem=DeepInfraModelToolsItem, + DeepSeekModel=DeepSeekModel, + DeepSeekModelToolsItem=DeepSeekModelToolsItem, + GoogleModel=GoogleModel, + GoogleModelToolsItem=GoogleModelToolsItem, + GroqModel=GroqModel, + GroqModelToolsItem=GroqModelToolsItem, + HandoffDestinationAssistant=HandoffDestinationAssistant, + HandoffDestinationSquad=HandoffDestinationSquad, + InflectionAiModel=InflectionAiModel, + InflectionAiModelToolsItem=InflectionAiModelToolsItem, + MinimaxLlmModel=MinimaxLlmModel, + MinimaxLlmModelToolsItem=MinimaxLlmModelToolsItem, + OpenAiModel=OpenAiModel, + OpenAiModelToolsItem=OpenAiModelToolsItem, + OpenRouterModel=OpenRouterModel, + OpenRouterModelToolsItem=OpenRouterModelToolsItem, + PerplexityAiModel=PerplexityAiModel, + PerplexityAiModelToolsItem=PerplexityAiModelToolsItem, + SessionCreatedHook=SessionCreatedHook, + SquadMemberDto=SquadMemberDto, + SquadMemberDtoAssistantDestinationsItem=SquadMemberDtoAssistantDestinationsItem, + TogetherAiModel=TogetherAiModel, + TogetherAiModelToolsItem=TogetherAiModelToolsItem, + ToolCallHookAction=ToolCallHookAction, + ToolCallHookActionTool=ToolCallHookActionTool, + XaiModel=XaiModel, + XaiModelToolsItem=XaiModelToolsItem, +) +update_forward_refs(XaiModelToolsItem_Mcp) +update_forward_refs(XaiModelToolsItem_Query) +update_forward_refs(XaiModelToolsItem_SlackMessageSend) +update_forward_refs(XaiModelToolsItem_Sms) +update_forward_refs(XaiModelToolsItem_TextEditor) +update_forward_refs(XaiModelToolsItem_TransferCall) +update_forward_refs(XaiModelToolsItem_SipRequest, JsonSchema=JsonSchema) +update_forward_refs(XaiModelToolsItem_Voicemail) diff --git a/src/vapi/types/xss_security_filter.py b/src/vapi/types/xss_security_filter.py new file mode 100644 index 00000000..82644a94 --- /dev/null +++ b/src/vapi/types/xss_security_filter.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .xss_security_filter_type import XssSecurityFilterType + + +class XssSecurityFilter(UncheckedBaseModel): + type: XssSecurityFilterType = pydantic.Field() + """ + The type of security threat to filter. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/vapi/types/xss_security_filter_type.py b/src/vapi/types/xss_security_filter_type.py new file mode 100644 index 00000000..fca1e290 --- /dev/null +++ b/src/vapi/types/xss_security_filter_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +XssSecurityFilterType = typing.Union[typing.Literal["xss"], typing.Any] diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 00000000..25710dbe --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1,21 @@ +import pytest + + +def _has_httpx_aiohttp() -> bool: + """Check if httpx_aiohttp is importable.""" + try: + import httpx_aiohttp # type: ignore[import-not-found] # noqa: F401 + + return True + except ImportError: + return False + + +def pytest_collection_modifyitems(config: pytest.Config, items: list) -> None: + """Auto-skip @pytest.mark.aiohttp tests when httpx_aiohttp is not installed.""" + if _has_httpx_aiohttp(): + return + skip_aiohttp = pytest.mark.skip(reason="httpx_aiohttp not installed") + for item in items: + if "aiohttp" in item.keywords: + item.add_marker(skip_aiohttp) diff --git a/tests/custom/test_client.py b/tests/custom/test_client.py index 73f811f5..ab04ce63 100644 --- a/tests/custom/test_client.py +++ b/tests/custom/test_client.py @@ -4,4 +4,4 @@ # Get started with writing tests with pytest at https://docs.pytest.org @pytest.mark.skip(reason="Unimplemented") def test_client() -> None: - assert True == True + assert True diff --git a/tests/test_aiohttp_autodetect.py b/tests/test_aiohttp_autodetect.py new file mode 100644 index 00000000..293bcd07 --- /dev/null +++ b/tests/test_aiohttp_autodetect.py @@ -0,0 +1,116 @@ +import importlib +import sys +import unittest +from unittest import mock + +import httpx +import pytest + + +class TestMakeDefaultAsyncClientWithoutAiohttp(unittest.TestCase): + """Tests for _make_default_async_client when httpx_aiohttp is NOT installed.""" + + def test_returns_httpx_async_client(self) -> None: + """When httpx_aiohttp is not installed, returns plain httpx.AsyncClient.""" + with mock.patch.dict(sys.modules, {"httpx_aiohttp": None}): + from vapi.client import _make_default_async_client + + client = _make_default_async_client(timeout=60, follow_redirects=True) + self.assertIsInstance(client, httpx.AsyncClient) + self.assertEqual(client.timeout.read, 60) + self.assertTrue(client.follow_redirects) + + def test_follow_redirects_none(self) -> None: + """When follow_redirects is None, omits it from httpx.AsyncClient.""" + with mock.patch.dict(sys.modules, {"httpx_aiohttp": None}): + from vapi.client import _make_default_async_client + + client = _make_default_async_client(timeout=60, follow_redirects=None) + self.assertIsInstance(client, httpx.AsyncClient) + self.assertFalse(client.follow_redirects) + + def test_explicit_httpx_client_bypasses_autodetect(self) -> None: + """When user passes httpx_client explicitly, _make_default_async_client is not called.""" + + explicit_client = httpx.AsyncClient(timeout=120) + with mock.patch("vapi.client._make_default_async_client") as mock_make: + # Replicate the generated conditional: httpx_client if httpx_client is not None else _make_default_async_client(...) + result = explicit_client if explicit_client is not None else mock_make(timeout=60, follow_redirects=True) + mock_make.assert_not_called() + self.assertIs(result, explicit_client) + + +@pytest.mark.aiohttp +class TestMakeDefaultAsyncClientWithAiohttp(unittest.TestCase): + """Tests for _make_default_async_client when httpx_aiohttp IS installed.""" + + def test_returns_aiohttp_client(self) -> None: + """When httpx_aiohttp is installed, returns HttpxAiohttpClient.""" + import httpx_aiohttp # type: ignore[import-not-found] + + from vapi.client import _make_default_async_client + + client = _make_default_async_client(timeout=60, follow_redirects=True) + self.assertIsInstance(client, httpx_aiohttp.HttpxAiohttpClient) + self.assertEqual(client.timeout.read, 60) + self.assertTrue(client.follow_redirects) + + def test_follow_redirects_none(self) -> None: + """When httpx_aiohttp is installed and follow_redirects is None, omits it.""" + import httpx_aiohttp # type: ignore[import-not-found] + + from vapi.client import _make_default_async_client + + client = _make_default_async_client(timeout=60, follow_redirects=None) + self.assertIsInstance(client, httpx_aiohttp.HttpxAiohttpClient) + self.assertFalse(client.follow_redirects) + + +class TestDefaultClientsWithoutAiohttp(unittest.TestCase): + """Tests for _default_clients.py convenience classes (no aiohttp).""" + + def test_default_async_httpx_client_defaults(self) -> None: + """DefaultAsyncHttpxClient applies SDK defaults.""" + from vapi._default_clients import SDK_DEFAULT_TIMEOUT, DefaultAsyncHttpxClient + + client = DefaultAsyncHttpxClient() + self.assertIsInstance(client, httpx.AsyncClient) + self.assertEqual(client.timeout.read, SDK_DEFAULT_TIMEOUT) + self.assertTrue(client.follow_redirects) + + def test_default_async_httpx_client_overrides(self) -> None: + """DefaultAsyncHttpxClient allows overriding defaults.""" + from vapi._default_clients import DefaultAsyncHttpxClient + + client = DefaultAsyncHttpxClient(timeout=30, follow_redirects=False) + self.assertEqual(client.timeout.read, 30) + self.assertFalse(client.follow_redirects) + + def test_default_aiohttp_client_raises_without_package(self) -> None: + """DefaultAioHttpClient raises RuntimeError when httpx_aiohttp not installed.""" + import vapi._default_clients + + with mock.patch.dict(sys.modules, {"httpx_aiohttp": None}): + importlib.reload(vapi._default_clients) + + with self.assertRaises(RuntimeError) as ctx: + vapi._default_clients.DefaultAioHttpClient() + self.assertIn("pip install vapi_server_sdk[aiohttp]", str(ctx.exception)) + + importlib.reload(vapi._default_clients) + + +@pytest.mark.aiohttp +class TestDefaultClientsWithAiohttp(unittest.TestCase): + """Tests for _default_clients.py when httpx_aiohttp IS installed.""" + + def test_default_aiohttp_client_defaults(self) -> None: + """DefaultAioHttpClient works when httpx_aiohttp is installed.""" + import httpx_aiohttp # type: ignore[import-not-found] + + from vapi._default_clients import SDK_DEFAULT_TIMEOUT, DefaultAioHttpClient + + client = DefaultAioHttpClient() + self.assertIsInstance(client, httpx_aiohttp.HttpxAiohttpClient) + self.assertEqual(client.timeout.read, SDK_DEFAULT_TIMEOUT) + self.assertTrue(client.follow_redirects) diff --git a/tests/utils/assets/models/__init__.py b/tests/utils/assets/models/__init__.py index 3a1c852e..2cf01263 100644 --- a/tests/utils/assets/models/__init__.py +++ b/tests/utils/assets/models/__init__.py @@ -5,7 +5,7 @@ from .circle import CircleParams from .object_with_defaults import ObjectWithDefaultsParams from .object_with_optional_field import ObjectWithOptionalFieldParams -from .shape import ShapeParams, Shape_CircleParams, Shape_SquareParams +from .shape import Shape_CircleParams, Shape_SquareParams, ShapeParams from .square import SquareParams from .undiscriminated_shape import UndiscriminatedShapeParams diff --git a/tests/utils/assets/models/circle.py b/tests/utils/assets/models/circle.py index b664b081..3dcfee12 100644 --- a/tests/utils/assets/models/circle.py +++ b/tests/utils/assets/models/circle.py @@ -3,7 +3,7 @@ # This file was auto-generated by Fern from our API Definition. import typing_extensions -import typing_extensions + from vapi.core.serialization import FieldMetadata diff --git a/tests/utils/assets/models/object_with_defaults.py b/tests/utils/assets/models/object_with_defaults.py index ef14f7b2..a977b1d2 100644 --- a/tests/utils/assets/models/object_with_defaults.py +++ b/tests/utils/assets/models/object_with_defaults.py @@ -3,7 +3,6 @@ # This file was auto-generated by Fern from our API Definition. import typing_extensions -import typing_extensions class ObjectWithDefaultsParams(typing_extensions.TypedDict): diff --git a/tests/utils/assets/models/object_with_optional_field.py b/tests/utils/assets/models/object_with_optional_field.py index b374f5b8..a3518430 100644 --- a/tests/utils/assets/models/object_with_optional_field.py +++ b/tests/utils/assets/models/object_with_optional_field.py @@ -2,16 +2,17 @@ # This file was auto-generated by Fern from our API Definition. -import typing_extensions -import typing -import typing_extensions -from vapi.core.serialization import FieldMetadata import datetime as dt +import typing import uuid + +import typing_extensions from .color import Color from .shape import ShapeParams from .undiscriminated_shape import UndiscriminatedShapeParams +from vapi.core.serialization import FieldMetadata + class ObjectWithOptionalFieldParams(typing_extensions.TypedDict): literal: typing.Literal["lit_one"] diff --git a/tests/utils/assets/models/shape.py b/tests/utils/assets/models/shape.py index 18c9c33f..431c1018 100644 --- a/tests/utils/assets/models/shape.py +++ b/tests/utils/assets/models/shape.py @@ -3,9 +3,11 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -import typing_extensions -import typing_extensions + import typing + +import typing_extensions + from vapi.core.serialization import FieldMetadata diff --git a/tests/utils/assets/models/square.py b/tests/utils/assets/models/square.py index c0e7aac1..58ecc3ae 100644 --- a/tests/utils/assets/models/square.py +++ b/tests/utils/assets/models/square.py @@ -3,7 +3,7 @@ # This file was auto-generated by Fern from our API Definition. import typing_extensions -import typing_extensions + from vapi.core.serialization import FieldMetadata diff --git a/tests/utils/assets/models/undiscriminated_shape.py b/tests/utils/assets/models/undiscriminated_shape.py index 68876a23..99f12b30 100644 --- a/tests/utils/assets/models/undiscriminated_shape.py +++ b/tests/utils/assets/models/undiscriminated_shape.py @@ -3,6 +3,7 @@ # This file was auto-generated by Fern from our API Definition. import typing + from .circle import CircleParams from .square import SquareParams diff --git a/tests/utils/test_http_client.py b/tests/utils/test_http_client.py index 21cc9d69..3095bc6a 100644 --- a/tests/utils/test_http_client.py +++ b/tests/utils/test_http_client.py @@ -1,13 +1,59 @@ # This file was auto-generated by Fern from our API Definition. -from vapi.core.http_client import get_request_body +from typing import Any, Dict +from unittest.mock import AsyncMock, MagicMock, patch + +import httpx +import pytest + +from vapi.core.http_client import ( + AsyncHttpClient, + HttpClient, + _build_url, + get_request_body, + remove_none_from_dict, +) from vapi.core.request_options import RequestOptions +# Stub clients for testing HttpClient and AsyncHttpClient +class _DummySyncClient: + """A minimal stub for httpx.Client that records request arguments.""" + + def __init__(self) -> None: + self.last_request_kwargs: Dict[str, Any] = {} + + def request(self, **kwargs: Any) -> "_DummyResponse": + self.last_request_kwargs = kwargs + return _DummyResponse() + + +class _DummyAsyncClient: + """A minimal stub for httpx.AsyncClient that records request arguments.""" + + def __init__(self) -> None: + self.last_request_kwargs: Dict[str, Any] = {} + + async def request(self, **kwargs: Any) -> "_DummyResponse": + self.last_request_kwargs = kwargs + return _DummyResponse() + + +class _DummyResponse: + """A minimal stub for httpx.Response.""" + + status_code = 200 + headers: Dict[str, str] = {} + + def get_request_options() -> RequestOptions: return {"additional_body_parameters": {"see you": "later"}} +def get_request_options_with_none() -> RequestOptions: + return {"additional_body_parameters": {"see you": "later", "optional": None}} + + def test_get_json_request_body() -> None: json_body, data_body = get_request_body(json={"hello": "world"}, data=None, request_options=None, omit=None) assert json_body == {"hello": "world"} @@ -48,14 +94,569 @@ def test_get_none_request_body() -> None: def test_get_empty_json_request_body() -> None: + """Test that implicit empty bodies (json=None) are collapsed to None.""" unrelated_request_options: RequestOptions = {"max_retries": 3} json_body, data_body = get_request_body(json=None, data=None, request_options=unrelated_request_options, omit=None) assert json_body is None assert data_body is None - json_body_extras, data_body_extras = get_request_body( - json={}, data=None, request_options=unrelated_request_options, omit=None + +def test_explicit_empty_json_body_is_preserved() -> None: + """Test that explicit empty bodies (json={}) are preserved and sent as {}. + + This is important for endpoints where the request body is required but all + fields are optional. The server expects valid JSON ({}) not an empty body. + """ + unrelated_request_options: RequestOptions = {"max_retries": 3} + + # Explicit json={} should be preserved + json_body, data_body = get_request_body(json={}, data=None, request_options=unrelated_request_options, omit=None) + assert json_body == {} + assert data_body is None + + # Explicit data={} should also be preserved + json_body2, data_body2 = get_request_body(json=None, data={}, request_options=unrelated_request_options, omit=None) + assert json_body2 is None + assert data_body2 == {} + + +def test_json_body_preserves_none_values() -> None: + """Test that JSON bodies preserve None values (they become JSON null).""" + json_body, data_body = get_request_body( + json={"hello": "world", "optional": None}, data=None, request_options=None, omit=None ) + # JSON bodies should preserve None values + assert json_body == {"hello": "world", "optional": None} + assert data_body is None - assert json_body_extras is None - assert data_body_extras is None + +def test_data_body_preserves_none_values_without_multipart() -> None: + """Test that data bodies preserve None values when not using multipart. + + The filtering of None values happens in HttpClient.request/stream methods, + not in get_request_body. This test verifies get_request_body doesn't filter None. + """ + json_body, data_body = get_request_body( + json=None, data={"hello": "world", "optional": None}, request_options=None, omit=None + ) + # get_request_body should preserve None values in data body + # The filtering happens later in HttpClient.request when multipart is detected + assert data_body == {"hello": "world", "optional": None} + assert json_body is None + + +def test_remove_none_from_dict_filters_none_values() -> None: + """Test that remove_none_from_dict correctly filters out None values.""" + original = {"hello": "world", "optional": None, "another": "value", "also_none": None} + filtered = remove_none_from_dict(original) + assert filtered == {"hello": "world", "another": "value"} + # Original should not be modified + assert original == {"hello": "world", "optional": None, "another": "value", "also_none": None} + + +def test_remove_none_from_dict_empty_dict() -> None: + """Test that remove_none_from_dict handles empty dict.""" + assert remove_none_from_dict({}) == {} + + +def test_remove_none_from_dict_all_none() -> None: + """Test that remove_none_from_dict handles dict with all None values.""" + assert remove_none_from_dict({"a": None, "b": None}) == {} + + +def test_http_client_does_not_pass_empty_params_list() -> None: + """Test that HttpClient passes params=None when params are empty. + + This prevents httpx from stripping existing query parameters from the URL, + which happens when params=[] or params={} is passed. + """ + dummy_client = _DummySyncClient() + http_client = HttpClient( + httpx_client=dummy_client, # type: ignore[arg-type] + base_timeout=lambda: None, + base_headers=lambda: {}, + base_url=lambda: "https://example.com", + ) + + # Use a path with query params (e.g., pagination cursor URL) + http_client.request( + path="resource?after=123", + method="GET", + params=None, + request_options=None, + ) + + # We care that httpx receives params=None, not [] or {} + assert "params" in dummy_client.last_request_kwargs + assert dummy_client.last_request_kwargs["params"] is None + + # Verify the query string in the URL is preserved + url = str(dummy_client.last_request_kwargs["url"]) + assert "after=123" in url, f"Expected query param 'after=123' in URL, got: {url}" + + +def test_http_client_passes_encoded_params_when_present() -> None: + """Test that HttpClient passes encoded params when params are provided.""" + dummy_client = _DummySyncClient() + http_client = HttpClient( + httpx_client=dummy_client, # type: ignore[arg-type] + base_timeout=lambda: None, + base_headers=lambda: {}, + base_url=lambda: "https://example.com/resource", + ) + + http_client.request( + path="", + method="GET", + params={"after": "456"}, + request_options=None, + ) + + params = dummy_client.last_request_kwargs["params"] + # For a simple dict, encode_query should give a single (key, value) tuple + assert params == [("after", "456")] + + +@pytest.mark.asyncio +async def test_async_http_client_does_not_pass_empty_params_list() -> None: + """Test that AsyncHttpClient passes params=None when params are empty. + + This prevents httpx from stripping existing query parameters from the URL, + which happens when params=[] or params={} is passed. + """ + dummy_client = _DummyAsyncClient() + http_client = AsyncHttpClient( + httpx_client=dummy_client, # type: ignore[arg-type] + base_timeout=lambda: None, + base_headers=lambda: {}, + base_url=lambda: "https://example.com", + async_base_headers=None, + ) + + # Use a path with query params (e.g., pagination cursor URL) + await http_client.request( + path="resource?after=123", + method="GET", + params=None, + request_options=None, + ) + + # We care that httpx receives params=None, not [] or {} + assert "params" in dummy_client.last_request_kwargs + assert dummy_client.last_request_kwargs["params"] is None + + # Verify the query string in the URL is preserved + url = str(dummy_client.last_request_kwargs["url"]) + assert "after=123" in url, f"Expected query param 'after=123' in URL, got: {url}" + + +@pytest.mark.asyncio +async def test_async_http_client_passes_encoded_params_when_present() -> None: + """Test that AsyncHttpClient passes encoded params when params are provided.""" + dummy_client = _DummyAsyncClient() + http_client = AsyncHttpClient( + httpx_client=dummy_client, # type: ignore[arg-type] + base_timeout=lambda: None, + base_headers=lambda: {}, + base_url=lambda: "https://example.com/resource", + async_base_headers=None, + ) + + await http_client.request( + path="", + method="GET", + params={"after": "456"}, + request_options=None, + ) + + params = dummy_client.last_request_kwargs["params"] + # For a simple dict, encode_query should give a single (key, value) tuple + assert params == [("after", "456")] + + +def test_basic_url_joining() -> None: + """Test basic URL joining with a simple base URL and path.""" + result = _build_url("https://api.example.com", "/users") + assert result == "https://api.example.com/users" + + +def test_basic_url_joining_trailing_slash() -> None: + """Test basic URL joining with a simple base URL and path.""" + result = _build_url("https://api.example.com/", "/users") + assert result == "https://api.example.com/users" + + +def test_preserves_base_url_path_prefix() -> None: + """Test that path prefixes in base URL are preserved. + + This is the critical bug fix - urllib.parse.urljoin() would strip + the path prefix when the path starts with '/'. + """ + result = _build_url("https://cloud.example.com/org/tenant/api", "/users") + assert result == "https://cloud.example.com/org/tenant/api/users" + + +def test_preserves_base_url_path_prefix_trailing_slash() -> None: + """Test that path prefixes in base URL are preserved.""" + result = _build_url("https://cloud.example.com/org/tenant/api/", "/users") + assert result == "https://cloud.example.com/org/tenant/api/users" + + +# --------------------------------------------------------------------------- +# Connection error retry tests +# --------------------------------------------------------------------------- + + +def _make_sync_http_client(mock_client: Any) -> HttpClient: + return HttpClient( + httpx_client=mock_client, # type: ignore[arg-type] + base_timeout=lambda: None, + base_headers=lambda: {}, + base_url=lambda: "https://example.com", + ) + + +def _make_async_http_client(mock_client: Any) -> AsyncHttpClient: + return AsyncHttpClient( + httpx_client=mock_client, # type: ignore[arg-type] + base_timeout=lambda: None, + base_headers=lambda: {}, + base_url=lambda: "https://example.com", + async_base_headers=None, + ) + + +@patch("vapi.core.http_client.time.sleep", return_value=None) +def test_sync_retries_on_connect_error(mock_sleep: MagicMock) -> None: + """Sync: connection error retries on httpx.ConnectError.""" + mock_client = MagicMock() + mock_client.request.side_effect = [ + httpx.ConnectError("connection failed"), + _DummyResponse(), + ] + http_client = _make_sync_http_client(mock_client) + + response = http_client.request(path="/test", method="GET") + + assert response.status_code == 200 + assert mock_client.request.call_count == 2 + mock_sleep.assert_called_once() + + +@patch("vapi.core.http_client.time.sleep", return_value=None) +def test_sync_retries_on_remote_protocol_error(mock_sleep: MagicMock) -> None: + """Sync: connection error retries on httpx.RemoteProtocolError.""" + mock_client = MagicMock() + mock_client.request.side_effect = [ + httpx.RemoteProtocolError("Remote end closed connection without response"), + _DummyResponse(), + ] + http_client = _make_sync_http_client(mock_client) + + response = http_client.request(path="/test", method="GET") + + assert response.status_code == 200 + assert mock_client.request.call_count == 2 + mock_sleep.assert_called_once() + + +@patch("vapi.core.http_client.time.sleep", return_value=None) +def test_sync_connection_error_exhausts_retries(mock_sleep: MagicMock) -> None: + """Sync: connection error exhausts retries then raises.""" + mock_client = MagicMock() + mock_client.request.side_effect = httpx.ConnectError("connection failed") + http_client = _make_sync_http_client(mock_client) + + with pytest.raises(httpx.ConnectError): + http_client.request( + path="/test", + method="GET", + request_options={"max_retries": 2}, + ) + + # 1 initial + 2 retries = 3 total attempts + assert mock_client.request.call_count == 3 + assert mock_sleep.call_count == 2 + + +@patch("vapi.core.http_client.time.sleep", return_value=None) +def test_sync_connection_error_respects_max_retries_zero(mock_sleep: MagicMock) -> None: + """Sync: connection error respects max_retries=0.""" + mock_client = MagicMock() + mock_client.request.side_effect = httpx.ConnectError("connection failed") + http_client = _make_sync_http_client(mock_client) + + with pytest.raises(httpx.ConnectError): + http_client.request( + path="/test", + method="GET", + request_options={"max_retries": 0}, + ) + + # No retries, just the initial attempt + assert mock_client.request.call_count == 1 + mock_sleep.assert_not_called() + + +@pytest.mark.asyncio +@patch("vapi.core.http_client.asyncio.sleep", new_callable=AsyncMock) +async def test_async_retries_on_connect_error(mock_sleep: AsyncMock) -> None: + """Async: connection error retries on httpx.ConnectError.""" + mock_client = MagicMock() + mock_client.request = AsyncMock( + side_effect=[ + httpx.ConnectError("connection failed"), + _DummyResponse(), + ] + ) + http_client = _make_async_http_client(mock_client) + + response = await http_client.request(path="/test", method="GET") + + assert response.status_code == 200 + assert mock_client.request.call_count == 2 + mock_sleep.assert_called_once() + + +@pytest.mark.asyncio +@patch("vapi.core.http_client.asyncio.sleep", new_callable=AsyncMock) +async def test_async_retries_on_remote_protocol_error(mock_sleep: AsyncMock) -> None: + """Async: connection error retries on httpx.RemoteProtocolError.""" + mock_client = MagicMock() + mock_client.request = AsyncMock( + side_effect=[ + httpx.RemoteProtocolError("Remote end closed connection without response"), + _DummyResponse(), + ] + ) + http_client = _make_async_http_client(mock_client) + + response = await http_client.request(path="/test", method="GET") + + assert response.status_code == 200 + assert mock_client.request.call_count == 2 + mock_sleep.assert_called_once() + + +@pytest.mark.asyncio +@patch("vapi.core.http_client.asyncio.sleep", new_callable=AsyncMock) +async def test_async_connection_error_exhausts_retries(mock_sleep: AsyncMock) -> None: + """Async: connection error exhausts retries then raises.""" + mock_client = MagicMock() + mock_client.request = AsyncMock(side_effect=httpx.ConnectError("connection failed")) + http_client = _make_async_http_client(mock_client) + + with pytest.raises(httpx.ConnectError): + await http_client.request( + path="/test", + method="GET", + request_options={"max_retries": 2}, + ) + + # 1 initial + 2 retries = 3 total attempts + assert mock_client.request.call_count == 3 + assert mock_sleep.call_count == 2 + + +# --------------------------------------------------------------------------- +# base_max_retries constructor parameter tests +# --------------------------------------------------------------------------- + + +def test_sync_http_client_default_base_max_retries() -> None: + """HttpClient defaults to base_max_retries=2.""" + http_client = HttpClient( + httpx_client=MagicMock(), # type: ignore[arg-type] + base_timeout=lambda: None, + base_headers=lambda: {}, + ) + assert http_client.base_max_retries == 2 + + +def test_async_http_client_default_base_max_retries() -> None: + """AsyncHttpClient defaults to base_max_retries=2.""" + http_client = AsyncHttpClient( + httpx_client=MagicMock(), # type: ignore[arg-type] + base_timeout=lambda: None, + base_headers=lambda: {}, + ) + assert http_client.base_max_retries == 2 + + +def test_sync_http_client_custom_base_max_retries() -> None: + """HttpClient accepts a custom base_max_retries value.""" + http_client = HttpClient( + httpx_client=MagicMock(), # type: ignore[arg-type] + base_timeout=lambda: None, + base_headers=lambda: {}, + base_max_retries=5, + ) + assert http_client.base_max_retries == 5 + + +def test_async_http_client_custom_base_max_retries() -> None: + """AsyncHttpClient accepts a custom base_max_retries value.""" + http_client = AsyncHttpClient( + httpx_client=MagicMock(), # type: ignore[arg-type] + base_timeout=lambda: None, + base_headers=lambda: {}, + base_max_retries=5, + ) + assert http_client.base_max_retries == 5 + + +@patch("vapi.core.http_client.time.sleep", return_value=None) +def test_sync_base_max_retries_zero_disables_retries(mock_sleep: MagicMock) -> None: + """Sync: base_max_retries=0 disables retries when no request_options override.""" + mock_client = MagicMock() + mock_client.request.side_effect = httpx.ConnectError("connection failed") + http_client = HttpClient( + httpx_client=mock_client, # type: ignore[arg-type] + base_timeout=lambda: None, + base_headers=lambda: {}, + base_url=lambda: "https://example.com", + base_max_retries=0, + ) + + with pytest.raises(httpx.ConnectError): + http_client.request(path="/test", method="GET") + + # No retries, just the initial attempt + assert mock_client.request.call_count == 1 + mock_sleep.assert_not_called() + + +@pytest.mark.asyncio +@patch("vapi.core.http_client.asyncio.sleep", new_callable=AsyncMock) +async def test_async_base_max_retries_zero_disables_retries(mock_sleep: AsyncMock) -> None: + """Async: base_max_retries=0 disables retries when no request_options override.""" + mock_client = MagicMock() + mock_client.request = AsyncMock(side_effect=httpx.ConnectError("connection failed")) + http_client = AsyncHttpClient( + httpx_client=mock_client, # type: ignore[arg-type] + base_timeout=lambda: None, + base_headers=lambda: {}, + base_url=lambda: "https://example.com", + base_max_retries=0, + ) + + with pytest.raises(httpx.ConnectError): + await http_client.request(path="/test", method="GET") + + # No retries, just the initial attempt + assert mock_client.request.call_count == 1 + mock_sleep.assert_not_called() + + +@patch("vapi.core.http_client.time.sleep", return_value=None) +def test_sync_request_options_override_base_max_retries(mock_sleep: MagicMock) -> None: + """Sync: request_options max_retries overrides base_max_retries.""" + mock_client = MagicMock() + mock_client.request.side_effect = [ + httpx.ConnectError("connection failed"), + httpx.ConnectError("connection failed"), + _DummyResponse(), + ] + http_client = HttpClient( + httpx_client=mock_client, # type: ignore[arg-type] + base_timeout=lambda: None, + base_headers=lambda: {}, + base_url=lambda: "https://example.com", + base_max_retries=0, # base says no retries + ) + + # But request_options overrides to allow 2 retries + response = http_client.request( + path="/test", + method="GET", + request_options={"max_retries": 2}, + ) + + assert response.status_code == 200 + # 1 initial + 2 retries = 3 total attempts + assert mock_client.request.call_count == 3 + + +@pytest.mark.asyncio +@patch("vapi.core.http_client.asyncio.sleep", new_callable=AsyncMock) +async def test_async_request_options_override_base_max_retries(mock_sleep: AsyncMock) -> None: + """Async: request_options max_retries overrides base_max_retries.""" + mock_client = MagicMock() + mock_client.request = AsyncMock( + side_effect=[ + httpx.ConnectError("connection failed"), + httpx.ConnectError("connection failed"), + _DummyResponse(), + ] + ) + http_client = AsyncHttpClient( + httpx_client=mock_client, # type: ignore[arg-type] + base_timeout=lambda: None, + base_headers=lambda: {}, + base_url=lambda: "https://example.com", + base_max_retries=0, # base says no retries + ) + + # But request_options overrides to allow 2 retries + response = await http_client.request( + path="/test", + method="GET", + request_options={"max_retries": 2}, + ) + + assert response.status_code == 200 + # 1 initial + 2 retries = 3 total attempts + assert mock_client.request.call_count == 3 + + +@patch("vapi.core.http_client.time.sleep", return_value=None) +def test_sync_base_max_retries_used_as_default(mock_sleep: MagicMock) -> None: + """Sync: base_max_retries is used when request_options has no max_retries.""" + mock_client = MagicMock() + mock_client.request.side_effect = [ + httpx.ConnectError("fail"), + httpx.ConnectError("fail"), + httpx.ConnectError("fail"), + _DummyResponse(), + ] + http_client = HttpClient( + httpx_client=mock_client, # type: ignore[arg-type] + base_timeout=lambda: None, + base_headers=lambda: {}, + base_url=lambda: "https://example.com", + base_max_retries=3, + ) + + response = http_client.request(path="/test", method="GET") + + assert response.status_code == 200 + # 1 initial + 3 retries = 4 total attempts + assert mock_client.request.call_count == 4 + + +@pytest.mark.asyncio +@patch("vapi.core.http_client.asyncio.sleep", new_callable=AsyncMock) +async def test_async_base_max_retries_used_as_default(mock_sleep: AsyncMock) -> None: + """Async: base_max_retries is used when request_options has no max_retries.""" + mock_client = MagicMock() + mock_client.request = AsyncMock( + side_effect=[ + httpx.ConnectError("fail"), + httpx.ConnectError("fail"), + httpx.ConnectError("fail"), + _DummyResponse(), + ] + ) + http_client = AsyncHttpClient( + httpx_client=mock_client, # type: ignore[arg-type] + base_timeout=lambda: None, + base_headers=lambda: {}, + base_url=lambda: "https://example.com", + base_max_retries=3, + ) + + response = await http_client.request(path="/test", method="GET") + + assert response.status_code == 200 + # 1 initial + 3 retries = 4 total attempts + assert mock_client.request.call_count == 4 diff --git a/tests/utils/test_query_encoding.py b/tests/utils/test_query_encoding.py index a78cd5b7..7a115e83 100644 --- a/tests/utils/test_query_encoding.py +++ b/tests/utils/test_query_encoding.py @@ -1,6 +1,5 @@ # This file was auto-generated by Fern from our API Definition. - from vapi.core.query_encoder import encode_query @@ -34,4 +33,4 @@ def test_query_encoding_deep_object_arrays() -> None: def test_encode_query_with_none() -> None: encoded = encode_query(None) - assert encoded == None + assert encoded is None diff --git a/tests/utils/test_serialization.py b/tests/utils/test_serialization.py index 0d1b05d9..f5a03153 100644 --- a/tests/utils/test_serialization.py +++ b/tests/utils/test_serialization.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. -from typing import List, Any +from typing import Any, List -from vapi.core.serialization import convert_and_respect_annotation_metadata -from .assets.models import ShapeParams, ObjectWithOptionalFieldParams +from .assets.models import ObjectWithOptionalFieldParams, ShapeParams +from vapi.core.serialization import convert_and_respect_annotation_metadata UNION_TEST: ShapeParams = {"radius_measurement": 1.0, "shape_type": "circle", "id": "1"} UNION_TEST_CONVERTED = {"shapeType": "circle", "radiusMeasurement": 1.0, "id": "1"}